/* Pikkola Diff — styles */

:root {
  --bg: #08090b;
  --bg-soft: #0b0d10;
  --surface: #0f1116;
  --surface-2: #12151b;
  --surface-3: #171b22;
  --border: rgba(255, 255, 255, .075);
  --border-mid: rgba(255, 255, 255, .11);
  --border-strong: rgba(255, 255, 255, .18);
  --text: #e9ecf1;
  --text-dim: #b6bcc6;
  --muted: #8d949f;
  --faint: #666e7a;
  --accent: #8f9bff;
  --accent-ink: #0a0b10;
  --accent-soft: rgba(143, 155, 255, .13);
  --good: #3ddc97;
  --good-bg: rgba(61, 220, 151, .13);
  --good-text: #a9f2d2;
  --warn: #efb45f;
  --warn-bg: rgba(239, 180, 95, .12);
  --warn-text: #f4d6a8;

  --add-bg: rgba(63, 185, 80, .14);
  --add-bg-strong: rgba(63, 185, 80, .34);
  --add-ink: #b7f2c4;
  --add-line: rgba(63, 185, 80, .28);
  --del-bg: rgba(248, 81, 73, .13);
  --del-bg-strong: rgba(248, 81, 73, .32);
  --del-ink: #ffc9c4;
  --del-line: rgba(248, 81, 73, .28);
  --empty-bg: rgba(255, 255, 255, .022);

  --shadow-card: 0 1px 0 rgba(255, 255, 255, .035) inset, 0 30px 60px -40px rgba(0, 0, 0, .9);
  --radius: 16px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial,
    "Apple SD Gothic Neo", "Noto Sans KR", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="light"] {
  --bg: #fbfbfc;
  --bg-soft: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fcfcfd;
  --surface-3: #f4f5f7;
  --border: rgba(12, 16, 26, .085);
  --border-mid: rgba(12, 16, 26, .13);
  --border-strong: rgba(12, 16, 26, .22);
  --text: #14171d;
  --text-dim: #3d434e;
  --muted: #646b77;
  --faint: #8b919c;
  --accent: #4f5bd5;
  --accent-soft: rgba(79, 91, 213, .09);
  --good: #109c68;
  --good-bg: rgba(16, 156, 104, .12);
  --good-text: #0a6b48;
  --warn: #b57612;
  --warn-bg: rgba(197, 138, 33, .14);
  --warn-text: #8a5a09;

  --add-bg: #e8f8ec;
  --add-bg-strong: #a9edbb;
  --add-ink: #0b5a25;
  --add-line: #b6e8c4;
  --del-bg: #fdeceb;
  --del-bg-strong: #ffc6c0;
  --del-ink: #8a1c16;
  --del-line: #f7c3bd;
  --empty-bg: rgba(12, 16, 26, .028);

  --shadow-card: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 24px 48px -36px rgba(12, 16, 26, .45);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(143, 155, 255, .11), transparent 70%),
    radial-gradient(700px 380px at 88% 4%, rgba(61, 220, 151, .045), transparent 70%);
}
[data-theme="light"] body::before {
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(79, 91, 213, .08), transparent 70%),
    radial-gradient(700px 380px at 88% 4%, rgba(16, 156, 104, .04), transparent 70%);
}

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; position: relative; z-index: 1; }
.narrow { width: min(760px, 100% - 40px); }

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.028em; line-height: 1.12; }
p { margin: 0; }
button { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

.visually-hidden {
  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: 12px; top: -60px; z-index: 60;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 60px; }

.brand { display: inline-flex; align-items: center; gap: 9px; letter-spacing: -0.02em; }
.brand-mark { width: 24px; height: 24px; color: var(--accent); flex: none; }
.brand-name { font-size: 16px; font-weight: 620; letter-spacing: -0.02em; }
.brand-tool {
  font-size: 12px; font-weight: 560; color: var(--muted); letter-spacing: .04em;
  padding: 2px 7px; border: 1px solid var(--border-mid); border-radius: 6px;
  text-transform: uppercase; line-height: 1.5;
}

.site-nav { display: flex; gap: 2px; margin-left: 4px; }
.site-nav a {
  font-size: 13.5px; color: var(--muted); padding: 7px 10px; border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.site-nav a:hover { color: var(--text); background: var(--surface-3); }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.lang-switch {
  display: flex; align-items: center; gap: 2px; padding: 3px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.lang-btn {
  border: 0; background: transparent; color: var(--muted);
  font-size: 12px; font-weight: 550; letter-spacing: .01em;
  padding: 4px 8px; border-radius: 7px; cursor: pointer; transition: .15s ease;
}
.lang-btn:hover { color: var(--text); }
.lang-btn[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 var(--border) inset; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim);
  border-radius: 10px; cursor: pointer; transition: .15s ease; flex: none;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.small { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn.small svg { width: 15px; height: 15px; }
.icon-btn:disabled { opacity: .4; cursor: default; }

.ico-sun { display: none; }
[data-theme="light"] .ico-sun { display: block; }
[data-theme="light"] .ico-moon { display: none; }

/* ---------- hero ---------- */

.hero { padding: 42px 0 20px; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 550;
}
.eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-bg); }
.hero h1 {
  margin-top: 13px; text-wrap: balance;
  font-size: clamp(1.95rem, 1.3rem + 2.6vw, 3.1rem);
  max-width: 24ch; letter-spacing: -0.035em;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-top: 14px; max-width: 72ch; color: var(--muted); font-size: 15px; }
.hero .lede b { color: var(--text-dim); font-weight: 550; }

/* ---------- tool card ---------- */

.tool-section { padding-top: 14px; }

.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 2;
}

.pane-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }

