/* Indie Teardowns (working title) - design tokens
   One system: semantic tokens only, no hardcoded colors outside this block.
   Editorial ledger look: paper background, ink text, one rust accent.
   Dense data is presented in table rows, not card grids. */
:root {
  --bg: #faf8f3;
  --surface: #ffffff;
  --ink: #1d1a15;
  --ink-soft: #45403a;
  --muted: #6f6a5e;
  --line: #ddd6c7;
  --line-strong: #b9b09a;
  --accent: #9a3412;
  --accent-ink: #7c2d12;
  --accent-soft: #f3e3d8;
  --ok-bg: #eef4ea;
  --warn-bg: #fdf3e0;
  --radius: 4px;
  --font-body: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
}
::selection { background: var(--accent-soft); }
a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 10; }
.skip-link:focus { left: 8px; top: 8px; }

/* Header */
.site-header { border-bottom: 2px solid var(--ink); background: var(--bg); }
.site-header .wrap { display: flex; align-items: baseline; gap: 28px; padding-top: 16px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--accent-ink); }
.site-nav { display: flex; gap: 20px; margin-left: auto; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: 15px; }
.site-nav a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* Type */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 40px; margin: 0 0 14px; }
h2 { font-size: 27px; margin: 42px 0 12px; }
h3 { font-size: 20px; margin: 28px 0 8px; }
p { margin: 0 0 14px; max-width: 72ch; }
.lede { font-size: 20px; line-height: 1.5; color: var(--ink-soft); max-width: 62ch; }
.small { font-size: 14px; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* Hero: the ledger itself is the visual. No stock imagery, no gradient. */
.hero { padding: 52px 0 8px; }
.hero-fact { border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); margin-top: 28px; }
.hero-fact table { margin: 0; }

/* Tables: rows for dense data */
table { width: 100%; border-collapse: collapse; margin: 14px 0 22px; font-size: 15.5px; }
caption { text-align: left; font-weight: 600; padding-bottom: 8px; font-size: 16px; }
th, td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { border-bottom: 2px solid var(--ink); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: var(--surface); }
td.num, th.num { text-align: right; padding-right: 0; }
.data-card { background: var(--surface); border: 1px solid var(--line-strong); padding: 6px 20px; margin: 20px 0 26px; }
.data-card table { margin: 6px 0; }
.data-card th { width: 190px; border-bottom: 1px solid var(--line); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.data-card td { border-bottom: 1px solid var(--line); }
.data-card tr:last-child th, .data-card tr:last-child td { border-bottom: none; }

/* Lists and calls to action */
.tldr { background: var(--ok-bg); border-left: 3px solid var(--accent); padding: 16px 20px 8px; margin: 22px 0; }
.tldr h2 { margin-top: 0; font-size: 21px; }
ul, ol { max-width: 72ch; padding-left: 22px; }
li { margin-bottom: 7px; }
.btn {
  display: inline-block; background: var(--accent); color: #fff; border: 1px solid var(--accent);
  padding: 11px 20px; font-size: 16px; font-weight: 600; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; transition: transform 0.1s ease, background 0.12s ease;
}
.btn:hover { background: var(--accent-ink); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-secondary { background: transparent; color: var(--accent-ink); }
.btn-secondary:hover { background: var(--accent-soft); color: var(--accent-ink); }

/* Waitlist / email forms. Email backend is NOT live yet; see site.js. */
.waitlist { border: 1px solid var(--line-strong); background: var(--surface); padding: 22px; margin: 30px 0; }
.waitlist h2, .waitlist h3 { margin-top: 0; }
.waitlist form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.waitlist input[type="email"] {
  flex: 1 1 260px; padding: 11px 12px; font-size: 16px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--bg); color: var(--ink); min-height: 44px;
}
.form-status { margin-top: 12px; font-size: 15px; background: var(--warn-bg); border: 1px solid var(--line-strong); padding: 10px 14px; display: none; }
.form-status.visible { display: block; }

/* Filters on the teardowns index */
.filters { display: flex; gap: 18px; flex-wrap: wrap; align-items: end; border-bottom: 1px solid var(--line-strong); padding-bottom: 16px; margin-bottom: 6px; }
.filters label { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin-bottom: 5px; }
.filters select { font-size: 15px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); min-height: 40px; }

/* Pricing */
.price-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; border: 1px solid var(--line-strong); background: var(--surface); margin: 20px 0; }
.price-cell { padding: 22px; border-right: 1px solid var(--line); }
.price-cell:last-child { border-right: none; }
.price-amount { font-family: var(--font-display); font-size: 34px; margin: 4px 0; }
.price-cell ul { padding-left: 18px; }

/* Footer */
.site-footer { border-top: 2px solid var(--ink); margin-top: 64px; padding: 22px 0 34px; font-size: 14px; color: var(--muted); }
.site-footer p { max-width: none; }

@media (max-width: 760px) {
  h1 { font-size: 31px; }
  .price-row { grid-template-columns: 1fr; }
  .price-cell { border-right: none; border-bottom: 1px solid var(--line); }
  .price-cell:last-child { border-bottom: none; }
  th, td { padding: 8px 8px 8px 0; }
  .data-card th { width: 130px; }
}
