/* Layout: a lecture page read top to bottom — hero with a live "evidence chain" card, then sections
   on white with soft tinted bands. Four-color palette: light orange, light blue, light red, white. */
:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --ink: #2f2927;
  --muted: #6e6562;
  --line: #efe5e0;
  --orange: #f4a970;
  --orange-deep: #c45f1c;
  --orange-soft: #fff2e6;
  --blue: #93c8ec;
  --blue-deep: #2a71aa;
  --blue-soft: #ebf5fc;
  --red: #f3a0a0;
  --red-deep: #c94343;
  --red-soft: #fdeeee;
  --accent: var(--orange-deep);
  --accent-ink: #ffffff;
  --mark: #ffd2a8;
  --mark-ink: #3b2108;
  --rec: var(--red-deep);
  --wave: #f5d2b4;
  --hl: #ffd9b5;
  --f-display: "Bricolage Grotesque", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 14px;
  --w: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #191615; --surface: #221e1c; --ink: #f5efea; --muted: #bbb0a9; --line: #362f2b;
    --orange: #c98250; --orange-deep: #f5a76c; --orange-soft: #2c2119;
    --blue: #4f7fa3; --blue-deep: #8ec6ee; --blue-soft: #1a242d;
    --red: #a85d5d; --red-deep: #f28d8d; --red-soft: #2d1d1d;
    --accent-ink: #23140a; --mark: #f2b273; --wave: #5b4637; --hl: rgba(245,167,108,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #191615; --surface: #221e1c; --ink: #f5efea; --muted: #bbb0a9; --line: #362f2b;
  --orange: #c98250; --orange-deep: #f5a76c; --orange-soft: #2c2119;
  --blue: #4f7fa3; --blue-deep: #8ec6ee; --blue-soft: #1a242d;
  --red: #a85d5d; --red-deep: #f28d8d; --red-soft: #2d1d1d;
  --accent-ink: #23140a; --mark: #f2b273; --wave: #5b4637; --hl: rgba(245,167,108,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html.i18n-loading body { visibility: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}
.wrap { max-width: var(--w); margin: 0 auto; padding-inline: 20px; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0; }
.muted { color: var(--muted); }
.eyebrow {
  font: 500 0.78rem/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}

