/* Joined by scripts/sync-nav.mjs (scripts/lib/asset-bundles.mjs) from /css/fonts.css, /css/base.css, /css/riso.css, /css/header.css, /css/footer.css, /css/tabs/picture-reveal.css, /css/search.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/base.css */
/* Riso paper + spot inks */
:root {
  --paper:        #e6f5ee;
  --paper-white:  #f4faf6;
  --ink:          #1a3a2a;
  --ink-dim:      #263b2f;
  --ink-faint:    #557063;

  /* Foreground for text sitting ON a brand fill (a filled button), which
     is a different job from --ink: the fill does not follow the page ground,
     so it needs its own pairing in every palette. */
  --on-brand:     #1a3a2a;
  --riso-pink:        #ff7eb6;
  --riso-pink-deep:   #e3589c;
  --riso-green:       #2db876;
  --riso-green-deep:  #1a8a55;
  --riso-coral:       #ff8a6b;
  --riso-yellow:      #f0c33d;

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

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

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  min-height: 100vh;
}

/* Per-element grain.
   The site-wide paper grain is applied to topbar, footer, and `main`
   (the wrapper used on every tab page). The home page's cell stage is
   NOT a `main` -- it's a <section class="stage"> -- so the grain skips
   the cell canvas entirely, keeping the candy plastic look untouched. */
main {
  position: relative;
  z-index: 1;
}
main::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("/img/grain.svg");
  background-repeat: repeat;
  mix-blend-mode: multiply;
  opacity: 0.16;
}
main > * { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
::selection { background: var(--riso-pink); color: var(--paper); }

img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

/* ── First-paint paper settle ─────────────────────────────────
   Light entrance for the page: main settles in, like a freshly-
   printed sheet landing. The illos do a separate, more detailed riso
   print-pass inside their own SVGs.
   Short and from most of the way there on purpose: it used to fade from
   nothing over half a second, which kept the page's main heading faint
   (and its largest paint late) on every load. Now the text is readable
   in the first frame.
   Opacity-only on purpose: a transform on <main> would turn it into
   a containing block for fixed descendants and break the apps-page
   lightbox during the animation window. */
@keyframes paper-settle {
  from { opacity: 0.85; }
  to   { opacity: 1; }
}
main { animation: paper-settle 0.15s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
}

/* ── Cursor push on the illos ─────────────────────────────────
   Cursor-driven exaggeration of riso misregistration: as the mouse
   moves over an inlined illo, the pink colour layer drifts toward the
   cursor and the green layer drifts away. The ink outline stays put
   so the shape holds together.
   /js/illos.js sets --px / --py on the <svg> from -1 to 1.
   Mouse-only (no transform on touch). */
svg.illo .riso-pink,
svg.illo .riso-green {
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  svg.illo .riso-pink {
    transform: translate(calc(var(--px, 0) * 6px), calc(var(--py, 0) * 6px));
  }
  svg.illo .riso-green {
    transform: translate(calc(var(--px, 0) * -6px), calc(var(--py, 0) * -6px));
  }
}
@media (prefers-reduced-motion: reduce) {
  svg.illo .riso-pink,
  svg.illo .riso-green {
    transform: none !important;
    transition: none !important;
  }
}

/* ── Selection: riso-misregistered swipe ─────────────────────── */
::selection {
  background: var(--riso-pink);
  color: var(--ink);
  text-shadow: 1px 0.5px 0 var(--riso-green);
}

/* ── Cross-document View Transitions: mitosis tab swap ───────
   Chrome 126+ uses this for cross-page navigations (when same-origin
   and same View Transition root). The outgoing main pinches and
   slides one way; the new main buds in from the other side. Falls
   back to instant nav in browsers without support. */
@view-transition { navigation: auto; }
main { view-transition-name: page-content; }
::view-transition-old(page-content) {
  animation: 0.42s cubic-bezier(0.4, 0, 0.6, 1) both bb-mitosis-out;
}
::view-transition-new(page-content) {
  animation: 0.48s cubic-bezier(0.2, 0.7, 0.2, 1) both bb-mitosis-in;
}
@keyframes bb-mitosis-out {
  0%   { transform: scale(1) translateX(0); opacity: 1; }
  30%  { transform: scaleX(1.06) scaleY(0.96) translateX(0); }
  100% { transform: scaleX(0.55) scaleY(0.86) translateX(-22%); opacity: 0; }
}
@keyframes bb-mitosis-in {
  0%   { transform: scaleX(0.55) scaleY(0.86) translateX(22%); opacity: 0; }
  100% { transform: scale(1) translateX(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(page-content),
  ::view-transition-new(page-content) { animation: none; }
}

/* ── Etymology tooltip ──────────────────────────────────────── */
/* Terms wrapped by /js/etymology.js with the Greek/Latin roots in
   data-roots. Hover -> tooltip; the dotted underline signals it's
   interactive without shouting. */
.bio-term {
  border-bottom: 1px dotted var(--riso-pink-deep);
  cursor: help;
  position: relative;
}
.bio-term:hover::after,
.bio-term:focus::after {
  content: attr(data-roots);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper-white);
  padding: 7px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: nowrap;
  z-index: 200;
  pointer-events: none;
  box-shadow: 2px 2px 0 var(--riso-pink);
}
.bio-term:hover::before,
.bio-term:focus::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ink);
  z-index: 200;
  pointer-events: none;
}

