:root {
  --ink: #0f1a1a; --muted: #5b6b6a; --line: #dfe6e4; --paper: #f6f8f7; --card: #ffffff;
  --brand: #0b3b36; --accent: #0e8a6d; --accent-soft: #e3f4ee; --warn: #b45309; --warn-soft: #fef3c7; --bad: #b42318; --bad-soft: #fee4e2;
  --radius: 14px; --shadow: 0 1px 2px rgba(15, 26, 26, .06), 0 8px 24px rgba(15, 26, 26, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--paper); }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.015em; }
.muted { color: var(--muted); } .small { font-size: 13px; }
[hidden] { display: none !important; }

.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 48px); background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--brand); text-decoration: none; }
.nav nav { display: flex; align-items: center; gap: clamp(10px, 2vw, 24px); flex-wrap: wrap; }
.nav nav a { color: var(--ink); text-decoration: none; font-size: 14px; }
.nav nav a:hover { color: var(--accent); }

.btn { appearance: none; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-weight: 600; font-size: 15px; padding: 10px 18px; border-radius: 10px; cursor: pointer; transition: filter .15s, transform .05s; }
.btn:hover { filter: brightness(1.07); } .btn:active { transform: translateY(1px); }
.btn:focus-visible, .drop:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(14, 138, 109, .35); outline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn.ghost:hover { background: var(--accent-soft); filter: none; }
.btn.dark { background: var(--brand); border-color: var(--brand); }
.btn.small { font-size: 13px; padding: 7px 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 48px); max-width: 1240px; margin: 0 auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: 12px; font-weight: 700; color: var(--accent); margin: 0 0 14px; }
h1 { font-size: clamp(30px, 4.4vw, 50px); font-weight: 750; }
.accent { color: var(--accent); }
.lede { font-size: clamp(16px, 1.5vw, 18px); color: #2e3d3c; margin: 18px 0 18px; max-width: 58ch; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { padding-left: 28px; position: relative; color: #2e3d3c; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 12px; display: grid; place-items: center; margin-top: 2px; }

.hero-tool { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); }
.drop { border: 2px dashed #b9c9c5; border-radius: var(--radius); padding: 38px 18px; text-align: center; color: var(--brand); background: #fbfdfc; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-title { font-weight: 700; font-size: 18px; margin: 10px 0 2px; } .drop-sub { margin: 0; color: var(--muted); }
.link { color: var(--accent); text-decoration: underline; }
.drop-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.lock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.status { min-height: 22px; margin: 12px 2px 0; font-size: 14px; color: var(--muted); } .status.bad { color: var(--bad); }
.pw { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--warn-soft); font-size: 14px; }
.row { display: flex; gap: 8px; align-items: center; } .row.gap { gap: 10px; flex-wrap: wrap; } .row.end { justify-content: flex-end; }
input[type=text], input[type=password], textarea, select { font: inherit; font-size: 14px; padding: 9px 11px; border: 1px solid #c6d2cf; border-radius: 9px; background: #fff; color: var(--ink); width: 100%; }
.pw input { margin-top: 6px; } .err { color: var(--bad); font-size: 13px; margin: 8px 0 0; }

.result { max-width: 1240px; margin: 0 auto clamp(24px, 4vw, 48px); padding: 0 clamp(16px, 4vw, 48px); }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.result-head h2 { font-size: 22px; word-break: break-word; } .result-head p { margin: 4px 0 0; }
.badge { padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.badge.ok { background: var(--accent-soft); color: #0a6b54; } .badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.bad { background: var(--bad-soft); color: var(--bad); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.card .k { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); } .card .v { font-size: 20px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.warnings { margin-top: 12px; display: grid; gap: 8px; }
.warnings p { margin: 0; padding: 10px 14px; background: var(--warn-soft); color: #7a3d06; border-radius: 10px; font-size: 14px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 12px; }
.exports { display: flex; gap: 10px; flex-wrap: wrap; }
.check { font-size: 14px; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }

.tally { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.tally-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tally label { font-size: 13px; font-weight: 600; color: #2e3d3c; display: grid; gap: 5px; }
.tally h3 { font-size: 15px; margin: 18px 0 10px; } .tally h3 .muted { font-weight: 400; font-size: 13px; margin-left: 6px; }
.rules { display: grid; gap: 8px; margin-bottom: 10px; }
.rule { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 150px 36px; gap: 8px; align-items: center; }
.rule button { border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; border-radius: 8px; height: 36px; }
.rule button:hover { background: var(--bad-soft); color: var(--bad); }
.tally-actions { margin-top: 16px; }

.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; max-height: 70vh; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid #edf1f0; vertical-align: top; }
thead th { position: sticky; top: 0; background: #f0f4f3; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); z-index: 1; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.date { white-space: nowrap; font-variant-numeric: tabular-nums; } td.narr { min-width: 260px; max-width: 460px; word-break: break-word; } td.ref { color: var(--muted); white-space: nowrap; } td.led { color: var(--brand); white-space: nowrap; }
td.dr { color: #9a2c1f; } td.cr { color: #0a6b54; }
tr.review td { background: #fffaf0; }
.ok-tick { color: var(--accent); font-weight: 800; }
.flag { display: inline-flex; align-items: center; gap: 6px; color: var(--warn); font-weight: 700; white-space: nowrap; }
.swap { border: 1px solid #e5cfa0; background: #fff; color: var(--warn); border-radius: 7px; cursor: pointer; font-size: 13px; padding: 2px 7px; }

.band { padding: clamp(36px, 6vw, 64px) clamp(16px, 4vw, 48px); } .band > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.band.alt { background: var(--card); border-block: 1px solid var(--line); }
.band h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 22px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.steps > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps .n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 12px; }
.steps h3 { font-size: 18px; margin-bottom: 6px; } .steps p { margin: 0; color: #2e3d3c; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; } .two p { margin: 0; font-size: 17px; color: #2e3d3c; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; max-width: 820px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.plan.pro { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.plan h3 { font-size: 18px; } .price { font-size: 34px; font-weight: 750; margin: 8px 0 12px; } .price small { font-size: 15px; font-weight: 500; color: var(--muted); } .price s { font-size: 16px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.plan ul { padding-left: 20px; margin: 0 0 16px; display: grid; gap: 6px; color: #2e3d3c; }
#buyBox p { margin: 8px 0 0; font-size: 14px; }
details { border-bottom: 1px solid var(--line); padding: 14px 0; } summary { font-weight: 650; cursor: pointer; font-size: 17px; } details p { margin: 10px 0 0; color: #2e3d3c; max-width: 80ch; }
.foot { padding: 28px clamp(16px, 4vw, 48px); color: var(--muted); font-size: 13px; text-align: center; } .foot p { max-width: 900px; margin: 6px auto; }
dialog { border: 0; border-radius: 16px; padding: 24px; width: min(520px, 92vw); box-shadow: 0 24px 80px rgba(0, 0, 0, .3); } dialog::backdrop { background: rgba(15, 26, 26, .45); }
dialog h3 { font-size: 20px; margin-bottom: 6px; } dialog textarea { margin: 10px 0; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }

.guide { max-width: 800px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 32px); }
.guide h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; } .guide h2 { font-size: 22px; margin: 32px 0 10px; } .guide li { margin: 6px 0; }
.guide code, .guide kbd { background: #e9efed; padding: 1px 6px; border-radius: 5px; font-size: 14px; }
.guide .note { background: var(--warn-soft); padding: 12px 16px; border-radius: 10px; }
.guide .cta { display: inline-block; margin-top: 8px; text-decoration: none; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .nav nav a { display: none; }
  .rule { grid-template-columns: 1fr 1fr; }
  th, td { padding: 8px; }
}
