/* ============================================================================
   Ganit Siksha — single stylesheet
   Mobile first. Light is the base palette; dark is layered on top so that both
   an explicit [data-theme] choice and the OS preference are honoured.
   No web fonts, no frameworks: everything below ships in one small file.
   ========================================================================== */

/* --- Design tokens: light ------------------------------------------------
   Palette sampled directly from the supplied logo: navy #143048, teal #30a8c0,
   gold #f0c060. Interactive teals are darkened from the logo value so text and
   icons clear WCAG AA against their backgrounds.
   ------------------------------------------------------------------------ */
:root {
    color-scheme: light;

    --bg: #f7fbfb;
    --bg-raised: #ffffff;
    --bg-sunken: #eaf4f5;
    --bg-accent: #e3f1f3;

    --text: #12293c;
    --text-muted: #47637a;
    --text-faint: #66808f;

    --border: #d7e6e9;
    --border-strong: #b8d2d8;

    --brand: #0d6a85;
    --brand-strong: #084f66;
    --brand-contrast: #ffffff;
    --brand-soft: #ddeff3;

    --navy: #143048;
    --teal: #30a8c0;
    --gold: #f0c060;

    --accent: #8a5a00;
    --accent-soft: #fbf0d8;

    --shadow-sm: 0 1px 2px rgba(18, 41, 60, .06), 0 2px 8px rgba(18, 41, 60, .05);
    --shadow-md: 0 4px 12px rgba(18, 41, 60, .08), 0 12px 32px rgba(18, 41, 60, .07);

    --radius-sm: .5rem;
    --radius: .875rem;
    --radius-lg: 1.25rem;

    --shell: 70rem;
    --gutter: 1.25rem;

    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* --- Design tokens: dark (OS preference, unless light is pinned) --------- */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;

        --bg: #0a1a26;
        --bg-raised: #10283a;
        --bg-sunken: #061219;
        --bg-accent: #12303f;

        --text: #e8f2f6;
        --text-muted: #a2bcc9;
        --text-faint: #82a0b0;

        --border: #1e3a4c;
        --border-strong: #2f5266;

        --brand: #4fc3dc;
        --brand-strong: #7ad6e9;
        --brand-contrast: #04222e;
        --brand-soft: #12313f;

        --accent: #f0c060;
        --accent-soft: #2a2312;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, .45), 0 12px 32px rgba(0, 0, 0, .35);
    }
}

/* --- Design tokens: dark (explicit choice, wins in both directions) ------ */
:root[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0a1a26;
    --bg-raised: #10283a;
    --bg-sunken: #061219;
    --bg-accent: #12303f;

    --text: #e8f2f6;
    --text-muted: #a2bcc9;
    --text-faint: #82a0b0;

    --border: #1e3a4c;
    --border-strong: #2f5266;

    --brand: #4fc3dc;
    --brand-strong: #7ad6e9;
    --brand-contrast: #04222e;
    --brand-soft: #12313f;

    --accent: #f0c060;
    --accent-soft: #2a2312;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .45), 0 12px 32px rgba(0, 0, 0, .35);
}

/* --- Reset --------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    line-height: 1.2;
    margin: 0 0 .5em;
    font-weight: 600;
    letter-spacing: -.01em;
    /* Georgia defaults to old-style figures, where 0 reads as a lowercase o.
       Lining figures are the right choice on a maths site. */
    font-variant-numeric: lining-nums;
    font-feature-settings: "lnum" 1;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--brand);
    text-underline-offset: .18em;
    text-decoration-thickness: .07em;
}

a:hover { color: var(--brand-strong); }

img, svg { max-width: 100%; }

table { border-collapse: collapse; }

:where(a, button, summary, [tabindex]):focus-visible {
    outline: 2.5px solid var(--brand);
    outline-offset: 3px;
    border-radius: .25rem;
}

/* --- Utilities ----------------------------------------------------------- */
.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.shell--narrow { max-width: 48rem; }

.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: -9999px;
    top: 0;
    z-index: 100;
    padding: .75rem 1.25rem;
    background: var(--brand);
    color: var(--brand-contrast);
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
    left: 0;
    color: var(--brand-contrast);
}