/* ── Ribosome scroll marker (every page with a <main>, injected by JS) ─ */
.scroll-ribosome {
  position: fixed;
  right: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--riso-pink);
  z-index: 80;
  pointer-events: none;
  transition: top 0.08s linear;
}
.scroll-ribosome::after {
  /* Halftone dot pattern inside the ribosome */
  content: "";
  position: absolute; inset: 2px;
  border-radius: 50%;
  background-image: radial-gradient(var(--riso-pink) 1px, transparent 1.6px);
  background-size: 4px 4px;
}
@media (max-width: 760px) {
  .scroll-ribosome { display: none; }
}

/* ── Print stylesheet ────────────────────────────────────────
   Strip the riso furniture so handouts come out as plain readable
   text. Everything interactive disappears; links get their URL
   appended after them for paper trail. */
@media print {
  .topbar, footer,
  .joke-strip-wrap, .roots-strip-wrap, .joke-deck, .joke-actions,
  .joke-card-wrap, .staffroom-download, .roots-download,
  .notfound-actions, .stage, .scroll-ribosome,
  iframe, video, audio, .video-section { display: none !important; }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  body, main {
    background: white !important;
    color: black !important;
    padding: 0 !important;
  }
  main::after { display: none !important; }
  h1, h2, h3, h4 { color: black !important; }
  em { color: #333 !important; font-style: italic; }
  a { color: black; text-decoration: underline; }
  a[href^="http"]::after,
  a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
  a[href^="/"]::after { content: ""; }
  .bio-term { border-bottom: none; }
  .post-card, .article-body, .legal-page { break-inside: avoid; }
}

/* ── Accessibility: visible focus rings ──────────────────────
   Keyboard users need a clear hit-state. :focus-visible fires for
   keyboard nav but not mouse clicks, so visual chrome stays clean. */
:focus-visible {
  outline: 2px solid var(--riso-pink-deep);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Buttons / pills already have their own rounding -- tighter offset */
button:focus-visible,
.tab:focus-visible,
.cb:focus-visible, .lchip:focus-visible, .tc:focus-visible,
.joke-pill:focus-visible, .joke-deal:focus-visible,
.roots-strip-deal:focus-visible, .joke-strip-deal:focus-visible {
  outline-offset: 2px;
}

/* ── Skip-to-content link ────────────────────────────────────
   Always the first focusable element on the page. Visually hidden
   until a keyboard user tabs into it, then it slides into view. */
.skip-link {
  position: absolute;
  top: 8px; left: 8px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper-white);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--riso-pink);
  z-index: 1000;
  transform: translateY(-200%);
  transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.skip-link:focus {
  transform: translateY(0);
  outline: none;
}

/* Visually hidden but still announced by screen readers and seen by
   crawlers. Used for semantic headings that we don't want to render. */
.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;
}

/* ── Mobile niceties ─────────────────────────────────────────
   Drop the iOS Safari gray tap-flash, replace it with a quick
   opacity dim on press. Subtler, on-brand, less startling. */
* { -webkit-tap-highlight-color: transparent; }
@media (hover: none) {
  a:active, button:active {
    opacity: 0.65;
    transition: opacity 0.05s;
  }
}

/* ── Konami easter egg flash (home page) ────────────────────
   Small overlay confirming the sequence registered. Pairs with
   the cell explode-and-reassemble triggered by /js/konami.js.  */
