/* Joined by scripts/sync-nav.mjs (scripts/lib/asset-bundles.mjs) from /css/fonts.css, /css/header.css, /css/game-topbar.css, /css/zombio-skin.css.
   Do not edit: change those and run npm run sync:nav. */
/* /css/fonts.css */
/* ============================================================
   fonts.css: self-hosted Google Fonts

   Generated by scripts/build-fonts.py, do not hand-edit. Serve
   directly from /fonts/ so pages don't depend on Google's CDN.

   Each block keeps its unicode-range so browsers only fetch the
   subset containing glyphs the page actually uses: same behaviour
   as Google Fonts' hosted CSS. A variable font is one block with a
   weight range and one file, so every weight shares one download.
   ============================================================ */


/* ── Bricolage Grotesque ────────────────────────────── */
/* vietnamese */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-300-800-regular-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-300-800-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-300-800-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Instrument Serif ────────────────────────────── */
/* latin-ext */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-400-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-400-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-400-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-400-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Space Mono ────────────────────────────── */
/* vietnamese */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/space-mono-400-regular-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/space-mono-400-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/space-mono-400-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/space-mono-700-regular-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/space-mono-700-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/space-mono-700-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Geist Mono ────────────────────────────── */
/* cyrillic-ext */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/geist-mono-400-500-regular-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/geist-mono-400-500-regular-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* symbols2 */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/geist-mono-400-500-regular-symbols2.woff2') format('woff2');
  unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;
}
/* vietnamese */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/geist-mono-400-500-regular-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/geist-mono-400-500-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/geist-mono-400-500-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Cinzel ────────────────────────────── */
/* latin-ext */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/cinzel-400-700-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/cinzel-400-700-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Cormorant Garamond ────────────────────────────── */
/* cyrillic-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-400-500-italic-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-400-500-italic-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-400-500-italic-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-400-500-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-400-500-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-400-600-regular-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-400-600-regular-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-400-600-regular-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-400-600-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-400-600-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── EB Garamond ────────────────────────────── */
/* cyrillic-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/eb-garamond-400-italic-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/eb-garamond-400-italic-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/eb-garamond-400-italic-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/eb-garamond-400-italic-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/eb-garamond-400-italic-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/eb-garamond-400-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/eb-garamond-400-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/eb-garamond-400-500-regular-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/eb-garamond-400-500-regular-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/eb-garamond-400-500-regular-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/eb-garamond-400-500-regular-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/eb-garamond-400-500-regular-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/eb-garamond-400-500-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/eb-garamond-400-500-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Manrope ────────────────────────────── */
/* cyrillic-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/manrope-300-700-regular-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/manrope-300-700-regular-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/manrope-300-700-regular-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/manrope-300-700-regular-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/manrope-300-700-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/manrope-300-700-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── JetBrains Mono ────────────────────────────── */
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-400-500-regular-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-400-500-regular-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-400-500-regular-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-400-500-regular-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-400-500-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-400-500-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── DM Mono ────────────────────────────── */
/* latin-ext */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-mono-400-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-mono-400-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/dm-mono-500-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/dm-mono-500-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Atkinson Hyperlegible ────────────────────────────── */
/* latin-ext */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-400-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-400-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-400-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-400-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-700-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-700-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Rubik ────────────────────────────── */
/* arabic */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/rubik-400-600-regular-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/rubik-400-600-regular-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/rubik-400-600-regular-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* hebrew */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/rubik-400-600-regular-hebrew.woff2') format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
/* latin-ext */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/rubik-400-600-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/rubik-400-600-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* /css/header.css */
.topbar {
  position: sticky; top: 0;
  /* Above the cell stage (z:auto) and any tab-page content,
     so the tabs are always reachable on every page. */
  z-index: 150;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 28px;
  background: var(--paper);
  border-bottom: 1.5px solid var(--ink);
  overflow: hidden;
}
.topbar::after {
  /* Riso grain over the topbar itself, since the body grain is gone */
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: url("/img/grain.svg");
  background-repeat: repeat;
  mix-blend-mode: multiply;
  opacity: 0.32;
}
.topbar > * { position: relative; z-index: 1; }

.brand {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Mitosis easter egg: triggered from js/header.js. The original mark
   pinches and slides left, the cloned mark fades in and slides right,
   then both slide back together and fuse. */
.brand-mark.is-mitosing { animation: brand-mitosis-a 1.6s ease-in-out; }
.brand-mark-clone {
  position: absolute;
  top: 50%; left: 0;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
  animation: brand-mitosis-b 1.6s ease-in-out;
}
/* Translate distances use percentages so the animation scales with
   the brand-mark size: ~10px at desktop's 30px mark, ~8px at mobile's
   24px mark. No need for separate keyframes per breakpoint. */
@keyframes brand-mitosis-a {
  0%   { transform: scale(1) translateX(0); }
  20%  { transform: scale(1.12, 1.18) translateX(0); }
  45%  { transform: scale(0.94, 0.88) translateX(-34%); }
  70%  { transform: scale(1) translateX(-20%); }
  100% { transform: scale(1) translateX(0); }
}
@keyframes brand-mitosis-b {
  0%   { opacity: 0; transform: translateY(-50%) scale(1) translateX(0); }
  19%  { opacity: 0; }
  20%  { opacity: 1; transform: translateY(-50%) scale(1.12, 1.18) translateX(0); }
  45%  { opacity: 1; transform: translateY(-50%) scale(0.94, 0.88) translateX(34%); }
  70%  { opacity: 1; transform: translateY(-50%) scale(1) translateX(20%); }
  99%  { opacity: 0.4; transform: translateY(-50%) scale(1) translateX(0); }
  100% { opacity: 0; transform: translateY(-50%) scale(1) translateX(0); }
}
.brand small {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}
.brand-mark {
  width: 30px; height: 30px;
  flex-shrink: 0;
}

.youtube-btn, .instagram-btn {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  background: var(--riso-pink);
  border: none;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  box-shadow: 2px 2px 0 var(--riso-green);
  flex-shrink: 0;
}
.youtube-btn:hover, .instagram-btn:hover {
  background: #ff0000;
  transform: translateY(-2px);
  box-shadow: 2px 2px 0 var(--riso-green), 0 6px 14px rgba(0,0,0,0.12);
}
.instagram-btn:hover { background: #e1306c; }
.youtube-btn svg, .instagram-btn svg {
  width: 26px;
  height: 26px;
}

/* Sign in / signed in: one button in the same place on every page (written
   by scripts/sync-nav.mjs, wired by js/header.js). Which face shows comes
   from <html data-signed>, set by the boot script from the stored session
   before the page draws, so it never flips as the page loads. */
.acct { position: relative; flex-shrink: 0; }
.acct-btn {
  display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 14px 0 11px;
  border: 1.5px solid var(--ink); border-radius: 8px;
  background: var(--paper-white); color: var(--ink);
  font-family: var(--font-mono); font-size: 14px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
  box-shadow: 2px 2px 0 var(--riso-green); cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}
.acct-btn:hover { transform: translateY(-2px); box-shadow: 2px 2px 0 var(--riso-pink), 0 6px 14px rgba(0,0,0,0.12); }
.acct-btn:focus-visible { outline: 2px solid var(--riso-pink-deep); outline-offset: 3px; }
.acct-btn[aria-expanded="true"] { box-shadow: 2px 2px 0 var(--riso-pink); }
.acct-ico { display: flex; }
.acct-ico svg { width: 20px; height: 20px; }
.acct-av { display: none; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--riso-green); color: #10271c; font-size: 13px; font-weight: 800; text-transform: uppercase; }
.acct-car { display: none; font-size: 12px; opacity: 0.7; }
.acct-in-word { display: none; }
html[data-signed] .acct-btn { padding: 0 11px 0 7px; }
html[data-signed] .acct-ico, html[data-signed] .acct-out-word { display: none; }
html[data-signed] .acct-av { display: grid; }
html[data-signed] .acct-car, html[data-signed] .acct-in-word { display: inline; }

/* Why a button will not do what it says yet, before it is pressed: hovering
   or focusing it shows a bubble. data-tip holds the reason it cannot go yet
   (always shown); data-needs-signin holds why it needs an account (shown
   only signed out). Shown with display, so a hidden bubble never widens the
   page; anchored at the button's right edge, so it grows into the page. */
[data-tip], html:not([data-signed]) [data-needs-signin] { position: relative; }
[data-tip]::after, html:not([data-signed]) [data-needs-signin]::after {
  display: none; position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 70;
  width: max-content; max-width: min(270px, 78vw); padding: 8px 11px;
  border-radius: 10px; background: #1a3a2a; color: #f4faf6; box-shadow: 3px 3px 0 #ff7eb6;
  font: 500 13px/1.4 var(--font-display, system-ui, sans-serif); letter-spacing: 0; text-transform: none; text-align: left; white-space: normal;
  pointer-events: none;
}
html:not([data-signed]) [data-needs-signin]:not([data-tip])::after { content: attr(data-needs-signin); }
/* data-tip-at="card": the bubble spans the nearest positioned box (a room
   card) just above its buttons, where a narrow strip would cut it off. */
html:not([data-signed]) [data-needs-signin][data-tip-at="card"], [data-tip][data-tip-at="card"] { position: static; }
html:not([data-signed]) [data-needs-signin][data-tip-at="card"]::after, [data-tip][data-tip-at="card"]::after { left: 12px; right: 12px; bottom: 50px; width: auto; max-width: none; }
/* data-tip-at="left": anchored at the left edge, growing right, for a
   control near the left of the screen. */
html:not([data-signed]) [data-needs-signin][data-tip-at="left"]::after, [data-tip][data-tip-at="left"]::after { left: 0; right: auto; }
/* A hover lift or glow (a transform or a filter) would make the button the
   bubble's box again, so the bubble stands in for them. */
html:not([data-signed]) [data-needs-signin][data-tip-at="card"]:hover, [data-tip][data-tip-at="card"]:hover { transform: none; filter: none; }
/* A disabled button takes no hover, so its reason sits on a wrapper. */
.tip-wrap { display: inline-flex; }
.tip-wrap > :disabled { pointer-events: none; }
[data-tip]::after { content: attr(data-tip); }
[data-tip]:hover::after, [data-tip]:focus-visible::after,
html:not([data-signed]) [data-needs-signin]:hover::after, html:not([data-signed]) [data-needs-signin]:focus-visible::after { display: block; animation: tip-in .15s ease-out; }
:root[data-theme="dark"] [data-tip]::after, :root[data-theme="dark"] [data-needs-signin]::after { background: #f4faf6; color: #1a3a2a; }
@keyframes tip-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { [data-tip]::after, [data-needs-signin]::after { animation: none !important; } }
@media print { [data-tip]::after, [data-needs-signin]::after { display: none !important; } }

/* The panel: sign in from any page, or, signed in, where your things are
   and Sign out. Fixed and placed by js/header.js under the button, in the
   menu host (the bar itself hides what overflows it). */
.acct-menu {
  position: fixed; z-index: 160; width: 300px; box-sizing: border-box;
  padding: 10px; border: 1.5px solid var(--ink); border-radius: 14px;
  background: var(--paper-white); color: var(--ink); box-shadow: 5px 5px 0 var(--riso-pink);
  font-family: var(--font-display); font-size: 14.5px; line-height: 1.4; text-align: left;
}
.acct-menu[hidden] { display: none; }
.acct-menu .acct-hd { display: flex; align-items: center; gap: 10px; padding: 6px 6px 12px; margin-bottom: 6px; border-bottom: 1px dashed var(--ink-faint); min-width: 0; }
.acct-menu .acct-hd .acct-av { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--riso-green); color: #10271c; font-size: 15px; font-weight: 800; text-transform: uppercase; }
.acct-menu .acct-hd b { display: block; font-size: 14.5px; }
.acct-menu .acct-hd span { display: block; font-size: 13px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu a.acct-row, .acct-menu button.acct-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; box-sizing: border-box; padding: 9px 8px; border: 0; border-radius: 8px;
  background: none; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.acct-menu .acct-row small { font-family: var(--font-mono); font-size: 12px; color: var(--ink-dim); white-space: nowrap; }
.acct-menu a.acct-row:hover, .acct-menu a.acct-row:focus-visible, .acct-menu button.acct-row:hover, .acct-menu button.acct-row:focus-visible { background: color-mix(in srgb, var(--riso-pink) 14%, transparent); outline: none; }
/* Buy credits: the one row that sells, so it reads as a button. */
.acct-menu a.acct-row.acct-buy { background: var(--riso-green); color: #1a3a2a; font-weight: 700; border: 2px solid var(--ink); margin: 4px 0; }
.acct-menu a.acct-row.acct-buy small { color: #1a3a2a; }
.acct-menu a.acct-row.acct-buy:hover, .acct-menu a.acct-row.acct-buy:focus-visible { background: color-mix(in srgb, var(--riso-green) 80%, #fff); }
.acct-menu button.acct-signout { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--ink-faint); border-radius: 0; color: var(--riso-pink-deep); font-weight: 700; }
/* Have a code? (credit or class), above Sign out */
.acct-menu .acct-code { margin: 6px 0 0; padding: 10px 8px 4px; border-top: 1px dashed var(--ink-faint); }
.acct-menu .acct-code-lbl { display: block; font-size: 13px; color: var(--ink-dim); padding: 2px 0 6px; }
.acct-menu .acct-code-row { display: flex; gap: 6px; }
.acct-menu .acct-code input { flex: 1; min-width: 0; box-sizing: border-box; padding: 7px 10px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--paper); color: var(--ink); font-family: var(--font-mono); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.acct-menu .acct-code input::placeholder { text-transform: none; letter-spacing: 0; font-family: var(--font-display); }
.acct-menu .acct-code button { flex: none; padding: 7px 14px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--ink); color: var(--paper-white); font: inherit; font-weight: 700; cursor: pointer; }
.acct-menu .acct-code button:disabled { opacity: .5; cursor: wait; }
.acct-menu .acct-code-msg { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--ink-dim); }
.acct-menu .acct-code-msg.ok { color: var(--riso-green-deep, #1f6b47); }
.acct-menu .acct-code-msg.bad { color: var(--riso-pink-deep); }
.acct-menu .acct-code-msg a { color: inherit; font-weight: 700; }
.acct-menu .acct-code + .acct-signout { margin-top: 8px; }
.acct-menu .acct-form { padding: 4px; }
.acct-menu .acct-form h4 { margin: 2px 2px 4px; font-size: 17px; }
.acct-menu .acct-form p { margin: 0 2px 10px; font-size: 13.5px; color: var(--ink-dim); }
.acct-menu .acct-form p b { color: var(--ink); }
.acct-menu .acct-form input { display: block; width: 100%; box-sizing: border-box; margin: 0 0 8px; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; }
.acct-menu .acct-form input.acct-code { letter-spacing: 0.2em; font-size: 18px; }
.acct-menu .acct-form .acct-go { display: block; width: 100%; padding: 10px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--riso-green); color: #10271c; font: inherit; font-size: 15px; font-weight: 800; box-shadow: 2px 2px 0 var(--ink); cursor: pointer; }
.acct-menu .acct-form .acct-go:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.acct-menu .acct-form .acct-go:disabled { opacity: 0.6; cursor: progress; }
/* A button pressed and waiting on the network (js/busy.js): a spinner before
   its words, and never faded out, so the press plainly took. */
.bb-busy { opacity: 1 !important; cursor: progress !important; }
.bb-busy::before { content: ""; display: inline-block; box-sizing: border-box; width: 0.9em; height: 0.9em; margin-right: 0.5em; vertical-align: -0.12em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: bb-spin 0.7s linear infinite; }
@keyframes bb-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bb-busy::before { animation-duration: 2.4s; } }
.acct-menu .acct-form .acct-back { display: block; margin: 8px auto 0; border: 0; background: none; color: var(--ink-dim); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.acct-menu .acct-form .acct-err { color: var(--riso-pink-deep); margin-top: 8px; }
.acct-menu .acct-form .acct-free { margin: 10px 2px 0; font-size: 12.5px; }
.acct-menu .acct-form .acct-free b { color: var(--riso-green-deep); }

/* Support the site: the last button in the bar. A heart, with the word
   beside it where the bar has room; it leads to /support. */
.support-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 44px; height: 44px; padding: 0 12px;
  background: var(--riso-pink);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-mono); font-size: 14px; font-weight: 700; letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, color 0.18s;
  box-shadow: 2px 2px 0 var(--riso-green);
  flex-shrink: 0;
}
.support-btn:hover {
  background: var(--riso-green);
  color: var(--on-brand);
  transform: translateY(-2px);
  box-shadow: 2px 2px 0 var(--riso-pink), 0 6px 14px rgba(0,0,0,0.12);
}
.support-btn:focus-visible { outline: 2px solid var(--riso-pink-deep); outline-offset: 3px; }
.support-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
@media (max-width: 1320px) {
  .support-btn { padding: 0; width: 44px; }
  .support-word { display: none; }
}
@media (max-width: 1280px) {
  .acct-word { display: none; }
  .acct-btn { padding: 0 11px; }
  html[data-signed] .acct-btn { padding: 0 9px 0 7px; }
}

/* The tabs take the middle, centred in whatever the brand and the three
   buttons leave; the buttons sit together on the right. */
.tabs {
  margin: 0 auto;
  display: flex; gap: 2px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.tab {
  position: relative;
  white-space: nowrap;
  padding: 8px 14px 10px;
  color: var(--ink-dim);
  border-radius: 999px;
  transition: color 0.18s;
}
.tab .num { color: var(--ink-faint); margin-right: 6px; }
/* Free or paid, at a glance: a green dot on what costs nothing, a pink
   one on what costs money. The words ride along for screen readers. */
.tab-kind {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 7px; vertical-align: 2px;
  background: var(--riso-green);
}
.tab-kind[data-kind="paid"] { background: var(--riso-pink); }
.tabs .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); }
.tab.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 1px;
  height: 3px;
  background: var(--riso-pink);
  box-shadow: 1.5px 1.5px 0 var(--riso-green);
  border-radius: 2px;
}

/* Laptop widths: six tabs and three buttons are a tight fit, so the
   numbers go first, then the padding, before anything wraps. */
@media (max-width: 1320px) and (min-width: 761px) {
  .tab .num { display: none; }
  .tab { padding: 8px 10px 10px; }
  .tab.active::after { left: 10px; right: 10px; }
}
@media (max-width: 1080px) and (min-width: 761px) {
  .brand small { display: none; }
  .tabs { font-size: 13px; }
  .tab { padding: 8px 7px 10px; }
  .tab.active::after { left: 7px; right: 7px; }
}
@media (max-width: 880px) and (min-width: 761px) {
  .tabs {
    flex: 1; min-width: 0;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    mask-image: linear-gradient(to right, transparent 0, black 10px, black calc(100% - 14px), transparent 100%);
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; }
}

@media (max-width: 760px) {
  .topbar { padding: 10px 14px; gap: 12px; }
  .brand { font-size: 14px; gap: 9px; flex-shrink: 0; }
  .brand-mark { width: 24px; height: 24px; }
  .brand small { display: none; }
  .tabs {
    /* Horizontal scroll when 7 tabs don't fit; hidden scrollbar */
    gap: 2px;
    font-size: 12px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    padding-bottom: 2px;
    mask-image: linear-gradient(to right, transparent 0, black 12px, black calc(100% - 12px), transparent 100%);
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    /* 38px min height for touch, meets WCAG target size on mobile. */
    padding: 10px 11px 12px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .tab .num { display: none; }
  .youtube-btn, .instagram-btn { width: 40px; height: 40px; }
  .youtube-btn svg, .instagram-btn svg { width: 23px; height: 23px; }
  .support-btn { min-width: 40px; width: 40px; height: 40px; }
  .acct-btn { height: 40px; }
}

@media (max-width: 760px) {
  /* The toggle joins the tabs row, at its end, so the bar gains no height:
     two rows here as well, brand and buttons above, tabs and toggle below. */
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    grid-template-areas:
      "brand acct youtube instagram support"
      "tabs  aud  aud     aud       aud";
    column-gap: 10px; row-gap: 6px;
    align-items: center;
  }
  .brand { grid-area: brand; }
  .acct { grid-area: acct; justify-self: end; }
  .acct-word, .acct-car { display: none !important; }
  .acct-btn, html[data-signed] .acct-btn { padding: 0; width: 40px; justify-content: center; }
  .youtube-btn { grid-area: youtube; justify-self: end; }
  .instagram-btn { grid-area: instagram; justify-self: end; }
  .support-btn { grid-area: support; justify-self: end; }
  .tabs { grid-area: tabs; width: 100%; }
  .aud-pill { grid-area: aud; justify-self: end; box-shadow: 1.5px 1.5px 0 var(--riso-pink); }
  .aud-pill button { padding: 6px 8px; font-size: 12px; gap: 5px; }
}

@media (max-width: 480px) {
  /* Two-row topbar on phones, declared as a grid so brand and the two
     icon buttons (last in DOM order) can sit on the same row while the
     tab strip spans every column underneath. */
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    grid-template-areas:
      "brand acct youtube instagram support"
      "tabs  aud  aud     aud       aud";
    column-gap: 8px;
    row-gap: 6px;
    padding: 8px 10px 4px;
    align-items: center;
  }
  .brand { grid-area: brand; font-size: 13px; gap: 7px; }
  .brand-mark { width: 22px; height: 22px; }
  .youtube-btn, .instagram-btn {
    justify-self: end;
    width: 34px; height: 34px;
  }
  .youtube-btn { grid-area: youtube; }
  .instagram-btn { grid-area: instagram; }
  .youtube-btn svg, .instagram-btn svg { width: 21px; height: 21px; }
  .acct-btn, html[data-signed] .acct-btn { width: 34px; height: 34px; }
  .acct-av { width: 24px; height: 24px; font-size: 12px; }
  .acct-ico svg { width: 18px; height: 18px; }
  .support-btn {
    grid-area: support;
    justify-self: end;
    min-width: 34px; width: 34px; height: 34px;
  }
  .support-btn svg { width: 17px; height: 17px; }
  .tabs {
    grid-area: tabs;
    width: 100%;
    justify-content: flex-start;
  }
  .tab { padding: 8px 10px 10px; }
  .aud-pill button { padding: 6px 7px; font-size: 12px; }
  .aud-dot { display: none; }
}

/* ── Student / teacher toggle ─────────────────────────────────
   The pill before the sign-in button (written into every page by
   scripts/sync-nav.mjs, wired by js/header.js). Which side is on comes
   from <html data-audience>, set by each page's boot script before it
   draws, so neither the pill nor the content sorted by it ever jumps.
   With no choice made, both sides are off and the site shows everything. */
.aud-pill {
  display: inline-flex; flex: none; align-items: center; gap: 2px;
  padding: 3px; border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--paper-white); box-shadow: 2px 2px 0 var(--riso-pink);
  font-family: var(--font-mono);
}
.aud-pill button {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 12px; letter-spacing: 0.04em; line-height: 1;
  padding: 7px 11px; border: 0; border-radius: 999px;
  background: none; color: var(--ink-dim); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.aud-pill button:hover { color: var(--ink); }
.aud-pill button:focus-visible { outline: 2px solid var(--riso-pink-deep); outline-offset: 2px; }
.aud-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.35; flex: none; }
html[data-audience="student"] .aud-pill [data-aud-set="student"],
html[data-audience="teacher"] .aud-pill [data-aud-set="teacher"] { background: var(--ink); color: var(--paper-white); }
html[data-audience="student"] .aud-pill [data-aud-set="student"] .aud-dot { background: var(--riso-green); opacity: 1; }
html[data-audience="teacher"] .aud-pill [data-aud-set="teacher"] .aud-dot { background: var(--riso-pink); opacity: 1; }

/* What each mode shows. data-aud="student" is for students only and
   data-aud="teacher" for teachers only; untagged is for both. The other
   side's things are hidden, never removed, so they are still in the page
   for search engines and one click away. .aud-more marks what only makes
   sense once a side is chosen: the one-line "also for the other side"
   links, and each side's own wording of a shared item; .aud-none is the
   wording for before a side is chosen. The menus live outside the bar on
   some pages, hence the .nav-dd-panel selectors. */
html[data-audience="student"] [data-aud="teacher"],
html[data-audience="teacher"] [data-aud="student"],
html[data-audience="student"] .nav-dd-panel [data-aud="teacher"],
html[data-audience="teacher"] .nav-dd-panel [data-aud="student"],
html:not([data-audience]) .aud-more,
html:not([data-audience]) .nav-dd-panel .aud-more,
html[data-audience] .aud-none,
html[data-audience] .nav-dd-panel .aud-none { display: none !important; }

/* Laptops: the pill tightens, and the tabs (not the buttons) give way:
   they scroll in their own strip, as they already do on tablets. */
@media (max-width: 1500px) and (min-width: 761px) {
  .aud-pill button { padding: 6px 9px; font-size: 12px; }
  .support-btn { padding: 0; width: 44px; }
  .support-word { display: none; }
}
@media (max-width: 1440px) and (min-width: 761px) {
  .tab .num { display: none; }
  .tab { padding: 8px 10px 10px; }
  .tab.active::after { left: 10px; right: 10px; }
  .tabs {
    flex: 1 1 auto; min-width: 0; justify-content: safe center;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    mask-image: linear-gradient(to right, transparent 0, black 10px, black calc(100% - 14px), transparent 100%);
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; }
  .aud-dot { display: none; }
}
@media (max-width: 1080px) and (min-width: 761px) {
  .aud-pill button { padding: 6px 7px; font-size: 12px; }
}

/* Teacher mode, on the pages a class works from (js/header.js): copies
   this page's link with ?as=student. Bottom left, clear of the display
   button on the right. */
.aud-share {
  position: fixed; left: 16px; bottom: 16px; z-index: 140;
  display: inline-flex; align-items: center; gap: 8px; max-width: calc(100vw - 100px);
  padding: 9px 15px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.03em; line-height: 1.3; text-align: left;
  border: 1.5px solid var(--ink); background: var(--paper-white); color: var(--ink);
  box-shadow: 3px 3px 0 var(--riso-pink);
}
.aud-share:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--riso-pink); }
.aud-share:focus-visible { outline: 2px solid var(--riso-pink-deep); outline-offset: 3px; }
.aud-share.is-done { background: var(--riso-green); color: var(--on-brand); }
@media print { .aud-share { display: none !important; } }

