/* Everstood - design system v3 (peer-researched redesign, 2026-11-16)
   v3 is grounded in a peer study (hidden_files/peer-design-research.md).
   What changed vs v2, and where each choice comes from:
     - Every list row leads with the product's own logo (its published
       favicon / touch icon, hosted locally): Starter Story's data table
       (thumbnail-first rows), Product Hunt (one uniform logo size per row),
       Toolfolio (small logo + name + meta rows).
     - Teardown pages carry the product's own published share image
       (og:image) as a full-width visual: Landingfolio's image-first cards,
       Growth.design's logo-led case-study anatomy. Logo-only og images are
       NOT used as visuals; those pages show the logo instead.
     - Homepage hero gains a strip of product logos under the actions:
       Starter Story's hero image strip.
     - Type: sans display scale (44px h1, -0.02em, weight 700) instead of
       the v2 Georgia serif: Starter Story / Product Hunt / Toolfolio all
       set headlines in a tight grotesque sans. Body stays 17px/1.6 for the
       Read surface (Marketing Examples' editorial restraint).
     - Surfaces: white cards on a near-white ground, hairline borders; the
       products' own logo colours supply the colour, the single rust accent
       is kept for actions and data bars (brand continuity with v2).
   Still borrowed from astryx as patterns, re-implemented in plain CSS:
   Layout shell, rows for dense data (never card grids for the 180-row
   table), MetadataList data rows, Card only for widgets, Token chips,
   one Button system. Semantic tokens only; no hardcoded colours
   outside :root (the #fff tile ground for logos is a token too). */
:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --tile: #ffffff;
  --ink: #1b1a17;
  --ink-soft: #45423c;
  --muted: #716c61;
  --line: #e4e1d8;
  --line-strong: #c9c3b2;
  --accent: #9a3412;
  --accent-ink: #7c2d12;
  --accent-soft: #f6e7dc;
  --bar-track: #efe9db;
  --ok-bg: #eef4ea;
  --warn-bg: #fdf3e0;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --radius: 6px;
  --shadow-1: 0 1px 2px rgba(27, 26, 23, 0.04), 0 8px 24px rgba(27, 26, 23, 0.05);
  --shadow-2: 0 2px 6px rgba(27, 26, 23, 0.05), 0 16px 36px rgba(27, 26, 23, 0.09);
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-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: 1080px; 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: 20; }
.skip-link:focus { left: 8px; top: 8px; }

/* Header: white shell, hairline rule (v2's 2px ink rule read as a
   spreadsheet, not a product) */
.site-header { border-bottom: 1px solid var(--line-strong); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; gap: 28px; padding-top: 13px; padding-bottom: 13px; flex-wrap: wrap; }
.brand { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.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; font-weight: 500; padding: 4px 2px; }
.site-nav a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* Type: one sans scale, space above a heading larger than below */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.16; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: 44px; font-weight: 800; margin: 0 0 14px; }
h2 { font-size: 28px; font-weight: 700; margin: 56px 0 12px; padding-top: 26px; border-top: 1px solid var(--line); }
h3 { font-size: 20px; font-weight: 700; margin: 28px 0 8px; }
p { margin: 0 0 14px; max-width: 72ch; }
.lede { font-size: 20px; line-height: 1.55; color: var(--ink-soft); max-width: 64ch; }
.small { font-size: 14px; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* Product logos: one uniform tile everywhere (Product Hunt discipline).
   The tile is white with a hairline border and inner padding so
   transparent logos sit on a consistent ground. */
.site-logo {
  width: 30px; height: 30px; border-radius: 7px; background: var(--tile);
  border: 1px solid var(--line); object-fit: contain; padding: 3px;
  vertical-align: -9px; margin-right: 10px;
}
.bar-name .site-logo { width: 24px; height: 24px; border-radius: 6px; vertical-align: -7px; margin-right: 8px; padding: 2px; }

/* Hero: hard numbers first (kept from v2), then a strip of the tracked
   products' own logos (Starter Story's hero image strip) */
.hero { padding: 56px 0 8px; }
.hero h2 { border-top: none; padding-top: 0; margin-top: 0; }
.hero-logos { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 4px; }
.hero-logos .logo-tile {
  width: 54px; height: 54px; border-radius: 13px; background: var(--tile);
  border: 1px solid var(--line); box-shadow: var(--shadow-1);
  display: flex; align-items: center; justify-content: center;
}
.hero-logos .logo-tile img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.hero-fact { border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-1); margin-top: 26px; padding: 6px 22px; }
.hero-fact table { margin: 6px 0; }

/* Tables: rows for dense data (astryx principle: rows, not cards) */
table { width: 100%; border-collapse: collapse; margin: 14px 0 22px; font-size: 15.5px; }
caption { text-align: left; font-weight: 700; padding-bottom: 8px; font-size: 16px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
thead th { border-bottom: 2px solid var(--ink); font-size: 13px; line-height: 1.35; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); background: var(--bg); }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: var(--surface); }
td.num, th.num { text-align: right; }
td.num { font-weight: 700; }

/* MetadataList: the sourced data card on every teardown */
.data-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-1); padding: 10px 22px; 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; }

/* Stat panel: the visual head of every teardown (Card used as a widget).
   Big sourced number + country share bars, all figures from the page's
   own data card, injected by hidden_files/redesign.py. */
