/* The website's landing page (/ without a session): rice paper, ink and red seals. The page is Ван's route through the
   course: each station is a 田字格 square with its character, stamped red once you reach it, on one line down the page. */
:root {
  --paper: #f6efe3;
  --paper-2: #efe5d3;
  --sheet: #fffaf2;
  --ink: #1d1410;
  --ink-2: #4b3f36;
  --muted: #74675b;
  --rule: #e2d4bd;
  --grid: rgba(196, 72, 44, .12);
  --accent: #f2841c;
  --accent-soft: #fde6cc;
  --brand-soft: var(--accent-soft); /* Ван's circle (../assets/van.css) */
  --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;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "BiauKai", "AR PL UKai CN", "Noto Serif CJK SC", "Songti SC", serif;
  /* the paper's fibre: a faint noise, drawn once */
  --fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  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, .1); --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) var(--fibre); 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; text-wrap: balance; }
h1 { font-size: clamp(36px, 5.4vw, 64px); }
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; }
@media (max-width: 420px) { .wrap { padding: 0 16px; } }
.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; }
[lang="zh"] { font-family: var(--han); }

/* 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; }
.brand img { border-radius: 50%; background: var(--accent-soft); }
.top-nav { display: flex; gap: 18px; margin-left: auto; font-size: 15px; }
.top-nav a { text-decoration: none; color: var(--ink-2); padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.top-nav a:hover, .top-nav a.here { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 1300px) { .top-nav { gap: 14px; } }
@media (max-width: 1180px) { .top-nav { display: none; } } /* the Spanish and French menu with «Blog» needs that much room */

/* hero */
.hero { padding: 36px 0 34px; 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: 160px; background: linear-gradient(transparent, var(--paper)); pointer-events: none; }
.hero-in { display: grid; grid-template-columns: 1fr; gap: 30px; position: relative; z-index: 1; }
@media (min-width: 980px) { .hero { padding: 60px 0 40px; } .hero-in { grid-template-columns: 1.08fr .92fr; align-items: center; gap: 40px; } }
.kicker { 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 { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--seal);
  color: #fff6ea; font: 700 15px/1 var(--kai); transform: rotate(-6deg); }
.hero h1 { max-width: 13em; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); margin-top: 18px; max-width: 34em; }
.doors-q { margin-top: 32px; font: 700 15px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--seal); }
.doors { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 640px) { .doors { grid-template-columns: repeat(3, 1fr); } }
.doors a { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto 1fr; column-gap: 12px; align-items: center; height: 100%;
  text-decoration: none; background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease; }
.doors a:hover { transform: translateY(-2px); border-color: var(--accent); }
.doors b { font: 700 18px/1.2 var(--serif); align-self: end; }
.doors span:last-child { grid-column: 2; font-size: 14px; line-height: 1.35; color: var(--muted); align-self: start; }
.d-han { grid-row: 1 / 3; display: grid; place-items: center; width: 56px; height: 56px; font: 400 34px/1 var(--kai); color: var(--seal);
  border: 1.5px solid var(--seal); border-radius: 4px; background:
    linear-gradient(var(--grid), var(--grid)) center / 100% 1px no-repeat, linear-gradient(var(--grid), var(--grid)) center / 1px 100% no-repeat; }
@media (min-width: 640px) {
  .doors a { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; row-gap: 6px; padding: 14px; }
  .doors b { align-self: start; margin-top: 4px; }
  .doors span:last-child { grid-column: 1; }
  .d-han { grid-row: auto; width: 50px; height: 50px; font-size: 31px; }
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.fine { font-size: 14px; color: var(--muted); margin-top: 14px; max-width: 40em; }

.hero-stage { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 0; min-height: 0; }
.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 { width: min(56%, 290px); margin: 0; transform: rotate(2deg); flex: none; cursor: pointer; }
.phone-cap { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%) rotate(-2deg); background: var(--ink); color: var(--paper);
  font-size: 13px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.phone-dots { position: absolute; left: 50%; bottom: -40px; transform: translateX(-50%); display: flex; gap: 6px; }
.phone-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--rule); transition: background .2s, width .2s; }
.phone-dots i.on { background: var(--seal); width: 18px; border-radius: 4px; }
.hero-van { position: relative; flex: none; width: min(44%, 250px); margin-right: -6%; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.van-btn { display: block; width: 100%; border: 0; padding: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bubble { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow);
  font-size: 15px; line-height: 1.4; margin-bottom: -4px; width: 118%; max-width: 280px; align-self: flex-end; }
.bubble::after { content: ""; position: absolute; left: 58%; bottom: -9px; width: 16px; height: 16px; background: var(--sheet);
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); transform: rotate(45deg); }
.bubble-zh { display: flex; align-items: flex-end; gap: 2px; margin-bottom: 4px; }
.bubble-zh b { font: 700 24px/1 var(--han); margin-left: 6px; }
.bubble-zh .tsyl { font-size: 13px; }
.bubble-zh b { white-space: nowrap; }
/* on the bubble's lower edge, clear of its tail: the bubble keeps its size (and stays over his frame's empty top) */
.hero-van .bubble { z-index: 1; padding-bottom: 20px; }
.bubble-say { position: absolute; left: 12px; bottom: -18px; padding: 7px; box-shadow: var(--shadow); }
.bubble-say svg { width: 18px; height: 18px; }
@media (max-width: 979px) { .hero-stage { margin-top: 6px; padding-bottom: 46px; } }
@media (max-width: 520px) {
  .hero-phone { width: 52%; }
  .hero-van { width: 48%; margin-right: -4%; }
  .bubble { font-size: 13.5px; padding: 10px 12px; width: 112%; }
  .bubble-zh b { font-size: 20px; }
}