/* ── Resources dropdown mega-menu ─────────────────────────────
   Built by js/header.js and appended to <body>, positioned fixed
   so the topbar's overflow:hidden never clips it. */
#tabs .dd-caret { margin-left: 4px; }
.nav-dd-panel {
  position: fixed;
  z-index: 200;
  min-width: 520px;
  max-width: min(640px, calc(100vw / var(--zoom, 1) - 24px));
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--riso-green), 0 14px 32px rgba(26, 58, 42, 0.14);
  padding: 16px 16px 8px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  /* hidden from the keyboard too while closed, once it has faded */
  visibility: hidden;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
}
.nav-dd-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; visibility: visible; transition-delay: 0s; }
.nav-dd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.nav-dd-col { min-width: 0; }
.nav-dd-h {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--riso-green-deep);
  padding: 4px 10px 6px;
}
.nav-dd-col:nth-child(2) .nav-dd-h { color: var(--riso-pink-deep); }
.nav-dd-panel a {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-size: 15px; color: var(--ink);
  padding: 8px 10px; border-radius: 8px; text-decoration: none;
  transition: background 0.12s;
}
.nav-dd-panel a:hover { background: var(--paper); }
.nav-dd-panel a:focus-visible { outline: 2px solid var(--riso-green-deep); outline-offset: -2px; }
.nav-dd-panel a .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--riso-green); flex: 0 0 auto; }
.nav-dd-col:nth-child(2) a .dot { background: var(--riso-pink); }
.nav-dd-all {
  display: block; margin-top: 6px; padding: 11px 10px 12px;
  border-top: 1.5px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em;
  color: var(--ink-dim); text-decoration: none;
}
.nav-dd-all:hover { color: var(--ink); }

/* The six-tab menus. */
.nav-dd-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.nav-dd-col:nth-child(3) .nav-dd-h { color: var(--ink-dim); }
.nav-dd-panel .dd-t { display: flex; flex-direction: column; gap: 1px; }
.nav-dd-panel a:has(.dd-t small), .nav-dd-soon { align-items: flex-start; }
.nav-dd-panel a:has(.dd-t small) .dot, .nav-dd-soon .dot { margin-top: 8px; }
.nav-dd-panel .dd-t small { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--ink-dim); line-height: 1.35; }
.nav-dd-panel.nav-dd-about, .nav-dd-panel.nav-dd-marking { min-width: 360px; max-width: min(420px, calc(100vw / var(--zoom, 1) - 24px)); }
.nav-dd-panel.nav-dd-store { min-width: 460px; }
.nav-dd-panel.nav-dd-free { min-width: 600px; max-width: min(680px, calc(100vw / var(--zoom, 1) - 24px)); }
.nav-dd-panel.nav-dd-marking a .dot, .nav-dd-panel.nav-dd-store a .dot { background: var(--riso-pink); }
.nav-dd-panel a.nav-dd-feature {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  margin: 0 0 10px; padding: 10px 12px;
  border: 1.5px solid var(--riso-green); border-radius: 10px;
  background: var(--paper);
}
.nav-dd-feature b { font-family: var(--font-display); font-size: 16px; color: var(--riso-green-deep); }
.nav-dd-feature span { font-size: 13px; color: var(--ink-dim); }
.nav-dd-store .dd-deal { color: var(--riso-pink-deep); }
.nav-dd-store small s { opacity: .6; }
.nav-dd-subs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; margin: -4px 0 10px; padding: 0 0 8px; border-bottom: 1px dashed var(--ink-faint); }
@media (max-width: 760px) { .nav-dd-subs { grid-template-columns: 1fr; } }
.nav-dd-soon {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  font-family: var(--font-display); font-size: 15px; color: var(--ink-dim);
}
.nav-dd-soon .dot { width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--riso-pink); flex: 0 0 auto; }
.nav-dd-foot {
  display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; padding: 10px 10px 6px;
  border-top: 1.5px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--ink-dim);
}
.nav-dd-panel .nav-dd-foot a { display: inline; padding: 0; font-family: var(--font-mono); font-size: 12px; color: var(--ink-dim); }
.nav-dd-panel .nav-dd-foot a:hover { background: none; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .nav-dd-panel { transition: none; } }

/* Apps dropdown, purple dots (study apps / vesicles accent) */
.nav-dd-panel.nav-dd-apps a .dot { background: #8a5cd9; }

/* Blog dropdown, a compact list of recent posts */
.nav-dd-panel.nav-dd-blog { min-width: 340px; }

/* On phones the menus open on tap; the fixed 430px min-width would spill
   off-screen, so size them to the viewport instead. */
@media (max-width: 760px) {
  .nav-dd-panel,
  .nav-dd-panel.nav-dd-blog { min-width: 0; width: calc(100vw / var(--zoom, 1) - 24px); max-width: calc(100vw / var(--zoom, 1) - 24px); }
  .nav-dd-cols, .nav-dd-cols-3 { grid-template-columns: 1fr; }
  .nav-dd-panel.nav-dd-about, .nav-dd-panel.nav-dd-marking, .nav-dd-panel.nav-dd-store, .nav-dd-panel.nav-dd-free { min-width: 0; }
}
.nav-dd-posts { display: grid; gap: 2px; padding: 2px 0 4px; }
.nav-dd-posts a { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 9px 10px; border-radius: 8px; text-decoration: none; transition: background 0.12s; }
.nav-dd-posts a:hover { background: var(--paper); }
.nav-dd-posts .p-date { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--riso-pink-deep); }
.nav-dd-posts .p-title { font-family: var(--font-display); font-size: 15px; color: var(--ink); line-height: 1.25; }

/* "Coming soon" on the AI marking items, until they open. The same pill is
   used on the pages that point at them; grep for soon-tag to take it off. */
