/* Simulacro design system v2 (Academia): fonts, tokens, base and the shared blocks. Mobile first, no external assets.
   Components: css/components.css; public header, footer and hero: css/site.css; app shell: css/app.css.
   Guide: docs/design.md. Colours only through the tokens below; dark mode swaps their values. */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("fonts/geist-normal-300-800-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("fonts/geist-normal-300-800-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/geist-mono-normal-400-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/geist-mono-normal-400-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* The serif: Charis 7.000 subsets, renamed (OFL: "Charis" and "SIL" are Reserved Font Names); fonts/NOTICE.txt */
@font-face { font-family: "Simulacro Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/charis-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Simulacro Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/charis-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Simulacro Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/charis-400i-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Simulacro Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/charis-400i-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Simulacro Serif"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/charis-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Simulacro Serif"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/charis-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Simulacro Serif"; font-style: italic; font-weight: 700; font-display: swap; src: url("fonts/charis-700i-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Simulacro Serif"; font-style: italic; font-weight: 700; font-display: swap; src: url("fonts/charis-700i-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Tokens: paper and ink. Tinta is what you know and what you do; rojo is only the correction pen.
   Literal values in all three blocks: the theme sits on <body>, so a var() alias on :root would stay light. */
:root {
  color-scheme: light;
  --papel: #FFFFFF; --pizarra: #F2F4F8; --celeste: #E8EDFA; --regla: #DADFE8; --regla-2: #C5CCDA;
  --grafito: #1B2030; --gris: #586074; --gris-2: #6B7385; --titulo: #111A44; --foco: #2E46B0;
  --tinta: #1D2B6B; --tinta-2: #2E46B0; --on-tinta: #FFFFFF; --noche: #111A44; --on-noche: #FFFFFF; --on-noche-2: #B9C2E3;
  --rojo: #C2272D; --rojo-suave: #FBECEB; --rojo-claro: #F4A3A0;
  --area-sp: #0F6E6E; --area-sp-suave: #E8F7F7; --area-ur: #9A4A00; --area-ur-suave: #F7EFE8;
  --area-mf: #2F6B2F; --area-mf-suave: #E8F7E8; --area-mi: #5B2A86; --area-mi-suave: #F0E8F7;
  --area-pe: #7A5A00; --area-pe-suave: #F7F3E8; --area-go: #A3245E; --area-go-suave: #F7E8EF;
  --area-ci: #1F5A99; --area-ci-suave: #E8EFF7;
  --rampa-1: #A3B2E7; --rampa-2: #7D8FD8; --rampa-3: #5A6EC8; --rampa-4: #3B50AE; --rampa-5: #1D2B6B;
  --on-rampa-lo: #1B2030; --on-rampa-hi: #FFFFFF;
  --bg: #F2F4F8; --surface: #FFFFFF; --surface-2: #F7F8FB; --line: #DADFE8; --line-strong: #C5CCDA;
  --ink: #1B2030; --muted: #586074; --faint: #6B7385;
  --teal: #1D2B6B; --teal-strong: #111A44; --teal-soft: #E8EDFA; --teal-line: #C9D2F0; --on-teal: #FFFFFF;
  --sand: #EEF1F7; --sand-2: #DADFE8; --sand-ink: #3E4760;
  --coral: #1D2B6B; --coral-strong: #111A44; --coral-ink: #C2272D; --coral-soft: #FBECEB; --on-coral: #FFFFFF;
  --band-green: #1D2B6B; --band-amber: #5A6EC8; --band-red: #C2272D;
  --night: #111A44; --night-2: #1A2456; --on-night: #FFFFFF; --on-night-muted: #B9C2E3;
  --shadow-1: 0 1px 2px rgba(17, 26, 68, .06); --shadow-2: 0 1px 2px rgba(17, 26, 68, .05), 0 12px 32px -16px rgba(17, 26, 68, .22);
  --serif: "Simulacro Serif", "Charis SIL", Charter, "Bitstream Charter", Georgia, serif;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4rem; --s9: 6rem; --s10: 8rem;
  --rad-sm: 4px; --rad-btn: 6px; --rad: 8px; --rad-card: 12px; --rad-lg: 14px; --r-sm: 6px; --r: 10px; --r-lg: 14px; --pill: 6px;
  --t-display: clamp(2.5rem, 4.65vw, 4.1875rem); --t-h1: clamp(2.25rem, 3.2vw, 2.875rem); --t-h2: clamp(1.6875rem, 2.5vw, 2.375rem);
  --t-h3: 1.3125rem; --t-lead: clamp(1.125rem, 1.45vw, 1.3125rem); --t-body: 1.0625rem; --t-stem: 1.125rem; --t-expl: 1.09375rem;
  --t-label: .75rem; --t-caption: .84375rem; --lh-body: 1.55; --lh-stem: 1.72; --lh-expl: 1.65;
  --step--1: .8125rem; --step-0: 1.0625rem; --step-1: 1.25rem; --step-2: 1.5625rem; --step-3: 2rem;
  --ease: cubic-bezier(.2, .7, .2, 1); --side-w: 15.75rem;
}
[data-theme="dark"] {
  color-scheme: dark;
  --papel: #151A2C; --pizarra: #0D1120; --celeste: #1E2850; --regla: #283049; --regla-2: #3A4363;
  --grafito: #E5E8F1; --gris: #A8AFC2; --gris-2: #8F97AC; --titulo: #F2F4FA; --foco: #C6D0FF;
  --tinta: #A7B6FF; --tinta-2: #C6D0FF; --on-tinta: #0D1120; --noche: #080B17; --on-noche: #E5E8F1; --on-noche-2: #A8AFC2;
  --rojo: #FF8A8E; --rojo-suave: #3B1B24; --rojo-claro: #F4A3A0;
  --area-sp: #2CB1B1; --area-sp-suave: #163B3B; --area-ur: #D49052; --area-ur-suave: #3B2816;
  --area-mf: #2EB82E; --area-mf-suave: #163B16; --area-mi: #BA8DE2; --area-mi-suave: #2A163B;
  --area-pe: #C09A30; --area-pe-suave: #3B3216; --area-go: #E083AD; --area-go-suave: #3B1627;
  --area-ci: #6EA3DB; --area-ci-suave: #16283B;
  --rampa-1: #2F3B70; --rampa-2: #3F519C; --rampa-3: #687CD2; --rampa-4: #8396E6; --rampa-5: #B3C1F7;
  --on-rampa-lo: #E5E8F1; --on-rampa-hi: #0D1120;
  --bg: #0D1120; --surface: #151A2C; --surface-2: #11162A; --line: #283049; --line-strong: #3A4363;
  --ink: #E5E8F1; --muted: #A8AFC2; --faint: #8F97AC;
  --teal: #A7B6FF; --teal-strong: #C6D0FF; --teal-soft: #1E2850; --teal-line: #2E3A6A; --on-teal: #0D1120;
  --sand: #1A2035; --sand-2: #283049; --sand-ink: #C9CEDD;
  --coral: #A7B6FF; --coral-strong: #C6D0FF; --coral-ink: #FF8A8E; --coral-soft: #3B1B24; --on-coral: #0D1120;
  --band-green: #A7B6FF; --band-amber: #8396E6; --band-red: #FF8A8E;
  --night: #080B17; --night-2: #10162B; --on-night: #E5E8F1; --on-night-muted: #A8AFC2;
  --shadow-1: 0 1px 0 rgba(0, 0, 0, .35); --shadow-2: 0 1px 0 rgba(0, 0, 0, .35), 0 16px 36px -18px rgba(0, 0, 0, .7);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    color-scheme: dark;
    --papel: #151A2C; --pizarra: #0D1120; --celeste: #1E2850; --regla: #283049; --regla-2: #3A4363;
    --grafito: #E5E8F1; --gris: #A8AFC2; --gris-2: #8F97AC; --titulo: #F2F4FA; --foco: #C6D0FF;
    --tinta: #A7B6FF; --tinta-2: #C6D0FF; --on-tinta: #0D1120; --noche: #080B17; --on-noche: #E5E8F1; --on-noche-2: #A8AFC2;
    --rojo: #FF8A8E; --rojo-suave: #3B1B24; --rojo-claro: #F4A3A0;
    --area-sp: #2CB1B1; --area-sp-suave: #163B3B; --area-ur: #D49052; --area-ur-suave: #3B2816;
    --area-mf: #2EB82E; --area-mf-suave: #163B16; --area-mi: #BA8DE2; --area-mi-suave: #2A163B;
    --area-pe: #C09A30; --area-pe-suave: #3B3216; --area-go: #E083AD; --area-go-suave: #3B1627;
    --area-ci: #6EA3DB; --area-ci-suave: #16283B;
    --rampa-1: #2F3B70; --rampa-2: #3F519C; --rampa-3: #687CD2; --rampa-4: #8396E6; --rampa-5: #B3C1F7;
    --on-rampa-lo: #E5E8F1; --on-rampa-hi: #0D1120;
    --bg: #0D1120; --surface: #151A2C; --surface-2: #11162A; --line: #283049; --line-strong: #3A4363;
    --ink: #E5E8F1; --muted: #A8AFC2; --faint: #8F97AC;
    --teal: #A7B6FF; --teal-strong: #C6D0FF; --teal-soft: #1E2850; --teal-line: #2E3A6A; --on-teal: #0D1120;
    --sand: #1A2035; --sand-2: #283049; --sand-ink: #C9CEDD;
    --coral: #A7B6FF; --coral-strong: #C6D0FF; --coral-ink: #FF8A8E; --coral-soft: #3B1B24; --on-coral: #0D1120;
    --band-green: #A7B6FF; --band-amber: #8396E6; --band-red: #FF8A8E;
    --night: #080B17; --night-2: #10162B; --on-night: #E5E8F1; --on-night-muted: #A8AFC2;
    --shadow-1: 0 1px 0 rgba(0, 0, 0, .35); --shadow-2: 0 1px 0 rgba(0, 0, 0, .35), 0 16px 36px -18px rgba(0, 0, 0, .7);
  }
}

/* Base: Geist for what you use and count; the serif for what you read to learn (headings, stems, explanations) */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font: 400 var(--t-body)/var(--lh-body) var(--sans); color: var(--grafito); background: var(--pizarra); font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--tinta-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--tinta); }
h1, h2, h3, .h2, .h3 { margin: 0 0 .6em; font-family: var(--serif); font-weight: 700; font-style: normal; color: var(--titulo); line-height: 1.12; letter-spacing: -.012em; text-wrap: balance; }
h1 { font-size: var(--t-h1); line-height: 1.08; }
h2, .h2 { font-size: var(--t-h2); margin-top: 1.4em; }
h3, .h3 { font-size: var(--t-h3); line-height: 1.2; }
p { margin: 0 0 1em; }
.eyebrow + h1, .eyebrow + h2, .label + h1, .label + h2, .wrap > h2:first-child { margin-top: 0; }
:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--celeste); color: var(--grafito); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--tinta); color: var(--on-tinta); padding: .5rem 1rem; z-index: 50; }
.skip:focus { left: .5rem; }
.mono { font-family: var(--mono); }
.eyebrow, .q-number, .case-label { font-family: var(--sans); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.num, td, th { font-variant-numeric: tabular-nums; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }

/* Layout */
.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
/* Narrow reading columns share the wide grid's left edge, so sections never jump sideways */
.narrow { max-width: 46rem; }
.wrap.narrow { max-width: 72rem; }
.wrap.narrow > * { max-width: 46rem; }
.wrap.narrow.center > * { margin-inline: auto; }
.section { padding: var(--s7) 0; }
.section-alt { background: var(--papel); border-top: 1px solid var(--regla); border-bottom: 1px solid var(--regla); }
.eyebrow { font-size: var(--t-label); color: var(--tinta); margin-bottom: .6rem; }
.note { color: var(--gris); font-size: .92rem; }
.center { text-align: center; }
main { overflow-wrap: break-word; }
body > main, body > .app { flex: 1 0 auto; }
.sample-banner { margin: 0; padding: .45rem 1.25rem; background: var(--celeste); color: var(--grafito); font-size: .9rem; text-align: center; font-weight: 600; }

/* Brand and theme toggle, shared by the public header, the app shell and the exam frame */
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--titulo); text-decoration: none; }
.brand:hover { color: var(--titulo); }
.brand-mark { width: 2rem; height: auto; flex: none; }
.brand-mark rect { fill: var(--tinta); }
.brand-mark .m0 { fill: none; stroke: var(--regla-2); stroke-width: .6; }
.brand-mark .m1 { opacity: .25; } .brand-mark .m2 { opacity: .42; } .brand-mark .m3 { opacity: .6; } .brand-mark .m4 { opacity: .8; }
.brand-word { font: 700 1.125rem/1 var(--sans); letter-spacing: -.02em; white-space: nowrap; }
.brand-word small { margin-left: .2em; font-size: .68em; font-weight: 650; letter-spacing: .12em; color: var(--tinta); }
.theme-form { display: inline-flex; margin: 0; }
.theme-toggle { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 1px solid var(--regla-2); border-radius: var(--rad-btn); background: var(--papel); color: var(--grafito); cursor: pointer; }
.theme-toggle:hover { border-color: var(--tinta); color: var(--tinta); }
.theme-toggle .i-sun, [data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
@media (prefers-color-scheme: dark) { [data-theme="system"] .theme-toggle .i-moon { display: none; } [data-theme="system"] .theme-toggle .i-sun { display: block; } }

/* Buttons: one primary (ink) per screen; ghost and quiet for everything else. Never a pill. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .7rem 1.25rem; border: 1px solid var(--tinta); border-radius: var(--rad-btn); background: var(--tinta); color: var(--on-tinta); font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center; transition: background .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease); }
.btn:hover { background: var(--tinta-2); border-color: var(--tinta-2); color: var(--on-tinta); }
.btn:active { transform: translateY(1px); }
.btn-big { min-height: 56px; padding: 1rem 1.75rem; font-size: 1.0625rem; }
.btn-small { min-height: 40px; padding: .45rem .9rem; font-size: .9375rem; }
.btn-ghost { background: transparent; border-color: var(--regla-2); color: var(--tinta); }
.btn-ghost:hover { background: var(--celeste); border-color: var(--tinta); color: var(--tinta); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--tinta-2); padding-inline: .5rem; }
.btn-quiet:hover { background: var(--celeste); border-color: transparent; color: var(--tinta); }
.btn-teal { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.btn-teal:hover { background: var(--tinta-2); border-color: var(--tinta-2); color: var(--on-teal); }
.btn-danger { background: transparent; border-color: var(--rojo); color: var(--rojo); }
.btn-danger:hover { background: var(--rojo-suave); border-color: var(--rojo); color: var(--rojo); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--tinta-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* Flash messages */
.flashes { padding-top: 1rem; }
.flash { margin: 0 0 .5rem; padding: .8rem 1rem; border-radius: var(--rad); background: var(--celeste); border-left: 3px solid var(--tinta); color: var(--grafito); }
.flash-error { background: var(--rojo-suave); border-color: var(--rojo); }
.flash-success { background: var(--celeste); border-color: var(--tinta); }

/* Hero (public pages; site.css adds the night band) */
.hero { padding: 2.5rem 0 3rem; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero .actions, .hero p.actions { margin: 1.5rem 0 .75rem; }
.hero-card { background: var(--papel); color: var(--grafito); border: 1px solid var(--regla); border-radius: var(--rad-card); padding: 1.5rem; box-shadow: var(--shadow-2); }
.hero-card-title { font: 700 1.25rem/1.2 var(--serif); color: var(--titulo); margin-bottom: .25rem; }
.hero-date strong { color: var(--tinta); }

/* Facts: labels over plain values, like a chart's header */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1rem 0 1.25rem; }
.facts div { background: var(--surface-2); border: 1px solid var(--regla); border-radius: var(--rad); padding: .6rem .8rem; }
.facts dt { font: 600 .6875rem/1.3 var(--sans); color: var(--gris); text-transform: uppercase; letter-spacing: .09em; }
.facts dd { margin: 0; font-weight: 600; color: var(--grafito); }

/* Cards: white paper on the slate ground, a hairline, no shadow */
.cards { display: grid; gap: 1rem; margin-top: 1.5rem; }
.card { background: var(--papel); border: 1px solid var(--regla); border-radius: var(--rad-card); padding: var(--s5); }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.ticks li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem; }
.ticks li::before { content: ""; position: absolute; left: .1rem; top: .45em; width: .8rem; height: .45rem; border-left: 2px solid var(--tinta); border-bottom: 2px solid var(--tinta); transform: rotate(-45deg); }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .04em; color: var(--gris); }

