/*
 * Night Desk: base layer (originally the Birch Archive base; the palette now
 * comes only from the Night Desk tokens).
 *
 * Self-hosted fonts, a small reset, typography and the shared primitives
 * used by both the static pages and the case app:
 *   .btn .btn--primary .btn--quiet .btn--danger
 *   .field .input
 *   .card .tag .badge .label-tab .sealed-label .contour-rule
 *   .stack .cluster .split
 *   .visually-hidden .skip-link .dialog .toast .kbd .muted .num
 *
 * Flat rectangles, hairline borders, no gradients, no drop shadows.
 * Colours come only from tokens.css.
 */

/* ------------------------------------------------------------------ */
/* Fonts (files copied from @fontsource into /assets/fonts/)           */
/* ------------------------------------------------------------------ */
/*
 * Every face comes as two files, split the way @fontsource splits them:
 * "latin" (ASCII, Western European letters, general punctuation) and
 * "latin-ext" (the rest of the Latin script, including Turkish ğ Ğ İ ş Ş).
 * The unicode-range on each rule is copied from the package's unicode.json,
 * so a page downloads a latin-ext file only when its text uses one of those
 * letters. The two ranges overlap on a few code points (U+0131 dotless i,
 * U+0304, U+0308, U+0329); the rule declared last is tried first, so the
 * latin rule comes second, as in @fontsource's own CSS. The build checks
 * that every character a case shows has a glyph in the fonts that draw it
 * (scripts/font-coverage.mjs).
 */

/* Spectral: body text. The 500 face also serves bold, so the browser
   never synthesises a smeared faux bold. */