.eyebrow {
    margin: 0 0 1rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-faint);
}

/* --- Header -------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.6) blur(10px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.brand__mark {
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
}

.brand__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand__name {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.2;
}

.brand__tag {
    font-size: .6875rem;
    color: var(--text-faint);
    line-height: 1.3;
    /* The tagline is decoration on a narrow phone; the h1 carries it properly. */
    display: none;
}

.theme-toggle {
    display: grid;
    place-items: center;
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: .7rem;
    background: var(--bg-raised);
    color: var(--text-muted);
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.theme-toggle:hover {
    color: var(--brand);
    border-color: var(--brand);
}

.theme-toggle__icon {
    grid-area: 1 / 1;
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Show the icon for the theme you would switch TO. */
.theme-toggle__icon--moon { display: none; }

:root[data-theme="dark"] .theme-toggle__icon--sun { display: none; }
:root[data-theme="dark"] .theme-toggle__icon--moon { display: block; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle__icon--sun { display: none; }
    :root:not([data-theme="light"]) .theme-toggle__icon--moon { display: block; }
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
    padding: 3rem 0 2.5rem;
    background:
        radial-gradient(60rem 24rem at 12% -10%, var(--brand-soft), transparent 60%),
        radial-gradient(50rem 22rem at 100% 0%, var(--accent-soft), transparent 55%);
}

.hero__title {
    margin: 0 0 .75rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.hero__title-deva {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--brand);
    letter-spacing: 0;
    line-height: 1.4;
}

.hero__title-latin {
    font-size: clamp(2.25rem, 9vw, 4rem);
    letter-spacing: -.025em;
}

.hero__tagline {
    font-size: clamp(1.0625rem, 3.6vw, 1.375rem);
    font-family: var(--font-serif);
    color: var(--text);
    margin-bottom: 1rem;
    max-width: 34ch;
}

.hero__tagline strong { color: var(--brand); font-weight: 600; }
.hero__tagline em { font-style: italic; }

.hero__tagline-sum {
    display: block;
    margin-top: .35rem;
    color: var(--text-muted);
    font-size: .9em;
}

.hero__lede {
    max-width: 58ch;
    color: var(--text-muted);
    font-size: 1.0625rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1.75rem 0 2rem;
}

.hero__stats {
    display: grid;
    gap: .875rem;
    margin: 0;
    padding: 1.25rem 0 0;
    border-top: 1px solid var(--border);
}

.hero__stat dt {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.hero__stat dd {
    margin: .15rem 0 0;
    font-family: var(--font-serif);
    font-variant-numeric: lining-nums;
    font-feature-settings: "lnum" 1;
    font-size: 1.0625rem;
}

/* --- Buttons ------------------------------------------------------------- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 2.875rem;
    padding: .6rem 1.35rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    font-size: .9375rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}

.button--primary {
    background: var(--brand);
    color: var(--brand-contrast);
}

.button--primary:hover {
    background: var(--brand-strong);
    color: var(--brand-contrast);
    transform: translateY(-1px);
}

.button--ghost {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text);
}

.button--ghost:hover {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-1px);
}

.button[aria-busy="true"] { opacity: .65; cursor: progress; }

/* --- Sections ------------------------------------------------------------ */
.section {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

.section--accent { background: var(--bg-sunken); }

.section--formula {
    background: var(--bg-sunken);
    border-top: none;
}

.section__head { max-width: 60ch; margin-bottom: 2rem; }

.section__head h2 { font-size: clamp(1.5rem, 5.5vw, 2.125rem); }

.section__sub {
    color: var(--text-muted);
    font-size: 1.0625rem;
    margin: 0;
}

/* --- Badge --------------------------------------------------------------- */
.badge {
    display: inline-block;
    vertical-align: middle;
    margin-left: .5rem;
    padding: .2rem .6rem;
    border-radius: 999px;
    background: var(--gold);
    color: #4a3300;
    font-family: var(--font-sans);
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* --- Formula card -------------------------------------------------------- */
.formula-card {
    position: relative;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem 1.25rem;
    overflow: hidden;
}

.formula-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--teal), var(--gold));
}

.formula-card[aria-busy="true"] { opacity: .55; }

.formula-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .875rem;
}

.chip {
    display: inline-block;
    padding: .2rem .625rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .01em;
}

.chip:empty { display: none; }

.chip--topic { background: var(--brand-soft); color: var(--brand-strong); }
.chip--level { background: var(--bg-sunken); color: var(--text-muted); border: 1px solid var(--border); }

.formula-card__name {
    font-size: clamp(1.375rem, 5vw, 1.875rem);
    margin-bottom: 1rem;
}

.formula-card__expression-wrap {
    display: flex;
    flex-direction: column;
    gap: .625rem;
    padding: 1.125rem 1rem;
    background: var(--bg-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.formula-card__expression {
    margin: 0;
    font-family: var(--font-serif);
    font-variant-numeric: lining-nums;
    font-feature-settings: "lnum" 1;
    font-size: clamp(1.375rem, 6.5vw, 2.25rem);
    line-height: 1.35;
    letter-spacing: .01em;
    overflow-wrap: break-word;
}

.copy-button {
    align-self: flex-start;
    padding: .3rem .7rem;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--bg-raised);
    color: var(--text-muted);
    font: inherit;
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}

.copy-button:hover { color: var(--brand); border-color: var(--brand); }
.copy-button[hidden] { display: none; }

.formula-card__body { display: grid; gap: 1.25rem; }

.formula-card__label {
    margin: 0 0 .3rem;
    font-family: var(--font-sans);
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.formula-card__block p { color: var(--text); }

.formula-card__symbols { margin-top: 1.25rem; }
.formula-card__symbols[hidden] { display: none; }

.symbol-list {
    display: grid;
    gap: .5rem;
    margin: 0;
}

.symbol-list__item {
    display: grid;
    grid-template-columns: minmax(2.5rem, auto) 1fr;
    gap: .75rem;
    align-items: baseline;
    padding: .45rem .7rem;
    background: var(--bg-sunken);
    border-radius: var(--radius-sm);
}

.symbol-list dt {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--brand);
}

.symbol-list dd {
    margin: 0;
    color: var(--text-muted);
    font-size: .9375rem;
}

.formula-card__foot {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.formula-card__source {
    margin: 0;
    font-size: .8125rem;
    color: var(--text-faint);
}

.formula-note {
    margin: 1rem 0 0;
    font-size: .875rem;
    color: var(--text-faint);
}

/* --- Card grids ---------------------------------------------------------- */
.cards { display: grid; gap: 1rem; }

.card {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.375rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.card__title { font-size: 1.1875rem; margin-bottom: .5rem; }
.card p { color: var(--text-muted); margin: 0; }

/* --- Why the name -------------------------------------------------------- */
.reason-grid { display: grid; gap: 1.75rem; }

.reason__title {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    font-size: 1.1875rem;
    margin-bottom: .5rem;
}

.reason__num {
    flex: none;
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--brand);
    color: var(--brand-contrast);
    font-family: var(--font-sans);
    font-size: .8125rem;
    font-weight: 700;
    align-self: center;
}

.reason p { color: var(--text-muted); margin: 0; }
.reason strong { color: var(--text); }

.pronounce {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .5rem;
    margin: 2rem 0 0;
    padding: 1rem 1.25rem;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius-sm);
}

.pronounce__label {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.pronounce__value {
    font-family: var(--font-mono);
    font-size: 1.0625rem;
    font-weight: 600;
}

.pronounce__gloss { color: var(--text-muted); font-size: .9375rem; }

/* --- Curriculum table ---------------------------------------------------- */
.table-scroll {
    margin-top: 2rem;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-raised);
}

.curriculum-table {
    width: 100%;
    min-width: 36rem;
    font-size: .9375rem;
}

.curriculum-table caption {
    padding: .875rem 1rem;
    text-align: left;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-faint);
    border-bottom: 1px solid var(--border);
}

.curriculum-table th,
.curriculum-table td {
    padding: .7rem 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

.curriculum-table thead th {
    font-family: var(--font-sans);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--text-faint);
    background: var(--bg-sunken);
}

.curriculum-table tbody th { font-weight: 600; }
.curriculum-table td { color: var(--text-muted); }
.curriculum-table tbody tr:last-child th,
.curriculum-table tbody tr:last-child td { border-bottom: none; }

/* --- Topics -------------------------------------------------------------- */
.topic-grid {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.topic {
    padding: 1.125rem 1.25rem;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-left: 4px solid var(--teal);
}

.topic__title { font-size: 1.0625rem; margin-bottom: .3rem; }
.topic p { margin: 0; color: var(--text-muted); font-size: .9375rem; }

/* --- Steps --------------------------------------------------------------- */
.steps {
    display: grid;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step {
    counter-increment: step;
    padding-left: 3rem;
    position: relative;
}

.step::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 50%;
    border: 1.5px solid var(--brand);
    color: var(--brand);
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
}

.step__title { font-size: 1.0625rem; margin-bottom: .3rem; }
.step p { color: var(--text-muted); margin: 0; }

/* --- FAQ ----------------------------------------------------------------- */
.faq { display: grid; gap: .75rem; }

.faq__item {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.faq__question {
    padding: 1rem 3rem 1rem 1.125rem;
    position: relative;
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq__question::-webkit-details-marker { display: none; }

.faq__question::after {
    content: "";
    position: absolute;
    right: 1.25rem;
    top: 1.45rem;
    width: .5rem;
    height: .5rem;
    border-right: 2px solid var(--text-faint);
    border-bottom: 2px solid var(--text-faint);
    transform: rotate(45deg);
    transition: transform .18s ease;
}

.faq__item[open] .faq__question::after { transform: rotate(-135deg); }
.faq__item[open] .faq__question { color: var(--brand); }

.faq__answer {
    padding: 0 1.125rem 1.125rem;
    color: var(--text-muted);
}

/* --- Footer -------------------------------------------------------------- */
.site-footer {
    padding: 2.5rem 0 3rem;
    background: var(--bg-raised);
    border-top: 1px solid var(--border);
    font-size: .9375rem;
}

.site-footer__logo {
    width: 10rem;
    height: 6.46rem; /* 659 x 426 source, held to width */
    margin-bottom: 1rem;
    background: url("../img/logo-480.png") no-repeat left center / contain;
}

/* The navy wordmark disappears on a dark ground, so swap in the light artwork. */
:root[data-theme="dark"] .site-footer__logo {
    background-image: url("../img/logo-480-dark.png");
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .site-footer__logo {
        background-image: url("../img/logo-480-dark.png");
    }
}

.site-footer__brand { font-family: var(--font-serif); font-size: 1.0625rem; }
.site-footer__note { color: var(--text-muted); max-width: 60ch; }

.site-footer__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1.25rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    color: var(--text-faint);
    font-size: .875rem;
}

/* --- Error page ---------------------------------------------------------- */
.error-page { padding: 4rem 0 5rem; }
.error-page code { font-family: var(--font-mono); font-size: .875rem; }

/* ============================================================================
   Breakpoints — everything above is the phone layout.
   ========================================================================== */

@media (min-width: 34rem) {
    .brand__tag { display: block; }
    .hero__stats { grid-template-columns: repeat(3, 1fr); }

    .formula-card { padding: 2rem 1.75rem; }

    .formula-card__expression-wrap {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .copy-button { align-self: center; flex: none; }

    .formula-card__foot {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .formula-card__source { text-align: right; max-width: 22rem; }

    .symbol-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 48rem) {
    :root { --gutter: 2rem; }

    .hero { padding: 4.5rem 0 3.5rem; }
    .section { padding: 4rem 0; }

    .cards--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cards--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .reason-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 2.5rem; }
    .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 2.5rem; }

    .formula-card__body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
}

@media (min-width: 64rem) {
    .hero { padding: 5.5rem 0 4rem; }
    .hero__inner { max-width: 52rem; }
    .topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .formula-card { padding: 2.5rem; }
}

/* --- Motion and print ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@media print {
    .site-header,
    .hero__actions,
    .theme-toggle,
    .copy-button,
    #new-formula,
    .skip-link { display: none !important; }

    body { background: #fff; color: #000; }
    .section, .formula-card { break-inside: avoid; box-shadow: none; }
}
