/* The website's landing page (/web without a session): an exam paper and a 田字格 notebook, Ван's orange, red seals. */
:root {
  --paper: #f6efe3;
  --paper-2: #efe5d3;
  --sheet: #fffaf2;
  --ink: #1d1410;
  --ink-2: #4b3f36;
  --muted: #7a6c60;
  --rule: #e2d4bd;
  --grid: rgba(196, 72, 44, .13);
  --accent: #f2841c;
  --accent-ink: #1d1410;
  --accent-soft: #fde6cc;
  --seal: #c3352a;
  --good: #127237;
  --bad: #c3352a;
  --t1: #d02b2b; --t2: #127237; --t3: #2563d9; --t4: #8b3fd3;
  --shadow: 0 1px 0 rgba(29, 20, 16, .06), 0 18px 40px -22px rgba(60, 35, 10, .45);
  --r: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "PT Serif", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --han: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17120e; --paper-2: #1f1813; --sheet: #241c16; --ink: #f6ead8; --ink-2: #d9cab4; --muted: #a8977f;
    --rule: #3a2e24; --grid: rgba(242, 132, 28, .12); --accent-soft: #3d2711; --seal: #e0574a;
    --good: #45c97c; --bad: #ff6b6b; --t1: #ff6b6b; --t2: #45c97c; --t3: #6fa3ff; --t4: #c38cff;
    --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 18px 40px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(34px, 5.2vw, 60px); }
h2 { font-size: clamp(28px, 3.6vw, 44px); }
h3 { font-size: 22px; }
p { margin: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px;
  border-radius: 999px; font: 600 17px/1 var(--sans); text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-accent { background: var(--accent); color: #1d1410; box-shadow: 0 3px 0 #b85f0e; }
.btn-accent:hover { box-shadow: 0 5px 0 #b85f0e; transform: translateY(-2px); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--rule); }
.top-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 19px/1 var(--serif); text-decoration: none; }
.top-nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.top-nav a { text-decoration: none; color: var(--ink-2); padding: 6px 0; border-bottom: 2px solid transparent; }
.top-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 900px) { .top-nav { display: none; } .top-in > .btn { margin-left: auto; } }

/* hero */
.hero { padding: 40px 0 30px; position: relative;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px; background-position: center top; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 120px; background: linear-gradient(transparent, var(--paper)); pointer-events: none; }
.hero-in { display: grid; grid-template-columns: 1fr; gap: 36px; position: relative; z-index: 1; }
@media (min-width: 980px) { .hero { padding: 64px 0 40px; } .hero-in { grid-template-columns: 1.02fr 1fr; align-items: center; gap: 48px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; letter-spacing: .02em;
  color: var(--ink-2); background: var(--sheet); border: 1px solid var(--rule); border-radius: 999px; padding: 5px 14px 5px 5px; margin-bottom: 20px; }
.seal-dot { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--seal);
  color: #fff6ea; font: 700 15px/1 var(--han); transform: rotate(-6deg); }
.hero h1 { max-width: 15em; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); margin-top: 18px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.fine { font-size: 14px; color: var(--muted); margin-top: 14px; max-width: 40em; }

.hero-stage { position: relative; min-height: 340px; padding: 0 0 40px; }
.browser { margin: 0; background: var(--sheet); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--rule); }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: var(--paper-2); border-bottom: 1px solid var(--rule); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
.browser-bar span { margin-left: 10px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser img { width: 100%; height: auto; }
.hero-stage .browser { width: 88%; transform: rotate(-1.2deg); }
.phone { position: relative; width: 100%; aspect-ratio: 600 / 1298; background: #1d1410; border-radius: 34px; padding: 9px; box-shadow: var(--shadow); }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 26px; overflow: hidden; background: #f0f0f3; }
.phone-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .55s ease; }
.phone-screen img:only-child, .phone-screen img.on { opacity: 1; }
.hero-phone { position: absolute; right: 0; bottom: 0; width: min(40%, 230px); margin: 0; transform: rotate(2.5deg); }
.phone-cap { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); background: var(--ink); color: var(--paper);
  font-size: 13px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.hero-van { position: absolute; left: -6px; bottom: 4px; display: flex; align-items: flex-end; gap: 8px; max-width: 58%; }
.hero-van img { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18)); animation: bob 4s ease-in-out infinite; }
.hero-van p { background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px 16px 16px 4px; padding: 10px 14px;
  font-size: 15px; box-shadow: var(--shadow); }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-3deg); } }