.nav-dd-panel .dd-t .soon-tag { align-self: flex-start; margin: 2px 0 1px; }
.nav-dd-panel .soon-tag { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: var(--riso-pink); color: #fff; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }

/* ── Free checks strip: under the top bar, every page ── */
/* Put in place as the page is parsed, by the short script sync-nav writes
   after the top bar, so it is in the first paint; js/header.js keeps it true.
   z-index: the home page pulls its cell stage up under the top bar, and
   without it the stage would paint over the strip. */
.free-strip {
  position: relative; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 44px 8px 20px;
  background: var(--riso-green); color: var(--on-brand);
  border-bottom: 1.5px solid var(--ink);
  font-size: 14px; line-height: 1.35; text-align: center;
}
.free-strip p { margin: 0; }
.free-strip b { font-weight: 800; }
.free-strip a { color: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.free-strip-tag { display: inline-block; margin-right: 4px; padding: 1px 7px; border-radius: 5px; background: var(--on-brand); color: var(--riso-green); font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; vertical-align: 1px; }
.free-strip-x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--on-brand); font-size: 20px; line-height: 1; cursor: pointer; }
.free-strip-x:hover { background: rgba(0, 0, 0, 0.12); }
.free-strip a:focus-visible, .free-strip-x:focus-visible { outline: 2px solid var(--on-brand); outline-offset: 2px; }
.free-strip-short { display: none; }
.free-strip-book { display: inline; }
.free-strip-sep { margin: 0 6px 0 14px; opacity: .7; }
/* The strip scrolls (sync-nav writes the sentence twice; the second copy is inert). */
.free-strip-view { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.free-strip-track { display: flex; width: max-content; animation: free-strip-scroll 60s linear infinite; }
.free-strip-track p { flex: none; padding-right: 72px; white-space: nowrap; }
.free-strip:hover .free-strip-track, .free-strip:focus-within .free-strip-track { animation-play-state: paused; }
@keyframes free-strip-scroll { to { transform: translateX(-50%); } }
/* Still when it need not move: students (one message), reduced motion, print. */
:root[data-audience="student"] .free-strip-track { animation: none; width: auto; }
:root[data-audience="student"] .free-strip-track p[inert] { display: none; }
:root[data-audience="student"] .free-strip-track p { padding-right: 0; white-space: normal; }
@media (prefers-reduced-motion: reduce) {
  .free-strip-track { animation: none; width: auto; }
  .free-strip-track p[inert] { display: none; }
  .free-strip-track p { padding-right: 0; white-space: normal; }
}
/* Phones get the short lead-in, so the strip still says what it is for */
@media (max-width: 760px) { .free-strip { font-size: 13px; padding: 7px 40px 7px 12px; } .free-strip-long { display: none; } .free-strip-short { display: inline; } }
@media print { .free-strip { display: none !important; } }

/* ── What's new notice (js/header.js): a modal, once per announcement ── */
.news-dlg {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
  padding: 22px 24px 20px; margin: auto;
  background: var(--paper-white); color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 14px;
  box-shadow: 6px 6px 0 var(--riso-green);
}
.news-dlg::backdrop { background: rgba(20, 32, 27, 0.45); }
.news-eyebrow { margin: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--riso-pink-deep); }
.news-dlg h2 { margin: 6px 0 12px; font-size: 26px; line-height: 1.1; letter-spacing: -.01em; }
.news-dlg h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--riso-green-deep); }
.news-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.news-list li { position: relative; padding-left: 18px; font-size: 14.5px; line-height: 1.45; color: var(--ink-dim); }
.news-list li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--riso-pink); }
.news-list b { color: var(--ink); }
.news-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 18px; }
.news-go { display: inline-block; padding: 10px 16px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--riso-green); color: var(--on-brand); font-weight: 700; font-size: 14.5px; text-decoration: none; box-shadow: 3px 3px 0 var(--ink); }
.news-go:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
/* The newsletter notice: an email box and Join, then a line that answers. */
.news-list a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.news-nl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.news-nl[hidden] { display: none; }
.news-nl input[type="email"] { flex: 1 1 200px; min-width: 0; min-height: 44px; padding: 9px 12px; font: inherit; font-size: 16px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--paper-white); color: var(--ink); }
.news-nl input[type="email"]:focus-visible { outline: 2px solid var(--riso-pink); outline-offset: 2px; }
.news-nl button.news-go { cursor: pointer; font-family: inherit; }
.news-nl button.news-go:disabled { opacity: 0.6; cursor: progress; }
.news-nl-trap { position: absolute; left: -5000px; width: 1px; height: 1px; opacity: 0; }
.news-nl-msg { margin: 10px 0 0; font-size: 14px; color: var(--riso-green-deep); }
.news-nl-msg.bad { color: #b3306a; }
.news-nl-msg[hidden] { display: none; }
.news-nl-why { font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.news-close { border: 0; background: none; padding: 8px 4px; font: inherit; font-size: 14px; color: var(--ink-dim); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.news-close:hover { color: var(--ink); }
.news-go:focus-visible, .news-close:focus-visible { outline: 2px solid var(--riso-pink-deep); outline-offset: 3px; }
@media print { .news-dlg { display: none !important; } }

/* ── Support the site (js/header.js): a quiet card, placed by the page ── */
.support-nudge {
  display: flex; align-items: center; gap: 22px;
  max-width: 880px; margin: 40px auto 8px; padding: 20px 24px;
  background: var(--paper-white); color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 14px;
  box-shadow: 5px 5px 0 var(--riso-pink);
}
.support-nudge[hidden] { display: none; }
.sn-cover { width: 92px; height: auto; flex-shrink: 0; border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--riso-green); transform: rotate(-3deg); }
.sn-body { min-width: 0; }
.sn-kicker { margin: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--riso-pink-deep); }
.sn-title { margin: 4px 0 6px; font-family: var(--font-display); font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.sn-line { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-dim); }
.sn-line b { color: var(--ink); }
.sn-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 14px 0 0; }
.sn-go { display: inline-block; padding: 9px 15px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--riso-green); color: var(--on-brand); font-weight: 700; font-size: 14.5px; text-decoration: none; box-shadow: 3px 3px 0 var(--ink); }
.sn-go:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.sn-more { font-size: 14px; color: var(--ink-dim); text-decoration: underline; text-underline-offset: 3px; }
.sn-more:hover { color: var(--ink); }
.sn-go:focus-visible, .sn-more:focus-visible, .sn-x:focus-visible { outline: 2px solid var(--riso-pink-deep); outline-offset: 3px; }
/* The exam maker's rail: narrow, text only, closable */
.support-nudge.is-rail { position: relative; display: block; max-width: none; margin: 0; padding: 16px 16px 16px; border-radius: 12px; box-shadow: 4px 4px 0 var(--riso-pink); }
.support-nudge.is-rail .sn-line { font-size: 14px; margin-top: 6px; padding-right: 8px; }
.support-nudge.is-rail .sn-go { margin-top: 12px; font-size: 13.5px; padding: 8px 13px; }
.sn-x { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--ink-dim); font-size: 20px; line-height: 1; cursor: pointer; }
.sn-x:hover { background: var(--paper); color: var(--ink); }
@media (max-width: 600px) {
  .support-nudge:not(.is-rail) { flex-direction: column; align-items: flex-start; gap: 14px; margin: 32px 0 8px; padding: 18px; }
  .sn-cover { width: 70px; }
}
@media print { .support-nudge { display: none !important; } }

/* A page shown inside another (a lesson in the Revise view's pop-up, which
   has its own bar): no site bar, no display panel. Set by js/header.js. */
.in-frame .topbar, .in-frame .a11y-controls { display: none !important; }
/* Have you tried Zombio? (js/header.js): the What's new card with a picture on top */
.zb-dlg .zb-pic { display: block; margin: -4px -4px 14px; border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; }
.zb-dlg .zb-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.zb-dlg .zb-pic:hover img { transform: scale(1.04); }
.zb-line { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-dim); }
/* Rainy Day Biology Book 2 offer (js/header.js): the cover beside the words. */
.bk-row { display: flex; gap: 18px; align-items: flex-start; }
.bk-pic { flex: 0 0 112px; display: block; border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden; box-shadow: 3px 3px 0 var(--riso-pink); }
.bk-pic img { display: block; width: 100%; height: auto; }
.bk-text { min-width: 0; }
.bk-dlg h2 { font-size: 24px; }
.bk-price { margin: 10px 0 0; font-size: 14.5px; font-weight: 700; color: var(--ink); }
@media (max-width: 480px) { .bk-row { gap: 14px; } .bk-pic { flex-basis: 84px; } .bk-dlg h2 { font-size: 21px; } .bk-dlg { padding: 18px 18px 16px; } }

/* Every button says it can be pressed: on hover it lifts a pixel and gains
   a pink offset shadow (on top of any shadow it already has); pressed, it
   settles back. Wrapped whole in :where(), so it weighs nothing: a page's
   own transform, filter or hover rule always wins. Tabs, menus, toggles that
   open something (a topic row, a menu) and disabled buttons are left alone. */
:where(:is(button, input[type="submit"], input[type="button"], a[class*="btn"], a[class*="-go"], a.lessons-hub-link, a.ia-btn, a.mod-btn):not(:disabled):not([aria-disabled="true"]):not([role="tab"]):not([role="menuitem"]):not(.aud-pill button):not([class*="close"]):not([class*="-x"]):not([aria-expanded]):not([aria-controls])) {
  transition: transform .15s ease, filter .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
@media (hover: hover) {
  :where(:is(button, input[type="submit"], input[type="button"], a[class*="btn"], a[class*="-go"], a.lessons-hub-link, a.ia-btn, a.mod-btn):not(:disabled):not([aria-disabled="true"]):not([role="tab"]):not([role="menuitem"]):not(.aud-pill button):not([class*="close"]):not([class*="-x"]):not([aria-expanded]):not([aria-controls]):hover) { transform: translate(-1px, -1px); filter: drop-shadow(2px 2px 0 var(--riso-pink)); }
}
:where(:is(button, input[type="submit"], input[type="button"], a[class*="btn"], a[class*="-go"], a.lessons-hub-link, a.ia-btn, a.mod-btn):not(:disabled):not([aria-disabled="true"]):not([role="tab"]):not([role="menuitem"]):not(.aud-pill button):not([class*="close"]):not([class*="-x"]):not([aria-expanded]):not([aria-controls]):active) { transform: translate(1px, 1px); filter: none; }
@media (prefers-reduced-motion: reduce) {
  :where(:is(button, input[type="submit"], input[type="button"], a[class*="btn"], a[class*="-go"], a.lessons-hub-link, a.ia-btn, a.mod-btn):not(:disabled):not([aria-disabled="true"]):not([role="tab"]):not([role="menuitem"]):not(.aud-pill button):not([class*="close"]):not([class*="-x"]):not([aria-expanded]):not([aria-controls]):hover), :where(:is(button, input[type="submit"], input[type="button"], a[class*="btn"], a[class*="-go"], a.lessons-hub-link, a.ia-btn, a.mod-btn):not(:disabled):not([aria-disabled="true"]):not([role="tab"]):not([role="menuitem"]):not(.aud-pill button):not([class*="close"]):not([class*="-x"]):not([aria-expanded]):not([aria-controls]):active) { transform: none; }
}

/* "First one free" (js/free-start.js): a sticker by the headline, a line under
   the main button, a note on the sign-in card and, once signed in, what was
   given. Shown only while the offer is open (html.ff-open). */
:where(.ia-head, .mod-intro) { position: relative; }
.ff-open :where(.ia-head, .mod-intro) > :is(h1, .meta) { padding-right: 128px; }
.ff-open :where(.ia-head, .mod-intro) > .ia-badge { max-width: calc(100% - 128px); }
.ff-sticker { position: absolute; top: 4px; right: 0; z-index: 1; width: 112px; height: 112px; border-radius: 50%; display: grid; place-content: center; text-align: center; transform: rotate(8deg); background: var(--riso-pink); color: var(--on-brand); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font-family: var(--font-display); font-size: 17px; font-weight: 800; line-height: 1.05; letter-spacing: -0.01em; }
.ff-sticker[hidden] { display: none; }
.ff-sticker small { display: block; margin-top: 5px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; line-height: 1.2; padding: 0 12px; }
.ff-line { margin: 12px 0 0; font-size: 15px; }
.ff-line b { color: var(--riso-green-deep); }
.ff-gift { display: inline-block; margin: 4px 0 10px; padding: 8px 14px; border: 1.5px dashed var(--riso-green-deep); border-radius: 12px; background: color-mix(in srgb, var(--riso-green) 10%, transparent); font-size: 14px; }
.ff-gift b { color: var(--riso-green-deep); font-size: 16px; }
.ff-welcome { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 14px; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--paper-white); font-size: 14.5px; }
.ff-welcome[hidden] { display: none; }
.ff-welcome span { color: var(--ink-dim); }
.ff-chip { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; background: var(--riso-green); color: var(--on-brand) !important; padding: 3px 9px; border-radius: 999px; }
@media (max-width: 640px) {
  .ff-open :where(.ia-head, .mod-intro) > :is(h1, .meta) { padding-right: 0; }
  .ff-open :where(.ia-head, .mod-intro) > .ia-badge { max-width: none; }
  .ff-sticker { position: static; display: inline-grid; width: auto; height: auto; padding: 6px 14px; border-radius: 999px; transform: rotate(-2deg); font-size: 14px; margin: 4px 0 8px; }
  .ff-sticker br { display: none; }
  .ff-sticker small { display: inline; margin: 0 0 0 6px; padding: 0; }
}
.ff-line a { color: inherit; text-decoration: underline; text-decoration-color: var(--riso-green); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ff-line a:hover { color: var(--riso-pink-deep); text-decoration-color: var(--riso-pink); }

/* ── The calm look (a preview) ─────────────────────────────────
   ?look=calm puts <html data-look="calm"> on every page (the boot line,
   LOOK_BOOT in scripts/sync-nav.mjs) and ?look=off takes it away; with no
   flag none of this applies. It answers "the bar is hard to read": one
   readable sans (Atkinson Hyperlegible, already self-hosted) for every
   label and button, dark ink at 16px, no numbers or coloured dots, a quiet
   segmented student / teacher control, one clear Sign in button, plain
   icons, the free checks offer as one quiet line, and menus without the
   offset shadow. Every text here is at least 4.5 to 1 against what is
   behind it; secondary text uses --calm-dim, 7 to 1 or more. The home page
   has its own part in css/landing-calm.css, the footer in css/footer.css. */
:root[data-look="calm"] {
  --calm-sans: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --calm-dim: #344f41;
  --calm-pink: #a62a62;
  --calm-green: #11603a;
  --calm-line: rgba(26, 58, 42, 0.22);
  --calm-hover: rgba(26, 58, 42, 0.07);
}
:root[data-look="calm"][data-theme="dark"] {
  --calm-dim: #c9d7ce;
  --calm-pink: #ffb3d1;
  --calm-green: #7fe9c0;
  --calm-line: rgba(233, 241, 234, 0.24);
  --calm-hover: rgba(233, 241, 234, 0.09);
}
:root[data-look="calm"][data-palette="accessible"] {
  --calm-dim: var(--ink-dim);
  --calm-pink: var(--riso-pink-deep);
  --calm-green: var(--riso-green-deep);
}

/* The bar: a flat ground (the grain stays in the pictures), a hairline under it. */
:root[data-look="calm"] .topbar { background: var(--paper-white); border-bottom: 1px solid var(--calm-line); gap: 12px; }
:root[data-look="calm"] .topbar::after { display: none; }

/* The bar shows which side of the site this is: pink for the student view,
   green for the teacher view, and the plain bar until a side is chosen. The
   saturated colour sits on a thick bottom edge, and the fill is a pale tint
   so the ink on the tabs keeps its contrast. The pill still names the side. */
:root[data-audience="student"] .topbar { background: color-mix(in srgb, var(--riso-pink) 38%, var(--paper-white)); border-bottom: 4px solid var(--riso-pink-deep); }
:root[data-audience="teacher"] .topbar { background: color-mix(in srgb, var(--riso-green) 42%, var(--paper-white)); border-bottom: 4px solid var(--riso-green-deep); }
:root[data-look="calm"][data-audience="student"] .topbar { background: color-mix(in srgb, var(--riso-pink) 38%, var(--paper-white)); border-bottom: 4px solid var(--riso-pink-deep); }
:root[data-look="calm"][data-audience="teacher"] .topbar { background: color-mix(in srgb, var(--riso-green) 42%, var(--paper-white)); border-bottom: 4px solid var(--riso-green-deep); }
:root[data-theme="dark"][data-audience="student"] .topbar,
:root[data-theme="dark"][data-look="calm"][data-audience="student"] .topbar { background: color-mix(in srgb, var(--riso-pink) 24%, var(--paper)); }
:root[data-theme="dark"][data-audience="teacher"] .topbar,
:root[data-theme="dark"][data-look="calm"][data-audience="teacher"] .topbar { background: color-mix(in srgb, var(--riso-green) 24%, var(--paper)); }
:root[data-look="calm"] .brand { font-size: 19px; font-weight: 700; letter-spacing: -.01em; gap: 10px; }
:root[data-look="calm"] .brand small { font-family: var(--font-display); font-size: 19px; font-weight: 500; letter-spacing: -0.01em; color: var(--calm-dim); }

/* The tabs: plain words in sentence case. The numbers and the free / paid
   dots go (the words "(free)" and "(paid)" stay for screen readers). */
:root[data-look="calm"] .tabs { --calm-tab-fs: 16px; font-family: var(--calm-sans); font-size: var(--calm-tab-fs); font-weight: 700; letter-spacing: 0; gap: 2px; }
:root[data-look="calm"] .tab { display: block; padding: 10px 13px 11px; border-radius: 8px; color: var(--ink); line-height: 1.2; transition: background-color 0.15s; }
:root[data-look="calm"] .tab::first-letter { text-transform: uppercase; }
/* "ai marking" reads "AI marking": the words stay for screen readers (at
   no size), the picture of them is drawn after, and not read twice. */
:root[data-look="calm"] .tab .tab-word { font-size: 0; }
:root[data-look="calm"] .tab .tab-word::after { content: "IA marking"; content: "IA marking" / ""; font-size: var(--calm-tab-fs, 16px); }
:root[data-look="calm"] .tab .num,
:root[data-look="calm"] .tab-kind { display: none; }
:root[data-look="calm"] .tab:hover,
:root[data-look="calm"] .tab[aria-expanded="true"] { background: var(--calm-hover); color: var(--ink); }
:root[data-look="calm"] .tab:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: -3px; border-radius: 8px; }
:root[data-look="calm"] .tab.active::after { left: 13px; right: 13px; bottom: 2px; height: 3px; background: var(--riso-pink-deep); box-shadow: none; }
:root[data-look="calm"] #tabs .dd-caret { display: inline-block; margin-left: 5px; font-size: 12px; color: var(--calm-dim); vertical-align: 1px; }

