/* =======================================================================
   VYYN — two skins.

   The contrast complaint was real, but it was not a WCAG problem: an audit of
   every pairing on 16 pages came back with zero failures while the site still
   looked murky. Contrast ratio measures one piece of text against the thing
   directly behind it. It says nothing about whether the composition has any
   RANGE — and this one had none. Navy page, navy card, navy sunk panel, all
   within a few points of each other; no white anywhere, no black anywhere,
   and gold at #F1DDA9 was the brightest object that existed. A page can pass
   every check and still read as one flat grey field.

   So the fix is range, and a reason for it.

   PAPER is the default now. Warm stock rather than glare — pure white under
   gold reads cheap — cards lifting to true white, ink pushed almost to black.
   It is what a book imprint's reading and selling pages should always have
   looked like.

   ARENA is the old dark, kept for the places that earn it: the trial, the
   board, the pot, the account. It also appears as an inset island on a paper
   page wherever something should feel like it happens in a different room.
   That single inversion is most of the range the site was missing, and it
   carries a meaning rather than a mood — the book is ink on paper, the
   competition is the arena.

   Nothing here was picked by eye. Each colour was solved against its own
   worst background (solve.py darkens until it clears the target on --sunk,
   the hardest of the three grounds). Lowest text pairing in either skin is
   4.52:1; rules and large numerals clear the 3:1 bar they are held to.

     paper   fg 16.85  muted 7.23  faint 4.98  gold 5.05  gold-dim 3.34
     arena   fg 15.68  muted 7.04  faint 4.63  gold 12.9  gold-dim 4.21

   The washes these skins ride on are no longer literals. 61 lines of
   rgba(241,221,169,…) and rgba(184,143,78,…) across seven stylesheets became
   color-mix() against the accent token, so a tint keeps its alpha and takes
   its hue from whichever skin is live. That is why this file is short: it
   sets tokens, and the components follow.
   ======================================================================= */

:root{
  --bg:#F6F2E9;
  --raise:#FFFFFF;
  --sunk:#EDE7DA;
  --fg:#0B1120;
  --muted:#44506A;
  --faint:#5F687F;
  --gold:#80631D;          /* champagne is unreadable on paper; this is not */
  --gold-dim:#A27F34;
  --mint:#17715A;
  --ochre:#A8431E;
  --hair:rgba(11,17,32,.17);
  --hair-soft:rgba(11,17,32,.10);
  --on-accent:#FFFFFF;     /* 5.64 on --gold */
  --accent-hi:#5E4813;
  --hover:#FAF7F0;         /* white cannot lift, so a pressed card settles */
  --veil:#F6F2E9;
  --scrim:rgba(11,17,32,.44);
  /* A lit top edge is a dark-room trick. On white it is a smear, so a card on
     paper lifts the way an object on a desk does — contact shadow plus cast. */
  --lip:0 1px 2px rgba(11,17,32,.05), 0 10px 26px -14px rgba(11,17,32,.22);
  --objshadow:rgba(11,17,32,.42);
  --glow:none;             /* a halo on paper is grime */
  --glowbig:none;
  /* One label size. 12px is the floor at which tracked uppercase stops
     costing the reader; the nine sizes it replaces were all below it. */
  --lbl:.75rem;
  --sig-ink:128,99,29;
  --sig-alt:23,113,90;
  --sig-bg:246,242,233;
  color-scheme:light;
}

html.skin-arena,.skin-arena{
  --bg:#070D1C; --raise:#0E1628; --sunk:#09101F;
  --fg:#F4F8FD; --muted:#9BAAC6; --faint:#7587A6;
  --gold:#F1DDA9; --gold-dim:#B88F4E;
  --mint:#6FE0C0; --ochre:#FF7E55;
  --hair:rgba(184,143,78,.34); --hair-soft:rgba(184,143,78,.14);
  --on-accent:#070D1C;
  --accent-hi:#FFF0C9;
  --hover:#121C33;
  --veil:#070D1C;
  --scrim:rgba(4,8,18,.76);
  --lip:inset 0 1px 0 rgba(241,221,169,.09);
  --objshadow:rgba(0,0,0,.9);
  --glow:0 0 22px color-mix(in srgb,var(--gold) 22%,transparent);
  --glowbig:0 0 44px color-mix(in srgb,var(--gold) 26%,transparent);
  --sig-ink:241,221,169;
  --sig-alt:111,224,192;
  --sig-bg:7,13,28;
  color-scheme:dark;
}
.skin-arena{background:var(--bg);color:var(--fg)}

/* -------------------------------------------- what rides on a photograph
   A scrim lies on an image, not on the page, so everything over it is fixed
   in both skins. These are the only colours in the system that do not flip:
   make them follow --fg and the runtime label turns black on a dark veil the
   moment the page goes to paper. */
:root,html.skin-arena,.skin-arena{
  --on-media:#F4F8FD;
  --gold-media:#F1DDA9;
  --mediascrim-a:rgba(7,13,28,.30);
  --mediascrim-b:rgba(7,13,28,.66);
  --mediascrim-c:rgba(7,13,28,.16);
  --mediascrim-d:rgba(7,13,28,.56);
  --mediascrim-e:rgba(7,13,28,.42);
  --mediascrim-f:rgba(7,13,28,.70);
}

