/* Shocrot — site styles. No web fonts, no infinite animations: idle CPU stays at zero. */

:root {
  --bg: #fbfbfd;
  --bg-tint: #f4f4f8;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #5f5f66;
  --text-3: #8a8a92;
  --line: rgba(20, 20, 40, .09);
  --line-2: rgba(20, 20, 40, .14);
  --accent: #4b52d9;
  --accent-hover: #3f45c4;
  --accent-soft: rgba(75, 82, 217, .09);
  --accent-text: #3d43c2;
  --amber: #f5b524;
  --shadow-1: 0 1px 2px rgba(16, 18, 40, .06), 0 2px 8px rgba(16, 18, 40, .04);
  --shadow-2: 0 2px 6px rgba(16, 18, 40, .05), 0 18px 50px -12px rgba(16, 18, 40, .18);
  --shadow-3: 0 40px 100px -30px rgba(26, 30, 80, .35), 0 12px 30px -12px rgba(16, 18, 40, .18);
  --kbd-bg: linear-gradient(#fff, #f3f3f6);
  --kbd-line: rgba(20, 20, 40, .16);
  --radius: 18px;

  /* mock UI (macOS-like materials) */
  --m-panel: rgba(246, 246, 249, .86);
  --m-panel-solid: #f6f6f8;
  --m-card: rgba(255, 255, 255, .85);
  --m-text: #1d1d1f;
  --m-text-2: rgba(29, 29, 31, .55);
  --m-line: rgba(0, 0, 0, .1);
  --m-hover: rgba(0, 0, 0, .07);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c11;
    --bg-tint: #121218;
    --surface: #17171e;
    --text: #f3f3f6;
    --text-2: #a6a6b0;
    --text-3: #7c7c86;
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .14);
    --accent: #6f75f0;
    --accent-hover: #8187f7;
    --accent-soft: rgba(124, 131, 242, .14);
    --accent-text: #a3a8ff;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, .3), 0 18px 50px -12px rgba(0, 0, 0, .6);
    --shadow-3: 0 40px 100px -30px rgba(0, 0, 0, .8), 0 12px 30px -12px rgba(0, 0, 0, .5);
    --kbd-bg: linear-gradient(#2a2a33, #222229);
    --kbd-line: rgba(255, 255, 255, .14);

    --m-panel: rgba(40, 40, 46, .88);
    --m-panel-solid: #2a2a30;
    --m-card: rgba(255, 255, 255, .07);
    --m-text: #f2f2f5;
    --m-text-2: rgba(242, 242, 245, .55);
    --m-line: rgba(255, 255, 255, .12);
    --m-hover: rgba(255, 255, 255, .1);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.022em; line-height: 1.08; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .88em; background: var(--accent-soft); padding: .08em .38em; border-radius: 6px; }
kbd {
  font-family: var(--font);
  font-size: .82em;
  font-weight: 500;
  display: inline-block;
  min-width: 1.6em;
  padding: .06em .42em;
  border-radius: 6px;
  background: var(--kbd-bg);
  border: 1px solid var(--kbd-line);
  box-shadow: 0 1px 0 var(--kbd-line);
  line-height: 1.45;
  text-align: center;
  color: var(--text);
  white-space: nowrap;
  vertical-align: .05em;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }

.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }
.wrap-wide { width: min(1200px, 100% - 48px); margin-inline: auto; }
@media (max-width: 600px) {
  .wrap, .wrap-wide { width: calc(100% - 32px); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 999px; font-weight: 560; font-size: 16px; line-height: 1;
  transition: background-color .2s, box-shadow .2s, transform .2s, color .2s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-lg { height: 50px; padding: 0 24px; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 14px; }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 18px -6px rgba(75, 82, 217, .55);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { color: var(--text); background: var(--surface); box-shadow: 0 0 0 1px var(--line-2) inset, var(--shadow-1); }
.btn-ghost:hover { box-shadow: 0 0 0 1px var(--text-3) inset, var(--shadow-1); }
.btn .ic { width: 18px; height: 18px; stroke-width: 2; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { width: min(1120px, 100% - 48px); margin-inline: auto; height: 60px; display: flex; align-items: center; gap: 24px; }
@media (max-width: 600px) { .nav-inner { width: calc(100% - 32px); gap: 10px; } }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 650; font-size: 17px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand.small img { width: 20px; height: 20px; }
.brand.small { font-size: 15px; }
.nav-links { display: flex; gap: 26px; margin-left: 18px; }
.nav-links a { color: var(--text-2); font-size: 14px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.icon-link { color: var(--text-2); padding: 4px; }
.icon-link:hover { color: var(--text); }
.icon-link .ic { width: 20px; height: 20px; }
.lang { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--bg-tint); box-shadow: 0 0 0 1px var(--line) inset; }
.lang button {
  appearance: none; border: 0; background: transparent; color: var(--text-2);
  font: 500 12.5px/1 var(--font); padding: 6px 10px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1), 0 0 0 1px var(--line) inset; }
@media (max-width: 860px) { .nav-links { display: none; } }
@media (max-width: 440px) {
  .icon-link { display: none; }
  .lang button { padding: 6px 8px; }
  .brand span { display: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -200px 0 auto; height: 820px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 340px at 50% 180px, rgba(75, 82, 217, .11), transparent 70%),
    radial-gradient(420px 260px at 72% 300px, rgba(245, 181, 36, .07), transparent 70%);
}
.hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-icon { width: 112px; height: 112px; margin-bottom: 22px; filter: drop-shadow(0 18px 30px rgba(55, 60, 170, .28)); }
.eyebrow { font-size: 14px; color: var(--text-2); font-weight: 500; margin-bottom: 16px; }
.hero h1 { font-size: clamp(38px, 6.4vw, 72px); letter-spacing: -.035em; max-width: 15em; text-wrap: balance; }
.lede { margin-top: 22px; font-size: clamp(17px, 2vw, 20.5px); color: var(--text-2); max-width: 36em; text-wrap: pretty; line-height: 1.5; }
.cta { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.fineprint { margin-top: 16px; font-size: 13.5px; color: var(--text-3); text-wrap: balance; }
.hero .stage-fit { margin-top: 64px; }
@media (max-width: 600px) {
  .hero { padding-top: 44px; }
  .hero-icon { width: 88px; height: 88px; }
  .cta .btn { width: 100%; }
  .hero .stage-fit { margin-top: 44px; }
}

/* capability strip */
.caps {
  list-style: none; margin: 40px auto 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
}
.caps li {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 18px 10px 16px; border-radius: 14px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset;
  font-size: 14.5px; font-weight: 560; letter-spacing: -.005em; line-height: 1.25;
}
.caps .ic { width: 24px; height: 24px; color: var(--accent); stroke-width: 1.6; }
.caps kbd { font-size: 11.5px; color: var(--text-2); margin-top: auto; }
@media (max-width: 960px) { .caps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) {
  .caps { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .caps li { padding: 14px 8px 12px; font-size: 13.5px; }
}

/* ---------- scaled stages (fixed-size illustrations scaled to fit; sized once by JS on resize) ---------- */
.stage-fit { position: relative; width: 100%; aspect-ratio: var(--ar, 1200 / 720); }
.stage {
  position: absolute; left: 0; top: 0;
  transform-origin: 0 0; transform: scale(var(--k, 1));
  overflow: hidden; font-family: var(--font); color: var(--m-text);
  -webkit-user-select: none; user-select: none;
}
.stage svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- HERO STAGE ---------- */
.hero-stage { width: 1200px; height: 660px; border-radius: calc(20px / var(--k, 1)); box-shadow: var(--shadow-3), 0 0 0 1px var(--line); }
.wallpaper {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 600px at 15% 10%, #c9cdf4 0%, transparent 60%),
    radial-gradient(800px 600px at 90% 90%, #f3dcc4 0%, transparent 60%),
    radial-gradient(700px 500px at 85% 15%, #b9c4ea 0%, transparent 60%),
    linear-gradient(135deg, #d5d8f0, #e8e2ea);
}
.menubar {
  position: absolute; left: 0; right: 0; top: 0; height: 30px;
  display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 0 18px;
  background: rgba(255, 255, 255, .42);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  font-size: 13px; font-weight: 500; color: rgba(0,0,0,.82);
}
.mb-item { display: inline-flex; align-items: center; }
.mb-shocrot { padding: 3px 7px; border-radius: 6px; background: rgba(0, 0, 0, .1); }
.mb-shocrot svg { width: 17px; height: 17px; stroke-width: 1.8; }
.mb-glyph { width: 18px; height: 11px; border-radius: 3px; border: 1.6px solid rgba(0,0,0,.7); }
.mb-glyph.short { width: 14px; height: 14px; border-radius: 50%; }

.win { position: absolute; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(20, 22, 60, .45), 0 0 0 1px rgba(0,0,0,.12); }
.titlebar { height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 16px; position: relative; font-size: 13px; font-weight: 600; }
.titlebar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: 0 0 0 .5px rgba(0,0,0,.12) inset; }
.titlebar i:nth-child(2) { background: #febc2e; }
.titlebar i:nth-child(3) { background: #28c840; }
.titlebar span { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; opacity: .75; }

.doc-win { left: 70px; top: 66px; width: 760px; height: 700px; background: #fff; color: #1d1d1f; }
.doc-win .titlebar { background: #f6f6f7; border-bottom: 1px solid rgba(0,0,0,.07); }
.doc { padding: 46px 84px 0; }
.doc-kicker { font-size: 12px; letter-spacing: .12em; color: #8a8a92; font-weight: 600; }
.doc h3 { font-size: 42px; font-weight: 700; letter-spacing: -.03em; margin: 12px 0 18px; font-family: ui-serif, "New York", Georgia, serif; }
.doc p { font-size: 18px; line-height: 1.62; color: #333338; font-family: ui-serif, "New York", Georgia, serif; }
.doc-fig { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 26px 0 10px; }
.sw { height: 96px; border-radius: 12px; background: var(--c); box-shadow: 0 0 0 1px rgba(0,0,0,.06) inset; }
.doc .cap { font-size: 13px; color: #8a8a92; font-family: var(--font); margin-bottom: 18px; }

.code-win { left: 770px; top: 120px; width: 390px; height: 440px; background: #1e1f26; color: #e6e6ea; }
.code-win .titlebar { color: #c9c9d1; background: #25262e; border-bottom: 1px solid rgba(255,255,255,.06); }
.code-win pre { margin: 0; padding: 22px 0 0 92px; font: 13.5px/1.75 var(--mono); }
.code-win .c { color: #7d8195; } .code-win .k { color: #ff7ab2; } .code-win .t { color: #8bd0ff; }
.code-win .s { color: #fc6a5d; } .code-win .f { color: #67b7a4; }

/* capture selection with dimmed surroundings */
.sel { position: absolute; left: 132px; top: 140px; width: 636px; height: 372px; outline: 1px solid rgba(255,255,255,.95); box-shadow: 0 0 0 2000px rgba(12, 14, 34, .3); }
.sel-size { position: absolute; left: -1px; top: -30px; padding: 3px 8px; border-radius: 6px; background: rgba(20, 20, 26, .78); color: #fff; font: 600 12px/1.3 var(--font); font-variant-numeric: tabular-nums; }
.h { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 1px 3px rgba(0,0,0,.3); margin: -4.5px 0 0 -4.5px; }
.h.tl { left: 0; top: 0; } .h.tc { left: 50%; top: 0; } .h.tr { left: 100%; top: 0; }
.h.ml { left: 0; top: 50%; } .h.mr { left: 100%; top: 50%; }
.h.bl { left: 0; top: 100%; } .h.bc { left: 50%; top: 100%; } .h.br { left: 100%; top: 100%; }
.annot { position: absolute; inset: 0; width: 1200px; height: 720px; pointer-events: none; }
.hero-stage .annot { stroke: none; }
.stage svg text { stroke: none; }
.hl-mark { position: absolute; left: 151px; top: 324px; width: 186px; height: 22px; border-radius: 2px; background: #ffd60a; opacity: .6; mix-blend-mode: multiply; }

/* capture toolbar (mirrors CaptureToolbar.swift) */
.toolbar { position: absolute; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.hero-toolbar { right: 432px; top: 522px; }
.tb {
  display: flex; align-items: center; gap: 2px; padding: 5px;
  border-radius: 11px; background: var(--m-panel);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 0 0 .5px var(--m-line), 0 4px 20px rgba(0,0,0,.25);
  color: var(--m-text);
}
.tb b { width: 30px; height: 28px; border-radius: 7px; display: grid; place-items: center; }
.tb b svg { width: 17px; height: 17px; stroke-width: 1.75; }
.tb b.on { background: var(--accent); color: #fff; }
.tb b.off { opacity: .35; }
.tb b.accent { color: var(--accent); }
.tb b.accent svg { stroke-width: 2.3; }
.tb em { width: 1px; height: 18px; background: var(--m-line); margin: 0 4px; }
.tb-colors { gap: 8px; padding: 5px 10px; }
.dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.dot::after { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 .5px rgba(128,128,128,.5) inset; }
.dot.sel-dot { box-shadow: 0 0 0 2px var(--accent) inset; }
.tb-colors em { margin: 0; }
.w { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; }
.w::after { content: ""; border-radius: 50%; background: var(--m-text); }
.w1::after { width: 4px; height: 4px; } .w2::after { width: 8px; height: 8px; } .w3::after { width: 12px; height: 12px; }
.w.on { background: var(--m-hover); }

/* ---------- sections ---------- */
.sec { padding: 120px 0; }
.sec-tint { background: var(--bg-tint); border-block: 1px solid var(--line); }
@media (max-width: 700px) { .sec { padding: 80px 0; } }
.kicker { font-size: 14px; font-weight: 600; color: var(--accent-text); letter-spacing: .01em; margin-bottom: 14px; }
.sec h2 { font-size: clamp(30px, 4.2vw, 46px); text-wrap: balance; }
.body { margin-top: 18px; color: var(--text-2); font-size: 18px; text-wrap: pretty; }
.body.center { margin-inline: auto; max-width: 36em; }
.sec-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }

.split { display: grid; grid-template-columns: 1fr 1.08fr; gap: 72px; align-items: center; }
.split.rev .split-copy { order: 2; }
.split-copy { max-width: 470px; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 44px; }
  .split.rev .split-copy { order: 0; }
  .split-copy { max-width: none; }
}
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 11px; font-size: 15.5px; color: var(--text); }
.ticks li { position: relative; padding-left: 26px; line-height: 1.5; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .42em; width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent) inset;
}
.ticks li::after {
  content: ""; position: absolute; left: 6.5px; top: calc(.42em + 3.5px); width: 4px; height: 6px;
  border: solid var(--accent); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg) translate(-.5px, -.5px);
}
.art-cap { margin-top: 18px; font-size: 14.5px; color: var(--text-2); text-align: center; text-wrap: balance; }
.art-cap strong { color: var(--text); font-weight: 600; }

/* framed illustration cards */
.split-art .stage-fit, .tile-art .stage-fit { border-radius: var(--radius); }
.split-art .stage, .tile-art .stage { border-radius: calc(var(--radius) / var(--k, 1)); }

/* beautify stage */
.beautify-stage { width: 560px; height: 460px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; }
.split-art .beautify-stage, .split-art .ocr-stage, .split-art .tr-stage { box-shadow: var(--shadow-2), 0 0 0 1px var(--line); }
.bg-grad { position: absolute; left: 40px; top: 36px; right: 40px; bottom: 96px; border-radius: 16px; background: linear-gradient(135deg, #6a71ef 0%, #9a7ff0 45%, #f6b98a 100%); box-shadow: 0 20px 40px -18px rgba(60, 50, 150, .45); }
.beauty { position: absolute; left: 90px; top: 74px; width: 380px; }
.mini-doc { position: relative; background: #fff; color: #1d1d1f; border-radius: 12px; padding: 0 22px 22px; box-shadow: 0 24px 40px -14px rgba(30, 20, 80, .5), 0 0 0 1px rgba(0,0,0,.05); }
.md-bar { display: flex; gap: 6px; padding: 12px 0 14px; }
.md-bar i { width: 9px; height: 9px; border-radius: 50%; background: #e3e3e8; }
.md-h { font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 14px; }
.md-row { display: flex; align-items: center; gap: 10px; height: 34px; border-top: 1px solid #f0f0f3; }
.cb { width: 15px; height: 15px; border-radius: 4px; box-shadow: 0 0 0 1.5px #c8c8d0 inset; }
.cb.on { background: #4b52d9; box-shadow: none; }
.ln { height: 8px; border-radius: 4px; background: #e6e6ec; display: block; }
.md-annot { position: absolute; inset: 0; width: 100%; height: 100%; stroke: none; }
.pcard-bar {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 4px; border-radius: 12px;
  background: var(--m-panel); box-shadow: 0 0 0 .5px var(--m-line), 0 6px 20px rgba(0,0,0,.14); color: var(--m-text);
}
.pcard-bar b, .rec-actions b { width: 34px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.pcard-bar b svg, .rec-actions b svg { width: 17px; height: 17px; }
.pcard-bar b.on, .rec-actions b.on { background: var(--accent); color: #fff; }
.toast {
  position: absolute; right: 30px; top: 18px; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(28, 28, 32, .82); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.toast svg { width: 14px; height: 14px; stroke-width: 2; }

/* OCR stage */
.ocr-stage { width: 560px; height: 470px; background: linear-gradient(160deg, #e9eaf7, #f4efe9); }
.mwin { position: absolute; border-radius: 14px; overflow: hidden; background: var(--m-panel-solid); color: var(--m-text); box-shadow: 0 0 0 .5px var(--m-line), 0 24px 50px -16px rgba(20, 22, 60, .35); }
.ocr-win { left: 30px; top: 30px; right: 30px; bottom: 30px; display: flex; flex-direction: column; }
.ocr-win .titlebar { height: 38px; }
.ocr-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 18px 12px; }
.ocr-head strong { font-size: 15px; }
.seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--m-hover); font-size: 11.5px; font-weight: 500; }
.seg span { padding: 4px 10px; border-radius: 6px; color: var(--m-text-2); }
.seg span.on { background: var(--m-card); color: var(--m-text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.ocr-text { margin: 0 14px; padding: 8px 6px; border-radius: 10px; background: var(--m-card); box-shadow: 0 0 0 .5px var(--m-line); flex: 1; }
.ocr-text p { font-size: 14px; line-height: 1.5; padding: 3.5px 8px; border-radius: 6px; position: relative; }
.ocr-text p:first-child { font-weight: 600; }
.ocr-text p.hover { background: var(--accent-soft); }
.tip { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--m-text-2); font-weight: 500; }
.ocr-codes { display: flex; align-items: center; gap: 10px; padding: 12px 20px 0; font-size: 12px; }
.ocr-codes .lbl { display: inline-flex; align-items: center; gap: 5px; color: var(--m-text-2); font-weight: 600; white-space: nowrap; }
.ocr-codes svg { width: 14px; height: 14px; }
.code-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 7px; background: var(--m-card); box-shadow: 0 0 0 .5px var(--m-line); font-family: var(--mono); font-size: 11px; white-space: nowrap; overflow: hidden; }
.ocr-foot { display: flex; align-items: center; gap: 8px; padding: 14px 18px 16px; font-size: 12.5px; }
.muted { color: var(--m-text-2); }
.grow { flex: 1; }
.mbtn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 7px; background: var(--m-card); box-shadow: 0 0 0 .5px var(--m-line), 0 1px 1px rgba(0,0,0,.06); font-weight: 500; white-space: nowrap; }
.mbtn svg { width: 14px; height: 14px; }
.mbtn.primary { background: var(--accent); color: #fff; box-shadow: none; }

/* translate stage (mirrors TranslateView.swift) */
.tr-stage { width: 520px; height: 520px; background: linear-gradient(200deg, #dfe2f7, #f2ece6); }
.tpanel {
  position: absolute; left: 50px; top: 40px; width: 420px; padding: 10px 12px 12px;
  border-radius: 16px; background: var(--m-panel);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: 0 0 0 .5px var(--m-line), 0 28px 60px -18px rgba(20, 22, 60, .4);
  display: flex; flex-direction: column; gap: 10px; color: var(--m-text);
}
.tp-head { display: flex; align-items: center; gap: 4px; height: 22px; font-size: 12px; font-weight: 600; color: var(--m-text-2); }
.tp-head svg { width: 15px; height: 15px; }
.tp-head svg.b { width: 22px; height: 15px; }
.tp-input { border-radius: 10px; background: var(--m-card); box-shadow: 0 0 0 .5px var(--m-line); padding: 10px 12px 8px; }
.tp-input p { font-size: 15px; line-height: 1.45; }
.tp-meta, .tp-card-h { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--m-text-2); margin-top: 8px; font-weight: 500; }
.tp-meta svg, .tp-card-h svg { width: 14px; height: 14px; }
.tp-langs { display: flex; align-items: center; gap: 8px; }
.tp-langs .pop { flex: 1; display: inline-flex; justify-content: space-between; align-items: center; padding: 5px 9px; border-radius: 7px; background: var(--m-card); box-shadow: 0 0 0 .5px var(--m-line); font-size: 12.5px; font-weight: 500; }
.tp-langs .pop svg { width: 12px; height: 12px; opacity: .6; }
.tp-langs .swap { width: 16px; height: 16px; color: var(--m-text-2); }
.tp-card { border-radius: 10px; background: var(--m-card); box-shadow: 0 0 0 .5px var(--m-line); padding: 10px 12px 12px; }
.tp-card-h { margin: 0 0 6px; font-weight: 600; }
.tp-card p { font-size: 15.5px; line-height: 1.55; font-family: "PingFang SC", "Hiragino Sans GB", var(--font); }
.caret { display: inline-block; width: 2px; height: 1.05em; vertical-align: -.15em; margin-left: 2px; background: var(--accent); border-radius: 1px; }

/* engines */
.engines { margin-top: 28px; display: grid; gap: 12px; }
.engine { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; }
.engine .ic { width: 22px; height: 22px; color: var(--accent); margin-top: 1px; }
.engine strong { display: block; font-size: 15.5px; font-weight: 600; }
.engine span { display: block; font-size: 14.5px; color: var(--text-2); margin-top: 2px; }

/* trio tiles */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .trio { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }
.tile { background: var(--surface); border-radius: 22px; padding: 14px 14px 26px; box-shadow: 0 0 0 1px var(--line) inset, var(--shadow-1); }
.tile h3 { display: flex; align-items: center; gap: 9px; font-size: 20px; margin: 22px 10px 8px; }
.tile h3 .ic { color: var(--accent); width: 21px; height: 21px; }
.tile p { margin: 0 10px; color: var(--text-2); font-size: 15.5px; }
.tile-art .stage { background: var(--bg-tint); }

.pin-stage, .scroll-stage, .rec-stage { width: 380px; height: 260px; }
.pin-stage { background: linear-gradient(150deg, #e3e5f8, #f3ece4) !important; }
.ghost-win { position: absolute; left: 26px; top: 30px; width: 230px; height: 190px; border-radius: 12px; background: rgba(255,255,255,.6); box-shadow: 0 0 0 1px rgba(0,0,0,.05); }
.ghost-win::before { content: ""; position: absolute; left: 18px; right: 50px; top: 30px; height: 8px; border-radius: 4px; background: rgba(0,0,0,.08); box-shadow: 0 22px 0 rgba(0,0,0,.06), 0 44px 0 rgba(0,0,0,.06), 0 66px 0 rgba(0,0,0,.06); }
.pinned { position: absolute; left: 140px; top: 74px; width: 210px; padding: 12px; border-radius: 6px; background: #fff; opacity: .9; box-shadow: 0 0 0 1px rgba(75, 82, 217, .55), 0 20px 40px -12px rgba(20, 22, 60, .45); transform: rotate(-1.5deg); color: #1d1d1f; }
.pal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pal span { height: 62px; border-radius: 6px; background: var(--c); }
.pal-l { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 7px; font-size: 10.5px; color: #6e6e73; font-weight: 500; }
.pin-hud { position: absolute; left: 196px; top: 196px; padding: 5px 11px; border-radius: 999px; background: rgba(28,28,32,.8); color: #fff; font-size: 12px; font-weight: 600; }

.scroll-stage { background: linear-gradient(150deg, #e6e9f7, #eef0f6) !important; }
.strip { position: absolute; left: 110px; top: 22px; width: 160px; padding: 10px; border-radius: 8px; background: #fff; box-shadow: 0 16px 34px -14px rgba(20, 22, 60, .4), 0 0 0 1px rgba(0,0,0,.05); }
.seg-a { display: grid; gap: 7px; padding: 6px 0; }
.seg-a .ln { height: 6px; background: #e5e6ee; }
.blk { display: block; height: 30px; border-radius: 5px; background: linear-gradient(120deg, #7c83f2, #4b52d9); }
.blk.alt { background: linear-gradient(120deg, #ffd27a, #f5b524); }
.seam { height: 0; border-top: 1.5px dashed rgba(75, 82, 217, .6); margin: 3px -16px; }
.scroll-arrow { position: absolute; left: 296px; top: 86px; display: grid; color: var(--accent); }
.scroll-arrow svg { width: 26px; height: 26px; margin-top: -12px; stroke-width: 2.2; }
.scroll-arrow svg:first-child { opacity: .45; }

.rec-stage { background: linear-gradient(150deg, #e9e6f4, #f4eee8) !important; }
.rec-hud { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(28,28,32,.86); color: #fff; font-size: 12.5px; font-weight: 600; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); white-space: nowrap; }
.rdot { width: 8px; height: 8px; border-radius: 50%; background: #ff453a; box-shadow: 0 0 0 3px rgba(255, 69, 58, .25); }
.time { font-variant-numeric: tabular-nums; }
.hud-cancel { opacity: .7; font-weight: 500; padding: 0 2px; }
.hud-stop { background: #ff453a; padding: 4px 11px; border-radius: 999px; }
.rec-card { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); width: 230px; padding: 8px; border-radius: 14px; background: var(--m-panel); box-shadow: 0 0 0 .5px var(--m-line), 0 16px 34px -14px rgba(20,22,60,.45); color: var(--m-text); }
.thumb { height: 82px; border-radius: 8px; background: linear-gradient(135deg, #5a61e6, #8f83ef 55%, #f2b98d); display: grid; place-items: center; color: #fff; }
.thumb svg { width: 30px; height: 30px; stroke-width: 1.5; }
.rec-actions { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.toast.small { left: 50%; right: auto; top: auto; bottom: 12px; transform: translateX(-50%); white-space: nowrap; }

.extras { list-style: none; padding: 0; margin: 44px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.extras li { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; font-size: 14.5px; color: var(--text-2); }
.extras .ic { width: 17px; height: 17px; color: var(--accent); }

/* privacy */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 960px) { .grid4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid4 { grid-template-columns: 1fr; } }
.pv { padding: 26px 24px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; }
.pv .ic { width: 26px; height: 26px; color: var(--accent); margin-bottom: 16px; stroke-width: 1.6; }
.pv h3 { font-size: 18px; letter-spacing: -.012em; }
.pv p { margin-top: 8px; font-size: 15px; color: var(--text-2); }

/* shortcuts */
.keys { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
@media (max-width: 700px) { .keys { grid-template-columns: 1fr; } }
.key-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 2px; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.kc { display: inline-flex; gap: 4px; }
.kc kbd { font-size: 13.5px; min-width: 28px; padding: 3px 7px; border-radius: 7px; }

.auto { margin: 64px auto 0; max-width: 980px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 36px; align-items: center; }
@media (max-width: 860px) { .auto { grid-template-columns: 1fr; gap: 20px; } }
.auto h3 { font-size: 22px; }
.auto p { margin-top: 10px; color: var(--text-2); font-size: 15.5px; }
.term {
  margin: 0; padding: 22px 24px; border-radius: 16px; overflow-x: auto;
  background: #16161c; color: #e9e9ef; font: 13.5px/1.75 var(--mono);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset, var(--shadow-2);
}
.term .c { color: #7d8195; } .term .s { color: #f7c46c; }

/* download */
.download { padding-top: 120px; padding-bottom: 32px; }
.nw { white-space: nowrap; }
.dl-card {
  max-width: 880px; margin: 0 auto; padding: 64px 48px 48px; border-radius: 28px; text-align: center;
  background:
    radial-gradient(500px 220px at 50% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
  box-shadow: 0 0 0 1px var(--line) inset, var(--shadow-2);
  display: flex; flex-direction: column; align-items: center;
}
.dl-card > img { width: 96px; height: 96px; margin-bottom: 20px; filter: drop-shadow(0 14px 24px rgba(55, 60, 170, .25)); }
.dl-card h2 { font-size: clamp(32px, 4.4vw, 46px); }
@media (max-width: 600px) { .dl-card { padding: 44px 20px 28px; border-radius: 22px; } }
.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; width: 100%; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.steps li { display: flex; gap: 12px; padding: 18px; border-radius: 14px; background: var(--bg-tint); box-shadow: 0 0 0 1px var(--line) inset; }
.steps .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
.steps strong { font-size: 15.5px; font-weight: 600; }
.steps p { margin-top: 4px; font-size: 14px; color: var(--text-2); }
.reqs { margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; width: 100%; text-align: left; border-top: 1px solid var(--line); padding-top: 24px; }
@media (max-width: 760px) { .reqs { grid-template-columns: 1fr 1fr; } }
.reqs dt { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.reqs dd { margin: 3px 0 0; font-size: 14.5px; font-weight: 500; }

/* footer */
.foot { padding: 56px 0 48px; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 28px; }
.foot p { font-size: 14px; color: var(--text-3); }
.foot a { color: var(--text-2); }

/* reveal on scroll — one-shot transitions, nothing runs while idle */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

/* avoid a flash of English when Chinese was chosen before */
.pre-zh body { visibility: hidden; }
html[lang="zh-CN"] h1, html[lang="zh-CN"] h2 { letter-spacing: -.01em; line-height: 1.2; }
html[lang="zh-CN"] .hero h1 { letter-spacing: -.015em; }

@media print {
  .nav, .stage-fit { display: none; }
}

/* dark-mode backdrops for the illustrations */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ocr-stage { background: linear-gradient(160deg, #1e2033, #26212a); }
  :root:not([data-theme="light"]) .tr-stage { background: linear-gradient(200deg, #1f2136, #29232a); }
  :root:not([data-theme="light"]) .pin-stage { background: linear-gradient(150deg, #1f2134, #29242a) !important; }
  :root:not([data-theme="light"]) .scroll-stage { background: linear-gradient(150deg, #1e2133, #22242e) !important; }
  :root:not([data-theme="light"]) .rec-stage { background: linear-gradient(150deg, #221f33, #29242a) !important; }
  :root:not([data-theme="light"]) .ghost-win { background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
  :root:not([data-theme="light"]) .ghost-win::before { background: rgba(255,255,255,.1); box-shadow: 0 22px 0 rgba(255,255,255,.07), 0 44px 0 rgba(255,255,255,.07), 0 66px 0 rgba(255,255,255,.07); }
}
@media (max-width: 600px) {
  html[lang="zh-CN"] .hero h1 { font-size: clamp(30px, 8.4vw, 40px); }
}
