/* ============================================================
   Learn16 — design system for every course it serves
   Mobile-first, calm editorial style with restrained accents.
   Palette: "Ink Blue & Madder" — deep slate blue primary, madder
   red accent, brass highlight, on a cool paper neutral. Chosen for
   long study sessions: every text/background pair below clears
   WCAG AA (see the ratio notes beside each token).
   ============================================================ */

:root {
    /* Colour tokens — cool paper neutrals */
    --color-bg: #f6f5f1;
    --color-bg-raised: #ffffff;
    --color-bg-sunken: #eae9e3;
    --color-ink: #1b1f26;          /* 15.15:1 on --color-bg */
    --color-ink-soft: #4c535e;     /* 7.11:1 on --color-bg */
    --color-ink-faint: #5f6875;    /* 5.17:1 on --color-bg, 4.64:1 on --color-bg-sunken */
    --color-line: #d8d5cc;

    /* Brand — "Ink Blue & Madder". These variable names are inherited from the
       first course site this one was forked from and now hold that course's
       colours. The names are kept so no consumer of var(--color-*) breaks. */
    --color-green: #1e4c6b;        /* primary — deep ink blue; 8.36:1 on --color-bg, 9.13:1 with white text */
    --color-green-deep: #143a53;   /* primary hover — 10.94:1 on --color-bg */
    --color-green-tint: #e2ebf2;   /* primary tint — 7.56:1 under --color-green */
    --color-terracotta: #9c2b3a;   /* accent — madder red; 6.83:1 on --color-bg, 7.45:1 with white text */
    --color-terracotta-tint: #f6e7e9;
    --color-gold: #8a6414;         /* brass highlight — 5.37:1 on white */

    --color-success: #1d6b47;      /* 5.50:1 on --color-success-bg */
    --color-success-bg: #e2f0e8;
    --color-warning: #8a5a06;      /* 5.23:1 on --color-warning-bg */
    --color-warning-bg: #fbf0d6;
    --color-error: #a52c1c;        /* 5.75:1 on --color-error-bg */
    --color-error-bg: #fae3de;

    /* Typography. A course whose target the house faces do not cover adds its
       own coverage faces under its own `body[data-target-lang=…]` block below;
       --font-mono carries the IPA characters wherever they are used. */
    --font-body: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --font-mono: "SF Mono", "Cascadia Code", Consolas, "DejaVu Sans Mono", monospace;

    --text-xs: 0.78rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.375rem;
    --text-2xl: clamp(1.6rem, 1.2rem + 2vw, 2.1rem);
    --text-3xl: clamp(2.1rem, 1.5rem + 3.5vw, 3.2rem);
    --text-hero: clamp(2.5rem, 1.6rem + 5vw, 4.4rem);

    --leading-tight: 1.15;
    --leading-body: 1.65;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4.5rem;

    /* Radii & shadows */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(27, 31, 38, 0.06);
    --shadow-md: 0 6px 18px rgba(27, 31, 38, 0.08);
    --shadow-lg: 0 18px 44px rgba(27, 31, 38, 0.12);

    --content-width: 72rem;
    --reading-width: 46rem;

    /* Focus — solid enough to clear 3:1 against every surface it lands on
       (6.93:1 on white, 6.36:1 on the page background). */
    --focus-ring: 0 0 0 3px rgba(30, 76, 107, 0.9);

    --breakpoint-nav: 56rem;
}

/* ---------- Reset & base ---------- */

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001s !important;
        transition-duration: 0.001s !important;
    }
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-body);
    color: var(--color-ink);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: var(--leading-tight);
    color: var(--color-ink);
    margin: 0 0 var(--space-3);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); margin-top: var(--space-7); }
h3 { font-size: var(--text-xl); }

p { margin: 0 0 var(--space-4); }

a { color: var(--color-green); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--color-green-deep); }

ul, ol { padding-left: var(--space-5); }

img, svg { max-width: 100%; }

/* Inline IPA and easy-pronunciation examples quoted inside running prose.
   Deliberately not .pron-ipa / .pron-easy: those are hidden by the learner's
   pronunciation-display preference, which would gut the sentences they sit in. */
code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    padding: 0.1em 0.3em;
    background: var(--color-bg-sunken);
    border-radius: var(--radius-sm);
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-sm);
}

