/* ==================================================================
   THE DOCKET, BLACK AND CREAM: fighter.php. Black sheet, cream ink.
   ==================================================================
   Loaded AFTER docket.css and only by fighter.php. Everything in it starts
   with .docket.is-dark, a class only fighter.php puts on the sheet, so nothing
   else on the site is affected. docket.css draws the sheet in cream on black
   ink; this file swaps them. It holds two kinds of thing: the colours (first),
   and the pieces only this page has (last): the drawers, the blank lines, the
   larger photo and where the watermark sits. Those are layout, which
   docket.css would normally own, but they are kept here with the colours so
   that docket.css stays exactly as first written and this file is the whole
   difference from it.

   Black and cream swap places: the paper is the old ink, the ink is the old
   paper. The rest follows from that, because docket.css draws almost
   everything from the five variables below. What it does NOT draw from them
   (the nickname, the photo's backing, the seal's backing, the watermark's
   blend, and the accent colours) is set again here. */

.docket.is-dark {
  --paper: #140c1e;
  --ink: #f5f4f7;
  --muted: #b9b4c2;     /* labels and dates: 6.3 : 1 on the black */
  --rule: #2a2236;
  --rule-soft: #1d122b;
  --moral: #ff2faf;     /* no alignment set: the site's red, lifted to 4.5 : 1 */
}

/* Alignment. The cream sheet used darker versions of the site's colours; on
   black the site's OWN colours are the right ones, so these are the colours
   the site already uses for alignment elsewhere. Heel is the site's red lifted
   a little (the original is 3.7 : 1 on this black, just under what small text
   needs). */
.docket.is-dark.is-face { --moral: #8a9bb0; }
.docket.is-dark.is-tweener { --moral: #e4b84a; }
.docket.is-dark.is-heel  { --moral: #ff2faf; }

/* A black sheet on the site's near-black page needs an edge to read as a sheet. */
.docket.is-dark .sheet {
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--rule-soft);
}

/* The watermark. On cream it was multiplied in, so the figure's dark areas
   darkened the paper. Multiplying into black shows nothing, so here it is
   screened: the figure's light areas lighten the black and its dark areas
   disappear into it, which is the same watermark seen the other way round. */
.docket.is-dark .ghost {
  mix-blend-mode: screen;
  opacity: 0.14;
  filter: grayscale(1) contrast(1.1);
}

/* Where the watermark sits. fighter.php puts it inside a box (.rest) that
   starts at the facts strip, so it always begins below the photo and the name
   and ends at the foot of the page: no fixed starting point to keep right for
   one photo size on one screen. It was a share of the sheet's height, which on
   a short page put the figure's head beside the photo; then a fixed 380px,
   which the bigger photo outgrew. Here it takes the full height of that box
   (less a margin at the foot so the feet clear the closing line) and starts at
   its top. It still runs a little past the right edge, as in the design: the
   box is inset by the sheet's 36px padding, so -56px puts it where -2% of the
   sheet put it before. */
.docket.is-dark .rest { position: relative; }
.docket.is-dark .ghost {
  top: 0;
  right: -56px;
  width: min(55%, 480px);
  height: calc(100% - 30px);
  object-position: center top;
}

/* The photo at top right, twice the size: 336 x 428 where docket.css has
   168 x 214, the same shape, so it is cropped exactly as before. The column it
   sits in grows to match. On a phone it cannot be twice as wide
   as the screen, so it fills the width of the sheet instead, up to 480px. */
.docket.is-dark .id { grid-template-columns: minmax(0, 1fr) 336px; }
.docket.is-dark .mug { width: 336px; height: 428px; }
@media (max-width: 800px) {
  /* A touch fainter on a phone, where the larger figure passes behind the grey
     labels of the facts strip and 14% put one of them just under 4.5 : 1. */
  .docket.is-dark .ghost { width: 90%; right: -10%; height: calc(100% - 30px); object-position: center top; opacity: 0.12; }
  .docket.is-dark .id { grid-template-columns: minmax(0, 1fr); }
  .docket.is-dark .mug { width: min(100%, 480px); height: auto; aspect-ratio: 168 / 214; }
}

.docket.is-dark .aka { color: #b9b4c2; }
.docket.is-dark .mug { background: #2a2236; }
.docket.is-dark .seal { background: rgba(28, 25, 21, 0.94); }

/* ---- Drawers ----
   The four histories in The Book, as the old page had them: closed until
   asked for, with a caret that turns when one is opened. Each is a native
   <details>, so it opens by mouse, by Enter or Space, and is announced as
   expandable with no script. The heading stays a real h3 inside the bar. */
.docket.is-dark .drawer { border-bottom: 1px solid var(--rule-soft); }
.docket.is-dark h2 + .drawer { border-top: 1px solid var(--rule-soft); }
.docket.is-dark .drawer > summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 13px 0;          /* 44px tall: the usual minimum for a finger */
  cursor: pointer;
  list-style: none;
  color: var(--muted);
}
.docket.is-dark .drawer > summary::-webkit-details-marker { display: none; }
/* The caret is drawn, not typed: a glyph depends on which fonts the
   visitor has. */
.docket.is-dark .drawer > summary::before {
  content: "";
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--moral);
  transition: transform 140ms ease;
}
.docket.is-dark .drawer[open] > summary::before { transform: rotate(90deg); }
.docket.is-dark .drawer > summary:hover,
.docket.is-dark .drawer[open] > summary { color: var(--ink); }
.docket.is-dark .drawer > summary:focus-visible { outline: 2px solid var(--moral); outline-offset: 2px; }
.docket.is-dark .drawer > summary h3 { margin: 0; color: inherit; }
.docket.is-dark .drawer-body { padding: 2px 0 18px; }
@media (prefers-reduced-motion: reduce) {
  .docket.is-dark .drawer > summary::before { transition: none; }
}

/* ---- A blank line after a section ----
   One line of body text (24px) on top of the usual 18px above the next
   heading. It is a margin sized to the SUM, not 24px, because adjacent
   vertical margins merge: 24px would be swallowed by the 18px already there
   and add only 6. */
.docket.is-dark .gap { margin-bottom: calc(18px + 1.5rem); }
