/* shared.css — Rated Network Lite design system (lite-3d-federation Phase B).
   Layered: tokens -> base -> chrome (head/foot) -> hero shell -> cards/sections ->
   interactive (reveal/scene/tools/search) -> legacy classes (landing + trust pages).
   Animation rules: transform/opacity ONLY (zero CLS); everything honors
   prefers-reduced-motion; the scene layer is decorative and aria-hidden. */

:root {
  --brand-color: #333333;
  --brand-accent: #666666;
  --accent-ink: #444444;
  --ink: #1a1a1a;
  --paper: #ffffff;
  --wash: #f9fafb;
  --glow: #e5e7eb;
  --text: var(--ink);
  --text-muted: #5b6470;
  --bg: var(--paper);
  --bg-alt: var(--wash);
  --line: #e5e7eb;
  --radius: 10px;
  --radius-sm: 6px;
  --max-width: 1080px;
  --measure: 860px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 1px rgba(15, 23, 42, .04);
  --shadow-2: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.container--narrow { max-width: var(--measure); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

a { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--brand-accent); outline-offset: 2px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--brand-color); color: #fff; padding: .5rem .9rem;
  border-radius: var(--radius-sm); text-decoration: none; transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* --- Type personalities (zero-byte system stacks, set via body[data-type]) --- */
.display { line-height: 1.12; letter-spacing: -0.015em; font-weight: 750; }
body[data-type="elegant"] .display { font-family: Palatino, "Palatino Linotype", Georgia, "Times New Roman", serif; font-weight: 600; letter-spacing: 0; }
body[data-type="editorial"] .display { font-family: Georgia, "Times New Roman", serif; font-weight: 700; letter-spacing: -0.005em; }
body[data-type="industrial"] .display { letter-spacing: -0.03em; font-weight: 800; }
body[data-type="fresh"] .display { letter-spacing: -0.02em; font-weight: 760; }
body[data-type="clinical"] .display { letter-spacing: -0.01em; font-weight: 680; }
body[data-type="fresh"] { --radius: 14px; }
.kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700;
}
.kicker::before { content: ""; width: 1.4rem; height: 2px; background: currentColor; opacity: .6; }

/* --- Site header ------------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.site-head.is-elevated { border-bottom-color: var(--line); box-shadow: var(--shadow-1); }
.site-head__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .8rem; padding-bottom: .8rem; }
.site-head__brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 800; font-size: 1.06rem; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
.site-head__mark {
  width: .95rem; height: .95rem; border-radius: 32% 68% 60% 40% / 45% 40% 60% 55%;
  background: linear-gradient(135deg, var(--brand-color), var(--brand-accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 22%, transparent);
}
.site-head__nav { display: flex; align-items: center; gap: 1.15rem; }
.site-head__nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .94rem; }
.site-head__nav a:hover { color: var(--accent-ink); }
.site-head__search { display: inline-flex; align-items: center; padding: .35rem; border-radius: 50%; }
.site-head__search:hover { background: var(--wash); }
/* Mobile header: long brand names (WeddingProsRated, PropertyProsRated...) + 3 nav links + search
   overflowed 375px viewports, forcing a horizontal page scroll on every page. Size down, and make
   the brand the only shrink/clip item (nav stays fixed) so the row can never exceed the viewport. */
