/* Chinese Mandarin Handwriting / Hán Tự website: house layout (nav, language menu, store badge, hero, sections, Pro table, privacy / support
   pages, phone rules). Replace the :root colors with the app's own tokens (docs/DESIGN.md); add the app's own
   components below "App-specific". Started from Money Tracker's site; colors from iKanji docs/DESIGN.md. */
@import url(fonts.css?v=7bffa9b16d);

:root {
  /* Hán Tự tokens (docs/DESIGN.md): brand blue, ink navy, seal red, green writing grid on ivory paper. */
  --bg: #EEF3F8;
  --surface: #FFFFFF;
  --ink: #0F1B2B;
  --ink-2: #2C3A4D;
  --muted: #4A5A6E;
  --line: #D5DFEA;
  --brand: #035E9E;
  --brand-fill: #0476C4;
  --brand-tint: #E6F0FA;
  --header: #0476C4;
  --header-deep: #1C2A6E;
  --night: #0B1622;
  --on-header: #FFFFFF;
  --on-header-2: #FFFFFF;
  --on-night: #A3B3C4;
  --on-deep: #C3CBE6;
  --seal: #B4372C;
  --grid: #2E9A55;
  --paper: #FFFDF6;
  --char: #1C2A6E;
  --ok: #1E7A45;
  --coin: #FFD84D;
  --frame: #10161D;
  --pad-x: clamp(20px, 4.4vw, 64px);
  --section-y: clamp(72px, 9vw, 136px);
  --shadow-1: 0 10px 30px rgba(15, 27, 43, 0.08);
  --shadow-2: 0 24px 60px rgba(15, 27, 43, 0.14), 0 2px 6px rgba(15, 27, 43, 0.06);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: #9AA4B5 var(--bg); }
body {
  margin: 0;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
::selection { background: #BFDDF4; color: var(--ink); }
a { color: var(--brand); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--header); }
:focus-visible { outline: 3px solid var(--coin); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
/* Be Vietnam Pro has Latin and Vietnamese only: these languages use the system font on the whole page. */
:lang(ja) body, body:lang(ja) { font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif; }
:lang(ko) body, body:lang(ko) { font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
:lang(ru) body, body:lang(ru) { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
:lang(th) body, body:lang(th) { font-family: system-ui, -apple-system, "Sukhumvit Set", Thonburi, "Leelawadee UI", "Noto Sans Thai", sans-serif; line-height: 1.75; }
:lang(ja) h1, :lang(ja) h2 { letter-spacing: -0.01em; word-break: auto-phrase; line-break: strict; }
:lang(ko) h1, :lang(ko) h2 { letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: anywhere; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--pad-x); }
.skip { position: absolute; left: 12px; top: -48px; background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header and navigation */
.top { background: var(--header); color: #FFFFFF; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 12px; color: #FFFFFF; text-decoration: none; margin-right: auto; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand:hover { color: #FFFFFF; }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 2px 6px rgba(5, 15, 45, 0.35); }
.nav-links { display: flex; flex-wrap: wrap; gap: 0 24px; font-size: 15px; font-weight: 500; }
.nav-links a { color: #E8EDF5; text-decoration: none; display: inline-block; padding: 10px 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #FFFFFF; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--coin); text-decoration-thickness: 2px; }
/* Language menu (tools/languages.py writes it after .nav-links, never inside: on phones it sits beside the logo) */
.langs { position: relative; align-self: center; }
.langs summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; color: #E8EDF5; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover, .langs[open] summary { border-color: #FFFFFF; color: #FFFFFF; }
.langs summary svg { width: 18px; height: 18px; }
.langs ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; margin: 0; padding: 6px; list-style: none; min-width: 180px; background: var(--surface); border-radius: 14px; box-shadow: 0 18px 40px rgba(5, 15, 45, 0.3); }
.langs ul a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--ink) !important; text-decoration: none !important; }
.langs ul a:hover { background: var(--bg); }
.langs ul a[aria-current] { color: var(--brand) !important; font-weight: 600; }

/* App Store badge (drawn from Apple's black badge; swap for the official SVG from developer.apple.com/app-store/marketing/guidelines) */
.store { display: inline-flex; align-items: center; gap: 10px; background: #000000; color: #FFFFFF; text-decoration: none; border: 1px solid #A6A6A6; border-radius: 12px; padding: 8px 20px 8px 14px; min-height: 52px; transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out); }
.store:hover { color: #FFFFFF; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); }
.store svg { width: 28px; height: 28px; fill: currentColor; }
.store span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store small { font-size: 11px; font-weight: 500; }
.store strong { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }

/* Hero */
.hero { overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: end; padding-top: clamp(40px, 6vw, 88px); }
.hero-copy { padding-bottom: clamp(48px, 7vw, 120px); }
.hero h1 { font-size: clamp(40px, 5.6vw, 78px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 800; }
.hero .lede { margin-top: 24px; max-width: 34em; font-size: clamp(17px, 1.5vw, 20px); color: var(--on-header); }
.cta-row { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.cta-row .meta { font-size: 15px; color: var(--on-header-2); }
.hero-phone { display: flex; justify-content: center; }
.hero-phone img { width: 100%; max-width: 340px; border-radius: 46px 46px 0 0; border: 9px solid var(--frame); border-bottom: 0; box-shadow: 0 -10px 60px rgba(5, 15, 45, 0.45); margin-bottom: -2px; animation: rise 0.9s var(--ease-out) both; }
@keyframes rise { from { transform: translateY(48px); } to { transform: none; } }

/* Sections */
.section { padding-block: var(--section-y); }
.section.white { background: var(--surface); border-block: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 64px; align-items: center; }
h2 { font-size: clamp(32px, 3.8vw, 54px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; }
.sub { margin-top: 20px; max-width: 34em; color: var(--muted); font-size: 18px; }

.ticks { list-style: none; margin: 32px 0 0; padding: 0; max-width: 34em; border-top: 1px solid var(--line); }
.ticks li { display: flex; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ticks svg { flex: none; width: 24px; height: 24px; stroke: var(--brand); }

/* Screens */
.shots { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.shots figure, .shot { margin: 0; }
.device { width: 100%; max-width: 330px; margin: 0 auto; border-radius: 36px; border: 7px solid var(--frame); box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16); background: var(--frame); }
.shots figcaption { margin: 20px auto 0; max-width: 330px; }
.shots figcaption strong { display: block; font-weight: 700; }
.shots figcaption span { color: var(--muted); }

/* Private-by-default band */
.night { background: var(--header-deep); color: #FFFFFF; }
.facts { margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 40px 48px; }
.facts div { border-top: 2px solid var(--coin); padding-top: 20px; }
.facts strong { display: block; font-size: 19px; font-weight: 700; }
.facts p { margin-top: 8px; color: #C3CEE8; }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 48px; min-height: 44px; color: #FFFFFF; font-weight: 600; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--coin); text-decoration-thickness: 2px; }
.arrow-link:hover { color: #FFFFFF; }
.arrow-link svg { width: 18px; height: 18px; transition: transform 0.2s var(--ease-out); }
.arrow-link:hover svg { transform: translateX(4px); }

/* Pro */
.pro { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; }
.table-box { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-1); font-size: 16px; }
.compare th, .compare td { padding: 14px 20px; text-align: left; vertical-align: top; }
.compare thead th { padding-block: 18px; font-weight: 700; }
.compare tbody tr { border-top: 1px solid var(--line); }
.compare tbody th { font-weight: 500; }
.compare td { color: var(--muted); }
.compare .p { background: var(--brand-tint); color: var(--ink); font-weight: 600; }
.compare thead .p { color: var(--brand); }

/* Closing call to action */
.closing { text-align: center; max-width: 760px; }
.closing img { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto; box-shadow: 0 12px 30px rgba(4, 118, 196, 0.3); }
.closing h2 { margin-top: 28px; font-size: clamp(30px, 3.4vw, 48px); }
.closing p { margin-top: 16px; color: var(--muted); }
.closing .store { margin-top: 32px; }

/* App-specific (components of this app's home page) */
/* Kai (CN-Khai, the app's large-character font) cut to the characters these pages use: tools/web_font.sh */
@font-face { font-family: "Kai"; src: url(fonts/kai-web.woff2) format("woff2"); font-display: swap; }
.kai { font-family: "Kai", "Kaiti SC", "STKaiti", "KaiTi", serif; font-weight: 400; }

/* Every header is the brand-blue wall with the 米 writing grid at wall scale (the app's calligraphy grid) */
.top { background-color: var(--header); background-position: center top; background-size: 120px 120px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(45deg, transparent calc(50% - 0.5px), rgba(255, 255, 255, 0.05) calc(50% - 0.5px), rgba(255, 255, 255, 0.05) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(-45deg, transparent calc(50% - 0.5px), rgba(255, 255, 255, 0.05) calc(50% - 0.5px), rgba(255, 255, 255, 0.05) calc(50% + 0.5px), transparent calc(50% + 0.5px)); }
.nav-links a:hover, .nav-links a[aria-current="page"], .arrow-link { text-decoration-color: #FFFFFF; }
.nav-links a, .langs summary { color: #FFFFFF; }
.doc-head .mail { color: var(--brand); }

/* Home hero: the copy and a tear-off calendar (lịch bloc) that hangs over the next section */
.wall-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: start; padding-top: clamp(32px, 5vw, 64px); }
.wall-copy { padding-bottom: clamp(56px, 7vw, 104px); }
.wall-copy h1 { font-size: clamp(40px, 5.4vw, 72px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 800; }
.wall-copy .lede { margin-top: 22px; max-width: 34em; font-size: clamp(17px, 1.5vw, 20px); color: var(--on-header); }
.wall-copy .meta { font-size: 15px; color: var(--on-header-2); font-weight: 500; }
.cal-col { position: relative; z-index: 2; margin-bottom: -160px; }
.cal { width: min(430px, 100%); margin: 0 auto; position: relative; }
.board { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 12px 18px 26px; border-radius: 10px 10px 4px 4px; background: var(--header-deep); color: #F4EBD6; box-shadow: 0 18px 40px rgba(10, 26, 58, 0.35); }
.board .seal-mark { flex: none; width: 30px; height: 30px; border-radius: 4px; background: var(--seal); color: #FFF4EA; font-size: 20px; line-height: 30px; text-align: center; }
.board .t { font-weight: 700; font-size: 13px; letter-spacing: 0.02em; line-height: 1.25; }
.board .t small { display: block; font-weight: 500; font-size: 12px; opacity: 0.8; }
.board .yr { margin-left: auto; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.staples { position: absolute; z-index: 6; left: 0; right: 0; top: 48px; display: flex; justify-content: center; gap: 120px; pointer-events: none; }
.staples i { width: 34px; height: 6px; border-radius: 3px; background: linear-gradient(#E9EEF3, #9AA6B2); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3); }
.pad { position: relative; z-index: 2; margin: -14px 8px 0; }
.sheets { position: relative; display: grid; }
.sheet { grid-area: 1 / 1; position: relative; padding: 22px 22px 16px; border-radius: 3px 3px 2px 2px; background: var(--paper); color: var(--char); box-shadow: 0 1px 0 #E8E1CF; transform-origin: 50% 0; transition: transform 0.6s var(--ease-out), opacity 0.5s ease-out; }
.sheet:not(.top-sheet) { pointer-events: none; }
.sheet.torn { transform: translate(-6%, -115%) rotate(-11deg); opacity: 0; }
.sheet .perf { position: absolute; left: 0; right: 0; top: 8px; border-top: 2px dotted #CFC6AE; }
.s-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #59617E; }
.s-head .hsk { color: var(--seal); border: 1.5px solid var(--seal); padding: 1px 7px; border-radius: 4px; }
.gridbox { position: relative; width: 74%; aspect-ratio: 1; max-width: 100%; margin: 14px auto 12px; border: 2px solid var(--grid); }
.gridbox svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gridbox .ch { position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 4%; font-size: clamp(130px, 17vw, 228px); line-height: 1; color: var(--char); }
.top-sheet .ch { animation: ink 1.1s var(--ease-out) both; }
@keyframes ink { from { filter: blur(6px); opacity: 0.25; transform: scale(1.03); } to { filter: none; opacity: 1; transform: none; } }
.s-read { display: flex; justify-content: center; align-items: baseline; gap: 12px; }
.s-read b { font-size: 30px; font-weight: 800; letter-spacing: 0.02em; }
.s-read span { font-size: 22px; color: #3E4A73; }
.s-mean { margin: 2px 0 12px; text-align: center; font-size: 15px; color: #3E4A73; }
.s-foot { display: flex; justify-content: space-between; gap: 10px; padding: 10px 34px 0 0; border-top: 1px solid #E6DFCC; font-size: 13px; color: #59617E; }
.s-foot .kai { font-size: 17px; color: var(--char); }
.tear { position: absolute; right: -2px; bottom: -2px; z-index: 5; width: 64px; height: 64px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.tear::before { content: ""; position: absolute; right: 2px; bottom: 2px; width: 42px; height: 42px; background: linear-gradient(135deg, #E9E2CD 0 50%, transparent 50%); box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.06); transition: width 0.25s, height 0.25s; }
.tear:hover::before { width: 54px; height: 54px; }
.stack-edge { height: 7px; margin: 0 6px; border-radius: 0 0 3px 3px; background: var(--paper); box-shadow: 0 1px 0 #D8D2C2, 0 5px 0 -1px #EFE9D8, 0 6px 0 -1px #D8D2C2, 0 12px 18px rgba(10, 26, 58, 0.25); }
.cal-note { position: absolute; left: 0; right: 0; top: calc(100% + 16px); max-width: 30em; margin: 0 auto; text-align: center; font-size: 14px; color: var(--muted); }
.section.first { padding-top: 230px; }

/* Three ways to find a character */
.ways { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 80px; align-items: start; }
.way-list { margin-top: 40px; border-top: 1px solid var(--line); }
.way { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); }
.way h3 { font-size: 21px; letter-spacing: -0.01em; }
.way p { margin-top: 4px; color: var(--muted); }
.vis { position: relative; width: 120px; height: 120px; overflow: hidden; border-radius: 16px; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.vis svg { display: block; width: 100%; height: 100%; }
.vis .cands { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; justify-content: space-between; font-size: 16px; line-height: 1; color: var(--brand); }
.vis .cands b { font-weight: 400; color: #FFFFFF; background: var(--brand-fill); border-radius: 5px; padding: 2px 3px; }
.vis.type { display: grid; align-content: center; gap: 10px; padding: 12px; }
.vis.type .field { padding: 6px 10px; border-radius: 10px; background: var(--bg); font-size: 14px; }
.vis.type .field::after { content: ""; display: inline-block; width: 1.5px; height: 15px; margin-left: 1px; vertical-align: -2px; background: var(--brand-fill); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.vis.type .hit { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.3; color: var(--muted); }
.vis.type .hit b { padding: 4px; border-radius: 8px; background: var(--brand-tint); font-size: 28px; line-height: 1; color: var(--char); }
.ways .device, .entry .device { margin: 0; }

/* One character, every reading: set like a dictionary entry */
.entry { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 72px; align-items: center; }
.entry-head { display: flex; align-items: center; gap: 22px; margin: 32px 0 18px; }
.entry-head .big { display: grid; place-items: center; flex: none; width: 128px; height: 128px; border-radius: 20px; background: var(--brand-tint); color: var(--char); font-size: 96px; line-height: 1; }
.entry-head p { color: var(--muted); font-size: 15px; }
.rtable { margin: 0; border-top: 2px solid var(--ink); }
.rrow { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 15px 0; border-bottom: 1px solid var(--line); }
.rrow dt { font-size: 14px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.rrow dd { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.rrow dd small { margin-left: 8px; font-size: 16px; font-weight: 500; color: var(--muted); }
.rrow dd [lang] { font-family: system-ui, -apple-system, "Hiragino Sans", "Apple SD Gothic Neo", sans-serif; font-weight: 400; }
.rrow.hv dd { color: var(--brand); font-weight: 800; }

/* Writing practice: the trace demo on the 米 grid, on the ink navy band */
.writing { background: var(--header-deep); color: #EEF1FA; }
.writing .sub { color: var(--on-deep); }
.write-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; margin-top: 48px; }
.trace { padding: 22px; border-radius: 22px; background: var(--paper); color: var(--char); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); }
.trace-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; font-size: 15px; font-weight: 700; }
.trace-top span:last-child { color: #59617E; font-weight: 600; }
.trace-box { position: relative; aspect-ratio: 1; max-width: 100%; border: 2px solid var(--grid); touch-action: none; cursor: crosshair; }
.trace-box svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.trace-msg { min-height: 26px; margin: 14px 0 6px; font-size: 16px; font-weight: 600; }
.trace-msg.ok { color: var(--ok); }
.trace-msg.no { color: var(--seal); }
.trace-actions { display: flex; align-items: center; gap: 10px; }
.trace-actions button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--brand-tint); color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; }
.trace-actions .score { margin-left: auto; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.trace-actions .score small { font-size: 14px; font-weight: 600; color: #59617E; }
.shake { animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.wfacts div { padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.wfacts div:first-child { border-top: 0; padding-top: 0; }
.wfacts strong { display: block; font-size: 18px; }
.wfacts p { margin-top: 2px; color: var(--on-deep); }
.sheetrow { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 26px; padding: 10px; border-radius: 10px; background: var(--paper); }
.sheetrow i { display: grid; place-items: center; aspect-ratio: 1; margin-left: -1px; border: 1px solid var(--grid); font-style: normal; font-size: clamp(24px, 3vw, 40px); line-height: 1; color: var(--char);
  background: linear-gradient(45deg, transparent 49.4%, rgba(46, 154, 85, 0.33) 49.4% 50.6%, transparent 50.6%), linear-gradient(-45deg, transparent 49.4%, rgba(46, 154, 85, 0.33) 49.4% 50.6%, transparent 50.6%); }
.sheetrow i.tr { color: rgba(28, 42, 110, 0.22); }
.sheetrow i.tr2 { color: rgba(28, 42, 110, 0.11); }
.sheet-cap { margin-top: 8px; font-size: 14px; color: var(--on-deep); }

/* HSK levels row above the screenshots */
.levels { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.levels span { padding: 6px 14px; border-radius: 999px; background: var(--brand-tint); color: var(--brand); font-weight: 700; font-size: 15px; }
.levels span:first-child { background: var(--brand-fill); color: #FFFFFF; }
.shots { margin-top: 40px; }

/* On your iPhone / online */
.where-grid { display: grid; grid-template-columns: 1fr 1fr; margin-top: 40px; border-top: 2px solid var(--ink); }
.where-grid > div { padding: 26px 32px 8px 0; }
.where-grid > div + div { padding-left: 32px; border-left: 1px solid var(--line); }
.where-grid h3 { margin-bottom: 8px; font-size: 14px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.where-grid ul { margin: 0; padding: 0; list-style: none; }
.where-grid li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.where-grid li strong { display: block; }
.where-grid li span { color: var(--muted); font-size: 15px; }
.section.white .arrow-link { color: var(--brand); text-decoration-color: var(--brand); }
.section.white .arrow-link:hover { color: var(--ink); }

/* Plans: the four columns of the app's "Your plan" screen */
.plans { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 0; font-size: 16px; }
.plans th, .plans td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.plans thead th { font-size: 17px; font-weight: 800; vertical-align: bottom; border-bottom: 2px solid var(--ink); }
.plans tbody th { width: 22%; font-size: 15px; font-weight: 600; color: var(--muted); }
.plans td { color: var(--ink-2); }
.plans .y { color: var(--brand); font-weight: 700; }
.plans .lt { background: var(--brand-tint); }
.plans thead .lt { border-radius: 14px 14px 0 0; border-bottom-color: var(--brand-fill); background: var(--brand-fill); color: #FFFFFF; }
.plans thead .lt small { display: block; font-size: 12px; font-weight: 700; color: var(--on-header-2); }
.plans tbody tr:last-child .lt { border-radius: 0 0 14px 14px; }
.plans-note { margin-top: 18px; color: var(--muted); font-size: 15px; }
#plans .table-box { margin-top: 40px; }

/* Closing: tomorrow's sheet */
.closing-band { background: var(--header); color: #FFFFFF; text-align: center; }
.closing-band .mini-sheet { width: 170px; margin: 0 auto 28px; padding: 14px 14px 10px; border-radius: 4px; background: var(--paper); color: var(--char); box-shadow: 0 20px 40px rgba(10, 26, 58, 0.35); transform: rotate(-3deg); }
.closing-band .mini-sheet b { display: block; border: 1.5px solid var(--grid); font-size: 104px; line-height: 1.1; }
.closing-band .mini-sheet span { display: block; margin-top: 6px; font-weight: 800; }
.closing-band h2 { font-size: clamp(32px, 4vw, 52px); }
.closing-band p { margin: 12px auto 30px; max-width: 32em; color: var(--on-header); font-size: 18px; }

@media (max-width: 900px) {
  .wall-grid, .ways, .entry, .write-grid { grid-template-columns: minmax(0, 1fr); }
  .wall-grid { gap: 32px; }
  .wall-copy { padding-bottom: 0; }
  .cal-col { margin-bottom: -120px; }
  .section.first { padding-top: 200px; }
  .ways, .entry, .write-grid { gap: 40px; }
  .ways .device, .entry .device { margin: 0 auto; max-width: 280px; }
  .entry .device { order: 2; }
  .where-grid { grid-template-columns: minmax(0, 1fr); }
  .where-grid > div, .where-grid > div + div { padding: 20px 0 0; border-left: 0; }
}
@media (max-width: 560px) {
  .way { grid-template-columns: 92px minmax(0, 1fr); gap: 16px; }
  .vis { width: 92px; height: 92px; }
  .vis .cands { font-size: 12px; }
  .vis.type { padding: 8px; gap: 6px; }
  .vis.type .field { font-size: 12px; padding: 4px 7px; }
  .vis.type .hit b { font-size: 20px; }
  .rrow { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 0; }
  .rrow dd { font-size: 22px; }
  .entry-head .big { width: 96px; height: 96px; font-size: 72px; }
  .trace { padding: 16px; }
  .s-read b { font-size: 26px; }
  .sheet { padding: 20px 16px 14px; }
  /* Plans: keep the row names in view while the columns scroll sideways */
  .plans tbody th, .plans thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg); min-width: 120px; }
  /* Privacy table: one block per service instead of three narrow columns */
  .data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data, .data tbody, .data tr, .data th, .data td { display: block; width: 100%; }
  .data tbody tr { padding-block: 14px; }
  .data tbody th, .data tbody td { padding: 0; }
  .data td + td { margin-top: 6px; color: var(--muted); }
}

/* Footer */
.foot { background: var(--night); color: var(--on-night); font-size: 15px; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 32px; padding-block: 32px; }
.foot .wrap > span { margin-right: auto; }
.foot a { color: #E8EDF5; display: inline-block; padding: 10px 0; }
.foot a:hover { color: #FFFFFF; }

/* Document pages (privacy, support) */
.doc-head { padding-block: clamp(32px, 5vw, 64px) clamp(40px, 5vw, 72px); }
.doc-head h1 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; }
.doc-head p { margin-top: 16px; max-width: 40em; color: var(--on-header); }
.doc-head .mail { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; min-height: 48px; padding: 0 24px; border-radius: 12px; background: var(--surface); color: var(--header); font-weight: 700; text-decoration: none; box-shadow: 0 8px 24px rgba(5, 15, 45, 0.3); }
.doc-head .mail svg { width: 20px; height: 20px; }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; padding-block: clamp(40px, 5vw, 72px) 96px; line-height: 1.65; }
.toc { position: sticky; top: 24px; font-size: 15px; }
.toc p { font-weight: 700; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 6px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.paper { max-width: 72ch; background: var(--surface); border-radius: 20px; padding: clamp(24px, 4vw, 56px); box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06); }
.paper h2 { font-size: 26px; line-height: 1.25; letter-spacing: -0.02em; margin-top: 48px; scroll-margin-top: 24px; }
.paper h2:first-child { margin-top: 0; }
.paper p, .paper ul { margin-top: 14px; }
.paper ul { padding-left: 22px; display: grid; gap: 8px; }
.paper .small { color: var(--muted); font-size: 15px; }
.data { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; margin-top: 18px; }
.data th, .data td { padding: 12px; text-align: left; vertical-align: top; }
.data th:first-child, .data td:first-child { padding-left: 0; }
.data thead tr { border-bottom: 2px solid var(--line); }
.data tbody tr { border-bottom: 1px solid var(--line); }
.data tbody tr:last-child { border-bottom: 0; }
.data tbody th { font-weight: 600; }
.faq { max-width: 760px; margin-top: 24px; background: var(--surface); border-radius: 20px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--line); padding: 0 24px; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; margin-top: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding-bottom: 18px; color: var(--ink-2); }
.doc-section { padding-block: clamp(40px, 5vw, 72px) 96px; }
.doc-section h2 { font-size: 28px; letter-spacing: -0.02em; }

@media (max-width: 900px) {
  .hero-grid, .split, .pro { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 8px; }
  .hero-phone img { max-width: 300px; }
  .shots { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--pad-x)); padding: 0 var(--pad-x) 12px; scrollbar-width: none; }
  .shots::-webkit-scrollbar { display: none; }
  .shots figure { flex: 0 0 72%; max-width: 300px; scroll-snap-align: center; }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; }
}
/* Phones: language menu beside the logo, links on their own row (scrolls sideways when long) */
@media (max-width: 720px) {
  .nav { gap: 4px 12px; }
  .brand { min-width: 0; }
  .langs { order: 2; }
  .nav-links { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 0 20px; margin-inline: calc(-1 * var(--pad-x)); padding-inline: var(--pad-x); }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; }
  .langs ul { max-width: calc(100vw - 32px); }
}
@media (max-width: 400px) {
  .langs summary { padding: 0 11px; }
  .langs summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