/* Student / teacher: a quiet segmented control, the chosen side filled. */
:root[data-look="calm"] .aud-pill { padding: 3px; gap: 2px; border: 1px solid var(--calm-line); border-radius: 9px; background: var(--paper); box-shadow: none; font-family: var(--calm-sans); }
:root[data-look="calm"] .aud-pill button { display: inline-block; padding: 8px 12px; border-radius: 6px; font-size: 15px; font-weight: 700; letter-spacing: 0; line-height: 1.1; color: var(--calm-dim); }
:root[data-look="calm"] .aud-pill button::first-letter { text-transform: uppercase; }
:root[data-look="calm"] .aud-pill button:hover { background: var(--calm-hover); color: var(--ink); }
:root[data-look="calm"] .aud-pill button:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: 1px; }
:root[data-look="calm"] .aud-dot { display: none; }
:root[data-look="calm"][data-audience="student"] .aud-pill [data-aud-set="student"],
:root[data-look="calm"][data-audience="teacher"] .aud-pill [data-aud-set="teacher"] { background: var(--ink); color: var(--paper-white); }

/* Sign in: the one filled button in the bar. Signed in, it steps back to an
   outline, since it is no longer asking for anything. */
:root[data-look="calm"] .acct-btn { height: 44px; padding: 0 16px 0 13px; gap: 8px; border: 1.5px solid var(--ink); border-radius: 9px; background: var(--ink); color: var(--paper-white); font-family: var(--calm-sans); font-size: 16px; font-weight: 700; letter-spacing: 0; box-shadow: none; }
:root[data-look="calm"] .acct-btn:hover { transform: none; filter: none; background: color-mix(in srgb, var(--ink) 86%, var(--paper-white)); box-shadow: none; }
:root[data-look="calm"] .acct-btn[aria-expanded="true"] { box-shadow: none; }
:root[data-look="calm"] .acct-btn:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: 2px; }
:root[data-look="calm"] .acct-word { display: inline-block; }
:root[data-look="calm"] .acct-word::first-letter { text-transform: uppercase; }
:root[data-look="calm"] .acct-ico svg { width: 19px; height: 19px; }
:root[data-look="calm"][data-signed] .acct-btn { padding: 0 12px 0 7px; background: transparent; color: var(--ink); border-color: var(--calm-line); }
:root[data-look="calm"][data-signed] .acct-btn:hover { background: var(--calm-hover); }
:root[data-look="calm"] .acct-av { width: 30px; height: 30px; border-width: 1px; font-family: var(--calm-sans); font-size: 15px; font-weight: 700; }
:root[data-look="calm"] .acct-car { font-size: 12px; color: var(--calm-dim); opacity: 1; }

/* YouTube and support: plain icons in ink, a soft ground on hover. */
:root[data-look="calm"] .youtube-btn, :root[data-look="calm"] .instagram-btn,
:root[data-look="calm"] .support-btn { width: 46px; min-width: 46px; height: 46px; padding: 0; border-radius: 9px; background: transparent; color: var(--ink); box-shadow: none; }
:root[data-look="calm"] .youtube-btn:hover, :root[data-look="calm"] .instagram-btn:hover,
:root[data-look="calm"] .support-btn:hover { background: var(--calm-hover); color: var(--ink); transform: none; filter: none; box-shadow: none; }
:root[data-look="calm"] .youtube-btn:focus-visible, :root[data-look="calm"] .instagram-btn:focus-visible,
:root[data-look="calm"] .support-btn:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: 1px; }
:root[data-look="calm"] .youtube-btn svg, :root[data-look="calm"] .instagram-btn svg { width: 28px; height: 28px; }
:root[data-look="calm"] .support-btn svg { width: 24px; height: 24px; }
:root[data-look="calm"] .youtube-btn:hover { color: #e00; }
:root[data-look="calm"] .instagram-btn:hover { color: #e1306c; }
:root[data-look="calm"] .support-btn:hover { color: var(--riso-pink-deep); }
:root[data-look="calm"] .support-word { display: none; }

/* Laptops: the calm bar is narrower than the default one, so the words stay
   longer; they go only where the row would otherwise overflow. */
@media (max-width: 1440px) and (min-width: 761px) {
  :root[data-look="calm"] .tab { padding: 10px 11px 11px; }
  :root[data-look="calm"] .tab.active::after { left: 11px; right: 11px; }
}
@media (max-width: 1280px) and (min-width: 761px) {
  :root[data-look="calm"] .acct-word { display: inline-block; }
  :root[data-look="calm"] .acct-btn { padding: 0 14px 0 11px; }
}
@media (max-width: 1180px) and (min-width: 761px) {
  :root[data-look="calm"] .brand small { display: none; }
}
@media (max-width: 1040px) and (min-width: 761px) {
  :root[data-look="calm"] .acct-word { display: none; }
  :root[data-look="calm"] .acct-btn { padding: 0 12px; }
  :root[data-look="calm"] .tabs { --calm-tab-fs: 15px; }
  :root[data-look="calm"] .tab { padding: 10px 8px 11px; }
}
/* Tablets (an iPad at 820): every tab fits whole, rather than AI marking
   cut off behind the student / teacher pill. */
@media (max-width: 920px) and (min-width: 761px) {
  :root[data-look="calm"] .tabs { --calm-tab-fs: 14px; gap: 0; }
  :root[data-look="calm"] .tab { padding: 10px 6px 11px; }
  :root[data-look="calm"] .brand { font-size: 16px; }
}

/* The teacher bar has six tabs (the student one five), which did not fit
   under about 1330 px: "IA marking" read "IA mar" on most laptops. So in
   teacher mode each thing gives way a step earlier: "by Bradford", then
   YouTube and Instagram (both in the About menu and the footer), then the
   smaller tabs, then the heart; on a tablet the student bar drops the two
   icons too, and both lose the menu carets. */
@media (max-width: 1340px) and (min-width: 761px) {
  :root[data-look="calm"][data-audience="teacher"] .brand small { display: none; }
}
@media (max-width: 1240px) and (min-width: 761px) {
  :root[data-look="calm"][data-audience="teacher"] .youtube-btn,
  :root[data-look="calm"][data-audience="teacher"] .instagram-btn { display: none; }
  :root[data-look="calm"][data-audience="teacher"] .nav-dd-panel .nav-dd-foot a.calm-phone { display: inline; }
}
@media (max-width: 1120px) and (min-width: 761px) {
  :root[data-look="calm"][data-audience="teacher"] .acct-word { display: none; }
  :root[data-look="calm"][data-audience="teacher"] .acct-btn { padding: 0 12px; }
  :root[data-look="calm"][data-audience="teacher"] .tabs { --calm-tab-fs: 15px; }
  :root[data-look="calm"][data-audience="teacher"] .tab { padding: 10px 8px 11px; }
}
@media (max-width: 990px) and (min-width: 761px) {
  :root[data-look="calm"][data-audience="teacher"] .tabs { --calm-tab-fs: 14px; gap: 0; }
  :root[data-look="calm"][data-audience="teacher"] .tab { padding: 10px 6px 11px; }
  :root[data-look="calm"][data-audience="teacher"] .brand { font-size: 16px; }
}
@media (max-width: 900px) and (min-width: 761px) {
  :root[data-look="calm"][data-audience="teacher"] .support-btn,
  :root[data-look="calm"] .youtube-btn, :root[data-look="calm"] .instagram-btn { display: none; }
  :root[data-look="calm"] .nav-dd-panel .nav-dd-foot a.calm-phone { display: inline; }
  :root[data-look="calm"] #tabs .dd-caret { display: none; }
}
@media (max-width: 830px) and (min-width: 761px) {
  :root[data-look="calm"][data-audience="teacher"] .tab { padding: 10px 3px 11px; }
  :root[data-look="calm"][data-audience="teacher"] .aud-pill button { padding: 8px 8px; }
}

/* Phones: brand, the student / teacher control and Sign in above; all five
   tabs below, across the whole row, so none of them hides off the edge.
   YouTube and the heart step out of the bar here: YouTube is in the
   footer, and the About menu gains both (js/header.js, .calm-phone). */
@media (max-width: 760px) {
  :root[data-look="calm"] .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand aud acct"
      "tabs  tabs tabs";
    padding: 8px 10px 4px; column-gap: 8px; row-gap: 2px;
  }
  :root[data-look="calm"] .brand { font-size: 17px; gap: 8px; min-width: 0; }
  :root[data-look="calm"] .youtube-btn, :root[data-look="calm"] .instagram-btn,
  :root[data-look="calm"] .support-btn { display: none; }
  :root[data-look="calm"] .aud-pill { grid-area: aud; justify-self: end; box-shadow: none; }
  :root[data-look="calm"] .aud-pill button { padding: 7px 9px; font-size: 15px; }
  :root[data-look="calm"] .acct { grid-area: acct; }
  :root[data-look="calm"] .acct-btn { width: auto; height: 40px; padding: 0 12px; }
  :root[data-look="calm"] .acct-word { display: inline-block !important; font-size: 15px; }
  :root[data-look="calm"] .acct-ico { display: none; }
  :root[data-look="calm"][data-signed] .acct-btn { width: 40px; padding: 0; }
  :root[data-look="calm"][data-signed] .acct-word { display: none !important; }
  :root[data-look="calm"] .tabs {
    grid-area: tabs; width: 100%; --calm-tab-fs: 15px;
    flex-wrap: wrap; gap: 0; overflow: visible; mask-image: none; -webkit-mask-image: none; padding-bottom: 0;
  }
  /* Each tab as wide as its word plus an even share of what is left, so the
     five fit across a 360px phone in every mode (teachers' "Resources" is
     the longest set). */
  :root[data-look="calm"] .tab { display: block; flex: 1 1 auto; min-height: 44px; padding: 12px 2px 10px; text-align: center; }
  :root[data-look="calm"] .tab.active::after { left: 4px; right: 4px; bottom: 3px; }
  :root[data-look="calm"] #tabs .dd-caret { display: none; }
}
/* The narrowest phones: Sign in as its icon, so the top row still fits. */
@media (max-width: 374px) {
  :root[data-look="calm"] .tabs { letter-spacing: -0.01em; }
  /* The words sit close here, so a hairline tells one tab from the next. */
  :root[data-look="calm"] .tab + .tab::before { content: ""; position: absolute; left: 0; top: 15px; bottom: 15px; width: 1px; background: var(--calm-line); }
  :root[data-look="calm"] .acct-btn { width: 40px; padding: 0; }
  :root[data-look="calm"] .acct-word { display: none !important; }
  :root[data-look="calm"] .acct-ico { display: inline-flex; }
  :root[data-look="calm"] .aud-pill button { padding: 7px 7px; }
}
/* The About menu's YouTube and Support links, for phones in the calm look. */
.nav-dd-panel .nav-dd-foot a.calm-phone { display: none; }
@media (max-width: 760px) {
  :root[data-look="calm"] .nav-dd-panel .nav-dd-foot a.calm-phone { display: inline; }
}

/* The free checks offer: one quiet line on the page, not a green band. */
:root[data-look="calm"] .free-strip { padding: 7px 48px 7px 20px; background: color-mix(in srgb, #000 7%, var(--paper)); color: var(--ink); border-bottom: 1px solid var(--calm-line); font-family: var(--calm-sans); font-size: 15px; line-height: 1.45; }
:root[data-look="calm"] .free-strip b { font-weight: 700; }
:root[data-look="calm"] .free-strip a { color: var(--ink); font-weight: 700; text-decoration-color: var(--riso-pink-deep); text-decoration-thickness: 2px; }
:root[data-look="calm"] .free-strip-tag { margin-right: 2px; padding: 0; background: none; color: var(--calm-green); font-family: var(--calm-sans); font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; vertical-align: 0; }
:root[data-look="calm"] .free-strip-tag::after { content: ":"; }
:root[data-look="calm"] .free-strip-x { color: var(--calm-dim); }
:root[data-look="calm"] .free-strip-x:hover { background: var(--calm-hover); color: var(--ink); }
:root[data-look="calm"] .free-strip a:focus-visible,
:root[data-look="calm"] .free-strip-x:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: 2px; }
@media (max-width: 760px) {
  :root[data-look="calm"] .free-strip { padding: 9px 44px 9px 14px; font-size: 15px; text-align: left; justify-content: flex-start; }
}

/* The menus: the same sans, words in ink, the riso offset shadow traded for
   a soft one, no bullet dots. */
:root[data-look="calm"] .nav-dd-panel { border: 1px solid var(--calm-line); border-radius: 12px; box-shadow: 0 14px 36px rgba(20, 40, 30, 0.16), 0 2px 6px rgba(20, 40, 30, 0.06); padding: 14px 14px 8px; font-family: var(--calm-sans); }
:root[data-look="calm"] .nav-dd-h { font-family: var(--calm-sans); font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--calm-dim); padding: 6px 10px 6px; }
:root[data-look="calm"] .nav-dd-panel a { font-family: var(--calm-sans); font-size: 16px; line-height: 1.3; padding: 8px 10px; }
:root[data-look="calm"] .nav-dd-panel a:hover { background: var(--calm-hover); }
:root[data-look="calm"] .nav-dd-panel a:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: -3px; }
:root[data-look="calm"] .nav-dd-panel a .dot,
:root[data-look="calm"] .nav-dd-soon .dot { display: none; }
:root[data-look="calm"] .nav-dd-panel .dd-t { gap: 2px; }
:root[data-look="calm"] .nav-dd-panel .dd-t small { font-family: var(--calm-sans); font-size: 15px; letter-spacing: 0; line-height: 1.35; color: var(--calm-dim); }
:root[data-look="calm"] .nav-dd-panel .dd-t small::first-letter,
:root[data-look="calm"] .acct-menu .acct-row small::first-letter { text-transform: uppercase; }
:root[data-look="calm"] .nav-dd-panel a.nav-dd-feature { border: 1px solid var(--calm-line); background: var(--paper); padding: 11px 12px; }
:root[data-look="calm"] .nav-dd-feature b { font-family: var(--calm-sans); font-size: 17px; color: var(--ink); }
:root[data-look="calm"] .nav-dd-feature span { font-size: 15px; color: var(--calm-dim); }
:root[data-look="calm"] .nav-dd-subs { border-bottom: 1px solid var(--calm-line); }
:root[data-look="calm"] .nav-dd-all,
:root[data-look="calm"] .nav-dd-foot,
:root[data-look="calm"] .nav-dd-panel .nav-dd-foot a { font-family: var(--calm-sans); font-size: 15px; letter-spacing: 0; color: var(--calm-dim); }
:root[data-look="calm"] .nav-dd-all { border-top: 1px solid var(--calm-line); font-weight: 700; color: var(--ink); }
:root[data-look="calm"] .nav-dd-foot { border-top: 1px solid var(--calm-line); }
:root[data-look="calm"] .nav-dd-panel .nav-dd-foot a { text-decoration: underline; text-underline-offset: 3px; }
:root[data-look="calm"] .nav-dd-soon { font-family: var(--calm-sans); font-size: 16px; color: var(--calm-dim); }
:root[data-look="calm"] .nav-dd-posts .p-date { font-family: var(--calm-sans); font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--calm-pink); }
:root[data-look="calm"] .nav-dd-posts .p-title { font-family: var(--calm-sans); font-size: 16px; }
:root[data-look="calm"] .nav-dd-panel .soon-tag { font-family: var(--calm-sans); font-size: 14px; letter-spacing: 0; text-transform: none; background: none; color: var(--calm-pink); padding: 0; font-weight: 700; }