.pane { background: var(--surface); display: flex; flex-direction: column; min-width: 0; position: relative; }
.pane-head {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 14px;
  border-bottom: 1px solid var(--border); min-height: 46px;
}
.pane-label {
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
  font-weight: 600; white-space: nowrap;
}
.pane-dot { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.pane-dot.a { background: var(--del-line); }
.pane-dot.b { background: var(--add-line); }
.pane-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.chip {
  border: 0; background: transparent; color: var(--faint); cursor: pointer;
  font-size: 12px; font-weight: 520; padding: 4px 7px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 5px; transition: .15s ease; white-space: nowrap;
}
.chip:hover { color: var(--text); background: var(--surface-3); }
.chip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.pane textarea {
  display: block; width: 100%; border: 0; margin: 0; resize: vertical;
  min-height: 260px; height: 300px; max-height: 62vh;
  background: transparent; color: var(--text);
  font-family: var(--mono); font-size: 12.6px; line-height: 1.65; tab-size: 4;
  padding: 12px 14px; outline: none; caret-color: var(--accent);
  white-space: pre; overflow: auto;
}
.pane textarea::placeholder { color: var(--faint); }
.pane.drag { background: var(--accent-soft); }
.pane.drag::after {
  content: "+"; position: absolute; inset: 46px 0 0; display: grid; place-items: center;
  font-size: 28px; color: var(--accent); background: var(--accent-soft); pointer-events: none;
}
.pane-foot {
  display: flex; align-items: center; gap: 10px; padding: 6px 14px;
  border-top: 1px solid var(--border); font-size: 11.5px; color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.pane-foot .spacer { margin-left: auto; }

.actions-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px 14px; border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-3) 45%, transparent);
  border-radius: 0 0 var(--radius) var(--radius);
}
.actions-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 12px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface-3); color: var(--text-dim);
  font-size: 13px; font-weight: 540; cursor: pointer; transition: .15s ease; white-space: nowrap;
}
.btn:hover { color: var(--text); border-color: var(--border-strong); }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-3); }
.btn-primary { background: var(--text); color: var(--bg); border-color: transparent; font-weight: 600; padding-inline: 16px; }
.btn-primary:hover { color: var(--bg); opacity: .92; }
.btn-quiet { background: transparent; padding: 6px 9px; font-size: 12.5px; border-color: transparent; }
.btn-quiet:hover { background: var(--surface-3); }

.kbd {
  font-family: var(--mono); font-size: 10.5px; color: var(--faint);
  border: 1px solid var(--border-mid); border-bottom-width: 2px; border-radius: 5px;
  padding: 2px 5px; white-space: nowrap;
}
.drop-hint { font-size: 12px; color: var(--faint); margin-left: 4px; }

/* ---------- segmented ---------- */