/* box-shadow is dropped in Windows High Contrast / forced-colours mode, so
   fall back to a real outline there rather than leaving focus invisible. */
@media (forced-colors: active) {
    :focus-visible { outline: 3px solid Highlight; outline-offset: 2px; }
}

/* ---------- Per-course typography ------------------------------------
   A course whose target the house faces do not carry names its own coverage
   faces here, keyed off the target language the layout publishes on <body>.
   The generic rules above stay the same for every course. */

body[data-target-lang=ru] {
    --font-body: "Avenir Next", "Segoe UI", system-ui, -apple-system, "PT Sans", "Noto Sans", sans-serif;
    --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "PT Serif", "Noto Serif", serif;
}

/* ---------- Target-language marks above the capital line ----------------
   A course that marks stress writes the mark after the stressed vowel — кни́га,
   молоко́ — and the mark rises above the capital line. Two things can clip it: a
   horizontal scroll container (overflow-x: auto forces overflow-y to compute as
   auto, which can cut the mark off or raise a stray scrollbar) and the tight
   1.15 heading leading. Both are handled here; every other target-language box
   inherits the roomy 1.65 body line-height. */

.matrix-scroll,
.vocab-table-wrap,
.formula-box { overflow-y: hidden; }

/* Any run of text carrying its own lang tag inside a heading gets room for what
   sits above it, whichever language that turn out to be. */
h1[lang], h2[lang], h3[lang],
h1 [lang], h2 [lang], h3 [lang] { line-height: 1.4; }

.container {
    width: 100%;
    max-width: var(--content-width);
    margin-inline: auto;
    padding-inline: var(--space-4);
}

@media (min-width: 48rem) {
    .container { padding-inline: var(--space-6); }
}

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

.skip-link {
    position: absolute;
    left: var(--space-4);
    top: -4rem;
    z-index: 100;
    padding: var(--space-2) var(--space-4);
    background: var(--color-ink);
    color: #fff;
    border-radius: var(--radius-sm);
    transition: top 0.15s ease;
}
.skip-link:focus { top: var(--space-3); color: #fff; }

.site-main { min-height: 60vh; }

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(246, 245, 241, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-line);
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding-block: var(--space-3);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-ink);
    text-decoration: none;
}
/* One file for both jobs — the header carries /assets/icons/logo-mark.svg and so
   does the tab — so the logo and the favicon cannot drift apart. */
.brand-mark { display: block; width: 1.9rem; height: 1.9rem; }
.brand-name { font-weight: 700; letter-spacing: -0.015em; }

.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-2);
    background: none;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.nav-toggle-bar {
    width: 20px; height: 2px;
    background: var(--color-ink);
    border-radius: 2px;
}

.nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: var(--space-1);
    margin: 0;
    padding: var(--space-4);
    list-style: none;
    background: var(--color-bg-raised);
    border-bottom: 1px solid var(--color-line);
    box-shadow: var(--shadow-md);
}

.nav-list.is-open { display: flex; }

.nav-list a {
    display: block;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    color: var(--color-ink-soft);
    text-decoration: none;
    font-weight: 500;
}
.nav-list a:hover { background: var(--color-bg-sunken); color: var(--color-ink); }
.nav-list a.is-active { color: var(--color-green); background: var(--color-green-tint); }

/* ---------- Header dropdowns ---------- */

.nav-drop-bar {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-drop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem; height: 1.75rem;
    padding: 0;
    background: none;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--color-ink-faint);
    cursor: pointer;
}
.nav-drop-btn:hover { color: var(--color-ink); background: var(--color-bg-sunken); }
.nav-drop-btn svg { transition: transform 0.15s ease; }
.nav-drop.is-open > .nav-drop-bar > .nav-drop-btn svg { transform: rotate(180deg); }
/* A group is current when anything inside it is: Materials above /grammar/cases/,
   Course above lesson 12. */
.nav-drop.is-current > .nav-drop-bar,
.nav-drop.is-current > .nav-drop-bar > .nav-drop-link,
.nav-drop.is-current > .nav-drop-bar > .nav-drop-btn { color: var(--color-green); }

/* Buttons inherit nothing: the labelled control has to be told to look like the
   links beside it, or the menu reads as two different kinds of thing. */
.nav-drop-btn--label {
    width: auto;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--color-ink-soft);
}
.nav-drop-btn--label:hover { color: var(--color-ink); }

