/* 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/stage.css, /css/search.css, /css/newsletter.css, /css/who.css, /css/landing-calm.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/stage.css */
/* ===== PINNED CELL STAGE =====
   The stage is 240vh tall and pins a 100vh viewport. The 3D cell renders
   into #cell-canvas; labels + connectors layer over the canvas in DOM/SVG.

   No site-wide grain overlay covers the stage -- grain is applied only
   to topbar / footer / main, none of which the stage belongs to. The
   candy plastic look stays clean. */

.stage {
  position: relative;
  /* Pull the stage up under the sticky topbar so .stage-pin can stick
     to viewport top from the very first pixel of scroll. Without this
     the stage starts ~62px down in the document, so the cell rides up
     with the page for that first ~62px before sticky kicks in --
     which read as "the page moves 1-2cm before the dissect starts".
     getStageProgress() in scroll.js subtracts the same topbar height
     so explode still begins at 0 on scroll=0. */
  margin-top: -62px;
  /* Tall enough to give the dissect ~220vh of scroll travel (about 30%
     more than before), plus a ~70vh "hold" zone at the end where the
     cell sits fully exploded so the user can read the labels without
     accidentally scrolling past. The explode formula in scene.js
     caps at 100% well before progress = 1, leaving the tail as hold. */
  height: 320vh;
  background: var(--paper);
}

/* Mobile keeps a tighter version of the same shape. */
@media (max-width: 760px) {
  .stage { height: 230vh; margin-top: -58px; }
}
@media (max-width: 420px) {
  .stage { margin-top: -50px; }
}
.stage-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

#cell-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  cursor: grab;
  /* Desktop: pan-y so vertical scroll passes through OrbitControls.
     Mobile: auto -- let the browser handle scroll + page pinch-zoom
     with zero JS in the touch path. See controls.js mobile branch. */
  touch-action: pan-y;
}
@media (max-width: 760px) {
  #cell-canvas { touch-action: auto; cursor: default; }
}
#cell-canvas:active { cursor: grabbing; }

.connectors {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 2;
}
.connectors line {
  stroke-width: 1.5;
  stroke-dasharray: 3 4;
  stroke-linecap: round;
}

.labels { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.label {
  position: absolute; top: 0; left: 0;
  will-change: transform, opacity;
  pointer-events: auto;
}

/* ----- Mixed glassy + riso label cards -----
   Frosted-glass body (candy world), but a small pink "stamp" dot with
   green misregistration shadow on the meta row + a faint grain overlay
   at low opacity so they read as part of the same printed booklet. */
.label-card {
  display: inline-flex; flex-direction: column; gap: 6px;
  padding: 12px 16px 14px;
  background: var(--paper-white);
  backdrop-filter: blur(12px);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  /* One width for every card (labels.js reads it to place the column). */
  width: 300px; box-sizing: border-box;
  box-shadow:
    2.5px 2.5px 0 var(--riso-pink),
    0 4px 16px rgba(24, 40, 58, 0.07);
  position: relative;
  overflow: hidden;
}
.label-card::after {
  /* Subtle riso grain overlay, lower than tab pages so the candy still reads */
  content: "";
  position: absolute; inset: 0;
  background-image: url("/img/grain.svg");
  background-repeat: repeat;
  mix-blend-mode: multiply;
  opacity: 0.15;
  pointer-events: none;
  border-radius: inherit;
}
.label-card > * { position: relative; z-index: 1; }
.label-card:hover {
  transform: translateY(-2px);
  box-shadow:
    2.5px 2.5px 0 var(--riso-green),
    0 10px 28px rgba(24, 40, 58, 0.12);
}
/* Six full cards taller than the screen: labels.js sets .is-compact and
   they drop the "view section" line (the whole card is the link). */
.labels.is-compact .label-card { padding-top: 6px; padding-bottom: 7px; gap: 2px; }
.labels.is-compact .label-tag { font-size: 13px; line-height: 1.3; }
.labels.is-compact .label-arrow { display: none; }
/* Short screens: the card keeps its head (name and organelle) and drops the line below. */
.labels.is-tight .label-card { padding-top: 7px; padding-bottom: 7px; }
.labels.is-tight .label-arrow, .labels.is-tight .label-tag { display: none; }
/* Section name and organelle share one line to save height. */
.label-head {
  display: flex; gap: 8px; align-items: baseline;
}
.label-head .dot {
  flex: none; align-self: center;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent, var(--riso-pink));
  box-shadow: 1.5px 1.5px 0 var(--riso-green);
}
.label-head .organelle {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent, var(--ink-dim));
  font-weight: 500;
}
.label-title {
  font-size: 19px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink); white-space: nowrap;
}
.label-tag {
  font-size: 13.5px; line-height: 1.35;
  color: var(--ink-dim);
  white-space: normal;
  /* Two lines reserved, so every card is the same height. */
  min-height: 2.7em;
}
.label-arrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
}

/* ----- Hero overlay text ----- */
.stage-text {
  position: absolute;
  left: 5vw;
  /* Clear of the progress rail, which sits 16vh up and is about 64px
     tall (the scroll hint is below it), so the intro never runs into it. */
  bottom: max(160px, calc(16vh + 76px));
  max-width: 560px;
  z-index: 4;
  pointer-events: none;
}
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 18px;
  display: flex; gap: 10px; align-items: center;
}
.kicker::before {
  content: ""; width: 28px; height: 2px;
  background: var(--riso-pink); border-radius: 2px;
  box-shadow: 0 2.5px 0 var(--riso-green);
}
.stage-text h1 {
  font-family: var(--font-display);
  font-size: clamp(46px, 5.8vw, 92px);
  line-height: 0.96;
  letter-spacing: -.01em;
  font-weight: 600;
  margin-bottom: 22px;
  color: var(--ink);
}
.stage-text h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--riso-pink);
  text-shadow: 2.5px 2px 0 var(--riso-green);
  letter-spacing: -.01em;
}
.stage-text p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 460px;
}

