:root {
  --bg: #f6f1e7; --bg2: #efe7d6; --surface: #fffdf8; --ink: #1c2822; --muted: #5b6a61; --faint: #8a968e; --line: #e4dac6;
  --brand: #0f5a43; --brand-2: #157a5b; --brand-soft: #e2f0e9; --saffron: #e0871b; --saffron-soft: #fdf0dc; --gold: #c9891a;
  --ok: #15803d; --ok-soft: #e3f5e8; --bad: #b91c1c; --bad-soft: #fde8e8; --sticky: #fff4a8; --sticky-ink: #3a3000; --leaf: #2f8f5b;
  --c1: #0f5a43; --c2: #e0871b; --c3: #6d28d9; --c4: #be185d; --c5: #0e7490;
  --shadow: 0 1px 2px rgba(40, 30, 10, .06), 0 8px 28px rgba(40, 30, 10, .08);
  --r: 18px; --f-d: 'Fraunces', Georgia, serif; --f-ui: 'Inter', system-ui, -apple-system, 'Noto Sans Devanagari', sans-serif; --f-sk: 'Caveat', 'Comic Sans MS', cursive;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0e1512; --bg2: #121c17; --surface: #16211c; --ink: #e8efe9; --muted: #a3b1a8; --faint: #7d8b82; --line: #26352d;
  --brand: #4fc79a; --brand-2: #6fd8ad; --brand-soft: #173328; --saffron: #f2a344; --saffron-soft: #33261a; --ok: #4ade80; --ok-soft: #133524; --bad: #f87171; --bad-soft: #3a1a1a; --sticky: #4a4420; --sticky-ink: #fff3b0;
  --c1: #4fc79a; --c2: #f2a344; --c3: #a78bfa; --c4: #f472b6; --c5: #38bdf8; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.35); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0e1512; --bg2: #121c17; --surface: #16211c; --ink: #e8efe9; --muted: #a3b1a8; --faint: #7d8b82; --line: #26352d;
  --brand: #4fc79a; --brand-2: #6fd8ad; --brand-soft: #173328; --saffron: #f2a344; --saffron-soft: #33261a; --ok: #4ade80; --ok-soft: #133524; --bad: #f87171; --bad-soft: #3a1a1a; --sticky: #4a4420; --sticky-ink: #fff3b0;
  --c1: #4fc79a; --c2: #f2a344; --c3: #a78bfa; --c4: #f472b6; --c5: #38bdf8; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.35); color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--f-ui); overflow-x: hidden;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 0); background-size: 22px 22px; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
.display { font-family: var(--f-d); font-weight: 700; letter-spacing: -.01em; }
.eyebrow { font: 600 12px/1.4 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--saffron); margin-bottom: 6px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .help { color: var(--faint); font-size: 13px; } .sm { font-size: 14px; } .b { font-weight: 600; }
.center { text-align: center; } .mono { font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap, .wrap { flex-wrap: wrap; } .center-row { justify-content: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; } .grow { flex: 1; }
.stack { display: grid; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.page { max-width: 1180px; margin: 0 auto; padding: 22px 16px 110px; }
.page.narrow { max-width: 760px; }
.page-h { margin: 6px 0 18px; } .page-h h2 { font-size: clamp(28px, 4vw, 40px); }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 0 12px; font: 700 20px var(--f-d); }
.sec-h h3 { font: inherit; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 15px var(--f-ui); cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; text-align: center; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #07130e; }
.btn.gold { background: linear-gradient(135deg, #f2a93b, #d9791a); border: 0; color: #2b1600; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: transparent; }
.btn.lg { min-height: 52px; padding: 0 24px; font-size: 16px; } .btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; } .btn.block { width: 100%; }
.iconbtn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: 400 15px var(--f-ui); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; flex: 1; min-width: 140px; }
.err-text { color: var(--bad); font-size: 14px; min-height: 1px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); font: 600 12px var(--f-ui); color: var(--muted); white-space: nowrap; }
.chip.free { background: var(--ok-soft); color: var(--ok); border-color: transparent; } .chip.lockc { background: var(--bg2); }
.pill-prem { display: inline-flex; gap: 5px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--saffron-soft); color: var(--saffron); font: 700 12px var(--f-ui); }
.spinner { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: sp .8s linear infinite; margin: 60px auto; }
@keyframes sp { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 50px 16px; } .empty .display { font-size: 28px; margin-bottom: 8px; } .empty p { margin-top: 10px; }
.ok-box { display: flex; gap: 8px; align-items: center; background: var(--ok-soft); color: var(--ok); padding: 12px 14px; border-radius: 12px; font-size: 14px; flex-wrap: wrap; }
.ok-t { color: var(--ok); font-weight: 600; } .bad-t { color: var(--bad); font-weight: 600; }
.price { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price b { font: 800 22px var(--f-ui); color: var(--ink); } .price s { color: var(--faint); font-size: 15px; } .price em { font-style: normal; font: 700 12px var(--f-ui); background: var(--bad); color: #fff; padding: 2px 8px; border-radius: 6px; }
.price.big b { font-size: 44px; letter-spacing: -.02em; } .price.big s { font-size: 22px; }

/* ring */
.ring { --s: 76px; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--bg2) 0); position: relative; }
.ring::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); }
.ring span { position: relative; font: 800 calc(var(--s) * .2) var(--f-ui); }

