/* Shared by every page of the site: the colour tokens, the footer, the
   top bar's width on big screens, and the mock-up's version switcher.
   (The screens' own templates still carry their own copies of the tokens,
   with the same values; these are the ones new work should use.) */
:root{
  --ink:#14121f; --line:2px solid var(--ink);
  --cover:#ECE7DA; --coverbg:var(--cover); --panel:#F4F3EE; --cta:#F6C21A; --grey:#6b6878;
  --cond:'Barlow Condensed','Arial Narrow',system-ui,sans-serif;
  /* the widest the words and pictures run on a big screen */
  --page:1180px;
}

/* keyboard focus: an ink outline everywhere (the cover's template still
   has the old blue one), white on the dark footer */
a:focus-visible,button:focus-visible,#hero:focus-visible{outline-color:var(--ink)}
/* the whole scene can be tapped (the TV does a trick), so phones flashed it
   blue on every tap; the trick is the answer to a tap (Pete, 22 Nov) */
#hero{-webkit-tap-highlight-color:transparent}
#toolkit .rules:focus-visible{outline:3px solid var(--ink);outline-offset:3px}

/* the footer: the site map and the small print, on every page */
.sitefoot{background:var(--ink);color:#fff;font-family:Barlow,system-ui,sans-serif;font-weight:500}
.sitefoot .in{box-sizing:border-box;max-width:592px;margin:0 auto;padding:28px max(16px,env(safe-area-inset-right,0px)) calc(28px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));display:flex;flex-direction:column;gap:12px}
.sitefoot .name{display:block;width:170px}
.sitefoot .lg{display:block;width:100%;height:auto}
.sitefoot ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
.sitefoot a{color:#fff;font-weight:600;font-size:16px}
.sitefoot li a{display:flex;align-items:center;min-height:44px;box-sizing:border-box;padding:10px 0}
.sitefoot p{margin:0;font-size:14px;line-height:1.4;color:#c9c6d3}
.sitefoot a:focus-visible{outline:3px solid #fff;outline-offset:2px}

/* big screens: the footer runs in one row, logo on the left */
@media (min-width:900px){
  .sitefoot .in{max-width:var(--page);padding-left:40px;padding-right:40px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px 40px}
  .sitefoot .name{grid-row:1/3}
  /* four links (21 Nov): where they don't fit in one row, whole links move to a second row; none breaks in two */
  .sitefoot ul{display:flex;flex-wrap:wrap;gap:0 32px}
  .sitefoot li a{white-space:nowrap}
  .sitefoot p{grid-column:3;text-align:right}
  .sitefoot nav{grid-row:1/3}
  .top .in{max-width:var(--page);padding-left:40px;padding-right:40px}
}

/* Mock-up only: the version switcher (versions.js). Dark, like the old
   sketch bars, so it reads as a tool, not the design. */
.vswitch{display:none}
@media (min-width:700px){
  .vswitch{display:flex;flex-direction:column;align-items:flex-end;gap:8px;position:fixed;right:12px;top:12px;z-index:50;font:600 14px/1.2 Barlow,system-ui,sans-serif;color:#fff}
  .vswitch button{font:inherit;color:#fff;background:#3a3645;border:1px solid #5a5568;border-radius:999px;min-height:44px;padding:0 14px;cursor:pointer}
  .vswitch .vtog{background:#2a2733;box-shadow:0 2px 8px rgba(0,0,0,.3)}
  .vswitch .vrows{background:#2a2733;border-radius:12px;padding:10px;display:flex;flex-direction:column;gap:6px;box-shadow:0 2px 12px rgba(0,0,0,.35)}
  .vswitch .vrows[hidden]{display:none}
  .vswitch .vrow{display:flex;align-items:center;gap:6px}
  .vswitch .vrow span{flex:1;min-width:110px;color:#c9c6d6}
  .vswitch button[aria-pressed="true"]{background:#fff;color:#14121f;border-color:#fff}
  .vswitch button:focus-visible{outline:3px solid #fff;outline-offset:2px}
}

/* the rulebook and About: the footer sits at the bottom of the screen even
   when the page is shorter than the screen (About, on a big one) */
body:has(> header.top){min-height:100svh;display:flex;flex-direction:column}
body:has(> header.top) > main{flex:1 0 auto;width:100%}

/* the logo's outline runs a hair past its box on the right; let it show rather than be cut off */
.lg,#vca{overflow:visible}
