/* ==========================================================================
   ImJenny Studio — calm document studio
   Warm paper, ink type, one vermilion accent. System fonts only (strict CSP,
   no third-party font hosts), monospace reserved for code and figures.
   ========================================================================== */

:root {
  --bg: #F7F6F2;
  --surface: #FFFFFF;
  --surface-2: #F2F0EA;
  --surface-3: #EAE7DF;
  --ink: #1A1917;
  --ink-2: #45433E;
  --muted: #77746C;
  --line: #E5E2D9;
  --line-strong: #D2CEC3;
  --accent: #D9472B;
  --accent-ink: #B5391F;
  --accent-soft: #FCEBE6;
  --ok: #1E7A4C;
  --ok-soft: #E4F2EA;
  --warn: #8F5B00;
  --warn-soft: #FBF1DB;
  --err: #B42318;
  --err-soft: #FDECEA;

  --font-sans: system-ui, -apple-system, 'Segoe UI Variable Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --font-mono: 'Cascadia Mono', 'Cascadia Code', Consolas, 'SF Mono', Menlo, 'Roboto Mono', 'Liberation Mono', monospace;

  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(26, 25, 23, 0.05);
  --shadow: 0 1px 2px rgba(26, 25, 23, 0.04), 0 10px 30px -18px rgba(26, 25, 23, 0.25);
  --container: 1160px;
  --gutter: 24px;
  --header-h: 64px;
}