/* A teacher-only "new" link under the intro (hidden for students by data-aud) */
.stage-new {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 18px; padding: 6px 14px 6px 6px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--paper-white); color: var(--ink);
  font-size: 14px; font-weight: 600; line-height: 1.3; text-decoration: none;
  box-shadow: 2px 2px 0 var(--riso-green);
  transition: transform 0.12s, box-shadow 0.12s;
}
.stage-new:hover { transform: translateY(-1px); box-shadow: 3px 3px 0 var(--riso-pink); }
.stage-new:focus-visible { outline: 3px solid var(--riso-pink); outline-offset: 2px; }
.stage-new .tag {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--riso-pink); color: var(--on-brand, #fff); border-radius: 999px; padding: 3px 8px;
}
@media (prefers-reduced-motion: reduce) { .stage-new { transition: none; } }
.mobile-cell-head .stage-new { margin: 14px 0 0; font-size: 13.5px; }

/* ----- Scroll hint ----- */
.scroll-hint {
  position: absolute;
  left: 50%; bottom: 56px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex; align-items: center; gap: 10px;
  z-index: 4;
  pointer-events: none;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.7; }
  50%      { transform: translate(-50%, 6px); opacity: 1; }
}

/* ----- Drag pill (one-time hint) ----- */
.drag-pill {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  padding: 8px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper-white);
  backdrop-filter: blur(6px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 4;
  box-shadow: 2px 2px 0 var(--riso-pink);
}
.drag-pill.visible { opacity: 1; }

/* ----- Recenter pill ----- */
.recenter-pill {
  position: absolute;
  top: 80px; right: 28px;
  z-index: 5;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px 9px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-white);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--riso-green);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.recenter-pill:hover {
  transform: translateY(-1px);
  background: var(--paper-white);
  box-shadow: 2px 2px 0 var(--riso-pink), 0 10px 22px rgba(24, 40, 58, 0.14);
}
.recenter-pill .ico {
  width: 16px; height: 16px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: var(--riso-pink);
  color: var(--ink);
  font-size: 12px; font-weight: 700;
  line-height: 1;
  box-shadow: 1px 1px 0 var(--riso-green);
}

/* ----- Progress rail ----- */
.progress-rail {
  position: absolute;
  left: 50%; bottom: 16vh;
  transform: translateX(-50%);
  width: min(560px, 60vw);
  z-index: 4;
  pointer-events: none;
  transition: opacity 0.3s;
  display: flex; flex-direction: column; gap: 6px;
  align-items: stretch;
}
.rail-label {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 700;
  align-items: center;
}
.rail-label .pct {
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  background: var(--paper-white);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  box-shadow: 1.5px 1.5px 0 var(--riso-pink);
  letter-spacing: 0.04em;
  min-width: 44px; text-align: center;
}
.rail-track {
  position: relative;
  height: 6px; border-radius: 999px;
  background: rgba(24, 40, 58, 0.10);
  overflow: visible;
}
/* The ball drags (scene.js, enableRailDrag): the track takes the pointer and
   a taller invisible band around it makes a fat target for a finger. */