.konami-flash {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(8px);
  z-index: 200;
  padding: 14px 22px;
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--riso-pink);
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2,0.7,0.2,1);
  pointer-events: none;
}
.konami-flash.is-in { opacity: 1; transform: translateX(-50%) translateY(0); }
.konami-flash.is-out { opacity: 0; transform: translateX(-50%) translateY(-8px); }
.konami-seq {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.konami-note {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--riso-pink);
}

/* Page headings lead with what the page is, then the line in Mr Bradford's
   voice. The descriptor sets small so the italic stays the hero and the
   header does not grow a third and fourth line of display type. */
h1 .h1-what {
  display: block;
  font-family: var(--font-display);
  /* This line is the page's actual title - what it is, and what a search
     result shows. At 0.36em it read as a kicker above the italic rather
     than as the heading. */
  font-size: 0.58em;
  font-style: normal;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 0.28em;
  text-wrap: balance;
}
@media (max-width: 700px) {
  h1 .h1-what { font-size: 0.66em; margin-bottom: 0.3em; }
}

/* /css/riso.css */
/* ===== RISO UTILITIES =====
   Spot-color helpers, halftone patterns, misregistration text,
   and the standard "riso card" surface with grain overlay.
*/

/* Misregistration, pink text with green ghost behind */
.riso-misreg {
  color: var(--riso-pink);
  text-shadow: 1.5px 1px 0 var(--riso-green-deep);
}
.riso-misreg-green {
  color: var(--riso-green);
  text-shadow: -1px 1.5px 0 var(--riso-pink);
}

/* Halftone surfaces */
.halftone-pink {
  background-image: radial-gradient(var(--riso-pink) 1.4px, transparent 1.8px);
  background-size: 5px 5px;
}
.halftone-pink-dense {
  background-image: radial-gradient(var(--riso-pink) 2px, transparent 2.4px);
  background-size: 4px 4px;
}
.halftone-green {
  background-image: radial-gradient(var(--riso-green) 1.4px, transparent 1.8px);
  background-size: 5px 5px;
}

/* Card surface, white-ish paper, ink outline, grain overlay */
.riso-card {
  position: relative;
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
}
.riso-card::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("/img/grain.svg");
  background-repeat: repeat;
  mix-blend-mode: multiply;
  opacity: 0.40;
  pointer-events: none;
  border-radius: inherit;
}
.riso-card > * { position: relative; z-index: 1; }

/* Pink/green stamp pill, for chips and tags */
.riso-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--riso-pink);
}
.riso-pill.green { box-shadow: 2px 2px 0 var(--riso-green); }

/* Hand-drawn-feeling underline for active nav, etc. */
.riso-underline {
  position: relative;
}
.riso-underline::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px; bottom: -4px;
  height: 3px;
  background: var(--riso-pink);
  box-shadow: 1.5px 1.5px 0 var(--riso-green);
  border-radius: 2px;
}

/* /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/footer.css */
footer {
  border-top: 1.5px solid var(--ink);
  margin-top: 120px;
  padding: 70px 5vw 40px;
  background: var(--paper);
  position: relative;
  overflow: hidden;
}
footer::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: url("/img/grain.svg");
  background-repeat: repeat;
  mix-blend-mode: multiply;
  opacity: 0.32;
}
footer > * { position: relative; z-index: 1; }
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 60px;
  max-width: 1320px; margin: 0 auto;
}
.foot-grid h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 18px;
}
.foot-grid p { color: var(--ink-dim); line-height: 1.6; max-width: 42ch; }
.foot-grid .big {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 32px;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 14px;
  max-width: 22ch;
}
.foot-grid .big em { color: var(--riso-pink); }
.foot-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-grid ul a { color: var(--ink-dim); transition: color 0.18s; }
.foot-grid ul a:hover { color: var(--riso-pink); }