/* The account panel, in the same type. */
:root[data-look="calm"] .acct-menu { border: 1px solid var(--calm-line); border-radius: 12px; box-shadow: 0 14px 36px rgba(20, 40, 30, 0.16), 0 2px 6px rgba(20, 40, 30, 0.06); font-family: var(--calm-sans); font-size: 16px; }
:root[data-look="calm"] .acct-menu .acct-hd span,
:root[data-look="calm"] .acct-menu .acct-form p { font-size: 15px; color: var(--calm-dim); }
:root[data-look="calm"] .acct-menu .acct-row small { font-family: var(--calm-sans); font-size: 15px; color: var(--calm-dim); }
:root[data-look="calm"] .acct-menu .acct-code label { font-family: var(--calm-sans); font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink); }
:root[data-look="calm"] .acct-menu .acct-form .acct-go { border-radius: 9px; background: var(--ink); color: var(--paper-white); box-shadow: none; font-weight: 700; }
:root[data-look="calm"] .acct-menu .acct-form .acct-back,
:root[data-look="calm"] .acct-menu .acct-form .acct-free,
:root[data-look="calm"] .acct-menu .acct-code-msg { font-size: 15px; }
:root[data-look="calm"] .acct-menu .acct-form .acct-free b { color: var(--calm-green); }

/* The display settings (css/theme.css, js/theme.js): the same sans, words
   at 15px, a soft shadow instead of the riso offset, and folded away it is
   a plain 44px round button. */
:root[data-look="calm"] .a11y-controls { border: 1px solid var(--calm-line); border-radius: 14px; box-shadow: 0 10px 28px rgba(20, 40, 30, 0.16), 0 1px 3px rgba(20, 40, 30, 0.08); font-family: var(--calm-sans); }
:root[data-look="calm"] .a11y-controls.a11y-min { width: auto; height: 44px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; }
:root[data-look="calm"] .a11y-controls.a11y-min .a11y-tab { display: inline-flex; align-items: center; gap: 8px; width: auto; height: 44px; padding: 0; border-radius: 999px; font-family: var(--calm-sans); }
:root[data-look="calm"] .a11y-tab svg { width: 20px; height: 20px; }
:root[data-look="calm"] .a11y-tab:focus-visible,
:root[data-look="calm"] .a11y-hide:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: 2px; }
:root[data-look="calm"] .a11y-controls-title,
:root[data-look="calm"] .a11y-seg-lbl { font-family: var(--calm-sans); font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--calm-dim); }
:root[data-look="calm"] .a11y-hide { color: var(--calm-dim); }
:root[data-look="calm"] .a11y-btn { font-family: var(--calm-sans); font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; border-width: 1px; border-color: var(--calm-line); border-radius: 9px; }
:root[data-look="calm"] .a11y-btn[aria-pressed="true"] { border-color: var(--ink); }
:root[data-look="calm"] .a11y-seg { border-width: 1px; border-color: var(--calm-line); border-radius: 9px; }
:root[data-look="calm"] .a11y-size { border-right-width: 1px; border-right-color: var(--calm-line); }
:root[data-look="calm"] .a11y-lang-sel { font-family: var(--calm-sans); font-size: 15px; letter-spacing: 0; }
:root[data-look="calm"] .a11y-rule { border-top: 1px solid var(--calm-line); }
.a11y-tab-word { display: none; }
/* On a phone, at the end of the footer (js/header.js moves it there). */
:root[data-look="calm"] footer .a11y-controls.a11y-in-foot { position: static; width: max-content; margin: 22px 0 0; box-shadow: none; }
:root[data-look="calm"] footer .a11y-controls.a11y-in-foot.a11y-min { width: max-content; height: auto; border-radius: 9px; background: var(--paper-white); }
:root[data-look="calm"] footer .a11y-in-foot.a11y-min .a11y-tab { display: inline-flex; gap: 9px; align-items: center; width: auto; height: 44px; padding: 0 14px; border-radius: 9px; font-family: var(--calm-sans); font-size: 16px; font-weight: 700; line-height: 1; color: var(--ink); }
:root[data-look="calm"] footer .a11y-in-foot .a11y-tab-word { display: inline; }

/* A menu item with a line under it: the title is what you click, so it
   leads in bold and the line stays as it is. */
.nav-dd-panel a:has(.dd-t small) .dd-t { font-weight: 700; }
.nav-dd-panel .dd-t small { font-weight: 400; }

/* Grass skirts card (js/header.js): the hub's team sheet, drawn small. */
.gs-pop-pic { flex: 0 0 104px; display: block; padding: 6px 2px 0; }
.gs-pop-pic .gsk { display: block; width: 100%; height: auto; overflow: visible; }
.gsk .band { fill: var(--paper-white); stroke: var(--ink); stroke-width: 2.4; }
.gsk .sh, .gsk .g { fill: var(--riso-green); }
.gsk .p { fill: var(--riso-pink); }
.gsk .y { fill: var(--riso-yellow); }
.gsk .tape { fill: color-mix(in srgb, var(--riso-yellow) 70%, transparent); stroke: color-mix(in srgb, var(--ink) 35%, transparent); }
.gsk .col rect, .gsk .strip { fill: #fff; stroke: #1a3a2a; stroke-width: 1.6; stroke-dasharray: 4 2.4; }
.gsk .nums circle { stroke: #1a3a2a; stroke-width: 1.4; }
.gsk .words path, .gsk .cut .w { stroke: color-mix(in srgb, #1a3a2a 40%, transparent); stroke-width: 2.4; stroke-linecap: round; }
.gsk .cut { filter: drop-shadow(4px 4px 0 var(--riso-pink)); }
.gsk .scissors path { stroke: var(--ink); stroke-width: 3.4; stroke-linecap: round; }
.gsk .scissors circle { fill: var(--paper-white); stroke: var(--riso-pink-deep); stroke-width: 3; }
@media (max-width: 480px) { .gs-pop-pic { flex-basis: 72px; } }

/* Students practise from Study, so the exam maker tab is a teacher's: it stays in the page. */
:root[data-audience="student"] .tabs .tab[data-tab="exam-maker"] { display: none; }

/* Exam maker menu (teacher): Make a paper in pink, then My papers (n), Your
   classes and the papers-made count. */
.nav-dd-panel.nav-dd-exam { min-width: 320px; }
:root .nav-dd-panel a.nav-dd-feature.nav-dd-make, :root[data-look] .nav-dd-panel a.nav-dd-feature.nav-dd-make { border: 1.5px solid var(--ink); background: color-mix(in srgb, var(--riso-pink) 28%, var(--paper-white)); }
:root .nav-dd-make b, :root[data-look] .nav-dd-panel .nav-dd-make b { font-size: 18px; color: var(--ink); }
.nav-dd-n { margin-left: -5px; font-family: var(--font-display); font-size: 15px; color: var(--ink-dim); }
.nav-dd-n::before { content: "("; }
.nav-dd-n::after { content: ")"; }
.nav-dd-n[hidden], .nav-dd-made[hidden] { display: none; }
.nav-dd-made { display: flex; align-items: center; justify-content: center; gap: 7px; width: fit-content; margin: 10px auto 4px; padding: 5px 12px; border: 1.5px solid var(--ink); border-radius: 999px; background: color-mix(in srgb, var(--riso-green) 22%, var(--paper-white)); font-family: var(--font-display); font-size: 13.5px; color: var(--ink); }
.nav-dd-made::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--riso-green); flex: none; }

/* Resources menu: rows, and a short list for the rows that group things.
   A laptop shows the list beside the rows; a phone opens it under its row. */
.nav-dd-panel { overflow-y: auto; overscroll-behavior: contain; }
.nav-dd-panel.nav-dd-rm { min-width: 0; width: 520px; max-width: calc(100vw / var(--zoom, 1) - 24px); padding: 12px 12px 8px; }
.nav-dd-rm .rm { position: relative; display: grid; grid-template-columns: 270px minmax(0, 1fr); column-gap: 14px; }
.nav-dd-rm .rm-rows { display: flex; flex-direction: column; gap: 1px; padding-right: 14px; border-right: 1px solid var(--line-strong); }
.nav-dd-panel .rm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font-family: var(--font-display); font-size: 15px; font-weight: 700; text-align: left; text-decoration: none; cursor: pointer; }
.nav-dd-panel .rm-row:hover, .nav-dd-panel .rm-group.on { background: var(--paper); }
.nav-dd-panel .rm-row:focus-visible, .nav-dd-panel .rm-sub a:focus-visible, .nav-dd-panel .rm-foot:focus-visible { outline: 2px solid var(--riso-green-deep); outline-offset: -2px; }
.nav-dd-panel a.rm-lead { margin-bottom: 4px; border: 1.5px solid var(--ink); background: var(--riso-green); color: var(--on-brand); box-shadow: 2px 2px 0 var(--riso-pink); }
.nav-dd-panel a.rm-lead:hover { background: var(--riso-green-deep); color: var(--paper-white); }
.nav-dd-rm .rm-car { flex: none; font-size: 15px; line-height: 1; }
.nav-dd-rm .rm-sub { display: none; position: absolute; top: 0; left: 284px; right: 0; flex-direction: column; gap: 1px; }
.nav-dd-rm .rm-group.on + .rm-sub { display: flex; }
.nav-dd-rm .rm-sub-h { padding: 8px 10px 6px; font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--ink-dim); }
.nav-dd-panel .rm-sub a { padding: 7px 10px; font-size: 15px; font-weight: 400; }
.nav-dd-panel a.rm-foot { grid-column: 1 / -1; margin-top: 8px; padding: 10px 10px 6px; border-top: 1px solid var(--line-strong); border-radius: 0; font-size: 14.5px; font-weight: 700; }
@media not all and (hover: hover) and (min-width: 761px) {
  .nav-dd-rm .rm { display: block; }
  .nav-dd-rm .rm-rows { padding-right: 0; border-right: 0; }
  .nav-dd-rm .rm-sub { position: static; margin: 2px 0 6px 10px; padding-left: 10px; border-left: 2px solid var(--riso-green); }
  .nav-dd-rm .rm-sub-h { display: none; }
  .nav-dd-rm .rm-group[aria-expanded="true"] .rm-car { transform: rotate(90deg); }
}

/* The free-account sign-in card (exam-maker/keep.js): kept here, not in
   exam-maker.css, because the guides use it too (js/header.js, teacher gate). */
/* Keep this paper?: a centred dialog over a dimmed page, in its own colours
   so it stands out from the exam maker's green and white cards. A dark card
   with a pink shadow on the light site; a light one on the dark site. */
.keep-card {
  --k-bg: #1a3a2a; --k-fg: #f4faf6; --k-dim: #c9dcd1; --k-soft: #a9c2b5;
  --k-accent: #ff7eb6; --k-em: #7be0b0; --k-field: #f4faf6; --k-field-fg: #1a3a2a;
  --k-shadow: #ff7eb6; --k-go-shadow: #2db876; --k-bad: #ffb3d1;
  width: min(460px, calc(100vw - 32px)); margin: auto; padding: 26px 26px 22px;
  border: 2px solid var(--k-bg); border-radius: 18px;
  background: var(--k-bg); color: var(--k-fg);
  box-shadow: 8px 8px 0 var(--k-shadow);
  animation: keep-in .3s cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="dark"] .keep-card {
  --k-bg: #f4faf6; --k-fg: #1a3a2a; --k-dim: #263b2f; --k-soft: #5d7a6c;
  --k-accent: #b8336e; --k-em: #1a8a55; --k-field: #ffffff; --k-field-fg: #1a3a2a;
  --k-shadow: #ff9ec4; --k-go-shadow: #1a3a2a; --k-bad: #b3306a;
}
.keep-card::backdrop { background: rgba(14, 26, 21, 0.62); }
.keep-eyebrow { margin: 0; font-family: var(--font-mono); font-size: 13.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--k-accent); }
.keep-card h2 { margin: 6px 34px 10px 0; font-size: 26px; line-height: 1.12; letter-spacing: -.01em; color: var(--k-fg); text-wrap: balance; }
.keep-card h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--k-em); }
.keep-line, .keep-small { margin: 0; font-size: 15px; line-height: 1.5; color: var(--k-dim); }
.keep-line b { color: var(--k-fg); }
.keep-small { margin-top: 10px; font-size: 13px; color: var(--k-soft); }
.keep-small[hidden], .keep-form[hidden], .keep-no[hidden] { display: none; }
.keep-nl { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: var(--k-dim); cursor: pointer; }
.keep-nl input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: #1a8a55; cursor: pointer; }
.keep-nl b { color: var(--k-ink, inherit); }
.keep-nl[hidden] { display: none; }
.keep-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.keep-form input { flex: 1 1 180px; min-width: 0; min-height: 46px; padding: 9px 14px; font: inherit; font-size: 16px; border: 2px solid var(--k-field); border-radius: 12px; background: var(--k-field); color: var(--k-field-fg); }
.keep-form input::placeholder { color: #6f8a7c; }
.keep-form input:focus-visible { outline: 3px solid var(--k-accent); outline-offset: 2px; }
.keep-go { min-height: 46px; padding: 10px 18px; border: 2px solid var(--k-field-fg); border-radius: 999px; background: #ff7eb6; color: #1a3a2a; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 3px 3px 0 var(--k-go-shadow); }
.keep-go:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--k-go-shadow); }
.keep-go:disabled { opacity: .6; cursor: progress; transform: none; }
.keep-no { margin-top: 12px; padding: 6px 2px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--k-dim); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.keep-no:hover { color: var(--k-fg); }
.keep-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--k-dim); font-size: 22px; line-height: 1; cursor: pointer; }
.keep-x:hover { background: rgba(127, 127, 127, 0.18); color: var(--k-fg); }
.keep-msg { margin: 12px 0 0; font-size: 14.5px; color: var(--k-em); }
.keep-msg.bad { color: var(--k-bad); }
.keep-msg[hidden] { display: none; }
.keep-msg a { color: var(--k-fg); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.keep-toast a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.keep-go:focus-visible, .keep-no:focus-visible, .keep-x:focus-visible { outline: 3px solid var(--k-accent); outline-offset: 3px; }
.keep-toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 61; transform: translateX(-50%);
  padding: 9px 16px; border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper-white); font-size: 14px; box-shadow: 3px 3px 0 var(--riso-green);
  white-space: nowrap;
}
.keep-toast[hidden] { display: none; }
.keep-namebtn { margin: 0 0 0 2px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@keyframes keep-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .keep-card { animation: none; } }
@media print { .keep-card, .keep-toast { display: none !important; } }

/* /css/game-topbar.css */
/* Site topbar, for the games.
   ---------------------------------------------------------------
   The game pages don't load base.css: each one declares its own
   cream/dark palette on :root, which would otherwise repaint the
   shared header. So instead of forking the header, this file re-
   declares the site design tokens *scoped to the header itself*.
   /css/header.css is then used unmodified and the bar renders
   exactly as it does on every other page.

   .nav-dd-panel is scoped too because js/header.js appends the
   dropdown to <body>, outside .topbar, so it can't inherit.

   Load order on a game page:
     fonts.css -> header.css -> game-topbar.css -> inline <style>
   Everything here is scoped to the header, so the inline game
   styles that follow can't be affected by it. */

.topbar,
.nav-dd-panel {
  --paper:        #e6f5ee;
  --paper-white:  #f4faf6;
  --ink:          #1a3a2a;
  --ink-dim:      #263b2f;
  --ink-faint:    #557063;

  --riso-pink:        #ff7eb6;
  --riso-pink-deep:   #e3589c;
  --riso-green:       #2db876;
  --riso-green-deep:  #1a8a55;

  --line: rgba(26, 58, 42, 0.16);

  --font-display: "Atkinson Hyperlegible", "Inter Tight", system-ui, sans-serif;
  --font-mono:    "Atkinson Hyperlegible", system-ui, sans-serif;
}