.seg {
  display: inline-flex; padding: 2px; gap: 2px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 9px;
}
.seg button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 12px; font-weight: 550; padding: 5px 9px; border-radius: 7px;
  display: inline-flex; align-items: center; gap: 5px; transition: .15s ease; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 var(--border) inset; }
.seg svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; }

/* ---------- popover / options ---------- */

.popover {
  position: absolute; top: 56px; right: 14px; z-index: 30; width: 288px;
  background: var(--surface); border: 1px solid var(--border-mid); border-radius: 12px;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .75), 0 0 0 1px rgba(0, 0, 0, .2);
  padding: 8px;
}
.popover-title {
  font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint);
  font-weight: 600; padding: 6px 8px 8px;
}
.opt {
  display: flex; align-items: flex-start; gap: 10px; padding: 8px; border-radius: 8px;
  cursor: pointer; font-size: 13px; color: var(--text-dim);
}
.opt:hover { background: var(--surface-3); }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt .box {
  width: 16px; height: 16px; flex: none; margin-top: 2px; border-radius: 5px;
  border: 1px solid var(--border-strong); background: var(--surface-2);
  display: grid; place-items: center; transition: .12s ease;
}
.opt .box svg { width: 11px; height: 11px; stroke: var(--accent-ink); stroke-width: 2.6; fill: none; opacity: 0; }
.opt input:checked + .box { background: var(--accent); border-color: var(--accent); }
.opt input:checked + .box svg { opacity: 1; }
.opt input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.opt-text small { font-size: 11.5px; color: var(--faint); font-weight: 400; }
.popover-foot { border-top: 1px solid var(--border); margin-top: 6px; padding: 8px 8px 2px; font-size: 11.5px; color: var(--faint); }

/* ---------- result bar ---------- */

.result-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-3) 45%, transparent);
  border-radius: var(--radius) var(--radius) 0 0;
}
.stats { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stat {
  display: inline-flex; align-items: baseline; gap: 4px; font-size: 12px;
  padding: 3px 8px; border-radius: 7px; font-variant-numeric: tabular-nums;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  white-space: nowrap;
}
.stat b { font-weight: 600; font-size: 12.5px; }
.stat.add { color: var(--add-ink); background: var(--add-bg); border-color: var(--add-line); }
.stat.del { color: var(--del-ink); background: var(--del-bg); border-color: var(--del-line); }
.stat.mod { color: var(--warn-text); background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.result-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.nav-count {
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
  min-width: 44px; text-align: center;
}
.nav-group { display: inline-flex; align-items: center; gap: 1px; }

/* ---------- diff ---------- */

.diff-scroll {
  max-height: min(68vh, 760px); overflow: auto; background: var(--surface);
  border-radius: 0 0 var(--radius) var(--radius); scrollbar-width: thin;
  overscroll-behavior: contain;
}
.diff-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.diff-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
.diff-scroll::-webkit-scrollbar-track { background: transparent; }

.diff { font-family: var(--mono); font-size: 12.4px; line-height: 1.62; padding-block: 6px; }
.diff .row { display: flex; align-items: stretch; min-width: 0; }
.diff .cell { display: flex; align-items: flex-start; min-width: 0; }
.diff .no {
  flex: none; width: 4.2em; padding-right: .7em; text-align: right; color: var(--faint);
  user-select: none; font-variant-numeric: tabular-nums; font-size: 11.4px; line-height: 1.75;
}
.diff .tx { flex: 1 1 auto; min-width: 0; padding-right: 14px; }
.diff .tx, .diff .no { white-space: pre-wrap; overflow-wrap: anywhere; }

.diff.split .row { display: grid; grid-template-columns: 1fr 1fr; }
.diff.split .cell.a { border-right: 1px solid var(--border-mid); }
.diff.split .row.del .cell.b,
.diff.split .row.add .cell.a { background: var(--empty-bg); }
.diff.split .row.del .cell.a { background: var(--del-bg); }
.diff.split .row.add .cell.b { background: var(--add-bg); }
.diff.split .row.mod .cell.a { background: var(--del-bg); }
.diff.split .row.mod .cell.b { background: var(--add-bg); }
.diff.split .row.del .cell.a .tx { color: var(--del-ink); }
.diff.split .row.add .cell.b .tx { color: var(--add-ink); }
.diff.split .row.mod .cell.a .tx { color: var(--del-ink); }
.diff.split .row.mod .cell.b .tx { color: var(--add-ink); }

.diff.split.nowrap .row { display: grid; grid-template-columns: var(--wa) var(--wb); width: max-content; min-width: 100%; }
.diff.split.nowrap .tx { white-space: pre; overflow-wrap: normal; }

.diff.unified .row { display: grid; grid-template-columns: 4.4em 4.4em 2.2em 1fr; }
.diff.unified .no { width: auto; padding-right: .85em; }
.diff.unified .row:first-child .no:first-child { padding-left: 6px; }
.diff.unified .row.add { background: var(--add-bg); }
.diff.unified .row.del { background: var(--del-bg); }
.diff.unified .sign { text-align: center; color: var(--faint); user-select: none; }
.diff.unified .row.add .sign { color: var(--add-ink); }
.diff.unified .row.del .sign { color: var(--del-ink); }
.diff.unified .row.add .tx { color: var(--add-ink); }
.diff.unified .row.del .tx { color: var(--del-ink); }

.w-del { background: var(--del-bg-strong); border-radius: 3px; }
.w-add { background: var(--add-bg-strong); border-radius: 3px; }
.w-ws { box-shadow: inset 0 -2px 0 currentColor; border-radius: 2px; }

.diff .hunk {
  display: block; padding: 4px 14px; font-size: 11.4px; color: var(--faint);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface-2));
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  user-select: none;
}
.diff .gap { display: block; width: 100%; }
.diff .gap button {
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface-2));
  color: var(--muted); font: inherit; font-size: 11.6px; font-family: var(--mono);
  padding: 3px 14px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.diff .gap button:hover { color: var(--accent); background: var(--accent-soft); }