.progress-rail.is-draggable .rail-track { pointer-events: auto; cursor: grab; touch-action: none; }
.progress-rail.is-draggable .rail-track::before { content: ""; position: absolute; left: -12px; right: -12px; top: -14px; bottom: -14px; }
.progress-rail.is-dragging .rail-track { cursor: grabbing; }
.progress-rail.is-dragging .rail-fill, .progress-rail.is-dragging .rail-thumb { transition: none; }
.rail-thumb:focus-visible { outline: 3px solid var(--riso-pink-deep, #b8326f); outline-offset: 3px; }
.progress-rail.is-draggable .rail-thumb { cursor: grab; }
.rail-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%; border-radius: 999px;
  background: linear-gradient(90deg,
    #ffd24a, #ff8763, #9be04a, #ff8fae, #8a5cd9);
  background-size: 200% 100%;
  transition: width 0.12s linear;
}
.rail-thumb {
  position: absolute; top: 50%; left: 0%;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--paper-white);
  border: 2px solid var(--ink);
  transform: translate(-50%, -50%);
  box-shadow: 2px 2px 0 var(--riso-pink);
  transition: left 0.12s linear;
}
.rail-thumb::after {
  content: ""; position: absolute;
  inset: 3px; border-radius: 50%;
  background: linear-gradient(135deg,
    #ffd24a, #ff8763 25%, #9be04a 50%, #ff8fae 75%, #8a5cd9);
}
.rail-ticks {
  position: relative; height: 14px;
  margin-top: 2px;
}
.rail-ticks .tick {
  position: absolute; top: 0;
  width: 8px; height: 8px; border-radius: 50%;
  transform: translateX(-50%);
  background: var(--c);
  border: 1.5px solid var(--ink);
}
.rail-ticks .tick-label {
  position: absolute;
  top: 14px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 760px) {
  /* Hero text moves higher and shrinks so it stays readable above the
     scroll-hint and progress rail on small screens. */
  .stage-text { left: 6vw; right: 6vw; bottom: max(140px, 18vh); max-width: none; }
  .stage-text h1 { font-size: clamp(36px, 9vw, 56px); line-height: 1; }
  .stage-text p { font-size: 15px; line-height: 1.5; }
  .stage-text .kicker { margin-bottom: 12px; font-size: 12px; }

  /* Compact labels: smaller card, smaller text. Keep the arrow line --
     on mobile the whole card navigates (cutaway is desktop-only), so
     showing "view section ->" is the right affordance. */
  .label-card {
    width: 200px;
    padding: 8px 12px 10px;
    box-shadow:
      2px 2px 0 var(--riso-pink),
      0 2px 8px rgba(24, 40, 58, 0.06);
  }
  .label-title { font-size: 14px; letter-spacing: -0.005em; }
  .label-head .organelle { font-size: 10px; }
  .label-arrow { font-size: 12px; }

  .recenter-pill {
    top: 64px; right: 12px;
    padding: 7px 11px 7px 9px;
    font-size: 12px;
  }
  .recenter-pill .ico { width: 14px; height: 14px; font-size: 12px; }

  .drag-pill { font-size: 12px; padding: 7px 12px; letter-spacing: 0.10em; }

  .progress-rail { width: calc(100vw - 32px); bottom: 12vh; }
  .rail-label { font-size: 12px; letter-spacing: 0.08em; }
  .rail-label .pct { padding: 2px 6px; min-width: 36px; }
  .rail-ticks .tick-label { display: none; }

  .scroll-hint { bottom: 76px; font-size: 12px; letter-spacing: 0.12em; }
}

@media (max-width: 420px) {
  .stage-text { bottom: 16vh; }
  .stage-text h1 { font-size: clamp(30px, 9vw, 44px); }
  .stage-text p { font-size: 14px; }
  .recenter-pill .icon-text { display: none; }
}

/* ── Organelle click card ───────────────────────────────────
   Click any organelle in the 3D scene and this riso card slides in
   from the right with its name, blurb, and links. Built by
   /js/cell/organelle-clicks.js. Hidden by default, slides in on
   .is-open. The cell underneath stays put -- scroll dissection
   keeps working. */
.org-card {
  position: fixed;
  top: 86px;                  /* clear the sticky topbar */
  right: 0;
  width: min(380px, 92vw);
  max-height: calc(100vh - 110px);
  overflow: auto;
  z-index: 160;               /* above topbar (z:150) */
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  border-right: none;
  border-radius: 18px 0 0 18px;
  padding: 26px 28px 22px;
  box-shadow: -6px 6px 0 var(--riso-pink), 0 16px 36px rgba(0, 0, 0, 0.16);
  transform: translateX(110%);
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.org-card.is-open { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  .org-card { transition: none; }
}

.org-card-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 2px 2px 0 var(--riso-green);
  padding: 0;
  font-family: inherit;
  transition: transform 0.12s, box-shadow 0.12s;
}
.org-card-close:hover {
  transform: translateY(-1px);
  box-shadow: 2px 2px 0 var(--riso-pink);
}

.org-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.org-card-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent, var(--riso-pink));
  box-shadow: 2px 2px 0 var(--riso-green);
}
.org-card-num { color: var(--ink-faint); }
.org-card-organelle { color: var(--ink-dim); }

.org-card-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 12px;
  text-wrap: balance;
}

.org-card-blurb {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-dim);
  margin-bottom: 20px;
}

.org-card-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.org-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-white);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--accent, var(--riso-pink));
  transition: transform 0.12s, box-shadow 0.12s;
}
.org-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--riso-green);
}
.org-card-link .arr { transition: transform 0.18s; }
.org-card-link:hover .arr { transform: translateX(3px); }

@media (max-width: 540px) {
  .org-card {
    top: auto;
    bottom: 0;
    right: 0; left: 0;
    width: auto;
    max-height: 60vh;
    border-radius: 18px 18px 0 0;
    border-right: 1.5px solid var(--ink);
    border-left: 1.5px solid var(--ink);
    border-bottom: none;
    box-shadow: 0 -6px 0 var(--riso-pink), 0 -16px 36px rgba(0, 0, 0, 0.16);
    transform: translateY(110%);
  }
  .org-card.is-open { transform: translateY(0); }
}

/* ── Mobile flat-SVG cell ─────────────────────────────────────
   Shown only on mobile (≤760px). The 3D stage is hidden at the
   same breakpoint so the two never overlap. */
.mobile-cell { display: none; }

@media (max-width: 760px) {
  .stage { display: none; }

  .mobile-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 28px 5vw 40px;
    background: var(--paper);
  }

  .mobile-cell-head {
    width: 100%;
    max-width: 480px;
  }
  .mobile-cell-head .kicker {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: 14px;
    display: flex; gap: 10px; align-items: center;
  }
  .mobile-cell-head h1 {
    font-size: clamp(36px, 10vw, 52px);
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1;
    color: var(--ink);
    margin-bottom: 14px;
  }
  .mobile-cell-head h1 em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    color: var(--riso-coral);
    text-shadow: 2px 1px 0 var(--riso-green);
  }
  .mobile-cell-head p {
    font-size: 14px;
    color: var(--ink-dim);
    line-height: 1.55;
    max-width: 44ch;
  }

  .mobile-cell-svg {
    width: 100%;
    max-width: 420px;
    height: auto;
    display: block;
  }

  /* Organelle tap states */
  .cell-organ { outline: none; }
  .cell-organ:focus-visible .org-hover-ring { opacity: 1 !important; }
}