/* Every section of the site, as plain links (scripts/sync-nav.mjs). */
.foot-links {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 28px 28px;
  max-width: 1320px;
  margin: 50px auto 0;
  padding-top: 30px;
  border-top: 1.5px solid var(--line);
}
.foot-links h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 12px;
}
.foot-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.foot-links a { color: var(--ink-dim); font-size: 14px; line-height: 1.35; transition: color 0.18s; }
.foot-links a:hover { color: var(--riso-pink); }
@media (max-width: 1100px) { .foot-links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .foot-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.foot-bottom {
  max-width: 1320px;
  margin: 50px auto 0;
  padding-top: 24px;
  border-top: 1.5px solid var(--line);
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

.foot-legal {
  max-width: 1320px;
  margin: 14px auto 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}
.foot-legal a {
  color: var(--ink-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.foot-legal a:hover { color: var(--riso-pink); }

/* The maker's credit: a colophon line and a two-ink stamp, as on splycr.com. */
.foot-credit {
  max-width: 1320px;
  margin: 14px auto 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-dim);
}
.foot-credit a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.foot-credit a:hover { color: var(--riso-pink); }
.foot-credit .foot-brand { display: inline-flex; align-items: center; gap: 7px; vertical-align: middle; text-decoration: none; }
.foot-credit .foot-brand img { display: block; width: 26px; height: 26px; }
.foot-credit .foot-word { font-weight: 800; font-size: 18px; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.foot-credit .foot-stamp { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.foot-credit .foot-stamp span {
  display: inline-block; padding: 3px 11px 4px;
  border: 1.5px solid var(--green-deep, #0E6B4A); border-radius: 999px;
  box-shadow: 2px 2px 0 var(--riso-pink);
  font: 600 12px/1.2 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--green-deep, #0E6B4A);
}
.foot-credit .foot-stamp:hover span, .foot-credit .foot-stamp:focus-visible span { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--riso-pink); }
@media print { .foot-credit { display: none; } }

.visitor-counts {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.visitor-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  box-shadow: 2px 2px 0 var(--riso-pink);
  transition: all 0.15s;
}
.visitor-count::before {
  content: attr(data-count);
  font-weight: 600;
  color: var(--riso-pink);
  min-width: 3ch;
}
.visitor-count:hover {
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 var(--riso-green);
}
/* The pills after the first ("all time") in green for variety */
.visitor-count + .visitor-count {
  box-shadow: 2px 2px 0 var(--riso-green);
}
.visitor-count + .visitor-count::before {
  color: var(--riso-green-deep);
}
.visitor-count + .visitor-count:hover {
  box-shadow: 3px 3px 0 var(--riso-pink);
}
/* Middle pill ("back again this month") in coral, after the rules above so
   it wins over the green. The number is coral deepened toward the ink, so
   it reads on the pill in light and dark alike. Hidden until js/count.js
   has a figure to show (and not before November 2026). */
.visitor-count.visitor-count-returning {
  box-shadow: 2px 2px 0 var(--riso-coral);
}
.visitor-count.visitor-count-returning::before {
  color: color-mix(in srgb, var(--riso-coral) 62%, var(--ink));
}
.visitor-count.visitor-count-returning:hover {
  box-shadow: 3px 3px 0 var(--riso-green);
}
.visitor-count[hidden] { display: none; }

@media (max-width: 760px) {
  footer { margin-top: 60px; padding: 50px 5vw 30px; }
  .foot-grid { grid-template-columns: 1fr; gap: 36px; }
  .foot-grid .big { font-size: 26px; }
  .foot-bottom { flex-direction: column; gap: 8px; margin-top: 36px; }
  .visitor-count { font-size: 12px; padding: 5px 12px; }
}

/* ── The calm look (a preview: ?look=calm, see css/header.css) ──
   The footer's small grey mono labels become the readable sans, at 15px
   and up, in ink or --calm-dim; the visitor counts lose their pills. */
:root[data-look="calm"] footer { border-top: 1px solid var(--calm-line); font-family: var(--calm-sans); }
:root[data-look="calm"] footer::after { opacity: 0.14; }
:root[data-look="calm"] .foot-grid h4,
:root[data-look="calm"] .foot-links h4 { font-family: var(--calm-sans); font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink); }
:root[data-look="calm"] .foot-grid p { font-size: 17px; line-height: 1.55; color: var(--calm-dim); }
:root[data-look="calm"] .foot-grid .big { font-size: 32px; color: var(--ink); }
:root[data-look="calm"] .foot-grid .big em { color: var(--calm-pink); }
:root[data-look="calm"] .foot-grid ul a,
:root[data-look="calm"] .foot-links a { font-size: 16px; color: var(--calm-dim); }
:root[data-look="calm"] .foot-grid ul a:hover,
:root[data-look="calm"] .foot-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--riso-pink-deep); text-underline-offset: 3px; }
:root[data-look="calm"] footer a:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: 2px; }
:root[data-look="calm"] .foot-links { gap: 28px 32px; border-top: 1px solid var(--calm-line); }
:root[data-look="calm"] .foot-links ul { gap: 9px; }
:root[data-look="calm"] .foot-bottom { border-top: 1px solid var(--calm-line); font-family: var(--calm-sans); font-size: 15px; letter-spacing: 0; color: var(--calm-dim); align-items: center; gap: 12px; }
:root[data-look="calm"] .foot-legal { font-family: var(--calm-sans); font-size: 15px; letter-spacing: 0; color: var(--calm-dim); }
:root[data-look="calm"] .foot-legal a { color: var(--ink); }
:root[data-look="calm"] .visitor-counts { gap: 4px 18px; }
:root[data-look="calm"] .visitor-count { padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; font-family: var(--calm-sans); font-size: 15px; letter-spacing: 0; color: var(--calm-dim); }
:root[data-look="calm"] .visitor-count::before,
:root[data-look="calm"] .visitor-count + .visitor-count::before,
:root[data-look="calm"] .visitor-count.visitor-count-returning::before { color: var(--ink); font-weight: 700; min-width: 0; }
:root[data-look="calm"] .visitor-count:hover { transform: none; box-shadow: none; }
/* The newsletter box in the footer (teachers) */
:root[data-look="calm"] footer .newsletter-card.compact { margin-top: 30px; }
:root[data-look="calm"] footer .newsletter-card.compact .nl-title,
:root[data-look="calm"] footer .newsletter-card.compact .nl-title em { font-family: var(--calm-sans); font-size: 16px; font-weight: 700; font-style: normal; letter-spacing: 0; text-transform: none; color: var(--ink); }
:root[data-look="calm"] footer .newsletter-card.compact .nl-sub { font-family: var(--calm-sans); font-size: 16px; line-height: 1.5; letter-spacing: 0; color: var(--calm-dim); }
:root[data-look="calm"] footer .newsletter-card.compact .nl-sub em { font-style: normal; font-weight: 700; color: var(--ink); }
:root[data-look="calm"] footer .newsletter-form input[type="email"] { font-family: var(--calm-sans); font-size: 16px; padding: 10px 12px; border-width: 1px; border-color: var(--calm-dim); }
:root[data-look="calm"] footer .newsletter-form input[type="email"]::placeholder { color: var(--calm-dim); }
:root[data-look="calm"] footer .newsletter-form button { font-family: var(--calm-sans); font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; padding: 10px 16px; border-radius: 9px; box-shadow: none; }
:root[data-look="calm"] footer .newsletter-form button::first-letter { text-transform: uppercase; }
:root[data-look="calm"] footer .newsletter-form button:hover { transform: none; filter: none; box-shadow: none; background: color-mix(in srgb, var(--ink) 86%, var(--paper-white)); }
:root[data-look="calm"] footer .newsletter-card.compact .nl-consent,
:root[data-look="calm"] footer .newsletter-card.compact .newsletter-msg { font-family: var(--calm-sans); font-size: 15px; letter-spacing: 0; color: var(--calm-dim); }

/* /css/tabs/picture-reveal.css */
/* ── Picture Reveal builder ─────────────────────────────────────── */
.pr-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 35px 5vw 60px;
}

