/* Budgelyx review showcase — "statement & stub" on the web. */
:root {
  --ground: #f4f5f2;
  --paper: #ffffff;
  --sunken: #e9ebe6;
  --ink: #16181d;
  --muted: #555a62;
  --rule: #d3d6d0;
  --rule-strong: #8a8f96;
  --accent: #0d6b66;
  --on-accent: #ffffff;
  --accent-soft: #d6eae6;
  --accent-ink: #09504c;
  --stub: #f3e1dc;
  --stub-ink: #6e3427;
  --copy: #dcece6;
  --copy-ink: #1f4a40;
  --over: #a8382a;
  --radius: 6px;
  --gutter: 16px;
  --max: 1120px;
  --text: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --figures: "Atkinson Hyperlegible Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #111315; --paper: #1a1d20; --sunken: #0b0d0e; --ink: #ecedea; --muted: #a8adb3;
    --rule: #2e3237; --rule-strong: #6f757c; --accent: #5cc2b5; --on-accent: #082220;
    --accent-soft: #163633; --accent-ink: #8ed9cf; --stub: #2c2220; --stub-ink: #f0c4b8;
    --copy: #18292a; --copy-ink: #b4ded3; --over: #ff8d7a;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 17px/1.55 var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 19px; }
.brand svg { width: 32px; height: 32px; flex: none; }
.site-nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; padding: 10px 10px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
.site-nav a:hover { background: var(--sunken); }
.site-nav a[aria-current="page"] { color: var(--accent); }
@media (max-width: 640px) { .site-nav .optional { display: none; } }

/* Type */
.eyebrow { font: 700 12px/1.3 var(--text); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
h1 { font-weight: 800; font-size: clamp(34px, 6vw, 60px); line-height: 1.04; letter-spacing: -.02em; margin: 0 0 18px; }
h2 { font-weight: 800; font-size: clamp(26px, 3.6vw, 38px); line-height: 1.12; letter-spacing: -.01em; margin: 0 0 14px; }
h3 { font-weight: 700; font-size: 20px; line-height: 1.25; margin: 0 0 8px; }
p { margin: 0 0 14px; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 40em; }
.figures { font-family: var(--figures); }
.muted { color: var(--muted); }

/* Hero */
.hero { padding: 48px 0 24px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; } }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; padding: 0; list-style: none; }
.facts li { font: 500 14px/1 var(--figures); background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; padding: 9px 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; border-radius: 12px; font-weight: 700; text-decoration: none; border: 1.5px solid var(--accent); }
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.secondary { background: var(--paper); color: var(--ink); border-color: var(--rule-strong); }

/* Screens */
.screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.screens figure { margin: 0; }
.shot { border-radius: 22px; border: 1px solid var(--rule); background: var(--paper); overflow: hidden; box-shadow: 0 12px 32px rgba(22, 24, 29, .10); }
.screens figure:nth-child(2) { transform: translateY(28px); }
figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: center; }
.capture-note { font-size: 14px; color: var(--muted); margin-top: 40px; display: flex; gap: 8px; align-items: flex-start; }

/* Paper sections */
section { padding: 40px 0; }
.paper { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; }
.perf { height: 18px; margin: 18px -24px; display: flex; align-items: center; }
.perf::before, .perf::after { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--ground); border: 1px solid var(--rule); flex: none; }
.perf::before { margin-left: -9px; } .perf::after { margin-right: -9px; }
.perf span { flex: 1; border-top: 2px dotted var(--rule-strong); }

.journey { display: grid; gap: 24px; align-items: center; margin-top: 28px; }
@media (min-width: 900px) { .journey { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } .journey.flip > :first-child { order: 2; } }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.steps { padding-left: 20px; margin: 0 0 14px; }
.steps li { margin-bottom: 6px; }

.leader { display: flex; align-items: flex-end; gap: 8px; min-height: 32px; }
.leader .label { color: var(--muted); }
.leader .dots { flex: 1; border-bottom: 2px dotted var(--rule-strong); margin-bottom: 7px; min-width: 16px; }
.leader .value { font-family: var(--figures); text-align: right; }
.rules { display: grid; gap: 16px; }
@media (min-width: 900px) { .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.platforms { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .platforms { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.split { display: grid; gap: 16px; }
@media (min-width: 900px) { .split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stub-card { background: var(--stub); color: var(--stub-ink); border-radius: var(--radius); padding: 24px; border: 1px solid var(--rule); }
.copy-card { background: var(--copy); color: var(--copy-ink); border-radius: var(--radius); padding: 24px; border: 1px solid var(--rule); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist li::before { content: "✓"; font-weight: 800; color: var(--accent); flex: none; width: 1.2em; }
.checklist.no li::before { content: "✕"; color: var(--muted); }

pre, code { font-family: var(--figures); font-size: 14px; }
pre { background: var(--sunken); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; overflow-x: auto; margin: 0 0 16px; line-height: 1.5; }
:not(pre) > code { background: var(--sunken); padding: 1px 6px; border-radius: 4px; display: inline-block; max-width: 100%; overflow-wrap: anywhere; vertical-align: baseline; line-height: 1.4; }

.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.status { font: 700 12px/1 var(--figures); padding: 5px 8px; border-radius: 999px; white-space: nowrap; display: inline-block; }
.status.pass { background: var(--accent-soft); color: var(--accent-ink); }
.status.not-run { background: var(--stub); color: var(--stub-ink); }

.site-footer { border-top: 1px solid var(--rule); padding: 32px 0 48px; margin-top: 32px; font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 8px; }

@media (prefers-reduced-motion: no-preference) {
  .shot { transition: transform .3s ease; }
  .screens figure:hover .shot { transform: translateY(-4px); }
}

/* Grid children may shrink below their content's min-content width; long code
   then scrolls inside its own <pre> instead of widening the page. */
.hero-grid > *, .journey > *, .rules > *, .split > *, .platforms > *, .pair > * { min-width: 0; }
