/* Learnqino — design tokens and components (v1.1). Mobile first; wide layouts are added at breakpoints. */
:root {
  --ink: #13233a; --ink-2: #2a3b55; --slate: #556476; --line: #d7dde5; --line-2: #e7ebf0;
  --chalk: #f4f6f9; --paper: #ffffff; --atlas: #0b5c63; --atlas-2: #0e7480; --atlas-soft: #e3f0f1;
  --signal: #d8902a; --signal-2: #c47f1c; --signal-soft: #fbf1e1; --go: #1d7348; --go-soft: #e4f3ea; --stop: #a83737; --stop-soft: #f8e6e6;
  --iris: #3d4f9a; --iris-soft: #e8ebf7;
  --radius: 8px; --radius-lg: 14px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(19,35,58,.06), 0 8px 24px rgba(19,35,58,.07);
  --head-h: 64px;
  --gutter: 16px;
}
@media (min-width: 640px) { :root { --gutter: 24px; } }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 12px); }
body { margin: 0; background: var(--chalk); color: var(--ink); font: 16px/1.6 var(--sans); overflow-x: hidden; }
body.menu-open { overflow: hidden; }
img, svg { max-width: 100%; }
a { color: var(--atlas); text-underline-offset: 3px; }
a:hover { color: var(--atlas-2); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 5.4vw, 3rem); }
h2 { font-size: clamp(1.45rem, 3.4vw, 2rem); }
h3 { font-size: 1.2rem; }
.h-md { font-size: clamp(1.4rem, 3vw, 1.75rem); }
.h-sm { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.03rem, 2.2vw, 1.15rem); color: var(--ink-2); max-width: 64ch; }
.muted { color: var(--slate); }
.small { font-size: .875rem; }
.center { text-align: center; justify-content: center; }
.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(780px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.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: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 12px; }
code, .mono { font-family: var(--mono); font-size: .88em; }
form.inline { display: inline; margin: 0; }
u { text-decoration-thickness: 2px; text-underline-offset: 3px; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- header and navigation ---------- */
.site-head { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.head-row { display: flex; align-items: center; gap: 18px; min-height: var(--head-h); }
.brand { display: inline-flex; align-items: baseline; gap: 1px; text-decoration: none; color: var(--ink); font: 700 1.5rem/1 var(--serif); letter-spacing: -.02em; white-space: nowrap; }
.brand b { color: var(--atlas); font-weight: 700; }
.nav { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a { color: var(--ink-2); text-decoration: none; padding: 8px 10px; border-radius: 6px; font-size: .93rem; font-weight: 500; white-space: nowrap; }
.nav-links a:hover { background: var(--chalk); color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--atlas); box-shadow: inset 0 -2px 0 var(--atlas); border-radius: 0; }
.nav-account { display: flex; align-items: center; gap: 8px; }
.nav-account .btn { white-space: nowrap; }
.menu-btn { display: none; margin-left: auto; align-items: center; gap: 9px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; font: 600 .9rem/1 var(--sans); color: var(--ink); cursor: pointer; }
.menu-btn .bars { display: grid; gap: 4px; width: 18px; }
.menu-btn .bars i { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.menu-btn[aria-expanded="true"] .bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 1220px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: fixed; left: 0; right: 0; top: var(--head-h); bottom: 0; margin: 0; background: rgba(19,35,58,.38); align-items: flex-start; justify-content: center; padding: 10px var(--gutter) 24px; overflow-y: auto; }
  .nav.open { display: flex; }
  .nav.open::before { content: none; }
  .nav-links, .nav-account { width: min(440px, 100%); }
  .nav { flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; background: var(--paper); border-radius: 16px 16px 0 0; padding: 14px 14px 8px; box-shadow: var(--shadow); }
  .nav-links a { text-align: center; padding: 13px 12px; font-size: 1.04rem; border-radius: 10px; }
  .nav-links a[aria-current="page"] { box-shadow: none; background: var(--atlas-soft); color: var(--atlas); border-radius: 10px; }
  .nav-account { flex-direction: column; align-items: stretch; background: var(--paper); border-radius: 0 0 16px 16px; padding: 10px 14px 16px; border-top: 1px solid var(--line-2); box-shadow: var(--shadow); }
  .nav-account .btn, .nav-account form, .nav-account form .btn { width: 100%; justify-content: center; }
  .nav-account .btn { padding: 12px; font-size: .98rem; }
  @media (prefers-reduced-motion: no-preference) { .nav.open .nav-links, .nav.open .nav-account { animation: drop .18s ease-out both; } @keyframes drop { from { opacity: 0; transform: translateY(-6px); } } }
}
@media (max-width: 380px) { .menu-btn .menu-label { display: none; } }
.subnav { background: var(--ink); }
.subnav .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.subnav .wrap::-webkit-scrollbar { display: none; }
.subnav a { color: #c9d3e0; text-decoration: none; padding: 11px 12px; font-size: .9rem; white-space: nowrap; }
.subnav a[aria-current="page"], .subnav a:hover { color: #fff; box-shadow: inset 0 -3px 0 var(--signal); }
.flash-wrap { margin-top: 16px; }

/* ---------- buttons and forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: var(--radius); border: 1px solid transparent; font: 600 .96rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; text-align: center; }
.btn-primary { background: var(--atlas); color: #fff; }
.btn-primary:hover { background: #094a50; color: #fff; }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: #c4cdd8; }
.btn-secondary:hover { border-color: var(--ink-2); color: var(--ink); }
.btn-ghost { background: none; color: var(--ink-2); border-color: transparent; }
.btn-ghost:hover { background: var(--chalk); color: var(--ink); }
.btn-signal { background: var(--signal); color: var(--ink); }
.btn-signal:hover { background: var(--signal-2); color: var(--ink); }
.btn-onink { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-onink:hover { border-color: #fff; color: #fff; }
.btn-danger { background: var(--paper); color: var(--stop); border-color: #e2b8b8; }
.btn-sm { padding: 8px 13px; font-size: .87rem; }
.btn-lg { padding: 14px 24px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.linkish { background: none; border: 0; padding: 0; color: var(--atlas); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.input, select.input, textarea.input { width: 100%; padding: 11px 12px; border: 1px solid #b9c3cf; border-radius: var(--radius); background: #fff; font: inherit; font-size: 1rem; color: var(--ink); }
.input:focus { border-color: var(--atlas); outline: 2px solid var(--atlas-soft); outline-offset: 0; }
.input.has-error { border-color: var(--stop); }
.hint { font-size: .84rem; color: var(--slate); margin-top: 5px; }
.error-text { font-size: .86rem; color: var(--stop); margin-top: 5px; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .94rem; margin-bottom: 12px; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--atlas); }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 18px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.notice { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); margin-bottom: 16px; }
.notice.ok { background: var(--go-soft); border-color: #b9dcc7; }
.notice.err { background: var(--stop-soft); border-color: #e7c1c1; }
.notice.info { background: var(--atlas-soft); border-color: #bcd9dc; }
.notice.warn { background: var(--signal-soft); border-color: #efd3a6; }
fieldset.pay { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 4px; margin: 8px 0 14px; }
fieldset.pay legend { font-weight: 600; font-size: .93rem; padding: 0 6px; }

/* ---------- surfaces ---------- */
.section { padding: clamp(40px, 7vw, 84px) 0; }
.section.alt { background: var(--paper); border-block: 1px solid var(--line); }
.sec-head { margin-bottom: 26px; }
.sec-gap { margin-top: clamp(30px, 5vw, 48px); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.card h3 { margin-bottom: .35em; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.cards-4 { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.card.act { display: flex; flex-direction: column; }
.card.act .btn { margin-top: auto; align-self: flex-start; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 30px); }
.panel.center { text-align: center; }
.page-head { padding: clamp(26px, 5vw, 40px) 0 clamp(16px, 3vw, 22px); }
.crumbs { font-size: .86rem; margin-bottom: 10px; color: var(--slate); }
.crumbs a { color: var(--slate); }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--chalk); color: var(--ink-2); border: 1px solid var(--line); vertical-align: middle; }
.tag.go { background: var(--go-soft); color: var(--go); border-color: #b9dcc7; }
.tag.stop { background: var(--stop-soft); color: var(--stop); border-color: #e7c1c1; }
.tag.signal { background: var(--signal-soft); color: #8a5a12; border-color: #efd3a6; }
.tag.atlas { background: var(--atlas-soft); color: var(--atlas); border-color: #bcd9dc; }
.xbadge { display: inline-block; font: 700 .74rem/1 var(--sans); padding: 5px 8px; border-radius: 6px; background: var(--atlas-soft); color: var(--atlas); letter-spacing: .01em; vertical-align: middle; }
.xbadge.x-a-level { background: var(--iris-soft); color: var(--iris); }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font: 600 1.8rem/1.1 var(--serif); color: var(--ink); }
.stat span { font-size: .86rem; color: var(--slate); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stats .card { padding: 16px 18px; }
table.data { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .92rem; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.data th { font-size: .8rem; color: var(--slate); font-weight: 600; background: #f8f9fb; white-space: nowrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.empty { padding: 26px; text-align: center; color: var(--slate); }
.split { display: grid; grid-template-columns: 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split-wide { grid-template-columns: 1.6fr 1fr; } .split-side { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); } }
.duo { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .duo { grid-template-columns: 1fr 1fr; } }
.prose h2 { font-size: 1.5rem; margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .25em; width: 19px; height: 19px; border-radius: 50%; background: var(--go-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='%231d7348' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 16px 16px 60px; display: flex; flex-direction: column; gap: 3px; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 15px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 .9rem/1 var(--sans); }
.steps li span { color: var(--slate); font-size: .94rem; }
@media (min-width: 900px) { .steps-4 { grid-template-columns: repeat(4, 1fr); } .steps-4 li { padding: 18px; } .steps-4 li::before { position: static; margin-bottom: 8px; } }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.3rem/1 var(--sans); color: var(--atlas); flex: 0 0 auto; }
.faq details[open] summary::after { content: "−"; }
.faq .ans { margin: 10px 0 0; color: var(--ink-2); }
.faq .more { margin-top: 16px; }
.side-faq { margin-top: 22px; }
.narrow-left { max-width: 780px; }
.foot-note { margin-top: 20px; }
.legal-doc h2 { font-size: 1.35rem; margin-top: 1.4em; }
.powered-box { margin: 26px 0; padding: 16px 18px; border-left: 4px solid var(--atlas); background: var(--paper); border-radius: var(--radius); }
.powered-box p { margin: 0; }

/* ---------- home ---------- */
.hero { padding: clamp(32px, 6vw, 76px) 0 clamp(36px, 6vw, 70px); background: var(--paper); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { font-size: clamp(2.15rem, 5.6vw, 3.6rem); line-height: 1.05; letter-spacing: -.02em; }
.hero .btns { margin-top: 22px; }
.facts { list-style: none; padding: 0; margin: 26px 0 0; display: flex; gap: 10px 28px; flex-wrap: wrap; }
.facts li { display: flex; flex-direction: column; }
.facts b { font: 600 1.55rem/1.1 var(--serif); }
.facts span { font-size: .85rem; color: var(--slate); }
/* the signature element: a real question with its worked explanation */
.sample { margin: 0; background: var(--chalk); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.sample figcaption { font-size: .82rem; color: var(--slate); padding: 2px 6px 10px; }
.sample-q { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.sample-q p { margin: 10px 0 12px; font-size: 1rem; }
.sample-opts { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.sample-opts li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid #c9d1db; border-radius: 8px; padding: 8px 10px; font-size: .95rem; }
.sample-opts b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--chalk); font-size: .85rem; }
.sample-opts li.ok { border-color: var(--go); background: var(--go-soft); }
.sample-opts li.ok b { background: var(--go); color: #fff; }
.pill { margin-left: auto; font-size: .74rem; font-weight: 700; color: var(--go); }
.sample-x { margin-top: 10px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--atlas); border-radius: 12px; padding: 14px 16px; }
.sx-title { font: 600 1.05rem/1.2 var(--serif); margin-bottom: 8px; color: var(--atlas); }
.sample-x ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: .92rem; }
@media (prefers-reduced-motion: no-preference) { .sample-x { animation: reveal .7s .35s cubic-bezier(.2,.7,.2,1) both; } @keyframes reveal { from { opacity: 0; transform: translateY(8px); } } }
.exam-cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .exam-cards { grid-template-columns: 1fr 1fr; } }
.exam-card { background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--atlas); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 28px); display: flex; flex-direction: column; }
.exam-card.x-a-level { border-top-color: var(--iris); }
.exam-card h2 a, .exam-card h3 a { color: var(--ink); text-decoration: none; }
.exam-card h3 { font-size: 1.45rem; }
.exam-card .btns { margin-top: auto; padding-top: 8px; }
.chips { list-style: none; padding: 0; margin: 4px 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 6px 12px; border-radius: 99px; background: var(--chalk); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: .88rem; }
.chips a:hover { border-color: var(--atlas); color: var(--atlas); }
.band { background: var(--ink); color: #dbe3ee; padding: clamp(40px, 7vw, 80px) 0; }
.band h2 { color: #fff; }
.band .lede { color: #c9d3e0; }
.standing { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-lg); padding: 22px; }
.st-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; font-size: .92rem; color: #b9c4d3; }
.st-head b { font: 600 1.6rem/1 var(--serif); color: #fff; }
.st-scale { position: relative; height: 14px; border-radius: 99px; background: rgba(255,255,255,.1); margin: 22px 0 14px; }
.st-band { position: absolute; left: 30%; width: 40%; top: 0; bottom: 0; border-radius: 99px; background: rgba(120,190,196,.4); }
.st-avg { position: absolute; top: -5px; width: 2px; height: 24px; background: #fff; }
.st-you { position: absolute; top: -6px; width: 6px; height: 26px; border-radius: 3px; background: var(--signal); transform: translateX(-3px); }
@media (prefers-reduced-motion: no-preference) { .st-you { animation: slide 1.1s .2s cubic-bezier(.2,.7,.2,1) both; } @keyframes slide { from { left: 50% !important; opacity: 0; } } }
.st-legend { display: flex; gap: 8px 16px; flex-wrap: wrap; font-size: .8rem; color: #b9c4d3; }
.st-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-band { background: rgba(120,190,196,.6); } .lg-avg { background: #fff; width: 3px !important; } .lg-you { background: var(--signal); }
.st-note { font-size: .76rem; color: #9fb0c4; margin: 14px 0 0; }
.subject-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.subject-card:hover { border-color: var(--atlas); color: var(--ink); box-shadow: var(--shadow); }
.sc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.subject-card .glyph { font: 600 1.35rem/1 var(--serif); color: var(--atlas); width: 44px; height: 44px; border-radius: 10px; background: var(--atlas-soft); display: grid; place-items: center; }
.subject-card h3 { margin: 0; }
.subject-card .meta { font-size: .84rem; color: var(--slate); margin-top: auto; padding-top: 6px; }
.exam-group + .exam-group { margin-top: clamp(28px, 5vw, 44px); }
.eg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.eg-head h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.7rem); }
.topics-h { margin-top: 34px; }
.topic-list { columns: 1; padding-left: 1.1em; margin: 0; }
.topic-list li { margin-bottom: 6px; break-inside: avoid; }
@media (min-width: 720px) { .topic-list { columns: 2; column-gap: 40px; } }

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: #b9c4d3; padding: 44px 0 26px; margin-top: 64px; font-size: .9rem; }
.home .site-foot, .band + .section + .site-foot { margin-top: 0; }
.site-foot a { color: #e9eef5; }
.site-foot .brand { color: #fff; }
.site-foot .cols { display: grid; grid-template-columns: 1fr; gap: 26px; }
@media (min-width: 640px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .site-foot .cols { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.site-foot h3 { color: #fff; font-family: var(--sans); font-size: .95rem; margin-bottom: 10px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.site-foot .tagline { color: #fff; font: 500 1.05rem/1.3 var(--serif); margin: 12px 0 8px; }
.site-foot .powered { color: #e9eef5; font-weight: 600; margin-top: 12px; }
.site-foot .legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 16px; font-size: .82rem; display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 900px) { .site-foot .legal { flex-direction: row; justify-content: space-between; gap: 24px; } }

/* ---------- exercise lists ---------- */
.ex-list { display: grid; gap: 8px; }
.ex-row { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--ink); text-decoration: none; }
a.ex-row:hover { border-color: var(--atlas); color: var(--ink); }
.ex-row.is-locked { grid-template-columns: 2.2rem 1fr; }
.ex-row .n { font: 600 1.05rem/1 var(--serif); color: var(--slate); text-align: center; }
.ex-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ex-row .t { font-weight: 600; line-height: 1.35; }
.ex-row .s { font-size: .84rem; color: var(--slate); display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; }
.go-btn { font: 600 .87rem/1 var(--sans); color: #fff; background: var(--atlas); padding: 9px 14px; border-radius: var(--radius); white-space: nowrap; }
.lock { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--slate); }
.lock::before { content: ""; width: 10px; height: 12px; border: 2px solid var(--slate); border-radius: 2px; border-top-width: 5px; }
.price { font: 600 2rem/1 var(--serif); margin: 0 0 10px; }
.unlock { position: static; }
@media (min-width: 900px) { .unlock { position: sticky; top: calc(var(--head-h) + 18px); } }
.upsell { margin-top: 24px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.upsell p { margin: 0; }

/* ---------- practice player ---------- */
.player-head { padding: 18px 0 8px; }
.player-head h1 { font-size: clamp(1.35rem, 4vw, 2.1rem); margin: 0; }
.player-head .crumbs { margin-bottom: 6px; }
.player { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
@media (min-width: 960px) { .player { grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; } .player .side { order: 2; position: sticky; top: calc(var(--head-h) + 16px); } }
.side { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; }
.side-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.side-note { margin: 10px 0 0; }
.qgrid { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; padding: 3px 2px 4px; scrollbar-width: thin; }
@media (min-width: 960px) { .qgrid { display: grid; grid-template-columns: repeat(5, 1fr); overflow: visible; } }
.qgrid button { flex: 0 0 38px; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: 600 .84rem/1 var(--sans); color: var(--ink-2); cursor: pointer; padding: 0; }
@media (min-width: 960px) { .qgrid button { height: auto; aspect-ratio: 1; } }
.qgrid button.c { background: var(--go-soft); border-color: #9fceb4; color: var(--go); }
.qgrid button.x { background: var(--stop-soft); border-color: #dfb0b0; color: var(--stop); }
.qgrid button.cur { outline: 2px solid var(--ink); outline-offset: 1px; }
.progress { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--atlas); border-radius: 99px; transition: width .3s; }
.player-wrap { padding-bottom: 20px; }
.qcard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(16px, 3vw, 30px); min-width: 0; }
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .88rem; color: var(--slate); margin-bottom: 12px; flex-wrap: wrap; }
.qbody { font-size: 1.03rem; line-height: 1.7; overflow-wrap: anywhere; }
.qbody p { margin: 0 0 .8em; }
.qbody table, .explain table { border-collapse: collapse; margin: 10px 0; max-width: 100%; }
.qbody td, .qbody th, .explain td, .explain th { border: 1px solid var(--line); padding: 6px 10px; }
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0; max-width: 100%; }
.tbl table { margin: 0; }
.qnote { font-size: .88rem; color: var(--slate); margin: 12px 0 8px; }
.options { display: grid; gap: 9px; margin: 8px 0 16px; }
.opt { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; text-align: left; padding: 11px 13px; border: 1px solid #c4cdd8; border-radius: var(--radius); background: #fff; font: inherit; color: var(--ink); cursor: pointer; min-height: 52px; overflow-wrap: anywhere; }
.opt > span:last-child { min-width: 0; }
.opt:hover { border-color: var(--atlas); }
.opt .l { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 7px; background: var(--chalk); font-weight: 700; }
.opt[aria-pressed="true"] { border-color: var(--atlas); box-shadow: 0 0 0 2px var(--atlas-soft); }
.opt.right { border-color: var(--go); background: var(--go-soft); }
.opt.right .l { background: var(--go); color: #fff; }
.opt.wrong { border-color: var(--stop); background: var(--stop-soft); }
.opt.wrong .l { background: var(--stop); color: #fff; }
.opt:disabled { cursor: default; }
.feedback { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 16px; scroll-margin-top: calc(var(--head-h) + 12px); }
.verdict { font: 600 1.25rem/1.2 var(--serif); margin-bottom: 10px; }
.verdict.ok { color: var(--go); } .verdict.no { color: var(--stop); }
.explain { background: #f8fafb; border: 1px solid var(--line-2); border-left: 4px solid var(--atlas); border-radius: var(--radius); padding: 14px 16px; overflow-wrap: anywhere; }
.explain-title { font: 600 1.05rem/1.2 var(--serif); color: var(--atlas); margin-bottom: 8px; }
.explain p { margin: 0 0 .75em; }
.qnav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.qnav .btn { flex: 1 1 0; max-width: 220px; }
.qnav .btn:last-child { margin-left: auto; }
@media (max-width: 640px) {
  .player-wrap { width: 100%; }
  .player .side { border-radius: 0; border-inline: 0; position: sticky; top: var(--head-h); z-index: 20; padding: 10px var(--gutter); box-shadow: 0 6px 12px -10px rgba(19,35,58,.4); }
  .player .side-note { display: none; }
  .player .qcard { border-radius: 0; border-inline: 0; padding: 18px var(--gutter); }
  .player-head .wrap { width: calc(100% - 2 * var(--gutter)); }
  .qbody { font-size: 1rem; }
  .explain { padding: 12px 12px; margin-inline: -4px; }
  .player .qnav { position: sticky; bottom: 0; background: linear-gradient(to top, var(--paper) 78%, rgba(255,255,255,0)); padding: 14px 0 calc(10px + env(safe-area-inset-bottom)); margin: 8px 0 -18px; z-index: 5; }
  .qnav .btn { max-width: none; }
  .arena .qcard { padding: 16px; }
}
/* MathJax and figures on small screens: long equations scroll sideways instead of breaking the page */
mjx-container[display="true"] { display: block; overflow-x: auto; overflow-y: hidden; max-width: 100%; padding: 2px 0; -webkit-overflow-scrolling: touch; }
mjx-container { max-width: 100%; }
@media (max-width: 640px) { mjx-container[display="true"] > svg { max-width: 100%; height: auto; } .feedback { scroll-margin-top: calc(var(--head-h) + 118px); } }
.fig { position: relative; margin: 10px 0; max-width: 100%; }
.fig svg { display: block; height: auto; max-width: 100%; }
.fig-zoom { position: absolute; right: 6px; bottom: 6px; background: rgba(19,35,58,.78); color: #fff; border: 0; border-radius: 6px; padding: 6px 9px; font: 600 .76rem/1 var(--sans); cursor: pointer; }
.figview { position: fixed; inset: 0; z-index: 90; background: #fff; display: flex; flex-direction: column; }
.figview[hidden] { display: none; }
.fv-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px var(--gutter); border-bottom: 1px solid var(--line); }
.fv-body { flex: 1; overflow: auto; padding: 16px; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y pinch-zoom; }
.fv-body svg { width: max(100%, 760px); height: auto; max-width: none; display: block; }
.bm { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; font: inherit; font-size: .84rem; color: var(--ink-2); cursor: pointer; }
.bm[aria-pressed="true"] { background: var(--signal-soft); border-color: #efd3a6; }
.summary-card { text-align: center; }
.summary-card .big { font: 600 3rem/1 var(--serif); margin: 6px 0; }

/* ---------- Learnqino Challenge ---------- */
.cat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
.cat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; }
.cat.paid { border-color: #efd3a6; }
.cat-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.cat-top h3 { margin: 0; }
.cat dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; }
.cat dt { font-size: .78rem; color: var(--slate); }
.cat dd { margin: 0; font-weight: 600; }
.entry { margin-bottom: 16px; }
.entry-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.entry-top h2 { margin: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; font-size: .92rem; margin: 0 0 16px; }
.kv dt { color: var(--slate); }
.kv dd { margin: 0; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: 0; } .kv dt { margin-top: 8px; font-size: .8rem; } }
.defs { display: grid; gap: 10px; }
.def { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.def span { color: var(--slate); font-size: .92rem; }
.startbox { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--chalk); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0 12px; }
.startbox div { display: flex; flex-direction: column; }
.startbox b { font-size: 1.05rem; }
.bigcount { font: 700 3.2rem/1 var(--mono); margin: 12px 0; color: var(--atlas); }
.rounds { background: var(--chalk); border-radius: var(--radius); padding: 12px 16px; margin-top: 16px; }
.rounds ol { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; }
.rounds li { display: flex; justify-content: space-between; gap: 10px; }
body.assessing { background: #eef1f5; }
body.assessing .site-head, body.assessing .site-foot, body.assessing .subnav { display: none; }
.arena { min-height: 70vh; }
.abar { position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; }
.abar .wrap { display: flex; align-items: center; gap: 8px 18px; min-height: 58px; flex-wrap: wrap; padding: 6px 0; }
.abar .subj { font-weight: 600; }
.abar .timer { margin-left: auto; font: 600 1.4rem/1 var(--mono); font-variant-numeric: tabular-nums; }
.abar .timer.low { color: #ffb4a8; }
.abar .opp { font-size: .86rem; color: #c9d3e0; }
.cover { display: inline; background: var(--ink-2); color: #fff; border: 0; border-radius: 4px; padding: 1px 8px; margin: 0 2px; font: inherit; font-size: .9em; cursor: pointer; }
.cover.open { background: var(--signal-soft); color: var(--ink); outline: 2px solid var(--signal); }
.q-hint { font-size: .85rem; color: var(--slate); display: flex; gap: 8px; margin-bottom: 10px; }
.qtext { font-size: 1.06rem; line-height: 1.85; margin-bottom: 16px; overflow-wrap: anywhere; }
.opts { display: grid; gap: 10px; margin-top: 18px; }
.aopt { border: 1px solid #c4cdd8; border-radius: var(--radius); background: #fff; }
.aopt .opt-head { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; text-align: left; padding: 12px 14px; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; min-height: 52px; }
.aopt .l { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 6px; background: var(--chalk); font-weight: 700; }
.aopt .ocover { color: var(--slate); font-style: italic; }
.aopt .otext { color: var(--ink); }
.aopt.open { border-color: var(--atlas); box-shadow: 0 0 0 2px var(--atlas-soft); }
.aopt.no .l { opacity: .5; }
.aopt.chosen { border-color: var(--atlas); background: var(--atlas-soft); }
.confirm-row { display: flex; gap: 10px; align-items: center; padding: 0 14px 14px 58px; flex-wrap: wrap; }
.confirm-row p { margin: 0 8px 0 0; font-weight: 600; }
@media (max-width: 520px) { .confirm-row { padding-left: 14px; } }
.yn { border: 1px solid var(--line); border-radius: 6px; padding: 9px 18px; font: 600 .92rem/1 var(--sans); cursor: pointer; background: #fff; }
.yn.yes { background: var(--atlas); color: #fff; border-color: var(--atlas); }
.locked { margin-top: 12px; font-weight: 600; color: var(--atlas); font-size: .9rem; }
.overlay { position: fixed; inset: 0; background: rgba(19,35,58,.72); display: none; align-items: center; justify-content: center; z-index: 60; padding: 20px; }
.overlay.show { display: flex; }
.overlay .box { background: #fff; border-radius: var(--radius-lg); padding: 26px; max-width: 460px; width: 100%; text-align: center; }
.overlay .count { font: 700 2.6rem/1 var(--mono); margin: 10px 0; color: var(--stop); }
.waiting { text-align: center; padding: 30px 10px; }
.pulse { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px; border: 4px solid var(--atlas-soft); border-top-color: var(--atlas); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; text-align: center; }
.versus .who { font-size: .9rem; color: var(--slate); overflow-wrap: anywhere; }
.versus .sc { font: 700 clamp(2.2rem, 8vw, 3rem)/1 var(--serif); }
.versus .vs { font: 600 1rem/1 var(--sans); color: var(--slate); }
.money-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 16px; }
.money-row div { background: var(--chalk); border-radius: var(--radius); padding: 10px 12px; }
.money-row b { display: block; font-size: 1.05rem; overflow-wrap: anywhere; }
.rv { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--stop); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.rv.ok { border-left-color: var(--go); }
.rv ul { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.rv li { display: grid; grid-template-columns: 1.6rem 1fr; gap: 8px; }
.rv li.c b { color: var(--go); } .rv li.x b { color: var(--stop); }
body.testing .site-head, body.testing .site-foot, body.testing .subnav, body.testing .notice { display: none; }
body.testing { background: var(--chalk); user-select: none; -webkit-user-select: none; }
.gap { display: inline-block; min-width: 4.5em; border-bottom: 2px solid var(--ink-2); line-height: 1; color: transparent; }
.passage { background: #fbfaf6; border: 1px solid var(--line-2); border-left: 4px solid var(--atlas); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 14px; max-height: 22rem; overflow-y: auto; }
.passage p { margin: 0 0 .7em; line-height: 1.6; }

/* ---------- charts ---------- */
.bars { display: grid; gap: 8px; }
.bars .row { display: grid; grid-template-columns: minmax(6rem, 14rem) 1fr 3.4rem; gap: 10px; align-items: center; font-size: .9rem; }
@media (max-width: 520px) { .bars .row { grid-template-columns: 1fr 3rem; } .bars .row > span:first-child { grid-column: 1 / -1; } }
.bars .track { height: 10px; border-radius: 99px; background: var(--line-2); position: relative; }
.bars .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--atlas); }
.bars .ref { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--ink); }
.bars .na { color: var(--slate); font-size: .82rem; }
.trend { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 10px; }
.trend .wk { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: .66rem; color: var(--slate); min-width: 0; }
.trend .b { width: 100%; max-width: 22px; border-radius: 4px 4px 0 0; background: var(--atlas); }
.trend .b.c { background: var(--signal); }
.toast { position: fixed; bottom: calc(22px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: var(--radius); z-index: 95; max-width: 90vw; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filters > div { min-width: 0; }
.filters .input { width: auto; min-width: 140px; max-width: 100%; }
@media (max-width: 520px) { .filters > div, .filters .input { width: 100%; } }
.switch-row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }

/* ---------- admin ---------- */
.admin { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.admin aside { background: var(--ink); color: #c9d3e0; padding: 18px 12px; }
.admin aside a { display: block; color: #c9d3e0; text-decoration: none; padding: 7px 10px; border-radius: 6px; font-size: .9rem; }
.admin aside a:hover, .admin aside a[aria-current="page"] { background: rgba(255,255,255,.08); color: #fff; }
.admin aside .grp { font-size: .74rem; color: #8b9bb0; margin: 14px 10px 4px; }
.admin main { padding: 26px clamp(14px, 3vw, 34px); min-width: 0; }
.admin .brand { color: #fff; margin: 4px 10px 12px; }
@media (max-width: 860px) { .admin { grid-template-columns: 1fr; } .admin aside { position: static; } }
.adm-group { margin-bottom: 18px; }
.adm-group-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.adm-group-head h2 { margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 10px 4px 4px; font: 600 .8rem/1 var(--sans); color: var(--slate); cursor: pointer; }
.switch span { width: 30px; height: 18px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { color: var(--go); border-color: #b9dcc7; }
.switch.on span { background: var(--go); }
.switch.on span::after { left: 14px; }
.block-edit { margin-bottom: 12px; padding: 16px 18px; }
.be-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.be-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.be-foot .check { margin: 0; }
.sticky-save { position: sticky; bottom: 0; background: var(--chalk); padding: 12px 0; display: flex; gap: 12px; align-items: end; flex-wrap: wrap; border-top: 1px solid var(--line); }
.sticky-save .field { margin: 0; flex: 1 1 260px; }
.guardian[hidden] { display: none; }
@media (max-width: 520px) {
  .btns > .btn:not(.btn-sm) { flex: 1 1 100%; }
  .hero .facts { gap: 10px 22px; }
}
@media (max-width: 899px) { .premium-layout > div:last-child { order: -1; } }
.admin .brand b { color: #7cc4cb; }
.adm-menu > summary { display: none; }
@media (max-width: 860px) {
  .admin aside { display: flex; flex-direction: column; padding: 10px 12px; }
  .admin aside .brand { margin: 6px 10px; }
  .adm-menu > summary { display: block; cursor: pointer; color: #fff; font-weight: 600; padding: 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; margin: 6px 0; text-align: center; }
}