/* The chevron button is the only control that opens a panel, so the panel is
   reachable by keyboard and hidden from assistive tech when shut. On desktop the
   pointer may open it too — see the media query below. */
.nav-drop-panel {
    display: none;
    margin-top: var(--space-1);
    padding-left: var(--space-3);
    border-left: 2px solid var(--color-green-tint);
}
.nav-drop.is-open > .nav-drop-panel { display: block; }

.nav-drop-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-drop-list a {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    color: var(--color-ink-soft);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--text-sm);
}

/* Three columns at the narrowest, more if the width allows: the longest course
   stays a panel rather than turning into a page of its own. */
.nav-lesson-grid { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.nav-lesson-number {
    flex: none;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-ink-faint);
}
.nav-lesson-title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@media (min-width: 56rem) {
    .nav-toggle { display: none; }
    .nav-list {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: var(--space-1);
        padding: 0;
        background: none;
        border: 0;
        box-shadow: none;
    }

    /* The panels hang from the header rather than from their trigger: a 24-lesson
       grid needs the width, and centring it on the container keeps it inside the
       viewport at every desktop size. */
    .nav-drop-panel {
        display: block;
        position: absolute;
        top: calc(100% + var(--space-2));
        left: 50%;
        transform: translateX(-50%);
        width: 15rem;
        margin: 0;
        padding: var(--space-3) var(--space-4);
        background: var(--color-bg-raised);
        border: 1px solid var(--color-line);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.14s ease, visibility 0.14s;
    }
    .nav-drop--wide .nav-drop-panel { width: min(46rem, 94vw); }
    .nav-drop.is-open > .nav-drop-panel,
    .nav-drop:hover > .nav-drop-panel,
    .nav-drop:focus-within > .nav-drop-panel {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }
    .nav-lesson-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2px var(--space-5);
    }
    .nav-drop-list a { padding: var(--space-2); }
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.8rem 1.6rem;
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.2;
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--color-green); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--color-green-deep); color: #fff; }

.btn-accent { background: var(--color-terracotta); color: #fff; box-shadow: var(--shadow-md); }
.btn-accent:hover { background: #852331; color: #fff; }

.btn-outline { border-color: var(--color-green); color: var(--color-green); background: transparent; }
.btn-outline:hover { background: var(--color-green-tint); }

.btn-small { padding: 0.5rem 1.1rem; font-size: var(--text-sm); }

.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: var(--space-8) 0 var(--space-7);
    background:
        radial-gradient(42rem 22rem at 85% -10%, rgba(156, 43, 58, 0.10), transparent 60%),
        radial-gradient(36rem 20rem at -10% 20%, rgba(30, 76, 107, 0.10), transparent 60%);
}

.hero-inner {
    display: grid;
    gap: var(--space-6);
    align-items: center;
}

@media (min-width: 56rem) {
    .hero-inner { grid-template-columns: 1.15fr 0.85fr; }
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-green);
    background: var(--color-green-tint);
    border-radius: var(--radius-pill);
}

.hero h1 {
    font-size: var(--text-hero);
    letter-spacing: -0.01em;
    margin-bottom: var(--space-4);
}
.hero h1 em {
    font-style: italic;
    color: var(--color-terracotta);
}

.hero-lead {
    font-size: var(--text-lg);
    color: var(--color-ink-soft);
    max-width: 34rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

/* Mini case-matrix demo on the hero */
.hero-demo {
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-lg);
}
.hero-demo-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
}

/* ---------- Sections ---------- */

.section { padding: var(--space-7) 0; }
.section--sunken { background: var(--color-bg-sunken); }

.section-header {
    max-width: var(--reading-width);
    margin-bottom: var(--space-6);
}
.section-header p { color: var(--color-ink-soft); }

.section-kicker {
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-terracotta);
    margin-bottom: var(--space-2);
}

/* ---------- Cards & grids ---------- */

.card-grid {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: 1fr;
}
@media (min-width: 40rem) { .card-grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 48rem) { .card-grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64rem) { .card-grid--4 { grid-template-columns: repeat(4, 1fr); } }