/* Pricing */
.cards.pricing { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.cards.stacked { grid-template-columns: 1fr; }  /* inside a narrow sheet: one column */
.price-card { display: flex; flex-direction: column; position: relative; }
.price-card .btn { margin-top: auto; }
.price-card.featured { border: 2px solid var(--tinta); }
.badge { position: absolute; top: -.8rem; left: 1.4rem; margin: 0; padding: .2rem .6rem; border-radius: var(--rad-sm); background: var(--tinta); color: var(--on-tinta); font: 600 .72rem/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.price { font: 600 2.25rem/1.1 var(--sans); margin: .35rem 0 0; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--titulo); }
.price-days { color: var(--gris); font-size: .92rem; }
.price-was { color: var(--gris); font-size: .6em; font-weight: 500; margin-right: .4rem; }
.price-from { font-weight: 700; }

/* Tutor, guarantee, FAQ */
.tutor { display: grid; gap: 1.25rem; align-items: start; }
.tutor-photo { width: 8.5rem; height: 8.5rem; border-radius: 50%; object-fit: cover; }
.tutor-initials { display: grid; place-items: center; background: var(--tinta); color: var(--on-tinta); font: 700 2.6rem/1 var(--serif); }
.tutor-name { font: 700 1.35rem/1.2 var(--serif); color: var(--titulo); margin-bottom: .25rem; }
.tutor-socials { display: flex; gap: 1rem; }
.tutor-placeholder .tutor-initials { background: var(--regla); color: var(--grafito); }
.guarantee-band { text-align: center; max-width: 46rem; }
.faq { border-bottom: 1px solid var(--regla); padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.faq p { margin: .6rem 0 0; color: var(--gris); }
.final-cta { text-align: center; }

/* Questions on a sheet (the exam frame's own layout is in css/exam.css) */
.questions { list-style: none; padding: 0; margin: 1.5rem 0; }
.question { margin-bottom: 1.25rem; scroll-margin-top: 4.5rem; }
.question fieldset { margin: 0; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.question legend { float: left; width: 100%; padding: 0; margin-bottom: .9rem; }
.q-number { display: block; font-size: .72rem; font-weight: 500; color: var(--teal); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .2rem; }
.q-text { font-weight: 600; white-space: pre-line; }
.option { clear: both; display: flex; gap: .7rem; align-items: flex-start; padding: .75rem .9rem; margin-bottom: .5rem; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; background: var(--surface); transition: border-color .12s var(--ease), background .12s var(--ease); }
.option:hover { border-color: var(--teal); }
.option:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); box-shadow: inset 3px 0 0 var(--teal); }
.option input { margin-top: .3rem; accent-color: var(--teal); }
.option-blank { color: var(--muted); font-size: .92rem; border-style: dashed; }
.letter { font-family: var(--mono); font-weight: 600; color: var(--teal); }
.submit-row { text-align: center; padding-bottom: 2rem; }

/* Results */
.score-card { border-radius: var(--r-lg); padding: 1.5rem; margin: 1rem 0 2rem; color: var(--on-night); background: var(--night); border: 1px solid var(--night-2); border-top: 4px solid var(--band-red); }
.score-card.passed, .score-card.rank.above-min { border-top-color: var(--band-green); }
.score-card.rank.below-min { border-top-color: var(--band-amber); }
.score-card .note { color: var(--on-night-muted); }
.verdict { font: 600 .8125rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .09em; margin: 0; }
.big-pct { font: 600 clamp(3rem, 14vw, 4.5rem)/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: .35rem 0 .6rem; }
.score-card.rank .big-pct { font-size: clamp(2rem, 8.5vw, 3.2rem); }  /* "48 puntos sobre 100" on one line */
.counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1rem 0; }
.counts div { background: var(--night-2); border-radius: var(--r-sm); padding: .5rem .7rem; }
.counts dt { font-size: .8rem; color: var(--on-night-muted); }
.counts dd { margin: 0; font: 600 1.35rem/1.3 var(--sans); font-variant-numeric: tabular-nums; }
.formula { font-variant-numeric: tabular-nums; }
.topic-bars { list-style: none; padding: 0; }
.topic-bars li { margin-bottom: 1rem; }
.topic-line { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 .3rem; font-weight: 600; }
progress { width: 100%; height: .6rem; border: 0; border-radius: var(--pill); background: var(--line); overflow: hidden; appearance: none; -webkit-appearance: none; }
progress::-webkit-progress-bar { background: var(--line); border-radius: var(--pill); }
progress::-webkit-progress-value { background: var(--band, var(--teal)); border-radius: var(--pill); }
progress::-moz-progress-bar { background: var(--band, var(--teal)); border-radius: var(--pill); }
.small-link { font-size: .9rem; }
.cta-box { margin: 2rem 0; padding: 1.5rem; border-radius: var(--r); background: var(--sand); border: 1px solid var(--sand-2); }
.save-box { margin-bottom: 2rem; }
.inline-form { display: grid; gap: .5rem; }
.inline-form .btn { align-self: stretch; }
.review { margin-bottom: 1.25rem; scroll-margin-top: 1rem; }
.review-status { color: var(--muted); }
.review.is-right { border-color: var(--teal-line); }
.explained { list-style: none; padding: 0; margin: 1rem 0; }
.explained li { padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: .5rem; }
.explained li p { margin: 0; }
.explained .why { color: var(--grafito); font: 400 var(--t-expl)/var(--lh-expl) var(--serif); margin-top: .3rem; }
.explained .is-correct { border-color: var(--band-green); background: var(--teal-soft); }
.explained .is-chosen { border-color: var(--coral-ink); background: var(--coral-soft); }
.flag summary { cursor: pointer; color: var(--muted); font-size: .92rem; }
.flag form { display: grid; gap: .5rem; margin-top: .75rem; }
.flag-done, .right-hidden { margin-top: .5rem; }
.right-list { margin: 2rem 0; }
.right-list > summary { cursor: pointer; font-weight: 700; padding: .75rem 0; }
.review a, .q-text { overflow-wrap: anywhere; }

