/* Tussock design tokens: the source of truth for the shell around the toy
   (design/DESIGN_SYSTEM.md). index.html's stylesheet reads these, and its
   script reads --ink, --dur-turn and --hint-visible at start-up. The canvas
   inside each mode keeps its own palette and motion; these tokens are the
   start screen, the settings strip, the hint and the mode nav, which is
   what the accessibility floor applies to. scripts/test/contrast.test.mjs
   measures the pairs below from this file and fails under the floor. */
@font-face{font-family:"Literata";font-style:normal;font-weight:400;font-display:fallback;src:url("fonts/literata.woff2") format("woff2")}
@font-face{font-family:"Literata";font-style:italic;font-weight:400;font-display:fallback;src:url("fonts/literata-italic.woff2") format("woff2")}
:root{
  /* colour: core */
  --ink:#16232e;
  --bone:#ece6d8;
  --mist:#a9c2cc;
  --moss:#7fa07f;
  --amber:#e6c68c;
  --rose:#c79a94;
  --teal-deep:#5f8a92;
  --lavender:#8b86a8;
  --slate:#2a3a47;
  --dough:#dcc39a;
  --ink-rgb:22,35,46;
  --bone-rgb:236,230,216;

  /* surfaces: translucent ink behind everything that carries text over the canvas,
     so text is measured against ink whatever the toy is showing underneath.
     --band sits behind the nav, the settings strip and the hint; --veil is the start screen. */
  --band-alpha:.9;
  --band:rgba(var(--ink-rgb),var(--band-alpha));
  --veil-alpha:.86;
  --veil:rgba(var(--ink-rgb),var(--veil-alpha));
  --sheet-alpha:.96;
  --sheet:rgba(var(--ink-rgb),var(--sheet-alpha));

  /* text over those surfaces: bone at an opacity. Every value here passes 4.5:1
     on --band or --veil over a white canvas, the worst case; on plain ink they read softer
     than the number suggests, since ink is what they were tuned on. */
  --opacity-nav-inactive:.62;
  --opacity-nav-active:.92;
  --opacity-toggle-on:.8;
  --opacity-toggle-off:.62;
  --opacity-hint:.85;
  --opacity-lead:.75;
  --opacity-mark:.55;

  /* control edges and focus (3:1 non-text) */
  --edge-alpha:.55;
  --edge:rgba(var(--bone-rgb),var(--edge-alpha));
  --focus:var(--mist);
  --focus-width:2px;

  /* type: Literata, bundled (fonts/, SIL Open Font License), so the wordmark is the same face on every
     platform and in the store art. The page preloads both files; font-display fallback means text is
     never held invisible for long if a file is slow or refused (a start screen with no words on it
     reads as a blank screen), and the stack behind it takes over until then */
  --font:"Literata","Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;
  --size-title:58px;
  /* the chrome's words and tap targets are phone-sized on a phone and grow with the screen to a limit, so on
     a tablet or a large window they stay easy to read and to hit without ever getting loud */
  --size-hint:clamp(20px,calc(13px + 1.6vmin),28px);
  --size-lead:19px;
  --size-nav:clamp(18px,calc(12px + 1.4vmin),26px);
  --size-toggle:clamp(15px,calc(10px + 1.2vmin),21px);
  --size-begin:22px;
  --size-mark:120px;
  /* the settings mark in the corner: its blades as large as a comfortable thumb target on a phone, growing
     with the screen up to a limit, and the same gap from the top and from the side */
  --size-corner:clamp(32px,7vmin,56px);
  --gap-corner:14px;

  /* motion */
  --dur-quick:500ms;
  --dur-turn:520ms;
  --dur-fade:900ms;
  --dur-hint:1400ms;
  --hint-visible:6s;
  --chrome-awake:4s;

  /* layout */
  /* where the corner marks sit, and the versions' row beneath them: from the safe area here; in the
     Android shell index.html (placeCorners) sets them from the screen's real shape, so a camera hole in
     the middle of the top edge no longer pushes the marks out of the corners */
  --corner-top-left:calc(var(--gap-corner) + var(--safe-area-inset-top,env(safe-area-inset-top,0px)));
  --corner-top-right:calc(var(--gap-corner) + var(--safe-area-inset-top,env(safe-area-inset-top,0px)));
  --corner-left:calc(var(--gap-corner) + var(--safe-area-inset-left,env(safe-area-inset-left,0px)));
  --corner-right:calc(var(--gap-corner) + var(--safe-area-inset-right,env(safe-area-inset-right,0px)));
  --corner-below:calc(var(--corner-top-left) + var(--size-corner) + 6px);
  --strip-top:var(--corner-below);
  --hint-top:38%;
  --gap-edge:10px;
  --target:clamp(44px,calc(28px + 2.4vmin),60px);
}