/* shell */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); } .brand img { border-radius: 10px; }
.brand b { display: block; font: 800 17px/1 var(--f-d); } .brand small { font: 600 10px var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.brand.light, .brand.light small { color: #fff; }
.topnav { display: none; gap: 4px; margin-left: 18px; }
.topnav a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; color: var(--muted); font: 600 14px var(--f-ui); }
.topnav a.on, .topnav a:hover { background: var(--brand-soft); color: var(--brand); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { flex: 1; display: grid; justify-items: center; gap: 2px; color: var(--muted); font: 600 11px var(--f-ui); }
.tabbar .pill { padding: 3px 16px; border-radius: 999px; } .tabbar a.on { color: var(--brand); } .tabbar a.on .pill { background: var(--brand-soft); }
.app-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; padding: 18px 16px 90px; color: var(--faint); font-size: 13px; }
.app-foot a { display: inline-flex; gap: 4px; align-items: center; } .app-foot.plain { padding: 16px 0 0; }
@media (min-width: 860px) { .topnav { display: flex; } .tabbar { display: none; } .app-foot { padding-bottom: 24px; } .page { padding-bottom: 40px; } .brand + .grow { display: none; } }
@media (max-width: 520px) { .topbar .btn.gold span { display: none; } .brand small { display: none; } }

/* toasts & dialogs */
.toasts { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); animation: up .25s; }
.toast.ok { background: var(--ok); color: #fff; } .toast.bad { background: var(--bad); color: #fff; }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 90; display: grid; place-items: center; padding: 16px; }
.dialog { background: var(--surface); border-radius: 20px; padding: 22px; width: min(100%, 440px); box-shadow: var(--shadow); }
.dialog h3 { font: 700 22px var(--f-d); margin-bottom: 10px; } .dialog .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; position: relative; }
.auth-theme { position: absolute; top: 14px; right: 14px; z-index: 2; }
.auth-art { background: radial-gradient(circle at 20% 10%, #1b7a5a, #0b3d2d 70%); color: #fff; padding: 28px 22px; display: grid; gap: 18px; align-content: start; position: relative; overflow: hidden; }
.auth-art h1 { font: 700 clamp(26px, 4vw, 40px)/1.15 var(--f-d); max-width: 520px; }
.auth-pts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 520px; font-size: 15px; opacity: .95; }
.auth-pts li { display: flex; gap: 10px; } .auth-pts span { flex: none; }
.auth-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-weight: 600; }
.auth-price .price b { color: #fff; font-size: 26px; } .auth-price .price s { color: #cfe3d9; }
.doodle { font-size: 42px; letter-spacing: 8px; opacity: .18; position: absolute; right: -10px; bottom: 6px; transform: rotate(-8deg); }
.auth-form { display: grid; place-items: center; padding: 28px 16px 40px; }
.af-in { width: 100%; max-width: 410px; } .af-in h2 { font: 700 30px var(--f-d); }
@media (min-width: 900px) { .auth { grid-template-columns: 1.05fr 1fr; } .auth-art { padding: 56px; align-content: center; } }
@media (max-width: 899px) { .auth-pts { display: none; } }

/* home */
.hero-card { display: grid; gap: 22px; background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--brand-soft) 70%, var(--surface))); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }
.hero-card h2 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 8px; max-width: 640px; } .hero-card .btn { margin-top: 16px; max-width: 100%; }
.hero-card .btn { white-space: normal; text-align: left; }
.hero-stats { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center; align-self: center; }
.hero-stats b { display: block; font: 800 20px var(--f-ui); } .hero-stats span { color: var(--muted); font-size: 13px; }
@media (min-width: 860px) { .hero-card { grid-template-columns: 1.6fr 1fr; padding: 34px; } }
.upsell { margin: 18px 0; display: grid; gap: 14px; padding: 20px; border-radius: 20px; background: linear-gradient(120deg, #13392c, #0f5a43 55%, #1d7656); color: #fff; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.upsell::after { content: '🌿'; position: absolute; right: -14px; top: -20px; font-size: 110px; opacity: .12; transform: rotate(20deg); }
.upsell h3 { font: 700 22px var(--f-d); margin: 6px 0 4px; } .upsell p { opacity: .85; font-size: 14px; }
.up-tag { display: inline-block; font: 700 12px var(--f-ui); background: rgba(255,255,255,.16); padding: 4px 10px; border-radius: 999px; }
.up-r { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; position: relative; z-index: 1; }
.upsell .price b { color: #fff; } .upsell .price s { color: #b9d6c8; }
@media (min-width: 760px) { .upsell { grid-template-columns: 1fr auto; align-items: center; padding: 24px 28px; } }

.mods { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.mod { --mc: var(--brand); display: grid; gap: 4px; align-content: start; padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); position: relative; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.mod::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--mc); }
.mod:hover { transform: translateY(-3px); }
.mod-top { display: flex; justify-content: space-between; align-items: center; }
.mod-n { font: 700 11px var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--mc); }
.mod-emo { font-size: 40px; line-height: 1; margin: 10px 0 6px; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: color-mix(in srgb, var(--mc) 12%, transparent); }
.mod-t { font: 700 19px/1.25 var(--f-d); } .mod-hi { color: var(--muted); font-size: 13px; }
.mod-d { color: var(--muted); font-size: 14px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mod-foot { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; font-size: 12px; color: var(--faint); font-weight: 600; }
.best { background: var(--ok-soft); color: var(--ok); padding: 2px 8px; border-radius: 8px; font: 700 12px var(--f-ui); }
.mod.is-locked .mod-emo { filter: grayscale(.6); opacity: .75; }
.grand { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; } .grand > div { flex: 1; min-width: 200px; } .g-emo { font-size: 38px; }

/* module reader */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; } .read-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--saffron)); }
.m-hero { display: grid; gap: 18px; padding: 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; margin-bottom: 22px; }
.m-hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: color-mix(in srgb, var(--mc) 14%, transparent); }
.m-hero h2 { font-size: clamp(28px, 5vw, 44px); } .m-hero .hi { font-size: 17px; color: var(--mc); font-weight: 600; margin: 4px 0 8px; }
.m-hero .eyebrow { color: var(--mc); } .m-hero .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.blob { width: 96px; height: 96px; font-size: 54px; display: grid; place-items: center; border-radius: 42% 58% 61% 39% / 45% 41% 59% 55%; background: color-mix(in srgb, var(--mc) 16%, var(--surface)); border: 2px dashed color-mix(in srgb, var(--mc) 45%, transparent); position: relative; z-index: 1; }
@media (min-width: 720px) { .m-hero { grid-template-columns: auto 1fr; align-items: center; padding: 32px; } .blob { width: 130px; height: 130px; font-size: 72px; } }
.m-layout { display: grid; gap: 22px; }
.toc { display: none; }
@media (min-width: 1040px) { .m-layout { grid-template-columns: 240px 1fr; } .toc { display: grid; gap: 2px; position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; font-size: 13px; }
  .toc b { font: 700 12px var(--f-ui); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 6px; }
  .toc a { display: flex; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--muted); } .toc a:hover { background: var(--bg2); color: var(--ink); } .toc .toc-q { color: var(--mc); font-weight: 700; } }
