/* Visual language: warm stone neutrals, coral for actions only, cream bands for hero and footer,
   pill-shaped controls, 24px panels, hairline borders instead of heavy shadows. System fonts only (CSP: no font hosts);
   Inter / DM Sans / Fragment Mono are used if the visitor already has them installed. */
:root {
  --bg: #f7f7f5;
  --surface: #fbfaf9;
  --surface-2: #f1f0ec;
  --band: #f1f2ea;
  --ink: #1c1917;
  --ink-2: #57534e;
  --muted: #79716b;
  --line: #e7e6e5;
  --line-strong: #d6d3d1;
  --accent: #e4544b;
  --accent-hover: #d4463d;
  --accent-text: #c9443a;
  --accent-ink: #ffffff;
  --accent-soft: #fbe9e6;
  --ok: #1d7348;
  --ok-soft: #e7f1ea;
  --ok-line: #c3dccb;
  --warn: #8f5200;
  --warn-soft: #fbf1de;
  --warn-line: #ead2a0;
  --bad: #b42318;
  --bad-soft: #fcebe8;
  --pos: #1d7348;
  --neg: #b42318;
  --radius: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --pill: 999px;
  --lift: 0 1px 2px rgba(28, 25, 23, 0.06);
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 4px 14px rgba(28, 25, 23, 0.04);
  --shadow-lg: 0 2px 4px rgba(28, 25, 23, 0.05), 0 16px 40px rgba(28, 25, 23, 0.12);
  --btn-grad: linear-gradient(180deg, #ea625a 0%, #e0493f 100%);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Circular", "DM Sans", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161412;
    --surface: #1d1a18;
    --surface-2: #26221f;
    --band: #1f1d18;
    --ink: #f5f3f0;
    --ink-2: #d6d3d1;
    --muted: #a8a29e;
    --line: #2e2a27;
    --line-strong: #423c38;
    --accent: #ef6a61;
    --accent-hover: #f47f77;
    --accent-text: #f58b83;
    --accent-ink: #ffffff;
    --accent-soft: #3a211e;
    --ok: #67c895;
    --ok-soft: #17291f;
    --ok-line: #24412f;
    --warn: #f0b85a;
    --warn-soft: #2c2314;
    --warn-line: #574219;
    --bad: #ff8d80;
    --bad-soft: #331b18;
    --pos: #67c895;
    --neg: #ff8d80;
    --lift: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.35), 0 20px 48px rgba(0, 0, 0, 0.45);
    --btn-grad: linear-gradient(180deg, #ef6a61 0%, #e2544a 100%);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 0.5em; color: var(--ink); }
h2 { font-size: clamp(1.75rem, 1.25rem + 1.6vw, 2.5rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0 0 1em; }
strong { color: var(--ink); }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 6px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); color: var(--ink); }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: var(--pill); z-index: 100; }
.skip:focus { left: 8px; }
ul.plain, ol.plain { list-style: none; padding: 0; margin: 0 0 1em; }
ol.plain { counter-reset: n; }
ol.plain li { counter-increment: n; padding-left: 2.2em; position: relative; margin-bottom: 0.5em; }
ol.plain li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: 0.2em; font-family: var(--mono); font-size: 0.78em; color: var(--accent-text); }
.ticks li { padding-left: 1.4em; position: relative; margin-bottom: 0.5em; }
.ticks li::before { content: ""; position: absolute; left: 0.1em; top: 0.68em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45em;
  padding: 0.66em 1.25em; border-radius: var(--pill);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 0.94rem; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: var(--lift);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.btn:hover { border-color: var(--muted); color: var(--ink); background: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--btn-grad); border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 1px 2px rgba(201, 68, 58, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { background: var(--accent-hover); border-color: transparent; color: var(--accent-ink); }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-sm { padding: 0.45em 0.95em; font-size: 0.86rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--band) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.55em; font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand svg { color: var(--accent); }
.brand:hover { color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 1.6em; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 720px) { .nav-links a { display: none; } }

/* Hero */
.hero {
  position: relative;
  padding: 72px 0 56px;
  text-align: center;
  background: linear-gradient(to bottom, var(--band) 0%, var(--band) 55%, var(--bg) 100%);
}
/* One quiet ledger-ruling pattern behind the hero, faded out at the edges. */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 35px, color-mix(in srgb, var(--line-strong) 45%, transparent) 35px 36px);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
}
.hero .wrap { position: relative; z-index: 1; }
.eyebrow { font-family: var(--mono); font-size: 0.76rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 1.4em; }
.hero h1 { font-size: clamp(2.3rem, 1.4rem + 3.9vw, 4.5rem); max-width: 17ch; text-wrap: balance; margin: 0 auto 0.4em; letter-spacing: -0.04em; line-height: 1.02; }
.sub { text-wrap: pretty; font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.2rem); color: var(--ink-2); max-width: 38em; margin: 0 auto 2.2em; }