/* Clinical cases, readiness bands */
.case { margin-bottom: 1.75rem; }
.case-label { font-size: var(--t-label); color: var(--tinta); margin-bottom: .4rem; }
.case-stem { margin: 0 0 1rem; padding: 1rem 1.1rem; border-left: 3px solid var(--tinta); border-radius: 0 var(--rad) var(--rad) 0; background: var(--sand); font: 400 var(--t-stem)/var(--lh-stem) var(--serif); }
.case-questions { margin: 0; }
.case-question { padding-top: 1rem; border-top: 1px solid var(--line); margin-top: 1rem; }
.case-question:first-of-type { border-top: 0; margin-top: 0; }
.why-title { font-weight: 700; margin: .8rem 0 .2rem; }
.citation { font-size: var(--t-caption); line-height: 1.5; color: var(--gris); margin-top: 1rem; }
.locked { color: var(--gris); }
.band-label { display: flex; align-items: center; gap: .45rem; margin: .3rem 0 0; font-weight: 600; font-size: .92rem; }
.band-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--band, var(--line)); }
.band-green { --band: var(--band-green); } .band-amber { --band: var(--band-amber); } .band-red { --band: var(--band-red); }
.readiness-cards { list-style: none; padding: 0; display: grid; gap: .5rem; }
.readiness-cards li, .band { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; padding: .6rem .8rem; border: 1px solid var(--line); border-left: 6px solid var(--band, var(--line)); border-radius: var(--r-sm); background: var(--surface); }
.bands { list-style: none; padding: 0; display: grid; gap: .5rem; }
.why-box { margin: .5rem 0; } .why-box summary { font-weight: 700; cursor: pointer; }
.disclaimer { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--sand-2); padding-left: .75rem; }
.sample { margin-bottom: 1rem; }