.diff .gap .g-ico { opacity: .7; margin-right: 6px; }

.diff .row.nl .tx { color: var(--faint); font-style: italic; }
.diff .row.flash { animation: flash 1.4s ease; }
@keyframes flash {
  0% { box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 100vmax rgba(143, 155, 255, .16); }
  100% { box-shadow: inset 3px 0 0 transparent, inset 0 0 0 100vmax rgba(143, 155, 255, 0); }
}

/* ---------- identical ---------- */

.identical { padding: 46px 24px 52px; text-align: center; }
.identical .tick {
  width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; background: var(--good-bg); color: var(--good);
  border: 1px solid color-mix(in srgb, var(--good) 30%, transparent);
}
.identical .tick svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.identical h3 { font-size: 18px; }
.identical p { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.identical .ws-note { margin-top: 10px; font-size: 12.5px; color: var(--warn-text); }
.identical .act { margin-top: 18px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.legend-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 9px 14px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--faint);
}
.legend-row .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend-row .sw { width: 9px; height: 9px; border-radius: 3px; }
.legend-row .sw.add { background: var(--add-bg-strong); }
.legend-row .sw.del { background: var(--del-bg-strong); }
.legend-row .priv { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.legend-row .priv svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.legend-row .legend-actions { display: inline-flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.legend-row .legend-actions .btn {
  font-size: 12px; padding: 5px 8px; color: var(--muted); background: transparent; border-color: transparent;
}
.legend-row .legend-actions .btn:hover { color: var(--text); background: var(--surface-3); }

.under-card { margin-top: 12px; font-size: 12px; color: var(--faint); text-align: center; }

/* ---------- sections ---------- */

.section { padding: 74px 0 0; }
.section .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 550;
}
.section h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); margin-top: 12px; max-width: 26ch; text-wrap: balance; }
.section .sub { margin-top: 12px; color: var(--muted); font-size: 14.5px; max-width: 74ch; }

.steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  margin-top: 30px; background: var(--border); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden;
}
.step { background: var(--surface); padding: 22px 22px 26px; }
.step-no { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: .1em; }
.step h3 { font-size: 15.5px; margin-top: 14px; letter-spacing: -0.015em; }
.step p { margin-top: 8px; font-size: 13.5px; color: var(--muted); line-height: 1.65; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 30px; }
.fcard {
  border: 1px solid var(--border); border-radius: 13px; background: var(--surface);
  padding: 18px 18px 20px;
}
.fcard .ic {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 12px;
}
.fcard .ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fcard h3 { font-size: 14.5px; letter-spacing: -0.01em; }
.fcard p { margin-top: 7px; font-size: 13px; color: var(--muted); line-height: 1.6; }