:lang(zh-Hant) { --font-sans: system-ui, -apple-system, 'PingFang TC', 'Noto Sans TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', 'Segoe UI', sans-serif; }
:lang(ja) { --font-sans: system-ui, -apple-system, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic UI', Meiryo, 'Segoe UI', sans-serif; }
:lang(ko) { --font-sans: system-ui, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Segoe UI', sans-serif; }
/* Break Japanese between phrases (Chrome) and Korean between words, never mid-phrase. */
:lang(ja) { word-break: auto-phrase; overflow-wrap: break-word; }
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p a, li a, .prose a, .link { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
p a:hover, li a:hover, .prose a:hover, .link:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; font-weight: 650; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
code, kbd, pre, .mono { font-family: var(--font-mono); font-size: 0.92em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 16px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 28px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.spacer { flex: 1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 246, 242, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 680; letter-spacing: -0.01em; font-size: 17px; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; flex: none; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { padding: 7px 12px; border-radius: 8px; color: var(--ink-2); font-size: 15px; }
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a[aria-current='page'] { color: var(--ink); background: var(--surface-3); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.credit-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); padding: 6px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.credit-chip b { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Language menu: <details>, no script needed */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-size: 14px; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover, .lang-menu[open] > summary { background: var(--surface-2); color: var(--ink); }
.lang-menu svg { width: 16px; height: 16px; }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; min-width: 168px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.lang-menu li a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 7px; font-size: 14px; }
.lang-menu li a:hover { background: var(--surface-2); }
.lang-menu li a[aria-current='true'] { font-weight: 650; }
.lang-menu li a[aria-current='true']::after { content: '✓'; color: var(--accent); }

.header-actions .menu-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 15px; line-height: 1; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #33312D; border-color: #33312D; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Generic blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 24px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent-ink); letter-spacing: 0.02em; }
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 99px; background: var(--accent); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-err { background: var(--err-soft); color: var(--err); }
.notice { padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.notice-ok { background: var(--ok-soft); border-color: #C7E3D3; color: #155B38; }
.notice-warn { background: var(--warn-soft); border-color: #F0DDB1; color: #6E4600; }
.notice-err { background: var(--err-soft); border-color: #F5C9C4; color: #8A1C13; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 34px); }
.section-head p { margin-top: 10px; color: var(--ink-2); font-size: 17px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5.2vw, 58px); letter-spacing: -0.03em; line-height: 1.05; margin-top: 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
:lang(ja) .hero h1 { font-size: clamp(30px, 5.2vw, 58px); }
.hero .lead { margin-top: 20px; font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 560px; }
.hero .row { margin-top: 30px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 15px; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points svg { width: 18px; height: 18px; color: var(--ok); }

.hero-visual { position: relative; }
.mini-window { border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.mini-window-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mini-window-bar span { width: 10px; height: 10px; border-radius: 99px; background: var(--line-strong); }
.mini-window-body { padding: 18px; display: grid; gap: 12px; }
.mini-file { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.mini-file .ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.mini-file .ico svg { width: 20px; height: 20px; }
.mini-file b { display: block; font-size: 14.5px; font-weight: 600; }
.mini-file small { color: var(--muted); font-size: 13px; }
.mini-ok { width: 26px; height: 26px; border-radius: 99px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.mini-ok svg { width: 15px; height: 15px; }
.mini-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.mini-bar i { display: block; height: 100%; width: 38%; background: var(--ok); border-radius: inherit; }
.mini-foot { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); }
.mini-foot b { color: var(--ok); }

/* ---------- Tool grid ---------- */
.tool-groups { display: grid; gap: 36px; }
.tool-group h3 { font-size: 14px; font-weight: 650; color: var(--muted); letter-spacing: 0.02em; margin-bottom: 14px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tool-card { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.tool-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.tool-card .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); }
.tool-card:hover .ico { background: var(--accent-soft); color: var(--accent-ink); }
.tool-card .ico svg { width: 22px; height: 22px; }
.tool-card b { display: block; font-weight: 620; font-size: 16px; color: var(--ink); }
.tool-card span { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ---------- Steps / features ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 99px; background: var(--ink); color: #fff; font-weight: 650; font-size: 14px; margin-bottom: 16px; }
.step h3 { font-size: 18px; }
.step p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.feature .ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 14px; }
.feature .ico svg { width: 21px; height: 21px; }
.feature h3 { font-size: 18px; }
.feature p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }

.band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 32px; border-radius: var(--radius-lg); background: var(--ink); color: #F4F2EC; }
.band h2 { font-size: clamp(22px, 2.6vw, 28px); color: #fff; }
.band p { margin-top: 8px; color: #C9C5BA; }
.band code { background: rgba(255,255,255,.08); padding: 2px 6px; border-radius: 6px; color: #fff; }
.band .btn { background: #fff; color: var(--ink); border-color: #fff; }
.band .btn:hover { background: #ECE9E1; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 0 16px; color: var(--ink-2); }

/* ---------- Page head ---------- */
.page-head { padding: 56px 0 28px; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 46px); letter-spacing: -0.025em; margin-top: 14px; }
.page-head p.lead { margin-top: 14px; font-size: 18px; color: var(--ink-2); max-width: 680px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }

/* ---------- Workbench ---------- */
.tool-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 28px; align-items: start; padding-bottom: 72px; }
.tool-rail { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 18px; }
.tool-rail h4 { font-size: 12.5px; font-weight: 650; color: var(--muted); letter-spacing: 0.03em; margin: 0 0 6px 10px; text-transform: uppercase; }
.tool-rail a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; font-size: 14.5px; color: var(--ink-2); }
.tool-rail a svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.tool-rail a:hover { background: var(--surface-2); color: var(--ink); }
.tool-rail a[aria-current='page'] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); border: 1px solid var(--line); padding: 7px 9px; }
.tool-rail a[aria-current='page'] svg { color: var(--accent); }
.field.tool-switch { display: none; }

.tool-main { min-width: 0; }
.tool-head h1 { font-size: clamp(28px, 3.6vw, 38px); letter-spacing: -0.025em; margin-top: 12px; }
.tool-head p { margin-top: 10px; color: var(--ink-2); font-size: 17px; max-width: 720px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 6px 12px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 13.5px; font-weight: 600; }
.privacy-pill svg { width: 16px; height: 16px; }

.wb { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.wb-input { padding: 22px; min-width: 0; }
.wb-side { padding: 22px; border-left: 1px solid var(--line); background: #FBFAF7; display: flex; flex-direction: column; gap: 16px; }
.wb-side h3 { font-size: 15px; }
.dropzone { position: relative; display: grid; place-items: center; text-align: center; gap: 6px; padding: 36px 18px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--bg); cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--accent-ink); margin-bottom: 6px; }
.dropzone .ico svg { width: 24px; height: 24px; }
.dropzone strong { font-size: 16px; font-weight: 620; }
.dropzone span { color: var(--muted); font-size: 14px; }
.wb-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.wb-tools .count { margin-left: auto; font-size: 13.5px; color: var(--muted); }
.file-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.file-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14.5px; }
.file-list .idx { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.file-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .size { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.file-list button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.file-list button:hover { background: var(--surface-2); color: var(--err); }
.upsell { font-size: 13.5px; color: var(--ink-2); padding: 10px 12px; border-radius: 10px; background: var(--surface-2); margin-top: 12px; }
.upsell a { color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.field { display: grid; gap: 6px; }
.field > span, .field > label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12.5px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.field-link { font-size: 13px; font-weight: 500; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.input, .select, .field input[type='text'], .field input[type='number'], .field input[type='email'], .field input[type='password'], .field select {
  width: 100%; min-height: 42px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .input:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(217, 71, 43, 0.14); }
.field input[type='range'] { width: 100%; accent-color: var(--accent); }
.field.check { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.field.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.controls { display: grid; gap: 14px; }
.wb-side .btn-run { margin-top: auto; }
.wb-note { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.wb-note svg { width: 14px; height: 14px; color: var(--ok); }

.result { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.result-empty { padding: 18px 22px; color: var(--muted); font-size: 15px; }
.result-body { padding: 22px; display: grid; gap: 16px; }
.result-body .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.result-body .stat { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); }
.result-body .stat span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.result-body .stat b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.result-body .stat.good b { color: var(--ok); }
.result-body .error { color: var(--err); background: var(--err-soft); padding: 12px 14px; border-radius: 10px; }
.result-body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.result-body th, .result-body td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.result-body th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.result-body .preview { display: flex; flex-wrap: wrap; gap: 10px; }
.result-body .preview img, .result-body .preview canvas { max-height: 220px; width: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.result-body .notes { color: var(--ink-2); font-size: 14.5px; }
.busy { display: inline-flex; align-items: center; gap: 8px; }
.spinner { width: 18px; height: 18px; border-radius: 99px; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.tool-about { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.tool-about h2 { font-size: 20px; }
.tool-about p, .tool-about li { color: var(--ink-2); font-size: 15.5px; }
.tool-about ul, .tool-about ol { margin: 10px 0 0; padding-left: 20px; }
.tool-about li + li { margin-top: 6px; }

/* ---------- Pricing ---------- */
.price-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 28px; }
.free-card { padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.free-card h2, .free-card h3 { font-size: 20px; }
.free-card .price { font-size: 32px; font-weight: 700; margin-top: 6px; }
.checklist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; color: var(--ink-2); font-size: 15px; }
.checklist svg { width: 18px; height: 18px; margin-top: 3px; color: var(--ok); }
.packs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pack { position: relative; display: flex; flex-direction: column; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.pack.featured { border: 2px solid var(--ink); padding: 21px; box-shadow: var(--shadow); }
.pack .badge:not(.bonus) { position: absolute; top: -12px; left: 20px; background: var(--ink); color: #fff; }
.pack h3 { font-size: 17px; }
.pack .price { margin-top: 12px; font-size: 38px; font-weight: 720; letter-spacing: -0.03em; line-height: 1; }
.pack .price small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.pack .credits { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.pack .credits b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pack .bonus { margin-top: 6px; display: inline-flex; align-self: flex-start; }
.pack .checklist { margin: 16px 0 20px; }
.pack .checklist li { font-size: 14px; }
.pack .btn { margin-top: auto; }
.custom-buy { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 22px 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.custom-buy h3 { font-size: 18px; }
.custom-buy p { margin-top: 4px; color: var(--ink-2); font-size: 15px; }
.custom-form { display: flex; gap: 10px; align-items: center; }
.money-input { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); padding-left: 12px; min-height: 42px; }
.money-input span { color: var(--muted); }
.money-input input { width: 90px; border: 0; background: transparent; min-height: 40px; padding: 0 10px 0 4px; font-variant-numeric: tabular-nums; }
.money-input input:focus { outline: none; }
.custom-form output { font-size: 14px; color: var(--muted); white-space: nowrap; }
.pay-note { margin-top: 18px; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.pay-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.explain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.explain .card { padding: 20px; }
.explain h3 { font-size: 16px; }
.explain p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }

/* ---------- Auth & account ---------- */
.auth-wrap { max-width: 440px; margin: 56px auto 80px; }
.auth-card { padding: 28px; }
.auth-card h1 { font-size: 26px; }
.auth-card .sub { margin-top: 6px; color: var(--ink-2); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 11px; background: var(--surface-2); margin: 22px 0 18px; }
.tabs button { border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.tabs button[aria-selected='true'] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.form { display: grid; gap: 14px; }
.form-error { color: var(--err); font-size: 14px; }
.form-ok { color: var(--ok); font-size: 14px; }
.auth-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.linkbtn { border: 0; background: transparent; padding: 0; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 600; }

.account-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.account-grid .card { padding: 22px; }
.account-grid h2 { font-size: 15px; color: var(--muted); font-weight: 600; }
.big-num { font-size: 40px; font-weight: 720; letter-spacing: -0.03em; line-height: 1.05; margin-top: 8px; font-variant-numeric: tabular-nums; }
.big-num-sm { font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin-top: 14px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.key-box { margin-top: 12px; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-family: var(--font-mono); font-size: 13.5px; word-break: break-all; }
.key-box code { flex: 1; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.table th, table.table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.table th { font-size: 13px; color: var(--muted); font-weight: 600; }
table.table td.mono { font-size: 13px; }
table.table tr:last-child td { border-bottom: 0; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-title h2 { font-size: 17px; }

/* ---------- Result page (/billing/complete) ---------- */
.result-shell { min-height: 100vh; display: flex; flex-direction: column; }
.result-top { padding: 20px 0; }
.result-center { flex: 1; display: grid; place-items: center; padding: 24px 0 64px; }
.result-card { width: 100%; max-width: 520px; padding: 36px 32px; text-align: center; }
.status-icon { width: 64px; height: 64px; border-radius: 99px; margin: 0 auto; display: grid; place-items: center; }
.status-icon svg { width: 30px; height: 30px; }
.status-ok { background: var(--ok-soft); color: var(--ok); }
.status-wait { background: var(--warn-soft); color: var(--warn); }
.status-err { background: var(--err-soft); color: var(--err); }
.status-idle { background: var(--surface-2); color: var(--ink-2); }
.result-card h1 { margin-top: 20px; font-size: 28px; letter-spacing: -0.02em; }
.result-card .sub { margin-top: 10px; color: var(--ink-2); font-size: 16px; }
.result-card .summary { margin: 24px 0 0; padding: 16px 18px; border-radius: var(--radius); background: var(--surface-2); text-align: left; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14.5px; }
.result-card .summary dt { color: var(--muted); }
.result-card .summary dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 550; }
.result-card .actions { margin-top: 24px; display: grid; gap: 10px; }
.result-card .reasons { margin: 18px 0 0; padding: 0 0 0 18px; text-align: left; color: var(--ink-2); font-size: 15px; }
.result-card .fine { margin-top: 22px; font-size: 13px; color: var(--muted); }
.result-foot { padding: 20px 0 28px; text-align: center; font-size: 13px; color: var(--muted); }
.result-foot a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Docs & legal ---------- */
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; padding-bottom: 80px; }
.docs-nav { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 2px; }
.docs-nav a { padding: 6px 10px; border-radius: 8px; font-size: 14.5px; color: var(--ink-2); }
.docs-nav a:hover { background: var(--surface-2); color: var(--ink); }
.prose { max-width: 760px; font-size: 16px; }
.prose h2 { font-size: 24px; margin: 44px 0 12px; padding-top: 4px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 4px; }
.prose code { overflow-wrap: anywhere; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: 0.88em; color: var(--ink); }
.prose pre { margin: 0 0 18px; padding: 16px 18px; border-radius: var(--radius); background: #1C1B19; color: #EDEAE2; overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; font-size: 13px; }
.prose .notice { margin: 0 0 18px; }
.lang-note { margin-bottom: 24px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 32px; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-grid p { color: var(--muted); margin-top: 12px; max-width: 360px; }
.footer-grid h4 { font-size: 13px; color: var(--muted); font-weight: 650; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--ink-2); }
.footer-grid a:hover { color: var(--ink); }
.footer-legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: grid; gap: 6px; }

/* ---------- Mock cashier (local only) ---------- */
.mock-shell { max-width: 520px; margin: 56px auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wb { grid-template-columns: 1fr; }
  .wb-side { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero { padding: 48px 0 40px; }
  .tool-layout { grid-template-columns: 1fr; }
  .tool-rail { display: none; }
  .field.tool-switch { display: grid; margin-top: 18px; }
  .steps, .features, .explain, .account-grid { grid-template-columns: 1fr; }
  .price-intro { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); }
  .docs-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .band { grid-template-columns: 1fr; }
  .tool-about { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .header-actions .menu-toggle { display: inline-flex; }
  .site-header.menu-open .site-nav { display: grid; position: absolute; left: 0; right: 0; top: var(--header-h); background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px var(--gutter) 14px; gap: 2px; box-shadow: var(--shadow); }
  .site-header.menu-open .site-nav a { padding: 12px 10px; font-size: 16px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 58px; }
  .section { padding: 52px 0; }
  .header-inner { gap: 10px; }
  .brand span { font-size: 16px; }
  .credit-chip { display: none; }
  .header-actions .btn-signin { padding: 0 10px; }
  .lang-menu .lang-label { display: none; }
  .tool-grid { grid-template-columns: 1fr; }
  .packs { grid-template-columns: 1fr; }
  .pack .badge { left: 16px; }
  .custom-buy { grid-template-columns: 1fr; }
  .custom-form { flex-wrap: wrap; }
  .result-body .stats { grid-template-columns: 1fr 1fr; }
  .result-card { padding: 28px 20px; }
  .wb-input, .wb-side { padding: 16px; }
  .file-list li { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .file-list .size { display: none; }
  .hero .row .btn { flex: 1 1 auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .table-wrap table.table th, .table-wrap table.table td { padding: 10px; }
  .auth-wrap { margin: 28px auto 56px; }
}
