/* ==========================================================================
   Dosu-style components
   Requires tokens.css. Documented in docs/03-components.md
   ========================================================================== */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; border: 0 solid #e2e8f0; } /* Dosu's base (Tailwind preflight + shadcn border color) */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--c-page);
  color: #0f172a;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "rlig" 1, "calt" 1;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 400; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ---------- Typography ---------- */
.font-display { font-family: var(--font-display); font-weight: 400; }
.font-mono { font-family: var(--font-mono); }
.font-sans { font-family: var(--font-sans); }

.t-hero {            /* H1 — 81 / 0.9 */
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display-xl);
  line-height: 0.9;
  text-shadow: var(--text-shadow-hero);
}
.t-section {         /* H2 — 54 / 1 */
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display-md);
  line-height: 1;
}
.t-feature {         /* H3 in feature rows — 40.5 / 1.1 */
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display-sm);
  line-height: 1.1;
  text-wrap: balance;
}
.t-step {            /* H3 in timelines — 40.5 / 1 */
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display-sm);
  line-height: 1;
}
.t-card { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-display-xs); line-height: 1; }
.t-lead {            /* hero/section sub copy — 16 / 1.4, medium */
  font-size: 16px; font-weight: 500; line-height: 1.4;
}
.t-body {            /* feature paragraphs on cream */
  font-size: 16px; font-weight: 400; line-height: 1.5; letter-spacing: 0.01em;
  color: var(--c-text-body-light); text-wrap: pretty;
}
.t-body-dark { font-size: 16px; line-height: 1.4; color: var(--c-text-on-dark-muted); text-wrap: pretty; }
.t-small { font-size: 13px; font-weight: 500; line-height: 1.4; }
.t-eyebrow {         /* STEP 01 */
  font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.t-mono-label { font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.02em; }
.t-stat { font-family: var(--font-sans); font-size: 44px; font-weight: 700; line-height: 1; }
.t-num { font-family: var(--font-sans); font-size: 50px; font-weight: 600; line-height: 1; color: #fff; }
.em-olive { color: var(--c-olive); font-weight: 600; }

@media (max-width: 1023px) { .t-hero { font-size: var(--fs-display-md); } }
@media (max-width: 767px) {
  .t-hero { font-size: var(--fs-display-sm); }
  .t-section { font-size: var(--fs-display-sm); }
  .t-feature { font-size: var(--fs-display-xs); }
  .t-step { font-size: var(--fs-display-xs); }
}
@media (max-width: 639px) {
  .t-section { line-height: 1.1; text-wrap: balance; }
}

/* ---------- Sections & surfaces ---------- */
.section { position: relative; overflow: hidden; }
.section--cream { background: var(--c-cream); }
.section--dark { background: var(--c-dark); }
.section--dark-2 { background: var(--c-dark-2); }
.section--visible { overflow: visible; }

/* Grunge texture overlay: put as the first child of a section */
.grunge {
  pointer-events: none;
  position: absolute; inset: 0;
  background: var(--grunge, none) center / cover no-repeat; /* generated by js/pixel-art.js */
  opacity: 0.05;
  mix-blend-mode: color-burn;
}
.grunge--flip { transform: scaleY(-1); }
.section > *:not(.grunge):not(.divider):not(.abs) { position: relative; z-index: 2; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; }
.container--wide { max-width: var(--container-wide); }

/* ---------- Ornamental gold divider ---------- */
.divider {
  position: absolute; left: 0; right: 0; z-index: 20;
  height: 2px; background: var(--c-gold); box-shadow: var(--sh-divider);
}
.divider--top { top: 0; }
.divider--bottom { bottom: 0; }
.divider::before, .divider::after {
  content: ""; position: absolute; top: -4px; width: 10px; height: 10px;
  background: var(--c-gold); transform: rotate(45deg);
}
.divider::before { left: -5px; }
.divider::after { right: -5px; }
.divider svg { position: absolute; left: 50%; top: -7px; transform: translateX(-50%); }

/* ---------- Navigation ---------- */
.nav {
  position: absolute; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 132px; color: #fff;
}
.nav__brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-weight: 600; font-size: 28px; letter-spacing: -0.02em; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__link {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.9);
  white-space: nowrap; transition: color var(--dur-fast);
}
.nav__link:hover { color: var(--c-gold); }
.nav__sep { width: 1px; height: 28px; background: rgba(255, 255, 255, 0.2); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 1279px) { .nav { padding-inline: 64px; } }
.nav__burger { display: none; width: 40px; height: 40px; place-items: center; color: #fff; }
.nav__menu {
  position: absolute; top: calc(var(--nav-h) + 4px); right: 16px; left: 16px; display: none; flex-direction: column; gap: 4px; padding: 12px;
  background: rgba(14, 14, 14, 0.96); border: 1px solid var(--line-white-15); border-radius: var(--r-lg);
}
.nav__menu.is-open { display: flex; }
.nav__menu .nav__link { padding: 12px; border-radius: var(--r-md); }
.nav__menu .nav__link:hover { background: rgba(255, 255, 255, 0.1); }
@media (max-width: 1023px) { .nav__links, .nav__sep { display: none; } .nav__burger { display: grid; } }
@media (max-width: 639px) { .nav__actions { display: none; } }
@media (max-width: 879px) { .nav { padding-inline: 24px; } }

/* ---------- Buttons: "chunky 3D key" ----------
   Hard 0-blur bottom edge (--edge) of depth --d. Hover lifts 2px and the edge
   grows to --d-hover; press sinks by --d and the edge disappears.
   Sizes: sm 28px (d 3/4) · md 36px (d 4/6) · default 40px (d 4/6). */
.btn {
  --d: 4px; --d-hover: 6px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 4px 16px 2px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 700; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.3); border-radius: var(--r-md);
  cursor: pointer;
  transform: translate3d(0, 0, 0);
  box-shadow: 0 var(--d) 0 0 var(--edge);
  transition: transform var(--dur-fast) ease-out, box-shadow var(--dur-fast) ease-out, filter var(--dur-fast) ease-out;
}
.btn:hover { transform: translate3d(0, -2px, 0); filter: brightness(1.1); box-shadow: 0 var(--d-hover) 0 0 var(--edge); }
.btn:active { transition-duration: 75ms; transform: translate3d(0, var(--d), 0); box-shadow: 0 0 0 0 var(--edge); }
.btn--md { height: 36px; }
.btn--sm { --d: 3px; --d-hover: 4px; height: 28px; padding: 2px 16px 0; }

.btn--pink { --edge: var(--c-pink-depth); background: var(--c-pink); color: var(--c-pink-text); }
.btn--gray { --edge: var(--c-gray-btn-depth); background: var(--c-gray-btn); color: var(--c-gray-btn-text); }
.btn--white { --edge: var(--c-white-btn-depth); background: #fff; color: var(--c-ink); border-color: rgba(160, 160, 160, 0.54); }

/* ---------- Install / command pill (dashed) ---------- */
.cmd {
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 12px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 500; line-height: 1; letter-spacing: 0.02em;
  color: #fff; background: rgba(28, 28, 28, 0.55);
  border: 1.5px dashed rgba(255, 255, 255, 0.8); border-radius: var(--r-md);
  cursor: pointer; transition: background var(--dur-fast);
}
.cmd:hover { background: rgba(28, 28, 28, 0.75); }
.cmd__prompt { opacity: 0.5; }
.cmd__icon { width: 14px; height: 14px; opacity: 0.6; transition: opacity var(--dur-fast); }
.cmd:hover .cmd__icon { opacity: 1; }

/* ---------- Terminal window ---------- */
.terminal {
  position: relative; width: 100%; max-width: var(--container-wide); margin-inline: auto;
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line-white-10); border-radius: var(--r-lg);
  box-shadow: var(--sh-terminal);
}
.terminal__bar {
  position: relative; height: 34px; flex: none;
  display: flex; align-items: center; gap: 6px; padding: 0 10px;
  background: rgba(34, 34, 34, 0.85); border-bottom-width: 1px; border-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(44px); -webkit-backdrop-filter: blur(44px);
}
.terminal__title {
  position: absolute; left: 50%; translate: -50% 0;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; line-height: 12px; color: #fff; opacity: 0.9; white-space: nowrap;
}
.terminal__body {
  position: relative; flex: 1; padding: 16px; overflow: hidden;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.5; letter-spacing: 0.26px; color: #fff;
  background: rgba(17, 17, 17, 0.8);
  backdrop-filter: blur(60px); -webkit-backdrop-filter: blur(60px);
}
.terminal__out { white-space: pre-wrap; }
.terminal .muted { color: var(--c-terminal-muted); }
.terminal .ok { color: #43b74f; }
.terminal .on { color: #43b74f; }
.terminal .pink { color: var(--c-pink); }
.terminal .gold { color: var(--c-gold); }
.terminal .rule { display: block; border-top: 1px solid rgba(255, 255, 255, 0.35); max-width: 510px; margin: 14px 0; }
.terminal .cursor { display: inline-block; width: 8px; height: 15px; background: #fff; vertical-align: -3px; animation: terminal-blink 1s step-end infinite; }
@keyframes terminal-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ---------- Generated pixel art (js/pixel-art.js) ---------- */
.pixel-canvas { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }

/* ---------- Window lights & diamond (pure CSS) ---------- */
.lights { display: inline-flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: #fb6161; }
.lights i:nth-child(2) { background: #ffcd75; }
.lights i:nth-child(3) { background: #87ea44; }
.diamond { display: block; width: 10px; height: 10px; }
.diamond::before { content: ""; position: absolute; inset: 1.5px; background: var(--c-lime); transform: rotate(45deg); }
.diamond { position: relative; }

/* ---------- Hero dither edge (dark → cream transition) ---------- */
.dither-edge {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto;
  transform: translateY(calc(33.333% + 7px)); pointer-events: none; user-select: none; image-rendering: pixelated;
}

/* ---------- Logo marquee ---------- */
.marquee {
  --gap: 5rem; --duration: 50s;
  display: flex; overflow: hidden; gap: var(--gap); padding: 8px;
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track { display: flex; flex-shrink: 0; justify-content: space-around; gap: var(--gap); animation: marquee var(--duration) linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-100% - var(--gap))); } }
.marquee__item { height: 48px; display: flex; align-items: center; gap: 10px; opacity: 0.4; filter: grayscale(1); color: var(--c-ink); white-space: nowrap; }

/* ---------- Stats (inline, on cream) ---------- */
.stats { display: flex; justify-content: center; gap: 64px; }
.stat { text-align: center; color: var(--c-ink); }
.stat__label { margin-top: 8px; font-size: 14px; font-weight: 500; line-height: 1; opacity: 0.7; }

/* ---------- Comparison bars ---------- */
.compare { display: grid; gap: 56px; }
.compare__row { display: grid; grid-template-columns: 148px 1fr; align-items: center; gap: 24px; }
.compare__name { font-family: var(--font-display); font-size: var(--fs-display-xs); line-height: 1.1; color: var(--c-ink); display: flex; align-items: center; gap: 10px; }
.compare__meta { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 10px; font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.compare__meta--good { color: var(--c-olive); }
.compare__meta--bad { color: rgba(28, 28, 28, 0.6); }
.compare__lane { display: flex; gap: 4px; padding: 12px 0; border-block: 1px solid var(--line-ink-12); }
.bar {             /* box: <span class="bar bar--good-1"><span class="bar__label">…</span></span> */
  position: relative; display: block; height: 38px; border-radius: var(--r-sm); border: 1px solid; overflow: hidden;
  transform-origin: left; transition: transform 900ms var(--ease-out);
}
.bar__label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 8px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.06em;
}
.bar--good-1 { background: rgb(223, 230, 196); border-color: rgb(156, 176, 74); }
.bar--good-2 { background: rgb(203, 214, 166); border-color: rgb(156, 176, 74); }
.bar--good-1 .bar__label, .bar--good-2 .bar__label { color: var(--c-olive-deep); }
.bar--bad-1 { background: rgba(28, 28, 28, 0.07); border-color: rgba(28, 28, 28, 0.2); }
.bar--bad-2 { background: rgba(28, 28, 28, 0.12); border-color: rgba(28, 28, 28, 0.2); }
.bar--bad-1 .bar__label, .bar--bad-2 .bar__label { color: var(--c-ink); }
@media (max-width: 767px) { .compare__row { grid-template-columns: 1fr; gap: 12px; } .compare__meta { justify-content: flex-start; } }
@media (max-width: 639px) { .bar { height: 32px; } .bar__label { display: none; } .compare__meta { font-size: 11px; } }

/* ---------- Feature row (illustration panel + copy) ---------- */
.feature { display: grid; grid-template-columns: 508px 1fr; align-items: center; gap: 64px; width: 100%; max-width: var(--container-wide); margin-inline: auto; }
.feature__copy { padding: 0 40px; }
.feature__copy .t-feature { margin-bottom: 24px; color: var(--c-ink); }
.feature__copy .t-body { max-width: 432px; margin-bottom: 16px; }
.feature__copy .t-body:last-child { margin-bottom: 0; }
@media (max-width: 1279px) { .feature { grid-template-columns: 1fr; gap: 32px; max-width: 508px; } .feature__copy { padding: 0; } }

.panel {               /* illustration frame on cream */
  position: relative; width: 100%; aspect-ratio: 508 / 424; overflow: clip;
  border: 1px solid var(--line-ink-15); border-radius: var(--r-sm); background: var(--c-cream-panel);
}
.panel--dark { background: var(--c-panel-dark); border-color: var(--line-white-15); aspect-ratio: 434 / 424; }

/* Labelled outline group (e.g. "SaaS Apps", "AGENTS") inside a panel */
.group-box { position: absolute; border: 2px solid; border-radius: 8.6px; }
.group-box--pink { border-color: var(--c-pink); }
.group-box--green { border-color: var(--c-green); }
.group-box__label {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  padding: 0 8px; background: var(--c-cream-panel);
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.02em; white-space: nowrap;
}
.group-box--pink .group-box__label { color: var(--c-purple-label); }
.group-box--green .group-box__label { color: rgba(51, 74, 0, 0.8); }
.panel-label { position: absolute; padding: 0 8px; background: var(--c-cream-panel); font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.02em; color: rgba(129, 129, 129, 0.8); }

/* Notched "ticket" tile (concave corners) */
.tile {
  position: relative; width: 70px; height: 70px; display: grid; place-items: center;
  background: rgba(245, 245, 245, 0.5);
  border: 1px solid rgba(225, 89, 252, 0.2);
  --notch: 7px;
  mask:
    radial-gradient(circle var(--notch) at 0 0, #0000 98%, #000) top left,
    radial-gradient(circle var(--notch) at 100% 0, #0000 98%, #000) top right,
    radial-gradient(circle var(--notch) at 0 100%, #0000 98%, #000) bottom left,
    radial-gradient(circle var(--notch) at 100% 100%, #0000 98%, #000) bottom right;
  mask-size: 51% 51%; mask-repeat: no-repeat;
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 0, #0000 98%, #000) top left,
    radial-gradient(circle var(--notch) at 100% 0, #0000 98%, #000) top right,
    radial-gradient(circle var(--notch) at 0 100%, #0000 98%, #000) bottom left,
    radial-gradient(circle var(--notch) at 100% 100%, #0000 98%, #000) bottom right;
  -webkit-mask-size: 51% 51%; -webkit-mask-repeat: no-repeat;
}
.tile--sm { width: 38px; height: 38px; --notch: 4px; background: rgba(245, 245, 245, 0.6); border-color: rgba(28, 28, 28, 0.1); }
.tile--dark { background: #0d070e; border: 1px dashed rgba(255, 255, 255, 0.12); }
.tile--dark-olive { background: #0d070e; border-color: rgba(208, 228, 33, 0.35); }
.tile--dark-purple { background: #0d070e; border-color: rgba(225, 89, 252, 0.35); }

/* Glowing round badge with iridescent spinning halo */
.halo-badge { position: absolute; width: 64px; height: 64px; }
.halo-badge::before {
  content: ""; position: absolute; inset: -6%; border-radius: 50%;
  background: var(--halo); filter: blur(6px);
  animation: halo-spin 8s linear infinite;
}
.halo-badge__face {
  position: absolute; inset: 0; border-radius: 99px; display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(248, 250, 247, 0) 0%, rgba(165, 169, 160, 0.4) 126%), #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 0 0 2px rgba(0, 0, 0, 0.1);
}
@keyframes halo-spin { to { transform: rotate(360deg); } }

/* Document chip (white, display font) */
.doc-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  background: #fff; border: 1px solid var(--line-ink-12); border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  font-family: var(--font-display); font-size: 18px; color: #333; white-space: nowrap;   /* too small for the pixel grid; reads as plain small text */
}

/* ---------- Step timeline (dark) ---------- */
.steps { position: relative; display: flex; flex-direction: column; gap: 180px; max-width: var(--container); margin-inline: auto; }
.steps__rail { position: absolute; left: 8px; top: 92px; bottom: 92px; width: 1px; z-index: 1; }
.steps__rail-track { position: absolute; inset: 8px 0 0 0; background: rgba(208, 228, 33, 0.18); }
.steps__rail-fill { position: absolute; inset: 8px 0 auto 0; height: 0; background: var(--c-lime); transition: height 120ms linear; }
.steps__rail-cap { position: absolute; left: -4px; width: 9px; height: 9px; transform: rotate(45deg); background: var(--c-lime); }
.steps__rail-cap--top { top: 3px; }
.steps__rail-cap--bottom { bottom: -5px; background: rgba(208, 228, 33, 0.3); }
.steps__rail-knob {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%);
  width: 20px; height: 20px; border-radius: 32px; background: var(--c-lime); display: grid; place-items: center;
  transition: top 120ms linear;
}
.step { position: relative; z-index: 2; display: grid; grid-template-columns: 172px 356px 1fr; align-items: start; gap: 40px; }
.step__label { position: relative; display: flex; align-items: center; padding-top: 88px; }
.step__label .t-eyebrow { color: rgba(255, 255, 255, 0.45); transition: color var(--dur-med); }
.step__label .t-eyebrow { padding-left: 32px; text-transform: none; }
.step.is-active .step__label .t-eyebrow { color: var(--c-lime); }
.step__copy { padding-top: 78px; }
.step__copy .t-step { margin-bottom: 16px; color: #fff; }
.step__copy .t-body-dark { margin-bottom: 16px; }
.step__visual { width: 434px; justify-self: end; }
@media (max-width: 1279px) {
  .steps { gap: 120px; }
  .step { grid-template-columns: 172px 1fr; }
  .step__visual { grid-column: 2; justify-self: start; width: 100%; max-width: 434px; }
}
@media (max-width: 767px) {
  .steps { gap: 56px; } .steps__rail { display: none; }
  .step { grid-template-columns: 1fr; gap: 16px; }
  .step__label { padding: 0; }
  .step__label .t-eyebrow { color: var(--c-lime); }
  .step__label .t-eyebrow { padding-left: 0; }
  .step__copy { padding-top: 0; }
  .step__visual { grid-column: auto; }
}

/* ---------- Persona / tinted cards (on cream) ---------- */
.personas { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: 920px; margin: 64px auto 32px; }
.persona {
  position: relative; min-height: 471px; padding: 60px 19px 40px; text-align: center;
  border: 1px solid; border-radius: var(--r-sm);
}
.persona--purple { background: rgba(var(--c-purple), 0.05); border-color: rgba(var(--c-purple), 0.5); box-shadow: inset 0 0 8px rgba(var(--c-purple), 0.3); }
.persona--red { background: rgba(var(--c-red), 0.05); border-color: rgba(var(--c-red), 0.4); box-shadow: inset 0 0 8px rgba(var(--c-red), 0.2); }
.persona__art { width: 140px; height: 140px; margin: 0 auto 40px; display: grid; place-items: center; }
.persona--purple .persona__art { filter: drop-shadow(0 0 24px rgba(244, 189, 255, 0.5)); }
.persona--red .persona__art { filter: drop-shadow(0 0 24px rgba(255, 51, 51, 0.4)); }
.persona .t-card { margin-bottom: 16px; }
.persona--purple .t-card { color: var(--c-purple-title); }
.persona--red .t-card { color: var(--c-red-title); }
.persona p { margin-bottom: 12px; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--c-ink); opacity: 0.7; }
@media (max-width: 1023px) { .personas { grid-template-columns: 1fr; max-width: 440px; gap: 24px; } }

/* ---------- Dashed badge (e.g. certification) ---------- */
.badge-dashed {
  display: inline-flex; align-items: center; gap: 18px; padding: 7px 30px 7px 8px;
  border: 2px dashed rgba(var(--c-blue), 0.5); border-radius: var(--r-pill); background: rgba(var(--c-blue), 0.18);
}
.badge-dashed__text { font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: var(--c-blue-title); }
.badge-dashed__icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }

/* ---------- "Numbers" staircase (dark) ---------- */
.numbers { position: relative; height: 518px; }
.numbers__title { position: absolute; left: 0; top: 0; max-width: 460px; font-size: var(--fs-display-sm); line-height: 1.05; }
.numbers__bars { position: absolute; right: 0; bottom: 0; display: flex; align-items: flex-end; gap: 8px; }
.numbers__base { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(255, 255, 255, 0.1); }
.num-card { position: relative; width: 261px; }
.num-card__bar {
  position: absolute; inset: 0; border-radius: var(--r-xs); transform-origin: bottom;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.028) 100%);
}
.num-card__body { position: relative; z-index: 1; padding: 24px; }
.num-card__desc { margin-top: 14px; max-width: 213px; font-size: 14px; line-height: 1.4; color: var(--c-text-on-dark-subtle); }
@media (max-width: 1023px) {
  .numbers { height: auto; }
  .numbers__title { position: static; margin-bottom: 40px; max-width: none; }
  .numbers__bars { position: static; flex-direction: column; align-items: flex-start; gap: 16px; }
  .num-card { height: auto !important; min-height: 180px; width: 100%; }
  .num-card:nth-child(1) { width: 44%; min-width: 240px; }
  .num-card:nth-child(2) { width: 69%; min-width: 260px; }
}

/* ---------- Chips / tags (mono) ---------- */
.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 6px; white-space: nowrap;
  border-radius: var(--r-sm); border: 1px solid transparent;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; line-height: 1.4; letter-spacing: 0.02em; text-transform: uppercase;
}
.chip--lime { background: var(--c-lime-chip); color: var(--c-lime-chip-text); }
.chip--pink { background: rgba(0, 0, 0, 0.5); border-color: rgba(238, 103, 209, 0.5); color: var(--c-pink); }
.chip--pink:hover { border-color: var(--c-pink); }
.chip--neutral { background: rgba(0, 0, 0, 0.5); border-color: rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.7); }

.filter {
  display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.15); background: transparent; transition: background var(--dur-fast);
  font-family: var(--font-mono); font-size: 14px; font-weight: 500; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; color: #fff;
}
.filter:hover { background: rgba(255, 255, 255, 0.1); }
.filter.is-active { background: rgba(255, 255, 255, 0.2); border-color: rgba(28, 28, 28, 0.1); }

/* ---------- Dark content card (blog-style) ---------- */
.card {
  position: relative; display: flex; flex-direction: column; gap: 24px; min-height: 375px; padding: 32px;
  background: var(--c-ink); border: 1px solid var(--line-white-10); border-radius: var(--r-lg); color: #fff;
  transition: border-color var(--dur-fast) ease-out, transform var(--dur-fast) ease-out;
}
.card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.25); }
.card__meta { display: flex; gap: 12px; font-family: var(--font-mono); font-size: 14px; font-weight: 500; line-height: 1.4; }
.card__meta .date { color: rgba(255, 255, 255, 0.8); }
.card__meta .slash { color: rgba(255, 255, 255, 0.35); }
.card__meta .accent { color: var(--c-pink); }
.card__title { font-family: var(--font-display); font-size: var(--fs-display-xs); line-height: 1.1; }
.card__excerpt { font-family: var(--font-mono); font-size: 14px; line-height: 1.4; color: rgba(255, 255, 255, 0.8); }

/* ---------- Code block (dark) ---------- */
.code {
  border-radius: 6px; overflow: hidden; background: #1c1c1c; border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); font-family: var(--font-mono); font-size: 10.5px; line-height: 1.45; color: #e6e3d7;
}
.code__head { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; background: #2a2a2a; color: #fff; font-size: 10.5px; }
.code__body { padding: 10px 0; }
.code__line { display: block; padding: 0 12px; white-space: pre; }
.code__line .ln { display: inline-block; width: 22px; color: #6b6b6b; }
.code__line--del { background: rgba(209, 68, 47, 0.45); }
.code__line--add { background: rgba(82, 164, 15, 0.35); }
.code .k { color: var(--syntax-pink); }
.code .s { color: var(--syntax-gold); }
.code .t { color: #7ec8e3; }
.code .f { color: #7bcd84; }
.code .c { color: var(--syntax-gray); font-style: italic; }

/* ---------- CTA band ---------- */
.cta { height: 641px; padding: 220px 200px; }
.cta__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.cta__media.pixel-canvas { filter: brightness(0.62) saturate(0.9); } /* generated scenes are brighter than Dosu's footer video */
.cta__shade { position: absolute; inset: 0; background: linear-gradient(rgba(14, 14, 14, 0.85) 0%, rgba(14, 14, 14, 0) 45%, rgba(14, 14, 14, 0.95) 100%); }
.cta h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-display-lg); line-height: 1; margin-bottom: 8px; }
.cta p { font-family: var(--font-mono); font-size: 16px; line-height: 1.4; opacity: 0.8; margin-bottom: 32px; max-width: 620px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 1023px) { .cta { height: auto; padding: 120px 48px; } .cta h2 { font-size: var(--fs-display-sm); } }
@media (max-width: 767px) { .cta { padding: 80px 24px; } .cta h2 { font-size: var(--fs-display-sm); } }

/* ---------- Footer ---------- */
.footer { position: relative; overflow: hidden; background: var(--c-dark); color: #fff; padding: 124px 200px 0; }
.footer__grid { display: grid; grid-template-columns: 462px 1fr auto; align-items: start; gap: 32px; max-width: var(--container); margin: 0 auto; }
.footer__addr { font-family: var(--font-mono); font-style: normal; font-size: 16px; font-weight: 500; line-height: 1.4; opacity: 0.5; }
.footer__cols { display: flex; gap: 40px; }
.footer__col { display: flex; flex-direction: column; gap: 16px; }
.footer__head { font-family: var(--font-mono); font-size: 16px; font-weight: 500; opacity: 0.5; margin-bottom: 4px; }
.footer__col a { font-family: var(--font-mono); font-size: 16px; font-weight: 500; line-height: 1.5; transition: opacity var(--dur-fast); }
.footer__col a:hover { opacity: 0.7; }
.footer__social { display: flex; align-items: center; gap: 20px; opacity: 0.4; }
.footer__wordmark {   /* giant dotted wordmark bleeding off the bottom */
  margin: 72px auto 0; max-width: var(--container); text-align: center;
  font-family: var(--font-sans); font-weight: 800; font-size: clamp(88px, 18vw, 262px); line-height: 0.8; letter-spacing: -0.04em;
  color: transparent;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.11) 1.1px, transparent 1.4px) 0 0 / 5px 5px;
  -webkit-background-clip: text; background-clip: text;
  transform: translateY(18%);
  user-select: none;
}
.footer__fade { pointer-events: none; position: absolute; inset: auto 0 0 0; height: 220px; z-index: 1; background: linear-gradient(to top, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0.14) 40%, rgba(0, 0, 0, 0) 100%); }
@media (max-width: 1279px) { .footer { padding: 80px 48px 0; } }
@media (max-width: 1023px) { .footer__grid { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .footer { padding-inline: 24px; } }

/* ---------- Prose (long-form article on dark #131313) ---------- */
.prose { max-width: 760px; font-family: var(--font-sans); font-size: 16px; line-height: 1.5; letter-spacing: 0.015em; color: rgba(255, 255, 255, 0.7); }
.prose > * + * { margin-top: 24px; }
.prose p { margin: 0; }
.prose p + p { margin-top: 16px; }
.prose > p:first-child, .prose .lede { font-size: 18px; }
.prose strong { font-weight: 600; color: #fff; }
.prose em { font-style: italic; }
.prose :is(h1, h2, h3, h4) { margin: 0; font-family: var(--font-display); font-weight: 400; line-height: 1.2; color: #fff; }
.prose :is(h1, h2) { margin-top: 56px; font-size: var(--fs-display-sm); }
.prose h3 { margin-top: 40px; font-size: var(--fs-display-xs); }
.prose h4 { margin-top: 32px; font-size: var(--fs-display-xs); color: rgba(255, 255, 255, 0.8); }
.prose :is(h5, h6) { margin: 24px 0 0; font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.prose h5 { font-size: 14px; color: rgba(255, 255, 255, 0.8); }
.prose h6 { font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.prose :is(h1, h2, h3, h4) + * { margin-top: 8px !important; }
.prose a { font-weight: 500; color: var(--c-gold); text-decoration: underline; text-decoration-color: rgba(201, 167, 113, 0.4); text-underline-offset: 3px; transition: color var(--dur-fast); }
.prose a:hover { color: var(--c-pink); text-decoration-color: rgba(238, 103, 209, 0.6); }
.prose :is(ul, ol) { margin: 0; padding-left: 24px; }
.prose li { margin: 8px 0; padding-left: 4px; }
.prose li::marker { color: rgba(255, 255, 255, 0.4); }
.prose blockquote {
  margin: 24px 0 !important; padding: 16px 24px; border-left: 3px solid rgba(201, 167, 113, 0.8); border-radius: 0 6px 6px 0;
  background: rgba(255, 255, 255, 0.035); font-size: 18px; line-height: 1.55; letter-spacing: 0.01em; color: rgba(255, 255, 255, 0.9);
}
.prose code { padding: 2px 6px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 4px; background: rgba(255, 255, 255, 0.06); font-family: var(--font-mono); font-size: 0.85em; color: #fff; }
.prose pre { margin-bottom: 0; padding: 16px; overflow-x: auto; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 4px; background: rgb(17, 17, 17); font-family: var(--font-mono); font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, 0.9); white-space: pre-wrap; overflow-wrap: break-word; }
.prose pre code { padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; }
.prose hr { margin: 40px 0; height: 2px; border: 0; background: linear-gradient(90deg, rgba(201, 167, 113, 0) 0%, rgba(201, 167, 113, 0.7) 25%, rgba(236, 213, 176, 0.7) 50%, rgba(201, 167, 113, 0.7) 75%, rgba(201, 167, 113, 0) 100%); }
.prose img { max-width: 100%; height: auto; }
.prose figcaption { margin-top: 12px; font-size: 16px; font-style: italic; text-align: center; color: rgba(255, 255, 255, 0.7); }
.prose table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.prose th { padding: 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.2); font-family: var(--font-mono); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #fff; }
.prose td { padding: 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.7); }
.prose .hljs-keyword, .prose .hljs-built_in, .prose .hljs-title, .prose .hljs-attr, .prose .hljs-function { color: var(--syntax-gold); }
.prose .hljs-string { color: var(--syntax-cream); }
.prose .hljs-number, .prose .hljs-literal { color: var(--syntax-pink); }
.prose .hljs-comment { color: var(--syntax-gray); font-style: italic; }
.prose .hljs-punctuation, .prose .hljs-operator, .prose .hljs-params, .prose .hljs-variable { color: var(--syntax-punct); }
@media (max-width: 639px) { .prose :is(h1, h2) { font-size: var(--fs-display-sm); } .prose h3 { font-size: var(--fs-display-xs); } .prose > p:first-child { font-size: 16px; } }

/* ==========================================================================
   Multi-page components (pricing, journal, article, error)
   ========================================================================== */

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 14px; border-radius: 6px; background: var(--c-ink); color: #fff; border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em; transition: opacity 200ms, transform 200ms;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.nav__link.is-current { color: var(--c-gold); }

/* ---------- Extra button variants ---------- */
.btn--ink { --edge: #000; background: var(--c-ink); color: #fff; border-color: rgba(255, 255, 255, 0.15); }
.btn--block { width: 100%; }
.pill-violet {
  display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 2px 14px 0; border-radius: 40px;
  background: var(--c-violet); color: #fff; font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: 0.01em;
  white-space: nowrap; transition: transform 75ms ease-out;
}
.pill-violet:active { transform: translateY(1px); }
.pill-violet .dim { opacity: 0.7; }
.cmd--ink { width: 100%; height: 32px; justify-content: space-between; font-size: 12px; background: #4a4a4a; border: 1.5px dashed rgba(255, 255, 255, 0.45); }
.cmd--ink:hover { background: #3a3a3a; }

/* ---------- Illustrated hero shell (generated scene behind) ---------- */
.scene-hero { position: relative; background: var(--c-dark); overflow: visible; z-index: 3; }
.scene-hero__bg { position: absolute; inset: -82px 0 auto 0; height: 901px; z-index: 0; overflow: hidden; }
.scene-hero__shade {
  position: absolute; inset: 0 0 auto 0; height: 520px; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.86) 35%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0) 100%);
}
.scene-hero .dither-edge { z-index: 2; }

/* ---------- Text hero on stone (blog/journal style) ---------- */
.page-hero { position: relative; overflow: hidden; background: var(--c-dark-3); padding: 137px 64px 88px; }
.grunge--dodge { opacity: 0.8; mix-blend-mode: color-dodge; }
.page-hero__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-display-xl); line-height: 0.9; color: #fff; text-align: center; text-shadow: var(--text-shadow-hero); overflow-wrap: anywhere; }
.page-hero__lead { max-width: 648px; margin: 16px auto 0; font-family: var(--font-mono); font-size: 16px; line-height: 1.4; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.8); text-align: center; }
@media (max-width: 1023px) { .page-hero { padding: 120px 24px 64px; } .page-hero__title { font-size: var(--fs-display-md); } }

/* ---------- Billing toggle ---------- */
.toggle-row { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-size: 18px; font-weight: 700; line-height: 1; color: #fff; }
.toggle { position: relative; width: 48px; height: 28px; padding: 0; border-radius: 4px; background: #5a5a5a; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25); cursor: pointer; transition: background 150ms; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 3px; background: #fff; transition: left 150ms ease-out; }
.toggle[aria-pressed="true"] { background: var(--c-green); }
.toggle[aria-pressed="true"]::after { left: 23px; }

/* ---------- Plan cards ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; width: 100%; max-width: 964px; margin: 0 auto; }
.plan {
  position: relative; display: flex; flex-direction: column; min-height: 610px; padding: 24px;
  background: var(--c-card-light); border: 1px solid transparent; border-radius: var(--r-sm); box-shadow: var(--sh-card);
}
.plan--featured { border-color: var(--c-lime-border); }
.plan__name { margin: 0 0 8px; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-display-xs); line-height: 1; color: var(--c-slate); }
.plan__chip { position: absolute; right: 24px; top: 24px; padding: 2px 8px; border-radius: 4px; background: var(--c-chip-pink-bg); color: var(--c-chip-pink-text); font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.04em; }
.plan__desc { min-height: 42px; margin: 0 0 16px; font-family: var(--font-mono); font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--c-ink); opacity: 0.7; }
.plan__price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 2px; font-family: var(--font-mono); font-size: 28px; font-weight: 500; letter-spacing: 0.02em; color: var(--c-slate); }
.plan__per { font-size: 14px; opacity: 0.7; }
.plan__note { min-height: 18px; margin: 0 0 14px; font-family: var(--font-mono); font-size: 12px; color: var(--c-slate); opacity: 0.6; }
.plan__credits { margin: 0 0 12px; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--c-slate); }
.plan__cta { margin-bottom: 20px; }
.plan__plus { margin: 0 0 12px; font-family: var(--font-mono); font-size: 13px; font-style: italic; color: var(--c-slate); opacity: 0.8; }
@media (max-width: 1279px) { .plans { grid-template-columns: repeat(2, 1fr); padding: 0 24px; } }
@media (max-width: 767px) { .plans { grid-template-columns: 1fr; } .plan { min-height: 0; } }

/* Pixel check list */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { display: flex; align-items: flex-start; gap: 10px; font-family: var(--font-mono); color: var(--c-slate); }
.checks strong { display: block; font-size: 13px; font-weight: 700; line-height: 1.3; letter-spacing: 0.02em; }
.checks em { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; font-style: normal; line-height: 1.4; opacity: 0.7; }
.pixel-check {
  flex: none; display: inline-block; width: 16px; height: 16px; margin-top: 2px; background: var(--c-green);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M1 6h1v2H1zM2 7h1v2H2zM3 8h1v2H3zM4 7h1v2H4zM5 6h1v2H5zM6 5h1v2H6zM7 4h1v2H7zM8 3h1v2H8zM9 2h1v2H9zM10 1h1v2h-1z'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M1 6h1v2H1zM2 7h1v2H2zM3 8h1v2H3zM4 7h1v2H4zM5 6h1v2H5zM6 5h1v2H6zM7 4h1v2H7zM8 3h1v2H8zM9 2h1v2H9zM10 1h1v2h-1z'/></svg>") center / contain no-repeat;
}
.pixel-check--lg { width: 24px; height: 24px; margin: 0; }
.checks li.is-off { opacity: 0.55; }
.checks li.is-off::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 3px; border: 1.5px solid var(--c-slate-2); border-radius: 50%; opacity: 0.6; }

/* ---------- Plan comparison table ---------- */
.ptable { width: 100%; max-width: 1040px; margin: 0 auto; }
.ptable__head, .ptable__row { display: grid; grid-template-columns: 348px repeat(3, 1fr); }
.ptable__head { align-items: end; padding-bottom: 16px; }
.ptable__plan { padding: 0 24px; text-align: left; }
.ptable__plan .plan__name { font-size: var(--fs-display-xs); }
.ptable__plan .plan__price { font-size: 20px; }
.ptable__group { margin: 32px 0 8px; padding-left: 16px; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-display-xs); color: var(--c-slate); }
.ptable__row { border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
.ptable__row:nth-child(even) { background: rgba(28, 28, 28, 0.06); }
.ptable__label { padding: 22px 0 22px 16px; font-family: var(--font-mono); font-size: 15px; font-weight: 500; letter-spacing: 0.02em; color: var(--c-slate-2); }
.ptable__cell { display: flex; align-items: center; justify-content: center; padding: 22px 24px; font-family: var(--font-mono); font-size: 13px; color: var(--c-slate); }
.ptable__cell .no { opacity: 0.35; }
@media (max-width: 1023px) {
  .ptable { overflow-x: auto; }
  .ptable__head, .ptable__row { grid-template-columns: 180px repeat(3, minmax(100px, 1fr)); min-width: 560px; }
  .ptable__label { font-size: 13px; padding: 16px 12px 16px 16px; }
  .ptable__cell { padding: 16px 10px; }
}

/* ---------- FAQ (native <details>) ---------- */
.faq { max-width: 860px; margin: 0 auto; border-top: 1px solid var(--line-white-10); }
.faq details { border-bottom: 1px solid var(--line-white-10); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: var(--fs-display-xs); line-height: 1.1; color: #fff;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-family: var(--font-mono); font-size: 22px; color: var(--c-gold); transition: transform var(--dur-med) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--c-gold); }
.faq .faq__a { max-width: 720px; padding: 0 0 28px; font-size: 16px; line-height: 1.5; letter-spacing: 0.015em; color: rgba(255, 255, 255, 0.7); }
.faq .faq__a a { color: var(--c-gold); text-decoration: underline; text-decoration-color: rgba(201, 167, 113, 0.4); text-underline-offset: 3px; }
@media (max-width: 767px) { .faq summary { padding: 22px 0; } }

/* ---------- Journal: search, filters, featured, grid ---------- */
.search { display: flex; align-items: center; gap: 8px; width: 275px; height: 36px; padding: 0 10px; border: 1px solid var(--line-white-15); border-radius: var(--r-lg); cursor: text; transition: border-color var(--dur-fast); }
.search:focus-within { border-color: rgba(255, 255, 255, 0.5); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: #fff; font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.04em; }
.search input::placeholder { color: rgba(255, 255, 255, 0.5); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters__sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line-white-15); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.card[hidden] { display: none; }
.card__body { display: flex; flex: 1; flex-direction: column; gap: 8px; }
.card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.card__excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__chips { display: flex; flex-wrap: nowrap; gap: 8px; min-width: 0; overflow: hidden; }
.card .chip { position: relative; z-index: 2; }
.empty { padding: 64px 0; font-family: var(--font-mono); font-size: 14px; color: rgba(255, 255, 255, 0.55); text-align: center; }
@media (max-width: 1279px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .card-grid { grid-template-columns: 1fr; } .search { width: 100%; } }

.featured {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 552px; padding: 56px;
  overflow: hidden; border: 1px solid var(--line-white-10); border-radius: var(--r-lg); color: #fff;
}
.featured__media { position: absolute; inset: 0; z-index: 0; }
.featured__shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(13, 13, 13, 0.92) 0%, rgba(13, 13, 13, 0.6) 55%, rgba(13, 13, 13, 0.15) 100%), linear-gradient(0deg, rgba(13, 13, 13, 0.85) 0%, rgba(13, 13, 13, 0) 50%); }
.featured > *:not(.featured__media):not(.featured__shade) { position: relative; z-index: 2; }
.featured__title { margin: 0; max-width: 661px; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-display-md); line-height: 1; }
.featured__title a::after { content: ""; position: absolute; inset: 0; }
.featured__excerpt { max-width: 420px; font-family: var(--font-mono); font-size: 14px; line-height: 1.4; color: rgba(255, 255, 255, 0.85); }
.featured__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 58px; }
@media (max-width: 1023px) { .featured { padding: 32px; } .featured__title { font-size: var(--fs-display-sm); } }
@media (max-width: 767px) { .featured { min-height: 0; gap: 20px; padding: 24px; } .featured__foot { flex-direction: column; align-items: flex-start; gap: 20px; } .featured__title { font-size: var(--fs-display-sm); } }

/* ---------- Avatars & bylines ---------- */
.avatar { position: relative; flex: none; display: grid; place-items: center; width: 32px; height: 32px; overflow: hidden; border: 2px solid #fff; border-radius: 50%; background: rgb(217, 217, 217); }
.avatars { display: flex; }
.avatars .avatar + .avatar { margin-left: -10px; }
.author { display: flex; align-items: center; gap: 16px; font-family: var(--font-mono); line-height: 1.4; }
.author__name { font-size: 14px; font-weight: 700; color: #fff; }
.author__role { font-size: 13px; color: rgba(255, 255, 255, 0.5); }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 14px; font-weight: 500; line-height: 1.4; }
.byline .who { color: #fff; font-weight: 700; }
.byline .date { color: rgba(255, 255, 255, 0.8); }
.byline .slash { color: rgba(255, 255, 255, 0.35); }
.byline .accent { color: var(--c-pink); }

/* ---------- Article ---------- */
.article-page { position: relative; overflow: hidden; background: var(--c-dark-3); padding: 120px 64px 120px; }
.back-link { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 32px; font-family: var(--font-mono); font-size: 14px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: #fff; opacity: 0.5; transition: opacity var(--dur-fast); }
.back-link:hover { opacity: 0.8; }
.article-frame { position: relative; z-index: 2; width: 100%; max-width: 1040px; margin: 0 auto; padding: 120px 140px; overflow: hidden; border-radius: var(--r-sm); background: var(--c-dark-2); box-shadow: var(--sh-card); }
.article-frame::before, .article-frame::after { content: ""; position: absolute; left: 0; right: 0; z-index: 1; height: 2px; background: var(--gold-rule); box-shadow: var(--sh-divider); }
.article-frame::before { top: 0; }
.article-frame::after { bottom: 0; }
.article-frame__guides { pointer-events: none; position: absolute; inset: 0 200px; z-index: 0; display: flex; justify-content: space-between; }
.article-frame__guides span { width: 1px; background: rgba(255, 255, 255, 0.04); }
.article-frame > *:not(.article-frame__guides) { position: relative; z-index: 2; }
.article__title { margin: 0 0 16px; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-display-lg); line-height: 0.9; color: #fff; }
.article__sub { max-width: 760px; margin: 0; font-size: 18px; line-height: 1.5; letter-spacing: 0.015em; color: rgba(255, 255, 255, 0.7); }
.article__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.article__meta { margin: 24px 0 56px; }
.article__figure { margin: 0; }
.prose > .article__figure { margin-top: 32px; margin-bottom: 8px; }
.article__figure .pixel-canvas { aspect-ratio: 16 / 10; height: auto; border: 1px solid var(--line-white-15); border-radius: var(--r-sm); }
@media (max-width: 1279px) { .article-frame { padding: 100px 80px; } .article-frame__guides { inset: 0 80px; } }
@media (max-width: 1023px) { .article-page { padding: 100px 24px 80px; } .article-frame { padding: 80px 48px; } .article-frame__guides { display: none; } }
@media (max-width: 767px) { .article-frame { padding: 56px 28px; } .article__title { font-size: var(--fs-display-md); } }
@media (max-width: 639px) { .article-frame { padding: 40px 16px; } .article__title { font-size: var(--fs-display-sm); line-height: 1; } }

/* ---------- Newsletter / subscribe ---------- */
.subscribe { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.subscribe input {
  flex: 1 1 240px; height: 40px; padding: 0 14px; border: 1.5px dashed rgba(255, 255, 255, 0.6); border-radius: var(--r-md);
  background: rgba(28, 28, 28, 0.55); color: #fff; font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.02em; outline: 0;
}
.subscribe input::placeholder { color: rgba(255, 255, 255, 0.5); }
.subscribe input:focus { border-color: #fff; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translate3d(0, 8px, 0); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   arena-pixel-art: leaderboard table (.board)
   Cream by default; .board--dark (or any dark section) for dark surfaces.
   Rank 1–3 show a medal sprite, the number stays for screen readers.
   In a .board-wrap narrower than 810px each row stacks into a card, labels come from data-label.
   ========================================================================== */
.board {
  --board-ink: var(--c-ink);
  --board-muted: rgba(28, 28, 28, 0.62);
  --board-line: rgba(28, 28, 28, 0.14);
  --board-zebra: rgba(28, 28, 28, 0.04);
  --board-hover: rgba(28, 28, 28, 0.07);
  --board-value: #8a6424;                       /* gold darkened to stay legible on cream */
  --board-wr-bg: rgba(201, 167, 113, 0.22);
  --board-wr-edge: var(--c-gold);
  width: 100%; border-collapse: collapse; text-align: left;
  font-family: var(--font-sans); font-size: 15px; line-height: 1.35; color: var(--board-ink);
  font-variant-numeric: tabular-nums;
}
.board--dark, :is(.section--dark, .section--dark-2, .stage--dark) .board {
  --board-ink: #fff;
  --board-muted: rgba(255, 255, 255, 0.6);
  --board-line: rgba(255, 255, 255, 0.12);
  --board-zebra: rgba(255, 255, 255, 0.03);
  --board-hover: rgba(255, 255, 255, 0.07);
  --board-value: var(--c-gold);
  --board-wr-bg: rgba(201, 167, 113, 0.12);
}
.board__caption {
  caption-side: top; padding: 0 0 12px; text-align: left;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--board-muted);
}
.board th {
  padding: 10px 12px; border-bottom: 2px solid var(--board-line); white-space: nowrap;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--board-muted);
}
.board td { padding: 10px 12px; border-bottom: 1px solid var(--board-line); vertical-align: middle; }
.board tbody tr:nth-child(even) { background: var(--board-zebra); }
.board tbody tr { transition: background var(--dur-fast); }
.board tbody tr:hover { background: var(--board-hover); }

/* rank: medal sprite for 1–3, a mono number below that */
.board__rank { width: 64px; text-align: center; }
.board td.board__rank { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--board-muted); }
.board__medal { display: inline-flex; vertical-align: middle; }
.board__medal + .board__n { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* value: the headline number in the gold display face */
.board__value { white-space: nowrap; }
.board__num { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-display-xs); line-height: 1; letter-spacing: 0; color: var(--board-value); }
.board__unit { margin-left: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--board-muted); }

.board__player { font-weight: 600; color: inherit; text-decoration: none; }
a.board__player:hover { color: var(--board-value); text-decoration: underline; text-underline-offset: 3px; }
.board__champ { color: var(--board-ink); }
.board__meta { font-family: var(--font-mono); font-size: 13px; color: var(--board-muted); white-space: nowrap; }
.board__video { display: inline-flex; padding: 2px; border-radius: var(--r-sm); line-height: 0; }
.board__video:hover { filter: brightness(1.15); }
.board__video:focus-visible, .board__player:focus-visible { outline: 2px solid var(--c-hextech); outline-offset: 2px; }

/* status chip */
.board__status {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px 0 6px; white-space: nowrap;
  border: 1px solid currentColor; border-radius: var(--r-sm);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.board__status .sprite { display: inline-flex; }
.board__status--verified { color: var(--c-hextech-deep); background: rgba(10, 200, 185, 0.12); }
.board__status--pending { color: #7e5a21; background: rgba(201, 167, 113, 0.16); }
.board__status--rejected { color: rgb(var(--c-red)); background: rgba(var(--c-red), 0.08); }
.board__status--superseded { color: var(--board-muted); background: transparent; border-style: dashed; }
.board--dark .board__status--verified, :is(.section--dark, .section--dark-2, .stage--dark) .board__status--verified { color: var(--c-hextech); }
.board--dark .board__status--pending, :is(.section--dark, .section--dark-2, .stage--dark) .board__status--pending { color: var(--c-gold); }

/* the world record row */
.board__row--wr, .board tbody tr.board__row--wr:nth-child(even) { background: var(--board-wr-bg); }
.board__row--wr > :first-child { box-shadow: inset 3px 0 0 var(--board-wr-edge); }
.board__row--wr .board__num { font-size: var(--fs-display-sm); }
.board__wr {
  display: inline-flex; align-items: center; height: 20px; margin-left: 8px; padding: 0 6px; vertical-align: 4px;
  border-radius: var(--r-sm); background: var(--c-gold); color: var(--c-ink);
  font-family: var(--font-mono); font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
}

/* Stacked cards whenever the board's box is too narrow for its columns: a phone, a sidebar layout, a grid of
   top-3 boards. The wrapper is the container, so cards follow the room the board gets, not the screen. */
.board-wrap { container: board / inline-size; }
@container board (width < 810px) {
  .board, .board tbody, .board tr, .board td { display: block; }
  .board thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .board caption { display: block; }
  .board tbody tr {
    display: grid; grid-template-columns: 52px 1fr; column-gap: 12px;
    margin-bottom: 12px; padding: 12px; border: 1px solid var(--board-line); border-radius: var(--r-sm);
  }
  .board tbody tr:nth-child(even) { background: transparent; }
  .board__row--wr, .board tbody tr.board__row--wr:nth-child(even) { background: var(--board-wr-bg); border-color: var(--board-wr-edge); }
  .board__row--wr > :first-child { box-shadow: none; }
  .board td { grid-column: 2; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .board td[data-label]::before {
    content: attr(data-label);
    font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--board-muted);
  }
  .board td.board__rank { grid-column: 1; grid-row: 1 / span 20; display: block; width: auto; padding-top: 2px; text-align: center; }
  .board td.board__rank::before, .board td.board__value::before { content: none; }
  .board td.board__value { justify-content: flex-start; gap: 0; padding-bottom: 8px; }
  /* Hidden from sight but kept as a cell, so a screen reader's table navigation still lines cells up with headers. */
  .board td:empty { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); }
  .board td:empty::before { content: none; }
}