/* The handful of base.css normalisations the header depends on.
   Scoped, so the game's own content keeps its own rules. */
.topbar a,
.nav-dd-panel a { color: inherit; text-decoration: none; }
.topbar img,
.topbar svg { display: block; max-width: 100%; }

/* Dark mode: the site itself has no dark theme, but the games do, and a
   bright mint bar above a dark page reads as broken. Keep the identical
   layout and riso accents, restated on the games' dark paper. Both
   triggers are mirrored from the game pages: the explicit toggle wins,
   otherwise fall back to the OS preference. */
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .nav-dd-panel {
  --paper:        #172420;
  --paper-white:  #1e2e29;
  --ink:          #ede9da;
  --ink-dim:      #c6c8b9;
  --ink-faint:    #8a988e;

  --riso-pink:        #ff73ad;
  --riso-pink-deep:   #ff8fbe;
  --riso-green:       #43d69c;
  --riso-green-deep:  #6fe5b8;

  --line: rgba(237, 233, 218, 0.2);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .topbar,
  :root:not([data-theme="light"]) .nav-dd-panel {
    --paper:        #172420;
    --paper-white:  #1e2e29;
    --ink:          #ede9da;
    --ink-dim:      #c6c8b9;
    --ink-faint:    #8a988e;

    --riso-pink:        #ff73ad;
    --riso-pink-deep:   #ff8fbe;
    --riso-green:       #43d69c;
    --riso-green-deep:  #6fe5b8;

    --line: rgba(237, 233, 218, 0.2);
  }
}

/* The paper grain multiplies, which turns to mud on dark paper.
   Screen it back at low opacity instead, matching how the games
   handle their own grain layer. */
:root[data-theme="dark"] .topbar::after {
  mix-blend-mode: screen;
  opacity: 0.14;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .topbar::after {
    mix-blend-mode: screen;
    opacity: 0.14;
  }
}

/* The games pin a floating theme toggle to the viewport; clear the
   sticky header so the two don't overlap.

   Qualified with :root deliberately. The game pages disagree about
   where their inline <style> sits relative to their <link>s - lineage
   puts it before, the rest after - so a bare .theme-toggle would win
   on some pages and lose on others. :root .theme-toggle outranks the
   games' own .theme-toggle rule on specificity, so source order stops
   mattering. */
:root .theme-toggle { top: 5.2rem; }
@media (max-width: 760px) { :root .theme-toggle { top: 4.6rem; } }
@media (max-width: 480px) { :root .theme-toggle { top: 5.4rem; } }

/* /css/zombio-skin.css */
/* splycr's skin for OUTBREAK (spudnik-base/splycr-client, public/outbreak/splycr-skin.css):
   the HUD, cards, banners and boss bar over the inked arena, scoped to html.ink.
   Generated by scripts/zombio/port-inked.mjs: do not edit here. */
/* outbreak/splycr-skin.css
 *
 * Zombio wearing splycr's clothes. Loaded only by multiplayer.js, which
 * only exists in splycr's copy of the game, so standalone Zombio keeps its
 * own Biology by Bradford pink-and-green riso look untouched.
 *
 * Two jobs. Strip the chrome, because inside splycr the teacher has already
 * picked the card set in the lobby and the topic pickers, level pickers,
 * leaderboard and how-to-play would all be answering questions nobody
 * asked. And restyle what is left to splycr's design system
 * (docs/design-system.md): paper cards with ink lines, Bricolage Grotesque
 * headings and Rubik text, hard shadows only on things you can press, and
 * nothing dark but the scrim over the arena. The values are src/styles.css's
 * tokens, copied here because this page cannot load the app's stylesheet.
 *
 * Fonts: Bricolage Grotesque ships with Zombio (fonts/fonts.css). Rubik is
 * requested from Google Fonts by multiplayer.js, and falls back to the
 * system sans where that is blocked.
 */
/* The selector is html:root rather than html so it outranks Zombio's own
   dark-mode tokens (:root:not([data-theme="light"])). splycr is light only. */
html.ink .stage,
html.ink .qwrap {
  --ob-ink: #1B1A17;
  --ob-paper: #FAF7F0;
  --ob-paper-2: #F2ECDF;
  --ob-card: #FFFFFF;
  --ob-line: #DDD5C6;
  --ob-tile-line: #CFC6B6;
  --ob-muted: #6B6458;
  --ob-body: #45403A;
  --ob-blue: #3347E6;
  --ob-blue-dark: #2333B8;
  --ob-tomato: #F0533A;
  --ob-tomato-ink: #B23A28;
  --ob-sun: #FFC933;
  --ob-lime: #8EE06B;
  --ob-lime-ink: #1E7A3C;
  --ob-display: 'Atkinson Hyperlegible', 'Rubik', system-ui, sans-serif;
  --ob-text: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ob-scrim: rgba(27, 26, 23, 0.5);
  --page:  #FAF7F0;
  --ink:   #1B1A17;
  --muted: #6B6458;
  --board: #F2ECDF;
  --card:  #FFFFFF;
  --line:  #DDD5C6;
  --pink:  #F0533A;
  --green: #1E7A3C;
  --c:     #1E7A3C;
  --sans:  'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
html.ink .stage :focus-visible, html.ink .qwrap :focus-visible { outline: 2px solid var(--ob-blue); outline-offset: 3px; }
/* A label: small, uppercase, letter-spaced, muted. The only uppercase text,
   and written in sentence case underneath. */
html.ink #obReady .eyebrow,
html.ink #obReady p.pick,
html.ink #obHud .lbl,
html.ink #obDown .eyebrow {
  font-family: var(--ob-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ob-muted);
}
/* ── The drop-in card ─────────────────────────────────────────────────── */
/* Pointer lock needs a real click, so the match cannot auto-start. This is
   that click, and the only place the card set's name is shown. A paper
   card over the dimmed arena. */
html.ink #obReady {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
  box-sizing: border-box;
  background: var(--ob-scrim);
  font-family: var(--ob-text);
  color: var(--ob-ink);
}
html.ink #obReady .card {
  box-sizing: border-box;
  width: min(100%, 1060px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 26px 32px 24px;
  background: var(--ob-paper);
  border: 1.5px solid var(--ob-ink);
  border-radius: 22px;
  box-shadow: none;
  text-align: left;
}
html.ink #obReady .card:not(.wide) { width: min(100%, 720px); }
html.ink #obReady .head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 28px;
  padding-bottom: 18px;
  border-bottom: 1.5px solid var(--ob-ink);
}
html.ink #obReady .head > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
html.ink #obReady .eyebrow { margin: 0; }
html.ink #obReady h1 {
  margin: 0;
  font-family: var(--ob-display);
  font-weight: 800;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -.01em;
  line-height: 1;
  color: var(--ob-ink);
  font-variation-settings: normal;
  /* Zombio gives headings a riso offset shadow in its own pink and green. */
  text-shadow: none;
  overflow-wrap: anywhere;
}
html.ink #obReady p.sub {
  margin: 0;
  max-width: 380px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ob-body);
  text-align: right;
  font-style: normal;
}
html.ink #obReady p.sub b { font-weight: 600; color: var(--ob-ink); }
html.ink #obReady .cols {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}
html.ink #obReady .card:not(.wide) .cols { grid-template-columns: minmax(0, 1fr); }
/* Who you are: the Outbreak lime panel, the character turning slowly. */
html.ink #obReady .who {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px 18px;
  background: var(--ob-lime);
  border: 1.5px solid var(--ob-ink);
  border-radius: 18px;
  text-align: center;
}
html.ink #obReady canvas.stage {
  display: block;
  width: 220px;
  height: 280px;
  max-width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;              /* Zombio's hard offset shadow */
}
html.ink #obReady p.cname {
  margin: 0;
  font-family: var(--ob-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -.01em;
  line-height: 1;
  color: var(--ob-ink);
}
html.ink #obReady p.ctag { margin: 0; font-size: 15px; color: var(--ob-ink); }
html.ink #obReady .pickers { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
html.ink #obReady p.pick { margin: 0; }
html.ink #obReady p.pick + .chars,
html.ink #obReady p.pick + .weapons { margin-top: -2px; }
html.ink #obReady .weapons + p.pick,
html.ink #obReady .chars + p.pick { padding-top: 8px; }
html.ink #obReady p.pick span {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--ob-muted);
}
/* The two pickers: white tiles, the chosen one sunshine with an ink line. */
html.ink #obReady .chars {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}
html.ink #obReady .weapons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
html.ink #obReady .chr,
html.ink #obReady .wpn {
  box-sizing: border-box;
  margin: 0;
  background: var(--ob-card);
  color: var(--ob-ink);
  border: 1.5px solid var(--ob-tile-line);
  border-radius: 12px;
  box-shadow: none;
  font-family: var(--ob-text);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
html.ink #obReady .chr:hover,
html.ink #obReady .wpn:hover { border-color: var(--ob-ink); }
html.ink #obReady .chr[aria-checked="true"],
html.ink #obReady .wpn[aria-checked="true"] {
  background: var(--ob-sun);
  border: 2px solid var(--ob-ink);
}
html.ink #obReady .chr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 9.5px 4px;
}
html.ink #obReady .chr[aria-checked="true"] { padding: 9px 3.5px; }
/* The face, drawn as the lobby's picker draws it (SkinHead, unframed): the
   pixel head carries its own ink line, so the box round it has none. */
html.ink #obReady .chr .face {
  display: block;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  overflow: hidden;
}
html.ink #obReady .chr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
html.ink #obReady .chr b {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.1;
}
html.ink #obReady .wpn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px 11px;
  text-align: left;
}
html.ink #obReady .wpn[aria-checked="true"] { padding: 9.5px 11.5px 10.5px; }
html.ink #obReady .wpn .ico { display: block; margin-bottom: 2px; }
html.ink #obReady .wpn .ico svg { width: 34px; height: 34px; display: block; }
html.ink #obReady .wpn b { font-size: 15px; font-weight: 600; line-height: 1.15; }
html.ink #obReady .wpn small { font-size: 13px; line-height: 1.25; color: var(--ob-body); }
/* Drop in: the one pressable thing on the card, so the one hard shadow. */
html.ink #obReady .go {
  width: 100%;
  min-height: 64px;
  margin-top: 6px;
  padding: 0 24px;
  border: 2px solid var(--ob-ink);
  border-radius: 16px;
  background: var(--ob-blue);
  color: #FFFFFF;
  box-shadow: 4px 4px 0 var(--ob-ink);
  font-family: var(--ob-text);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0;
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease, background-color 120ms ease;
}
html.ink #obReady .go:hover { background: var(--ob-blue-dark); }
html.ink #obReady .go:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ob-ink); }
html.ink #obReady .go:focus-visible { outline: 3px solid rgba(51, 71, 230, 0.45); outline-offset: 4px; }
html.ink #obReady .hint {
  margin: 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ob-muted);
}
/* The rules a student needs before dropping in, under a hairline. */
html.ink #obReady .rules {
  list-style: none;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--ob-line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 28px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ob-body);
}
html.ink #obReady .rules li { margin: 0; padding: 0; }
html.ink #obReady .rules b { color: var(--ob-ink); font-weight: 600; }
@media (max-width: 980px) {
  html.ink #obReady .chars { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  html.ink #obReady .cols { grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
  html.ink #obReady canvas.stage { width: 180px; height: 240px; }
}
@media (max-width: 720px) {
  html.ink #obReady .card { padding: 20px 18px; }
  html.ink #obReady .head { flex-direction: column; align-items: flex-start; }
  html.ink #obReady p.sub { text-align: left; max-width: none; }
  html.ink #obReady .cols { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  html.ink #obReady canvas.stage { height: 180px; }
  html.ink #obReady .weapons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html.ink #obReady .rules { grid-template-columns: minmax(0, 1fr); }
}
/* A laptop with the browser's own bars: tighter, so it still fits. */
@media (max-height: 740px) and (min-width: 721px) {
  html.ink #obReady .card { gap: 16px; padding-top: 22px; padding-bottom: 20px; }
  html.ink #obReady .head { padding-bottom: 14px; }
  html.ink #obReady canvas.stage { height: 240px; }
  html.ink #obReady .go { min-height: 56px; }
}
@media (max-height: 660px) and (min-width: 721px) {
  html.ink #obReady { padding: 10px 16px; }
  html.ink #obReady .card { max-height: calc(100vh - 20px); gap: 12px; padding: 16px 28px 14px; }
  html.ink #obReady .head { padding-bottom: 10px; }
  html.ink #obReady h1 { font-size: 32px; }
  html.ink #obReady p.sub { font-size: 14px; line-height: 1.4; }
  html.ink #obReady .pickers { gap: 10px; }
  html.ink #obReady .weapons + p.pick,
html.ink #obReady .chars + p.pick { padding-top: 2px; }
  html.ink #obReady .chr { gap: 4px; padding-top: 6.5px; padding-bottom: 6.5px; }
  html.ink #obReady .chr[aria-checked="true"] { padding-top: 6px; padding-bottom: 6px; }
  html.ink #obReady .chr .face { width: 40px; height: 40px; }
  html.ink #obReady .wpn { padding-top: 8px; padding-bottom: 8px; }
  html.ink #obReady .wpn[aria-checked="true"] { padding-top: 7.5px; padding-bottom: 7.5px; }
  html.ink #obReady .wpn .ico svg { width: 28px; height: 28px; }
  html.ink #obReady .wpn small { font-size: 12px; }
  html.ink #obReady canvas.stage { height: 200px; }
  html.ink #obReady p.cname { font-size: 24px; }
  html.ink #obReady .go { min-height: 50px; margin-top: 2px; font-size: 20px; }
  html.ink #obReady .rules { padding-top: 10px; font-size: 13px; line-height: 1.4; }
}
/* ── In-game furniture ────────────────────────────────────────────────── */
/* Zombio's own score, best and chain live in the top right, which is where
   the infections panel goes, and they count the wrong thing here anyway.
   The wave line is single-player language too: a match has no waves and
   nothing to cure. Blocks, power-ups and the weapon all stay. */
html.ink #hud .tr,
html.ink #waveTxt { display: none !important; }
/* Zombio's hearts count what its own zombies do to you, and there are no
   zombies of its own in a match. Infection is a separate meter, shown in
   OUTBREAK's own panel, and two health displays that disagree are worse
   than one. */
html.ink #hearts { display: none; }
html.ink #hud { font-family: var(--ob-text); color: var(--ob-ink); }
/* Blocks, the weapon in hand, grenades: Zombio's line, on a paper card. */
html.ink #hud .tl {
  left: 12px;
  right: auto;                   /* a card, not a bar, even on touch screens */
  top: 12px;
  max-width: calc(100% - 140px);
  padding: 8px 12px;
  background: var(--ob-paper);
  border: 1.5px solid var(--ob-ink);
  border-radius: 14px;
}
html.ink #hud .bricks { margin: 0; font-size: 15px; font-weight: 500; }
html.ink #hud .pow { font-size: 13px; font-weight: 500; color: var(--ob-body); }
html.ink #hud .pow:empty { display: none; }
html.ink #hud .wsel { padding: 1px 6px; border-radius: 6px; }
html.ink #hud .wsel.on { background: var(--ob-sun); }
html.ink #hud .cic { color: var(--ob-ink); }
html.ink #cross::before,
html.ink #cross::after { background: var(--ob-ink); box-shadow: 1px 1px 0 var(--ob-paper); }
html.ink #cross.hit::before,
html.ink #cross.hit::after,
html.ink #cross.lock::before,
html.ink #cross.lock::after { background: var(--ob-tomato); }
html.ink #cross.lock { filter: none; }
/* Hurt: a flat tomato wash, not a pink vignette. */
html.ink #flash { background: rgba(240, 83, 58, 0.28); }
html.ink .pbtn {
  background: var(--ob-paper);
  color: var(--ob-ink);
  border: 1.5px solid var(--ob-ink);
  border-radius: 12px;
  font-family: var(--ob-text);
}
html.ink .mbtn[aria-pressed="true"] { background: var(--ob-sun); color: var(--ob-ink); }
html.ink .mtip {
  background: var(--ob-paper);
  color: var(--ob-ink);
  border: 1.5px solid var(--ob-ink);
  font: 500 14px/1.2 var(--ob-text);
  padding: 7px 14px;
}
html.ink .radar { box-shadow: none; border: 1.5px solid var(--ob-ink); }
/* Touch controls: pressable, so ink borders and hard shadows. */
html.ink .fire,
html.ink .jumpb,
html.ink .tb {
  border: 2px solid var(--ob-ink);
  color: var(--ob-ink);
  box-shadow: 3px 3px 0 var(--ob-ink);
  font-family: var(--ob-text);
  font-weight: 600;
  text-transform: lowercase;
}
html.ink .fire::first-letter,
html.ink .jumpb::first-letter,
html.ink .tb::first-letter { text-transform: uppercase; }
html.ink .fire { background: var(--ob-sun); }
html.ink .jumpb,
html.ink .tb { background: var(--ob-card); }
html.ink .slideb { background: var(--ob-paper-2); }
html.ink .tb[aria-pressed="true"] { background: var(--ob-sun); color: var(--ob-ink); }
/* Zombio's own boss bar, if it ever shows. */
html.ink #bossBar { font-family: var(--ob-text); font-weight: 600; color: var(--ob-ink); }
html.ink #bossBar i { border: 1.5px solid var(--ob-ink); background: var(--ob-card); border-radius: 999px; }
html.ink #bossFill { background: var(--ob-tomato); }
/* Banners: Bricolage, ink, on a paper card. */
html.ink #banner {
  left: 50%;
  right: auto;
  width: max-content;
  max-width: min(88vw, 720px);
  box-sizing: border-box;
  transform: translateX(-50%);
  padding: 12px 26px 14px;
  background: var(--ob-paper);
  border: 1.5px solid var(--ob-ink);
  border-radius: 20px;
  font-family: var(--ob-display);
  font-weight: 800;
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.05;
  letter-spacing: -.01em;
  font-variation-settings: normal;
  color: var(--ob-ink);
  text-shadow: none;
}
html.ink #banner:empty { visibility: hidden; }
html.ink #banner small {
  display: block;
  margin: 6px auto 0;
  padding: 0;
  max-width: none;
  font-family: var(--ob-text);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--ob-body);
  text-shadow: none;
}
/* Points, under the crosshair when there is nowhere better to put them:
   a lime number with a thick ink stroke, as Boss Battle pops its numbers. */