/* Forms */
.stack-form { display: grid; gap: .6rem; max-width: 30rem; margin: 1.5rem 0; }
label { font-weight: 600; font-size: .95rem; }
input:not([type="radio"]):not([type="checkbox"]), select, textarea { width: 100%; min-height: 44px; padding: .7rem .85rem; font: inherit; color: var(--grafito); background: var(--papel); border: 1px solid var(--regla-2); border-radius: var(--rad-btn); }
input:not([type="radio"]):not([type="checkbox"]):focus, select:focus, textarea:focus { border-color: var(--tinta); outline: 2px solid var(--celeste); outline-offset: 0; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--tinta); width: 1.1rem; height: 1.1rem; }
input[readonly] { background: var(--surface-2); color: var(--muted); }
textarea { resize: vertical; }
.admin-form { max-width: none; }
.option-edit { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .8rem; display: grid; gap: .5rem; }
label.inline { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
form.inline { display: inline; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.reason-picker { margin: 0; padding: 0; border: 0; display: grid; gap: .4rem; }
.reason-picker legend { padding: 0; margin-bottom: .4rem; font-weight: 600; font-size: .95rem; }
.reason-picker .option { margin: 0; }
.resolve-form { display: grid; gap: .5rem; margin-top: 1rem; }

/* Tables and charts */
.table-scroll { overflow-x: auto; margin: 0 0 1.25rem; }
table, .data-table, .format-table { width: 100%; border-collapse: collapse; background: var(--papel); font-size: .95rem; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--regla); vertical-align: top; }
th { font: 600 .6875rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--gris); }
tbody th[scope="row"] { font: 500 .95rem/1.4 var(--sans); text-transform: none; letter-spacing: 0; color: var(--grafito); }
.format-table th[scope="row"] { width: 50%; }
tr.warn td { background: var(--sand); }
.compare-table td.unverified { color: var(--gris); }
.plan-full_mock td, .plan-diagnostic td { font-weight: 700; background: var(--teal-soft); }
.footnotes { font-size: .9rem; color: var(--muted); }
.footnotes a { word-break: break-all; }
.plan-box { margin: 1rem 0 2rem; }
.logout { margin-top: 2rem; }