/* Head, modeled on .resources-head */
.pr-head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 50px;
  align-items: end;
  margin-bottom: 50px;
}
.pr-head .illo { width: 100%; max-width: 280px; aspect-ratio: 1 / 1; }
.pr-head .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  display: inline-flex; gap: 10px; align-items: center;
  margin-bottom: 18px;
}
.pr-head .meta .pin {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--riso-green);
  box-shadow: 2px 2px 0 var(--riso-pink);
}
.pr-head h1 {
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -.01em;
  font-weight: 600;
  max-width: 22ch;
  text-wrap: balance;
  margin-bottom: 16px;
}
.pr-head h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--riso-green);
  text-shadow: 2px 1px 0 var(--riso-pink);
}
.pr-head .lede {
  font-size: 17px;
  color: var(--ink-dim);
  max-width: 56ch;
  line-height: 1.55;
}
.pr-head .head-cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 18px;
  padding: 10px 18px;
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--riso-pink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.pr-head .head-cta:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--riso-green);
}
.pr-head .head-cta svg { width: 14px; height: 14px; }

/* Stock packs */
.pr-stock {
  margin-bottom: 40px;
}
.pr-stock .pr-step-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.pr-stock .pr-step-num {
  color: var(--riso-pink-deep);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.14em;
}
.pr-stock .pr-step-title {
  font-size: 24px;
}
.pr-stock-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.pr-stock-card {
  display: flex;
  flex-direction: column;
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  box-shadow: 3px 3px 0 var(--riso-pink);
  transition: transform 0.15s, box-shadow 0.15s;
  font: inherit;
  color: var(--ink);
}
.pr-stock-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--riso-green);
}
.pr-stock-card:nth-child(2n) { box-shadow: 3px 3px 0 var(--riso-green); }
.pr-stock-card:nth-child(2n):hover { box-shadow: 5px 5px 0 var(--riso-pink); }
.pr-stock-thumb {
  aspect-ratio: 4 / 3;
  background: var(--paper);
  border-bottom: 1.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pr-stock-thumb svg {
  width: 100%;
  height: 100%;
  display: block;
}
.pr-stock-info {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pr-stock-theme {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--riso-green-deep);
}
.pr-stock-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.pr-stock-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}

