/* Resale Comps — "proof of price".
   Receipt paper, ink, and a highlighter. Numbers are monospace; everything else is a grotesk. */
:root {
  --paper: #f2efe6;
  --paper-2: #e9e5d9;
  --card: #fbfaf5;
  --ink: #121212;
  --ink-2: #3b3833;
  --muted: #77726a;
  --line: #d8d2c3;
  --line-2: #c4bdab;
  --hi: #e4ff3d;          /* highlighter */
  --hi-soft: #f2ffa8;
  --up: #11744a;
  --up-soft: #dcefe4;
  --down: #b8321c;
  --down-soft: #f7e1db;
  --warn-soft: #fbefcb;
  --warn-ink: #6f4d00;
  --radius: 14px;
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 1px 0 rgba(18, 18, 18, 0.04), 0 10px 30px -12px rgba(18, 18, 18, 0.18);
  /* legacy aliases used by older templates */
  --accent: var(--ink);
  --accent-ink: var(--ink);
  --accent-soft: var(--hi-soft);
  --err-soft: var(--down-soft);
  --err-ink: var(--down);
  --surface: var(--card);
  --bg: var(--paper);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
/* faint paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: radial-gradient(rgba(18, 18, 18, 0.05) 1px, transparent 1px);
  background-size: 4px 4px;
}
main, header, footer { position: relative; z-index: 1; }
a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { background: var(--hi); }
h1, h2, h3 { line-height: 1.02; letter-spacing: -0.035em; margin: 0 0 0.45em; font-weight: 700; }
h1 { font-size: clamp(44px, 7.5vw, 96px); }
h2 { font-size: clamp(28px, 3.4vw, 40px); }
h3 { font-size: 19px; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0 0 1em; }
code, pre, .mono { font-family: var(--mono); }
code, pre { font-size: 13px; }
:not(pre) > code { background: var(--paper-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
pre {
  background: var(--ink); color: #eae7df; padding: 18px 20px; border-radius: var(--radius);
  overflow-x: auto; line-height: 1.65; margin: 0 0 1.2em;
}
pre .c { color: #8a867d; }
pre .k { color: var(--hi); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 28px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack > * + * { margin-top: 14px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Highlighter: marker stroke behind words */
.hl {
  background: linear-gradient(104deg, transparent 0.6%, var(--hi) 2%, var(--hi) 96%, transparent 98%) no-repeat 0 62% / 100% 58%;
  padding: 0 0.08em;
  margin: 0 -0.04em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(242, 239, 230, 0.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; font-size: 18px; }
.logo:hover { background: none; }
.logo svg { display: block; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a, .nav-right a:not(.btn) { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: 999px; }
.nav a:hover, .nav-right a:not(.btn):hover { background: var(--paper-2); color: var(--ink); }
.nav a.active { color: var(--ink); background: var(--hi); }
.nav-right { display: flex; gap: 8px; align-items: center; }
@media (max-width: 760px) { .nav { display: none; } .site-header .wrap { justify-content: space-between; } }

/* Ticker */
.ticker { background: var(--ink); color: #f2efe6; overflow: hidden; white-space: nowrap; border-bottom: 1px solid #000; font-family: var(--mono); font-size: 12.5px; position: relative; z-index: 1; }
.ticker-track { display: inline-flex; gap: 0; padding: 9px 0; animation: ticker 90s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; border-right: 1px solid #333; }
.ticker-item .p { color: var(--hi); font-weight: 600; }
.ticker-item .t { max-width: 260px; overflow: hidden; text-overflow: ellipsis; color: #cfcabf; }
.ticker-item .badge-live { color: #121212; background: var(--hi); padding: 1px 6px; border-radius: 4px; font-weight: 700; font-size: 11px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper); font: 600 15px var(--sans); letter-spacing: -0.01em;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform 0.08s ease, background 0.15s ease;
}
.btn:hover { background: var(--hi); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; color: var(--ink); }
.btn.secondary:hover { background: var(--hi); }
.btn.accent { background: var(--hi); color: var(--ink); }
.btn.accent:hover { background: var(--ink); color: var(--hi); }
.btn.small { height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn.danger { background: transparent; color: var(--down); border-color: var(--down); }
.btn.danger:hover { background: var(--down-soft); }
.btn[disabled] { opacity: 0.45; cursor: default; pointer-events: none; }
input[type="text"], input[type="email"], input[type="number"], input[type="search"], select {
  height: 44px; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 0 14px; font: 15px var(--sans);
  background: var(--card); color: var(--ink); min-width: 0;
}
input:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--hi-soft); }
label { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; }

/* Search */
.searchbar { display: flex; gap: 8px; background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 6px 6px 22px; box-shadow: 6px 6px 0 var(--ink); align-items: center; }
.searchbar svg { flex: none; }
.searchbar input { border: 0; flex: 1; height: 50px; font-size: 18px; padding: 0 8px; outline: none; background: transparent; box-shadow: none; }
.searchbar input:focus { box-shadow: none; }
.searchbar .btn { height: 50px; padding: 0 26px; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { font-size: 13.5px; color: var(--ink-2); border: 1.5px solid var(--line-2); background: var(--card); padding: 5px 12px; border-radius: 999px; text-decoration: none; font-weight: 500; }
.chip:hover { border-color: var(--ink); background: var(--hi); color: var(--ink); }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero h1 { max-width: 12ch; }
.hero .lead { font-size: 20px; color: var(--ink-2); max-width: 600px; margin: 18px 0 32px; line-height: 1.45; }
.eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 16px; display: inline-flex; gap: 8px; align-items: center; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px var(--up-soft); }
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 56px; align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }

section.block { padding: 72px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { max-width: 520px; color: var(--ink-2); margin: 0; }

.card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card.ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.card.ink .muted { color: #a8a397; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

/* Receipt */
.receipt {
  position: relative; background: var(--card); padding: 26px 26px 22px; font-family: var(--mono); font-size: 13.5px;
  color: var(--ink); border-radius: 6px 6px 0 0; margin-bottom: 12px;
  filter: drop-shadow(0 10px 18px rgba(18, 18, 18, 0.14)) drop-shadow(0 1px 0 rgba(18, 18, 18, 0.06));
}
/* torn bottom edge */
.receipt::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -11px; height: 12px;
  background:
    linear-gradient(135deg, var(--card) 6px, transparent 0) 0 0 / 12px 12px repeat-x,
    linear-gradient(-135deg, var(--card) 6px, transparent 0) 0 0 / 12px 12px repeat-x;
}
.receipt.tilt { transform: rotate(1.6deg); }
.receipt .r-head { text-align: center; text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; font-weight: 700; }
.receipt .r-sub { text-align: center; color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.receipt .r-rule { border: 0; border-top: 1.5px dashed var(--line-2); margin: 14px 0; }
.receipt .r-line { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.receipt .r-line span:first-child { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt .r-line span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.receipt .r-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.receipt .r-total .v { font-size: 34px; letter-spacing: -0.04em; text-transform: none; }
.receipt .r-total .v .hl { padding: 0 6px; }
.receipt .r-foot { text-align: center; color: var(--muted); font-size: 11.5px; margin-top: 14px; }
.barcode { height: 34px; margin-top: 12px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 12px); opacity: 0.9; }

/* Stats (results header) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.stat { padding: 18px 20px; border-right: 1.5px dashed var(--line-2); }
.stat:last-child { border-right: 0; }
.stat .label { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.stat .value { font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: -0.05em; margin-top: 6px; }
.stat .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stat.hero-stat { background: var(--hi); }
.stat.hero-stat .label, .stat.hero-stat .sub { color: var(--ink-2); }
.stat.hero-stat .value { font-size: 44px; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1.5px dashed var(--line-2); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f6f4ec; }
td.r, th.r { text-align: right; }
.thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--paper-2); display: block; border: 1px solid var(--line); }
.title-cell { max-width: 440px; }
.title-cell a { color: var(--ink); text-decoration: none; font-weight: 500; }
.title-cell a:hover { background: var(--hi); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; border: 1px solid var(--line); }
.badge.live { background: var(--up-soft); color: var(--up); border-color: #bfdccc; }
.badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--up); }
.badge.soon { color: var(--muted); }
.badge.warn { background: var(--warn-soft); color: var(--warn-ink); border-color: #ecd9a0; }
.badge.err { background: var(--down-soft); color: var(--down); border-color: #eec2b8; }
.badge.hi { background: var(--hi); color: var(--ink); border-color: var(--ink); }
.sticker { display: inline-block; background: var(--hi); color: var(--ink); font-weight: 700; font-size: 13px; padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 8px; transform: rotate(-4deg); box-shadow: 3px 3px 0 var(--ink); }

.notice { border-radius: var(--radius); padding: 14px 18px; border: 1.5px solid var(--line); background: var(--card); margin: 0 0 16px; }
.notice.ok { background: var(--hi-soft); border-color: var(--ink); }
.notice.warn { background: var(--warn-soft); border-color: #ecd9a0; color: var(--warn-ink); }
.notice.err { background: var(--down-soft); border-color: #eec2b8; color: var(--down); }

/* Charts */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-text { fill: var(--muted); font: 11px var(--mono); }
.chart .series-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .series-area { fill: var(--ink); opacity: 0.08; }
.chart .end-dot { fill: var(--ink); stroke: var(--card); stroke-width: 2; }
.chart .end-label { fill: var(--ink); font: 600 12px var(--mono); }
.chart .crosshair { stroke: var(--ink-2); stroke-width: 1; opacity: 0; }
.chart .hover-dot { fill: var(--hi); stroke: var(--ink); stroke-width: 2; opacity: 0; }
.chart.hovering .crosshair, .chart.hovering .hover-dot { opacity: 1; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); font: 12px var(--mono); padding: 8px 10px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity 0.1s; }
.chart-tip strong { display: block; font-size: 15px; color: var(--hi); }
.chart.hovering .chart-tip { opacity: 1; }
.chart-data summary { font: 12px var(--mono); color: var(--muted); cursor: pointer; margin-top: 10px; }
.chart-data table { font-size: 12.5px; margin-top: 8px; }

.platform-bars { display: flex; flex-direction: column; gap: 14px; }
.platform-row { display: grid; grid-template-columns: 96px 1fr 76px; gap: 14px; align-items: center; font-size: 14.5px; position: relative; }
.platform-row .bar { height: 18px; background: transparent; border-radius: 0; overflow: visible; }
.platform-row .bar > span { display: block; height: 100%; background: var(--ink); border-radius: 0 4px 4px 0; min-width: 4px; transition: background 0.1s; }
.platform-row:hover .bar > span, .platform-row:focus .bar > span { background: var(--ink-2); }
.platform-row .tip { position: absolute; left: 110px; top: -30px; background: var(--ink); color: var(--paper); font: 12px var(--mono); padding: 4px 8px; border-radius: 6px; opacity: 0; pointer-events: none; }
.platform-row:hover .tip, .platform-row:focus .tip { opacity: 1; }
.bar { height: 8px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--ink); border-radius: 99px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan .price { font-family: var(--mono); font-size: 36px; font-weight: 700; letter-spacing: -0.05em; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 0 0 8px; font-size: 14.5px; color: var(--ink-2); flex: 1; }
.plan li { padding: 4px 0 4px 22px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; top: 4px; font-weight: 700; color: var(--ink); }
.plan.featured { border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); background: var(--card); }

/* Docs */
.docs { display: grid; grid-template-columns: 210px 1fr; gap: 48px; padding: 48px 0 96px; }
.docs nav { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.docs nav a { color: var(--ink-2); text-decoration: none; padding: 5px 10px; border-radius: 8px; }
.docs nav a:hover { background: var(--hi); color: var(--ink); }
.docs h2 { margin-top: 48px; padding-top: 8px; font-size: 30px; }
.docs h3 { margin-top: 28px; }
.docs table { margin-bottom: 1.2em; }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; } .docs nav { display: none; } }
.endpoint { font-family: var(--mono); font-size: 14px; background: var(--card); border: 1.5px solid var(--ink); padding: 8px 14px; border-radius: 10px; display: inline-block; margin-bottom: 12px; }
.endpoint b { background: var(--hi); padding: 1px 6px; border-radius: 4px; margin-right: 10px; }
.tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.tabs button { font: 600 12px var(--mono); border: 1.5px solid var(--line-2); background: var(--card); padding: 5px 12px; border-radius: 999px; cursor: pointer; color: var(--ink-2); }
.tabs button.on { background: var(--ink); color: var(--hi); border-color: var(--ink); }

.locked { position: relative; }
.locked .blur { filter: blur(6px); pointer-events: none; user-select: none; opacity: 0.55; }
.locked .unlock { position: absolute; inset: 0; display: grid; place-items: center; }

.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; margin-top: 80px; font-size: 13.5px; color: var(--muted); }
.site-footer .wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--ink-2); text-decoration: none; margin-right: 18px; }
.site-footer a:hover { background: var(--hi); color: var(--ink); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin: 16px 0; }
.keybox { font-family: var(--mono); background: var(--hi-soft); border: 1.5px dashed var(--ink); padding: 12px 14px; border-radius: 10px; word-break: break-all; }

/* Platform tag wall */
.tagwall { display: flex; flex-wrap: wrap; gap: 10px; }
.ptag { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 10px 999px 999px 10px; font-weight: 600; position: relative; }
.ptag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); }
.ptag.live { background: var(--hi); }
.ptag .badge { margin-left: 4px; }