.card {
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.feature-card .feature-icon {
    display: inline-flex;
    width: 2.75rem; height: 2.75rem;
    align-items: center; justify-content: center;
    margin-bottom: var(--space-3);
    color: var(--color-green);
    background: var(--color-green-tint);
    border-radius: var(--radius-md);
}
.feature-card h3 { font-size: var(--text-lg); }
.feature-card p { color: var(--color-ink-soft); margin-bottom: 0; }

/* ---------- Lesson cards ---------- */

.lesson-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.lesson-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.lesson-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.lesson-number {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-terracotta);
}
.lesson-status {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-ink-faint);
}
.lesson-status.is-complete { color: var(--color-success); }
.lesson-status.is-started { color: var(--color-gold); }

.lesson-card-title { margin: 0; font-size: var(--text-xl); }
.lesson-card-title a { color: var(--color-ink); text-decoration: none; }
.lesson-card-title a:hover { color: var(--color-green); }

.lesson-card-desc {
    color: var(--color-ink-soft);
    font-size: var(--text-sm);
    flex: 1;
    margin: 0;
}

.lesson-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--text-xs);
    color: var(--color-ink-faint);
}

.lesson-card-cta { align-self: flex-start; }

/* ---------- Progress bar ---------- */

.progress-bar {
    height: 0.5rem;
    background: var(--color-bg-sunken);
    border-radius: var(--radius-pill);
    overflow: hidden;
}
.progress-bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--color-green), #2f6f96);
    border-radius: var(--radius-pill);
    transition: width 0.4s ease;
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs { padding: var(--space-4) 0 0; font-size: var(--text-sm); }
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}
.breadcrumbs li + li::before {
    content: "/";
    margin-right: var(--space-2);
    color: var(--color-ink-faint);
}
.breadcrumbs a { color: var(--color-ink-soft); }

/* ---------- Lesson page ---------- */

.lesson-layout {
    display: grid;
    gap: var(--space-6);
    padding-bottom: var(--space-8);
}

@media (min-width: 64rem) {
    .lesson-layout { grid-template-columns: 16rem 1fr; }
}

.lesson-toc {
    position: static;
    align-self: start;
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}
@media (min-width: 64rem) {
    .lesson-toc { position: sticky; top: 5.5rem; }
}
.lesson-toc-heading {
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-ink-faint);
    margin-bottom: var(--space-2);
}
.lesson-toc ol { margin: 0; padding-left: var(--space-4); font-size: var(--text-sm); }
.lesson-toc a { color: var(--color-ink-soft); text-decoration: none; }
.lesson-toc a:hover { color: var(--color-green); }

.lesson-content { max-width: var(--reading-width); }

.lesson-hero {
    padding: var(--space-5) 0 var(--space-4);
}
.lesson-hero h1 { margin-bottom: var(--space-3); }
.lesson-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-ink-faint);
}

.lesson-section {
    padding: var(--space-5) 0;
    border-top: 1px solid var(--color-line);
}
.lesson-section > h2:first-child { margin-top: 0; }

.objectives-list {
    display: grid;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}
.objectives-list li {
    position: relative;
    padding-left: var(--space-5);
}
.objectives-list li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.55em;
    width: 0.55rem; height: 0.55rem;
    background: var(--color-terracotta);
    border-radius: 50%;
}

.theory-block {
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-left: 4px solid var(--color-green);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
}
.theory-block h3 { margin-top: 0; }

/* A theory block flagged "soundFocus" in content is the lesson's phonetics
   block (stress, reduction, ИК-3, palatalisation). It gets the accent colour
   so the pronunciation work is visible rather than buried in the theory. */
.theory-block--sound { border-left-color: var(--color-terracotta); }
.theory-block-eyebrow {
    margin: 0 0 var(--space-2);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-terracotta);
}

.lesson-hero-figure { margin: var(--space-5) 0 0; }
/* The cards come in three shapes — 1360x768, 1024x1024 and 912x1136 — and the
   hero spans the whole 72rem container, so a portrait one at width:100% would
   stand about 1430px tall. Cap the height instead and let the width follow. */
.lesson-hero-figure img {
    width: auto;
    max-width: 100%;
    max-height: 30rem;
    height: auto;
    display: block;
    margin-inline: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-line);
}

.theory-figure { margin: var(--space-4) 0 0; }
.theory-figure img {
    width: 100%;
    max-width: 32rem;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-line);
}
.lesson-summary-figure img { max-width: 22rem; }

.example-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.example-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2) var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
}
.example-target { font-weight: 600; font-size: var(--text-lg); }
.example-en { color: var(--color-ink-soft); }