@media (max-width: 900px) {
  .pr-stock-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .pr-stock-grid { grid-template-columns: 1fr; }
}

/* Step blocks */
.pr-step {
  margin-bottom: 36px;
}
.pr-step-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.pr-step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.pr-step-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.pr-step-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}

/* Card container shared by inputs */
.pr-card {
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 3px 3px 0 var(--riso-green);
  position: relative;
}

/* CSV drag strip, compact */
.pr-csv-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1.5px dashed var(--riso-pink-deep);
  border-radius: 12px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.pr-csv-strip:hover, .pr-csv-strip.active {
  background: rgba(255, 126, 182, 0.08);
  border-color: var(--riso-green);
}
.pr-csv-strip .csv-copy {
  display: flex; align-items: center; gap: 12px;
}
.pr-csv-strip .csv-copy .ico { color: var(--ink); flex: 0 0 auto; }
.pr-csv-strip .csv-copy .ico svg { width: 22px; height: 22px; display: block; }
.pr-csv-strip .csv-copy .lines { line-height: 1.25; }
.pr-csv-strip .csv-copy .lines b {
  display: block;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
}
.pr-csv-strip .csv-copy .lines small {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
}
.pr-csv-strip .csv-pick {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  box-shadow: 1.5px 1.5px 0 var(--riso-pink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.pr-csv-strip .csv-pick:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2.5px 2.5px 0 var(--riso-green);
}

/* Question table */
.pr-table-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 4px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}
.pr-table-meta .count.full { color: var(--riso-pink-deep); }

.pr-table {
  width: 100%;
  border-collapse: collapse;
}
.pr-table thead th {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  font-weight: 500;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line, rgba(26,58,42,0.12));
}
.pr-table thead th.num-col { width: 36px; }
.pr-table thead th.del-col { width: 36px; }
.pr-table tbody tr { border-bottom: 1px dotted rgba(26,58,42,0.10); }
.pr-table tbody tr:last-child { border-bottom: none; }
.pr-table td {
  padding: 6px 6px;
  vertical-align: middle;
}
.pr-table td.row-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  text-align: center;
  user-select: none;
}
.pr-table input[type="text"] {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 6px;
  outline: none;
  transition: background 0.15s;
}
.pr-table input[type="text"]:focus {
  background: rgba(45, 184, 118, 0.10);
  box-shadow: inset 0 0 0 1.5px var(--riso-green);
}
.pr-table input[type="text"]::placeholder {
  color: var(--ink-faint);
  font-style: italic;
}
.pr-row-del {
  border: none;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.pr-row-del:hover { color: var(--riso-pink-deep); background: rgba(255,126,182,0.10); }
.pr-row-del svg { width: 14px; height: 14px; display: block; }

.pr-add-row {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 1.5px 1.5px 0 var(--riso-pink);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.pr-add-row:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2.5px 2.5px 0 var(--riso-green);
}
.pr-add-row[hidden] { display: none; }
.pr-add-row svg { width: 12px; height: 12px; }

/* Image picker */
.pr-image-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 18px;
}
.pr-drop {
  border: 1.5px dashed var(--riso-pink-deep);
  border-radius: 12px;
  padding: 22px;
  background: var(--paper);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}