.note-block {
  margin-top: 26px; padding: 26px 28px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--bg-soft);
}
.note-block h3 { font-size: 15.5px; }
.note-block p { margin-top: 10px; font-size: 14px; color: var(--muted); max-width: 82ch; line-height: 1.7; }
.note-block p + p { margin-top: 10px; }
.note-block b { color: var(--text-dim); font-weight: 560; }

.faq-list { margin-top: 26px; border-top: 1px solid var(--border); }
.faq-list details { border-bottom: 1px solid var(--border); }
.faq-list summary {
  cursor: pointer; padding: 16px 30px 16px 2px; font-size: 14.5px; font-weight: 550;
  list-style: none; position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  color: var(--faint); font-size: 17px; font-weight: 400; transition: .2s ease;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list p { padding: 0 40px 18px 2px; color: var(--muted); font-size: 13.5px; line-height: 1.7; max-width: 92ch; }

/* ---------- footer ---------- */

.site-footer { margin-top: 84px; border-top: 1px solid var(--border); background: var(--bg-soft); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: flex-start; padding: 34px 0 40px; }
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-brand .brand-name { font-size: 14px; }
.footer-brand p { font-size: 12.5px; color: var(--faint); max-width: 34ch; }
.footer-col { display: flex; flex-direction: column; gap: 7px; }
.footer-col h4 {
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
  font-weight: 600; margin: 0 0 2px;
}
.footer-col a { font-size: 12.5px; color: var(--muted); }
.footer-col a:hover { color: var(--text); }
.footer-nav { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
.footer-fine { font-size: 12px; color: var(--faint); width: 100%; margin-top: 6px; }

.noscript {
  margin: 20px auto; max-width: 720px; padding: 12px 16px; font-size: 13px;
  border: 1px solid var(--warn-bg); background: var(--warn-bg); color: var(--warn-text);
  border-radius: 10px; text-align: center;
}

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 8px);
  background: var(--text); color: var(--bg); padding: 9px 14px; border-radius: 9px;
  font-size: 12.5px; font-weight: 550; z-index: 90; opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease; box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .6);
  max-width: min(90vw, 460px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- doc pages ---------- */

.doc { padding: 52px 0 0; max-width: 740px; }
.doc h1 { font-size: clamp(1.7rem, 1.3rem + 1.3vw, 2.3rem); }
.doc .updated { margin-top: 10px; font-size: 12.5px; color: var(--faint); }
.doc h2 { font-size: 15.5px; margin: 32px 0 8px; }
.doc p, .doc li { font-size: 14px; color: var(--text-dim); line-height: 1.75; }
.doc p + p { margin-top: 10px; }
.doc ul { margin: 10px 0 0; padding-left: 20px; }
.doc li + li { margin-top: 4px; }
.doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.doc .lede-doc { margin-top: 18px; font-size: 14.5px; color: var(--muted); }
.doc code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.lang-block[hidden] { display: none; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .site-nav { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 24px); }
  .header-inner { height: 54px; gap: 10px; }
  .brand-tool { display: none; }
  .hero { padding: 28px 0 14px; }
  .hero .lede { font-size: 14px; }
  .pane-grid { grid-template-columns: 1fr; }
  .pane textarea { min-height: 150px; height: 170px; max-height: 40vh; }
  .pane.a textarea { border-bottom: 1px solid var(--border); }
  .pane.b .pane-head { border-top: 1px solid var(--border); }
  .diff-scroll { max-height: none; }
  .diff { font-size: 11.8px; }
  .diff .no { width: 3.4em; }
  .result-tools { margin-left: 0; width: 100%; }
  .steps, .cards { grid-template-columns: 1fr; }
  .footer-nav { margin-left: 0; }
  .popover { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; }
  .drop-hint { display: none; }
  .section { padding-top: 56px; }
}

@media print {
  .site-header, .actions-bar, .result-tools, .legend-row, .site-footer, .section, .under-card { display: none !important; }
  .diff-scroll { max-height: none; overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