/* ---------- Grammar matrix ---------- */

.grammar-matrix { margin: var(--space-5) 0; }
.matrix-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-3);
}
.matrix-scroll { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--color-line); }
.matrix-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg-raised);
    font-size: var(--text-sm);
}
.matrix-table th, .matrix-table td {
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--color-line);
    text-align: left;
    white-space: nowrap;
}
.matrix-table thead th {
    background: var(--color-green);
    color: #fff;
    font-weight: 600;
}
.matrix-table tbody th {
    background: var(--color-bg-sunken);
    font-weight: 600;
}
.matrix-table tr.is-highlight td { background: var(--color-terracotta-tint); font-weight: 600; }
.matrix-note { font-size: var(--text-sm); color: var(--color-ink-soft); margin-top: var(--space-3); }

/* ---------- Vocabulary table ---------- */

.vocab-table-wrap { overflow-x: auto; border: 1px solid var(--color-line); border-radius: var(--radius-md); }
.vocab-table { width: 100%; border-collapse: collapse; background: var(--color-bg-raised); }
.vocab-table th, .vocab-table td {
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--color-line);
    text-align: left;
    vertical-align: middle;
}
.vocab-table thead th { background: var(--color-bg-sunken); font-size: var(--text-sm); }
.vocab-target { font-weight: 600; white-space: nowrap; }
.vocab-pron { font-size: var(--text-xs); color: var(--color-ink-faint); display: block; }

/* Nouns: gender + animacy. Verbs: aspect + a link to the partner verb. */
.vocab-grammar { font-size: var(--text-xs); color: var(--color-ink-soft); white-space: nowrap; }
.vocab-grammar-pair { display: block; }
.vocab-grammar-pair a { font-weight: 600; }

/* Narrow screens: the grammar and lesson columns drop out and gender/aspect
   reappears inline under the headword, so no information is lost and the
   remaining columns still fit inside the horizontal scroll wrapper. */
.vocab-grammar-inline {
    display: block;
    margin-top: 0.15rem;
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--color-ink-faint);
}
@media (min-width: 48rem) {
    .vocab-grammar-inline { display: none; }
}
@media (max-width: 47.9375rem) {
    .vocab-table .col-grammar { display: none; }
}
@media (max-width: 39.9375rem) {
    .vocab-table .col-lesson { display: none; }
}

/* Collapsible six-case declension for the nouns of a lesson. Rendered with the
   shared grammar-matrix partial, so it only needs a frame of its own. */
.declension-panel {
    margin-top: var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
}
.declension-panel > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-green);
}
.declension-panel > p { margin: var(--space-3) 0 0; font-size: var(--text-sm); color: var(--color-ink-soft); }
.declension-panel .grammar-matrix { margin: var(--space-4) 0 0; }

/* ---------- Phrase cards ---------- */

.phrase-list { display: grid; gap: var(--space-4); }

.phrase-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}
@media (min-width: 40rem) {
    .phrase-card { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

.phrase-target {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-1);
}
.phrase-english { color: var(--color-ink-soft); margin-bottom: var(--space-2); }
.phrase-note {
    font-size: var(--text-sm);
    color: var(--color-warning);
    background: var(--color-warning-bg);
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
}

.phrase-meta { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }

.tag {
    display: inline-block;
    padding: 0.1rem 0.6rem;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-ink-soft);
    background: var(--color-bg-sunken);
    border-radius: var(--radius-pill);
}
.tag-register { color: var(--color-green); background: var(--color-green-tint); }

.phrase-card-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.fav-btn {
    display: inline-flex;
    padding: var(--space-2);
    color: var(--color-ink-faint);
    background: none;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-pill);
    cursor: pointer;
}
.fav-btn[aria-pressed="true"] { color: var(--color-terracotta); border-color: var(--color-terracotta); background: var(--color-terracotta-tint); }
.fav-btn[aria-pressed="true"] svg path { fill: currentColor; }

/* ---------- Pronunciation lines & preference ---------- */

/* One-line standfirst under a reference section heading, and the "See also"
   cross-links between pronunciation sections. */
.section-summary {
    font-size: var(--text-lg);
    color: var(--color-ink-soft);
    margin-bottom: var(--space-4);
}
.section-seealso { font-size: var(--text-sm); color: var(--color-ink-soft); }