.pr-drop:hover, .pr-drop.active {
  background: rgba(255, 126, 182, 0.08);
  border-color: var(--riso-green);
}
.pr-drop .drop-copy {
  display: flex; align-items: center; gap: 14px;
}
.pr-drop .drop-copy .ico svg { width: 28px; height: 28px; color: var(--ink); }
.pr-drop .drop-copy .lines b {
  display: block;
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
}
.pr-drop .drop-copy .lines small {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
}
.pr-drop-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pr-pill-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  color: var(--ink);
  box-shadow: 1.5px 1.5px 0 var(--riso-pink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.pr-pill-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2.5px 2.5px 0 var(--riso-green);
}
.pr-pill-btn svg { width: 12px; height: 12px; }

.pr-image-preview {
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--paper-white);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 2px 2px 0 var(--riso-pink);
  position: relative;
}
.pr-image-preview img,
.pr-image-preview svg.preview-svg {
  width: 100%; height: 100%; object-fit: contain;
  display: block;
}
.pr-image-preview .empty {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-align: center;
  padding: 12px;
}

/* Settings */
.pr-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.pr-setting {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pr-setting label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.pr-setting .grid-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
}
.pr-setting .grid-hint b {
  color: var(--riso-green-deep);
  font-weight: 500;
}
.pr-setting input[type="number"] {
  width: 90px;
  padding: 9px 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--paper-white);
  color: var(--ink);
  outline: none;
}
.pr-setting input[type="number"]:focus { box-shadow: 0 0 0 2px rgba(45,184,118,0.25); }
.pr-setting input[disabled] { opacity: 0.5; cursor: not-allowed; }
.pr-checkbox-row {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.pr-checkbox-row input { accent-color: var(--riso-green-deep); }

/* Downloads */
.pr-downloads {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}
.pr-dl-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  background: var(--paper-white);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--riso-pink);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.pr-dl-btn:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--riso-green);
}
.pr-dl-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: 1px 1px 0 var(--ink-faint);
}
.pr-dl-btn.primary {
  background: var(--riso-pink);
  color: var(--on-brand);
  box-shadow: 2px 2px 0 var(--riso-green);
}
.pr-dl-btn.primary:hover:not(:disabled) {
  box-shadow: 3px 3px 0 var(--riso-green-deep);
}
.pr-dl-btn svg { width: 14px; height: 14px; }

/* Plain-language note */
.pr-note {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-left-width: 4px;
  border-left-color: var(--riso-green);
  border-radius: 10px;
}
.pr-note-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--riso-green-deep);
  margin-bottom: 6px;
}
.pr-note p {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.55;
  margin: 0;
}
.pr-note p strong { font-weight: 600; }

/* Status messages */
.pr-status {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 8px;
}
.pr-status.success {
  background: rgba(45, 184, 118, 0.12);
  color: var(--riso-green-deep);
  border: 1px solid var(--riso-green);
}
.pr-status.error {
  background: rgba(255, 126, 182, 0.12);
  color: var(--riso-pink-deep);
  border: 1px solid var(--riso-pink-deep);
}
.pr-status svg { width: 14px; height: 14px; }
.pr-status[hidden] { display: none; }

/* Example toggle + live preview */
.pr-example {
  margin-top: 50px;
  border-top: 1px solid rgba(26,58,42,0.12);
  padding-top: 36px;
}
.pr-example-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--riso-pink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.pr-example-toggle:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--riso-green);
}
.pr-example-toggle svg {
  width: 12px; height: 12px;
  transition: transform 0.2s ease;
}
.pr-example-toggle.open svg { transform: rotate(180deg); }

.pr-example-body {
  margin-top: 22px;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  max-height: 0;
  opacity: 0;
}
.pr-example-body.open {
  max-height: 1800px;
  opacity: 1;
}