/* Big numbers strip */
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.numbers > div { padding: 28px 24px; border-right: 1.5px dashed var(--line-2); }
.numbers > div:last-child { border-right: 0; }
.numbers .n { font-family: var(--mono); font-size: 42px; font-weight: 700; letter-spacing: -0.05em; }
.numbers .l { color: var(--ink-2); font-size: 14px; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step { counter-increment: step; }
.step::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: 13px; font-weight: 700; display: inline-block; background: var(--ink); color: var(--hi); padding: 2px 8px; border-radius: 6px; margin-bottom: 14px; }

.results-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) {
  .results-grid { grid-template-columns: 1fr; }
  .stat .value { font-size: 24px; }
  .stat.hero-stat .value { font-size: 34px; }
  .searchbar { padding-left: 16px; box-shadow: 4px 4px 0 var(--ink); }
  .searchbar input { font-size: 16px; }
  .searchbar .btn { padding: 0 16px; }
  .hero { padding: 40px 0 32px; }
  .numbers .n { font-size: 32px; }
  .card.ink { padding: 28px !important; }
}
.hero-grid > * { min-width: 0; }
@media (max-width: 900px) {
  .receipt.tilt { transform: none; }
  .hero .lead { font-size: 17px; }
  .sticker { right: 6px !important; }
}
