
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #6b675f;
  --line: #e7e3da;
  --accent: #0f766e;
  --accent-soft: #d5ece9;
  --pos: #15803d;
  --neu: #a8a29e;
  --neg: #b91c1c;
  --hit-all: #d5ece9;
  --hit-some: #fdf1d3;
  --hit-none: #fbe1df;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141412;
    --surface: #1c1c19;
    --text: #ecebe6;
    --muted: #a19d93;
    --line: #2e2d29;
    --accent: #5eead4;
    --accent-soft: #134e4a;
    --pos: #4ade80;
    --neu: #78716c;
    --neg: #f87171;
    --hit-all: #134e4a;
    --hit-some: #4a3b12;
    --hit-none: #4c1d1d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; align-items: baseline; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 20px; text-decoration: none; color: var(--text); letter-spacing: -0.02em; }
.logo span { color: var(--accent); margin-left: 4px; }
.tagline { color: var(--muted); font-size: 14px; }

main { padding-top: 24px; padding-bottom: 48px; }

h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 8px 0 12px; }
h2 { font-size: 20px; margin: 36px 0 6px; letter-spacing: -0.01em; }
h3 { font-size: 17px; margin: 0 0 4px; }

.lead { font-size: 18px; color: var(--muted); max-width: 720px; margin: 0 0 12px; }
.hero { padding: 24px 0 8px; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.meta { color: var(--muted); font-size: 14px; }
.crumbs { font-size: 14px; color: var(--muted); }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }

.tag {
  display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 1px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); vertical-align: 1px;
}
.tag-positive { background: color-mix(in srgb, var(--pos) 18%, transparent); color: var(--pos); }
.tag-neutral { background: color-mix(in srgb, var(--neu) 22%, transparent); color: var(--muted); }
.tag-negative { background: color-mix(in srgb, var(--neg) 18%, transparent); color: var(--neg); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; color: var(--text); text-decoration: none; transition: border-color .15s;
}
.card:hover { border-color: var(--accent); }
.card .top { padding-left: 20px; margin: 10px 0; }
.card .more { color: var(--accent); font-weight: 600; font-size: 14px; }

.how ol { padding-left: 20px; max-width: 720px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.brands td:nth-child(2) { font-weight: 600; }

.cell-bar { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.bar { flex: 1; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; min-width: 80px; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.cell-bar .num { min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

.senti { display: inline-flex; width: 64px; height: 8px; border-radius: 999px; overflow: hidden; background: var(--line); vertical-align: middle; }
.s-pos { background: var(--pos); } .s-neu { background: var(--neu); } .s-neg { background: var(--neg); }
.spark { color: var(--accent); vertical-align: middle; }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
table.compact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.compact td { white-space: normal; }

.history select { font: inherit; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-top: 36px; }
summary { cursor: pointer; font-weight: 600; }
.prompts { margin: 12px 0 0; padding-left: 22px; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 13px; }

.prompt-table td:first-child { white-space: normal; min-width: 260px; }
td.hit { text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; width: 90px; }
.hit-all { background: var(--hit-all); } .hit-some { background: var(--hit-some); } .hit-none { background: var(--hit-none); }

.rivals, .quotes { padding-left: 20px; }
.quotes { list-style: none; padding-left: 0; }
.quotes li { padding: 8px 0; border-bottom: 1px solid var(--line); }

.cta { background: var(--accent-soft); border-radius: var(--radius); padding: 4px 20px 16px; margin-top: 36px; }
.button { display: inline-block; background: var(--accent); color: var(--surface); padding: 10px 18px; border-radius: 8px; font-weight: 700; text-decoration: none; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 20px 0 32px; }
.site-footer p { max-width: 760px; }

@media (max-width: 640px) {
  th, td { padding: 8px; }
  .cell-bar { min-width: 0; }
  .cell-bar .bar { display: none; }
  /* Sentiment and trend need width; the brand page carries them on phones. */
  .brands th:nth-child(n+8), .brands td:nth-child(n+8) { display: none; }
  .tagline { display: none; }
}