/* Phones (checked at 360 and 390 px): big tap targets, readable results */
@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .wrap { padding-left: 1rem; padding-right: 1rem; }
  .section { padding: 2rem 0; }
  h1 { font-size: 2rem; }
  .card { padding: 1.125rem; }
  .nav a, .footer-links a, .lang-switch a { min-height: 44px; display: inline-flex; align-items: center; }
  .btn { min-height: 48px; }
  .btn-small { min-height: 44px; }
  .btn-big, .submit-row .btn, .cta-box .btn, .price-card .btn, .inline-form .btn, .stack-form .btn { width: 100%; }
  .theme-toggle { width: 44px; height: 44px; }
  .nav { width: 100%; justify-content: flex-start; gap: .25rem .75rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav > * { flex: none; white-space: nowrap; }
  .nav > .btn { order: -1; }  /* the free CTA leads the strip: at 360 px the end of the strip is off screen */
  .data-table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table.stack tr { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--regla); }
  .data-table.stack th[scope=row] { grid-column: 1 / -1; border: 0; padding-bottom: 0; }
  .data-table.stack td { border: 0; }
  .data-table.stack td[colspan] { grid-column: 1 / -1; }
  .data-table.stack td[data-label]::before { content: attr(data-label); display: block; font: 600 .6875rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--gris); }
  .option { min-height: 52px; padding: .9rem 1rem; align-items: center; font-size: 1.02rem; }
  .option input { flex: none; width: 1.4rem; height: 1.4rem; margin: 0; }
  .score-card { margin-left: -1rem; margin-right: -1rem; padding: 1.25rem 1rem; border-radius: 0; }
  .counts dd { font-size: 1.2rem; }
  .topic-line { flex-wrap: wrap; gap: .25rem 1rem; }
  .review { padding: 1rem; }
  .explained li { padding: .75rem; }
  .flag summary, .right-list > summary { min-height: 44px; display: flex; align-items: center; }
  th, td { padding: .5rem; }
}

@media (min-width: 48rem) {
  .section { padding: var(--s8) 0; }
  .hero { padding: 4rem 0 4.5rem; }
  .hero-grid { grid-template-columns: 1.4fr 1fr; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .tutor { grid-template-columns: auto 1fr; }
  .inline-form { grid-template-columns: 1fr auto; align-items: end; }
  .inline-form label { grid-column: 1 / -1; }
}

/* Busy buttons (theme.js): a spinner after the label while the next page loads */
.btn[aria-busy="true"] { cursor: progress; opacity: .75; gap: .5rem; }
.btn[aria-busy="true"]::after { content: ""; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Phone reading size (parity V3): body text at 16 px or more on a 360 px phone. */
@media (max-width: 30rem) {
  .citation, .disclaimer { font-size: 1rem; }
  .reason-picker .option { align-items: center; min-height: 44px; padding-block: 0; }
  .reason-picker .option input { flex: none; width: 1.25rem; height: 44px; margin: 0; }
}
/* Last, so it covers the animations of every stylesheet loaded after this one */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .btn[aria-busy="true"]::after { animation-duration: 2.4s !important; animation-iteration-count: infinite !important; }
}
