/* Bot Meter site. Tokens first; components only read tokens. */
:root {
  --paper: #f3f5f7;
  --surface: #ffffff;
  --ink: #12161b;
  --muted: #58626c;
  --line: #d8dee4;
  --accent: #07875c;
  --accent-ink: #ffffff;
  --ok-ring: rgba(88, 98, 108, 0.45);
  --warn: #f5b400;
  --warn-ink: #1a1300;
  --bot: #e0245e;
  --bot-ink: #ffffff;
  --zone-ok: rgba(7, 135, 92, 0.16);
  --zone-warn: rgba(245, 180, 0, 0.3);
  --zone-bot: rgba(224, 36, 94, 0.24);
  --shadow: 0 18px 50px rgba(18, 22, 27, 0.1);
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1116;
    --surface: #151a21;
    --ink: #e6eaee;
    --muted: #8c96a0;
    --line: #262d36;
    --accent: #2fd39b;
    --accent-ink: #06231a;
    --ok-ring: rgba(140, 150, 160, 0.5);
    --zone-ok: rgba(47, 211, 155, 0.14);
    --zone-warn: rgba(245, 180, 0, 0.22);
    --zone-bot: rgba(224, 36, 94, 0.26);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0d1116;
  --surface: #151a21;
  --ink: #e6eaee;
  --muted: #8c96a0;
  --line: #262d36;
  --accent: #2fd39b;
  --accent-ink: #06231a;
  --ok-ring: rgba(140, 150, 160, 0.5);
  --zone-ok: rgba(47, 211, 155, 0.14);
  --zone-warn: rgba(245, 180, 0, 0.22);
  --zone-bot: rgba(224, 36, 94, 0.26);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding-inline: 20px;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
}

img { max-width: 100%; }

a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1080px; margin-inline: auto; }

/* Top bar */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 700 18px/1 var(--display);
}

.brand img { width: 30px; height: 30px; border-radius: 7px; }

.top nav { display: flex; gap: 20px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
  padding-block: 40px 56px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3 { font-family: var(--display); text-wrap: balance; }

h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 34em;
  margin: 20px 0 28px;
  color: var(--muted);
  font-size: 19px;
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}

.cta:hover { filter: brightness(1.06); }
.note { color: var(--muted); font-size: 14px; }

/* Badges: same look as the extension's */
.badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 12.5px/19px var(--mono);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.badge.ok { color: var(--muted); border-color: var(--ok-ring); }
.badge.warn { color: var(--warn-ink); background: var(--warn); }
.badge.bot { color: var(--bot-ink); background: var(--bot); }

/* Feed mock */
.feed {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.post {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.post:last-child { border-bottom: 0; }
.post.dim { opacity: 0.4; }

.avatar { width: 40px; height: 40px; border-radius: 50%; }
.av1 { background: linear-gradient(135deg, #f7a8b8, #b36ae2); }
.av2 { background: linear-gradient(135deg, #1d9bf0, #0f4c81); }
.av3 { background: linear-gradient(135deg, #f5b400, #e0245e); }

.post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  font-size: 15px;
  line-height: 1.4;
}

.post-head b { font-weight: 700; }
.post-head .handle { color: var(--muted); }
.post p { margin: 2px 0 0; font-size: 15px; line-height: 1.45; }

/* The meter scale */
.scale-section { padding-block: 24px 64px; }

h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3.6vw, 38px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-lede { max-width: 40em; margin: 0 0 30px; color: var(--muted); }

.scale-box { overflow-x: auto; padding-bottom: 4px; }

.scale {
  position: relative;
  min-width: 640px;
  padding-top: 70px;
}

.track {
  position: relative;
  display: grid;
  grid-template-columns: 67.5% 11.9% 20.6%;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
}

.track span:nth-child(1) { background: var(--zone-ok); }
.track span:nth-child(2) { background: var(--zone-warn); }
.track span:nth-child(3) { background: var(--zone-bot); }

.pin {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.pin small { color: var(--muted); font-size: 13px; line-height: 1.2; white-space: nowrap; }
.pin::after { content: ""; width: 1px; height: 14px; background: var(--muted); opacity: 0.6; }

.ticks {
  position: relative;
  height: 26px;
  margin-top: 8px;
  color: var(--muted);
  font: 500 12px/1 var(--mono);
}

.ticks span { position: absolute; top: 4px; transform: translateX(-50%); }
.ticks span:first-child { transform: none; }
.ticks span:last-child { transform: translateX(-100%); }

.zones {
  display: grid;
  grid-template-columns: 67.5% 11.9% 20.6%;
  font-size: 13px;
  color: var(--muted);
}

.zones span { padding-inline: 4px; }
.zones b { color: var(--ink); font-weight: 600; }

.scale-caption { margin: 22px 0 0; color: var(--muted); font-size: 14px; }

/* Content sections */
.band {
  padding-block: 64px;
  border-top: 1px solid var(--line);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li { counter-increment: step; }

.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font: 600 14px/1 var(--mono);
}

.steps h3, .facts h3 { margin: 0 0 6px; font-size: 20px; line-height: 1.25; }
.steps p, .facts p { margin: 0; color: var(--muted); font-size: 16px; }

code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--zone-ok);
  color: var(--ink);
  font: 500 0.88em var(--mono);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 44px;
  margin-top: 34px;
}

.formula {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 26px;
  padding: 14px 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  font: 500 15px/1.4 var(--mono);
}

.formula .eq { color: var(--muted); }

/* FAQ */
.faq { display: grid; gap: 10px; margin-top: 30px; max-width: 760px; }

.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.faq summary {
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 600;
}

.faq details p { margin: 0; padding: 0 18px 18px; color: var(--muted); }

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 28px;
  padding-block: 32px 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }

/* Privacy page */
.doc { max-width: 720px; padding-block: 24px 72px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); }
.doc .updated { margin: 12px 0 34px; color: var(--muted); font: 500 14px/1 var(--mono); }
.doc h2 { margin-top: 40px; font-size: 24px; }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }

.summary-box {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.summary-box p { margin: 0; font-size: 18px; }

table.perm { width: 100%; border-collapse: collapse; font-size: 15px; }
table.perm th, table.perm td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.perm th { color: var(--muted); font-weight: 600; }
.table-box { overflow-x: auto; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-block: 20px 40px; }
  .steps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .top nav a.hide-sm { display: none; }
  .band { padding-block: 48px; }
}

@media (prefers-reduced-motion: no-preference) {
  .cta { transition: filter 0.15s; }
}
