:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1c2330;
  --muted: #5d6879;
  --line: #dde2ea;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #e3f3f1;
  --warn-soft: #fff4d6;
  --warn-line: #e8c565;
  --diff: #fff1c2;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --surface: #171e26;
    --text: #e6eaf0;
    --muted: #9aa5b5;
    --line: #2a3441;
    --accent: #2bb5a8;
    --accent-ink: #062320;
    --accent-soft: #123430;
    --warn-soft: #3a3015;
    --warn-line: #7d6522;
    --diff: #4a3d12;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent); }
q { quotes: "\201C" "\201D"; }
.wrap { max-width: 980px; margin: 0 auto; padding-inline: 20px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
[hidden] { display: none !important; }
html[data-edition="pro"] [data-only="free"] { display: none !important; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.brand::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 3px; background: var(--accent); vertical-align: 0; }
nav { display: flex; gap: 18px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
nav a:hover { color: var(--text); }

/* hero */
.hero { padding-block: 48px 24px; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 16px; letter-spacing: -.01em; }
h2 { font-size: 1.5rem; margin: 0 0 16px; }
h3 { font-size: 1.1rem; margin: 0 0 10px; }
.lede { font-size: 1.12rem; max-width: 46em; margin: 0 0 12px; }
.privacy-line { color: var(--muted); margin: 0 0 24px; }
.lock { display: inline-block; width: 10px; height: 8px; border: 2px solid var(--accent); border-radius: 2px; position: relative; margin-right: 6px; top: 1px; }
.lock::before { content: ""; position: absolute; left: 0; top: -8px; width: 6px; height: 6px; border: 2px solid var(--accent); border-bottom: 0; border-radius: 5px 5px 0 0; }

.drop {
  border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 40px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop:focus-visible, .drop.over { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.drop-title { font-size: 1.15rem; font-weight: 600; margin: 0 0 6px; }
.drop p { margin: 0; }
.link { color: var(--accent); text-decoration: underline; }
.sample-line { margin: 12px 0 0; text-align: center; }
.status { min-height: 1.5em; margin: 12px 0 0; text-align: center; color: var(--muted); }
.status.error { color: #c0392b; }

/* buttons */
button, .button {
  font: inherit; font-size: .95rem; padding: 9px 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; display: inline-block;
}
button:hover, .button:hover { border-color: var(--accent); }
button:focus-visible, .button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
button:disabled { opacity: .45; cursor: not-allowed; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.ghost { background: transparent; }

/* results */
.results { padding-block: 8px 32px; }
/* Land below the sticky header when scrolled to. */
#results, #review, section[id] { scroll-margin-top: 72px; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sheet-pick { display: flex; gap: 8px; align-items: center; }
select { font: inherit; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.tile .n { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.tile .l { color: var(--muted); font-size: .88rem; }
.tile.hot { border-color: var(--accent); }
.notes { margin: 0 0 16px; padding-left: 20px; color: var(--muted); font-size: .92rem; }

.review { margin-top: 20px; }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bulk { display: flex; gap: 8px; flex-wrap: wrap; }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0; box-shadow: var(--shadow); }
.group.merge { border-color: var(--accent); }
.group-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--text); }
.badge.caution { background: var(--warn-soft); border: 1px solid var(--warn-line); }
.choice { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.choice label { padding: 6px 12px; cursor: pointer; font-size: .9rem; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice input:checked + span { font-weight: 700; color: var(--accent); }
.choice label:has(input:checked) { background: var(--accent-soft); }
.choice label:has(input:focus-visible) { outline: 3px solid var(--accent-soft); }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
th { font-weight: 600; color: var(--muted); font-size: .82rem; }
td.diff { background: var(--diff); }
td.rownum { color: var(--muted); }
.group table tr:last-child td { border-bottom: 0; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 8px 0; }
.invalid { margin: 20px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.invalid summary { cursor: pointer; font-weight: 600; }

.export { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.export-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.upsell { margin-top: 14px; padding: 14px; border-radius: 8px; background: var(--warn-soft); border: 1px solid var(--warn-line); }
.upsell p { margin: 0 0 10px; }

/* bands */
.band { padding-block: 40px; border-top: 1px solid var(--line); }
.steps { padding-left: 22px; max-width: 46em; }
.steps li { margin-bottom: 10px; }
.compare td:first-child { white-space: normal; min-width: 14em; }
.compare td:nth-child(3) { color: var(--accent); font-weight: 600; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 12px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.plan.pro { border-color: var(--accent); }
.plan ul { padding-left: 20px; }
.price { font-size: 1.8rem; font-weight: 700; margin: 0 0 6px; }
#faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 10px 0; }
#faq summary { cursor: pointer; font-weight: 600; }
#faq details p { margin: 10px 0 0; }
.foot { padding-block: 24px 40px; border-top: 1px solid var(--line); }

@media (max-width: 600px) {
  .hero { padding-block: 28px 16px; }
  .drop { padding: 28px 14px; }
  .group-head { align-items: flex-start; }
}