@media (max-width: 600px) { .hero-van { display: none; } .hero-phone { width: 42%; } .hero-stage { min-height: 0; padding-bottom: 60px; } .hero-stage .browser { width: 92%; } }

/* the facts strip: a tear-off exam ticket */
.ticket { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr);
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow); position: relative; z-index: 1; }
.ticket li { padding: 20px 20px 22px; border-right: 2px dashed var(--rule); border-bottom: 2px dashed var(--rule); }
.ticket li:nth-child(2n) { border-right: 0; }
.ticket li:nth-child(n+3) { border-bottom: 0; }
@media (min-width: 860px) {
  .ticket { grid-template-columns: repeat(4, 1fr); }
  .ticket li { border-bottom: 0; }
  .ticket li:nth-child(2n) { border-right: 2px dashed var(--rule); }
  .ticket li:last-child { border-right: 0; }
}
.ticket b { display: block; font: 700 clamp(28px, 3.4vw, 40px)/1 var(--serif); color: var(--seal); font-variant-numeric: tabular-nums; }
.ticket span { display: block; font-size: 14px; color: var(--ink-2); margin-top: 8px; }

/* sections */
.sec { padding: 84px 0; }
@media (max-width: 700px) { .sec { padding: 60px 0; } }
.sec-head { max-width: 760px; margin-bottom: 36px; }
.part { font: 600 13px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--seal); margin-bottom: 14px; }
.part::before { content: ""; display: inline-block; width: 22px; height: 2px; background: currentColor; vertical-align: middle; margin-right: 10px; }
.sec-lead { font-size: 18px; color: var(--ink-2); margin-top: 16px; }
.note { margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--sheet); border-radius: 0 12px 12px 0; color: var(--ink-2); font-size: 16px; }
.sec-paper { background: var(--paper-2); }
.sec-ink { background: #1d1410; color: #f6ead8; }
.sec-ink .sec-lead { color: #d9cab4; }
.sec-ink .part { color: #f2a65a; }
.fine.on-ink { color: #a8977f; }

/* lesson */
.day { display: grid; gap: 34px; }
@media (min-width: 980px) { .day { grid-template-columns: 1fr 440px; align-items: start; } }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 4px; }
.steps li { counter-increment: s; position: relative; padding: 16px 0 16px 58px; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 14px; width: 38px; height: 38px; display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 50%; font: 700 17px/1 var(--serif); color: var(--ink); }
.steps b { color: var(--ink); }
.lesson-demo { position: relative; }
.demo-tag { display: inline-block; font-size: 13px; font-weight: 600; background: var(--accent-soft); color: var(--ink); padding: 6px 12px;
  border-radius: 999px; margin-bottom: 12px; }
.card-ui { background: #f0f0f3; color: #000; border-radius: 26px; padding: 16px 16px 18px; box-shadow: var(--shadow); border: 8px solid #1d1410; min-height: 520px;
  display: flex; flex-direction: column; }
.lesson-bar { position: relative; height: 8px; background: #dcdce2; border-radius: 4px; margin: 10px 4px 18px 34px; }
.lesson-bar i { position: absolute; inset: 0 auto 0 0; width: var(--p, 6%); background: var(--accent); border-radius: 4px; transition: width .5s ease; }
.lesson-bar img { position: absolute; top: -10px; left: calc(var(--p, 6%) - 13px); transition: left .5s ease; }
.lesson-body { flex: 1; display: flex; flex-direction: column; animation: fadeUp .35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
.lb-kicker { text-align: center; color: #6b6b72; font-size: 14px; }
.lb-han { text-align: center; font: 400 88px/1.1 var(--sans); margin: 4px 0; color: #111; }
.lb-py { text-align: center; font-size: 26px; display: flex; justify-content: center; }
.lb-ru { text-align: center; font-size: 19px; margin: 6px 0 10px; }
.lb-tools { display: flex; justify-content: center; gap: 8px; margin: 8px 0 12px; flex-wrap: wrap; }
.chip { border: 0; background: #f6e4d0; color: #9b4b00; font: 600 15px/1 var(--sans); padding: 10px 14px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.chip.playing { background: var(--accent); color: #1d1410; }
.chip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-ex { background: #fff; border-radius: 16px; padding: 12px 14px; margin-top: 6px; }
.lb-ex .zh { font-size: 19px; } .lb-ex .py { color: #6b6b72; font-size: 14px; } .lb-ex .ru { font-size: 15px; margin-top: 2px; }
.lb-q { text-align: center; color: #6b6b72; margin-bottom: 10px; }
.opts { display: grid; gap: 8px; }
.opt { text-align: left; border: 2px solid transparent; background: #fff; border-radius: 16px; padding: 13px 16px; font: 16px/1.3 var(--sans);
  color: #111; cursor: pointer; transition: transform .12s, border-color .12s; }
.opt:hover:not([disabled]) { transform: translateY(-1px); border-color: #e5d5c3; }
.opt.right { border-color: #127237; background: #e3f1e7; color: #127237; }
.opt.wrong { border-color: #c3352a; background: #f9e3e1; color: #c3352a; animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.fb { margin-top: 12px; background: #fff; border-radius: 16px; padding: 12px 14px; font-size: 15px; animation: fadeUp .3s ease; }
.fb h4 { margin: 0 0 4px; font: 700 17px/1.2 var(--sans); }
.fb.ok h4 { color: #127237; } .fb.no h4 { color: #c3352a; }
.lb-next { margin-top: auto; padding-top: 14px; }
.lb-next .btn { width: 100%; min-height: 50px; border-radius: 16px; }
.lb-done { text-align: center; padding: 30px 6px; }
.lb-done img { margin: 0 auto 12px; }

/* tone curves, as in the app */
.tsyl { display: inline-flex; flex-direction: column; align-items: center; margin: 0 2px; }
.tsyl svg { width: 30px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.tsyl.changed svg { stroke-dasharray: 3 3.5; }
.t1 { color: var(--t1); } .t2 { color: var(--t2); } .t3 { color: var(--t3); } .t4 { color: var(--t4); }
.card-ui .t1 { color: #d02b2b; } .card-ui .t2 { color: #127237; } .card-ui .t3 { color: #2563d9; } .card-ui .t4 { color: #8b3fd3; }

.shots-row { display: grid; grid-template-columns: repeat(3, minmax(200px, 1fr)); gap: 22px; margin-top: 48px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding: 4px 4px 18px; }
.mini { margin: 0; scroll-snap-align: start; }
.mini .phone { max-width: 260px; margin: 0 auto; }
.mini figcaption { text-align: center; font-size: 14px; color: var(--muted); margin-top: 12px; }
@media (max-width: 760px) { .shots-row { grid-template-columns: repeat(3, 72%); margin-right: -20px; padding-right: 20px; } }
.mini-inline { margin-top: 26px; max-width: 220px; }
.mini-inline figcaption { text-align: left; }

/* tones */
.sec-tones { background: var(--sheet); border-block: 1px solid var(--rule); }
.tones { display: grid; gap: 36px; }
@media (min-width: 940px) { .tones { grid-template-columns: 1fr 1fr; align-items: center; } }
.tone-board { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px; }
.tone-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tone-key { border: 2px solid var(--rule); background: var(--sheet); border-radius: 14px; padding: 10px 4px; cursor: pointer; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 2px; font: 600 22px/1.1 var(--sans); }
.tone-key small { font: 500 12px/1.2 var(--sans); color: var(--muted); }
.tone-key span.h { font: 400 26px/1 var(--han); }
.tone-key[aria-pressed="true"] { border-color: currentColor; background: var(--accent-soft); }
.tone-stage { margin-top: 16px; }
.tone-grid { width: 100%; height: auto; }
.tone-grid .tone-levels line { stroke: var(--rule); stroke-width: 1; }
.tone-grid .tone-levels text { fill: var(--muted); font: 12px var(--sans); }
.tone-path { fill: none; stroke: var(--t3); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.tone-say { min-height: 3em; color: var(--ink-2); font-size: 15px; }
.sandhi { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 2px; margin-top: 10px; padding-top: 14px; border-top: 1px dashed var(--rule); }
.sandhi .tsyl { font-size: 22px; }
.sandhi p { flex-basis: 100%; font-size: 15px; color: var(--ink-2); margin-top: 6px; }

/* handwriting */
.write { display: grid; gap: 40px; }
@media (min-width: 940px) { .write { grid-template-columns: 420px 1fr; align-items: start; } }
.write-pad { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.pad-chars { display: flex; gap: 6px; flex-wrap: wrap; }
.pad-chars button { width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--rule); background: var(--paper); color: var(--ink);
  font: 400 24px/1 var(--han); cursor: pointer; }
.pad-chars button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.pad { position: relative; margin: 14px auto 0; width: 100%; max-width: 360px; aspect-ratio: 1; background: #fffdf8; border: 2px solid var(--seal);
  border-radius: 6px; touch-action: none; }
.pad::before, .pad::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(var(--seal), var(--seal)) center / 100% 1px no-repeat, linear-gradient(var(--seal), var(--seal)) center / 1px 100% no-repeat; opacity: .35; }
.pad::after { background: linear-gradient(45deg, transparent calc(50% - .5px), var(--seal) 50%, transparent calc(50% + .5px)),
  linear-gradient(-45deg, transparent calc(50% - .5px), var(--seal) 50%, transparent calc(50% + .5px)); opacity: .18; }
.pad-target { position: absolute; inset: 0; z-index: 1; }
.pad-target svg { width: 100%; height: 100%; }
.pad-msg { text-align: center; margin-top: 12px; min-height: 1.6em; color: var(--ink-2); font-size: 15px; }
.pad-msg.good { color: var(--good); font-weight: 600; }
.pad-actions { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 32px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--seal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4L18 8' fill='none' stroke='%23fff6ea' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.ticks b { color: var(--ink); }

/* levels */
.level-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.level-tabs::-webkit-scrollbar { display: none; }
.level-tabs button { flex: none; border: 2px solid var(--ink); background: transparent; color: var(--ink); font: 600 16px/1 var(--sans);
  padding: 12px 18px; border-radius: 999px; cursor: pointer; }
.level-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.level-panel { margin-top: 14px; display: grid; gap: 18px; }
@media (min-width: 900px) { .level-panel { grid-template-columns: 1fr 1.15fr; } }
.lv-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 22px; animation: fadeUp .35s ease; }
.lv-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
.lv-nums b { display: block; font: 700 34px/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.lv-nums span { font-size: 14px; color: var(--muted); }
.lv-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.flag { font-size: 13px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); }
.flag.yes { border-color: transparent; background: var(--accent-soft); color: var(--ink); }
.lv-card h3 { font-size: 20px; margin-bottom: 4px; }
.lv-sub { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.exam-bars { display: grid; gap: 10px; }
.eb { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; font-size: 14px; }
.eb .zh { font-family: var(--han); color: var(--muted); margin-right: 4px; }
.eb-bar { position: relative; height: 34px; background: var(--paper-2); border-radius: 8px; overflow: hidden; }
.eb-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); border-radius: 8px; transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.eb-bar i.oral { background: var(--seal); }
.eb-bar span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--ink); white-space: nowrap; }
.eb-total { margin-top: 14px; font-size: 15px; color: var(--ink-2); }

/* exams */
.exam { display: grid; gap: 28px; margin-bottom: 44px; }
@media (min-width: 900px) { .exam { grid-template-columns: 300px 1fr; align-items: start; } }
.exam-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (max-width: 899px) { .exam-steps { grid-template-columns: repeat(2, 1fr); } }
.exam-steps button { width: 100%; text-align: left; display: flex; gap: 12px; align-items: center; border: 2px solid var(--rule); background: var(--sheet);
  color: var(--ink); border-radius: 14px; padding: 12px 14px; font: 600 16px/1.2 var(--sans); cursor: pointer; }
.exam-steps button b { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid currentColor; font-family: var(--serif); }
.exam-steps button[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); }
.exam-view { display: grid; gap: 24px; align-items: center; }
@media (min-width: 640px) { .exam-view { grid-template-columns: 260px 1fr; } }
.exam-view .phone { max-width: 260px; margin: 0 auto; }
.exam-text h3 { margin-bottom: 10px; }
.exam-text p { color: var(--ink-2); }
.exam-text { animation: fadeUp .35s ease; }
.browser-wide { max-width: 980px; margin: 0 auto; }

/* AI review */
.review-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.review-tabs::-webkit-scrollbar { display: none; }
.review-tabs button { flex: none; border: 1px solid #4b3f36; background: transparent; color: #f6ead8; font: 600 15px/1.2 var(--sans); padding: 10px 16px;
  border-radius: 999px; cursor: pointer; }
.review-tabs button[aria-selected="true"] { background: #f6ead8; color: #1d1410; border-color: #f6ead8; }
.review-card { margin-top: 14px; background: #fffaf2; color: #1d1410; border-radius: var(--r); padding: 22px; display: grid; gap: 22px; animation: fadeUp .35s ease; }
@media (min-width: 900px) { .review-card { grid-template-columns: 1.3fr 1fr; padding: 30px; } }
.rv-task { font-size: 14px; color: #7a6c60; }
.rv-task b { color: #1d1410; }
.rv-text { font: 400 22px/1.75 var(--sans); margin-top: 12px; word-break: break-all; }
.rv-text mark { background: none; color: inherit; text-decoration: underline wavy #c3352a; text-decoration-thickness: 2px; text-underline-offset: 6px; cursor: pointer;
  border-radius: 4px; padding: 0 1px; }
.rv-text mark:hover, .rv-text mark.open { background: #f9e3e1; }
.rv-text.fixed { color: #127237; }
.rv-switch { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.rv-switch button { border: 1px solid #e2d4bd; background: #fff; border-radius: 999px; padding: 8px 14px; font: 600 14px/1 var(--sans); cursor: pointer; color: #1d1410; }
.rv-switch button[aria-pressed="true"] { background: #1d1410; color: #fffaf2; border-color: #1d1410; }
.rv-score { display: flex; align-items: baseline; gap: 8px; }
.rv-score b { font: 700 64px/1 var(--serif); color: #1d1410; font-variant-numeric: tabular-nums; }
.rv-score span { color: #7a6c60; }
.rv-sum { margin-top: 10px; color: #4b3f36; }
.rv-err { margin-top: 14px; border-left: 3px solid #c3352a; background: #fbefe9; padding: 12px 14px; border-radius: 0 12px 12px 0; font-size: 15px; animation: fadeUp .3s ease; }
.rv-err .fix { font: 600 18px/1.5 var(--sans); }
.rv-err .fix s { color: #c3352a; } .rv-err .fix ins { text-decoration: none; color: #127237; }
.rv-tip { margin-top: 14px; font-size: 15px; color: #4b3f36; }
.rv-tip b { color: #9b4b00; }
.rv-hint { font-size: 14px; color: #7a6c60; margin-top: 10px; }

/* progress */
.progress { display: grid; gap: 40px; }
@media (min-width: 980px) { .progress { grid-template-columns: 1fr 1.1fr; align-items: center; } }

/* one account */
.account { display: grid; gap: 18px; align-items: center; }
@media (min-width: 860px) { .account { grid-template-columns: 1fr 120px 1fr; } }
.acc-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 26px; box-shadow: var(--shadow); }
.acc-card h3 { margin: 6px 0 8px; }
.acc-card p:last-child { color: var(--ink-2); }
.acc-k { font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--seal); }
.acc-link { position: relative; height: 60px; display: grid; place-items: center; }
.acc-link::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px dashed var(--seal); }
@media (min-width: 860px) { .acc-link::before { left: 0; right: 0; top: 50%; bottom: auto; border-left: 0; border-top: 2px dashed var(--seal); } }
.acc-link span { position: relative; background: var(--seal); color: #fff6ea; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; transform: rotate(-4deg); }
.acc-note { grid-column: 1 / -1; color: var(--ink-2); max-width: 760px; margin-top: 10px; }

/* pricing */
.prices { display: grid; gap: 18px; }
@media (min-width: 860px) { .prices { grid-template-columns: repeat(3, 1fr); } }
.price-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 26px; box-shadow: var(--shadow); }
.price-num { margin: 10px 0 0; color: var(--ink-2); }
.price-num b { font: 700 40px/1.1 var(--serif); color: var(--ink); margin-right: 4px; }
.price-card .ticks { margin-top: 18px; font-size: 16px; }
.price-what { margin-top: 36px; max-width: 760px; }
.price-what .ticks { margin-top: 14px; }
.price-note { max-width: 860px; margin-top: 30px; }
.price-note p + p { margin-top: 10px; }
.price-note a, .faq a, .foot a { color: inherit; }

/* faq */
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--rule); padding: 4px 0; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 40px 16px 0; font: 700 20px/1.3 var(--serif); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font: 400 28px/1 var(--sans); color: var(--seal); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding: 0 0 18px; max-width: 46em; }

/* final */
.final { padding: 80px 0; background: var(--accent); color: #1d1410; }
.final-in { display: grid; gap: 26px; align-items: center; }
@media (min-width: 760px) { .final-in { grid-template-columns: 180px 1fr; } }
.final p { margin: 12px 0 24px; max-width: 34em; font-size: 18px; }
.final .btn-accent { background: #1d1410; color: #fff6ea; box-shadow: 0 3px 0 #000; }
.stamp { width: 150px; height: 150px; display: grid; place-items: center; border: 6px solid #c3352a; color: #c3352a; border-radius: 22px;
  font: 700 100px/1 var(--han); transform: rotate(-8deg); background: rgba(255, 246, 234, .5); }
.stamp.in { animation: stamp .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes stamp { from { transform: rotate(-8deg) scale(1.8); opacity: 0; } }
.foot { padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.foot-in { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; align-self: flex-start; }
.foot-who { display: grid; gap: 4px; max-width: 46em; }

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* language: English waits hidden until landing.js has swapped the texts (the head script lifts it after 2.5 s anyway) */
.en-wait body { visibility: hidden; }
.lang-sw { display: flex; padding: 3px; border: 1.5px solid var(--rule); border-radius: 999px; background: var(--sheet); flex: none; }
.lang-sw button { min-width: 36px; height: 32px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2);
  font: 600 13px/1 var(--sans); letter-spacing: .04em; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lang-sw button:hover { color: var(--ink); }
.lang-sw button[aria-pressed="true"] { background: var(--ink); color: var(--paper); cursor: default; }
.top-in > .lang-sw + .btn { margin-left: 0; }
@media (max-width: 900px) { .lang-sw { margin-left: auto; } }
.brand span, .top-in > .btn { white-space: nowrap; }
@media (max-width: 420px) { .top-in { gap: 14px; } .lang-sw button { min-width: 30px; padding: 0 6px; } .top-in > .btn { padding: 0 14px; } }
@media (max-width: 350px) { .brand span { display: none; } }