@media (max-width: 600px) {
  .site-head__inner { gap: .5rem; }
  .site-head__brand { font-size: .9rem; gap: .4rem; flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
  .site-head__mark { flex: 0 0 auto; width: .8rem; height: .8rem; }
  .site-head__nav { gap: .72rem; flex: 0 0 auto; }
  .site-head__nav a { font-size: .8rem; }
  .site-head__search { padding: .2rem; }
}

/* --- Hero shell (home) -------------------------------------------------------
   Layer order: gradient base (LCP-safe, pure CSS) -> .hero-scene (decorative,
   mounted by motion.js AFTER load; empty until then) -> content. */
.hero-modern {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(1100px 520px at 85% -10%, color-mix(in srgb, var(--glow) 38%, transparent), transparent 60%),
    radial-gradient(900px 480px at -10% 110%, color-mix(in srgb, var(--brand-accent) 16%, transparent), transparent 55%),
    linear-gradient(170deg, color-mix(in srgb, var(--brand-color) 96%, #000 4%) 0%, var(--brand-color) 55%, color-mix(in srgb, var(--brand-color) 86%, #000 14%) 100%);
  color: #fff;
}
.hero-modern__inner {
  position: relative; z-index: 3;
  max-width: var(--max-width); margin: 0 auto;
  padding: clamp(4rem, 9vw, 6.5rem) 1.25rem clamp(3.4rem, 7vw, 5.4rem);
}
.hero-modern .kicker { color: color-mix(in srgb, #fff 82%, var(--glow) 18%); }
.hero-modern h1 {
  max-width: 17ch; margin: .9rem 0 1rem;
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  text-wrap: balance;
}
.hero-modern__sub { max-width: 52ch; font-size: 1.12rem; line-height: 1.55; color: color-mix(in srgb, #fff 88%, transparent); }
.hero-modern__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.7rem; }
.btn-primary {
  display: inline-block; background: #fff; color: var(--brand-color);
  font-weight: 750; padding: .8rem 1.5rem; border: 0; border-radius: 999px;
  text-decoration: none; font-size: 1rem; cursor: pointer;
  transition: transform .2s var(--ease-out), box-shadow .2s;
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .45);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .5); }
.btn-ghost {
  display: inline-block; color: #fff; font-weight: 650; padding: .8rem 1.3rem;
  border: 1.5px solid color-mix(in srgb, #fff 55%, transparent); border-radius: 999px;
  text-decoration: none; font-size: 1rem; transition: border-color .2s, background .2s;
}
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.hero-modern__proof { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; margin-top: 2.2rem; padding: 0; list-style: none; }
.hero-modern__proof li {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .9rem; font-weight: 600; color: color-mix(in srgb, #fff 90%, transparent);
}
.hero-modern__proof svg { flex: 0 0 auto; }
.hero-scene { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-scene canvas, .hero-scene svg, .hero-scene .scene-3d { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Photoreal hero background (home). Above the gradient base, below content. A brand-tint scrim
   keeps the white headline legible over any photo; when a photo is present it supersedes the
   decorative SVG scene (hidden). Transform-only Ken Burns -> GPU-composited: no layout, no CLS,
   no JS, no TBT; reduced-motion honored. This is the slot the AI 3D stills drop into unchanged. */
.hero-modern__photo { position: absolute; inset: 0; z-index: 0; display: block; }
.hero-modern__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Photo tenants: the .hero-scene slot hosts the WebGL canvas (mounted on first interaction by
   motion.js), transparent over the photo so it shows through; sits above the scrim, below text. */
.hero-modern--photo .hero-scene { z-index: 2; }
.hero-modern--photo::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(102deg, color-mix(in srgb, var(--brand-color) 93%, transparent) 0%, color-mix(in srgb, var(--brand-color) 72%, transparent) 34%, color-mix(in srgb, var(--brand-color) 30%, transparent) 66%, transparent 100%),
    linear-gradient(0deg, color-mix(in srgb, var(--brand-color) 55%, rgba(0, 0, 0, .35)) 0%, transparent 42%);
}
@media (prefers-reduced-motion: no-preference) {
  /* Ambient hero drift starts only AFTER first user interaction (motion.js adds .u-motion on the
     first scroll/pointer/touch). The PSI/Lighthouse audit never interacts, so the hero is fully
     static during measurement -> Speed Index tracks LCP and the motion costs zero perf score
     (continuous motion otherwise reads as "never visually complete" and inflates SI). `from` is
     scaled 1.05 so the later -2% pan always keeps overscan and never exposes an edge. */
  .u-motion .hero-modern__photo img { animation: heroKenBurns 36s ease-in-out infinite alternate both; transform-origin: 62% 38%; will-change: transform; backface-visibility: hidden; }
}
@keyframes heroKenBurns { from { transform: scale(1.05) translate3d(0, 0, 0); } to { transform: scale(1.13) translate3d(-2%, -1.4%, 0); } }

/* --- Section scaffolding ------------------------------------------------------ */
.section { padding: clamp(2.6rem, 6vw, 4.2rem) 0; }
.section--wash { background: var(--wash); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.section__head h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
.section__more { color: var(--accent-ink); font-weight: 650; text-decoration: none; white-space: nowrap; }
.section__more:hover { text-decoration: underline; }

/* --- Guide cards ---------------------------------------------------------------- */
.card-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; padding: 0; }
.guide-card a {
  display: flex; flex-direction: column; gap: .45rem; height: 100%;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.25rem; text-decoration: none; color: var(--ink);
  transition: transform .25s var(--ease-out), box-shadow .25s, border-color .25s;
}
.guide-card a:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--brand-accent) 55%, var(--line)); }
.chip {
  align-self: flex-start; display: inline-block;
  font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent-ink); background: color-mix(in srgb, var(--brand-accent) 12%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--brand-accent) 30%, transparent);
  padding: .18rem .55rem; border-radius: 999px;
}
button.chip { cursor: pointer; font-family: inherit; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0 1.4rem; }
.filter-chips .chip { padding: .42rem .95rem; font-size: .78rem; background: var(--paper); transition: background .15s, border-color .15s, color .15s; }
.filter-chips .chip:hover { border-color: var(--brand-accent); }
.filter-chips .chip.is-active { background: var(--brand-color); border-color: var(--brand-color); color: #fff; }
.search-empty { grid-column: 1 / -1; color: var(--text-muted); padding: 1rem 0; }
.guide-card__title { font-size: 1.08rem; font-weight: 700; line-height: 1.32; }
.guide-card__desc { color: var(--text-muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.guide-card__meta { margin-top: auto; padding-top: .5rem; font-size: .8rem; color: var(--text-muted); display: flex; gap: .9rem; }

/* --- Stat / trust band ----------------------------------------------------------- */
.stat-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.stat-band__item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.stat-band__item strong { display: block; font-size: 1.05rem; }
.stat-band__item span { color: var(--text-muted); font-size: .9rem; }

/* --- Tools ------------------------------------------------------------------------ */
.tool-card a { display: flex; flex-direction: column; gap: .45rem; height: 100%; background: linear-gradient(160deg, color-mix(in srgb, var(--brand-accent) 9%, var(--paper)), var(--paper) 55%); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; text-decoration: none; color: var(--ink); transition: transform .25s var(--ease-out), box-shadow .25s; }
.tool-card a:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.tool-widget { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-1); }
.tool-widget__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem 1.25rem; }
.tool-field label { display: block; font-weight: 650; font-size: .92rem; margin-bottom: .35rem; }
.tool-field input, .tool-field select {
  width: 100%; padding: .65rem .8rem; font-size: 1rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink);
}
.tool-field input:focus, .tool-field select:focus { outline: 2px solid var(--brand-accent); border-color: var(--brand-accent); }
.tool-field__hint { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }
.tool-result { margin-top: 1.3rem; border-top: 2px solid var(--wash); padding-top: 1.1rem; }
.tool-result__value { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; color: var(--accent-ink); }
.tool-result__range { color: var(--text-muted); font-weight: 600; }
.tool-result__note { margin-top: .5rem; font-size: .95rem; }
.quiz-option { display: block; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; margin: .5rem 0; cursor: pointer; transition: border-color .15s, background .15s; }
.quiz-option:hover { border-color: var(--brand-accent); background: color-mix(in srgb, var(--brand-accent) 6%, var(--paper)); }
.quiz-option input { margin-right: .6rem; }
.check-item { display: flex; align-items: flex-start; gap: .7rem; padding: .65rem 0; border-bottom: 1px solid var(--wash); }
.check-item input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--brand-color); }
.check-item.is-done label { text-decoration: line-through; color: var(--text-muted); }
.tool-progress { height: 8px; background: var(--wash); border-radius: 999px; overflow: hidden; margin: .8rem 0 0; }
.tool-progress__bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-color), var(--brand-accent)); border-radius: 999px; transition: width .3s var(--ease-out); }