.m-body { min-width: 0; }
.blk { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
.blk.in { opacity: 1; transform: none; }
.blk.bare { background: none; border: 0; box-shadow: none; padding: 0; }
.b-title { display: flex; align-items: center; gap: 10px; font: 700 20px/1.3 var(--f-d); margin-bottom: 16px; scroll-margin-top: 80px; }
.b-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--mc) 12%, transparent); font-size: 18px; }
.lead { font: 400 18px/1.7 var(--f-ui); padding: 4px 4px 4px 18px; border-left: 4px solid var(--mc); }
.lead::first-letter { font: 700 46px/1 var(--f-d); float: left; margin: 4px 8px 0 0; color: var(--mc); }

.callout { display: flex; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--saffron-soft); border: 1px solid color-mix(in srgb, var(--saffron) 35%, transparent); }
.callout.tip { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.callout.warn { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.callout .co-ic { font-size: 26px; line-height: 1; } .callout b { display: block; font: 700 13px var(--f-ui); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }

.sticky { position: relative; background: var(--sticky); color: var(--sticky-ink); padding: 22px 22px 18px; border-radius: 4px 4px 22px 4px; transform: rotate(-1.2deg); box-shadow: 0 10px 22px rgba(80,60,0,.15); max-width: 640px; margin: 8px auto; }
.sticky .tape { position: absolute; top: -10px; left: 50%; width: 90px; height: 22px; transform: translateX(-50%) rotate(3deg); background: rgba(255,255,255,.55); border: 1px dashed rgba(0,0,0,.08); }
.sketch { font-family: var(--f-sk); } .sticky b { font-size: 24px; display: block; margin-bottom: 4px; } .sticky p { font-size: 23px; line-height: 1.35; }

.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.cards.c2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.mcard { padding: 16px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.mcard .emo { font-size: 28px; } .mcard b { font-size: 15px; } .mcard p { color: var(--muted); font-size: 14px; }

.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.facts li { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px dashed var(--line); }

.tl { list-style: none; margin: 0; padding: 0 0 0 8px; position: relative; }
.tl::before { content: ''; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: repeating-linear-gradient(var(--mc) 0 6px, transparent 6px 11px); }
.tl li { position: relative; padding: 0 0 18px 34px; display: grid; gap: 4px; opacity: 0; transform: translateX(-10px); transition: .45s calc(var(--i) * .08s); }
.blk.in .tl li { opacity: 1; transform: none; }
.tl-dot { position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 4px solid var(--mc); }
.tl-y { display: inline-block; justify-self: start; font: 800 13px var(--f-ui); color: #fff; background: var(--mc); padding: 2px 10px; border-radius: 999px; }
.tl-c b { font-size: 16px; } .tl-c p { color: var(--muted); font-size: 14px; }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 420px; }
.tbl th { text-align: left; background: color-mix(in srgb, var(--mc, var(--brand)) 12%, var(--surface)); padding: 10px 12px; font: 700 12px var(--f-ui); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tbl td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; } .tbl td.k { font-weight: 600; }
.tbl tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--mc, var(--brand)) 7%, transparent); }