/* the facts: a ruler */
.ruler { list-style: none; margin: 34px 0 0; padding: 22px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 14px; position: relative; z-index: 1;
  background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 12px) top left / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 60px) top left / 100% 16px no-repeat;
  border-top: 2px solid var(--ink); }
@media (min-width: 720px) { .ruler { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .ruler { grid-template-columns: repeat(6, 1fr); } }
.ruler b { display: block; font: 700 clamp(28px, 3vw, 38px)/1 var(--serif); color: var(--seal); font-variant-numeric: tabular-nums; }
.ruler span { display: block; font-size: 14px; color: var(--ink-2); margin-top: 6px; line-height: 1.35; }

/* sections and the route's stations */
.sec { padding: 84px 0; }
@media (max-width: 700px) { .sec { padding: 60px 0; } }
.sec-head, .st-head { max-width: 780px; margin-bottom: 36px; position: relative; }
.part { font: 600 13px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--seal); margin-bottom: 14px; }
.sec-head .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) var(--fibre); }
.sec-ink { background: #1d1410; color: #f6ead8; }
.sec-ink .sec-lead { color: #d9cab4; }
.sec-ink .part { color: #f2a65a; }
.fine.on-ink { color: #a8977f; }

.st-mark { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 16px; font: 400 38px/1 var(--kai); color: var(--seal);
  background-color: var(--sheet); border: 2px solid var(--seal); border-radius: 4px; position: relative; z-index: 1;
  background-image: linear-gradient(90deg, transparent calc(50% - .5px), var(--grid) 0 calc(50% + .5px), transparent 0),
    linear-gradient(transparent calc(50% - .5px), var(--grid) 0 calc(50% + .5px), transparent 0);
  transition: background-color .4s ease, color .4s ease, transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.st-head.in .st-mark { background-color: var(--seal); color: #fff6ea; transform: rotate(-4deg); }
.sec-ink .st-mark { background-color: #241c16; }
.sec-ink .st-head.in .st-mark { background-color: #e0574a; }
.route { position: relative; }
@media (min-width: 1100px) {
  .route .wrap { padding-left: 118px; }
  .route .st-mark { position: absolute; left: -98px; top: -6px; margin: 0; width: 64px; height: 64px; font-size: 40px; }
  /* the line between stations, and how far down it you are */
  .route::before, .route::after { content: ""; position: absolute; top: 0; z-index: 2; pointer-events: none;
    left: calc(max(0px, (100% - 1180px) / 2) + 51px); width: 2px; }
  .route::before { bottom: 0; background: repeating-linear-gradient(var(--seal) 0 6px, transparent 6px 14px); opacity: .45; }
  .route::after { height: var(--rp, 0%); background: var(--seal); }
  .route-van { position: absolute; z-index: 3; left: calc(max(0px, (100% - 1180px) / 2) + 34px); top: var(--rp, 0%); width: 36px; height: 36px;
    margin-top: -18px; border-radius: 50%; background: var(--accent-soft); box-shadow: 0 0 0 3px var(--paper), var(--shadow); pointer-events: none; }
}
@media (max-width: 1099px) { .route-van { display: none; } }

/* Ван's slots: the app's clip (js/van.js) in a circle, or whole (data-full) */
.van-slot { display: block; flex: none; }
.van-slot .van { width: 100%; height: auto; }
.van-slot.xs { width: 34px; } .van-slot.sm { width: 60px; } .van-slot.md { width: 110px; } .van-slot.xl { width: 210px; }
.sheet-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sheet-top p { font-size: 15px; color: var(--ink-2); }

/* sheets: the paper the demos are printed on */
.sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); 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; }
.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); }
.sec-ink .ticks li { color: #d9cab4; }

/* 01 «Основы» */
.basics { display: grid; gap: 34px; }
@media (min-width: 940px) { .basics { grid-template-columns: 1fr 1fr; align-items: start; } }
.tone-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tone-key { border: 2px solid var(--rule); background: var(--paper); border-radius: 14px; padding: 10px 4px 8px; cursor: pointer; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 3px; font: 600 22px/1.1 var(--sans); -webkit-tap-highlight-color: transparent; }
.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-key.playing span:first-child::after { content: " ♪"; font-size: 15px; }
.tone-stage { margin-top: 14px; }
.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; }
.b-lessons { list-style: none; counter-reset: b; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.b-lessons li { counter-increment: b; position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 28px 10px 10px;
  font-size: 14px; line-height: 1.3; color: var(--ink-2); min-height: 76px; hyphens: auto; }
@media (max-width: 420px) { .b-lessons li { font-size: 13px; padding: 26px 8px 8px; min-height: 0; } }
.b-lessons li::before { content: counter(b); position: absolute; left: 10px; top: 8px; font: 700 15px/1 var(--serif); color: var(--seal); }
.b-lessons li:last-child { background: var(--accent-soft); border-color: transparent; color: var(--ink); }
.b-lessons li:last-child::after { content: "8/10"; position: absolute; right: 10px; top: 8px; font: 700 12px/1 var(--sans); color: var(--seal); }

/* 02 the lesson */
.day { display: grid; gap: 34px; }
@media (min-width: 980px) { .day { grid-template-columns: 1fr 430px; 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; }
.card-ui { background: #f0f0f3; color: #000; border-radius: 30px; padding: 16px 16px 18px; border: 8px solid #1d1410; min-height: 560px;
  display: flex; flex-direction: column; }
.lesson-bar { display: flex; align-items: center; gap: 10px; margin: 2px 2px 14px; }
.lb-track { position: relative; flex: 1; height: 8px; background: #dcdce2; border-radius: 4px; }
.lb-track i { position: absolute; inset: 0 auto 0 0; width: var(--p, 6%); background: var(--accent); border-radius: 4px; transition: width .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-pic { width: 112px; height: 112px; margin: 4px auto 0; }
.lb-han { text-align: center; font: 400 72px/1.1 var(--sans); margin: 2px 0; color: #111; }
.lb-han.big { font-size: 84px; margin: 18px 0 4px; }
.lb-py { text-align: center; font-size: 24px; display: flex; justify-content: center; }
.lb-ru { text-align: center; font-size: 19px; margin: 4px 0 8px; }
.lb-tools { display: flex; justify-content: center; gap: 8px; margin: 8px 0 10px; 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: 4px; }
.lb-ex .zh { font-size: 19px; font-family: var(--sans); } .lb-ex .py { color: #6b6b72; font-size: 14px; } .lb-ex .ru { font-size: 15px; margin-top: 2px; }
.lb-ex .chip { float: right; padding: 8px; }
.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; display: flex; gap: 12px; align-items: flex-start; }
.fb h4 { margin: 0 0 4px; font: 700 17px/1.2 var(--sans); }
.fb.ok h4 { color: #127237; } .fb.no h4 { color: #c3352a; }
.fb .was { color: #6b6b72; }
.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: 18px 6px; display: flex; flex-direction: column; align-items: center; }
.lb-done .van-slot { width: 170px; }
.lb-done p { margin: 8px 0 18px; color: #4b3f36; }

/* 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.sandhi 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; }
.shots-row.two { grid-template-columns: repeat(2, minmax(200px, 260px)); justify-content: center; }
.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, 70%); margin-right: -20px; padding-right: 20px; }
  .shots-row.two { grid-template-columns: repeat(2, 70%); justify-content: start; }
}
@media (max-width: 420px) { .shots-row { margin-right: -16px; padding-right: 16px; } }

/* 03 pronunciation */
.voice { display: grid; gap: 34px; }
@media (min-width: 980px) { .voice { grid-template-columns: 1.1fr .9fr; align-items: start; } .voice .shots-row { grid-column: 1 / -1; } }
.voice-demos { display: grid; gap: 16px; }
.pitch-plot { width: 100%; height: auto; display: block; }
.pitch-grid line { stroke: var(--rule); stroke-width: 1; }
.pitch-plot path { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.pitch-plot .ref { stroke: var(--muted); opacity: .55; stroke-dasharray: 2 9; stroke-width: 6; }
.pitch-plot .you { stroke: var(--accent); }
.pitch-plot text { fill: var(--muted); font: 600 15px var(--han); }
.pitch-legend { display: flex; gap: 16px; font-size: 14px; color: var(--muted); margin-top: 6px; }
.pitch-legend span::before { content: ""; display: inline-block; width: 22px; height: 0; vertical-align: middle; margin-right: 6px; border-top: 4px solid var(--accent); border-radius: 2px; }
.pitch-legend .lg-ref::before { border-top: 4px dotted var(--muted); }
.shadow-msg { margin: 10px 0 4px; font-weight: 600; color: var(--good); }
.pitch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.marks-line { font: 400 24px/1.9 var(--han); }
.marks-line span { border-bottom: 3px solid; padding: 0 1px; }
.marks-line .ok { border-color: var(--good); } .marks-line .weak { border-color: var(--accent); background: var(--accent-soft); } .marks-line .miss { border-color: var(--bad); border-bottom-style: dashed; color: var(--muted); }
.marks-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted); margin-top: 8px; }
.marks-legend span::before { content: ""; display: inline-block; width: 18px; vertical-align: middle; margin-right: 6px; border-top: 3px solid; }
.marks-legend .ok::before { border-color: var(--good); } .marks-legend .weak::before { border-color: var(--accent); } .marks-legend .miss::before { border-color: var(--bad); border-top-style: dashed; }

/* 04 handwriting */
.write { display: grid; gap: 40px; }
@media (min-width: 940px) { .write { grid-template-columns: 1fr 420px; align-items: start; } }
.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(--kai); 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-foot { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; min-height: 34px; }
.pad-msg { text-align: center; 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; }

/* 05 levels and the mock exam */
.level-links { margin-top: 18px; font-size: 15px; }
.level-links p { margin: 6px 0; }
.level-links a { margin-right: 10px; white-space: nowrap; }
.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: 118px 1fr; gap: 10px; align-items: center; font-size: 14px; }
.eb .zh { font-family: var(--kai); 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); }
/* the label once more inside the fill, cut by it: light on the red of the speaking part (UX test 15.11, Н11: dark on red at 320 px) */
.eb-bar i { overflow: hidden; }
.eb-bar i.oral span { color: #fff; }
.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); }
@media (max-width: 380px) { .eb { grid-template-columns: 1fr; gap: 4px; } } /* 320 px: «30 tasks · 23 min» fits the bar under its name */
.exam { display: grid; gap: 28px; margin-top: 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; height: 100%; }
.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-side { display: grid; gap: 14px; align-content: start; }
.exam-text h3 { margin-bottom: 10px; }
.exam-text p { color: var(--ink-2); }
.exam-text { animation: fadeUp .35s ease; }

/* 06 YCT */
.sec-yct { background: radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--accent) 22%, transparent) 0 90px, transparent 91px), var(--paper) var(--fibre); }
.yct { display: grid; gap: 40px; }
@media (min-width: 940px) { .yct { grid-template-columns: 1fr 280px; align-items: start; } }
.yct-phone .phone { max-width: 280px; }
.yct-table { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .yct-table { grid-template-columns: repeat(4, 1fr); } }
.yct-lv { background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.yct-lv h3 { font: 700 20px/1 var(--serif); color: var(--seal); }
.yct-lv b { display: block; font: 700 26px/1 var(--serif); margin-top: 10px; }
.yct-lv span { display: block; font-size: 13px; color: var(--muted); }
.yct-lv p { font-size: 13px; color: var(--ink-2); margin-top: 8px; line-height: 1.4; }

/* 07 AI review */
.review { display: grid; gap: 0; }
.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; min-height: 360px; }
@media (min-width: 900px) { .review-card { grid-template-columns: 1.3fr 1fr; padding: 30px; } }
.rv-wait { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; grid-column: 1 / -1; color: #4b3f36; text-align: center; }
.rv-wait .van-slot { width: 96px; }
.rv-wait .bar { width: min(280px, 80%); height: 6px; border-radius: 3px; background: #efe5d3; overflow: hidden; }
.rv-wait .bar i { display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 3px; animation: wait 1.1s ease-in-out infinite; }
@keyframes wait { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.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; }

/* 08 plan */
.plan { display: grid; gap: 40px; }
@media (min-width: 980px) { .plan { grid-template-columns: 1fr 1.15fr; align-items: center; } }
.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; }

/* 09 everything else */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.cards li { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px; position: relative; overflow: hidden; }
.cards li > span { position: absolute; right: 14px; top: 10px; font: 400 34px/1 var(--kai); color: var(--seal); opacity: .22; }
.cards b { display: block; font: 700 19px/1.25 var(--serif); padding-right: 64px; }
.cards p { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.more-shots { margin-top: 36px; }
/* the themes (landing.js): the app's posters (../assets/posters.css) and a phone that wears the picked one, Главная or a
   lesson, light or dark. A phone: the phone, then the posters in a row to swipe; a computer: the posters beside it. */
@property --glow { syntax: "<color>"; inherits: true; initial-value: transparent; }
.themes { --font: var(--sans); --fast: .22s; --ease: cubic-bezier(.2, .7, .2, 1); display: grid; gap: 26px 56px; margin-top: 64px;
  grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "stage" "list"; }
.themes-text { grid-area: text; }
.themes h3 { font-size: clamp(26px, 2.8vw, 36px); }
.themes-text > p { margin-top: 12px; color: var(--ink-2); max-width: 62ch; }
.themes-text > .themes-try { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-weight: 600; color: var(--seal); }
.themes-try::before { content: "试"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: var(--seal);
  color: var(--sheet); font: 400 18px/1 var(--kai); transform: rotate(-6deg); }

.tstage { --glow: color-mix(in srgb, var(--t-brand) 30%, transparent); grid-area: stage; position: relative; isolation: isolate;
  display: grid; justify-items: center; align-content: start; gap: 16px; transition: --glow .7s ease; }
.tstage::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 54%; width: min(560px, 140%); aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none; }
.tstage-bar { display: flex; align-items: center; gap: 10px; }
.tstage-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--sheet); border: 1px solid var(--rule); }
.tstage-tabs button { appearance: none; min-height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: var(--ink-2);
  font: 600 15px/1 var(--sans); cursor: pointer; transition: background .35s ease, color .35s ease; -webkit-tap-highlight-color: transparent; }
.tstage-tabs button[aria-pressed="true"] { background: var(--t-brand); color: var(--t-on); }
.tstage-sky { appearance: none; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--rule); border-radius: 50%;
  background: var(--sheet); color: var(--ink); cursor: pointer; transition: transform .3s var(--ease); -webkit-tap-highlight-color: transparent; }
.tstage-sky:active { transform: rotate(-25deg) scale(.94); }
.tstage-sky svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tstage-sky svg > path:only-child { fill: currentColor; stroke: none; }
.tstage .phone { width: min(212px, 56vw); } /* a phone: the posters just below it */
@media (min-width: 560px) { .tstage .phone { width: 250px; } }
.tstage .phone-screen img.ts-in { animation: ts-in .62s var(--ease); }
@keyframes ts-in { from { clip-path: circle(0% at 50% 30%); } to { clip-path: circle(125% at 50% 30%); } }
.tstage-cap { max-width: 32ch; min-height: 3.1em; text-align: center; color: var(--ink-2); font-size: 15px; line-height: 1.35; }
.tstage-cap b { display: block; margin-bottom: 2px; color: var(--ink); font: var(--t-dw) 21px/1.2 var(--t-disp); text-transform: var(--t-tt); letter-spacing: var(--t-ls); }
@media (max-width: 979px) { .tstage-cap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } } /* the ringed poster says it */

/* the posters: a row to swipe, the picked one ringed in its colour, its world awake */
.themes .tp-list { grid-area: list; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(148px, 44%); gap: 12px;
  margin: 0 -20px; padding: 6px 20px 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px; overscroll-behavior-x: contain; scrollbar-width: none; }
.themes .tp-list::-webkit-scrollbar { display: none; }
@media (max-width: 420px) { .themes .tp-list { margin: 0 -16px; padding: 6px 16px 16px; scroll-padding: 0 16px; } }
@media (min-width: 560px) { .themes .tp-list { grid-auto-columns: 200px; } }
.themes .tp-card { scroll-snap-align: start; box-shadow: 0 0 0 1px color-mix(in srgb, var(--t-text) 12%, transparent), 0 10px 26px -18px rgba(40, 20, 0, .55); }
.themes .tp-card.on { box-shadow: 0 0 0 3px var(--t-brand), 0 16px 34px -18px color-mix(in srgb, var(--t-brand) 80%, #000); }
.themes .tp-card:has(.tp-pick:focus-visible) { outline-color: var(--accent); }
.themes .tp-pick { min-height: 100%; }
.tp-scene > :is(.tp-poem, .tp-seal, .tp-stamp) { font-family: var(--kai); } /* the brush, not the page's [lang=zh] serif */
.themes .tp-cap { padding: 11px 13px 14px; }
@media (hover: hover) { .themes .tp-card:not(.on):hover { transform: translateY(-4px); } }

@media (min-width: 980px) {
  .themes { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "text stage" "list stage"; align-items: start; }
  .tstage { position: sticky; top: 84px; }
  .tstage .phone { width: 272px; }
  .themes .tp-list { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; margin: 0; padding: 0; overflow: visible; }
  /* Классика across, as in the app; four to a row: two wide, his world as tall as the others' */
  .themes .tp-card[data-theme-id="standard"] { grid-column: 1 / -1; }
  .themes .tp-card[data-theme-id="standard"] .tp-pick { flex-direction: row; }
  .themes .tp-card[data-theme-id="standard"] .tp-scene { aspect-ratio: auto; width: 46%; min-height: 170px; flex: none; }
  .themes .tp-card[data-theme-id="standard"] .tp-cap { align-content: center; padding: 16px 18px; }
  .themes .tp-card[data-theme-id="standard"] .tp-name { font-size: 20px; }
}
@media (min-width: 1140px) {
  .themes { grid-template-columns: minmax(0, 1fr) 320px; }
  .themes .tp-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .themes .tp-card[data-theme-id="standard"] { grid-column: span 2; }
  .themes .tp-card[data-theme-id="standard"] .tp-pick { flex-direction: column; }
  .themes .tp-card[data-theme-id="standard"] .tp-scene { width: auto; min-height: 0; height: calc((100cqw - 12px) / 2 * 1.08); }
  .themes .tp-card[data-theme-id="standard"] .tp-cap { align-content: start; padding: 11px 13px 14px; }
  .themes .tp-card[data-theme-id="standard"] .tp-name { font-size: 16px; }
  .themes .tp-card[data-theme-id="standard"] .tp-ring { width: auto; height: 86%; }
}

/* the picked poster's world wakes: Telegram's plane flies, the barbell comes off the rack, the seal is stamped, the sign
   flickers, «БАХ!» pops, the sun rises, a calendar leaf turns */
@media (prefers-reduced-motion: no-preference) {
  .themes .tp-card.on .tp-plane { animation: tsp-fly 3.2s ease-in-out infinite; }
  .themes .tp-card.on .tp-bar { animation: tsp-lift 2.4s ease-in-out infinite; }
  .themes .tp-card.on .tp-seal { animation: tsp-seal .55s cubic-bezier(.3, 1.6, .5, 1) both; }
  .themes .tp-card.on .tp-sign { animation: tsp-neon 2.8s steps(1, end) infinite; }
  .themes .tp-card.on .tp-word { animation: tsp-pop .5s cubic-bezier(.3, 1.8, .5, 1) both; }
  .themes .tp-card.on .tp-sun { animation: tsp-rise 1s var(--ease) both; }
  .themes .tp-card.on .tp-page { transform-origin: 50% 0; animation: tsp-leaf .7s var(--ease) both; }
  .themes .tp-card.on .tp-stamp { animation: tsp-stamp .5s .45s cubic-bezier(.3, 1.6, .5, 1) both; }
}
@keyframes tsp-fly { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-3cqw, -2.5cqw) rotate(-8deg); } }
@keyframes tsp-lift { 0%, 25%, 100% { transform: translateY(0); } 55%, 70% { transform: translateY(-7cqw); } }
@keyframes tsp-seal { from { transform: rotate(-5deg) scale(1.9); opacity: 0; } to { transform: rotate(-5deg) scale(1); opacity: 1; } }
@keyframes tsp-neon { 0%, 18%, 24%, 100% { opacity: 1; } 20%, 23% { opacity: .35; } }
@keyframes tsp-pop { from { transform: rotate(-9deg) scale(0); } to { transform: rotate(-9deg) scale(1); } }
@keyframes tsp-rise { from { transform: translateY(70%); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes tsp-leaf { from { transform: rotate(-4deg) rotateX(-85deg); } to { transform: rotate(-4deg); } }
@keyframes tsp-stamp { from { transform: rotate(14deg) scale(1.8); opacity: 0; } to { transform: rotate(14deg) scale(1); opacity: .88; } }

/* pricing: the free plan and Pro side by side, Pro's month and year inside it, then the two row by row */
.plans { display: grid; gap: 18px; }
@media (min-width: 900px) { .plans { grid-template-columns: 1fr 1.7fr; } }
.price-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.price-card.pro { border-top: 4px solid var(--accent); }
.acc-k { font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--seal); }
.price-go { margin-top: auto; align-self: flex-start; }
.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; }
.plan-for { margin: 8px 0 0; font: 700 19px/1.3 var(--serif); color: var(--ink); }
.price-card .ticks { margin: 18px 0 22px; font-size: 16px; }
.pay-opts { display: grid; gap: 12px; margin-top: auto; }
@media (min-width: 620px) { .pay-opts { grid-template-columns: 1fr 1fr; } }
/* three plans (the month, 3 months, the year): side by side once the Pro card is wide enough, else one under another */
.price-card.pro { container-type: inline-size; }
@media (min-width: 900px) { .plans:has(.pay-opts > :nth-child(3)) { grid-template-columns: 1fr; } } /* Pro the whole width */
@media (min-width: 620px) { .pay-opts:has(> :nth-child(3)) { grid-template-columns: 1fr; } }
@container (min-width: 600px) { .pay-opts:has(> :nth-child(3)) { grid-template-columns: repeat(3, 1fr); } .pay-opts:has(> :nth-child(3)) .price-num b { font-size: 26px; } }
.pay-opt { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--rule); border-radius: 14px; background: var(--paper); }
.pay-opt.best { border: 2px solid var(--accent); }
.opt-k { display: flex; align-items: center; gap: 8px; margin: 0; font: 700 17px/1.2 var(--sans); color: var(--ink); }
.save { padding: 4px 9px; border-radius: 999px; background: var(--seal); color: #fff6ea; font: 700 13px/1 var(--sans); }
.pay-opt .price-num b { font-size: 32px; }
.per { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); }
.per b { color: var(--ink); }
.fine { list-style: none; margin: 12px 0 18px; padding: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.fine li + li { margin-top: 6px; }
/* «Бесплатно и Pro по разделам»: the app's comparison (assets/procmp.css) in the landing's paper and ink, its seals 田字格 */
.compare { margin-top: 48px; }
.compare .pc {
  --bg: var(--paper-2); --card: var(--sheet); --text: var(--ink); --hint: var(--muted); --sep: var(--rule); --track: rgba(29, 20, 16, .08);
  --brand: var(--accent); --on-brand: #1d1410; --brand-ink: #a64d00; --ok: var(--good); --ok-ink: var(--good); --ok-soft: rgba(18, 114, 55, .12);
  --font: var(--sans); --rk: .9; --pc-free: #2a74c0; --pc-free-ink: #1f5f9f; --pc-on-ok: #fff; --pc-shadow: var(--shadow); gap: 20px;
}
@media (prefers-color-scheme: dark) {
  .compare .pc { --track: rgba(246, 234, 216, .1); --brand-ink: #ffa640; --ok-soft: rgba(69, 201, 124, .14); --pc-on-ok: #0c1f14;
    --pc-free: #8cc6ff; --pc-free-ink: #a6d3ff; --pc-free-soft: rgba(120, 185, 255, .2); --pc-free-bar: #79b8f2; --pc-on-free-bar: #0b1c30; }
}
.compare .pc-top, .compare .pc-lead { display: grid; gap: 16px; align-content: start; }
.compare .pc-hero .van-slot { width: 112px; }
.compare .pc-sl { background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); }
.compare .pc-sl::before { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--grid), var(--grid)) center / 1px 100% no-repeat,
  linear-gradient(var(--grid), var(--grid)) center / 100% 1px no-repeat; }