.drop {
  max-width: 680px; margin: 0 auto;
  background: var(--surface);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 40px 24px 30px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.drop:hover, .drop:focus-visible { border-color: var(--accent); }
.drop.dragging { border-color: var(--accent); border-style: solid; background: var(--accent-soft); box-shadow: var(--shadow-lg); }
.drop-icon { margin: 0 auto 14px; color: var(--accent); }
.drop-title { font-family: var(--display); font-size: 1.3rem; font-weight: 700; color: var(--ink); margin: 0 0 0.25em; letter-spacing: -0.015em; }
.drop-hint { color: var(--muted); margin: 0 0 1.3em; }
.drop-hint .link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; font-weight: 600; }
.drop-lock { display: inline-flex; align-items: center; gap: 0.5em; font-size: 0.84rem; font-weight: 500; color: var(--ok); background: var(--ok-soft); border: 1px solid var(--ok-line); padding: 0.42em 0.95em; border-radius: var(--pill); margin: 0; }
.sample-row { margin: 16px 0 0; font-size: 0.92rem; color: var(--muted); }

.trust { list-style: none; padding: 0; margin: 30px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.trust li { display: inline-flex; align-items: center; gap: 0.7em; }
.trust li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.busy { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 680px; margin: 0 auto; padding: 46px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; color: var(--ink); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } html { scroll-behavior: auto; } }

.alert { max-width: 680px; margin: 16px auto 0; padding: 14px 20px; border-radius: var(--radius-md); text-align: left; border: 1px solid; }
.alert-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); color: var(--ink); }
.alert-warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--ink); }
.alert strong { display: block; margin-bottom: 0.2em; }
.alert p:last-child { margin-bottom: 0; }

/* Results */
.results { padding: 40px 0 64px; scroll-margin-top: 64px; }
.result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.r-file { font-size: 1.5rem; margin: 0 0 0.15em; word-break: break-word; }
.result-head p { margin: 0; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.02em; }