.pairs { display: grid; gap: 8px; }
.pair { display: grid; grid-template-columns: 1fr auto 1.3fr; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--bg); }
.pair .arr { color: var(--mc); font-weight: 800; }
@media (max-width: 560px) { .pair { grid-template-columns: 1fr; gap: 2px; } .pair .arr { display: none; } .pair span:last-child { color: var(--muted); font-size: 14px; } }

.flow { display: grid; gap: 10px; }
.fl-row { display: grid; grid-template-columns: 1fr 60px 1fr; align-items: center; gap: 6px; }
.fl-box { padding: 12px 14px; border-radius: 14px; border: 2px solid var(--mc); background: color-mix(in srgb, var(--mc) 8%, var(--surface)); font-weight: 600; font-size: 14px; text-align: center; }
.fl-box.b2 { border-style: dashed; background: var(--bg); } .fl-arrow { color: var(--mc); width: 60px; }

.compare { display: grid; gap: 12px; position: relative; }
.cmp { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); }
.cmp.l { border-top: 5px solid var(--mc); } .cmp.r { border-top: 5px solid var(--saffron); }
.cmp b { font-size: 16px; } .cmp ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 4px; }
.vs { justify-self: center; font: 800 13px var(--f-ui); background: var(--ink); color: var(--bg); padding: 6px 10px; border-radius: 999px; }
@media (min-width: 680px) { .compare { grid-template-columns: 1fr auto 1fr; align-items: center; } }

