:root {
  --bg:#0b0e14; --bg2:#10151e; --line:#2a3445; --line2:#3b4759;
  --fg:#dfd9ca; --muted:#8f97a6; --teal:#4cc3d1; --orange:#f0662f; --orange-dim:#b84a1f;
  --ok:#6fd39a; --bad:#ff6b6b;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior:auto; } }
body { margin:0; background:var(--bg); color:var(--fg); font:16px/1.6 "Cascadia Mono","Consolas",ui-monospace,"Courier New",monospace; }
a { color:var(--teal); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline:2px solid var(--teal); outline-offset:3px; }
.wrap { width:100%; max-width:1040px; margin:0 auto; padding:0 20px; }
h1, h2, h3 { margin:0; line-height:1.15; font-weight:700; letter-spacing:0; }
h1 { font-size:clamp(24px,3.6vw,36px); }
h2 { font-size:clamp(22px,3vw,30px); color:var(--orange); margin-bottom:14px; }
h2::before { content:"== "; color:var(--line2); }
h2::after { content:" =="; color:var(--line2); }
h3 { font-size:18px; color:var(--orange); margin-bottom:6px; }
p { margin:0 0 14px; }
.muted { color:var(--muted); }
.small { font-size:14px; color:var(--muted); }
section { padding:56px 0; }
section + section { border-top:1px dashed var(--line); }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

/* header */
header { padding:18px 0; border-bottom:1px dashed var(--line); }
header .wrap { display:flex; align-items:center; justify-content:space-between; gap:16px; font-size:15px; }
.brand { display:flex; align-items:center; gap:10px; color:var(--fg); text-decoration:none; font-weight:700; }
.brand img { width:28px; height:28px; border-radius:6px; }
.brand span { color:var(--muted); font-weight:400; }
nav a { color:var(--muted); text-decoration:none; margin-left:20px; }
nav a::before { content:"/"; color:var(--line2); margin-right:2px; }
nav a:hover { color:var(--fg); }

/* buttons: [ label ] */
.btn { display:inline-block; font:700 16px/1 inherit; font-family:inherit; padding:14px 18px; border:1px solid var(--orange); color:var(--orange); background:transparent; cursor:pointer; text-decoration:none; text-align:center; }
.btn::before { content:"[ "; } .btn::after { content:" ]"; }
.btn:hover { background:var(--orange); color:var(--bg); }
.btn-ghost { border-color:var(--line2); color:var(--fg); }
.btn-ghost:hover { background:var(--line2); color:var(--fg); }
.btn[disabled] { opacity:.6; cursor:default; }

/* hero */
.hero { padding:28px 0 56px; position:relative; }
.hero .fx { display:block; width:100%; height:min(56vw,460px); border:3px double var(--line2); background:var(--bg2); }
.hero .under { display:flex; justify-content:space-between; gap:16px; font-size:13px; color:var(--muted); margin:8px 0 34px; flex-wrap:wrap; }
.logo { margin:0 0 18px; line-height:1; white-space:pre; color:var(--fg); overflow:hidden; letter-spacing:-.04em; text-shadow:.7px 0 currentColor; }
.hero .cols { display:grid; grid-template-columns:1.2fr .8fr; gap:40px; align-items:start; }
.hero p.lead { font-size:17px; color:var(--muted); margin:16px 0 26px; max-width:38em; }
.hero .cta { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.hero .cta .small { flex-basis:100%; margin-top:10px; }
.picker { border:3px double var(--line2); padding:16px; background:var(--bg2); font-size:14px; }
.picker .t { color:var(--muted); margin-bottom:8px; }
.picker ul { list-style:none; margin:0; padding:0; }
.picker li { padding:7px 10px; color:var(--muted); }
.picker li::before { content:"( ) "; }
.picker li.on { color:var(--fg); background:#1a2331; }
.picker li.on::before { content:"(•) "; color:var(--teal); }
.picker .note { margin:12px 0 0; color:var(--muted); font-size:13px; }

/* features */
.features { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; margin-top:24px; }
.feature .fx, .feature pre.art { display:block; width:100%; aspect-ratio:16/10; border:3px double var(--line2); background:var(--bg2); margin:0 0 14px; }
.feature pre.art { display:grid; place-items:center; font-size:13px; line-height:1.15; color:var(--teal); white-space:pre; overflow:hidden; }
.feature .cap { font-size:12px; color:var(--muted); margin:-8px 0 12px; }
.looks { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.looks span { font-size:13px; padding:2px 8px; border:1px solid var(--line); color:var(--muted); }

/* comparison */
table { width:100%; border-collapse:collapse; margin-top:22px; font-size:14px; }
th, td { text-align:left; padding:10px 12px; border:1px dashed var(--line); vertical-align:top; }
th { color:var(--muted); font-weight:400; }
td:nth-child(2), thead th:nth-child(2) { color:var(--fg); background:rgba(76,195,209,.06); }
tbody th { width:22%; }

/* privacy */
.privacy .wrap > div, .privacy ul { max-width:60em; }
.privacy ul { margin:8px 0 0; padding:0; list-style:none; color:var(--muted); }
.privacy li { margin-bottom:10px; padding-left:22px; position:relative; }
.privacy li::before { content:"*"; position:absolute; left:4px; color:var(--teal); }

/* pricing */
.plans { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-top:24px; }
.plan { border:3px double var(--line2); padding:22px; background:var(--bg2); }
.plan.pro { border-color:var(--teal); }
.plan .price { font-size:34px; font-weight:700; line-height:1; margin:12px 0 4px; color:var(--fg); }
.plan ul { margin:16px 0 22px; padding:0; list-style:none; color:var(--muted); }
.plan li { margin-bottom:6px; padding-left:22px; position:relative; }
.plan li::before { content:"+"; position:absolute; left:4px; color:var(--teal); }
.plan.free li::before { content:"-"; color:var(--muted); }
.billing { display:flex; gap:18px; margin-top:10px; font-size:14px; color:var(--muted); }
.billing label { cursor:pointer; display:inline-flex; align-items:center; gap:6px; }
.billing input { accent-color:var(--teal); margin:0; width:14px; height:14px; }

/* download */
.download .wrap { max-width:600px; }
form { display:grid; gap:10px; border:3px double var(--line2); background:var(--bg2); padding:22px; margin-top:28px; }
form label { font-size:14px; color:var(--muted); }
form label::before { content:"> "; color:var(--teal); }
form input { width:100%; font:inherit; padding:10px 12px; border:1px solid var(--line2); background:var(--bg); color:var(--fg); }
form .btn { width:100%; }
#download { width:100%; margin-top:8px; }
.ok { color:var(--ok); } .err { color:var(--bad); }
[hidden] { display:none !important; }

/* faq */
details { border-top:1px dashed var(--line); padding:14px 0; }
details:last-of-type { border-bottom:1px dashed var(--line); }
summary { cursor:pointer; font-weight:700; list-style:none; display:flex; gap:12px; }
summary::-webkit-details-marker { display:none; }
summary::before { content:"[+]"; color:var(--teal); flex:none; }
details[open] summary::before { content:"[-]"; }
details p { margin:10px 0 0 40px; color:var(--muted); max-width:60em; }

footer { padding:32px 0 44px; color:var(--muted); font-size:14px; border-top:1px dashed var(--line); }
footer .wrap { display:flex; gap:22px; flex-wrap:wrap; align-items:center; }
footer a { color:var(--muted); text-decoration:none; }
footer a:hover { color:var(--fg); }

/* long-form pages */
.page { max-width:760px; }
.page h1 { color:var(--orange); margin:28px 0 16px; }
.page h2 { margin-top:40px; }
.page ol { padding-left:28px; color:var(--muted); }
.page li { margin-bottom:8px; }
.page .btn { margin:8px 0 48px; }
/* press page: screenshots inside the text, and a strip of smaller ones at the end */
.shot { margin:0 0 22px; }
.shot img { display:block; width:100%; height:auto; border:3px double var(--line2); background:var(--bg2); }
.shot figcaption { font-size:13px; color:var(--muted); margin-top:6px; }
.shots { display:grid; grid-template-columns:repeat(3,1fr); gap:0 16px; margin-top:22px; }
.page .cta { display:flex; flex-wrap:wrap; gap:12px; margin:8px 0 36px; }
.page .cta .btn { margin:0; }

@media (max-width:860px) {
  .hero .cols, .plans { grid-template-columns:1fr; }
  .shots { grid-template-columns:1fr 1fr; }
  .features { grid-template-columns:1fr; }
  nav a { margin-left:12px; }
  section { padding:44px 0; }
  table { display:block; overflow-x:auto; }
  .hero .fx { height:60vw; }
}

/* Japanese pages. The mono Latin stays; Japanese falls through to BIZ UDGothic (OFL), subset to exactly the
   characters the /ja pages use (server/tools/fonts.py rebuilds it and checks coverage: rerun after any
   Japanese text change). unicode-range keeps English pages from ever downloading it. */
@font-face { font-family:"BIZ UDGothic"; font-weight:400; font-display:swap; src:url(/fonts/biz-udgothic-400.woff) format("woff"); unicode-range:U+2E80-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF; }
@font-face { font-family:"BIZ UDGothic"; font-weight:700; font-display:swap; src:url(/fonts/biz-udgothic-700.woff) format("woff"); unicode-range:U+2E80-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF; }
html:lang(ja) body { font-family:"Cascadia Mono","Consolas","BIZ UDGothic",ui-monospace,monospace; line-height:1.75; }
html:lang(ja) h1, html:lang(ja) h2, html:lang(ja) h3, html:lang(ja) p, html:lang(ja) li, html:lang(ja) td, html:lang(ja) summary { text-wrap:pretty; line-break:strict; }
html:lang(ja) h1, html:lang(ja) h2 { line-height:1.4; }
html:lang(ja) .hero p.lead { font-size:16px; }
.nb { white-space:nowrap; }
/* On a lang="ja" page the generic "monospace" of <pre> resolves to a Japanese font (MS Gothic on Windows),
   where the block █ of the ASCII logo is double width and the logo falls apart: pin the Latin mono fonts. */
html:lang(ja) pre { font-family:"Cascadia Mono","Consolas",ui-monospace,monospace; }

/* Languages: the footer list of all of them. The header's dropdown is styled further down
   (server/tools/i18n.py writes both). */
.langs a, .langs span { white-space:nowrap; }
.langs > span[lang] { color:var(--fg); }

/* Korean: the mono Latin stays, Hangul falls through to Noto Sans KR (OFL), subset like the Japanese font
   (server/tools/fonts.py) and limited by unicode-range. */
@font-face { font-family:"Noto Sans KR"; font-weight:400; font-display:swap; src:url(/fonts/noto-sans-kr-400.woff) format("woff"); unicode-range:U+1100-11FF, U+3130-318F, U+A960-A97F, U+AC00-D7AF, U+D7B0-D7FF; }
@font-face { font-family:"Noto Sans KR"; font-weight:700; font-display:swap; src:url(/fonts/noto-sans-kr-700.woff) format("woff"); unicode-range:U+1100-11FF, U+3130-318F, U+A960-A97F, U+AC00-D7AF, U+D7B0-D7FF; }
html:lang(ko) body { font-family:"Cascadia Mono","Consolas","Noto Sans KR",ui-monospace,monospace; line-height:1.75; }
html:lang(ko) h1, html:lang(ko) h2, html:lang(ko) h3, html:lang(ko) p, html:lang(ko) li, html:lang(ko) td, html:lang(ko) summary { text-wrap:pretty; word-break:keep-all; }
html:lang(ko) h1, html:lang(ko) h2 { line-height:1.4; }
/* same <pre> trap as Japanese: generic monospace resolves to a Korean font with a double-width █ */
html:lang(ko) pre { font-family:"Cascadia Mono","Consolas",ui-monospace,monospace; }

/* Traditional Chinese: the mono Latin stays, Han falls through to Noto Sans TC (OFL), subset like the Japanese
   font (server/tools/fonts.py) and limited by unicode-range. */
@font-face { font-family:"Noto Sans TC"; font-weight:400; font-display:swap; src:url(/fonts/noto-sans-tc-400.woff) format("woff"); unicode-range:U+2E80-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF; }
@font-face { font-family:"Noto Sans TC"; font-weight:700; font-display:swap; src:url(/fonts/noto-sans-tc-700.woff) format("woff"); unicode-range:U+2E80-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF; }
html:lang(zh-Hant) body { font-family:"Cascadia Mono","Consolas","Noto Sans TC",ui-monospace,monospace; line-height:1.75; }
html:lang(zh-Hant) h1, html:lang(zh-Hant) h2, html:lang(zh-Hant) h3, html:lang(zh-Hant) p, html:lang(zh-Hant) li, html:lang(zh-Hant) td, html:lang(zh-Hant) summary { text-wrap:pretty; line-break:strict; }
html:lang(zh-Hant) h1, html:lang(zh-Hant) h2 { line-height:1.4; }
html:lang(zh-Hant) .hero p.lead { font-size:16px; }
/* same <pre> trap as Japanese: generic monospace resolves to a Chinese font with a double-width █ */
html:lang(zh-Hant) pre { font-family:"Cascadia Mono","Consolas",ui-monospace,monospace; }

/* German, French and Russian: long words on a phone; let the browser hyphenate running text */
html:lang(de) p, html:lang(de) li, html:lang(de) td, html:lang(fr) p, html:lang(fr) li, html:lang(fr) td,
html:lang(ru) p, html:lang(ru) li, html:lang(ru) td { hyphens:auto; }

/* The header's language dropdown (a native <details>, written by i18n.py). It has to undo the FAQ's
   details/summary styling, which is global. */
.lang-menu { position:relative; display:inline-block; margin-left:20px; border:0; padding:0; }
.lang-menu:last-of-type { border:0; }
.lang-menu summary { display:inline; font-weight:400; color:var(--muted); cursor:pointer; list-style:none; }
.lang-menu summary::-webkit-details-marker { display:none; }
.lang-menu summary::before, .lang-menu[open] summary::before { content:"/"; color:var(--line2); margin-right:2px; }
.lang-menu summary:hover, .lang-menu[open] summary { color:var(--fg); }
.lang-menu .lang-list { position:absolute; right:0; top:calc(100% + 10px); z-index:20; display:flex; flex-direction:column; min-width:160px; padding:6px 0; background:var(--bg2); border:3px double var(--line2); }
.lang-menu .lang-list a, .lang-menu .lang-list span { margin:0; padding:7px 14px; white-space:nowrap; color:var(--muted); text-decoration:none; }
.lang-menu .lang-list a::before { content:"( ) "; color:var(--line2); margin:0; }
.lang-menu .lang-list a:hover { color:var(--fg); background:#1a2331; }
.lang-menu .lang-list span { color:var(--fg); }
.lang-menu .lang-list span::before { content:"(•) "; color:var(--teal); }
@media (max-width:860px) { .lang-menu { margin-left:12px; } }

/* Legal pages (privacy, terms, refund policy): the site look around text that stays word for word.
   Japanese, Korean and Chinese legal text uses the system's own font, not the subset web fonts: those
   cover only the marketing pages, and pulling every legal character into them would grow the font
   every visitor of those languages downloads. */
.legal .date { display:block; font-size:13px; color:var(--muted); margin:-6px 0 26px; }
.legal .note { font-size:13px; color:var(--muted); border:1px dashed var(--line2); padding:10px 14px; margin:0 0 24px; }
.legal .tldr { border:3px double var(--teal); background:var(--bg2); padding:18px 20px; margin:0 0 30px; }
.legal .tldr b { display:block; color:var(--teal); margin-bottom:6px; }
.legal .tldr p { color:var(--fg); margin:0; }
.legal p, .legal li { color:var(--muted); }
.legal strong { color:var(--fg); }
.legal ul { margin:10px 0 14px; padding-left:22px; }
.legal li { margin-bottom:6px; }
.legal h2 { font-size:clamp(18px,2.4vw,22px); }
html:lang(ja) body.legal { font-family:"Cascadia Mono","Consolas","Yu Gothic UI","Yu Gothic","Hiragino Sans","Meiryo",sans-serif; }
html:lang(ko) body.legal { font-family:"Cascadia Mono","Consolas","Malgun Gothic","Apple SD Gothic Neo",sans-serif; }
html:lang(zh-Hant) body.legal { font-family:"Cascadia Mono","Consolas","Microsoft JhengHei UI","Microsoft JhengHei","PingFang TC",sans-serif; }

/* back from a paid checkout (site.js adds it on ?paid=1) */
.paid-banner { background:var(--bg2); color:var(--ok); border-bottom:1px dashed var(--line); padding:12px 20px; text-align:center; font-size:14px; }
#paymsg:empty { display:none; }
#paymsg { margin-top:10px; }
/* "Who gets Premium?" box before the checkout */
dialog.who { background:transparent; color:var(--fg); border:0; padding:0; width:min(440px, calc(100% - 32px)); }
dialog.who::backdrop { background:rgba(0,0,0,.6); }
dialog.who h3 { margin:0 0 4px; }
dialog.who form { margin:0; }
dialog.who .gift { display:flex; gap:8px; align-items:flex-start; color:var(--fg); cursor:pointer; }
dialog.who .gift::before { content:none; }
dialog.who .gift input { width:auto; margin:3px 0 0; accent-color:var(--teal); }
dialog.who p { margin:0; }
dialog.who [role=status]:empty { display:none; }
/* /signin: the code from the sign-in mail, to type in by hand */
.signin-code { font-size:32px; font-weight:700; letter-spacing:4px; color:var(--fg); }