html.ink .obPop {
  font-family: var(--ob-display);
  font-weight: 800;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--ob-lime);
  -webkit-text-stroke: 6px var(--ob-ink);
  paint-order: stroke fill;
  text-shadow: none;
  white-space: nowrap;
}
/* ── Numbers in the world ─────────────────────────────────────────────── */
/* Where a hit landed: −1 in tomato, +2 in lime, in Bricolage with a thick
   ink stroke. multiplayer.js pins each to its spot in the arena; the pop
   and the float are here, in steps, like Boss Battle's. */
html.ink #obFx {
  position: fixed;
  inset: 0;
  z-index: 29;                   /* under the HUD and every card */
  pointer-events: none;
  overflow: hidden;
}
html.ink .obNum {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  will-change: transform;
}
html.ink .obNum > span {
  position: absolute;
  left: 0;
  top: 0;
  translate: -50% -50%;
  font-family: var(--ob-display);
  font-weight: 800;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1;
  letter-spacing: -.01em;
  white-space: nowrap;
  -webkit-text-stroke: 6px var(--ob-ink);
  paint-order: stroke fill;
  animation: obNumPop 1100ms cubic-bezier(.2, .9, .3, 1) both;
}
html.ink .obNum--hit > span { color: var(--ob-tomato); }
html.ink .obNum--heal > span { color: var(--ob-lime); }
html.ink .obNum--big > span { font-size: clamp(40px, 4vw, 60px); -webkit-text-stroke-width: 7px; }
@keyframes obNumPop {
  0% { transform: scale(.4); opacity: 0; }
  18% { transform: scale(1.18); opacity: 1; }
  32% { transform: scale(1); }
  75% { opacity: 1; }
  100% { transform: translateY(-70px); opacity: 0; }
}
@keyframes obNumStill {
  0%, 80% { opacity: 1; }
  100% { opacity: 0; }
}
/* Zombio's pause layer: paper over the arena, ink heading, a blue button. */
html.ink .layer { background: rgba(250, 247, 240, 0.92); font-family: var(--ob-text); }
html.ink .layer h2 {
  font-family: var(--ob-display);
  font-weight: 800;
  letter-spacing: -.01em;
  font-variation-settings: normal;
  text-shadow: none;
  color: var(--ob-ink);
}
html.ink .layer p { font-family: var(--ob-text); font-style: normal; color: var(--ob-body); font-size: 17px; }
html.ink .btn {
  min-height: 52px;
  padding: 0 22px;
  border: 2px solid var(--ob-ink);
  border-radius: 14px;
  background: var(--ob-blue);
  color: #FFFFFF;
  box-shadow: 4px 4px 0 var(--ob-ink);
  font: 600 17px var(--ob-text);
}
html.ink .btn:hover { transform: none; background: var(--ob-blue-dark); box-shadow: 4px 4px 0 var(--ob-ink); }
html.ink .btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ob-ink); }
html.ink .btn.ghost { background: var(--ob-card); color: var(--ob-ink); }
html.ink .btn.ghost:hover { background: #F7F2E8; }
/* ── OUTBREAK's own panel: time, resistance, points ───────────────────── */
html.ink #obHud {
  box-sizing: border-box;
  width: 236px;
  padding: 12px 14px 10px;
  background: var(--ob-paper);
  border: 1.5px solid var(--ob-ink);
  border-radius: 18px;
  font: 400 14px/1.3 var(--ob-text);
  color: var(--ob-ink);
  transition: outline-color 120ms ease;
  outline: 3px solid transparent;
  outline-offset: 2px;
}
html.ink #obHud[hidden] { display: none; }
/* A hit landed. */
html.ink #obHud.hit { outline-color: var(--ob-lime); }
html.ink #obHud .sec {
  padding: 0 0 9px;
  margin: 0 0 9px;
  border-bottom: 1.5px solid var(--ob-ink);
}
html.ink #obHud .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
html.ink #obHud .num {
  font-family: var(--ob-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
html.ink #obHud .time .num { font-size: 24px; }
html.ink #obHud .time.low .num { color: var(--ob-tomato-ink); }
html.ink #obHud .pips { display: inline-flex; gap: 4px; }
/* One square for each hit left in you. The glyph is kept for screen
   readers and tests; the square is what shows. */
html.ink #obHud .pips i {
  display: block;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--ob-ink);
  border-radius: 4px;
  background: var(--ob-card);
  font-size: 0;
  line-height: 0;
  color: transparent;
  font-style: normal;
  overflow: hidden;
}
html.ink #obHud .pips i.on { background: var(--ob-lime); }
html.ink #obHud .downtxt { font-weight: 600; color: var(--ob-tomato-ink); }
html.ink #obHud .meter {
  display: block;
  height: 12px;
  margin-top: 6px;
  border: 1.5px solid var(--ob-ink);
  border-radius: 999px;
  background: var(--ob-card);
  overflow: hidden;
}
html.ink #obHud .meter span { display: block; height: 100%; background: var(--ob-tomato); }
html.ink #obHud ol {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}
html.ink #obHud li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 -6px;
  padding: 4px 6px;
  border-top: 1px solid var(--ob-line);
}
html.ink #obHud li:first-child { border-top: 0; }
html.ink #obHud li.me { background: var(--ob-sun); border-radius: 8px; border-top-color: transparent; }
html.ink #obHud li.me + li { border-top-color: transparent; }
html.ink #obHud li.down .nm,
html.ink #obHud li.down .obFace { opacity: 0.5; }
html.ink #obHud li .nm {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
}
html.ink #obHud li .nm small { font-size: 13px; font-weight: 400; color: var(--ob-muted); }
html.ink #obHud li .num { font-size: 18px; }
html.ink #obHud li .rank { width: 14px; font-weight: 600; color: var(--ob-muted); }
html.ink #obHud li .sub { margin: 0; font-family: var(--ob-text); font-style: normal; font-size: 13px; color: var(--ob-body); white-space: nowrap; }
html.ink #obHud.final { width: 280px; }
/* A character's head, drawn small from its colours: skin, a band of hair,
   two eyes. The same little face splycr's player lists use. */
html.ink .obFace {
  position: relative;
  flex: none;
  display: block;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--ob-ink);
  border-radius: 5px;
  overflow: hidden;
}
html.ink .obFace i { position: absolute; display: block; }
html.ink .obFace .hair { left: 0; right: 0; top: 0; height: 7px; }
html.ink .obFace .eye { top: 10px; width: 3px; height: 4px; background: var(--ob-ink); }
html.ink .obFace .eye.l { left: 4px; }
html.ink .obFace .eye.r { right: 4px; }
/* The pixel face carries its own ink line. */
html.ink img.obFace {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 0;
  image-rendering: pixelated;
}
/* ── The question card ────────────────────────────────────────────────── */
html.ink .qwrap {
  z-index: 36;                   /* over the down screen, not under it */
  background: var(--ob-scrim);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-family: var(--ob-text);
}
/* Down, the tomato screen is the backdrop: no scrim over it, and its own
   words step aside, since the card's chip says the same. */
html.ink:has(#obDown:not([hidden])) .qwrap { background: transparent; }
html.ink:has(.qwrap) #obDown .in { visibility: hidden; }
html.ink .qcard {
  box-sizing: border-box;
  width: 100%;
  max-width: 680px;
  padding: 24px 26px 26px;
  background: var(--ob-paper);
  border: 1.5px solid var(--ob-ink);
  border-radius: 22px;
  box-shadow: none;
  color: var(--ob-ink);
}
/* What the question is for, as Outbreak's lime chip; tomato when it is the
   way back in or the five-infection gate. */
html.ink .qtag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 5px 12px;
  background: var(--ob-lime);
  border: 1.5px solid var(--ob-ink);
  border-radius: 999px;
  font-family: var(--ob-text);
  font-style: normal;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ob-ink);
}
html.ink .qtag.is-recover,
html.ink .qtag.is-gate { background: var(--ob-tomato); }
html.ink .qtag.is-pick { background: var(--ob-sun); }
html.ink .qq {
  margin: 14px 0 0;
  font-family: var(--ob-display);
  font-weight: 800;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.1;
  letter-spacing: -.01em;
  font-variation-settings: normal;
  color: var(--ob-ink);
  text-wrap: balance;
}
html.ink .qimg {
  display: block;
  max-width: 100%;
  max-height: 38vh;
  margin: 14px 0 0;
  border: 1.5px solid var(--ob-ink);
  border-radius: 12px;
  background: var(--ob-card);
}
html.ink .qcard .ups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
html.ink .qcard .ups.pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Answers, the way the app's AnswerButtons draw them: four colours, each
   with its shape, an ink line and a hard shadow. The number is the key. */