.pron-lines { display: grid; gap: var(--space-1); }
.pron { margin: 0; font-size: var(--text-sm); display: flex; gap: var(--space-2); align-items: baseline; }
.pron-label {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-ink-faint);
    min-width: 3.2rem;
}
.pron-ipa .pron-value { font-family: var(--font-mono); font-size: var(--text-sm); }
.pron-easy .pron-value { font-weight: 600; letter-spacing: 0.02em; }

body[data-pron="ipa"] .pron-easy { display: none; }
body[data-pron="easy"] .pron-ipa { display: none; }
body[data-pron="hide"] .pron-lines { display: none; }

.pron-pref {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-ink-soft);
}
.pron-pref select {
    padding: var(--space-1) var(--space-2);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    background: var(--color-bg-raised);
    font: inherit;
}

/* ---------- Audio buttons ---------- */

.audio-controls { display: inline-flex; gap: var(--space-2); }

.audio-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    font: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-green);
    background: var(--color-green-tint);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background 0.12s ease;
}
.audio-btn:hover { background: #c8d6e0; }
.audio-btn--slow { color: var(--color-terracotta); background: var(--color-terracotta-tint); }
.audio-btn--slow:hover { background: #f2dcdf; }
.audio-btn--sm { padding: var(--space-1) var(--space-3); font-size: var(--text-xs); }
.audio-btn.is-playing { background: var(--color-green); color: #fff; }
.audio-btn--slow.is-playing { background: var(--color-terracotta); color: #fff; }

.audio-unavailable {
    font-size: var(--text-sm);
    color: var(--color-ink-faint);
}

/* ---------- Dialogues ---------- */

.dialogue {
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}
.dialogue-title { font-size: var(--text-lg); margin-bottom: var(--space-1); }
.dialogue-context { font-size: var(--text-sm); color: var(--color-ink-faint); margin-bottom: var(--space-4); }

.dialogue-lines { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.dialogue-line {
    display: grid;
    gap: var(--space-1);
    max-width: 90%;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--color-bg-sunken);
}
.dialogue-line--b {
    justify-self: end;
    background: var(--color-green-tint);
}
.dialogue-speaker { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-ink-faint); }
.dialogue-target { font-weight: 600; font-size: var(--text-lg); margin: 0; }
.dialogue-en { color: var(--color-ink-soft); font-size: var(--text-sm); margin: 0; }
.dialogue-line .audio-controls { margin-top: var(--space-1); }

/* ---------- Exercises ---------- */

.exercise {
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}
.exercise-type {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-green);
    background: var(--color-green-tint);
    padding: 0.15rem 0.7rem;
    border-radius: var(--radius-pill);
}
.exercise-number { font-size: var(--text-xs); color: var(--color-ink-faint); }

.exercise-instruction { color: var(--color-ink-soft); margin-bottom: var(--space-2); }
.exercise-prompt {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.ex-options { display: grid; gap: var(--space-2); margin: 0 0 var(--space-4); padding: 0; list-style: none; }
.ex-option {
    width: 100%;
    text-align: left;
    padding: var(--space-3) var(--space-4);
    font: inherit;
    background: var(--color-bg);
    border: 2px solid var(--color-line);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.ex-option:hover { border-color: var(--color-green); }
.ex-option[aria-pressed="true"] { border-color: var(--color-green); background: var(--color-green-tint); }
.ex-option.is-correct { border-color: var(--color-success); background: var(--color-success-bg); }
.ex-option.is-wrong { border-color: var(--color-error); background: var(--color-error-bg); }
.ex-option[disabled] { cursor: default; }

.ex-input {
    width: 100%;
    max-width: 28rem;
    padding: var(--space-3) var(--space-4);
    font: inherit;
    font-size: var(--text-lg);
    color: var(--color-ink);
    background: var(--color-bg);
    border: 2px solid var(--color-line);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}
.ex-input:focus { border-color: var(--color-green); outline: none; box-shadow: var(--focus-ring); }

.ex-word-bank { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.ex-word {
    padding: var(--space-2) var(--space-3);
    font: inherit;
    background: var(--color-bg-raised);
    border: 2px solid var(--color-line);
    border-radius: var(--radius-md);
    cursor: pointer;
}
.ex-word[aria-pressed="true"] { border-color: var(--color-green); background: var(--color-green-tint); }
.ex-word[disabled] { opacity: 0.4; cursor: default; }
.ex-answer-line {
    min-height: 3rem;
    padding: var(--space-2) var(--space-3);
    border: 2px dashed var(--color-line);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}

.ex-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-bottom: var(--space-4); }
.ex-pair-btn {
    padding: var(--space-2) var(--space-3);
    font: inherit;
    background: var(--color-bg);
    border: 2px solid var(--color-line);
    border-radius: var(--radius-md);
    cursor: pointer;
}
.ex-pair-btn.is-selected { border-color: var(--color-green); background: var(--color-green-tint); }
.ex-pair-btn.is-matched { border-color: var(--color-success); background: var(--color-success-bg); opacity: 0.7; cursor: default; }

.ex-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

.ex-feedback {
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-weight: 500;
}
.ex-feedback--correct { background: var(--color-success-bg); color: var(--color-success); }
.ex-feedback--almost { background: var(--color-warning-bg); color: var(--color-warning); }
.ex-feedback--wrong { background: var(--color-error-bg); color: var(--color-error); }
.ex-feedback .ex-explanation { display: block; margin-top: var(--space-2); font-weight: 400; }
.ex-feedback .ex-correct-answer { font-weight: 700; }

.exercise-fallback summary { cursor: pointer; color: var(--color-green); font-weight: 600; }

/* Flashcards */
.flashcard {
    max-width: 32rem;
    margin: 0 auto;
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-6);
    text-align: center;
}
.flashcard-front { font-family: var(--font-display); font-size: var(--text-2xl); margin-bottom: var(--space-3); }
.flashcard-back { font-size: var(--text-lg); color: var(--color-ink-soft); }
.self-rate { display: flex; gap: var(--space-2); justify-content: center; margin-top: var(--space-4); flex-wrap: wrap; }

/* ---------- Checkpoint / summary ---------- */

.checkpoint {
    background: var(--color-green-tint);
    border: 1px solid var(--color-green);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin: var(--space-5) 0;
}
.checkpoint h2, .checkpoint h3 { margin-top: 0; }
.checkpoint ol { margin-bottom: 0; }

.remember-box {
    background: var(--color-terracotta-tint);
    border-left: 4px solid var(--color-terracotta);
    border-radius: var(--radius-md);
    padding: var(--space-5);
}
.remember-box h2, .remember-box h3 { margin-top: 0; }

.speak-now {
    background: var(--color-bg-raised);
    border: 2px dashed var(--color-gold);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin: var(--space-5) 0;
}

/* ---------- Lesson prev/next ---------- */

.lesson-nav {
    display: grid;
    gap: var(--space-3);
    margin-top: var(--space-7);
}
@media (min-width: 40rem) { .lesson-nav { grid-template-columns: 1fr 1fr; } }
.lesson-nav-card {
    display: block;
    padding: var(--space-4) var(--space-5);
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-ink);
}
.lesson-nav-card:hover { border-color: var(--color-green); }
.lesson-nav-card--next { text-align: right; }
.lesson-nav-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-ink-faint); }
.lesson-nav-title { font-weight: 600; }