/* /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; }
}

/* /css/newsletter.css */
/* ── Newsletter card ────────────────────────────────────────────
   Two variants on the same component, switched by class:
     .newsletter-card           (default, end of blog/about)
     .newsletter-card.compact   (footer column)
   Single email field + button. Honeypot field is .nl-trap, hidden.
   Inline success/error message replaces the form on submit. */

.newsletter-card {
  position: relative;
  margin: 64px auto 0;
  max-width: 640px;
  padding: 32px 36px 30px;
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--riso-pink);
  overflow: hidden;
}
.newsletter-card::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: url("/img/grain.svg");
  background-repeat: repeat;
  mix-blend-mode: multiply;
  opacity: 0.28;
}
.newsletter-card > * { position: relative; }

.newsletter-card .nl-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.newsletter-card .nl-eyebrow::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--riso-pink);
  box-shadow: 1.5px 1.5px 0 var(--riso-green);
  flex-shrink: 0;
}
.newsletter-card .nl-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.15;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: -.01em;
}
.newsletter-card .nl-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--riso-pink-deep);
}
.newsletter-card .nl-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  margin: 0 0 20px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.newsletter-form .nl-trap {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.newsletter-form input[type="email"] {
  flex: 1 1 240px;
  min-width: 0;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  outline: none;
  transition: box-shadow 0.15s;
}
.newsletter-form input[type="email"]::placeholder { color: var(--ink-faint); }
.newsletter-form input[type="email"]:focus {
  box-shadow: 2px 2px 0 var(--riso-pink);
}
.newsletter-form button {
  flex: 0 0 auto;
  padding: 12px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--paper-white);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 2px 2px 0 var(--riso-pink);
}
.newsletter-form button:hover {
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--riso-green);
}
.newsletter-form button:active { transform: translateY(0); }
.newsletter-form button[disabled] { opacity: 0.55; cursor: wait; }

.newsletter-card .nl-consent {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-dim);
}
.newsletter-card .nl-consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.newsletter-card .nl-consent a:hover { color: var(--riso-pink-deep); }

.newsletter-msg {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-dim);
  min-height: 1.2em;
}
.newsletter-msg.is-ok { color: var(--riso-green-deep); }
.newsletter-msg.is-err { color: var(--riso-pink-deep); }

/* ── Compact variant for the footer ──────────────────────────── */
.newsletter-card.compact {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  max-width: none;
}
.newsletter-card.compact::before { display: none; }
.newsletter-card.compact .nl-eyebrow { display: none; }
.newsletter-card.compact .nl-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 500;
  margin-bottom: 14px;
}
.newsletter-card.compact .nl-title em {
  font-family: var(--font-mono);
  font-style: normal;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.newsletter-card.compact .nl-sub {
  font-size: 12px;
  margin-bottom: 12px;
  color: var(--ink-faint);
}
.newsletter-card.compact .newsletter-form {
  flex-wrap: nowrap;
}
.newsletter-card.compact .newsletter-form input[type="email"] {
  padding: 9px 12px;
  font-size: 12px;
  flex: 1 1 0;
}
.newsletter-card.compact .newsletter-form button {
  padding: 9px 14px;
  font-size: 12px;
}
.newsletter-card.compact .nl-consent {
  font-size: 12px;
  color: var(--ink-faint);
}
.newsletter-card.compact .newsletter-msg {
  font-size: 12px;
  margin-top: 10px;
}

@media (max-width: 540px) {
  .newsletter-card { padding: 24px 22px 22px; margin-top: 40px; }
  .newsletter-card .nl-title { font-size: 22px; }
  .newsletter-form { flex-direction: column; gap: 8px; }
  /* Column-direction flex reads the basis as height, so the 240px
     in `flex: 1 1 240px` would make the email field 240px tall.
     Reset to auto so the input is just its natural input height. */
  .newsletter-form input[type="email"] { flex: 0 0 auto; width: 100%; }
  .newsletter-form button { flex: 0 0 auto; width: 100%; padding: 13px 18px; }
  .newsletter-card.compact .newsletter-form {
    flex-direction: row;
    flex-wrap: nowrap;
  }
  .newsletter-card.compact .newsletter-form input[type="email"] { flex: 1 1 0; width: auto; }
  .newsletter-card.compact .newsletter-form button { width: auto; padding: 9px 14px; }
}

/* In student mode the newsletter card gives its place to Cramly
   (js/header.js builds this card beside each newsletter card). */
.cramly-card .cramly-go {
  display: inline-block; margin-top: 14px; padding: 11px 18px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1.5px solid var(--ink); background: var(--riso-green); color: var(--on-brand); text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
}
.cramly-card .cramly-go:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.cramly-card .cramly-go:focus-visible { outline: 2px solid var(--riso-pink-deep); outline-offset: 3px; }

/* /css/who.css */
/* "Who's visiting?" on the home page (js/who.js): a dialog on a first
   visit, centred like the "What's new" notice (css/header.css): student
   or teacher, then the cell in that view. */
.who-dlg {
  width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
  padding: 26px 28px 20px; margin: auto;
  background: var(--paper-white); color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 16px;
  box-shadow: 7px 7px 0 var(--riso-green);
}
.who-dlg::backdrop { background: rgba(20, 32, 27, 0.45); }
.who-dlg[open] { animation: who-in .28s ease-out; }
@keyframes who-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.who-eyebrow {
  margin: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--riso-pink-deep);
}
.who-dlg h2 { margin: 6px 0 18px; font-size: clamp(28px, 4.4vw, 38px); line-height: 1.05; letter-spacing: -.01em; }
.who-dlg h2:focus { outline: none; }
.who-dlg h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--riso-pink); }