html.ink .qcard .up {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 10px 12px 10px 16px;
  border: 2px solid var(--ob-ink);
  border-radius: 16px;
  box-shadow: 3px 3px 0 var(--ob-ink);
  background: var(--ob-card);
  color: var(--ob-ink);
  font-family: var(--ob-text);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease;
}
html.ink .qcard .up:hover { border-color: var(--ob-ink); }
html.ink .qcard .up:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ob-ink); }
html.ink .qcard .up:focus-visible { outline: 3px solid rgba(51, 71, 230, 0.45); outline-offset: 3px; }
/* Zombio greys every span in its own .up; ours take the button's colour. */
html.ink .qcard .up .shape,
html.ink .qcard .up .txt {
  font-family: inherit;
  font-size: inherit;
  font-style: normal;
  color: inherit;
}
html.ink .qcard .up.ans-1 { background: #F0533A; color: var(--ob-ink); }
html.ink .qcard .up.ans-2 { background: #3347E6; color: #FFFFFF; }
html.ink .qcard .up.ans-3 { background: #FFC933; color: var(--ob-ink); }
html.ink .qcard .up.ans-4 { background: #8EE06B; color: var(--ob-ink); }
html.ink .qcard .up .shape { flex: none; width: 24px; height: 24px; display: grid; place-items: center; }
html.ink .qcard .up .shape svg { display: block; width: 22px; height: 22px; }
html.ink .qcard .up .txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
html.ink .qcard .up .key {
  flex: none;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 1.5px solid currentColor;
  border-radius: 6px;
  font-family: var(--ob-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: inherit;
  opacity: 0.75;
}
/* An upgrade: a white tile, its name, a line of what it does. */
html.ink .qcard .up.upg {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  min-height: 92px;
  padding: 14px 16px 16px;
  position: relative;
}
html.ink .qcard .up.upg:hover { background: #F7F2E8; }
html.ink .qcard .up.upg .key { position: absolute; top: 12px; right: 12px; }
html.ink .qcard .up.upg .txt { flex: none; padding-right: 30px; }
html.ink .qcard .up .sub {
  display: block;
  font-family: var(--ob-text);
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ob-body);
  margin: 0;
}
/* The card is focused when it opens (never an answer), so it needs no
   ring of its own; the answers keep theirs. */
html.ink .obAsk .qcard:focus { outline: none; }
html.ink .qcard .up .key { background: var(--ob-card); color: var(--ob-ink); border: 2px solid var(--ob-ink); opacity: 1; }
/* ── Sized as every other game's answers ──────────────────────────────
   docs/student-controls.md, section 3: on a computer the card nearly
   fills the window and the answers split everything under the question
   into quarters, with big type and big shapes. The student is frozen and
   safe while it is up, so nothing in the arena needs to show round it.
   The type follows the question's length (q-s, q-m, q-l) and the longest
   answer's (fit-a, fit-b, fit-c), which multiplayer.js puts on the card.
   Three device classes, as there: large, short (a laptop window under 521
   tall) and phone (a window under 600 wide). */
@media (min-width: 600px) and (min-height: 521px) {
  html.ink .qwrap.obAsk {
    box-sizing: border-box;
    padding: clamp(14px, 2.2vh, 28px) clamp(16px, 2.4vw, 40px);
  }
  html.ink .obAsk .qcard {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.6vh, 18px);
    width: 100%;
    max-width: 1600px;
    min-height: 100%;
    padding: clamp(16px, 2.6vh, 32px) clamp(18px, 2vw, 36px);
  }
  html.ink .obAsk .qtag { align-self: flex-start; padding: 0.35em 0.85em; font-size: clamp(14px, 0.5rem + 0.45vw, 18px); }
  html.ink .obAsk .qhead { display: flex; align-items: center; gap: clamp(14px, 2vw, 32px); }
  html.ink .obAsk .qq {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: clamp(28px, 0.9rem + min(2vw, 3.4vh), 54px);
    line-height: 1.12;
    letter-spacing: -.01em;
    overflow-wrap: anywhere;
  }
  html.ink .obAsk .q-m .qq { font-size: clamp(24px, 0.8rem + min(1.6vw, 2.8vh), 44px); }
  html.ink .obAsk .q-l .qq { font-size: clamp(22px, 0.75rem + min(1.2vw, 2.2vh), 36px); line-height: 1.15; }
  html.ink .obAsk .qimg { flex: none; max-width: 40%; max-height: clamp(120px, 26vh, 320px); margin: 0; }
  /* All the height that is left, shared equally between the rows; a row
     with more to say than its share grows, and the card scrolls. */
  html.ink .obAsk .qcard .ups {
    flex: 1 0 auto;
    margin: 0;
    grid-auto-rows: 1fr;
    gap: clamp(10px, 1.2vw, 18px);
  }
  html.ink .obAsk .qcard .up {
    min-height: 80px;
    gap: clamp(12px, 1.2vw, 22px);
    padding: clamp(12px, 2vh, 24px) clamp(16px, 1.6vw, 28px);
    border-radius: 18px;
    font-size: clamp(22px, 0.75rem + min(1.3vw, 2.3vh), 40px);
    hyphens: auto;
  }
  html.ink .obAsk .fit-b .up { font-size: clamp(21px, 0.7rem + min(1.1vw, 2vh), 34px); line-height: 1.15; }
  html.ink .obAsk .fit-c .up { font-size: clamp(20px, 0.6rem + min(1vw, 1.8vh), 28px); line-height: 1.15; }
  html.ink .obAsk .qcard .up .shape,
html.ink .obAsk .qcard .up .shape svg { width: 1.3em; height: 1.3em; }
  html.ink .obAsk .qcard .up .key {
    width: 1.9em;
    height: 1.9em;
    border-radius: 0.45em;
    font-size: clamp(14px, 0.5rem + 0.5vw, 18px);
  }
  /* Three answers: the third takes the whole row, so no target shrinks
     and there is no hole. Two, on an upright screen: two wide halves. */
  html.ink .obAsk .ups:not(.pick) > .up:nth-child(3):last-child { grid-column: 1 / -1; }
  /* The upgrade pick: three big tiles, the name and what it does in the
     middle of each, on a card only as tall as they are; three tiles the
     height of the window would be mostly empty. */
  html.ink .obPick .qcard { min-height: 0; }
  html.ink .obPick .qcard .ups { flex: none; grid-auto-rows: minmax(clamp(150px, 30vh, 320px), auto); }
  html.ink .obAsk .qcard .up.upg {
    justify-content: center;
    gap: 0.4em;
    padding: clamp(16px, 2.4vh, 32px) clamp(18px, 1.8vw, 32px);
  }
  html.ink .obAsk .qcard .up.upg .key { top: clamp(10px, 1.6vh, 18px); right: clamp(10px, 1vw, 18px); }
  html.ink .obAsk .qcard .up.upg .txt { padding-right: 0; }
  html.ink .obAsk .qcard .up .sub { font-size: clamp(16px, 0.6rem + 0.6vw, 24px); }
}
@media (min-width: 600px) and (min-height: 521px) and (orientation: portrait) {
  html.ink .obAsk .ups.n2 { grid-template-columns: minmax(0, 1fr); }
}
/* A window under 600 wide: one column, tiles at least 64 tall. */
@media (max-width: 599px) {
  html.ink .obAsk .qcard { padding: 20px 18px; }
  html.ink .obAsk .qq { font-size: clamp(24px, 7vw, 30px); }
  html.ink .obAsk .q-m .qq { font-size: clamp(21px, 6vw, 26px); }
  html.ink .obAsk .q-l .qq { font-size: clamp(19px, 5.2vw, 22px); }
  html.ink .obAsk .qcard .ups,
html.ink .obAsk .qcard .ups.pick { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  html.ink .obAsk .qcard .ups.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.ink .obAsk .qcard .up { min-height: 64px; padding: 10px 14px; border-radius: 16px; font-size: 22px; }
  html.ink .obAsk .fit-b .up { font-size: 19px; line-height: 1.15; }
  html.ink .obAsk .fit-c .up { font-size: 18px; line-height: 1.15; }
  html.ink .obAsk .qcard .up .shape,
html.ink .obAsk .qcard .up .shape svg { width: 1.3em; height: 1.3em; }
  html.ink .obAsk .qcard .up.upg { min-height: 0; }
}
/* A laptop window under 521 tall: the question on the left, the answers
   filling the right. */
@media (orientation: landscape) and (max-height: 520px) {
  html.ink .qwrap.obAsk { box-sizing: border-box; padding: 8px 16px; }
  html.ink .obAsk .qcard {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    grid-template-rows: auto 1fr;
    gap: 8px 14px;
    width: 100%;
    max-width: none;
    min-height: 100%;
    padding: 12px 14px;
  }
  html.ink .obAsk .qtag { grid-column: 1; grid-row: 1; justify-self: start; }
  html.ink .obAsk .qhead { grid-column: 1; grid-row: 2; align-self: start; }
  html.ink .obAsk .qq { margin: 0; font-size: 22px; line-height: 1.12; }
  html.ink .obAsk .q-m .qq { font-size: 19px; }
  html.ink .obAsk .q-l .qq { font-size: 18px; line-height: 1.15; }
  html.ink .obAsk .qimg { max-height: 30vh; }
  html.ink .obAsk .qcard .ups { grid-column: 2; grid-row: 1 / span 2; margin: 0; grid-auto-rows: 1fr; gap: 8px; }
  html.ink .obAsk .qcard .ups.pick { grid-template-columns: minmax(0, 1fr); }
  html.ink .obAsk .ups:not(.pick) > .up:nth-child(3):last-child { grid-column: 1 / -1; }
  html.ink .obAsk .qcard .up { min-height: 52px; padding: 8px 12px; border-radius: 14px; font-size: 20px; }
  html.ink .obAsk .fit-b .up { font-size: 18px; line-height: 1.15; }
  html.ink .obAsk .fit-c .up { font-size: 16px; line-height: 1.15; }
  html.ink .obAsk .qcard .up .shape,
html.ink .obAsk .qcard .up .shape svg { width: 1.3em; height: 1.3em; }
  html.ink .obAsk .qcard .up.upg { min-height: 0; }
}
/* ── Down ─────────────────────────────────────────────────────────────── */
/* Out of the game until a right answer: a tomato screen in place of the
   arena. The question card sits on top of this. */
html.ink #obDown {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 32px;
  box-sizing: border-box;
  background: var(--ob-tomato);
  color: var(--ob-ink);
  font-family: var(--ob-text);
  text-align: left;
}
html.ink #obDown[hidden] { display: none; }
html.ink #obDown .in {
  width: min(100%, 760px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
html.ink #obDown .eyebrow { margin: 0; font-size: 14px; color: var(--ob-ink); }
html.ink #obDown h2 {
  margin: 0;
  font-family: var(--ob-display);
  font-weight: 800;
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 0.95;
  letter-spacing: -.01em;
  font-variation-settings: normal;
  color: var(--ob-ink);
  text-shadow: none;
  overflow-wrap: anywhere;
}
html.ink #obDown p { margin: 0; font-size: 20px; line-height: 1.45; color: var(--ob-ink); }
@media (prefers-reduced-motion: reduce) {
  html.ink .obPop { transition: none !important; }
  html.ink .obNum > span { animation-name: obNumStill; }
}
/* ── The inked look ───────────────────────────────────────────────────── */
/* With the arena inked (multiplayer.js's inkedLook, the default), the
   cards over it are the projector's: Boss Battle 2.0's HudCard (white, a
   3px ink line, square-ish corners, uppercase labels, Bricolage numbers)
   and HpBar (a chunky segmented bar, the lost chunk shown in sunshine
   before it drains). Scoped to data-look="inked", so ?look=blocks keeps
   the cards it always had. */
html.ink[data-look="inked"] #obHud,
html.ink[data-look="inked"] #hud .tl,
html.ink[data-look="inked"] #banner {
  background: var(--ob-card);
  border: 3px solid var(--ob-ink);
  border-radius: 10px;
}
html.ink[data-look="inked"] #obHud {
  width: 248px;
  padding: 12px 14px 12px;
  font: 400 14px/1.3 var(--ob-text);
}
html.ink[data-look="inked"] #obHud .lbl {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ob-muted);
}
html.ink[data-look="inked"] #obHud .sec { border-bottom: 2px solid var(--ob-ink); }
html.ink[data-look="inked"] #obHud .num { font-size: 22px; letter-spacing: -.01em; }
html.ink[data-look="inked"] #obHud .time .num { font-size: 28px; }
html.ink[data-look="inked"] #obHud .time.low .num { color: var(--ob-tomato); -webkit-text-stroke: 1px var(--ob-ink); }
html.ink[data-look="inked"] #obHud .pips { gap: 5px; }
html.ink[data-look="inked"] #obHud .pips i {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ob-ink);
  border-radius: 3px;
  background: #3A342E;
}
html.ink[data-look="inked"] #obHud .pips i.on { background: var(--ob-lime); box-shadow: inset 0 3px 0 #C9F2B5, inset 0 -3px 0 #1E7A3C; }
html.ink[data-look="inked"] #obHud li.me { border-radius: 6px; box-shadow: inset 0 0 0 2px var(--ob-ink); }
html.ink[data-look="inked"] #obHud li .num { font-size: 20px; }
html.ink[data-look="inked"] #obHud.hit { outline-color: var(--ob-sun); }
/* The boss's health: HpBar. A dark track with a paper rim, ten segments,
   tomato with a lit top and a dark bottom; the chunk just lost waits in
   sunshine, then drains. */
html.ink[data-look="inked"] #obHud .meter {
  position: relative;
  height: 22px;
  margin-top: 8px;
  border: 3px solid var(--ob-ink);
  border-radius: 6px;
  background: #3A342E;
  box-shadow: 0 0 0 3px var(--ob-paper);
  overflow: hidden;
}
html.ink[data-look="inked"] #obHud .meter > span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: var(--ob-tomato);
  box-shadow: inset 0 4px 0 #FF8A73, inset 0 -4px 0 #B23A28;
}
html.ink[data-look="inked"] #obHud .meter > .trail { background: var(--ob-sun); box-shadow: none; }
html.ink[data-look="inked"] #obHud .meter > .tick {
  width: 3px;
  margin-left: -1.5px;
  background: var(--ob-ink);
  box-shadow: none;
  opacity: 0.55;
}
/* The blocks look draws no trail and no ticks. */
html.ink:not([data-look="inked"]) #obHud .meter > .trail,
html.ink:not([data-look="inked"]) #obHud .meter > .tick { display: none; }
html.ink[data-look="inked"] #hud .tl { padding: 8px 12px; }
html.ink[data-look="inked"] #hud .bricks { font-weight: 600; }
html.ink[data-look="inked"] #hud .wsel.on { box-shadow: inset 0 0 0 2px var(--ob-ink); }
html.ink[data-look="inked"] .pbtn {
  border: 3px solid var(--ob-ink);
  border-radius: 8px;
  background: var(--ob-card);
}
/* Banners: a HudCard with a hard shadow, Bricolage, popping in. */
html.ink[data-look="inked"] #banner {
  /* Up out of the line of fire: at Zombio's 38% it sits just over the
     crosshair, on whatever a boss is doing when it is announced. */
  top: 19%;
  /* That is the corner card's band, so over it (the card's inline 30),
     never under it; still under every card that takes a click.
     multiplayer.js moves it out of the stage for this, so it is fixed to
     the window, as the stage is, rather than placed in it. */
  position: fixed;
  z-index: 31;
  pointer-events: none;
  padding: 12px 26px 14px;
  box-shadow: 5px 5px 0 var(--ob-ink);
}
/* A narrow window: in the middle of the room the corner card leaves (it
   is 248px wide, 12px in), so the two sit side by side. Up to 1040 wide,
   since the longest banner, the Frog King's arrival, still reaches the
   card's edge at 1000. Narrower than 641 there is no such room, so the
   banner goes under the card instead, just below the crosshair. */
@media (max-width: 1040px) and (min-width: 641px) {
  html.ink[data-look="inked"] #banner {
    left: calc((100% - 272px) / 2);
    max-width: calc(100% - 292px);
  }
}
@media (max-width: 640px) {
  html.ink[data-look="inked"] #banner { top: 58%; }
}
html.ink[data-look="inked"] #banner.on { animation: obBannerIn 260ms steps(4) both; }
@keyframes obBannerIn {
  0% { transform: translateX(-50%) scale(0.6); }
  60% { transform: translateX(-50%) scale(1.06); }
  100% { transform: translateX(-50%) scale(1); }
}
/* The crosshair: a paper plus with an ink line, like the sketch's. */
html.ink[data-look="inked"] #cross::before,
html.ink[data-look="inked"] #cross::after {
  background: var(--ob-paper);
  box-shadow: 0 0 0 2px var(--ob-ink);
}
html.ink[data-look="inked"] #cross.hit::before,
html.ink[data-look="inked"] #cross.hit::after,
html.ink[data-look="inked"] #cross.lock::before,
html.ink[data-look="inked"] #cross.lock::after { background: var(--ob-tomato); }
/* The question card: the same HudCard line, a hard shadow, and the
   answers as the app draws them. */
html.ink[data-look="inked"] .qcard {
  background: var(--ob-card);
  border: 3px solid var(--ob-ink);
  border-radius: 14px;
  box-shadow: 6px 6px 0 var(--ob-ink);
  animation: obCardIn 220ms steps(3) both;
}
html.ink[data-look="inked"] .qtag { border-width: 2px; }
html.ink[data-look="inked"] .qcard .up { border-width: 3px; border-radius: 12px; box-shadow: 4px 4px 0 var(--ob-ink); }
html.ink[data-look="inked"] .qcard .up:active { box-shadow: 0 0 0 var(--ob-ink); transform: translate(4px, 4px); }
html.ink[data-look="inked"] .qcard .up .shape svg { filter: drop-shadow(0 0 0 var(--ob-ink)); }
html.ink[data-look="inked"] .qcard .up.upg { background: var(--ob-card); }
@keyframes obCardIn {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
/* Numbers: Boss Battle's pops, bigger and with a thicker stroke. */
html.ink[data-look="inked"] .obNum > span {
  font-size: clamp(40px, 3.6vw, 60px);
  -webkit-text-stroke-width: 7px;
}
html.ink[data-look="inked"] .obNum--big > span { font-size: clamp(56px, 5vw, 84px); -webkit-text-stroke-width: 8px; }
html.ink[data-look="inked"] .obPop { font-size: 44px; -webkit-text-stroke-width: 7px; }
/* Down: the tomato screen, with the heading in a card so it reads as the
   same family as everything else. */
html.ink[data-look="inked"] #obDown .in {
  padding: 26px 30px 30px;
  background: var(--ob-card);
  border: 3px solid var(--ob-ink);
  border-radius: 14px;
  box-shadow: 8px 8px 0 var(--ob-ink);
  width: min(100%, 680px);
  box-sizing: border-box;
}
html.ink[data-look="inked"] #obDown .eyebrow { color: var(--ob-tomato-ink); }
html.ink[data-look="inked"] #obDown p { color: var(--ob-body); }
/* The end of the match: the final standings as a big card in the middle. */
html.ink[data-look="inked"] #obHud.final {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  transform: translate(-50%, -50%);
  width: min(92vw, 440px);
  padding: 20px 22px 18px;
  box-shadow: 8px 8px 0 var(--ob-ink);
  z-index: 40 !important;
}
html.ink[data-look="inked"] #obHud.final > .lbl {
  font-family: var(--ob-display);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -.01em;
  text-transform: none;
  color: var(--ob-ink);
  margin-bottom: 6px;
}
html.ink[data-look="inked"] #obHud.final li { padding: 8px 6px; }
html.ink[data-look="inked"] #obHud.final li .nm { font-size: 18px; font-weight: 600; }
html.ink[data-look="inked"] #obHud.final li .rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--ob-ink);
  border-radius: 6px;
  background: var(--ob-paper-2);
  font-family: var(--ob-display);
  font-weight: 800;
  color: var(--ob-ink);
}
html.ink[data-look="inked"] #obHud.final li:nth-child(1) .rank { background: var(--ob-sun); }
html.ink[data-look="inked"] #obHud.final li:nth-child(2) .rank { background: #E6E0D4; }
html.ink[data-look="inked"] #obHud.final li:nth-child(3) .rank { background: var(--ob-orange, #FF9A3C); }
html.ink[data-look="inked"] #obHud.final li .sub { font-size: 14px; }
html.ink[data-look="inked"] #obHud.final li .sub .num { font-size: 16px; }
html.ink[data-look="inked"] #obHud.final li.me { padding-left: 8px; padding-right: 8px; }
html.ink[data-look="inked"] #obHud.final li.me .nm { font-weight: 700; }
/* Between the top seven and a student who came further down. */
html.ink[data-look="inked"] #obHud.final li.gap {
  justify-content: center;
  padding: 0 6px 4px;
  font-family: var(--ob-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1;
  color: var(--ob-ink);
}
html.ink[data-look="inked"] #obHud.final li.gap + li { border-top-color: transparent; }
html.ink[data-look="inked"] #obHud.final .eyebrow {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ob-muted);
}
/* Behind it, the arena held still under a scrim, the corner cards and
   the crosshair put away, and a pop of palette squares from the middle
   (none under reduced motion: multiplayer.js does not make them). */
html.ink[data-look="inked"].obEnded #hud,
html.ink[data-look="inked"].obEnded .pbtn,
html.ink[data-look="inked"].obEnded #cross,
html.ink[data-look="inked"].obEnded #banner,
html.ink[data-look="inked"].obEnded #obFx { visibility: hidden; }
html.ink #obEnd {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: var(--ob-scrim);
  pointer-events: none;
  overflow: hidden;
}
html.ink #obEnd i {
  position: absolute;
  left: 50%;
  top: 46%;
  border: 2px solid var(--ob-ink);
  border-radius: 2px;
  opacity: 0;
  animation: obEndPop 1100ms steps(11) both;
}
@keyframes obEndPop {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
  35% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(calc(var(--r) * 0.4)); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx) * 1.25), calc(-50% + var(--dy) + 240px)) rotate(var(--r)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  /* #banner.on, or the pop above outranks this and still plays */
  html.ink[data-look="inked"] #banner.on,
html.ink[data-look="inked"] .qcard { animation: none; }
}