.complete-lesson-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-6);
    padding: var(--space-4) var(--space-5);
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
}

/* ---------- Reference pages ---------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
    margin-bottom: var(--space-5);
    padding: var(--space-4);
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
}
.filter-bar input[type="search"], .filter-bar select {
    padding: var(--space-2) var(--space-3);
    font: inherit;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
}
.filter-bar input[type="search"] { flex: 1; min-width: 12rem; }

.category-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); }
.chip {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-ink-soft);
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-pill);
    text-decoration: none;
}
.chip:hover { border-color: var(--color-green); color: var(--color-green); }
.chip.is-active { background: var(--color-green); border-color: var(--color-green); color: #fff; }

.topic-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 40rem) { .topic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 56rem) { .topic-grid { grid-template-columns: repeat(3, 1fr); } }

.topic-card {
    display: block;
    padding: var(--space-4) var(--space-5);
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-ink);
}
.topic-card:hover { border-color: var(--color-green); box-shadow: var(--shadow-sm); }
.topic-card h3 { font-size: var(--text-lg); margin-bottom: var(--space-1); }
.topic-card p { font-size: var(--text-sm); color: var(--color-ink-soft); margin: 0; }

.formula-box {
    font-family: var(--font-mono);
    font-size: var(--text-lg);
    line-height: 1.5;
    text-align: center;
    padding: var(--space-4);
    background: var(--color-ink);
    color: #efece4;
    border-radius: var(--radius-md);
    margin: var(--space-4) 0;
    overflow-x: auto;
}

.mistake-box {
    border: 1px solid var(--color-error);
    background: var(--color-error-bg);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    margin: var(--space-4) 0;
}
.mistake-box .mistake-heading {
    font-weight: 700;
    color: var(--color-error);
    margin-bottom: var(--space-2);
}

/* ---------- FAQ ---------- */