/* The two answers, side by side. */
.who-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.who-opt {
  display: grid; gap: 4px; align-content: center; justify-items: start;
  width: 100%; padding: 16px 16px; border-radius: 12px;
  font: inherit; text-align: left;
  border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.who-opt b { font-size: 19px; line-height: 1.2; }
.who-opt span { font-size: 14px; line-height: 1.35; color: var(--ink-dim); }
.who-opt:hover, .who-opt:focus-visible { background: var(--paper-white); box-shadow: 3px 3px 0 var(--riso-pink); transform: translate(-1px, -1px); }
.who-opt:focus-visible, .who-link:focus-visible { outline: 2px solid var(--riso-pink-deep); outline-offset: 3px; }

.who-acts { display: flex; justify-content: flex-end; margin-top: 14px; }
.who-link {
  border: 0; background: none; padding: 8px 2px;
  font: inherit; font-size: 14px; color: var(--ink-dim);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.who-link:hover { color: var(--ink); }
.who-slot { display: none; }

/* Phones: the dialog rises from the foot of the screen, in reach of a
   thumb, with the cell still in view above it. */
@media (max-width: 620px) {
  .who-dlg {
    margin: auto auto 12px; width: calc(100vw - 20px); max-height: calc(100dvh - 90px);
    padding: 20px 18px 12px; border-radius: 16px; box-shadow: 5px 5px 0 var(--riso-green);
  }
  .who-dlg h2 { margin-bottom: 14px; }
  .who-opt { padding: 13px 12px; }
  .who-opt b { font-size: 17px; }
  .who-opt span { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .who-dlg[open] { animation: none; }
  .who-opt { transition: none; }
}
@media print { .who-dlg { display: none !important; } }

/* /css/landing-calm.css */
/* ============================================================
   landing-calm.css: the home page in the calm look (a preview).

   Applies only under <html data-look="calm"> (?look=calm, kept in
   localStorage bb-look; ?look=off clears it). The 3D cell, its drag, its
   scroll dissection and its labels are untouched: this changes the words
   around it, so they read at a glance, and adds the page under it (what
   the site is for, then real pictures of real resources, then a short
   store row). The bar, its menus and the free checks line are in
   css/header.css, the footer in css/footer.css. The markup for the new
   parts is in index.html, in two <script type="text/html" data-calm>
   blocks, so the page's words stay as they are until it ships.
   ============================================================ */

/* ── The hero: one sans for the words, one main button and one other ── */
:root[data-look="calm"] .stage-new,
:root[data-look="calm"] .hero-ib { display: none; }
:root[data-look="calm"] .kicker { font-family: var(--calm-sans); font-size: 15px; font-weight: 700; letter-spacing: 0.01em; text-transform: none; color: var(--calm-dim); }
:root[data-look="calm"] .stage-text h1 em,
:root[data-look="calm"] .mobile-cell-head .mobile-cell-title em { color: var(--calm-pink); }
:root[data-look="calm"] .stage-text p { font-family: var(--calm-sans); font-size: 18px; line-height: 1.55; color: var(--ink); max-width: 430px; }
:root[data-look="calm"] .calm-cta { pointer-events: auto; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
:root[data-look="calm"] .calm-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border: 1.5px solid var(--ink); border-radius: 10px; font-family: var(--calm-sans); font-size: 17px; font-weight: 700; line-height: 1.2; text-decoration: none; transition: background-color 0.15s; }
:root[data-look="calm"] .calm-btn-main { background: var(--ink); color: var(--paper-white); }
:root[data-look="calm"] .calm-btn-main:hover { background: color-mix(in srgb, var(--ink) 84%, var(--paper-white)); }
:root[data-look="calm"] .calm-btn-alt { background: var(--paper-white); color: var(--ink); }
:root[data-look="calm"] .calm-btn-alt:hover { background: var(--paper); }
:root[data-look="calm"] .calm-btn:hover { transform: none; filter: none; }
:root[data-look="calm"] .calm-btn:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: 3px; }
:root[data-look="calm"] .calm-arr { display: none; }
/* Over the cell the other choice is a plain link, not a second box on the
   glass; on a phone, where there is no glass behind it, it stays a button. */
:root[data-look="calm"] .stage-text .calm-cta { align-items: center; gap: 10px 26px; }
:root[data-look="calm"] .stage-text .calm-btn-alt { min-height: 44px; padding: 0 2px; border: 0; border-radius: 4px; background: none; text-decoration: underline; text-decoration-color: var(--riso-pink-deep); text-decoration-thickness: 2px; text-underline-offset: 5px; }
:root[data-look="calm"] .stage-text .calm-btn-alt:hover { background: none; text-decoration-thickness: 3px; }
:root[data-look="calm"] .stage-text .calm-arr { display: inline; white-space: pre; }

/* Wide screens: the cell steps right just far enough that the paragraph
   and its buttons sit on the paper beside the glass, not over its edge.
   The sphere's radius is about 37% of the screen's height, so the step is
   worked out from both sides of the screen: none on a wide one, up to
   160px on a 1280 by 800. The canvas, the labels and their connectors move
   together (their left edge goes twice as far, so the middle moves the
   step), and the rail and the hints keep under the cell. */
@media (min-width: 1181px) {
  :root[data-look="calm"] .stage { --calm-step: clamp(0px, 420px + 37vh - 45vw, 160px); }
  :root[data-look="calm"] .stage-text p { max-width: 400px; }
  :root[data-look="calm"] #cell-canvas,
  :root[data-look="calm"] .connectors,
  :root[data-look="calm"] .labels { left: calc(var(--calm-step) * 2); width: calc(100% - var(--calm-step) * 2); }
  :root[data-look="calm"] .progress-rail,
  :root[data-look="calm"] .scroll-hint,
  :root[data-look="calm"] .drag-pill { left: calc(50% + var(--calm-step)); }
}

/* The cell's own controls and hints: plain words, no offset shadows. */
:root[data-look="calm"] .recenter-pill { padding: 9px 14px; border: 1px solid var(--calm-line); border-radius: 9px; background: var(--paper-white); box-shadow: none; font-family: var(--calm-sans); font-size: 15px; font-weight: 700; letter-spacing: 0; color: var(--ink); display: inline-block; }
:root[data-look="calm"] .recenter-pill::first-letter { text-transform: uppercase; }
:root[data-look="calm"] .recenter-pill .ico { display: none; }
:root[data-look="calm"] .recenter-pill:hover { transform: none; filter: none; background: var(--paper); box-shadow: none; }
:root[data-look="calm"] .recenter-pill:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: 2px; }
:root[data-look="calm"] .drag-pill { border: 1px solid var(--calm-line); border-radius: 9px; box-shadow: 0 6px 18px rgba(20, 40, 30, 0.12); font-family: var(--calm-sans); font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; }
:root[data-look="calm"] .drag-pill::first-letter { text-transform: uppercase; }
:root[data-look="calm"] .scroll-hint { display: block; 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"] .scroll-hint::first-letter { text-transform: uppercase; }
:root[data-look="calm"] .rail-label { font-family: var(--calm-sans); font-size: 15px; letter-spacing: 0; text-transform: none; font-weight: 700; color: var(--ink); }
:root[data-look="calm"] .rail-label > span:first-child::first-letter { text-transform: uppercase; }
:root[data-look="calm"] .rail-label .pct { padding: 0; min-width: 0; border: 0; background: none; box-shadow: none; font-family: var(--calm-sans); font-size: 15px; font-weight: 700; color: var(--ink); }
:root[data-look="calm"] .rail-ticks { height: 22px; }
:root[data-look="calm"] .rail-ticks .tick-label { top: 13px; font-family: var(--calm-sans); font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink); }
:root[data-look="calm"] .rail-ticks .tick-label::first-letter { text-transform: uppercase; }

/* The organelle cards, once the cell is pulled apart: the same cards, read
   in the sans; the organelle's name in --calm-dim (its colour stays on the
   dot), no number, sentence case. */
:root[data-look="calm"] .label-head .organelle { font-family: var(--calm-sans); font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--calm-dim); font-weight: 700; }
:root[data-look="calm"] .label-head .organelle::first-letter { text-transform: uppercase; }
:root[data-look="calm"] .label-title { font-size: 21px; }
:root[data-look="calm"] .label-tag { font-family: var(--calm-sans); font-size: 15px; color: var(--calm-dim); }
:root[data-look="calm"] .labels.is-compact .label-tag { font-size: 14px; line-height: 1.3; }
:root[data-look="calm"] .label-arrow { font-family: var(--calm-sans); font-size: 15px; color: var(--calm-dim); }
:root[data-look="calm"] .label-arrow::first-letter { text-transform: uppercase; }