.status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 16px 22px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); margin-bottom: 16px; }
.status strong { font-family: var(--display); font-size: 1.1rem; letter-spacing: -0.01em; }
.status span { color: var(--ink-2); }
.status-ok { background: var(--ok-soft); border-color: var(--ok-line); }
.status-ok strong { color: var(--ok); }
.status-bad { background: var(--warn-soft); border-color: var(--warn-line); }
.status-bad strong { color: var(--warn); }
.status-unknown strong { color: var(--ink); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.stat { padding: 14px 20px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-label { display: block; font-family: var(--mono); font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.stat-value { display: block; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 1.15rem; font-weight: 600; color: var(--ink); margin-top: 4px; }
.stat-value.pos { color: var(--pos); }
.stat-value.neg { color: var(--neg); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

.warnings { list-style: none; padding: 0; margin: 0 0 16px; }
.warnings li { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: var(--radius-sm); padding: 10px 16px; margin-bottom: 8px; font-size: 0.92rem; color: var(--ink); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; }
.field { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 500; color: var(--ink-2); }
.field select, .col-row select {
  appearance: none; -webkit-appearance: none;
  padding: 0.4em 2.1em 0.4em 0.9em; border-radius: var(--pill); border: 1px solid var(--line-strong);
  background: var(--surface) no-repeat right 0.8em center / 10px 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2379716b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  font-weight: 500; color: var(--ink); box-shadow: var(--lift); cursor: pointer;
}
.field select:hover, .col-row select:hover { border-color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 500; cursor: pointer; color: var(--ink-2); }
.check input { width: 16px; height: 16px; border-radius: 4px; accent-color: var(--accent); }
.push { margin-left: auto; }

.table-wrap { overflow: auto; max-height: 560px; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); background: var(--surface); }
.tx { width: 100%; border-collapse: collapse; font-size: 0.9rem; color: var(--ink); }
.tx th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: left; font-family: var(--mono); font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tx td { padding: 3px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tx tbody tr:last-child td { border-bottom: 0; }
.tx tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.tx .num { text-align: right; }
.tx .c { text-align: center; width: 34px; }
.tx input { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 6px 7px; min-width: 0; }
.tx input:hover { border-color: var(--line-strong); }
.tx input:focus { border-color: var(--accent); background: var(--surface); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.tx input.invalid { border-color: var(--bad); background: var(--bad-soft); }
.tx .in-date { width: 112px; font-family: var(--mono); font-size: 0.84rem; }
.tx .in-desc { min-width: 220px; }
.tx .in-num { width: 118px; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.84rem; }
.tx .in-num.neg { color: var(--neg); }
.tx .in-num.pos { color: var(--pos); }
.tx tr.fail td, .tx tbody tr.fail:hover td { background: var(--warn-soft); }
.tx tr.fail td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.mark { font-weight: 700; font-size: 0.9rem; }
.mark-ok { color: var(--ok); }
.mark-fail { color: var(--warn); }
.mark-none { color: var(--line-strong); }
.del { border: 0; background: none; color: var(--muted); font-size: 1.15rem; line-height: 1; padding: 4px 9px; border-radius: var(--pill); cursor: pointer; }
.del:hover { color: var(--bad); background: var(--bad-soft); }
.add-row { margin-top: 12px; }
.empty-row td { text-align: center; color: var(--muted); padding: 24px; }

.exports { margin-top: 28px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.exports-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.exports h3 { margin: 0; font-size: 1.2rem; }
.export-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
#free-note { margin: 14px 0 0; }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section > .wrap > h2 { text-align: center; margin-bottom: 0.4em; }
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.split h2 { text-align: left !important; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.section-alt .card { background: var(--bg); }
.demo-status { display: grid; gap: 12px; }
.demo-status .status { margin: 0; flex-direction: column; gap: 2px; }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.steps li { border-top: 1px solid var(--line-strong); padding-top: 22px; }
.steps h3 { font-size: 1.2rem; }
.steps p { color: var(--ink-2); margin: 0; }
.step-n { display: block; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; color: var(--accent-text); margin-bottom: 14px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 28px; } }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px 0 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.plan ul { flex: 1; margin-bottom: 1.5em; }
.plan h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 0.78rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.8em; }
.price { font-family: var(--display); font-size: 2.9rem; font-weight: 700; color: var(--ink); letter-spacing: -0.04em; margin: 0 0 0.6em; line-height: 1; }
.price span { font-family: var(--font); font-size: 0.92rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan-featured { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.badge { font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.06em; color: var(--accent-text); background: var(--accent-soft); padding: 0.3em 0.8em; border-radius: var(--pill); white-space: nowrap; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.plans-compact { grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0 14px; }
.plans-compact .plan { padding: 20px; }
.plans-compact .price { font-size: 2.1rem; margin-bottom: 0.25em; }
@media (max-width: 520px) { .plans-compact { grid-template-columns: 1fr; } }

details { border-bottom: 1px solid var(--line); padding: 4px 0; }
details:first-of-type { border-top: 1px solid var(--line); margin-top: 28px; }
summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 16px 32px 16px 0; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.4rem; font-weight: 300; color: var(--muted); transition: transform 0.2s; }
summary:hover::after { color: var(--accent); }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--ink-2); padding-bottom: 8px; }

/* Guide pages */
.guide { padding: 64px 0 8px; }
.guide .prose { max-width: 760px; margin: 0 auto; }
.guide h2 { text-align: left; }
.guide ol, .guide ul { padding-left: 1.3em; }
.guide li { margin-bottom: 0.45em; }
.guide .note { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 14px 20px; margin: 1.4em 0; }

/* Footer */
.footer { padding: 56px 0 32px; background: linear-gradient(to bottom, var(--bg) 0, var(--band) 72px); }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; margin-bottom: 24px; }
.brand-sm { font-family: var(--display); font-weight: 700; color: var(--ink); margin-bottom: 0.3em; }
.footer-h { font-family: var(--mono); font-weight: 500; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.8em; }
.footer-links { columns: 3 180px; column-gap: 24px; font-size: 0.88rem; }
.footer-links li { margin-bottom: 0.4em; break-inside: avoid; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--accent-text); text-decoration: underline; }
.disclaimer { border-top: 1px solid var(--line); padding-top: 20px; margin: 0; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* Dialogs */
.dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-lg); }
.dialog::backdrop { background: rgba(28, 25, 23, 0.45); }
.dialog h2 { font-size: 1.5rem; padding-right: 30px; }
.dialog-close { position: absolute; top: 14px; right: 14px; margin: 0; }
.dialog-close button { border: 0; background: none; font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 11px 6px; border-radius: var(--pill); }
.dialog-close button:hover { background: var(--surface-2); color: var(--ink); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.license-form { display: flex; gap: 10px; margin: 16px 0 8px; }
.license-form input { flex: 1; min-width: 0; padding: 0.66em 1.1em; border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--bg); font-family: var(--mono); font-size: 0.86rem; box-shadow: var(--lift); }
.license-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.key-box { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin: 12px 0; }
.key-box code { flex: 1; background: none; padding: 0; word-break: break-all; font-size: 0.82rem; }
.columns-list { display: grid; gap: 10px; margin-top: 16px; }
.col-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.col-n { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.col-samples { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Simple pages */
.page { padding: 64px 0 80px; }
.page .prose { max-width: 760px; margin: 0 auto; }
.page h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); letter-spacing: -0.035em; }
.page h2 { font-size: 1.3rem; margin-top: 1.6em; }

@media print {
  .nav, .hero, .toolbar, .exports, .footer, .add-row, .del { display: none !important; }
  .table-wrap { max-height: none; overflow: visible; }
}

/* Product preview: what a finished conversion looks like */
.preview-section { padding: 8px 0 32px; }
.preview { max-width: 860px; margin: 0 auto; }
.pv-sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.pv-bar { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.76rem; color: var(--muted); }
.pv-file { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-file:last-child { color: var(--ink); }
.pv-to { color: var(--accent); }
.pv-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 14px 20px; background: var(--ok-soft); border-bottom: 1px solid var(--ok-line); }
.pv-status strong { color: var(--ok); font-family: var(--display); }
.pv-status span { color: var(--ink-2); font-size: 0.86rem; }
.pv-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; color: var(--ink); }
.pv-table th { text-align: left; font-family: var(--mono); font-size: 0.68rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 10px 20px; background: var(--surface-2); }
.pv-table td { padding: 10px 20px; border-top: 1px solid var(--line); white-space: nowrap; }
.pv-table td:first-child { font-family: var(--mono); color: var(--muted); }
.pv-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.pv-formats { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 20px; border-top: 1px solid var(--line); }
.pv-formats span { font-family: var(--mono); font-size: 0.72rem; padding: 0.3em 0.8em; border-radius: var(--pill); border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); }
@media (max-width: 720px) {
  .pv-table td:nth-child(4), .pv-table th:nth-child(4) { display: none; }
  .pv-table td, .pv-table th { padding-left: 14px; padding-right: 14px; }
  .pv-table td:nth-child(2) { white-space: normal; }
}