.faq-item { border-bottom: 1px solid var(--color-line); }
.faq-item summary {
    cursor: pointer;
    padding: var(--space-4) 0;
    font-weight: 600;
    font-size: var(--text-lg);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
}
.faq-item summary::after {
    content: "+";
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--color-terracotta);
}
.faq-item[open] summary::after { content: "–"; }
/* The question arrives as several spans — markTarget() marks each run of the
   target language — so it is one flex item, not a row of them that
   space-between would spread across the page. */
.faq-question { flex: 1 1 auto; }
.faq-item p { color: var(--color-ink-soft); padding-bottom: var(--space-4); margin: 0; }

/* ---------- Stats / progress page ---------- */

.stat-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 48rem) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
    text-align: center;
    background: var(--color-bg-raised);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}
.stat-value {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--color-green);
}
.stat-label { font-size: var(--text-sm); color: var(--color-ink-faint); }

.empty-state {
    text-align: center;
    padding: var(--space-7) var(--space-5);
    background: var(--color-bg-raised);
    border: 1px dashed var(--color-line);
    border-radius: var(--radius-lg);
    color: var(--color-ink-soft);
}

/* ---------- Toast / messages ---------- */

.toast-region {
    position: fixed;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    display: grid;
    gap: var(--space-2);
    width: min(24rem, calc(100% - 2rem));
}
.toast {
    padding: var(--space-3) var(--space-4);
    background: var(--color-ink);
    color: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: var(--text-sm);
}

/* ---------- Footer ---------- */

.site-footer {
    margin-top: var(--space-8);
    background: var(--color-ink);
    color: #cbc9c2;
}
.footer-grid {
    display: grid;
    gap: var(--space-6);
    padding-block: var(--space-7);
}
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-name { font-family: var(--font-display); font-size: var(--text-xl); color: #fff; margin-bottom: var(--space-2); }
.footer-tagline { font-size: var(--text-sm); max-width: 22rem; }
.footer-heading { font-size: var(--text-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; margin-bottom: var(--space-3); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.footer-nav a { color: #cbc9c2; text-decoration: none; }
.footer-nav a:hover { color: #fff; }
.footer-bottom {
    padding-block: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: var(--text-xs);
}

/* ---------- Progress page lesson rows ---------- */

.lesson-row {
    display: grid;
    grid-template-columns: minmax(7rem, 12rem) 1fr auto;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-line);
    font-size: var(--text-sm);
}
.lesson-row:last-child { border-bottom: 0; }
.lesson-row [data-lesson-status] {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-ink-faint);
}
.lesson-row [data-lesson-status].is-complete { color: var(--color-success); }
.lesson-row [data-lesson-status].is-started { color: var(--color-gold); }
@media (max-width: 39.9375rem) {
    .lesson-row { grid-template-columns: 1fr auto; }
    .lesson-row .progress-bar { grid-column: 1 / -1; }
}

/* ---------- Interactive control boundaries (WCAG 1.4.11) ----------
   --color-line is a hairline meant for card edges. Where a border is the only
   thing separating a control from the surface behind it, it has to read at
   3:1, so these use --color-ink-faint (5.64:1 on white). Kept last in the file
   so source order settles the cascade instead of extra specificity, leaving
   the hover, focus and pressed rules above in charge of their own states. */
.ex-input,
.ex-option,
.ex-word,
.ex-pair-btn,
.ex-answer-line,
.filter-bar input[type="search"],
.filter-bar select,
.pron-pref select,
.nav-toggle,
.fav-btn { border-color: var(--color-ink-faint); }

/* Course index cards. */
.card-subline {
    color: var(--color-ink-faint);
    font-size: var(--text-sm);
    font-weight: 700;
    margin: 0 0 var(--space-2);
}

