/* ==========================================================================
   Here2Win Slot Catalogs — Shared Structural & Token-Driven Design System
   Widescreen 1800px+ architecture · Mobile-first from 320px · Zero overflow
   ========================================================================== */

:root {
  --container-max: 1760px;
  --gutter: 12px;
  --bg: #f7f8f6;
  --surface: #ffffff;
  --surface-alt: #eef2f5;
  --ink: #17202a;
  --muted: #4b5a69;
  --border: #d5dce4;
  --border-strong: #aebac8;
  --accent: #0b6b5a;
  --accent-ink: #ffffff;
  --accent-soft: rgba(11, 107, 90, 0.11);
  --cta-bg: var(--accent);
  --cta-ink: var(--accent-ink);
  --cta-hover: var(--accent);
  --radius: 10px;
  --radius-sm: 6px;
  --focus-ring: #0b6b5a;
  --shadow-sm: 0 2px 10px rgba(10, 16, 24, 0.06);
  --shadow-md: 0 10px 28px rgba(10, 16, 24, 0.12);
  --font-display: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

@media (min-width: 720px) {
  :root {
    --gutter: 16px;
  }
}

@media (min-width: 1440px) {
  :root {
    --gutter: 24px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

/* Accessible focus ring across all interactive elements */
:is(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
}

.skip:focus,
.skip:focus-visible {
  left: 12px;
  top: 12px;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--focus-ring);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
}

/* ==========================================================================
   Widescreen Full-Bleed Chrome & Fluid 1760px Container System
   ========================================================================== */
h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 3.2rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 10px;
  color: var(--ink);
}

h1 .brand {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  color: var(--accent);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.68rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.22;
  margin: 32px 0 16px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}

h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.top {
  display: flex;
  gap: 10px 18px;
  align-items: center;
  flex-wrap: wrap;
  padding-block: 14px;
  padding-inline: max(var(--gutter), calc((100% - var(--container-max)) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 1.2rem;
  text-decoration: none;
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
}

.nav {
  display: flex;
  gap: 6px 14px;
  flex-wrap: wrap;
  flex: 1 1 420px;
  min-width: 0;
  align-items: center;
}

.nav a {
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 2px;
}

.nav a[aria-current="page"],
.nav a.is-active {
  font-weight: 700;
  color: var(--accent);
}

.top > .btn {
  flex: 0 0 auto;
  margin-left: auto;
  text-align: center;
  line-height: 1.25;
  white-space: nowrap;
}

.main {
  width: min(var(--container-max), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
  padding: 24px 0 64px;
  min-width: 0;
}

.cat-article,
.sheet,
.block,
.hero,
.weave {
  min-width: 0;
}

.block {
  margin-top: 28px;
}

.hero {
  margin-bottom: 22px;
}

.weave {
  margin: 14px 0;
}

/* ==========================================================================
   Buttons & 8 Interactive States
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
  filter: brightness(0.95);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.btn[aria-busy="true"] {
  opacity: 0.72;
  cursor: progress;
}

.btn[aria-selected="true"],
.btn.is-active {
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.btn-play {
  background: var(--cta-bg);
  color: var(--cta-ink);
  border-color: var(--cta-bg);
}

.btn-play:hover {
  background: var(--cta-hover);
  border-color: var(--cta-hover);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}

.btn-outline:active {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  min-height: 48px;
  padding: 14px 24px;
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.btn-hero span[aria-hidden] {
  width: 1.7em;
  height: 1.7em;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.14);
  font-size: 0.8rem;
  flex: 0 0 auto;
}

.play-dock {
  margin-top: 4px;
}

/* ==========================================================================
   Promo Banners & Popup Modal
   ========================================================================== */
.promo-top {
  width: min(var(--container-max), calc(100% - (var(--gutter) * 2)));
  margin: 16px auto 0;
}

.promo-slot {
  margin: 12px 0 20px;
}

.promo-top a,
.promo-slot a {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.promo-top img,
.promo-slot img {
  width: 100%;
  height: auto;
}

.promo-pop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(8, 10, 14, 0.74);
  display: grid;
  place-items: center;
  padding: 20px;
}

.promo-pop[hidden] {
  display: none;
}

.promo-pop-card {
  position: relative;
  width: min(600px, 100%);
}

.promo-pop img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.promo-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #ffffff;
  color: #14202b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.promo-x:hover {
  transform: scale(1.05);
}

.promo-x:active {
  transform: scale(0.97);
}

/* ==========================================================================
   Breadcrumbs, Page Header & Media Cover
   ========================================================================== */
.crumbs {
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
  color: var(--muted);
}

.sep {
  opacity: 0.65;
}

.kicker {
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: var(--accent);
}

.count {
  color: var(--muted);
  font-size: 0.94rem;
  margin: 6px 0 0;
}

.sheet-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-bottom: 16px;
}

.sheet-head:has(.cover) {
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
}

.sheet-head--hub {
  grid-template-columns: minmax(0, 1fr);
}

.sheet-head > * {
  min-width: 0;
}

.cover img,
.cover .ph,
.thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.cover img,
.cover .ph {
  border-radius: var(--radius-sm);
}

.thumb {
  display: block;
  overflow: hidden;
  background: var(--surface-alt);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph {
  display: grid;
  place-items: center;
  font-weight: 750;
  background: var(--surface-alt);
  color: var(--accent);
}

/* ==========================================================================
   Lead AEO Block & Gate 1 Key Facts Strip
   ========================================================================== */
.aeo {
  padding: 16px 20px;
  margin: 14px 0 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  font-size: 1.04rem;
  line-height: 1.6;
}

.aeo p {
  margin: 0;
}

.key-facts-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
}

@media (min-width: 600px) {
  .key-facts-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .key-facts-strip {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

.kf-cell {
  min-width: 0;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kf-k {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
}

.kf-v {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.3;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.kf-v a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.kf-v a:hover {
  opacity: 0.85;
}

/* ==========================================================================
   Facts Grid, Pros/Cons Balance, Prose, Tables & Lists
   ========================================================================== */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 12px;
  margin: 16px 0 22px;
}

@media (min-width: 1440px) {
  .facts {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.facts div {
  padding: 12px 14px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.facts dt {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.facts dd {
  margin: 4px 0 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.balance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 10px 0 8px;
}

.balance h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.balance ul {
  margin: 0;
  padding-left: 1.2em;
}

.balance li {
  margin: 0 0 7px;
  line-height: 1.5;
}

.balance .pros,
.balance .cons {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
}

.prose,
.prose p,
.block > p,
.steps,
.steps li,
.faq-item p {
  line-height: 1.65;
  max-width: none !important;
  width: 100%;
}

.prose a,
.aeo a,
.facts a,
.faq a,
.block h2 a,
.cuts a,
.help a {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 14px 0 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.cuts {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.cuts caption {
  text-align: left;
  font-weight: 700;
  padding: 12px 16px 8px;
}

.cuts th {
  text-align: left;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 14px;
  background: var(--surface-alt);
  color: var(--muted);
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}

.cuts td {
  padding: 11px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  line-height: 1.45;
}

.cuts tbody tr:last-child td {
  border-bottom: 0;
}

.cuts tbody tr:hover {
  background: var(--accent-soft);
}

.help ul {
  line-height: 1.6;
}

.steps {
  line-height: 1.65;
  padding-left: 1.35rem;
}

.steps li {
  margin-bottom: 9px;
}

/* ==========================================================================
   Catalogue Cards Grid, Pills, Inline Links & Pager
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 16px;
}

.card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.14s ease, box-shadow 0.16s ease;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.card:active {
  transform: translateY(0);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px 14px;
  min-width: 0;
}

.card-title {
  font-weight: 700;
  line-height: 1.28;
  overflow-wrap: break-word;
}

.card-meta {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

.pills a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

.pills a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pills a[aria-current="page"],
.pills a.is-active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 700;
}

.pager {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin: 24px 0;
}

.pager a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-decoration: none;
  font-weight: 600;
}

.pager a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.brand {
  font-weight: 750;
  padding: 0 0.2em;
  border-radius: 0.22em;
  background: color-mix(in srgb, currentColor 12%, transparent);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.btn .brand {
  background: transparent;
  padding: 0;
}

.inline-links {
  display: flex;
  gap: 8px 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ==========================================================================
   Gate 9 — Top-3 / Top-5 Podium (#top-picks-podium)
   ========================================================================== */
.g9-podium {
  margin: 26px 0 32px;
}

.g9-podium-head {
  margin-bottom: 16px;
}

.g9-podium-head h2 {
  margin-top: 4px;
}

.g9-kicker {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.g9-podium-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

@media (min-width: 700px) {
  .g9-podium-grid--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .g9-podium-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Balanced 3 + 2 bento on medium desktop (1080px–1559px) */
@media (min-width: 1080px) and (max-width: 1559px) {
  .g9-podium-grid--5 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .g9-podium-grid--5 > .g9-pick {
    grid-column: span 2;
  }
  .g9-podium-grid--5 > .g9-pick:nth-child(4),
  .g9-podium-grid--5 > .g9-pick:nth-child(5) {
    grid-column: span 3;
  }
}

/* Full 5-column executive podium on widescreen 1560px+ */
@media (min-width: 1560px) {
  .g9-podium-grid--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .g9-podium-grid--5 > .g9-pick {
    grid-column: auto;
  }
}

.g9-pick {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.14s ease, box-shadow 0.16s ease;
}

.g9-pick:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.g9-pick--first {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-md);
}

.g9-pick-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.g9-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.g9-pick--first .g9-badge {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.g9-pick-head {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.g9-pick-head > a {
  display: block;
  min-width: 0;
}

.g9-pick-head > div {
  min-width: 0;
}

.g9-pick-thumb {
  width: 78px;
  height: 58px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.g9-pick-head h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.g9-pick-head h3 a {
  text-decoration: none;
}

.g9-pick-head h3 a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.g9-pick-studio {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.g9-pick-studio a {
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.g9-pick-studio a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.g9-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
}

.g9-meta-item {
  min-width: 0;
  padding: 8px 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.g9-meta-item dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0;
}

.g9-meta-item dd {
  margin: 3px 0 0;
  font-size: 0.9rem;
  font-weight: 750;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.g9-cond-con {
  margin: 0;
  padding: 10px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  line-height: 1.48;
  color: var(--muted);
}

.g9-cond-con strong {
  color: var(--ink);
}

.g9-pick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.g9-pick-actions .btn {
  width: 100%;
  font-size: 0.88rem;
  padding: 10px 14px;
}

/* ==========================================================================
   Gate 9 — Numbered Listicle Cards (.g9-listicle-stack)
   ========================================================================== */
.g9-listicle-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 18px 0 28px;
}

.g9-list-item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.g9-list-item:first-child {
  border: 2px solid var(--accent);
}

.g9-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.g9-list-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.28;
}

.g9-list-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  line-height: 1.6;
}

@media (min-width: 960px) {
  .g9-list-body {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: start;
  }
}

.g9-list-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
}

.g9-list-metrics > div {
  padding: 9px 11px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}

.g9-list-con {
  padding: 12px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

.g9-list-con strong {
  color: var(--ink);
}

/* ==========================================================================
   Gate 9 — Alternatives Block (#alternatives-guide)
   ========================================================================== */
.g9-alts {
  margin: 28px 0 32px;
}

.g9-alts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 14px;
}

@media (min-width: 820px) {
  .g9-alts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .g9-alts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.g9-alt-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.g9-alt-card:hover {
  border-color: var(--accent);
}

.g9-alt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.g9-alt-head strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.g9-alt-rtp {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.g9-alt-card > p {
  margin: 0;
  line-height: 1.55;
  font-size: 0.93rem;
}

.g9-alt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.g9-alt-actions .btn {
  flex: 1 1 auto;
  font-size: 0.85rem;
  padding: 9px 12px;
}

/* ==========================================================================
   Chiang Mai — 9 Open SSR User-Profile Scenarios (#profile-matrix)
   ========================================================================== */
.profile-matrix {
  margin: 30px 0 34px;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
}

@media (min-width: 640px) {
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .profile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.14s ease;
}

.profile-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.profile-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.profile-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 750;
  line-height: 1.3;
}

.profile-rec {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--ink);
}

.profile-skip {
  margin: 0;
  padding: 9px 11px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
}

.profile-card .btn {
  margin-top: auto;
  width: 100%;
  font-size: 0.88rem;
}

/* ==========================================================================
   Gate 2 & 4 — Semantic Triplets, Conditional Cons & Query Fan-Out
   ========================================================================== */
.triplet-box,
.triplet-lead {
  margin: 10px 0 16px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  background: var(--surface-alt);
  line-height: 1.58;
  font-size: 0.96rem;
  color: var(--ink);
}

.cond-cons-box {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  margin: 24px 0;
}

.cond-cons-box h2 {
  margin-top: 0;
}

.cond-cons-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

@media (min-width: 900px) {
  .cond-cons-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cond-cons-list li {
  padding: 12px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  line-height: 1.52;
  font-size: 0.93rem;
}

.fanout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 16px 0 24px;
}

@media (min-width: 760px) {
  .fanout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1360px) {
  .fanout-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.fanout-card {
  min-width: 0;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fanout-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.35;
}

.fanout-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ==========================================================================
   Gate 3 — Open SSR FAQ (Clean Open & Closed Disclosure Styling)
   ========================================================================== */
.faq {
  margin: 28px 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
}

details.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 18px;
  margin-bottom: 10px;
}

details.faq-item[open] {
  border-color: var(--border-strong);
  padding-bottom: 14px;
}

details.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 13px 0;
  font-weight: 650;
  line-height: 1.38;
  user-select: none;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::marker {
  content: "";
}

details.faq-item summary::after {
  content: "";
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(currentColor, currentColor) center / 10px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 10px no-repeat;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

details.faq-item summary:hover {
  color: var(--accent);
}

details.faq-item summary:hover::after {
  border-color: var(--accent);
}

details.faq-item[open] summary {
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

details.faq-item[open] summary::after {
  background: linear-gradient(currentColor, currentColor) center / 10px 2px no-repeat;
  border-color: var(--accent);
}

.faq-item p {
  margin: 8px 0 4px;
  line-height: 1.62;
  color: var(--ink);
}

/* ==========================================================================
   Gate 8 — Deterministic Ring Internal Links (Long-Anchor)
   ========================================================================== */
.ring-links {
  margin: 28px 0 32px;
}

.ring-grid {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

@media (min-width: 720px) {
  .ring-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1140px) {
  .ring-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1540px) {
  .ring-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ring-card {
  min-width: 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.ring-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.ring-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.ring-anchor {
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
  color: var(--ink);
  overflow-wrap: break-word;
}

.ring-anchor:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ==========================================================================
   Listicles Hub Grid (/best)
   ========================================================================== */
.best-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 16px 0 28px;
}

@media (min-width: 680px) {
  .best-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .best-hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1560px) {
  .best-hub-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.best-hub-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.14s ease, box-shadow 0.16s ease;
}

.best-hub-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.best-hub-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.3;
}

.best-hub-card h3 a {
  text-decoration: none;
}

.best-hub-card h3 a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.best-hub-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.best-hub-card .btn {
  margin-top: auto;
  width: 100%;
  font-size: 0.88rem;
}

/* ==========================================================================
   Chiang Mai — Embeddable Minimal Widget Shell (/embed/ routes)
   ========================================================================== */
body.is-embed {
  padding: 12px;
  background: var(--bg);
}

.embed-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.embed-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.embed-head strong {
  font-family: var(--font-display);
  font-size: 1.08rem;
}

.embed-head span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.embed-picks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.embed-picks li {
  padding: 10px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  line-height: 1.48;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.embed-picks li a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.embed-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}

.embed-foot a {
  color: var(--accent);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

/* ==========================================================================
   Interactive AEO Tools, Filters, VS Cards & Glossary
   ========================================================================== */
.tool-bar {
  margin: 0 0 16px;
}

.tool-panel {
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin: 14px 0 20px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 14px;
}

.tool-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 650;
  min-width: 0;
}

.tool-input {
  width: 100%;
  max-width: 560px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.98rem;
  line-height: 1.3;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select.tool-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.tool-grid .tool-input {
  max-width: none;
}

.tool-input:hover {
  border-color: var(--accent);
}

.tool-input:focus,
.tool-input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.tool-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tool-input[aria-invalid="true"] {
  border-color: #c53030;
  box-shadow: 0 0 0 2px rgba(197, 48, 48, 0.2);
}

/* Custom Accessible Segmented Controls (Anti-Slop replacement for native <select>) */
.seg-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seg-btn {
  appearance: none;
  flex: 1 1 auto;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.1s ease, box-shadow 0.14s ease;
}

.seg-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.seg-btn:active {
  transform: translateY(0);
}

.seg-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.seg-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.seg-btn[aria-pressed="true"],
.seg-btn.is-active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* Side-by-side VS Cards on /compare/{a}-vs-{b} */
.vs-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin: 18px 0 28px;
}

.vs-card {
  display: flex;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  align-items: center;
  min-width: 0;
}

.vs-thumb {
  width: 128px;
  flex: 0 0 128px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: block;
  border: 1px solid var(--border);
}

.vs-thumb img,
.vs-thumb .ph {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.vs-info {
  flex: 1 1 auto;
  min-width: 0;
}

.vs-info h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  line-height: 1.25;
}

.vs-info h3 a {
  text-decoration: none;
}

.vs-info h3 a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.vs-studio {
  margin: 0 0 10px;
  font-size: 0.86rem;
  color: var(--muted);
}

.vs-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
}

.vs-kpis div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 0.85rem;
}

.vs-kpis dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.vs-kpis dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.vs-badge {
  align-self: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.88rem;
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  flex: 0 0 auto;
}

/* Glossary Grid (scales cleanly to 4–5 columns on 1800px+) */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 16px;
  margin: 18px 0 28px;
}

.glossary-card {
  min-width: 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.glossary-card h2 {
  margin: 0 0 8px !important;
  font-size: 1.12rem !important;
  border: 0 !important;
  padding: 0 !important;
}

.glossary-card p {
  margin: 0;
  line-height: 1.58;
  font-size: 0.94rem;
}

/* AI Verify & Summarize Bar (5 engines with inline SVG, zero overflow 320px..1920px+) */
.ai-sum-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin: 26px 0 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  font-size: 0.85rem;
}

.ai-sum-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ai-sum-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
  flex: 0 0 auto;
}

.ai-sum-label {
  font-weight: 700;
}

.ai-sum-source {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

.ai-sum-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.ai-sum-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.ai-sum-btn svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  display: block;
}

.ai-sum-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.ai-sum-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Stake Switcher, Myth-Busting & Cluster Anchors */
.stake-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin: 14px 0 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.88rem;
}

.stake-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.stake-btn {
  appearance: none;
  min-height: 38px;
  border: 1px solid var(--border-strong);
  background: var(--surface-alt);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.stake-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.stake-btn:active {
  transform: translateY(0);
}

.stake-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.stake-btn.is-active,
.stake-btn[aria-selected="true"],
.stake-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.stake-buffer-pill {
  font-size: 0.84rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.myth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 14px;
  margin: 14px 0 22px;
}

.myth-card {
  min-width: 0;
  padding: 15px 17px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.92rem;
  line-height: 1.55;
}

.myth-card strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent);
}

.cluster-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

@media (min-width: 960px) {
  .cluster-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cluster-list li {
  min-width: 0;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  line-height: 1.5;
  font-size: 0.92rem;
}

/* ==========================================================================
   Footer (Full-Bleed Chrome Aligned to 1760px Content Axis)
   ========================================================================== */
.foot {
  padding-block: 30px 46px;
  padding-inline: max(var(--gutter), calc((100% - var(--container-max)) / 2));
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.foot > p:first-child {
  margin-top: 0;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin: 14px 0;
  line-height: 1.5;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

.foot-brand {
  margin: 12px 0 0;
}

.foot-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 10px 0 0;
}

.foot-extra a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ==========================================================================
   Responsive Mobile Breakpoints (320px+ Zero Horizontal Overflow)
   ========================================================================== */
@media (max-width: 820px) {
  .vs-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .vs-badge {
    margin: 0 auto;
    width: 38px;
    height: 38px;
    font-size: 0.8rem;
  }
}

@media (max-width: 720px) {
  body.has-dock {
    padding-bottom: 94px;
  }
  .play-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    margin: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(10, 12, 16, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
  }
  .play-dock .btn-hero {
    width: 100%;
    margin: 0;
  }
  .sheet-head:has(.cover) {
    grid-template-columns: minmax(0, 1fr);
  }
  .top {
    align-items: center;
    flex-wrap: wrap;
    padding-block: 10px;
  }
  .nav {
    flex: 1 1 100%;
    order: 3;
    gap: 6px 12px;
    padding-top: 8px;
    border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  }
  .nav a,
  .pills a,
  .stake-btn,
  .ai-sum-btn {
    min-height: 44px;
  }
  .ai-sum-bar {
    padding: 12px;
  }
  .ai-sum-links {
    width: 100%;
    gap: 6px;
  }
  .ai-sum-btn {
    flex: 1 1 auto;
    padding: 8px 11px;
  }
  .top > .btn {
    max-width: none;
    margin-left: auto;
  }
  .balance {
    grid-template-columns: minmax(0, 1fr);
  }
  .vs-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .vs-thumb {
    width: 100%;
    max-width: 240px;
    flex: none;
  }
  .glossary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .g9-pick-head {
    grid-template-columns: 68px minmax(0, 1fr);
  }
  .g9-pick-thumb {
    width: 68px;
    height: 51px;
  }
  .cond-cons-box {
    padding: 16px;
  }
  details.faq-item {
    padding: 0 14px;
  }
}

/* ==========================================================================
   Structural Layout Variant Hooks (20-Theme Fleet Architecture)
   Driven via <body data-hdr="..." data-card="..." data-foot="...">
   ========================================================================== */

/* --- Header Variants --- */

/* 1. Floating Pill: detached rounded bar aligned to the 1760px canvas */
body[data-hdr="floating-pill"] .top {
  position: sticky;
  top: 12px;
  z-index: 28;
  width: min(var(--container-max), calc(100% - (var(--gutter) * 2)));
  margin: 14px auto 0;
  padding: 10px 22px;
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius) + 12px);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
}

@media (min-width: 1280px) {
  body[data-hdr="floating-pill"] .top {
    border-radius: 999px;
    padding: 10px 26px;
  }
}

@media (max-width: 720px) {
  body[data-hdr="floating-pill"] .top {
    top: 8px;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: var(--radius);
  }
}

/* 2. Two-Tier: brand + primary CTA on Tier 1, full-width bordered nav on Tier 2 */
body[data-hdr="two-tier"] .top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  row-gap: 0;
  padding-block: 14px 12px;
}

body[data-hdr="two-tier"] .logo {
  order: 1;
}

body[data-hdr="two-tier"] .top > .btn {
  order: 2;
  margin-left: auto;
}

body[data-hdr="two-tier"] .nav {
  order: 3;
  flex: 1 0 100%;
  width: 100%;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  gap: 6px 18px;
}

/* 3. Centered: editorial masthead with centered logo, centered nav, aligned CTA */
body[data-hdr="centered"] .top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding-block: 16px 14px;
}

body[data-hdr="centered"] .logo {
  font-size: 1.45rem;
}

body[data-hdr="centered"] .nav {
  flex: 0 0 auto;
  width: 100%;
  justify-content: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  gap: 6px 16px;
}

body[data-hdr="centered"] .top > .btn {
  margin-left: 0;
}

@media (min-width: 900px) {
  body[data-hdr="centered"] .top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    row-gap: 12px;
    column-gap: 16px;
  }
  body[data-hdr="centered"] .logo {
    grid-column: 2;
    justify-self: center;
    font-size: 1.55rem;
  }
  body[data-hdr="centered"] .top > .btn {
    grid-column: 3;
    justify-self: end;
  }
  body[data-hdr="centered"] .nav {
    grid-column: 1 / -1;
    order: 0;
  }
}

/* 4. Command Bar: compact sticky full-width technical command strip */
body[data-hdr="command-bar"] .top {
  position: sticky;
  top: 0;
  z-index: 28;
  padding-block: 8px;
  gap: 6px 14px;
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-strong);
}

body[data-hdr="command-bar"] .logo {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 36px;
}

body[data-hdr="command-bar"] .nav {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  gap: 4px 12px;
}

@media (min-width: 721px) {
  body[data-hdr="command-bar"] .top > .btn {
    min-height: 36px;
    padding: 6px 14px;
    font-size: 0.8rem;
  }
}

/* --- Card Grid Variants --- */

/* 1. Horizontal: 1 col mobile, 2 col >=1100px, 3 col >=1600px with 120px left thumb */
body[data-card="horizontal"] .grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

@media (min-width: 1100px) {
  body[data-card="horizontal"] .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1600px) {
  body[data-card="horizontal"] .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

body[data-card="horizontal"] .card {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 10px;
}

body[data-card="horizontal"] .card .thumb {
  width: 120px;
  flex: 0 0 120px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

body[data-card="horizontal"] .card .card-body {
  padding: 2px 4px;
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 480px) {
  body[data-card="horizontal"] .card .thumb {
    width: 92px;
    flex: 0 0 92px;
  }
}

/* 2. Poster: 3:4 vertical portrait cards, 5-6 columns >=1600px */
body[data-card="poster"] .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 640px) {
  body[data-card="poster"] .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 960px) {
  body[data-card="poster"] .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 1280px) {
  body[data-card="poster"] .grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1600px) {
  body[data-card="poster"] .grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

body[data-card="poster"] .card {
  flex-direction: column;
}

body[data-card="poster"] .card .thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
}

body[data-card="poster"] .card .card-body {
  padding: 12px 14px 16px;
}

/* 3. Dense: tight high-density 6-col >=1600px technical cards */
body[data-card="dense"] .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 640px) {
  body[data-card="dense"] .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }
}

@media (min-width: 920px) {
  body[data-card="dense"] .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (min-width: 1260px) {
  body[data-card="dense"] .grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1600px) {
  body[data-card="dense"] .grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

body[data-card="dense"] .card {
  flex-direction: column;
  border-radius: var(--radius-sm);
}

body[data-card="dense"] .card .thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
}

body[data-card="dense"] .card .card-body {
  padding: 8px 10px 10px;
  gap: 3px;
}

body[data-card="dense"] .card .card-title {
  font-size: 0.92rem;
  line-height: 1.24;
}

body[data-card="dense"] .card .card-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

/* 4. Elevated: airy rounded shadow cards, 4-col >=1500px */
body[data-card="elevated"] .grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 640px) {
  body[data-card="elevated"] .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1100px) {
  body[data-card="elevated"] .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }
}

@media (min-width: 1500px) {
  body[data-card="elevated"] .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }
}

body[data-card="elevated"] .card {
  flex-direction: column;
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
}

body[data-card="elevated"] .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

body[data-card="elevated"] .card .card-body {
  padding: 16px 18px 20px;
  gap: 6px;
}

body[data-card="elevated"] .card .card-title {
  font-size: 1.12rem;
}

/* 5. Hairline: 0px radius Swiss 1px exposed structural grid */
body[data-card="hairline"] .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-strong);
  border: 1px solid var(--border-strong);
}

@media (min-width: 640px) {
  body[data-card="hairline"] .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  body[data-card="hairline"] .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  body[data-card="hairline"] .grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1700px) {
  body[data-card="hairline"] .grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

body[data-card="hairline"] .card {
  flex-direction: column;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--surface);
}

body[data-card="hairline"] .card:hover {
  transform: none;
  background: var(--surface-alt);
  box-shadow: inset 0 0 0 2px var(--accent);
}

body[data-card="hairline"] .card .thumb {
  border-radius: 0;
  border-bottom: 1px solid var(--border);
}

body[data-card="hairline"] .card .card-body {
  padding: 12px 14px 14px;
}

/* --- Footer Variants --- */

/* 1. Slab: bold full-bleed architectural footer with structured link grid */
body[data-foot="slab"] .foot {
  background: var(--surface-alt);
  border-top: 3px solid var(--accent);
  padding-block: 40px 56px;
}

@media (min-width: 960px) {
  body[data-foot="slab"] .foot-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px 18px;
    padding: 18px 0;
    margin: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
}

/* 2. Minimal: ultra-clean hairline utility footer */
body[data-foot="minimal"] .foot {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-block: 22px 32px;
  font-size: 0.84rem;
}

body[data-foot="minimal"] .foot-links {
  gap: 4px 14px;
  margin: 10px 0;
}

/* 3. Colophon: centered editorial journal colophon with double hairline rule */
body[data-foot="colophon"] .foot {
  background: var(--surface);
  border-top: 4px double var(--border-strong);
  padding-block: 36px 52px;
  text-align: center;
}

body[data-foot="colophon"] .foot > p:first-child {
  max-width: 78ch;
  margin-inline: auto;
  font-family: var(--font-display);
  font-size: 0.96rem;
}

body[data-foot="colophon"] .foot-links {
  justify-content: center;
  gap: 6px 18px;
  padding-top: 16px;
  margin-top: 18px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body[data-foot="colophon"] .foot-extra {
  justify-content: center;
}

/* 4. Two-Tier Footer: structured executive two-band footer */
body[data-foot="two-tier"] .foot {
  background: var(--surface);
  border-top: 2px solid var(--border-strong);
  padding-block: 32px 44px;
}

body[data-foot="two-tier"] .foot-links {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  gap: 8px 20px;
}

/* 5. Monolith Footer: high-contrast dark/surface monolithic colophon */
body[data-foot="monolith"] .foot {
  background: var(--surface-alt);
  border-top: 1px solid var(--border-strong);
  padding-block: 44px 60px;
}

body[data-foot="monolith"] .foot-links {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  gap: 8px 18px;
}

/* --- Hero Variants (data-hero) --- */
body[data-hero="centered"] .sheet-head--hub {
  text-align: center;
  justify-items: center;
  padding: clamp(26px, 3vw, 44px) clamp(18px, 3vw, 40px);
}

body[data-hero="centered"] .sheet-head--hub .kicker {
  justify-content: center;
}

body[data-hero="band"] .sheet-head--hub {
  padding: clamp(24px, 2.8vw, 38px) clamp(20px, 3vw, 36px);
  border-top: 3px solid var(--accent);
}

body[data-hero="bento"] .sheet-head--hub {
  padding: clamp(22px, 2.5vw, 34px);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
}

body[data-hero="ruled"] .sheet-head--hub {
  padding: clamp(20px, 2.4vw, 32px) 0;
  border-inline: 0;
  border-block: 2px solid var(--border-strong);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-hero="split"] .sheet-head--hub {
  padding: clamp(24px, 2.8vw, 38px) clamp(20px, 3vw, 34px);
  border-radius: var(--radius);
}

/* Keep display H1 crisp without inline pill boxes on brand mentions */
h1 .brand {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  color: var(--accent);
  font-weight: inherit;
}
