/* Revierdict's one stylesheet: the home page, /status, /spend and the /s/<id> summary pages all use it.
   The look borrows Amazon's palette (navy bars, yellow and orange buttons, teal links) so shoppers
   feel at home, while keeping Revierdict's own name and logo. */

:root {
  color-scheme: light;
  --bg: #eaeded;
  --surface: #ffffff;
  --surface-2: #f7f8f8;
  --text: #0f1111;
  --muted: #565959;
  --line: #d5d9d9;
  --navy: #131921;
  --navy-2: #232f3e;
  --orange: #ff9900;
  --rust: #c45500;
  --link: #007185;
  --link-hover: #c7511f;
  --yellow: #ffd814;
  --yellow-edge: #fcd200;
  --yellow-hover: #f7ca00;
  --buy: #ffa41c;
  --buy-edge: #ff8f00;
  --buy-hover: #fa8900;
  --good: #067d62;
  --good-bg: #e6f4f1;
  --bad: #b12704;
  --bad-bg: #fcebe7;
  --warn: #8a5a00;
  --warn-bg: #fff4e0;
  --radius: 8px;
  --shadow: 0 2px 5px rgba(15, 17, 17, 0.12);
  --button-shadow: 0 2px 5px 0 rgba(213, 217, 217, 0.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Arial, "Helvetica Neue", Helvetica, sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0 0 12px; }
img, iframe { display: block; max-width: 100%; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }

/* ---- Top bar ---- */
.nav { position: sticky; top: 0; z-index: 20; background: var(--navy); }
.nav .container { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: #fff; font-weight: 700; font-size: 20px; }
.brand:hover { color: #fff; text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 6px 10px; border: 1px solid transparent; border-radius: 2px; color: #fff; font-size: 14px; font-weight: 700; }
.nav-links a:hover { border-color: #fff; color: #fff; text-decoration: none; }
@media (max-width: 720px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  box-shadow: var(--button-shadow);
  cursor: pointer;
}
.btn:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.btn-primary { background: var(--yellow); border-color: var(--yellow-edge); }
.btn-primary:hover { background: var(--yellow-hover); }
.btn-ghost { background: var(--surface); }
.btn-amber { background: var(--buy); border-color: var(--buy-edge); }
.btn-amber:hover { background: var(--buy-hover); }
.btn-block { width: 100%; }
.btn svg { width: 17px; height: 17px; }

/* ---- Small pieces ---- */
.eyebrow { margin: 0 0 8px; color: var(--rust); font-size: 13px; font-weight: 700; }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 100px; font-size: 13px; font-weight: 700; }
.chip-good { background: var(--good-bg); color: var(--good); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-bad { background: var(--bad-bg); color: var(--bad); }
.chip-soft { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* Pros and cons lists: a tick or a cross per line. */
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 28px; margin: 9px 0; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 11px;
}
.ticks.good li::before { background-color: var(--good-bg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3l2.2 2.2 4.8-5' fill='none' stroke='%23067d62' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ticks.bad li::before { background-color: var(--bad-bg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 3l6 6M9 3L3 9' fill='none' stroke='%23b12704' stroke-width='1.9' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* ---- Home page ---- */
.hero { padding: 56px 0 60px; background: var(--surface); border-bottom: 1px solid var(--line); }
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.4vw, 50px); font-weight: 700; letter-spacing: -0.01em; }
.hero h1 .grad { color: var(--rust); }
.hero .lead { margin: 18px 0 26px; color: var(--muted); font-size: 18px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn { padding: 11px 24px; font-size: 15px; }
.hero-note { margin-top: 14px; color: var(--muted); font-size: 13px; }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; } }

/* The example extension panel in the hero, drawn like the real one. */
.mock { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 4px 18px rgba(15, 17, 17, 0.12); }
.mock-head { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px; background: var(--navy-2); color: #fff; font-weight: 700; }
.mock-head span { color: #ccd2d8; font-weight: 400; font-size: 13px; }
.mock-card { display: flex; gap: 14px; margin: 0 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mock-card:last-child { border-bottom: 0; opacity: 0.6; }
.mock-thumb { position: relative; flex: none; width: 128px; aspect-ratio: 16 / 9; border-radius: 6px; background: linear-gradient(135deg, #232f3e, #37475a); }
.mock-thumb::after { content: ""; position: absolute; left: 50%; top: 50%; translate: -40% -50%; border-left: 15px solid rgba(255, 255, 255, 0.92); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.mock-thumb span { position: absolute; right: 5px; bottom: 5px; padding: 0 4px; border-radius: 3px; background: rgba(0, 0, 0, 0.8); color: #fff; font-size: 11px; }
.mock-title { margin: 0 0 2px; font-weight: 700; font-size: 14px; line-height: 1.3; }
.mock-meta { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.mock-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin: 0 16px; padding: 4px 0 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.mock-lists .ticks li { margin: 7px 0; }

.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin: 0 auto 36px; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; }
.section-head p { margin-top: 10px; color: var(--muted); font-size: 17px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { padding: 24px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--navy-2);
  color: #fff;
  font-weight: 700;
}
.step h3, .feature h3 { font-size: 18px; margin-bottom: 6px; }
.step p, .feature p { color: var(--muted); margin: 0; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.feature { display: flex; gap: 16px; padding: 24px; }
.feature .icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff3e0; color: var(--rust); }
.feature .icon svg { width: 22px; height: 22px; }
@media (max-width: 860px) { .steps, .features { grid-template-columns: 1fr; } }

.install { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 36px; }
.install ol { margin: 0; padding-left: 22px; }
.install li { margin: 10px 0; }
.install code { padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); font-size: 13px; }
@media (max-width: 860px) { .install { grid-template-columns: 1fr; padding: 24px; } }

.faq { max-width: 760px; margin: 0 auto; }
.faq details { padding: 16px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--rust); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* ---- Summary pages ---- */
.summary-page { padding: 32px 24px 64px; }
.summary-head { max-width: 820px; margin-bottom: 22px; }
.summary-head h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; }
.summary-head .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.summary-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .summary-grid { grid-template-columns: 1fr; } }
.player { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-line { margin: 12px 0 20px; font-weight: 700; }
.video-line a { color: var(--link); }
.video-line .muted { font-weight: 400; }
.panel { padding: 20px 22px; margin-bottom: 16px; }
.panel h2 { margin-bottom: 8px; font-size: 17px; font-weight: 700; }
.panel > p:last-child { margin-bottom: 0; }
.verdict p { font-size: 17px; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pros-cons .panel { margin-bottom: 16px; }
.pros-cons .good-h { color: var(--good); }
.pros-cons .bad-h { color: var(--bad); }
@media (max-width: 640px) { .pros-cons { grid-template-columns: 1fr; } }
.caveat { padding: 12px 16px; margin-bottom: 16px; border: 1px solid #f0d7a7; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn); font-weight: 700; }
.side { position: sticky; top: 80px; padding: 20px; }
.side .eyebrow { color: var(--muted); }
.side-title { font-weight: 700; font-size: 16px; line-height: 1.4; }
.side hr { margin: 18px 0; border: 0; border-top: 1px solid var(--line); }
.side .fine, .fine { color: var(--muted); font-size: 12px; }
.side .btn + .fine { margin-top: 10px; }

/* ---- Status page ---- */
.status-list { list-style: none; padding: 0; margin: 0; }
.status-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.status-list li:last-child { border-bottom: 0; }
.status-list .ok { color: var(--good); font-weight: 700; }
.status-list .no { color: var(--bad); font-weight: 700; }
.api dt { margin-top: 14px; font-weight: 700; }
.api dd { margin: 4px 0 0; color: var(--muted); }
.api code { padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); font-size: 13px; }

/* ---- Spending page (private, behind SPEND_KEY) ---- */
.spend { max-width: 1000px; padding-top: 40px; padding-bottom: 72px; }
.spend h1 { margin-bottom: 8px; font-size: 34px; font-weight: 700; }
.spend > .muted { margin-bottom: 24px; }
.plan-note { padding: 12px 16px; margin-bottom: 16px; border: 1px solid #b4d9df; border-radius: var(--radius); background: #eef8fa; color: #0d4f5a; font-weight: 700; }
.key-form { max-width: 540px; }
.key-form label { display: block; margin-bottom: 8px; font-weight: 700; }
.key-row { display: flex; gap: 10px; }
.key-row input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid #888c8c; border-radius: var(--radius); font: inherit; box-shadow: inset 0 1px 2px rgba(15, 17, 17, 0.15); }
.key-row input:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px #c8f3fa, inset 0 1px 2px rgba(15, 17, 17, 0.15); }
.key-form .fine { margin: 10px 0 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat { padding: 18px 20px; }
.stat-label { margin: 0 0 4px; color: var(--muted); font-size: 13px; font-weight: 700; }
.stat-value { margin: 0; font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.spend-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 860px) { .spend-grid { grid-template-columns: 1fr; } }
.spend .status-list .value { font-weight: 700; text-align: right; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; border-bottom: 1px solid var(--line); }
.bars span { flex: 1; border-radius: 2px 2px 0 0; background: var(--orange); }
.bars span.empty { background: var(--line); }
.bars span.today { background: var(--rust); }
.bars-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
.calls { width: 100%; border-collapse: collapse; font-size: 14px; }
.calls th { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: left; white-space: nowrap; }
.calls td { padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.calls tr:last-child td { border-bottom: 0; }
.calls .num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .calls .tokens { display: none; } }

/* ---- Footer ---- */
.footer { padding: 28px 0 36px; background: var(--navy-2); color: #ddd; font-size: 13px; }
.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer a { color: #ddd; }
.footer a:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