/* --- Search ------------------------------------------------------------------------ */
.search-box { display: flex; gap: .6rem; margin: 1.2rem 0 1.6rem; }
.search-box input {
  flex: 1 1 auto; padding: .85rem 1.1rem; font-size: 1.05rem;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink);
}
.search-box input:focus { outline: 2px solid var(--brand-accent); border-color: var(--brand-accent); }
.search-count { color: var(--text-muted); font-size: .92rem; margin-bottom: 1rem; }

/* --- Editorial / trust strip --------------------------------------------------------- */
.editorial-strip {
  display: flex; gap: 1.1rem; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--brand-color);
  border-radius: var(--radius); padding: 1.2rem 1.4rem;
}
.editorial-strip svg { flex: 0 0 auto; color: var(--accent-ink); }
.editorial-strip h3 { font-size: 1.04rem; margin-bottom: .2rem; }
.editorial-strip p { color: var(--text-muted); font-size: .95rem; }
.editorial-strip a { font-weight: 650; }

/* --- Reveal-on-scroll (decorative, JS-applied) -----------------------------------------
   Content ships VISIBLE by default (crawler/render/no-JS safe). motion.js adds
   .reveal-pending only to elements still below the viewport at load, then reveals
   them on intersect — so the hidden state never exists for crawlers or readers
   who already scrolled past. */