@font-face {
  font-family: 'Spectral';
  src: url('/assets/fonts/spectral-latin-ext-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Spectral';
  src: url('/assets/fonts/spectral-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: 'Spectral';
  src: url('/assets/fonts/spectral-latin-ext-500-normal.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Spectral';
  src: url('/assets/fonts/spectral-latin-500-normal.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: 'Spectral';
  src: url('/assets/fonts/spectral-latin-ext-400-italic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Spectral';
  src: url('/assets/fonts/spectral-latin-400-italic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
  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;
}

/* Sofia Sans Condensed: display, labels, buttons. */
@font-face {
  font-family: 'Sofia Sans Condensed';
  src: url('/assets/fonts/sofia-sans-condensed-latin-ext-600-normal.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Sofia Sans Condensed';
  src: url('/assets/fonts/sofia-sans-condensed-latin-600-normal.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: 'Sofia Sans Condensed';
  src: url('/assets/fonts/sofia-sans-condensed-latin-ext-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Sofia Sans Condensed';
  src: url('/assets/fonts/sofia-sans-condensed-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: 'Sofia Sans Condensed';
  src: url('/assets/fonts/sofia-sans-condensed-latin-ext-800-normal.woff2') format('woff2');
  font-weight: 800 900;
  font-style: normal;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Sofia Sans Condensed';
  src: url('/assets/fonts/sofia-sans-condensed-latin-800-normal.woff2') format('woff2');
  font-weight: 800 900;
  font-style: normal;
  font-display: swap;
  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;
}

/* Azeret Mono: accession numbers, codes, scores. */
@font-face {
  font-family: 'Azeret Mono';
  src: url('/assets/fonts/azeret-mono-latin-ext-400-normal.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Azeret Mono';
  src: url('/assets/fonts/azeret-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  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;
}

/* Hands: one per writer in the documents. */
@font-face {
  font-family: 'Kalam';
  src: url('/assets/fonts/kalam-latin-ext-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Kalam';
  src: url('/assets/fonts/kalam-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: 'Caveat';
  src: url('/assets/fonts/caveat-latin-ext-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Caveat';
  src: url('/assets/fonts/caveat-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}

/* Homemade Apple and Nothing You Could Do were only ever drawn for the
   latin set: they have no ğ, İ or ş, and Nothing You Could Do has no
   dotless ı either. Their stacks in tokens.css name a second hand straight
   after them, declared here only for the letters they lack, so those
   letters are written in a similar hand instead of a system font. */
@font-face {
  font-family: 'Homemade Apple';
  src: url('/assets/fonts/homemade-apple-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}

/* Ms Madi: a quick, connected pen script like Homemade Apple, but with a
   smaller x-height, so it is scaled up to sit on the same line. */
@font-face {
  font-family: 'Ms Madi';
  src: url('/assets/fonts/ms-madi-latin-ext-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
  size-adjust: 150%;
}

@font-face {
  font-family: 'Nothing You Could Do';
  src: url('/assets/fonts/nothing-you-could-do-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}

/* Annie Use Your Telescope: by the same designer as Nothing You Could Do
   (Kimberly Geswein), with the same thin, quick pen and x-height. Its latin
   file is used for the dotless ı alone (U+0131 lives in the latin subset). */
@font-face {
  font-family: 'Annie Use Your Telescope';
  src: url('/assets/fonts/annie-use-your-telescope-latin-ext-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Annie Use Your Telescope';
  src: url('/assets/fonts/annie-use-your-telescope-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0131;
}

/* Hand d: Marck Script, a slanted, joined letter-writing script. Hand e:
   Shadows Into Light Two, a thin, upright ballpoint print. Both carry the
   Turkish letters in their own latin-ext files, and neither resembles the
   other hands (Kalam, Caveat, Homemade Apple, Nothing You Could Do). */
@font-face {
  font-family: 'Marck Script';
  src: url('/assets/fonts/marck-script-latin-ext-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Marck Script';
  src: url('/assets/fonts/marck-script-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}

/* Kaushan Script: hand d's fallback, a slanted brush-pen script of much the
   same weight and rhythm. Marck Script has no Spanish ordinals (ª º, as in
   "4.º izda." or "n.º"), no superscripts (m² m³), fractions or minus sign,
   and a few latin-ext letters (Ŋ ŋ Ț ț and others). Each file is declared
   only for those code points, so it downloads only when a page in hand d
   uses one of them, and Marck Script draws everything else. */
@font-face {
  font-family: 'Kaushan Script';
  src: url('/assets/fonts/kaushan-script-latin-ext-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0132, U+014A-014B, U+018F, U+01EA-01EB, U+01FA-01FB,
    U+021A-021B, U+0237, U+0259, U+1E44-1E45, U+1EF8-1EF9;
}

@font-face {
  font-family: 'Kaushan Script';
  src: url('/assets/fonts/kaushan-script-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+00A4, U+00AA, U+00AC, U+00B2-00B3, U+00B6, U+00B9-00BA,
    U+00BC-00BE, U+02BC, U+2122, U+2212, U+2215;
}

@font-face {
  font-family: 'Shadows Into Light Two';
  src: url('/assets/fonts/shadows-into-light-two-latin-ext-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Shadows Into Light Two';
  src: url('/assets/fonts/shadows-into-light-two-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}

/* ------------------------------------------------------------------ */
/* Arabic faces (planning/languages-plan.md, section 2.6). Each ships its */
/* "arabic" subset only, so English and Turkish pages never load them:  */
/* the browser takes a character from the first face of a stack that    */
/* covers it, and these sit second in each stack (tokens.css). Arabic    */
/* letters run smaller than Latin at one font size, so size-adjust       */
/* evens them out against the Latin face beside them.                    */
/*   body: Markazi Text (a text serif for news, near Spectral's paper);  */
/*   labels, stamps and codes: Noto Kufi Arabic;                         */
/*   hands: officer Aref Ruqaa, a Aref Ruqaa Ink, b Mirza, c Katibeh,    */
/*   d Alkalami, e Marhey, so no two writers share a face;               */
/*   the desk's own labels and the player's notes: Marhey (--font-hand-ui), */
/*   plainer than Ruqʿah at label size.                                  */
/* ------------------------------------------------------------------ */

@font-face {
  font-family: 'Markazi Text';
  src: url('/assets/fonts/markazi-text-arabic-400-normal.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  size-adjust: 115%;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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;
}

@font-face {
  font-family: 'Markazi Text';
  src: url('/assets/fonts/markazi-text-arabic-600-normal.woff2') format('woff2');
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
  size-adjust: 115%;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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;
}

@font-face {
  font-family: 'Noto Kufi Arabic';
  src: url('/assets/fonts/noto-kufi-arabic-arabic-600-normal.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  size-adjust: 92%;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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;
}

@font-face {
  font-family: 'Noto Kufi Arabic';
  src: url('/assets/fonts/noto-kufi-arabic-arabic-800-normal.woff2') format('woff2');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
  size-adjust: 92%;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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;
}

@font-face {
  font-family: 'Aref Ruqaa';
  src: url('/assets/fonts/aref-ruqaa-arabic-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  size-adjust: 105%;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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;
}

@font-face {
  font-family: 'Aref Ruqaa Ink';
  src: url('/assets/fonts/aref-ruqaa-ink-arabic-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  size-adjust: 105%;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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;
}

@font-face {
  font-family: 'Mirza';
  src: url('/assets/fonts/mirza-arabic-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  size-adjust: 112%;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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;
}

@font-face {
  font-family: 'Katibeh';
  src: url('/assets/fonts/katibeh-arabic-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  size-adjust: 118%;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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;
}

@font-face {
  font-family: 'Alkalami';
  src: url('/assets/fonts/alkalami-arabic-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  size-adjust: 96%;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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;
}

@font-face {
  font-family: 'Marhey';
  src: url('/assets/fonts/marhey-arabic-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  size-adjust: 92%;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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;
}

/* ------------------------------------------------------------------ */
/* Reset                                                               */
/* ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  tab-size: 2;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-2);
  font-weight: 400;
  line-height: var(--lh-body);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

[hidden] {
  display: none !important;
}

/* Margins start at zero; layout primitives (.stack, .prose) add rhythm.
   :where() keeps these at zero specificity so any component wins. */
:where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote, pre, table, fieldset) {
  margin: 0;
}

:where(p, ul, ol, dl, blockquote, pre, table, figure) + :where(p, ul, ol, dl, blockquote, pre, table, figure) {
  margin-top: var(--s-3);
}

:where(ul, ol) {
  padding-inline-start: 1.4em;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding-inline-start: 0;
}

img,
picture,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

table {
  border-collapse: collapse;
}

th {
  text-align: start;
}

/* ------------------------------------------------------------------ */
/* Typography                                                          */
/* ------------------------------------------------------------------ */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: var(--lh-tight);
  letter-spacing: -0.005em;
  text-wrap: balance;
}

h1 {
  font-size: var(--t-6);
  font-weight: 800;
}

h2 {
  font-size: var(--t-5);
  font-weight: 700;
}

h3 {
  font-size: var(--t-4);
  font-weight: 700;
  line-height: 1.12;
}

h4 {
  font-size: var(--t-3);
  font-weight: 700;
  line-height: 1.2;
}

h5,
h6 {
  font-family: var(--font-display);
  font-size: var(--t-0);
  font-weight: 700;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--ink-muted);
}

p,
li,
dd {
  text-wrap: pretty;
}

.lede {
  font-size: var(--t-3);
  line-height: 1.5;
  max-width: var(--measure);
}

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

strong,
b {
  font-weight: 600;
}

small {
  font-size: 0.875em;
}

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

code {
  padding: 0.05em 0.3em;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
}

pre {
  overflow-x: auto;
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  line-height: 1.5;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
}

blockquote {
  padding-inline-start: var(--s-4);
  border-inline-start: 2px solid var(--rule-strong);
  font-style: italic;
}

hr {
  height: 0;
  margin: var(--s-6) 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

mark {
  padding: 0 0.15em;
  background: var(--warn-wash);
  color: var(--ink);
}

abbr[title] {
  text-decoration: underline dotted;
  text-underline-offset: 0.2em;
}

dt {
  font-weight: 600;
}

::selection {
  background: var(--wash);
  color: var(--ink);
}

/* ------------------------------------------------------------------ */
/* Focus                                                               */
/* ------------------------------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Skip-link targets (main with tabindex="-1") are not controls. */
[tabindex="-1"]:focus {
  outline: none;
}

/* ------------------------------------------------------------------ */
/* Layout primitives                                                   */
/* ------------------------------------------------------------------ */

/* Vertical rhythm with gap. Set --gap to change it. */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap, var(--s-4));
}

.stack > * {
  margin-block: 0;
}

.stack--tight {
  --gap: var(--s-2);
}

.stack--loose {
  --gap: var(--s-6);
}

/* Inline group that wraps. */
.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap, var(--s-3));
}

.cluster > * {
  margin: 0;
}

ul.stack,
ol.stack,
ul.cluster,
ol.cluster {
  list-style: none;
  padding-inline-start: 0;
}

/* Two or more blocks side by side that fall into a column when narrow. */
.split {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--gap, var(--s-5) var(--s-6));
}

.split > * {
  flex: 1 1 16rem;
  min-width: 0;
  margin: 0;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--tap);
  min-width: var(--tap);
  margin: 0;
  padding: var(--s-2) var(--s-4);
  font-family: var(--font-display);
  font-size: var(--t-1);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.btn:hover {
  border-color: var(--ink);
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  flex: none;
  width: 1.15em;
  height: 1.15em;
}

.btn--primary {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: color-mix(in srgb, var(--accent) 84%, var(--ink));
  border-color: color-mix(in srgb, var(--accent) 84%, var(--ink));
}

.btn--quiet {
  color: var(--ink);
  background: transparent;
  border-color: transparent;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 0.45em;
}

.btn--quiet:hover {
  background: var(--wash);
  border-color: transparent;
  text-decoration-color: var(--ink);
}

.btn--danger {
  color: var(--on-mark);
  background: var(--mark);
  border-color: var(--mark);
}

.btn--danger:hover {
  background: color-mix(in srgb, var(--mark) 84%, var(--ink));
  border-color: color-mix(in srgb, var(--mark) 84%, var(--ink));
}

/* Toggle buttons (aria-pressed): a solid lake-green rail on the base. */
.btn[aria-pressed="true"] {
  color: var(--ink);
  background: var(--wash);
  border-color: var(--accent);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn:disabled:hover,
.btn[aria-disabled="true"]:hover {
  border-color: var(--rule-strong);
}

.btn--primary:disabled:hover,
.btn--primary[aria-disabled="true"]:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn--danger:disabled:hover,
.btn--danger[aria-disabled="true"]:hover {
  background: var(--mark);
  border-color: var(--mark);
}

.btn--quiet:disabled:hover,
.btn--quiet[aria-disabled="true"]:hover {
  background: transparent;
  border-color: transparent;
}

/* ------------------------------------------------------------------ */
/* Form fields                                                         */
/* ------------------------------------------------------------------ */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  min-width: 0;
  margin: 0;
}

.field > label,
.field__label {
  font-family: var(--font-display);
  font-size: var(--t-1);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: 0.02em;
  color: var(--ink);
}

.field__hint {
  font-size: var(--t-0);
  line-height: 1.45;
  color: var(--ink-muted);
}

.field__error {
  font-size: var(--t-0);
  font-weight: 600;
  line-height: 1.45;
  color: var(--mark);
}

/* Checkbox or radio next to its label. */
.field--inline {
  flex-direction: row;
  align-items: center;
  gap: var(--s-3);
  min-height: var(--tap);
}

.field--inline > label {
  font-family: var(--font-body);
  font-size: var(--t-2);
  font-weight: 400;
  letter-spacing: 0;
}

fieldset {
  min-width: 0;
  padding: var(--s-4);
  border: 1px solid var(--rule);
  border-radius: var(--r);
}

legend {
  padding: 0 var(--s-2);
  font-family: var(--font-display);
  font-size: var(--t-0);
  font-weight: 700;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--ink-muted);
}

.input {
  display: block;
  width: 100%;
  min-height: var(--tap);
  margin: 0;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: max(1rem, 16px);
  line-height: 1.4;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r);
  appearance: none;
  transition: border-color var(--dur) var(--ease);
}

.input::placeholder {
  color: var(--ink-muted);
  opacity: 1;
}

.input:hover {
  border-color: var(--ink-muted);
}

.input:focus-visible {
  border-color: var(--accent);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.input[aria-invalid="true"] {
  border-color: var(--mark);
  box-shadow: inset 3px 0 0 var(--mark);
}

.input:disabled,
.input[readonly] {
  background: var(--bg);
  color: var(--ink-muted);
}

.input:disabled {
  cursor: not-allowed;
}

select.input {
  padding-inline-end: 2.5rem;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px 8px;
  cursor: pointer;
}

select.input[multiple],
select.input[size] {
  padding-inline-end: 0.75rem;
  background-image: none;
}

textarea.input {
  min-height: 7rem;
  padding-block: 0.625rem;
  line-height: 1.5;
  resize: vertical;
}

/* Codes, PINs and room codes. */
.input--mono {
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
}

input[type="checkbox"],
input[type="radio"] {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--accent);
}

/* ------------------------------------------------------------------ */
/* Surfaces and labels                                                 */
/* ------------------------------------------------------------------ */
.card {
  min-width: 0;
  padding: var(--s-5);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
}

.card--wash {
  background: var(--wash);
  border-color: transparent;
}

/* Exhibit and evidence tags: square, left-bordered, monospaced. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  max-width: 100%;
  padding-block: 0.12em 0.1em;
  padding-inline: 0.45em 0.5em;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-decoration: none;
  vertical-align: baseline;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-inline-start: 3px solid var(--accent);
  border-radius: 0;
}

a.tag:hover,
button.tag:hover {
  border-color: var(--rule-strong);
  border-inline-start-color: var(--accent);
  background: var(--wash);
}

button.tag {
  min-height: 28px;
  cursor: pointer;
}

/* Status and category: condensed capitals in a hairline box. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.38em 0.6em 0.32em;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
  color: var(--accent);
  background: transparent;
  border: 1px solid currentColor;
  border-radius: var(--r);
}

.badge--solid {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}

.badge--mark {
  color: var(--mark);
}

.badge--muted {
  color: var(--ink-muted);
}

/*
 * Accession tab: the paper tab on an archive folder. Tracked capitals,
 * a lake-green rail on top, and an optional mono number after a hairline:
 *   <p class="label-tab">Step <span class="num">01</span></p>
 */
.label-tab {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6em;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0.4em 0.75em 0.32em;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--accent);
  border-radius: var(--r) var(--r) 0 0;
}

.label-tab .num {
  padding-inline-start: 0.6em;
  font-size: 0.95em;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
  border-inline-start: 1px solid var(--rule);
}

.stack > .label-tab,
.split > .label-tab {
  align-self: flex-start;
}

/* Brick SEALED label: a double-ruled wax mark. */
.sealed-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  width: fit-content;
  padding-block: 0.38em 0.3em;
  padding-inline: 0.7em calc(0.75em - var(--track-wide));
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--mark);
  background: transparent;
  border: 3px double var(--mark);
  border-radius: var(--r);
}

.sealed-label::before {
  content: "";
  flex: none;
  width: 0.5em;
  height: 0.5em;
  background: currentColor;
  transform: rotate(45deg);
}

.sealed-label--stamp {
  transform: rotate(-2.5deg);
}

/* One hairline lake-depth contour line. Decorative: add aria-hidden. */
.contour-rule {
  display: block;
  width: 100%;
  height: 16px;
  margin-block: var(--s-6);
  border: 0;
  background-color: var(--accent);
  opacity: 0.55;
  -webkit-mask: var(--contour-line) left center / 480px 16px repeat-x;
  mask: var(--contour-line) left center / 480px 16px repeat-x;
}

@supports not ((mask-image: none) or (-webkit-mask-image: none)) {
  .contour-rule {
    height: 0;
    background: none;
    border-top: 1px solid var(--rule);
  }
}

/* ------------------------------------------------------------------ */
/* Overlays and feedback                                               */
/* ------------------------------------------------------------------ */
.dialog {
  width: min(34rem, calc(100vw - 2 * var(--s-4)));
  max-width: none;
  max-height: calc(100dvh - 2 * var(--s-4));
  padding: var(--s-6);
  overflow: auto;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-top: 3px solid var(--accent);
  border-radius: var(--r);
}

.dialog::backdrop {
  background: var(--backdrop);
}

.dialog[open] {
  animation: birch-rise var(--dur-slow) var(--ease);
}

.dialog h2 {
  font-size: var(--t-4);
}

@media (max-width: 30rem) {
  .dialog {
    padding: var(--s-5);
  }
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  width: min(26rem, calc(100vw - 2 * var(--s-4)));
  padding: var(--s-3) var(--s-4);
  font-size: var(--t-1);
  line-height: 1.45;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-inline-start: 4px solid var(--accent);
  border-radius: var(--r);
  animation: birch-rise var(--dur-slow) var(--ease);
}

.toast > p {
  flex: 1;
  margin: 0;
}

.toast--success {
  border-inline-start-color: var(--accent);
}

.toast--warning {
  border-inline-start-color: var(--warn);
}

.toast--error {
  border-inline-start-color: var(--mark);
}

@keyframes birch-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ------------------------------------------------------------------ */
/* Small utilities                                                     */
/* ------------------------------------------------------------------ */
.kbd,
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.05em 0.4em;
  font-family: var(--font-mono);
  font-size: 0.8em;
  line-height: 1.5;
  text-align: center;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-bottom-width: 2px;
  border-radius: var(--r);
}

.muted {
  color: var(--ink-muted);
}

.num {
  font-family: var(--font-mono);
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-transform: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: absolute;
  top: var(--s-3);
  inset-inline-start: var(--s-4);
  z-index: var(--z-skip);
  padding: var(--s-3) var(--s-4);
  font-family: var(--font-display);
  font-size: var(--t-1);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg);
  background: var(--ink);
  border-radius: var(--r);
  transform: translateY(calc(-100% - 2 * var(--s-4)));
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Preferences                                                         */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .btn:active {
    transform: none;
  }
}

@media (forced-colors: active) {
  .contour-rule {
    background-color: CanvasText;
    forced-color-adjust: none;
  }

  .label-tab,
  .tag,
  .badge,
  .sealed-label,
  .btn,
  .card {
    border-color: CanvasText;
  }

  .btn[aria-pressed="true"] {
    outline: 2px solid Highlight;
  }
}

@media print {
  body {
    font-size: 11pt;
    line-height: 1.45;
  }

  .skip-link,
  .theme-toggle {
    display: none !important;
  }

  .btn,
  .card,
  .tag,
  .label-tab {
    break-inside: avoid;
  }

  .contour-rule {
    opacity: 1;
  }

  a {
    color: var(--ink);
  }
}

/* ------------------------------------------------------------------ */
/* Arabic and right to left (planning/languages-plan.md, section 2.5). */
/* The stylesheets use logical properties (margin-inline-start and so  */
/* on), so dir="rtl" mirrors the layout by itself. What follows is    */
/* what logical properties cannot say.                                */
/* ------------------------------------------------------------------ */

/* Arabic letters join: spacing between them breaks the word, the script
   has no capitals, and a slanted Arabic face is only a fake italic.
   Emphasis that English sets in italics is set heavier instead. */
*:lang(ar) {
  letter-spacing: 0 !important;
  font-synthesis-style: none;
}

:lang(ar) em,
:lang(ar) i,
:lang(ar) cite {
  font-style: normal;
  font-weight: 600;
}

/* Arabic needs a little more room between lines for its marks. */
:lang(ar) {
  --lh-ar: 1.75;
}

body:lang(ar) {
  line-height: var(--lh-ar);
}

/* Figures, times, codes, exhibit IDs and nicknames keep their own order
   inside an Arabic line ("23:51-00:05", "A7", "1–4"). */
[dir="rtl"] .num,
[dir="rtl"] code,
[dir="rtl"] kbd,
[dir="rtl"] time {
  unicode-bidi: isolate;
}

[dir="rtl"] .num {
  direction: ltr;
}

/* Fields for times, numbers, codes and addresses are typed left to right,
   aligned with the rest of the right-to-left form. */
[dir="rtl"] input[type="time"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="url"],
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[inputmode="numeric"],
[dir="rtl"] input[inputmode="decimal"] {
  direction: ltr;
  text-align: end;
}

/* A document's table cell takes the direction of its own text, so an English
   line kept in an Arabic case ("10.00 Village hall: ...") shows as written. */
[dir="rtl"] .doc-table th,
[dir="rtl"] .doc-table td {
  unicode-bidi: plaintext;
  text-align: start;
}

/* Arrows that mean "back" and "next" point the other way. */
[dir="rtl"] .app-icon--back,
[dir="rtl"] .app-icon--next {
  transform: scaleX(-1);
}

/* A select's arrow sits at the line's end. */
[dir="rtl"] select.input {
  background-position: left 0.85rem center;
}

/* ------------------------------------------------------------------ */
/* The language menu                                                   */
/* ------------------------------------------------------------------ */
/* One key named for the page's language, set like the navigation beside it,
   that opens a short dark list of the languages, each named in its own
   script; the page's language carries a brass bar. A <details>, so it works
   without script; i18n.js wireLangMenus() closes it on a click elsewhere or
   Escape. Used by the site header and the app's header strips. */
.lang-menu {
  position: relative;
}

.lang-menu__key {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 40px;
  padding: 0 var(--s-3);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  list-style: none;
  border-radius: var(--r);
  cursor: pointer;
  user-select: none;
}

.lang-menu__key::-webkit-details-marker {
  display: none;
}

/* A small brass chevron (a turned corner: physical borders, the same in both directions). */
.lang-menu__key::after {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  margin-block-start: -3px;
  border-right: 2px solid var(--brass);
  border-bottom: 2px solid var(--brass);
  transform: rotate(45deg);
}

.lang-menu[open] > .lang-menu__key::after {
  margin-block-start: 3px;
  transform: rotate(-135deg);
}

.lang-menu__key:hover .lang-menu__current,
.lang-menu[open] > .lang-menu__key .lang-menu__current {
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.lang-menu__key:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.lang-menu__list {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  z-index: 40;
  min-width: 10.5rem;
  margin: 0;
  padding: var(--s-1) 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: 0 14px 30px rgb(var(--shade) / 0.5);
}

.lang-menu__opt {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--s-4);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  border-inline-start: 3px solid transparent;
}

.lang-menu__opt:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--brass) 12%, transparent);
}

.lang-menu__opt[aria-current] {
  color: var(--ink);
  border-inline-start-color: var(--brass);
}

.lang-menu__opt:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}
