:root {
  --ink: #1b1f24;
  --muted: #5b6470;
  --line: #d9dee4;
  --bg: #f6f7f9;
  --brand: #0b5c4a;
  --warn-bg: #fff4d6;
  --warn-line: #e0b84a;
  --down: #b42318;
  --down-bg: #fdecea;
  --up: #146c2e;
  --up-bg: #e8f5ec;
  --new: #1d4ed8;
  --new-bg: #e8efff;
  --verify-bg: #fff8e1;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: #fff; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { color: var(--brand); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
.small { font-size: 0.85rem; }
.muted { color: var(--muted); }
.hint { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.site-header { background: var(--brand); color: #fff; padding: 36px 0 28px; }
.site-header h1 { margin: 4px 0 8px; font-size: 2rem; }
.eyebrow { margin: 0; font-weight: 600; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.8rem; }
.lede { max-width: 760px; margin: 0; }
.badges { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { background: rgba(255, 255, 255, 0.15); border-radius: 999px; padding: 4px 12px; font-size: 0.85rem; }

section { margin: 28px 0; }
h2 { font-size: 1.3rem; margin: 0 0 10px; }

.disclaimer { border: 2px solid var(--warn-line); background: var(--warn-bg); border-radius: 8px; padding: 14px 18px; }
.disclaimer h2 { font-size: 1.05rem; margin-bottom: 4px; }
.disclaimer p { margin: 0; }
.banner { border-left: 4px solid var(--down); background: var(--down-bg); padding: 10px 14px; border-radius: 4px; font-weight: 600; }

textarea { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 0.9rem; padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.drop { margin-top: 12px; border: 2px dashed var(--line); border-radius: 8px; padding: 12px 16px; background: var(--bg); }
.drop.over { border-color: var(--brand); }
.drop p { margin: 4px 0; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
button, .button, select { font: inherit; padding: 8px 16px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; }
button.primary, .button.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.status { min-height: 1.5em; color: var(--muted); }
.status.error { color: var(--down); }

.summary { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; min-width: 120px; }
.chip .n { display: block; font-size: 1.4rem; font-weight: 700; }
.chip .l { font-size: 0.8rem; color: var(--muted); }
.chip.decrease, .chip.removed-ntgc { border-color: var(--down); }
.chip.new { border-color: var(--new); }
.chip.increase { border-color: var(--up); }
.chip.changed, .chip.removed-banned, .chip.notation { border-color: var(--warn-line); }
.chip.verify { border-color: var(--warn-line); }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
th { background: var(--bg); position: sticky; top: 0; }
tr.change-decrease td.change, tr.change-removed-ntgc td.change { color: var(--down); font-weight: 600; }
tr.change-increase td.change { color: var(--up); font-weight: 600; }
tr.change-new td.change { color: var(--new); font-weight: 600; }
tr.is-verify { background: var(--verify-bg); }
.tag { display: inline-block; border-radius: 4px; padding: 1px 6px; font-size: 0.8rem; white-space: nowrap; }
.tag-ok { background: var(--up-bg); color: var(--up); }
.tag-verify { background: var(--warn-bg); color: #7a5a00; }
.tag-none { background: var(--bg); color: var(--muted); }
.note { margin-top: 4px; color: var(--muted); }

.offer { border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px; background: var(--bg); }
.offer ul { padding-left: 20px; }
.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 16px 0 32px; color: var(--muted); }

.print-only { display: none; }

@media print {
  body { font-size: 10pt; }
  .site-header, .tool, .no-print { display: none !important; }
  .print-only { display: block; }
  .print-disclaimer { border: 1px solid #000; padding: 6px 8px; margin-bottom: 8px; font-weight: 600; }
  .disclaimer { display: none; }
  #dataset-banner:not([hidden]) { display: block; border: 1px solid #000; background: none; }
  .table-wrap { overflow: visible; }
  th { position: static; }
  tr { page-break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  @page { size: A4 landscape; margin: 12mm; }
}

/* Substance pages (tools/build-pages.js) */
.site-header a { color: #fff; }
.facts th { width: 32%; background: var(--bg); position: static; }
.facts td.change-decrease, .facts td.change-removed-ntgc { color: var(--down); }
.facts td.change-increase { color: var(--up); }
.facts td.change-new { color: var(--new); }
.lines { margin: 0; padding-left: 18px; }
.change-tag { display: inline-block; margin-left: 6px; background: rgba(255, 255, 255, 0.18); border-radius: 999px; padding: 1px 10px; font-size: 0.85rem; font-weight: 600; }
.sublimit { border-left: 4px solid var(--warn-line); background: var(--warn-bg); padding: 10px 14px; border-radius: 4px; }
.sublimit p { margin: 0; }
.cta { border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; background: var(--bg); }
.az td.change { white-space: nowrap; }
tr.change-decrease td.change, tr.change-removed-ntgc td.change { color: var(--down); font-weight: 600; }