/* Phones: the flat cell's hero */
:root[data-look="calm"] .mobile-cell-head .kicker { font-family: var(--calm-sans); font-size: 15px; font-weight: 700; letter-spacing: 0.01em; text-transform: none; color: var(--calm-dim); }
:root[data-look="calm"] .mobile-cell-head > p:not(.mobile-cell-title) { font-family: var(--calm-sans); font-size: 17px; line-height: 1.55; color: var(--ink); }
:root[data-look="calm"] .mobile-cell-head .calm-cta { flex-direction: column; gap: 10px; margin-top: 20px; }
:root[data-look="calm"] .mobile-cell-head .calm-btn { width: 100%; }
:root[data-look="calm"] .mobile-cell-svg text { font-family: var(--calm-sans); font-size: 13.5px; font-weight: 700; }
:root[data-look="calm"] .mobile-cell-svg .chip-n { display: none; }
:root[data-look="calm"] .mobile-cell-svg .chip-w { text-transform: capitalize; }
:root[data-look="calm"] .mobile-cell-svg > text { font-size: 13px; letter-spacing: 0.06em; fill: var(--calm-dim); opacity: 1; }

/* ── Under the cell: what the site is for, then the things themselves ── */
:root[data-look="calm"] .calm-below { display: block; background: var(--paper); color: var(--ink); font-family: var(--calm-sans); }
:root[data-look="calm"] .calm-below ~ footer { margin-top: 0; }
:root[data-look="calm"] .calm-wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
:root[data-look="calm"] .calm-shelf { padding: 112px 0 104px; }
:root[data-look="calm"] .calm-head { max-width: 780px; margin: 0 0 48px; }
:root[data-look="calm"] .calm-head h2 { font-family: var(--font-display); font-size: clamp(38px, 4.4vw, 60px); font-weight: 650; line-height: 1.02; letter-spacing: -.01em; color: var(--ink); }
:root[data-look="calm"] .calm-head h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--calm-pink); text-shadow: 2px 1.5px 0 var(--riso-green); }
:root[data-look="calm"] .calm-lede { margin-top: 16px; max-width: 40em; font-size: 19px; line-height: 1.55; color: var(--calm-dim); text-wrap: pretty; }