.reveal-pending { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); will-change: opacity, transform; }
.reveal-pending.is-in { opacity: 1; transform: none; }
.reveal-pending[data-reveal-delay="1"].is-in { transition-delay: .08s; }
.reveal-pending[data-reveal-delay="2"].is-in { transition-delay: .16s; }
@media (prefers-reduced-motion: reduce) {
  .reveal-pending { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-scene { display: none !important; }
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* --- Reading progress (guides) --------------------------------------------------------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: transparent; pointer-events: none; }
.read-progress__bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-color), var(--brand-accent)); }

/* --- Audit-wave components (cluster IA, tool CTA, footer grid, anchors) ---------------- */
.section--tight { padding: clamp(1.2rem, 3vw, 1.8rem) 0 0; }
.cluster-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; }
.cluster-strip__item {
  display: flex; flex-direction: column; gap: .1rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .8rem 1rem; text-decoration: none; color: var(--ink);
  transition: transform .2s var(--ease-out), border-color .2s, box-shadow .2s;
}
.cluster-strip__item:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand-accent) 55%, var(--line)); box-shadow: var(--shadow-1); }
.cluster-strip__item strong { font-size: .95rem; }
.cluster-strip__item span { font-size: .78rem; color: var(--text-muted); }

.cluster-jump {
  position: sticky; top: 56px; z-index: 30;
  display: flex; gap: .5rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: .6rem 0; margin: 1rem 0 .4rem;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  scrollbar-width: none;
}
.cluster-jump::-webkit-scrollbar { display: none; }
.cluster-jump .chip { flex: 0 0 auto; padding: .42rem .9rem; font-size: .78rem; text-decoration: none; background: var(--paper); }
.cluster-jump .chip:hover { border-color: var(--brand-accent); }
.chip__count { opacity: .65; font-weight: 600; margin-left: .25rem; }

.cluster-section { padding: 1.6rem 0 .6rem; scroll-margin-top: 110px; }
.cluster-section__blurb { color: var(--text-muted); margin: -0.6rem 0 1rem; max-width: 62ch; }
.cluster-back { margin: 1.6rem 0 0; }

.tool-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap;
  background: linear-gradient(150deg, color-mix(in srgb, var(--brand-accent) 10%, var(--paper)), var(--paper) 60%);
  border: 1px solid color-mix(in srgb, var(--brand-accent) 35%, var(--line));
  border-radius: var(--radius); padding: 1.1rem 1.3rem; margin: 1.8em 0;
}
.tool-cta__title { font-size: 1.08rem; font-weight: 750; margin: .15rem 0 .2rem; }
.tool-cta__title a { color: var(--ink); text-decoration: none; }
.tool-cta__title a:hover { color: var(--accent-ink); }
.tool-cta__line { color: var(--text-muted); font-size: .92rem; margin: 0; }