/* Live game preview (also used for the standalone student game style) */
.pr-game {
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 3px 3px 0 var(--riso-green);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.pr-game-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--paper);
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--ink);
}
.pr-game-stage img,
.pr-game-stage .stage-svg-wrap {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.pr-game-stage .stage-svg-wrap svg {
  width: 100%; height: 100%;
  display: block;
}
.pr-game-grid {
  position: absolute; inset: 0;
  display: grid;
  gap: 2px;
}
.pr-game-cell {
  background: var(--riso-pink);
  position: relative;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.pr-game-cell::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("/img/grain.svg");
  background-repeat: repeat;
  mix-blend-mode: multiply;
  opacity: 0.4;
  pointer-events: none;
}
.pr-game-cell.revealed {
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}

.pr-game-side h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.pr-game-side .progress {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.pr-game-side .qbody {
  font-size: 17px;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 10px;
}
.pr-game-side .hint {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-dim);
  margin-bottom: 14px;
  display: flex; align-items: flex-start; gap: 8px;
}
.pr-game-side .hint svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 3px; color: var(--riso-yellow); }
.pr-game-side input.answer {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-display);
  font-size: 16px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  margin-bottom: 12px;
}
.pr-game-side input.answer:focus {
  box-shadow: 0 0 0 2px rgba(45, 184, 118, 0.25);
}
.pr-game-side .game-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pr-game-feedback {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 8px;
}
.pr-game-feedback.correct {
  background: rgba(45, 184, 118, 0.14);
  color: var(--riso-green-deep);
  border: 1px solid var(--riso-green);
}
.pr-game-feedback.incorrect {
  background: rgba(255, 126, 182, 0.14);
  color: var(--riso-pink-deep);
  border: 1px solid var(--riso-pink-deep);
}
.pr-game-feedback svg { width: 14px; height: 14px; }
.pr-game-side .done {
  padding: 18px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  text-align: center;
}
.pr-game-side .done h4 {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--riso-green-deep);
  margin-bottom: 6px;
}
.pr-game-side .done p {
  font-size: 14px;
  color: var(--ink-dim);
  margin-bottom: 14px;
}

/* Custom icon shared style */
.pr-ico {
  display: inline-block;
  vertical-align: middle;
  color: currentColor;
}

/* Mobile */
@media (max-width: 900px) {
  .pr-head {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .pr-head .illo { max-width: 180px; }
  .pr-image-grid { grid-template-columns: 1fr; }
  .pr-settings { grid-template-columns: 1fr; }
  .pr-game { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pr-csv-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .pr-csv-strip .csv-pick { align-self: flex-start; }
  .pr-table thead .hint-col { display: none; }
  .pr-table td.hint-cell { display: none; }
  .pr-dl-btn { width: 100%; justify-content: center; }
}

/* === Share link row + full-width setting === */
.pr-setting.pr-setting-full {
  grid-column: 1 / -1;
}
.pr-share-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 6px;
}
.pr-share-link {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink-dim);
  text-overflow: ellipsis;
}
.pr-share-link:focus { outline: 2px solid var(--riso-green); outline-offset: 1px; }
.pr-share-row .pr-pill-btn.copied {
  background: var(--riso-green);
  color: var(--paper-white);
}

/* === First-letter hint pill (live example) === */
.pr-first-letter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--riso-pink) 14%, var(--paper-white));
  border: 1.5px solid var(--riso-pink);
}
.pr-fl-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.pr-fl-letter {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}

/* /css/search.css */
/* ── Search overlay (Cmd/Ctrl+K) ───────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 5vw 5vh;
}
.search-overlay.is-open { display: flex; }
body.search-open { overflow: hidden; }

.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 58, 42, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.search-modal {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--riso-pink), 0 24px 56px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: search-in 0.18s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes search-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .search-modal { animation: none; }
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.search-glyph {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--ink-faint);
  width: 22px;
  text-align: center;
}
.search-input {
  flex: 1;
  font-family: var(--font-display);
  font-size: 19px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  padding: 4px 0;
}
.search-input::placeholder { color: var(--ink-faint); }
.search-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}
kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 6px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink-dim);
  margin: 0 2px;
}

.search-results {
  max-height: 56vh;
  overflow-y: auto;
  padding: 8px 8px 10px;
}
.search-result {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 4px 14px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.12s;
  cursor: pointer;
}
.search-result.is-selected {
  background: rgba(255, 126, 182, 0.14);
  outline: 1.5px solid var(--riso-pink-deep);
}
.search-kind {
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--riso-pink-deep);
  text-align: left;
}
.search-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.search-desc {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.4;
}
.search-empty {
  padding: 30px 14px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.search-foot {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  background: var(--paper);
}

/* Tiny "/" hint in the topbar -- subtle visible cue that search exists */
.search-hint-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  margin-left: auto;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.search-hint-pill:hover {
  color: var(--ink);
  border-color: var(--ink);
}
@media (max-width: 760px) {
  .search-hint-pill { display: none; }
}

@media (max-width: 540px) {
  .search-overlay { padding: 6vh 4vw; }
  .search-result { grid-template-columns: 56px 1fr; }
  .search-foot { gap: 14px; font-size: 12px; }
}