/* What the site is for: four kinds in one row on a quiet panel, like a
   category bar, so they read as the way in rather than as more cards. */
:root[data-look="calm"] .calm-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 10px; border: 1px solid var(--calm-line); border-radius: 16px; background: var(--paper-white); }
:root[data-look="calm"] .calm-kind { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px; border-radius: 10px; color: var(--ink); text-decoration: none; transition: background-color 0.15s; }
:root[data-look="calm"] .calm-kind:hover { background: var(--calm-hover); }
:root[data-look="calm"] .calm-kind:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: -3px; }
:root[data-look="calm"] .calm-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: color-mix(in srgb, var(--riso-green) 24%, var(--paper-white)); }
:root[data-look="calm"] .calm-ico[data-tone="pink"] { background: color-mix(in srgb, var(--riso-pink) 26%, var(--paper-white)); }
:root[data-look="calm"] .calm-ico[data-tone="yellow"] { background: color-mix(in srgb, var(--riso-yellow) 34%, var(--paper-white)); }
:root[data-look="calm"] .calm-ico[data-tone="coral"] { background: color-mix(in srgb, var(--riso-coral) 28%, var(--paper-white)); }
:root[data-look="calm"] .calm-ico svg { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:root[data-look="calm"] .calm-kind b { display: block; font-size: 19px; line-height: 1.25; }
:root[data-look="calm"] .calm-kind-line { display: block; margin-top: 4px; font-size: 16px; line-height: 1.45; color: var(--calm-dim); }

/* The things themselves: three across, each picture one bold part of a real page. */
:root[data-look="calm"] .calm-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 32px; margin: 64px 0 0; padding: 0; list-style: none; }
:root[data-look="calm"] .calm-card { position: relative; display: block; color: var(--ink); text-decoration: none; border-radius: 12px; }
:root[data-look="calm"] .calm-pic { display: block; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--calm-line); border-radius: 12px; background: var(--paper-white); }
:root[data-look="calm"] .calm-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
:root[data-look="calm"][data-theme="dark"] .calm-pic img { filter: brightness(0.92); }
:root[data-look="calm"] .calm-card:hover .calm-pic img { transform: scale(1.03); }
:root[data-look="calm"] .calm-card h3 { margin: 18px 0 6px; font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
:root[data-look="calm"] .calm-card:hover h3 { text-decoration: underline; text-decoration-color: var(--riso-pink-deep); text-decoration-thickness: 2px; text-underline-offset: 5px; }
:root[data-look="calm"] .calm-card p { font-size: 17px; line-height: 1.5; color: var(--calm-dim); }
:root[data-look="calm"] .calm-card:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: 6px; }
/* New, or Credits on the one that is paid: a small label after the title, off
   the picture so it never covers what the picture shows. */
:root[data-look="calm"] .calm-tag { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 6px; background: color-mix(in srgb, var(--riso-pink) 22%, var(--paper-white)); color: var(--ink); font-family: var(--calm-sans); font-size: 15px; font-weight: 700; line-height: 1.35; letter-spacing: 0; vertical-align: 4px; }
:root[data-look="calm"] .calm-card:hover .calm-tag { text-decoration: none; }
@media (prefers-reduced-motion: reduce) { :root[data-look="calm"] .calm-pic img { transition: none; } }

/* Straight to: the plain links that used to sit in the hero, one quiet line. */
:root[data-look="calm"] .calm-also { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 22px; margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--calm-line); }
:root[data-look="calm"] .calm-also h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
:root[data-look="calm"] .calm-also ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 16px; line-height: 1.4; color: var(--calm-dim); }
:root[data-look="calm"] .calm-also a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--calm-line); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
:root[data-look="calm"] .calm-also a:hover { text-decoration-color: var(--riso-pink-deep); }
:root[data-look="calm"] .calm-also a:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: 2px; border-radius: 3px; }

/* ── From the store (optional: the whole block can go) ── */
:root[data-look="calm"] .calm-store { padding: 52px 0 60px; background: var(--paper-white); border-top: 1px solid var(--calm-line); }
:root[data-look="calm"] .calm-store-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 32px; margin-bottom: 28px; }
:root[data-look="calm"] .calm-store h2 { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; color: var(--ink); }
:root[data-look="calm"] .calm-store-note { margin: 6px 0 0; font-size: 17px; line-height: 1.5; color: var(--calm-dim); }
:root[data-look="calm"] .calm-more { padding: 6px 0; font-size: 17px; font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--riso-pink-deep); text-decoration-thickness: 2px; text-underline-offset: 4px; }
:root[data-look="calm"] .calm-more:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: 3px; border-radius: 3px; }
:root[data-look="calm"] .calm-prods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; margin: 0; padding: 0; list-style: none; }
:root[data-look="calm"] .calm-prod { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; align-items: center; color: var(--ink); text-decoration: none; border-radius: 10px; }
:root[data-look="calm"] .calm-prod img { display: block; width: 84px; height: 105px; object-fit: cover; border: 1px solid var(--calm-line); border-radius: 6px; background: var(--paper); }
:root[data-look="calm"] .calm-prod b { display: block; font-size: 17px; line-height: 1.3; }
:root[data-look="calm"] .calm-prod:hover b { text-decoration: underline; text-decoration-color: var(--riso-pink-deep); text-underline-offset: 3px; }
:root[data-look="calm"] .calm-prod:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: 4px; }
:root[data-look="calm"] .calm-sub { display: block; margin-top: 3px; font-size: 15px; line-height: 1.4; color: var(--calm-dim); }
:root[data-look="calm"] .calm-price { display: block; margin-top: 6px; font-size: 16px; font-weight: 700; color: var(--ink); }