.recipe { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.rc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: color-mix(in srgb, var(--leaf) 12%, var(--surface)); flex-wrap: wrap; } .rc-head b { flex: 1; min-width: 150px; font: 700 17px var(--f-d); }
.rc-rows { display: grid; }
.rc-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 10px; padding: 10px 14px; border-top: 1px dashed var(--line); align-items: center; font-size: 14px; }
.rc-row i { color: var(--muted); } .part { font: 600 12px var(--f-ui); padding: 2px 8px; border-radius: 8px; background: var(--saffron-soft); color: var(--saffron); white-space: nowrap; }
@media (max-width: 560px) { .rc-row { grid-template-columns: 1fr auto; } .rc-row i { grid-column: 1; grid-row: 2; font-size: 13px; } .part { grid-row: 1 / span 2; grid-column: 2; } }
.t-recipe { padding: 0; overflow: hidden; } .t-recipe .b-title { display: none; } .t-recipe .recipe { border: 0; border-radius: 0; }

.tree { display: grid; gap: 18px; justify-items: center; }
.tr-root { padding: 12px 22px; border-radius: 14px; background: var(--mc); color: #fff; font: 700 17px var(--f-d); position: relative; }
.tr-root::after { content: ''; position: absolute; left: 50%; bottom: -18px; width: 2px; height: 18px; background: var(--mc); }
.tr-branches { width: 100%; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); border-top: 2px solid var(--mc); padding-top: 18px; position: relative; }
.tr-br { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; position: relative; }
.tr-br::before { content: ''; position: absolute; left: 50%; top: -19px; width: 2px; height: 18px; background: var(--mc); }
.tr-h { font-weight: 700; margin-bottom: 6px; } .tr-br ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--muted); display: grid; gap: 3px; }