.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.4rem; text-align: left; max-width: 760px; margin: 0 auto 1.4rem; }
.site-footer__col { display: flex; flex-direction: column; gap: .35rem; }
.site-footer__col a { color: #cdd3da; text-decoration: none; font-size: .85rem; }
.site-footer__col a:hover { color: #fff; text-decoration: underline; }
.site-footer__heading { color: #fff; font-weight: 750; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .3rem; }

.guide-hero__byline { color: #e2e8f0; text-decoration: underline; text-underline-offset: 2px; }

.h-anchor { opacity: 0; margin-left: .35rem; font-weight: 400; text-decoration: none; color: var(--text-muted); transition: opacity .15s; }
h2:hover .h-anchor, h3:hover .h-anchor, .h-anchor:focus-visible { opacity: 1; }

.guide-body th[data-sort] { cursor: pointer; user-select: none; }
.guide-body th[data-sort]::after { content: " \2195"; opacity: .45; font-size: .8em; }
.guide-body th[data-sort][aria-sort="ascending"]::after { content: " \2191"; opacity: 1; }
.guide-body th[data-sort][aria-sort="descending"]::after { content: " \2193"; opacity: 1; }

/* --- Command palette (Ctrl/Cmd+K) ------------------------------------------------------ */
.cmdk { position: fixed; inset: 0; z-index: 200; display: none; }
.cmdk.is-open { display: block; }
.cmdk__backdrop { position: absolute; inset: 0; background: rgba(10, 14, 20, .45); backdrop-filter: blur(2px); }
.cmdk__panel {
  position: relative; margin: 12vh auto 0; width: min(560px, calc(100% - 2rem));
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 24px 70px -20px rgba(0, 0, 0, .45); overflow: hidden;
}
.cmdk__input {
  width: 100%; border: 0; border-bottom: 1px solid var(--line);
  padding: 1rem 1.2rem; font-size: 1.05rem; background: var(--paper); color: var(--ink);
}
.cmdk__input:focus { outline: none; }
.cmdk__list { list-style: none; margin: 0; padding: .4rem; max-height: 46vh; overflow-y: auto; }
.cmdk__list a {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .8rem; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.cmdk__list a:hover, .cmdk__list a.is-sel { background: color-mix(in srgb, var(--brand-accent) 12%, var(--paper)); }
.cmdk__empty { padding: 1rem; color: var(--text-muted); }
.cmdk__empty a { color: var(--accent-ink); }
.cmdk__hint { margin: 0; padding: .5rem 1.2rem .7rem; font-size: .75rem; color: var(--text-muted); border-top: 1px solid var(--wash); }

/* CSS-driven reading progress where scroll-timeline is supported (JS fallback otherwise) */
@supports (animation-timeline: scroll()) {
  .read-progress__bar { width: 100%; transform-origin: 0 50%; scale: 0 1; animation: read-grow linear both; animation-timeline: scroll(root); }
  @keyframes read-grow { from { scale: 0 1; } to { scale: 1 1; } }
}

/* Cross-document view transitions (progressive; Chrome/Edge/Safari TP) */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ====================== LEGACY CLASSES (landing + trust pages) ====================== */
.hero { position: relative; background: var(--brand-color); color: #fff; padding: 6rem 0 5rem; text-align: center; overflow: hidden; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__bg { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, color-mix(in srgb, var(--brand-color) 60%, transparent) 0%, color-mix(in srgb, var(--brand-color) 85%, transparent) 100%); }
.hero__content { position: relative; }
.hero__logo { margin-bottom: 1.5rem; }
.hero__logo img { display: inline-block; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }
.hero h1 { font-size: clamp(1.6rem, 4.5vw, 2.6rem); font-weight: 700; line-height: 1.2; margin-bottom: 0.85rem; text-shadow: 0 2px 12px rgba(0,0,0,0.45); }
.hero__sub { font-size: 1.15rem; opacity: 0.95; text-shadow: 0 1px 8px rgba(0,0,0,0.35); }

.signup-section { background: var(--bg-alt); padding: 2.5rem 0; text-align: center; }
.signup-section h2 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.signup-section p { color: var(--text-muted); margin-bottom: 1.25rem; }

.form-row { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.form-row input[type="email"] { padding: 0.6rem 0.9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 1rem; width: 260px; max-width: 100%; background: var(--paper); color: var(--ink); }
.form-row input[type="email"]:focus { outline: 2px solid var(--brand-accent); border-color: var(--brand-accent); }

.btn { display: inline-block; background: var(--brand-color); color: #fff; padding: 0.6rem 1.4rem; border: none; border-radius: var(--radius-sm); font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: background 0.15s; }
.btn:hover, .btn:focus { background: var(--accent-ink); }

.form-status { margin-top: 0.75rem; min-height: 1.4rem; font-size: 0.95rem; }

.chain-digest { padding: 2.5rem 0; }
.chain-digest h2 { font-size: 1.35rem; margin-bottom: 1.25rem; text-align: center; }
.affiliate-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.affiliate-card a { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1rem; border: 1px solid #e5e7eb; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); font-size: 0.9rem; text-align: center; transition: border-color 0.15s; }
.affiliate-card a:hover { border-color: var(--brand-color); }
.affiliate-card img { width: 56px; height: 56px; object-fit: contain; }

.evergreen-pulse { background: var(--bg-alt); padding: 2.5rem 0; }
.evergreen-pulse h2 { font-size: 1.35rem; margin-bottom: 1.25rem; text-align: center; }
.pulse-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.pulse-item { background: var(--bg); border-radius: var(--radius-sm); padding: 1rem 1.25rem; border-left: 3px solid var(--brand-color); display: flex; gap: 1rem; align-items: flex-start; }
.pulse-item__thumb { flex: 0 0 auto; width: 120px; height: 80px; object-fit: cover; border-radius: 4px; }
.pulse-item__body { flex: 1 1 auto; min-width: 0; }
.pulse-item a { color: var(--brand-color); text-decoration: none; }
.pulse-item a:hover { text-decoration: underline; }
.pulse-item p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.3rem; }
@media (max-width: 540px) {
  .pulse-item { flex-direction: column; }
  .pulse-item__thumb { width: 100%; height: 140px; }
}

.cross-promo { padding: 2.5rem 0; text-align: center; }
.cross-promo__label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.5rem; }
.cross-promo__value { max-width: 600px; margin: 0 auto 1.25rem; color: var(--text); }

.site-footer { background: #101418; color: #a8b0ba; padding: 2.2rem 0; text-align: center; font-size: 0.875rem; }
.site-footer a { color: #cdd3da; }
.footer__disclaimer { margin-top: 0.5rem; font-size: 0.8rem; opacity: 0.7; max-width: 70ch; margin-left: auto; margin-right: auto; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; justify-content: center; margin: 0 0 0.85rem; }
.site-footer__nav a { color: #e5e7eb; font-weight: 600; text-decoration: none; }
.site-footer__nav a:hover { text-decoration: underline; }
.site-footer__legal { margin: 0 0 0.5rem; }

.legal-hero { background: var(--brand-color, #114534); color: #fff; }
.legal-hero .container { padding: 2.5rem 20px; }
.legal-hero h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.2rem); color: #fff; }
.legal-hero__meta { margin: 0.6rem 0 0; color: #eef2f7; font-size: 0.92rem; }
.legal-content { max-width: 760px; margin: 0 auto; padding: 2rem 20px 1rem; line-height: 1.7; }
.legal-content h2 { margin: 1.75rem 0 0.6rem; font-size: 1.3rem; line-height: 1.25; }
.legal-content h3 { margin: 1.25rem 0 0.5rem; font-size: 1.08rem; }
.legal-content p, .legal-content li { color: var(--ink); }
.legal-content ul { padding-left: 1.4rem; }
.legal-content a { color: var(--brand-color, #114534); text-decoration: underline; text-underline-offset: 2px; }
.editorial-strip p a, .guides-index__lede a { text-decoration: underline; text-underline-offset: 2px; }

/* Consent banner (compliance): fixed -> no CLS; appears only until the visitor chooses.
   Contrast-safe pairings only (ink-on-paper text, white-on-brand Accept, accent-ink link). */
.consent-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.7rem 1.1rem; padding: 0.85rem 1.1rem; background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px -12px rgba(0, 0, 0, 0.35); font-size: 0.9rem; }
.consent-banner[hidden] { display: none; }
.consent-banner__text { margin: 0; color: var(--ink); max-width: 62ch; }
.consent-banner__text a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.consent-banner__actions { display: flex; gap: 0.6rem; flex: 0 0 auto; }
.consent-banner__btn { padding: 0.5rem 1.15rem; border-radius: var(--radius-sm); font-size: 0.88rem; font-weight: 600; line-height: 1.2; cursor: pointer; border: 1.5px solid transparent; }
.consent-banner__btn--accept { background: var(--brand-color); color: #fff; border-color: var(--brand-color); }
.consent-banner__btn--ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.consent-banner__btn:focus-visible { outline: 3px solid var(--brand-accent); outline-offset: 2px; }