/* ---------------------------------------------------------- the two edges */
/* On navy a card is told apart from the page by a hairline and a lit edge.
   On paper it is told apart by being whiter than the page, so the hairline
   steps back and the shadow does the work. */
html:not(.skin-arena) .route,
html:not(.skin-arena) .grid.trained .chapcard,
html:not(.skin-arena) .band .cell,
html:not(.skin-arena) .vp .pcard{border-color:transparent}

html:not(.skin-arena) .player,
html:not(.skin-arena) .film{
  box-shadow:0 2px 4px rgba(11,17,32,.06),0 18px 44px -22px rgba(11,17,32,.4)}

/* ------------------------------------------------ an arena island on paper */
.isle{background:var(--bg);color:var(--fg);padding:30px 26px 34px;
  border:0;box-shadow:0 30px 70px -40px rgba(11,17,32,.55);
  margin-block:var(--sec)}
.isle > :first-child{margin-top:0}
@media (max-width:620px){
  .isle{padding:24px 18px 26px;margin-inline:calc(50% - 50vw);width:100vw;max-width:100vw}
}

/* ---------------------------------------------------------------- details */
::selection{background:var(--gold);color:var(--on-accent)}
::-moz-selection{background:var(--gold);color:var(--on-accent)}
:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
@media print{ :root{--glow:none;--glowbig:none} }


/* --------------------------------------- the competition is always dark
   One rule, applied everywhere it appears: the weekly competition is the
   arena, so it carries the arena's colours whatever page it is sitting on.
   On the chapter grid that makes the twelfth tile the one dark square in
   eleven pale ones, which is also exactly where the eye should go after
   reading the eleven. */
.grid.trained .chapcard.endtile.skin-arena{
  background:var(--bg);box-shadow:none}
.grid.trained .chapcard.endtile.skin-arena .num{color:var(--gold)}
.grid.trained .chapcard.endtile.skin-arena b{color:var(--fg)}
.grid.trained .chapcard.endtile.skin-arena:hover{background:var(--hover)}
.grid.trained .chapcard.endtile.skin-arena:hover b{color:var(--gold)}

/* the chapter panel's own empty state */
.youempty{margin:12px 0 0;font-size:.8rem;line-height:1.6;color:var(--faint)}

/* -------------------------------------------------------------- the mark
   vyyn-logo.png and vyyn-mark.png are champagne artwork on transparency,
   drawn to sit on navy. Measured against cream they come out at 1.31:1 —
   the logo was invisible on every paper page, in the bar, the masthead and
   the footer alike. The ink variants invert the value and keep the hue and
   the modelling, and measure 6.61:1. content: swaps the rendered image
   without a second element or a second request on the arena pages. */
html:not(.skin-arena) .brand img,
html:not(.skin-arena) .nav .home img{opacity:1}
/* the src itself carries the right artwork, page by page: a CSS content:
   swap collapses a sized <img> to 0x0 in Chromium, and each page belongs
   to exactly one skin anyway, so there is nothing to switch at runtime. */

/* --------------------------------------------------- headings on a phone
   At 390px the display serif breaks a three-word heading after the first
   word — "Fifteen / minutes, today", "The honest / answer". balance spreads
   the lines evenly instead of filling greedily, which is what a typesetter
   would do by hand and what these headings were written for. */
.card h2,.compisle h2,header .ttl,.chapcard b,.route b{text-wrap:balance}

/* Three controls set outline:none for their own hover treatment and never
   put a keyboard one back: the small Refresh/Leave buttons, the store link
   inside the shop card, and its close button. A keyboard user had no idea
   where they were standing on any page that carries the tab. */
button.tiny:focus-visible,
.shoptab .goin:focus-visible,
.shoptab .x:focus-visible,
.tellcopy:focus-visible,
.fbbtn:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

/* Text fields signalled focus by changing their border colour and nothing
   else — a 1px hue shift is not a focus indicator, and on the paper skin it
   is almost invisible. The border keeps doing its job; the ring is added on
   top of it, for keyboard only, so the mouse experience is unchanged. */
input:focus-visible,textarea:focus-visible,select:focus-visible,
#wishlist input:focus-visible,#wishlist select:focus-visible,
#wishlist textarea:focus-visible,
/* .join input:focus and .note textarea:focus each set outline:none at a
   higher specificity than the rule above, so they need naming outright */
.join input:focus-visible,.note textarea:focus-visible,
.tinput:focus-visible,.authform input:focus-visible,
.field input:focus-visible{outline:2px solid var(--gold);outline-offset:2px}


/* ---------------------------------------------------------------- the bar
   The bar was 12% transparent with a 16px blur, so its real background was
   whatever happened to be scrolling under it. Parked over the dark island,
   the chapter numerals measured 3.56:1 — against 4.98:1 on a still page.
   A translucent bar quotes its best case and delivers its worst, and this
   one sits above everything on every page, so it is now opaque. The blur
   stays only as a hairline of depth under it. */
.nav{backdrop-filter:none;-webkit-backdrop-filter:none;
  border-bottom:1px solid var(--hair);
  box-shadow:0 1px 0 var(--shade),0 6px 18px -14px rgba(11,17,32,.4)}
html.skin-arena .nav{box-shadow:0 1px 0 var(--shade)}

/* Eleven numerals in a row were the weakest ink on the page and the first
   thing a reader has to aim at. --faint is a caption colour, not a target. */
.chips a{color:var(--muted)}
.chips a:hover{color:var(--gold)}
