:root {
  --ink: #15171c;
  --ink-2: #2b2f38;
  --paper: #faf9f6;
  --card: #ffffff;
  --muted: #5d6370;
  --line: #e4e1da;
  --accent: #ff5a1f;
  --accent-soft: rgba(255, 90, 31, 0.14);
  --ok: #138a52;
  --bad: #c2381b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 22, 28, 0.06), 0 8px 24px rgba(20, 22, 28, 0.06);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.55; font-size: 16px; }
a { color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: rgba(250, 249, 246, 0.92); backdrop-filter: saturate(1.4) blur(8px); position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; font-size: 18px; margin: 0; }
.logo.small { font-size: 15px; }
.logo-bar { display: inline-block; width: 22px; height: 10px; background: var(--ink); border-radius: 2px; box-shadow: 0 6px 0 -2px var(--accent); }
.nav { display: flex; gap: 22px; font-size: 14px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }

/* Hero */
.hero { padding: 64px 0 56px; }
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.035em; margin: 0 0 20px; font-weight: 850; }
.ink { background: var(--ink); color: var(--paper); padding: 0 0.18em; border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.lede { font-size: 18px; color: var(--ink-2); max-width: 34em; margin: 0 0 22px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.chips li { font-size: 13px; font-weight: 600; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.chips li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 8px; vertical-align: 1px; }

/* Drop zone */
.drop { background: var(--card); border: 2px dashed #cfcac0; border-radius: 18px; min-height: 300px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 32px; transition: border-color .15s, background .15s; box-shadow: var(--shadow); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--accent); background: #fffaf7; }
.drop-icon { width: 54px; height: 54px; color: var(--ink); margin-bottom: 8px; }
.drop-title { font-size: 20px; font-weight: 750; margin: 6px 0 2px; letter-spacing: -0.01em; }
.drop-sub { margin: 0 0 14px; color: var(--muted); }
.drop-note { font-size: 13px; color: var(--muted); margin: 0; }
.drop-err { color: var(--bad); font-size: 14px; margin: 14px 0 0; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; font-weight: 600; }
.pw { display: grid; gap: 10px; width: min(320px, 100%); cursor: default; }
.pw input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.pw-row { display: flex; gap: 8px; justify-content: center; }

/* Buttons */
.btn { font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 10px 16px; background: var(--ink); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.btn:hover { background: #000; }
.btn:disabled { opacity: .5; cursor: progress; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.big { width: 100%; padding: 14px 16px; font-size: 16px; box-shadow: 0 6px 0 -2px var(--accent); }
.btn.accent { background: var(--accent); }

/* Workspace */
.work { padding: 36px 0 56px; }
.work-in { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.panel { position: sticky; top: 76px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); max-height: calc(100vh - 92px); overflow: auto; }
.panel-sec { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel-sec:last-child { border-bottom: 0; }
.panel-h { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; font-weight: 700; }
.file-name { font-weight: 750; margin: 0; word-break: break-all; }
.toggles { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.toggles label { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.toggles input { accent-color: var(--ink); width: 16px; height: 16px; }
.toggles .count { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; min-width: 26px; text-align: center; }
.toggles .count.has { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }
textarea { width: 100%; font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; background: var(--paper); }
.tips p { margin: 0 0 4px; font-size: 13px; color: var(--ink-2); }
.panel-cta { display: grid; gap: 10px; }
.summary { margin: 0; font-weight: 650; }
#export-status, #quota { margin: 0; }
#reset { justify-self: start; }

.pages { display: grid; gap: 22px; justify-items: center; }
.page { position: relative; width: 100%; max-width: 860px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 10px 30px rgba(0,0,0,.08); border-radius: 2px; }
.page canvas { display: block; width: 100%; height: 100%; border-radius: 2px; }
.page-num { position: absolute; left: -2px; top: -22px; font-size: 12px; color: var(--muted); }
.ov { position: absolute; inset: 0; cursor: crosshair; touch-action: none; }
.box { position: absolute; border-radius: 2px; cursor: pointer; }
.box.on { background: rgba(10, 10, 12, 0.82); outline: 2px solid var(--accent); outline-offset: 0; }
.box.on:hover { background: rgba(10, 10, 12, 0.55); }
.box.off { background: transparent; outline: 2px dashed rgba(255, 90, 31, 0.75); }
.box.off:hover { background: var(--accent-soft); }
.box.manual { background: rgba(10, 10, 12, 0.82); outline: 2px solid var(--ink); cursor: default; }
.box.manual.first { z-index: 2; }
.box.drawing { background: var(--accent-soft); outline: 2px solid var(--accent); pointer-events: none; }
.box .x { position: absolute; top: -10px; right: -10px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 13px; line-height: 20px; padding: 0; cursor: pointer; display: none; }
.box.manual:hover .x { display: block; }
.box[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 6px); white-space: nowrap; font-size: 11px; font-weight: 600; background: var(--ink); color: #fff; padding: 3px 7px; border-radius: 4px; pointer-events: none; z-index: 5; }

.panel-sub { margin: -4px 0 10px; }
.pages-col { min-width: 0; }
.toolbar { position: sticky; top: 68px; z-index: 10; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 10px; margin: 0 auto 26px; max-width: 860px; }
.seg { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg-btn { font: inherit; font-weight: 700; font-size: 14px; border: 0; background: transparent; color: var(--ink-2); padding: 8px 14px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.seg-btn svg { width: 17px; height: 17px; }
.seg-btn:hover { color: var(--ink); background: #fff; }
.seg-btn.on { background: var(--ink); color: #fff; box-shadow: 0 3px 0 -1px var(--accent); }
.tool-hint { flex: 1; min-width: 180px; margin: 0; font-size: 13px; color: var(--ink-2); }
.tool-actions { display: flex; gap: 6px; }
.tbtn { font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 8px; padding: 7px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.tbtn svg { width: 15px; height: 15px; }
.tbtn:disabled { opacity: .45; cursor: default; }
.tbtn:not(:disabled):hover { border-color: var(--ink); }
.toolbar.intro .seg { animation: pulse 1.4s ease-out 3; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 31, .55); } 100% { box-shadow: 0 0 0 12px rgba(255, 90, 31, 0); } }
.matchbar { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); width: min(640px, calc(100vw - 32px)); z-index: 30; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 10px; padding: 8px 10px 8px 16px; font-size: 14px; }
.matchbar span { flex: 1; }
.small-btn { padding: 6px 12px; font-size: 13px; background: var(--accent); }
.small-btn:hover { background: #ff6d38; }
.mb-x { border: 0; background: transparent; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; opacity: .7; }
.ov.mode-text { cursor: text; }
.ov.mode-box { cursor: crosshair; }
.ov.mode-text.no-word { cursor: crosshair; }
.hoverword { position: absolute; background: var(--accent-soft); outline: 1.5px solid var(--accent); border-radius: 2px; pointer-events: none; }
.box.preview { background: rgba(10, 10, 12, 0.55); outline: 2px solid var(--accent); pointer-events: none; }

.upsell { border: 1px solid var(--accent); background: #fff6f1; border-radius: 10px; padding: 12px 14px; display: grid; gap: 8px; }
.upsell p { margin: 0; font-size: 14px; }
.upsell .linkish { justify-self: start; }
.page-cap { max-width: 860px; width: 100%; font-size: 13px; color: var(--ink-2); background: #fff6f1; border: 1px dashed var(--accent); border-radius: 8px; padding: 8px 12px; text-align: center; }

/* Content sections */
.band { padding: 72px 0; border-top: 1px solid var(--line); }
.band.alt { background: #f3f1ec; }
.sec-h { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.025em; margin: 0 0 28px; line-height: 1.15; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps h3 { margin: 10px 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.steps p { margin: 0; color: var(--ink-2); }
.step-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 800; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.split p { color: var(--ink-2); }
.compare { margin: 0; display: grid; gap: 14px; }
.cmp-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.cmp-tag { margin: 0 0 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.cmp-tag.bad { color: var(--bad); }
.cmp-tag.good { color: var(--ok); }
.cmp-line { margin: 0 0 8px; font-size: 17px; }
.cmp-bar { background: var(--ink); color: var(--ink); border-radius: 2px; padding: 0 2px; }
.cmp-bar.solid { display: inline-block; width: 190px; height: 1.05em; vertical-align: -3px; }
.cmp-leak { margin: 0; font-size: 13px; color: var(--muted); }
.cmp-leak code { font-family: var(--mono); color: var(--ink); background: var(--paper); padding: 1px 5px; border-radius: 4px; }
.finds { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.finds li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 2px; }
.finds span { font-size: 13px; color: var(--muted); }
details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 16px; color: var(--ink-2); }

/* Pricing */
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 820px; }
.price { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.price.pro { border: 2px solid var(--ink); }
.price h2 { margin: 0; font-size: 20px; }
.price .amt { font-size: 44px; font-weight: 850; letter-spacing: -0.03em; margin: 10px 0 0; }
.price .amt small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.price ul { padding-left: 18px; margin: 18px 0 24px; flex: 1; }
.price li { margin-bottom: 6px; }
.badge { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; background: var(--accent); color: #fff; padding: 3px 8px; border-radius: 999px; margin-left: 8px; vertical-align: 3px; }
.license { margin-top: 28px; max-width: 820px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; }
.license form { display: flex; gap: 8px; margin-top: 10px; }
.license input { flex: 1; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-family: var(--mono); }

.license-h { margin: 0; font-size: 18px; }
.license-sub { margin: 4px 0 0; }
.qa-h { margin-top: 48px; }

.btn.thanks-cta { width: auto; margin-top: 8px; padding: 14px 28px; }
.keybox { margin-top: 32px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.keyrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.keyrow code { font-family: var(--mono); font-size: 17px; font-weight: 700; letter-spacing: .04em; background: var(--paper); border: 1px dashed var(--line); border-radius: 8px; padding: 10px 14px; user-select: all; }

/* Legal pages */
.doc { padding: 56px 0 72px; }
.doc h1 { font-size: 38px; }
.doc h2 { font-size: 20px; margin: 32px 0 8px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--ink-2); }
.doc .updated { color: var(--muted); font-size: 14px; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.foot-nav a { color: var(--muted); text-decoration: none; }
.foot-nav a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .hero-in, .split { grid-template-columns: 1fr; }
  .work-in { grid-template-columns: 1fr; }
  .panel { position: static; max-height: none; }
  .steps { grid-template-columns: 1fr; }
  .finds { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: 1fr; }
  .nav a:not(:last-child) { display: none; }
}
