:root {
  color-scheme: light;
  --paper: #f4f3ee;
  --paper-deep: #ebe9e1;
  --ink: #181916;
  --muted: #696a63;
  --line: rgba(24, 25, 22, 0.14);
  --green: #2f6e49;
  --green-soft: #dce8dd;
  --yellow: #f0c95a;
  --amber: #806314;
  --amber-soft: #f8ecc6;
  --red: #963a31;
  --red-soft: #f3ddd8;
  --white: #fffefa;
  --problem-ink: #383a34;
  --card-line: rgba(24, 25, 22, 0.1);
  --hero-mark: rgba(24, 25, 22, 0.055);
  --hover-fill: #dfddd5;
  --option-hover-line: rgba(24, 25, 22, 0.34);
  --wrong-fill: rgba(243, 221, 216, 0.5);
  --method-bg: #181916;
  --method-text: #fffefa;
  --method-muted: rgba(255, 255, 255, 0.58);
  --method-line: rgba(255, 255, 255, 0.18);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --shadow: 0 1px 1px rgba(24, 25, 22, 0.06), 0 18px 55px rgba(24, 25, 22, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111411;
  --paper-deep: #191d19;
  --ink: #e7e9e3;
  --muted: #a9aea6;
  --line: rgba(235, 239, 232, 0.14);
  --green: #78bb8c;
  --green-soft: #193424;
  --yellow: #ddbb5a;
  --amber: #e2bf62;
  --amber-soft: #3a3119;
  --red: #ed9085;
  --red-soft: #40231f;
  --white: #1d211d;
  --problem-ink: #d2d6cf;
  --card-line: rgba(235, 239, 232, 0.12);
  --hero-mark: rgba(235, 239, 232, 0.04);
  --hover-fill: #282d28;
  --option-hover-line: rgba(235, 239, 232, 0.34);
  --wrong-fill: rgba(64, 35, 31, 0.72);
  --method-bg: #090b09;
  --method-text: #e7e9e3;
  --method-muted: rgba(231, 233, 227, 0.62);
  --method-line: rgba(231, 233, 227, 0.16);
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.25), 0 22px 65px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: color 180ms ease, background-color 180ms ease;
}
button, input, select { font: inherit; }
button, a, select { touch-action: manipulation; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: 10px; left: 10px; padding: 10px 14px; color: var(--white); background: var(--ink); border-radius: 10px; text-decoration: none; transform: translateY(-150%); transition: transform 160ms var(--ease-out); }
.skip-link:focus { transform: translateY(0); }
.ui-icon { display: block; width: 16px; height: 16px; flex: 0 0 auto; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 78px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; text-decoration: none; font-weight: 750; letter-spacing: -0.03em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: var(--paper); background: var(--ink); border-radius: 50%; font-size: 11px; letter-spacing: -0.04em; }
.nav-links { display: flex; gap: 30px; color: var(--muted); font-size: 14px; }
.nav-links a { text-decoration: none; transition: color 160ms ease; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.auth-slot { min-height: 40px; display: inline-flex; align-items: center; gap: 5px; }
.auth-button { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; color: var(--paper); background: var(--ink); border: 1px solid var(--ink); border-radius: 999px; font-size: 11px; font-weight: 750; text-decoration: none; white-space: nowrap; transition: transform 160ms var(--ease-out); }
.auth-button[aria-disabled="true"] { color: var(--muted); background: transparent; border-color: var(--line); pointer-events: none; }
.account-identity { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; }
.account-avatar { width: 30px; height: 30px; display: grid; place-items: center; color: var(--paper); background: var(--ink); border-radius: 50%; font-size: 9px; font-weight: 850; }
.account-name { max-width: 110px; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.auth-slot form { display: contents; }
.account-signout { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; transition: transform 160ms var(--ease-out), color 160ms ease; }
.auth-button:hover, .account-signout:hover { transform: translateY(-1px); }
.auth-button:focus-visible, .account-signout:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.theme-toggle { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 650; transition: transform 140ms var(--ease-out), background-color 160ms ease; }
.theme-icon { display: grid; place-items: center; width: 16px; line-height: 1; }
.ghost-button { justify-self: end; display: inline-flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 650; transition: transform 140ms var(--ease-out), background-color 160ms ease; }

.hero { position: relative; width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: 118px 0 126px; text-align: center; }
.hero::before { content: "{ }"; position: absolute; top: 98px; left: 1%; color: var(--hero-mark); font-family: ui-monospace, monospace; font-size: clamp(130px, 20vw, 240px); font-weight: 800; letter-spacing: -.2em; transform: rotate(-7deg); pointer-events: none; }
.eyebrow, .section-kicker { color: var(--green); font-size: 12px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.eyebrow { position: relative; display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; background: var(--green-soft); border-radius: 999px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(47,110,73,.11); }
.hero h1 { position: relative; max-width: 900px; margin: 30px auto 24px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(58px, 9vw, 106px); font-weight: 500; line-height: .88; letter-spacing: -.065em; }
.hero h1 em { color: var(--green); font-weight: inherit; }
.hero-copy { position: relative; max-width: 590px; margin: 0 auto; color: var(--muted); font-size: 18px; line-height: 1.65; }
.primary-button { position: relative; display: inline-flex; align-items: center; gap: 18px; margin-top: 34px; padding: 15px 18px 15px 22px; color: var(--white); background: var(--ink); border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 700; transition: transform 140ms var(--ease-out), background-color 160ms ease; }
.primary-button span { display: grid; place-items: center; width: 26px; height: 26px; color: var(--ink); background: var(--yellow); border-radius: 50%; }
.hero-note { position: absolute; right: 4%; bottom: 80px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-family: "Comic Sans MS", cursive; font-size: 12px; transform: rotate(-4deg); }
.scribble-line { display: block; width: 46px; height: 14px; border-top: 1.5px solid var(--muted); border-radius: 50%; transform: rotate(8deg); }

.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); width: min(1180px, calc(100% - 40px)); margin: 0 auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-strip div { display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 24px 16px; border-right: 1px solid var(--line); }
.stats-strip div:last-child { border-right: 0; }
.stats-strip strong { font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.stats-strip span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }

.quiz-section, .library-section { width: min(1040px, calc(100% - 40px)); margin: 0 auto; padding: 120px 0; scroll-margin-top: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 38px; }
.section-kicker { margin: 0 0 12px; }
.section-heading h2, .method-section h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(38px, 5vw, 60px); font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.session-stats { display: flex; gap: 12px; }
.session-stats div { min-width: 92px; padding: 12px 16px; background: var(--paper-deep); border-radius: 12px; }
.session-stats span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.session-stats strong { font-size: 17px; }

.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.segmented-control { display: flex; gap: 4px; padding: 4px; background: var(--paper-deep); border-radius: 12px; }
.filter-chip, .icon-button { border: 0; cursor: pointer; }
.filter-chip { padding: 9px 14px; color: var(--muted); background: transparent; border-radius: 9px; font-size: 12px; font-weight: 650; transition: color 160ms ease, background-color 160ms ease, transform 140ms var(--ease-out); }
.filter-chip.is-active { color: var(--ink); background: var(--white); box-shadow: 0 1px 5px rgba(24,25,22,.08); }
.select-wrap { margin-left: auto; }
.select-wrap select { min-height: 42px; padding: 0 34px 0 13px; color: var(--ink); background: var(--paper-deep); border: 0; border-radius: 11px; cursor: pointer; }
.icon-button { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 14px; color: var(--ink); background: var(--paper-deep); border-radius: 11px; font-size: 12px; font-weight: 650; transition: transform 140ms var(--ease-out), background-color 160ms ease; }
.icon-button .ui-icon { width: 17px; height: 17px; }

.quiz-card { min-height: 560px; padding: clamp(24px, 5vw, 54px); background: var(--white); border: 1px solid var(--card-line); border-radius: 24px; box-shadow: var(--shadow); }
.loading-state { min-height: 450px; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.spinner { width: 24px; height: 24px; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.quiz-topline { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.quiz-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.pill { display: inline-flex; padding: 7px 10px; color: var(--muted); background: var(--paper); border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pill.easy { color: var(--green); background: var(--green-soft); }
.pill.medium { color: var(--amber); background: var(--amber-soft); }
.pill.hard { color: var(--red); background: var(--red-soft); }
.question-position { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.progress-track { height: 3px; margin-bottom: 34px; background: var(--paper-deep); border-radius: 999px; overflow: hidden; }
.progress-fill { width: 0; height: 100%; background: var(--green); transition: width 240ms var(--ease-out); }
.problem-title { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 650; }
.question-title { max-width: 780px; margin: 0 0 24px; font-family: Georgia, serif; font-size: clamp(28px, 4vw, 42px); font-weight: 500; line-height: 1.17; letter-spacing: -.035em; }
.statement-shell { margin-bottom: 28px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.statement-header { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.problem-statement { max-width: 760px; padding: 18px; color: var(--problem-ink); font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.problem-statement p:first-child, .problem-statement pre:first-child { margin-top: 0; }
.problem-statement p:last-child, .problem-statement pre:last-child { margin-bottom: 0; }
.problem-statement pre { padding: 14px; overflow-wrap: anywhere; white-space: pre-wrap; background: var(--white); border: 1px solid var(--line); border-radius: 10px; font-size: .92em; }
.problem-statement code { padding: 2px 5px; background: var(--white); border: 1px solid var(--card-line); border-radius: 5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
.problem-statement li + li { margin-top: 6px; }
.statement-loading { min-height: 64px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.statement-loading .spinner { width: 18px; height: 18px; }
.statement-fallback { color: var(--muted); }
.approach-question { max-width: 740px; margin: 0 0 8px; font-family: Georgia, serif; font-size: clamp(20px, 2.8vw, 27px); font-weight: 500; line-height: 1.25; letter-spacing: -.025em; }
.question-hint { max-width: 660px; margin: 0 0 24px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.keyboard-hint { white-space: nowrap; }
.options { display: grid; gap: 10px; }
.option { width: 100%; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 14px; padding: 15px 16px; color: var(--ink); text-align: left; background: transparent; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: transform 140ms var(--ease-out), border-color 160ms ease, background-color 160ms ease; }
.option-key { display: grid; place-items: center; width: 34px; height: 34px; color: var(--muted); background: var(--paper); border-radius: 9px; font-size: 12px; font-weight: 750; }
.option-copy strong { display: block; margin-bottom: 3px; font-size: 13px; }
.option-copy span { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; }
.option-icon { width: 46px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .06em; text-align: right; }
.option.is-optimal { border-color: rgba(47,110,73,.4); background: var(--green-soft); }
.option.is-optimal .option-icon { color: var(--green); }
.option.is-valid { border-color: rgba(128,99,20,.32); background: var(--amber-soft); }
.option.is-valid .option-icon { color: var(--amber); }
.option.is-wrong { border-color: rgba(173,72,60,.22); background: var(--wrong-fill); }
.option.is-wrong .option-icon { color: var(--red); }
.option.is-selected { box-shadow: inset 0 0 0 2px currentColor; }
.option:disabled { cursor: default; }
.feedback { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.feedback-label { margin: 0 0 6px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.feedback.is-wrong .feedback-label { color: var(--red); }
.feedback.is-valid .feedback-label { color: var(--amber); }
.feedback p:last-child { max-width: 650px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.next-button { display: inline-flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; color: var(--white); background: var(--ink); border: 0; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 750; white-space: nowrap; transition: transform 140ms var(--ease-out), background-color 160ms ease; }
.next-button span { display: grid; place-items: center; width: 24px; height: 24px; color: var(--ink); background: var(--yellow); border-radius: 50%; }
.session-summary { min-height: 450px; display: grid; place-content: center; justify-items: center; text-align: center; }
.summary-kicker { margin: 0 0 12px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.session-summary h3 { max-width: 620px; margin: 0; font-family: Georgia, serif; font-size: clamp(34px, 5vw, 52px); font-weight: 500; letter-spacing: -.04em; }
.summary-copy { max-width: 510px; margin: 18px auto 26px; color: var(--muted); font-size: 14px; line-height: 1.65; }

.method-section { padding: 110px max(20px, calc((100vw - 1180px) / 2)); color: var(--method-text); background: var(--method-bg); }
.method-section .section-kicker { color: #8bc39c; }
.method-section h2 { max-width: 720px; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 68px; border-top: 1px solid var(--method-line); }
.method-grid article { padding: 34px 36px 0 0; }
.method-grid article + article { padding-left: 36px; border-left: 1px solid var(--method-line); }
.method-number { color: var(--yellow); font-family: ui-monospace, monospace; font-size: 11px; }
.method-grid h3 { margin: 38px 0 12px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.method-grid p { max-width: 310px; margin: 0; color: var(--method-muted); font-size: 14px; line-height: 1.65; }

.library-section { width: min(1180px, calc(100% - 40px)); }
.library-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 390px); align-items: end; }
.library-heading > div { min-width: 0; }
.search-field { width: 100%; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 0 14px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.search-field span { color: var(--muted); font-size: 22px; }
.search-field input { width: 100%; height: 45px; background: transparent; border: 0; outline: 0; font-size: 13px; }
.library-meta { display: flex; justify-content: space-between; margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.legend { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 6px; height: 6px; background: var(--green); border-radius: 50%; }
#library-scope::before { content: " · "; }
.question-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; border-top: 1px solid var(--line); overflow: hidden; }
.question-item { width: 100%; min-width: 0; min-height: 152px; overflow: hidden; padding: 22px; text-align: left; background: transparent; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; transition: background-color 160ms ease, transform 140ms var(--ease-out); }
.question-item:nth-child(3n) { border-right: 0; }
.question-item-top { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.question-item-top span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.question-item h3 { min-height: 45px; margin: 0 0 9px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-family: Georgia, serif; font-size: 18px; font-weight: 500; line-height: 1.25; }
.question-item p { width: 100%; margin: 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.load-more-button { margin: 30px auto 0; display: flex; align-items: center; gap: 10px; padding: 12px 18px; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 700; transition: transform 140ms var(--ease-out), background-color 160ms ease; }
.load-more-button[hidden] { display: none; }
.library-empty { grid-column: 1 / -1; padding: 64px 20px; text-align: center; border-bottom: 1px solid var(--line); }
.library-empty h3 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.library-empty p { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.empty-action { min-height: 44px; padding: 0 16px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 700; }

footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 32px 0 44px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-brand { color: var(--ink); }
footer p { margin: 0; }
footer > div { justify-self: end; display: flex; gap: 20px; }
.footer-link { padding: 0; color: inherit; background: transparent; border: 0; cursor: pointer; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }

.landing-hero { min-height: calc(100svh - 78px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding-block: 80px 110px; }
.landing-cta { width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: 120px 0; text-align: center; }
.landing-cta h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(42px, 7vw, 76px); font-weight: 500; line-height: .98; letter-spacing: -.055em; }

.analytics-consent { position: fixed; z-index: 1100; right: 18px; bottom: 18px; width: min(520px, calc(100% - 36px)); display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center; padding: 18px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.analytics-consent strong { display: block; margin-bottom: 5px; font-size: 14px; }
.analytics-consent p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.analytics-consent-actions { display: flex; gap: 8px; }
.analytics-consent button { min-height: 44px; padding: 0 14px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 750; white-space: nowrap; }
.consent-secondary { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.consent-primary { color: var(--white); background: var(--ink); border: 1px solid var(--ink); }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
button:active, .primary-button:active, .ghost-button:active, .theme-toggle:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--ink); }
  .ghost-button:hover, .theme-toggle:hover, .load-more-button:hover { background: var(--white); }
  .primary-button:hover, .next-button:hover { background: var(--green); }
  .filter-chip:hover:not(.is-active), .icon-button:hover { color: var(--ink); background: var(--hover-fill); }
  .option:hover:not(:disabled) { border-color: var(--option-hover-line); transform: translateY(-1px); }
  .question-item:hover { background: var(--white); }
}

@media (min-width: 761px) and (max-width: 1000px) {
  .question-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .question-item:nth-child(3n) { border-right: 1px solid var(--line); }
  .question-item:nth-child(2n) { border-right: 0; }
}

@media (max-width: 760px) {
  .account-name { display: none; }
  .account-identity { padding-right: 4px; }
  .auth-button { padding-inline: 11px; }
  .site-header { width: calc(100% - 28px); height: 68px; grid-template-columns: auto 1fr auto; gap: 12px; }
  .nav-links { display: flex; justify-self: center; gap: 14px; font-size: 12px; }
  .brand, .ghost-button, .theme-toggle { min-height: 44px; }
  .header-actions { gap: 0; }
  .theme-toggle, .ghost-button { padding-inline: 11px; }
  .theme-label { display: none; }
  .ghost-button { display: none; }
  .hero { width: calc(100% - 30px); padding: 90px 0 105px; }
  .landing-hero { min-height: calc(100svh - 68px); padding-block: 60px 88px; }
  .hero::before { left: -7%; }
  .hero h1 { font-size: clamp(54px, 18vw, 78px); }
  .hero-copy { font-size: 16px; }
  .hero-note { display: none; }
  .stats-strip { width: calc(100% - 28px); grid-template-columns: repeat(2, 1fr); }
  .stats-strip div:nth-child(2) { border-right: 0; }
  .stats-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stats-strip div { flex-direction: column; align-items: center; gap: 3px; }
  .quiz-section, .library-section { width: calc(100% - 28px); padding: 84px 0; }
  .section-heading { align-items: flex-start; flex-direction: column; margin-bottom: 28px; }
  .session-stats { width: 100%; }
  .session-stats div { flex: 1; }
  .filter-bar { flex-wrap: wrap; }
  .segmented-control { width: 100%; }
  .filter-chip { flex: 1; padding-inline: 6px; }
  .filter-chip, .select-wrap select, .icon-button { min-height: 44px; }
  .select-wrap { margin-left: 0; flex: 1; }
  .select-wrap select { width: 100%; }
  .quiz-card { min-height: 590px; border-radius: 18px; }
  .problem-statement { padding: 15px; font-size: 16px; }
  .keyboard-hint { display: none; }
  .option { grid-template-columns: 34px minmax(0, 1fr); }
  .option-icon { display: block; grid-column: 2; width: auto; text-align: left; }
  .feedback { grid-template-columns: 1fr; }
  .next-button { justify-content: space-between; width: 100%; }
  .method-section { padding: 84px 20px; }
  .method-grid { grid-template-columns: 1fr; margin-top: 48px; }
  .method-grid article, .method-grid article + article { padding: 28px 0; border-left: 0; border-bottom: 1px solid var(--method-line); }
  .method-grid h3 { margin-top: 22px; }
  .library-heading { display: flex; gap: 26px; }
  .search-field { width: 100%; }
  .search-field input { font-size: 16px; }
  .library-meta { gap: 12px; }
  .legend { display: none; }
  .question-grid { grid-template-columns: 1fr; }
  .question-item, .question-item:nth-child(2n), .question-item:nth-child(3n) { min-height: 132px; border-right: 0; }
  .question-item h3 { min-height: auto; }
  .load-more-button, footer a { min-height: 44px; align-items: center; }
  footer { width: calc(100% - 28px); grid-template-columns: 1fr auto; gap: 22px; }
  footer p { display: none; }
  .landing-cta { width: calc(100% - 30px); padding: 84px 0; }
  .analytics-consent { grid-template-columns: 1fr; gap: 14px; }
  .analytics-consent-actions { justify-content: flex-end; }
}

@media (max-width: 360px) {
  .site-header .brand > span:last-child { display: none; }
  .site-header { gap: 8px; }
  .nav-links { gap: 12px; }
}

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