.compare .pc-strip, .compare .pc-stop, .compare .pc-bub { border: 1px solid var(--rule); box-shadow: none; }
.compare .pc-sc-h b { font-family: var(--serif); font-size: 19px; }
@media (min-width: 900px) {
  .compare .pc-top { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; align-items: center; }
  .compare .pc-stops { display: block; columns: 2; column-gap: 20px; }
  .compare .pc-stop { break-inside: avoid; margin-bottom: 20px; }
}
@media (max-width: 640px) { .price-card { padding: 22px 18px; } }
.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: 70px 0; background: var(--accent); color: #1d1410; overflow: hidden; }
.final-in { display: grid; gap: 18px; align-items: center; justify-items: start; }
@media (min-width: 760px) { .final-in { grid-template-columns: 230px 1fr; gap: 34px; } }
.final .van-slot.xl { width: 200px; justify-self: center; }
.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; }
.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; }
.foot-pay { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line, #8883); display: grid; gap: 14px; font-size: 13px; }
.foot-pay .logos { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.foot-pay .logos img { height: 28px; width: auto; padding: 4px 8px; border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px #8883; }
.foot-pay .paybox p { margin: 0; max-width: 60em; }
.foot-pay .reqs { display: grid; gap: 2px; }
.foot-pay[hidden] { display: none; }
/* Catalogs' badges (hsk/badges.py): one row drifting right to left, faded at both edges, still under the pointer */
.listed { margin-bottom: 26px; }
.listed-h { margin: 0 0 12px; text-align: center; font: 600 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.marquee { overflow: hidden; padding-block: 3px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; width: max-content; animation: marquee var(--dur) linear infinite; }
.marquee-track li { flex: none; margin-right: 16px; }
.marquee:is(:hover, :focus-within) .marquee-track { animation-play-state: paused; }
.badge-img { display: block; transition: translate .2s; }
.badge-img img { display: block; height: 44px; width: auto; max-width: none; }
.badge-img:hover { translate: 0 -2px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (max-width: 640px) { .marquee-track li { margin-right: 10px; } .badge-img img { height: 34px; } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; overflow-x: auto; scrollbar-width: none; }
  .marquee-track { animation: none; margin-inline: auto; }
  .marquee-track li[aria-hidden] { display: none; }
}

/* 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: the switcher (the server writes the page in its address's language) */
.lang-sw { display: flex; padding: 3px; border: 1.5px solid var(--rule); border-radius: 999px; background: var(--sheet); flex: none; }
.lang-sw select { height: 32px; padding: 0 24px 0 10px; border: 0; border-radius: 999px; color: var(--ink); font: 600 13px/1 var(--sans);
  letter-spacing: .04em; cursor: pointer; -webkit-tap-highlight-color: transparent; appearance: none; -webkit-appearance: none;
  background: linear-gradient(45deg, transparent 50%, currentColor 50%) right 13px center / 5px 5px no-repeat,
    linear-gradient(135deg, currentColor 50%, transparent 50%) right 8px center / 5px 5px no-repeat, transparent; }
.lang-sw select option { color: initial; }
@media (max-width: 1180px) { .lang-sw { margin-left: auto; } }
.brand span, .top-in > .btn { white-space: nowrap; }
@media (max-width: 420px) { /* «Se connecter», «Zaloguj się» and the switcher leave the name room on a 360 px phone */
  .top-in { gap: 8px; } .top-in > .btn { padding: 0 12px; font-size: 14px; } .brand { gap: 8px; font-size: 16px; min-width: 0; }
  .brand span { overflow: hidden; text-overflow: ellipsis; } .lang-sw select { padding: 0 20px 0 7px; } }
@media (max-width: 374px) { .top-in { gap: 6px; } .top-in > .btn { padding: 0 10px; font-size: 13px; } .brand { font-size: 15px; } }
@media (max-width: 350px) { .brand span { display: none; } }
.van-btn .van { width: 100%; height: auto; }
.sheet-note { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.lesson-bar img { border-radius: 50%; background: var(--accent-soft); flex: none; }

/* ---- the site as an app on the phone: the block under the hero (its sheet and step card: install.css) ---- */
.app-card-wrap { position: relative; z-index: 1; margin: 4px auto 30px; }
.app-card { max-width: 640px; padding: 20px 18px 18px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--sheet); }
.app-card h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; margin-bottom: 10px; }
.app-card h2 svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-card p { font-size: 16px; line-height: 1.5; color: var(--ink-2); margin-bottom: 16px; }
/* Android: the three ways (webapp._android_parts) */
.ways-list { list-style: none; margin: 0; padding: 0; }
.ways-list li { padding: 14px 0; border-top: 1px solid var(--rule); }
.ways-list li:first-child { padding-top: 2px; border-top: 0; }
.ways-list li[hidden] { display: none; }
.ways-list li[hidden] + li { padding-top: 2px; border-top: 0; }
.ways-list b { display: block; margin-bottom: 4px; font-size: 17px; }
.app-card .ways-list p { margin-bottom: 10px; font-size: 15px; }
.ways-play { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.ways-play svg { width: 24px; height: 24px; flex: none; }
.ways-play small { color: var(--ink-2); font-weight: 400; }
.app-card .ways-note { margin: 0; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--ink); font-weight: 600; }
/* «Все версии Master Wang» (webapp._ios_parts): a card per device, its ways at the card's foot */
@media (min-width: 980px) { .cards.apps { grid-template-columns: repeat(4, 1fr); } }
.cards.apps li { display: flex; flex-direction: column; }
.cards.apps .go { margin-top: auto; padding-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.cards.apps .go > a:not(.btn) { color: var(--ink); font-weight: 600; }

/* «Статьи о китайском и HSK» (webapp._blog_parts): the blog's three newest; on a phone they scroll sideways */
.blog-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.blog-cards a { display: flex; flex-direction: column; height: 100%; background: var(--sheet); border: 1px solid var(--rule);
  border-radius: var(--r); overflow: hidden; color: inherit; text-decoration: none; }
.blog-cards img { display: block; width: 100%; height: auto; aspect-ratio: 40 / 21; object-fit: cover; }
.blog-cards b { display: block; padding: 16px 18px 0; font: 700 19px/1.25 var(--serif); }
.blog-cards b:last-child { padding-bottom: 18px; }
.blog-cards p { margin: 0; padding: 8px 18px 18px; font-size: 15px; color: var(--ink-2); }
.blog-cards a:hover b { text-decoration: underline; }
.blog-all { margin-top: 26px; }
@media (max-width: 760px) {
  .blog-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding-bottom: 10px; }
  .blog-cards li { flex: 0 0 84%; scroll-snap-align: start; }
}

/* The demo video (webapp._demo, masterwang.app) */
.demo-video { display: block; width: 100%; max-width: 1040px; height: auto; aspect-ratio: 16 / 9; margin: 0 auto; border-radius: 18px; background: #17120e; box-shadow: 0 24px 60px rgba(29, 20, 16, .22); }
