:root {
  --bg: #11100f;
  --panel: #191715;
  --panel-2: #211e1b;
  --line: #322d28;
  --ink: #f1ece4;
  --muted: #a39a8d;
  --accent: #d8503c;
  --accent-soft: #3a1f1a;
  --ok: #6fbf73;
  --bad: #e0685a;
  --warn: #d9a441;
  --radius: 14px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 ui-serif, Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand, .btn, .eyebrow, .price {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Inter, system-ui, sans-serif;
}

a { color: inherit; }

/* nav */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 20px 24px;
  max-width: var(--maxw); margin: 0 auto;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -0.01em; }
.brand span { margin-left: 6px; }
.nav nav { display: flex; gap: 22px; font-size: 14px; }
.nav nav a { color: var(--muted); text-decoration: none; }
.nav nav a:hover { color: var(--ink); }

main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

section { padding: 72px 0; border-bottom: 1px solid var(--line); }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px;
  color: var(--accent); margin: 0 0 14px;
}

h1 { font-size: clamp(34px, 5.6vw, 58px); line-height: 1.08; margin: 0 0 20px; letter-spacing: -0.025em; }
h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 28px; letter-spacing: -0.02em; }
h3 { font-size: 17px; margin: 0 0 8px; }

.lede { font-size: 19px; color: var(--muted); max-width: 56ch; margin: 0 0 32px; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  text-decoration: none; font-size: 14px; font-weight: 600; border: 1px solid transparent;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: var(--line); color: var(--muted); }
.btn.ghost:hover { color: var(--ink); border-color: var(--muted); }

/* cards */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(226px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.card p { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.thumb {
  height: 108px; border-radius: 10px; margin-bottom: 14px;
  background: linear-gradient(140deg, var(--accent-soft), var(--panel-2));
  display: grid; place-items: center; font-size: 40px;
}
.thumb::after { content: attr(data-emoji); }
.price { font-size: 14px; font-weight: 600; color: var(--accent); }

/* split */
.split { display: grid; gap: 40px; grid-template-columns: 1.3fr 1fr; align-items: start; }
.split p { color: var(--muted); }
.quote {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 22px;
}
blockquote { margin: 0 0 10px; font-size: 18px; }
cite { color: var(--muted); font-size: 13px; font-style: normal; }

.letters p { color: var(--muted); max-width: 62ch; }

footer { max-width: var(--maxw); margin: 0 auto; padding: 36px 24px 64px; font-size: 13px; color: var(--muted); }
footer p { margin: 0 0 6px; }
.muted { opacity: 0.6; }

/* ── test console ───────────────────────────────────────────────────── */
.sp-toggle {
  position: fixed; right: 18px; bottom: 18px; z-index: 2147483000;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none;
  font-size: 19px; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.45);
}

.sp-console {
  position: fixed; right: 18px; bottom: 72px; z-index: 2147483000;
  width: min(370px, calc(100vw - 36px));
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  box-shadow: 0 16px 44px rgba(0,0,0,.55);
  max-height: min(78vh, 620px); overflow: auto;
}
.sp-console[hidden] { display: none; }
.sp-console header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sp-console header strong { font-family: ui-sans-serif, system-ui, sans-serif; font-size: 13px; }
.sp-console header button { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; }

.sp-row { margin-bottom: 12px; }
.sp-label { display: block; color: var(--muted); margin-bottom: 6px; }
.sp-modes { display: flex; flex-direction: column; gap: 6px; }
.sp-modes button {
  text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  font: inherit;
}
.sp-modes button small { display: block; color: var(--muted); margin-top: 2px; }
.sp-modes button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }

.sp-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0 0 12px; }
.sp-facts dt { color: var(--muted); }
.sp-facts dd { margin: 0; word-break: break-all; }
.ok   { color: var(--ok); }
.bad  { color: var(--bad); }
.warn { color: var(--warn); }

.sp-hint { color: var(--muted); margin: 0 0 10px; line-height: 1.5; }
.sp-log summary { color: var(--muted); cursor: pointer; }
.sp-log pre { white-space: pre-wrap; word-break: break-all; color: var(--muted); margin: 8px 0 0; }

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
}