/* Narrower screens: the kinds two by two, then the cards two across. */
@media (max-width: 1100px) {
  :root[data-look="calm"] .calm-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root[data-look="calm"] .calm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
  :root[data-look="calm"] .calm-prods { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 600px) {
  :root[data-look="calm"] .calm-wrap { padding: 0 16px; }
  :root[data-look="calm"] .calm-shelf { padding: 64px 0 56px; }
  :root[data-look="calm"] .calm-head { margin-bottom: 28px; }
  :root[data-look="calm"] .calm-lede { font-size: 17px; }
  :root[data-look="calm"] .calm-kinds { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 6px; }
  :root[data-look="calm"] .calm-kind { padding: 12px 10px; }
  :root[data-look="calm"] .calm-cards { grid-template-columns: minmax(0, 1fr); gap: 36px; margin-top: 44px; }
  :root[data-look="calm"] .calm-card h3 { font-size: 24px; }
  :root[data-look="calm"] .calm-also { display: block; margin-top: 48px; }
  :root[data-look="calm"] .calm-also h3 { margin-bottom: 10px; }
  :root[data-look="calm"] .calm-also ul { display: grid; gap: 10px; }
  :root[data-look="calm"] .calm-store { padding: 40px 0 44px; }
  :root[data-look="calm"] .calm-store-head { display: block; margin-bottom: 22px; }
  :root[data-look="calm"] .calm-more { display: inline-block; margin-top: 10px; }
}

/* A student's first screen is one button: practise. Chips beside it, the long
   intro and the link list stay in the page but are not drawn (never removed). */
:root[data-look="calm"] .calm-go { flex-direction: column; align-items: flex-start; gap: 14px; }
:root[data-look="calm"] .calm-big { flex-direction: column; align-items: flex-start; justify-content: center; min-height: 84px; padding: 16px 28px; font-size: 26px; font-weight: 800; border-radius: 16px; box-shadow: 4px 4px 0 var(--riso-green); }
:root[data-look="calm"] .calm-big small { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; opacity: .85; }
:root[data-look="calm"] .calm-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
:root[data-look="calm"] .calm-chip { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper-white); color: var(--ink); font-weight: 800; font-size: 16px; text-decoration: none; }
:root[data-look="calm"] .calm-chip:hover { background: var(--paper); }
:root[data-look="calm"] .calm-chip:focus-visible { outline: 3px solid var(--riso-pink-deep); outline-offset: 3px; }
:root[data-look="calm"]:not([data-audience="teacher"]) .stage-text > p,
:root[data-look="calm"]:not([data-audience="teacher"]) .mobile-cell-head > p:not(.mobile-cell-title),
:root[data-look="calm"]:not([data-audience="teacher"]) .hero-ib { display: none; }
:root[data-look="calm"] .stage-text .calm-go { align-items: flex-start; gap: 14px; }

/* Short screens: the intro is anchored to the bottom of the stage, so when
   the screen is not tall enough it grew upward under the top bar. Tighten
   the block as the height drops: the paragraph goes first (it is the least
   needed), then the headline scales with the height, so the first line
   always starts below the bar. */
@media (min-width: 761px) and (max-height: 780px) {
  :root[data-look="calm"] .calm-big { min-height: 64px; padding: 10px 24px; font-size: 22px; }
  :root[data-look="calm"] .stage-text .calm-go { gap: 10px; }
  :root[data-look="calm"] .calm-chip { min-height: 40px; }
  :root[data-look="calm"] .stage-text > p { display: none; }
}
@media (min-width: 761px) and (max-height: 640px) {
  :root[data-look="calm"] .stage-text .kicker { display: none; }
  :root[data-look="calm"] .stage-text h1 { font-size: clamp(28px, 7vh, 44px); margin-bottom: 8px; }
}
@media (min-width: 761px) and (max-height: 520px) {
  :root[data-look="calm"] .stage-text h1 { font-size: clamp(22px, 5.5vh, 30px); }
  :root[data-look="calm"] .calm-big { min-height: 48px; padding: 6px 20px; font-size: 18px; }
  :root[data-look="calm"] .calm-big small { display: none; }
  :root[data-look="calm"] .calm-chip { min-height: 36px; }
}

/* A visitor who has not picked a side is in teacher mode by default
   (<html data-aud-default>), which hid the hero written for them and left a
   student from a search on "Make a practice paper". On this page only, the
   undecided hero shows until a side is picked: Start practising, IB, AP,
   I'm a teacher. The rest of the page and the site stay as the default has
   them. */
:root[data-look="calm"][data-aud-default] .calm-cta .calm-btn.aud-none { display: inline-flex !important; }
:root[data-look="calm"][data-aud-default] .calm-cta .calm-chips.aud-none { display: flex !important; }
:root[data-look="calm"][data-aud-default] .calm-cta .aud-more { display: none !important; }