.cal { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 160px), 1fr)); }
.cal-pg { border-radius: 14px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); text-align: center; padding-bottom: 12px; display: grid; gap: 2px; }
.cal-top { background: var(--bad); color: #fff; font: 700 12px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; padding: 5px; }
.cal-day { font: 800 34px/1.1 var(--f-d); padding-top: 6px; } .cal-e { font-size: 22px; } .cal-pg b { font-size: 14px; padding: 0 8px; } .cal-pg p { font-size: 12px; color: var(--muted); padding: 0 8px; }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.bl { font-weight: 600; } .bv { font: 700 13px var(--f-ui); color: var(--muted); white-space: nowrap; }
.bt { height: 16px; background: var(--bg2); border-radius: 999px; overflow: hidden; }
.bt i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.blk.in .bt i { width: var(--w); }

.hub { position: relative; width: 100%; max-width: 480px; aspect-ratio: 1; margin: 0 auto; }
.hub svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hub-orbit { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 3 7; }
.hub-line { fill: none; stroke: var(--mc); stroke-width: 2; stroke-dasharray: 5 5; opacity: .55; }
.hub-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 30%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center; padding: 6px; background: var(--mc); color: #fff; font: 800 clamp(13px, 3.4vw, 18px) var(--f-d); box-shadow: 0 0 0 8px color-mix(in srgb, var(--mc) 18%, transparent); }
.hub-node { position: absolute; transform: translate(-50%, -50%); width: 27%; display: grid; justify-items: center; gap: 2px; text-align: center; }
.hn-e { width: clamp(38px, 11vw, 54px); height: clamp(38px, 11vw, 54px); display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 2px solid var(--mc); font-size: clamp(18px, 5vw, 26px); box-shadow: var(--shadow); }
.hn-t { font: 600 clamp(10.5px, 2.8vw, 13px)/1.2 var(--f-ui); background: var(--surface); padding: 1px 4px; border-radius: 6px; }
.hub-list { display: grid; gap: 12px; justify-items: center; }
.hub-c { padding: 10px 22px; border-radius: 999px; background: var(--mc); color: #fff; font: 800 17px var(--f-d); }
.hub-items { display: grid; gap: 10px; width: 100%; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.hub-it { padding: 12px 14px; border-radius: 14px; border: 2px dashed color-mix(in srgb, var(--mc) 50%, transparent); display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14px; } .hub-it span { font-size: 24px; }

.quiz-cta { display: grid; gap: 14px; align-items: center; padding: 24px; border-radius: 22px; background: linear-gradient(135deg, var(--mc), color-mix(in srgb, var(--mc) 60%, #000)); color: #fff; margin: 26px 0; scroll-margin-top: 80px; }
.quiz-cta h3 { font: 700 24px var(--f-d); } .quiz-cta p { opacity: .9; } .qc-emo { font-size: 46px; }
.quiz-cta .btn.primary { background: #fff; color: #10231a; border-color: #fff; }
@media (min-width: 720px) { .quiz-cta { grid-template-columns: auto 1fr auto; } }
.pn { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; } .pn .btn { max-width: 100%; white-space: normal; }

/* quiz */
.qz-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; } .qz-head .eyebrow { color: var(--mc); margin: 0; }
.qz-count { font: 800 15px var(--f-ui); color: var(--muted); }
.qz-prog { height: 8px; background: var(--bg2); border-radius: 999px; overflow: hidden; margin: 10px 0 18px; } .qz-prog i { display: block; height: 100%; transition: width .3s; }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); margin-bottom: 16px; display: grid; gap: 12px; }
.qcard h3 { font: 600 19px/1.45 var(--f-ui); } .qno { font: 800 12px var(--f-ui); color: var(--saffron); letter-spacing: .1em; }
.qcard .chip { justify-self: start; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: 500 15px var(--f-ui); cursor: pointer; transition: .15s; }
.opt:hover:not(:disabled) { border-color: var(--brand); transform: translateX(2px); }
.opt .ol { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; }
.opt > span:nth-child(2) { flex: 1; }
.opt.ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); font-weight: 600; } .opt.bad { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.opt.dim { opacity: .55; } .opt:disabled { cursor: default; }
.explain { padding: 12px 14px; border-radius: 12px; font-size: 14px; } .explain.ok { background: var(--ok-soft); } .explain.bad { background: var(--bad-soft); } .explain p { margin-top: 4px; color: var(--muted); }
.qz-nav { display: flex; justify-content: space-between; gap: 10px; }
.mt { display: grid; gap: 10px; }
.mt-row { display: grid; grid-template-columns: 1fr auto 1.2fr; gap: 8px 10px; align-items: center; padding: 10px; border-radius: 14px; background: var(--bg); border: 1.5px solid transparent; }
.mt-row.ok { border-color: var(--ok); background: var(--ok-soft); } .mt-row.bad { border-color: var(--bad); background: var(--bad-soft); }
.mt-l { font-weight: 600; font-size: 15px; } .mt-ar { color: var(--saffron); font-weight: 800; } .mt-row select { min-height: 42px; }
.mt-fix { grid-column: 1 / -1; color: var(--ok); font-weight: 600; font-size: 14px; }
@media (max-width: 560px) { .mt-row { grid-template-columns: 1fr; } .mt-ar { display: none; } }
.result { text-align: center; display: grid; justify-items: center; gap: 12px; padding: 30px 20px; }
.result h2 { font-size: 32px; } .confetti { font-size: 28px; letter-spacing: 6px; animation: up .6s; }
.res-stats { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 6px 0 10px; }
.res-stats div { padding: 10px 18px; border-radius: 14px; background: var(--bg); } .res-stats b { display: block; font: 800 22px var(--f-ui); } .res-stats span { font-size: 12px; color: var(--muted); }
.qcard.rev { gap: 4px; } .qcard.rev h4 { font: 600 16px var(--f-ui); margin-bottom: 4px; }

.test-list { display: grid; gap: 10px; margin-top: 16px; }
.test-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--mc); border-radius: 14px; color: var(--ink); }
.tr-e { font-size: 26px; } .tr-t { flex: 1; display: grid; min-width: 0; } .tr-t small { color: var(--muted); } .test-row.is-locked { opacity: .7; }

/* upgrade */
.up-grid { display: grid; gap: 22px; } .up-grid h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
@media (min-width: 860px) { .up-grid { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.feat { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; } .feat li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; } .feat span { font-size: 22px; }
.pay { position: relative; display: grid; gap: 12px; border: 2px solid var(--saffron); padding: 24px; overflow: hidden; }
.pay-t { font-size: 18px; } .ribbon { position: absolute; top: 18px; right: -38px; transform: rotate(40deg); background: var(--bad); color: #fff; font: 800 13px var(--f-ui); padding: 6px 46px; }
.locked { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 40px 20px; max-width: 560px; margin: 30px auto; } .lk-emo { font-size: 56px; } .locked h2 { font-size: 28px; }
.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 16px; }
.stat { margin: 0; display: grid; gap: 2px; } .stat span { font-size: 22px; } .stat b { font: 800 24px var(--f-ui); } .stat small { color: var(--muted); }
@media print { .topbar, .tabbar, .toc, .quiz-cta, .pn, .app-foot, .read-progress { display: none; } .blk { opacity: 1; transform: none; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .blk, .tl li, .bt i { transition: none; opacity: 1; transform: none; } }
@media (max-width: 859px) { .up-grid .pay { order: -1; } }