/* Header */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 8px; font: 800 1.25rem/1 var(--f-display); color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rec) 20%, transparent); }
.nav { display: flex; gap: 18px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--accent); }
.lang-select {
  font: inherit; font-size: 0.9rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px;
}
@media (max-width: 720px) {
  .nav .nav-link { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem/1 var(--f-body); padding: 14px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; border: 0; cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.small { padding: 10px 16px; font-size: .92rem; }

/* Hero */
.hero { padding-block: clamp(48px, 8vw, 96px) clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 800; letter-spacing: -0.025em; }
.hero h1 br + * {}
.hero .lede { font-size: 1.13rem; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn.store { display: inline-flex; align-items: center; gap: 8px; }
.store-ico { flex: none; }
.ai-req { margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--surface); font-size: .9rem; line-height: 1.6; }
.platforms { font: 500 .85rem/1 var(--f-mono); color: var(--muted); letter-spacing: .04em; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Evidence chain card */
.chain {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 22px; display: grid; gap: 0; min-width: 0;
  box-shadow: 0 30px 60px -40px color-mix(in srgb, var(--ink) 45%, transparent);
}
.chain-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding-bottom: 14px; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.chain-step { position: relative; padding: 16px 0 16px 28px; display: grid; gap: 6px; }
.chain-step::before {
  content: ""; position: absolute; left: 7px; top: 22px; bottom: -22px; width: 2px; background: var(--line);
}
.chain-step:last-child::before { display: none; }
.chain-step::after {
  content: ""; position: absolute; left: 2px; top: 20px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent);
}
.chain-step .eyebrow { display: flex; gap: 10px; align-items: center; }
.tc { font-family: var(--f-mono); font-variant-numeric: tabular-nums; color: var(--accent); letter-spacing: 0; text-transform: none; }
.hl { background: linear-gradient(transparent 52%, var(--hl) 52%); color: inherit; padding: 0 2px; font-weight: 600; }
.quote { color: var(--muted); font-size: .96rem; }
.quote mark { background: color-mix(in srgb, var(--mark) 55%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.wave { display: flex; align-items: center; gap: 2px; height: 46px; margin-top: 4px; position: relative; overflow: hidden; }
.wave i { flex: 1 1 0; min-width: 1px; background: var(--wave); border-radius: 2px; }
.wave i.on { background: var(--accent); }
.wave .head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--rec); left: 62%; }
.play { display: inline-flex; align-items: center; gap: 8px; font: 500 .88rem/1 var(--f-mono); color: var(--ink); background: none; border: 0; padding: 6px 0; cursor: pointer; }
.play::before { content: ""; width: 0; height: 0; border-left: 9px solid var(--rec); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }

/* Sections */
section.block { padding-block: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); }
.block-head { display: grid; gap: 10px; margin-bottom: 36px; max-width: 40em; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.feature { display: grid; gap: 12px; align-content: start; }
.feature .glyph { font: 600 .8rem/1 var(--f-mono); color: var(--accent); }
.feature p { color: var(--muted); }
@media (max-width: 880px) { .features { grid-template-columns: 1fr; } }

/* Lecture timeline: before / in / after / exam */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--line); }
.step { position: relative; padding: 32px 22px 0 0; display: grid; gap: 8px; align-content: start; }
.step::before { content: ""; position: absolute; top: 3px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.step:nth-child(2)::before { background: var(--rec); border-color: var(--rec); }
.step p { color: var(--muted); font-size: .96rem; }
@media (max-width: 880px) {
  .steps { grid-template-columns: 1fr; }
  .steps::before { left: 6px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .step { padding: 0 0 28px 34px; }
  .step::before { top: 4px; }
}

/* Compare */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.cmp { width: 100%; border-collapse: collapse; min-width: 560px; }
.cmp th, .cmp td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp tr:last-child td { border-bottom: 0; }
.cmp thead th { font: 600 .8rem/1.3 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.cmp thead th.us { color: var(--accent); }
.cmp td:first-child { font-weight: 600; width: 22%; }
.cmp td.other { color: var(--muted); }
.cmp td.us { font-weight: 500; }

/* Privacy band */
.privacy-band { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.privacy-band .lock { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.privacy-band p { color: var(--muted); max-width: 44em; margin-top: 8px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px;
  display: grid; gap: 14px; grid-template-rows: auto auto auto 1fr auto; position: relative;
}
.plan.featured { border: 2px solid var(--accent); }
.plan .badge { position: absolute; top: -12px; left: 24px; background: var(--mark); color: var(--mark-ink); font: 600 .75rem/1 var(--f-mono); padding: 6px 10px; border-radius: 999px; letter-spacing: .04em; }
.plan .amount { font: 800 2.6rem/1 var(--f-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plan .per { color: var(--muted); font-size: .95rem; }
.plan .note { font: 500 .85rem/1.3 var(--f-mono); color: var(--accent); }
.plans-foot { margin-top: 22px; display: grid; gap: 6px; color: var(--muted); font-size: .95rem; }
@media (max-width: 1080px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .plans { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 52em; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; 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: "+"; font-family: var(--f-mono); color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin-top: 10px; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 36px 48px; color: var(--muted); font-size: .92rem; }
.site-foot .wrap { display: flex; gap: 18px 28px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); }
.contact { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.contact code { font-family: var(--f-mono); color: var(--ink); user-select: all; }
.copy-btn { font: 500 .8rem/1 var(--f-mono); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; cursor: pointer; }

/* Buy page */
.buy-main { padding-block: 48px 72px; }
.buy-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; margin-top: 32px; align-items: start; }
@media (max-width: 880px) { .buy-grid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 18px; min-width: 0; }
.panel h2 { font-size: 1.15rem; display: flex; gap: 10px; align-items: baseline; }
.panel h2 .n { font: 600 .85rem/1 var(--f-mono); color: var(--accent); }
.field { display: grid; gap: 6px; }
.field label { font-size: .9rem; font-weight: 600; }
.field input { font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); width: 100%; }
.discount-row { display: flex; gap: 8px; align-items: center; }
.discount-row input { flex: 1; min-width: 0; width: auto; }
#discountMsg[hidden] { display: none !important; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row .field { flex: 1 1 220px; }
.error { color: var(--rec); font-size: .92rem; }
.ok { color: var(--accent); font-size: .95rem; font-weight: 600; }
.plan-pick { display: grid; gap: 10px; }
.plan-pick label { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.plan-pick input { accent-color: var(--accent); width: 18px; height: 18px; }
.plan-pick label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.plan-pick .amt { font: 700 1.05rem/1 var(--f-display); font-variant-numeric: tabular-nums; }
.paypal-btn { background: #ffc439; color: #111; width: 100%; border-radius: 10px; }
.total { display: flex; justify-content: space-between; font-weight: 600; font-variant-numeric: tabular-nums; }
.notice { font-size: .88rem; color: var(--muted); border-left: 3px solid var(--mark); padding-left: 12px; }
ol.after { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); }

/* Legal pages */
.legal { padding-block: 48px 80px; max-width: 46em; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; }
.legal h2 { font-size: 1.25rem; margin-top: 36px; margin-bottom: 10px; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 20px; display: grid; gap: 8px; margin: 0; }
.legal .updated { margin-top: 8px; font-family: var(--f-mono); font-size: .85rem; color: var(--muted); }
.legal section { scroll-margin-top: 80px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Inline SVG illustrations: every color from tokens so both themes work. */
.ill { display: block; width: 100%; height: auto; max-width: 100%; }
.ill .s { fill: var(--surface); }
.ill .l, .ill .ln, .ill .ac { stroke-width: 1.5; }
.ill .l, .ill .ln { stroke: var(--line); fill: none; }
.ill .s.l, .ill .s.ln { fill: var(--surface); }
.ill .ac { stroke: var(--accent); stroke-width: 2; }
.ill .a { fill: var(--accent); }
.ill .m { fill: var(--hl); }
.ill .w { fill: var(--wave); }
.ill .i { fill: var(--ink); }
.ill .mu { fill: var(--muted); opacity: .45; }
.ill .r { fill: var(--rec); }
.ill .rl { stroke: var(--rec); stroke-width: 2; }
.ill .arr { stroke: var(--accent); stroke-width: 2; fill: none; stroke-dasharray: 3 3; }
.ill .arr-r { stroke: var(--rec); stroke-width: 2; fill: none; stroke-dasharray: 4 4; }
.ill .tc { font: 600 11px var(--f-mono); fill: var(--accent); }
.ill .tn { font: 700 12px var(--f-mono); fill: var(--accent); text-anchor: middle; }
.ill .cloud { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 3; opacity: .7; }
.ill .lock { fill: none; stroke: var(--accent-ink); stroke-width: 1.8; stroke-linejoin: round; }
.feature .art { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.feature .art .ill .s.l { fill: var(--paper); }
.ico { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.step:nth-child(2) .ico { stroke: var(--rec); }
.privacy-band { grid-template-columns: minmax(0, 220px) 1fr; }
@media (max-width: 640px) { .privacy-band { grid-template-columns: 1fr; } .privacy-band .ill-devices { max-width: 220px; } }
@media (prefers-reduced-motion: no-preference) {
  .feature .art .ill .rl, .feature .art .ill circle.r { animation: scrub 6s ease-in-out infinite alternate; }
}
@keyframes scrub { from { transform: translateX(-40px); } to { transform: translateX(30px); } }

/* Four-color roles: orange = evidence / primary, blue = structure, red = recording & weak spots. */
.hero {
  background:
    radial-gradient(520px 320px at 92% 8%, var(--blue-soft), transparent 70%),
    radial-gradient(460px 300px at 4% 96%, var(--red-soft), transparent 70%),
    radial-gradient(600px 380px at 60% 60%, var(--orange-soft), transparent 70%),
    var(--paper);
}
.feature:nth-child(1) .art { background: var(--orange-soft); border-color: transparent; }
.feature:nth-child(2) .art { background: var(--blue-soft); border-color: transparent; --accent: var(--blue-deep); --wave: var(--blue); }
.feature:nth-child(3) .art { background: var(--red-soft); border-color: transparent; --wave: var(--red); }
.feature:nth-child(2) .glyph { color: var(--blue-deep); }
.feature:nth-child(3) .glyph { color: var(--red-deep); }
#how { background: var(--blue-soft); }
#how .step::before { background: var(--blue-soft); }
.step:nth-child(1) { --accent: var(--blue-deep); }
.step:nth-child(3) { --accent: var(--orange-deep); }
.step:nth-child(4) { --accent: var(--blue-deep); }
.step:nth-child(2) .ico { stroke: var(--red-deep); }
.step:nth-child(2)::before { background: var(--red-deep) !important; border-color: var(--red-deep); }
.cmp thead th.us { color: var(--orange-deep); }
.cmp td.us { background: color-mix(in srgb, var(--orange-soft) 60%, transparent); }
#privacy { background: var(--red-soft); }
#privacy .ill-devices { --accent: var(--blue-deep); }
#pricing { background: var(--orange-soft); }
.plan:nth-child(1) .note { color: var(--blue-deep); }
.plan:nth-child(4) .note { color: var(--red-deep); }
.plan .badge { background: var(--red-deep); color: #fff; }
.faq summary::after { color: var(--blue-deep); }
.site-foot { background: var(--paper); }
.logo .dot { background: var(--red-deep); box-shadow: 0 0 0 4px var(--red-soft), 0 0 0 7px var(--blue-soft); }
.nav a:hover { color: var(--blue-deep); }
a { color: var(--blue-deep); }
.btn { color: var(--accent-ink); }
.chain-head { border-bottom-color: var(--orange); }

/* Real app screenshots in a light window frame */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.shot { margin: 0; display: grid; gap: 10px; min-width: 0; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 800 / 632; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 24px 48px -36px color-mix(in srgb, var(--ink) 50%, transparent); }
.shot figcaption { color: var(--muted); font-size: .95rem; }
@media (max-width: 720px) { .shots { grid-template-columns: 1fr; } }
.ill .tl { font: 700 9px var(--f-mono); fill: var(--accent-ink); text-anchor: middle; }
.feature:nth-child(2) .art .ill .mu { opacity: .35; }
.ill .sw { fill: #ffffff; }
.ill .ck { fill: none; stroke: var(--accent-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ill rect.ln { fill: none; }
.feature:nth-child(2) .art { --accent: var(--blue-deep); }
.features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 32px; }
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }
.feature:nth-child(4) .art { background: var(--blue-soft); border-color: transparent; }
.feature:nth-child(2) .art { background: var(--orange-soft); --accent: var(--orange-deep); }
.feature:nth-child(2) .glyph { color: var(--orange-deep); }
.feature:nth-child(1) .art { background: var(--blue-soft); }
.feature:nth-child(1) .glyph { color: var(--blue-deep); }
.feature:nth-child(1) .art { --accent: var(--blue-deep); --wave: var(--blue); }
.feature:nth-child(4) .glyph { color: var(--blue-deep); }
.ill .spark { fill: var(--orange); }
.ill .axis { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.ill .cv-d { fill: none; stroke: var(--blue-deep); stroke-width: 2.5; stroke-linecap: round; }
.ill .cv-s { fill: none; stroke: var(--orange-deep); stroke-width: 2.5; stroke-linecap: round; }
.ill .ceil { stroke: var(--red-deep); stroke-width: 2; stroke-dasharray: 5 4; }
.ill .gap { fill: none; stroke: var(--red-deep); stroke-width: 1.8; }
.ill .tq { font: 600 10px var(--f-mono); fill: var(--muted); }
.feature .art .ill { max-height: 220px; }
/* 5 features: two wide on top, three below */
.features { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.feature { grid-column: span 2; }
.feature:nth-child(1), .feature:nth-child(2) { grid-column: span 3; }
@media (max-width: 880px) { .features { grid-template-columns: 1fr; } .feature, .feature:nth-child(1), .feature:nth-child(2) { grid-column: auto; } }
.feature:nth-child(5) .art { background: var(--orange-soft); border-color: transparent; }
.feature:nth-child(5) .glyph { color: var(--orange-deep); }
.ill .red-soft { fill: var(--red-soft); stroke: var(--red); stroke-width: 1; }
.ill .blue-soft { fill: var(--blue-soft); stroke: var(--blue); stroke-width: 1; }
.ill .sw2 { fill: var(--red-deep); opacity: .55; }
.ill .dot { fill: var(--muted); opacity: .6; }
.logo-img { width: 32px; height: 32px; border-radius: 8px; display: block; }

/* Header v2: logo | centered pill nav | language + buy (+ menu on phones) */
.site-head .head-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; min-height: 68px; flex-wrap: nowrap; }
.site-head .nav { margin: 0 auto; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent); }
.site-head .nav a.nav-link { padding: 7px 14px; border-radius: 999px; font-size: .93rem; color: var(--muted); transition: background .15s ease, color .15s ease; }
.site-head .nav a.nav-link:hover { color: var(--ink); background: var(--orange-soft); }
.site-head .nav a.nav-link.active { color: var(--orange-deep); background: var(--orange-soft); font-weight: 600; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.lang { position: relative; display: inline-flex; align-items: center; }
.lang .globe { position: absolute; left: 10px; width: 16px; height: 16px; fill: none; stroke: var(--blue-deep); stroke-width: 1.7; pointer-events: none; }
.lang .lang-select { appearance: none; -webkit-appearance: none; padding: 8px 12px 8px 32px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .88rem; cursor: pointer; max-width: 150px; }
.lang .lang-select:hover { border-color: var(--blue); }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.menu-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
.site-head.open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-head.open .menu-btn span:nth-child(2) { opacity: 0; }
.site-head.open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 920px) {
  .site-head .head-row { grid-template-columns: auto 1fr; }
  .head-actions { justify-self: end; grid-row: 1; grid-column: 2; }
  .site-head .logo { grid-row: 1; grid-column: 1; }
  .menu-btn { display: inline-flex; }
  .site-head .nav { display: none; grid-row: 2; grid-column: 1 / -1; margin: 0 0 12px; border-radius: 16px; flex-direction: column; align-items: stretch; padding: 6px; }
  .site-head.open .nav { display: flex; }
  .site-head .nav a.nav-link { display: block; padding: 12px 14px; font-size: 1rem; }
}
@media (max-width: 480px) {
  .lang .lang-select { max-width: 44px; padding-right: 0; color: transparent; }
  .lang .lang-select option { color: var(--ink); }
  .head-actions { gap: 8px; }
}

/* Elements toggled by script must stay hidden whatever their display rule. */
[hidden] { display: none !important; }

/* Pricing v2: early-bird lifetime + reuse callout */
.plan .amount-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plan .amount { font-size: clamp(2rem, 3.2vw, 2.5rem); }
.was { color: var(--muted); font: 600 1rem/1 var(--f-display); text-decoration-thickness: 2px; }
.plan .note { display: grid; gap: 4px; }
.plan .left { font-weight: 600; color: var(--red-deep); }
.reuse { display: inline-block; margin: 0 0 22px; padding: 10px 16px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--blue-deep); color: var(--ink); font-weight: 600; }
.plan-pick .amt { display: inline-flex; gap: 8px; align-items: baseline; }
.plan-pick .was { font-size: .85rem; }

/* Buy page v2: account forms */
.seg { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); margin-bottom: 14px; justify-self: start; }
.seg button { font: 600 .92rem/1 var(--f-sans, inherit); border: 0; background: transparent; color: var(--muted); padding: 9px 14px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
#authBox { display: grid; }
.auth-form { display: grid; gap: 14px; }
.auth-form [hidden] { display: none !important; }
.field input[readonly] { color: var(--muted); }
.auth-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: .92rem; color: var(--blue-deep); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.signed-in { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.paypal-btn:disabled { opacity: .55; cursor: not-allowed; }

/* Payment result */
.paid-panel { max-width: 40em; margin-inline: auto; }
.paid-panel .lead { font-size: 1.15rem; font-weight: 600; }
.paid-panel[data-state="ok"] .lead { color: var(--accent); }
.paid-panel[data-state="fail"] .lead { color: var(--rec); }
.paid-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