.stat-panel {
  display: grid; grid-template-columns: minmax(210px, 300px) 1fr; gap: 8px 36px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-l); box-shadow: var(--shadow-1);
  padding: 24px 26px; margin: 20px 0 26px; align-items: start;
}
.stat-label { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin: 0 0 2px; }
.stat-big { font-family: var(--font-display); font-size: 56px; font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 0; }
.stat-sub { font-size: 14px; color: var(--muted); margin: 8px 0 0; max-width: 34ch; }
.stat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip {
  display: inline-block; font-size: 13px; line-height: 1.3; color: var(--ink-soft);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 11px; background: var(--bg);
}
.stat-bars h3 { font-family: var(--font-body); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin: 4px 0 10px; font-weight: 600; }

/* The product's own published share image (og:image), full width under
   the stat panel. No caption (taste-skill house rule). Pages whose
   og:image is only a logo lockup get the logo plate instead. */
.td-visual { margin: 0 0 26px; }
.td-visual img { display: block; width: 100%; height: auto; border-radius: var(--radius-l); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.td-visual-logo {
  margin: 0 0 26px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-l); box-shadow: var(--shadow-1);
  padding: 30px 26px; display: flex; align-items: center; justify-content: center;
}
.td-visual-logo img { display: block; height: 64px; width: auto; max-width: 260px; object-fit: contain; }

/* Share bars: country mix on teardowns, top-10 chart on the homepage */
.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 132px 1fr 96px; gap: 12px; align-items: center; font-size: 14.5px; }
.bar-name { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: var(--bar-track); border-radius: 999px; height: 10px; overflow: hidden; }
.bar-fill { background: var(--accent); height: 100%; border-radius: 999px; width: var(--w, 0%); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }

/* Homepage chart: top sites by monthly visits */
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-1); padding: 24px 26px; margin: 20px 0 26px; }
.chart h2 { border-top: none; padding-top: 0; margin: 0 0 4px; font-size: 24px; }
.chart .bars { gap: 11px; margin-top: 14px; }
.chart .bar-row { grid-template-columns: 168px 1fr 76px; font-size: 15px; }
.chart .bar-name { color: var(--ink); font-weight: 600; }
.chart .bar-name a { color: var(--ink); text-decoration: none; }
.chart .bar-name a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.chart .bar-track { height: 14px; }
.chart-note { font-size: 14px; color: var(--muted); margin: 12px 0 0; }

/* Mini bar inside the visits cell of the index tables */
.vbar { display: block; height: 5px; background: var(--bar-track); border-radius: 999px; margin-top: 7px; overflow: hidden; }
.vbar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; width: var(--w, 0%); }

/* TL;DR: a summary card, offset shadow, no glow */
.tldr { background: var(--ok-bg); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-1); padding: 18px 22px 10px; margin: 22px 0; }
.tldr h2 { margin-top: 0; padding-top: 0; border-top: none; font-size: 21px; }
ul, ol { max-width: 72ch; padding-left: 22px; }
li { margin-bottom: 7px; }

/* Buttons: one system, hover step, active press (taste-skill) */
.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-s);
  text-decoration: none; cursor: pointer; transition: transform 0.1s ease, background 0.12s ease;
}
.btn:hover { background: var(--accent-ink); color: #fff; transform: translateY(-1px); }
.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); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-1); padding: 22px; margin: 30px 0; }
.waitlist h2, .waitlist h3 { margin-top: 0; padding-top: 0; border-top: none; }
.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-s); 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); border-radius: var(--radius-s); padding: 10px 14px; display: none; }
.form-status.visible { display: block; }

/* Filters on the teardowns index (Operate surface: native controls) */
.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-s); background: var(--surface); color: var(--ink); min-height: 40px; }

/* Compare table: wide on purpose, scrolls on narrow screens */
.table-scroll { overflow-x: auto; }
.compare-table, #compare-table { min-width: 640px; }
#compare-table th:first-child { width: 150px; }
#compare-table td:first-child { font-weight: 600; color: var(--ink-soft); }
#compare-table td { font-size: 15.5px; }
#compare-table .num { font-size: 17px; }
#compare-table thead th .site-logo { width: 26px; height: 26px; vertical-align: -7px; }

/* Pricing: three tier cards, the paid middle tier carries the accent ring */
.price-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin: 20px 0; }
.price-cell { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-1); }
.price-cell:nth-child(2) { border: 2px solid var(--accent); box-shadow: var(--shadow-2); }
.price-amount { font-family: var(--font-display); font-size: 36px; font-weight: 800; letter-spacing: -0.02em; margin: 4px 0; font-variant-numeric: tabular-nums; }
.price-cell h3 { margin-top: 0; }
.price-cell ul { padding-left: 18px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line-strong); 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: 32px; }
  .stat-panel { grid-template-columns: 1fr; }
  .stat-big { font-size: 44px; }
  .bar-row { grid-template-columns: 104px 1fr 84px; }
  .chart .bar-row { grid-template-columns: 128px 1fr 64px; }
  .price-row { grid-template-columns: 1fr; }
  th, td { padding: 10px 8px; }
  .data-card { padding: 8px 14px; }
  .data-card th { width: 130px; }
  thead th { position: static; }
  .hero-logos .logo-tile { width: 46px; height: 46px; border-radius: 11px; }
  .hero-logos .logo-tile img { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Related teardowns cross-links (SEO fix, 2026-11-16) */
.related-teardowns { border-top: 1px solid var(--line-strong); margin: 30px 0 0; padding-top: 18px; }
.related-teardowns h2 { margin-top: 0; padding-top: 0; border-top: none; }
.related-teardowns ul { margin: 8px 0 0; padding-left: 20px; }

/* Brand lockup: lighthouse mark + wordmark (logo round, 2026-11-16) */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; flex: none; display: block; }

/* Source columns are secondary data: muted (spacing round, 2026-11-16) */
.sites-table td:nth-child(4), table[data-filterable] td:nth-child(5) { color: var(--muted); font-size: 14.5px; }
