/* Ariadne — documentation theme.
   Motif: a golden thread traced through a deep-indigo Labyrinth.
   Self-contained (no external hero image): the hero is pure CSS so the site
   builds cleanly before any brand assets exist. */

:root > * {
  /* Thread (Ariadne's clew) */
  --ari-thread: #e8b964;
  --ari-thread-light: #f6dca0;
  --ari-thread-deep: #b8863b;
  --ari-thread-glow: rgba(232, 185, 100, 0.35);

  /* Scarlet highlight — the end of the thread */
  --ari-scarlet: #d2563f;

  /* Labyrinth (deep indigo / obsidian) */
  --ari-indigo: #161228;
  --ari-indigo-light: #211a3a;
  --ari-obsidian: #0a0814;
  --ari-mist: rgba(232, 185, 100, 0.08);

  /* Optional hero art — drop a file at docs/assets/hero.png and it composites
     in on the right, fading into the obsidian on the left so text stays
     readable. Until the file exists the pure-CSS gradient hero stands alone. */
  --hero-bg-image: url('assets/hero.png');

  /* Semantic surface vars (resolved per color scheme below) — default to dark
     so the site is unchanged if no scheme block applies. */
  --ari-bg: var(--ari-obsidian);
  --ari-bg-alt: var(--ari-indigo);
  --ari-panel: var(--ari-indigo-light);
  --ari-ink: var(--ari-ink);                  /* body text on brand surfaces */
  --ari-heading: var(--ari-thread-light); /* accent headings / labels */
  --ari-halo: var(--ari-obsidian);     /* ring behind nodes = page base */

  /* Material overrides */
  --md-primary-fg-color: var(--ari-thread);
  --md-primary-fg-color--light: var(--ari-thread-light);
  --md-primary-fg-color--dark: var(--ari-thread-deep);
  --md-accent-fg-color: var(--ari-thread-light);
}

[data-md-color-scheme="slate"] {
  --md-hue: 250;
  --md-default-bg-color: var(--ari-bg);
  --md-default-bg-color--light: var(--ari-bg-alt);
  --md-typeset-a-color: var(--ari-thread-light);
}

/* Light "parchment" counterpart to the obsidian Labyrinth (header toggle). The
   golden thread stays the accent; surfaces and ink flip, accent gold darkens so
   it reads on cream. */
[data-md-color-scheme="default"] {
  --ari-bg: #faf6ec;
  --ari-bg-alt: #f1e7d2;
  --ari-panel: #ffffff;
  --ari-ink: #2b2545;
  --ari-heading: #835f1b;
  --ari-halo: #faf6ec;
  --ari-thread-light: #9a7324; /* darker gold so accents + gradients read on cream */
  --ari-mist: rgba(131, 95, 27, 0.07);
  --md-default-bg-color: var(--ari-bg);
  --md-default-bg-color--light: #fffdf8;
  --md-typeset-a-color: var(--ari-thread-deep);
}

/* Gradients tuned for dark; in light mode run them darker so they read on cream. */
[data-md-color-scheme="default"] .md-typeset .hero h1 {
  background: linear-gradient(135deg, #5a4416 0%, var(--ari-thread-deep) 55%, #a8742e 100%);
  background-clip: text;
  -webkit-background-clip: text;
  filter: none;
}

[data-md-color-scheme="default"] .stat-num {
  background: linear-gradient(135deg, var(--ari-thread-deep) 0%, #6e521b 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

/* The gold primary CTA keeps dark text in both modes; the hero scrim is the
   page base in both. */
[data-md-color-scheme="default"] .md-typeset .hero .hero-subtitle {
  text-shadow: none;
}

/* ---- Hero ---------------------------------------------------------------- */

body.hero-page .md-footer {
  display: none !important;
}

html.hero-page,
body.hero-page {
  overflow-x: hidden !important;
}

body.hero-page .md-main__inner,
body.hero-page .md-content__inner {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.md-typeset .hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  padding: 6rem 8vw 5rem;
  margin: -1.2rem -0.8rem 0;
  overflow: hidden;
  background-color: var(--ari-bg);
  background:
    /* Light scrim only on the far left for headline legibility. The art already
       carries its own dark-left negative space, so this fades out by ~52% and
       leaves the right half of the image (thread + nodes) fully visible. */
    linear-gradient(to right,
      var(--ari-bg) 0%,
      color-mix(in srgb, var(--ari-bg) 80%, transparent) 20%,
      color-mix(in srgb, var(--ari-bg) 24%, transparent) 38%,
      transparent 48%),
    /* Gentle bottom fade so the hero blends into the page below. */
    linear-gradient(to bottom,
      transparent 60%,
      color-mix(in srgb, var(--ari-bg) 55%, transparent) 88%,
      var(--ari-bg) 100%),
    var(--hero-bg-image, none) right center / cover no-repeat,
    linear-gradient(160deg, var(--ari-bg-alt) 0%, var(--ari-bg) 70%);
}

/* A faint woven-thread grid evoking the Labyrinth, biased to the LEFT (text)
   side so it decorates the dark negative space without muddying the art. */
.md-typeset .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--ari-mist) 1px, transparent 1px),
    linear-gradient(90deg, var(--ari-mist) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 95% at 8% 50%, #000 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.md-typeset .hero > * {
  position: relative;
  z-index: 1;
  /* Keep the whole text column in the left ~42% on wide screens so it clears
     the art (thread + nodes) on the right. Reset to full width when the layout
     centers on narrow screens (see the 960px media query). */
  max-width: min(33rem, 35%);
}

.md-typeset .hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 0.6rem;
  letter-spacing: -0.035em;
  line-height: 1.04;
  max-width: 15ch;
  background: linear-gradient(135deg, #fff7e6 0%, var(--ari-thread-light) 45%, var(--ari-thread) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 18px var(--ari-thread-glow));
}

.md-typeset .hero .hero-subtitle {
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 32ch;
  color: var(--ari-ink);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

.md-typeset .hero .hero-buttons {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 2rem;
}

.md-typeset .hero .hero-buttons > p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.85rem;
  margin: 0;
}

.hero-buttons .md-button {
  min-width: 180px;
  padding: 0.8rem 1.9rem !important;
  font-size: 0.85rem !important;
  border-radius: 3rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase;
  white-space: nowrap;
  /* research(2026-06): inline-flex centering so the leading octicon sits on the
     label's optical center; text-align alone left the icon ~1px high because it
     hung on the twemoji vertical-align. gap replaces the markdown icon's space. */
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

/* research(2026-06): primary CTA visually heavier than secondary, per UX
   hierarchy convention — mirrors the velocity-fl / kourai-khryseai sisters. */
.hero-buttons .md-button--primary {
  background: var(--ari-thread) !important;
  border: 1px solid color-mix(in srgb, var(--ari-thread-light) 50%, transparent) !important;
  color: #1a1206 !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 22px var(--ari-thread-glow) !important;
}

.hero-buttons .md-button--primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--ari-thread) 60%, transparent) !important;
}

.hero-buttons .md-button:not(.md-button--primary) {
  border: 1px solid color-mix(in srgb, var(--ari-thread-light) 35%, transparent) !important;
  color: var(--ari-thread-light) !important;
  background: color-mix(in srgb, var(--ari-bg) 55%, transparent) !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  padding: 0.6rem 1.35rem !important;
  backdrop-filter: blur(6px);
}

.hero-buttons .md-button:not(.md-button--primary):hover {
  border-color: var(--ari-thread-light) !important;
  color: var(--ari-ink) !important;
  background: color-mix(in srgb, var(--ari-panel) 70%, transparent) !important;
}

.hero-modes {
  font-size: clamp(0.72rem, 1.1vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
  color: var(--ari-thread-light);
  margin: 0;
}

/* Keep each store icon glued to its label when the row wraps. */
.hero-modes .mode-item {
  white-space: nowrap;
}

.hero-modes a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--ari-thread-light) 45%, transparent);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hero-modes a:hover {
  color: var(--ari-heading);
  border-bottom-color: var(--ari-thread);
}

/* ---- Landing sections (scroll-revealed by reveal.js) --------------------- */

.landing-section {
  padding: 3.4rem 8vw;
  opacity: 1;
}

html.js-ready .landing-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js-ready .landing-section.visible {
  opacity: 1;
  transform: none;
}

.landing-section .section-inner {
  max-width: 60rem;
  margin: 0 auto;
}

.landing-section--alt {
  background: linear-gradient(180deg, transparent, var(--ari-mist), transparent);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
  color: var(--ari-thread-light);
}

.section-lead {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.7;
  opacity: 0.9;
}

.md-typeset .section-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.6rem 0;
}

/* Credibility stat strip (reinforces "grounded in research").
   research(2026-06): 2026 landing-page guidance treats credibility / social
   proof as a conversion essential, not a nice-to-have — it reduces a visitor's
   perceived risk. For a research tool the honest proof is rigor (sources,
   adversarial verification, recorded decisions), so the numbers are verifiable
   counts rather than testimonials. Source: leadfeeder / boundev 2026 landing-page
   best-practice roundups. */
.md-typeset .stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 2.8rem;
  margin: 1.8rem 0 0.4rem;
  padding: 0;
  list-style: none;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-num {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--ari-thread-light) 0%, var(--ari-thread) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.stat-label {
  font-size: 0.82rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  opacity: 0.82;
  max-width: 18ch;
}

@media (max-width: 600px) {
  .md-typeset .stat-strip {
    gap: 1.4rem 1.6rem;
  }
  .stat {
    flex: 1 1 38%;
  }
}

/* Closing call-to-action band. */
.landing-section--cta {
  text-align: center;
  border-top: 1px solid color-mix(in srgb, var(--ari-thread) 16%, transparent);
}

.landing-section--cta .section-inner {
  max-width: 42rem;
}

.landing-section--cta .section-title {
  color: var(--ari-heading);
}

.landing-section--cta .section-lead {
  margin-bottom: 1.8rem;
}

.md-typeset .section-buttons--center {
  justify-content: center;
}

/* Drop the header/hero seam: on the landing page the header shares the
   hero's obsidian so there's no color line at the very top. */
body.hero-page .md-header {
  background-color: var(--ari-bg);
}

/* Feature grid for the landing page. Balanced 2x2 so no quadrant is left empty. */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 2rem;
}

@media (max-width: 600px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  border: 1px solid var(--glass-border, color-mix(in srgb, var(--ari-thread) 18%, transparent));
  border-radius: 0.9rem;
  padding: 1.5rem;
  background: color-mix(in srgb, var(--ari-panel) 35%, transparent);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.feature-card:hover {
  border-color: color-mix(in srgb, var(--ari-thread) 45%, transparent);
  transform: translateY(-2px);
}

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--ari-thread-light);
}

.feature-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  opacity: 0.85;
}

/* ---- "Follow the thread" trace ------------------------------------------- */

.trace-note {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ari-thread);
  border: 1px solid color-mix(in srgb, var(--ari-thread) 35%, transparent);
  border-radius: 2rem;
  padding: 0.12rem 0.7rem;
  margin-left: 0.5rem;
  white-space: nowrap;
  vertical-align: middle;
  opacity: 0.9;
}

.trace-q {
  margin: 2rem 0 0.5rem;
  padding: 1.1rem 1.4rem;
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--ari-panel) 40%, transparent);
  border: 1px solid color-mix(in srgb, var(--ari-thread) 22%, transparent);
}

.trace-q-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ari-thread);
  margin-bottom: 0.35rem;
}

.md-typeset .trace-q p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--ari-ink);
}

.md-typeset .trace-steps {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  position: relative;
}

/* The golden thread running down the steps, ending in scarlet. */
.trace-steps::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 1.6rem;
  bottom: 1.6rem;
  width: 2px;
  background: linear-gradient(to bottom,
    transparent,
    var(--ari-thread-deep) 6%,
    var(--ari-thread) 45%,
    var(--ari-scarlet) 100%);
  opacity: 0.65;
}

.md-typeset .trace-step {
  position: relative;
  margin: 0;
  padding: 1.2rem 0 1.2rem 2.7rem;
}

/* Node on the thread. */
.trace-step::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 1.6rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ari-thread);
  box-shadow: 0 0 0 4px var(--ari-bg), 0 0 14px var(--ari-thread-glow);
}

.trace-step--answer::before {
  background: var(--ari-scarlet);
  box-shadow: 0 0 0 4px var(--ari-bg),
    0 0 18px color-mix(in srgb, var(--ari-scarlet) 60%, transparent);
}

.trace-badge {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ari-thread-light);
  border: 1px solid color-mix(in srgb, var(--ari-thread) 30%, transparent);
  border-radius: 2rem;
  padding: 0.12rem 0.7rem;
  margin-bottom: 0.55rem;
}

.trace-step--answer .trace-badge {
  color: var(--ari-scarlet);
  border-color: color-mix(in srgb, var(--ari-scarlet) 45%, transparent);
}

.md-typeset .trace-step h3 {
  margin: 0 0 0.3rem;
  font-size: 1.12rem;
  color: var(--ari-thread-light);
}

.md-typeset .trace-step--answer h3 {
  color: var(--ari-scarlet);
}

.md-typeset .trace-step p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.88;
}

/* ---- Dataset funnel — heterogeneous sources converging through one adapter
   seam into the canonical stores. A convergence idiom (many -> one -> out). -- */
.md-typeset .figure-funnel {
  position: relative;
  width: 100%;
  max-width: 36rem;
  aspect-ratio: 1 / 0.5;
  margin: 2rem auto 2.4rem;
}

.md-typeset .figure-funnel .flines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.figure-funnel .flines line {
  stroke: color-mix(in srgb, var(--ari-thread) 42%, transparent);
  stroke-width: 1;
}

.figure-funnel .flines .out {
  stroke: var(--ari-thread);
  stroke-width: 1.6;
}

.md-typeset .figure-funnel .src,
.md-typeset .figure-funnel .seam,
.md-typeset .figure-funnel .sink {
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  border-radius: 0.5rem;
  border: 1px solid color-mix(in srgb, var(--ari-thread) 30%, transparent);
  background: color-mix(in srgb, var(--ari-panel) 72%, transparent);
}

.figure-funnel .src {
  width: 8.6rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.74rem;
}

.figure-funnel .src b {
  color: var(--ari-heading);
  font-weight: 600;
}

.figure-funnel .src .mod {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
}

.figure-funnel .seam {
  width: 7rem;
  padding: 0.6rem 0.5rem;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--ari-heading);
  border-color: color-mix(in srgb, var(--ari-thread) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ari-thread) 12%, transparent);
}

.figure-funnel .seam small {
  display: block;
  font-weight: 400;
  font-size: 0.62rem;
  opacity: 0.72;
}

.figure-funnel .sink {
  width: 8.2rem;
  padding: 0.55rem 0.5rem;
  font-size: 0.76rem;
  color: var(--ari-ink);
  border-color: color-mix(in srgb, var(--ari-scarlet) 38%, transparent);
}

.figure-funnel .sink b { color: var(--ari-heading); }

.figure-funnel .src-1 { left: 15%; top: 15%; }
.figure-funnel .src-2 { left: 15%; top: 38%; }
.figure-funnel .src-3 { left: 15%; top: 62%; }
.figure-funnel .src-4 { left: 15%; top: 85%; }
.figure-funnel .seam  { left: 52%; top: 50%; }
.figure-funnel .sink  { left: 86%; top: 50%; }

@media (max-width: 600px) {
  .md-typeset .figure-funnel { max-width: 22rem; aspect-ratio: 1 / 0.9; }
  .figure-funnel .src { width: 7rem; }
}

/* ---- Canonical schema — an ER/data-model figure (tables + typed links).
   A different idiom again: DB-style tables, not nodes-and-arrows. ----------- */
.md-typeset .schema-model {
  position: relative;
  width: 100%;
  max-width: 34rem;
  aspect-ratio: 1 / 0.85;
  margin: 2rem auto 2.4rem;
}

.md-typeset .schema-model .links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.schema-model .links line {
  stroke: color-mix(in srgb, var(--ari-thread) 45%, transparent);
  stroke-width: 1;
}

.md-typeset .schema-model .tbl {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 9.2rem;
  border-radius: 0.55rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ari-thread) 32%, transparent);
  background: color-mix(in srgb, var(--ari-panel) 80%, transparent);
  font-size: 0.78rem;
}

.schema-model .tbl-h {
  padding: 0.35rem 0.7rem;
  font-weight: 700;
  font-size: 0.86rem;
  color: #1f1608; /* dark ink on the always-gold header, both schemes */
  background: linear-gradient(var(--ari-thread), var(--ari-thread-deep));
  letter-spacing: 0.01em;
}

.schema-model .tbl-r {
  padding: 0.28rem 0.7rem;
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.72rem;
  color: var(--ari-ink);
  border-top: 1px solid color-mix(in srgb, var(--ari-thread) 14%, transparent);
}

.schema-model .tbl--hub {
  border-color: color-mix(in srgb, var(--ari-thread) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ari-thread) 12%, transparent);
}

.md-typeset .schema-model .tbl-entity { left: 50%; top: 44%; z-index: 2; }
.md-typeset .schema-model .tbl-attribute { left: 12%; top: 12%; width: 7.2rem; }
.md-typeset .schema-model .tbl-document { left: 88%; top: 12%; width: 7.2rem; }
.md-typeset .schema-model .tbl-relationship { left: 50%; top: 86%; z-index: 2; }

.md-typeset .schema-model .rel-label {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 4; /* above every table so a connector label is never buried */
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ari-heading);
  background: var(--ari-bg);
  padding: 0.05rem 0.4rem;
  border-radius: 1rem;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .md-typeset .schema-model { max-width: 24rem; aspect-ratio: 1 / 1.1; }
  .md-typeset .schema-model .tbl { width: 8rem; }
  .schema-model .tbl-attribute { left: 24%; top: 18%; }
  .schema-model .tbl-document { left: 76%; top: 18%; }
}

/* ---- Lifecycle ring — propose -> ratify -> freeze, repeating, around an
   immutable eval-gate core. A cycle, deliberately not a straight pipeline. ---- */
.md-typeset .figure-cycle {
  position: relative;
  width: 100%;
  max-width: 30rem;
  aspect-ratio: 1 / 0.86;
  margin: 2rem auto 2.6rem;
}

.md-typeset .figure-cycle .cycle-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.figure-cycle .cycle-ring .ring {
  fill: none;
  stroke: color-mix(in srgb, var(--ari-thread) 55%, transparent);
  stroke-width: 1.3;
  stroke-linecap: round;
}

.figure-cycle .cycle-ring .tip {
  fill: var(--ari-thread);
}

.md-typeset .figure-cycle .cyc-node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 8.6rem;
  text-align: center;
  padding: 0.6rem 0.7rem;
  border-radius: 0.7rem;
  border: 1px solid color-mix(in srgb, var(--ari-thread) 32%, transparent);
  background: color-mix(in srgb, var(--ari-panel) 72%, transparent);
}

.figure-cycle .cyc-node b {
  display: block;
  color: var(--ari-heading);
  font-size: 0.95rem;
}

.figure-cycle .cyc-node span {
  font-size: 0.72rem;
  line-height: 1.35;
  opacity: 0.8;
}

.cyc-propose { left: 50%; top: 12%; }
.cyc-ratify  { left: 84%; top: 72%; }
.cyc-freeze  { left: 16%; top: 72%; }

.md-typeset .figure-cycle .cyc-core {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 8.4rem;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.6rem;
  border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--ari-scarlet) 60%, transparent);
  background: radial-gradient(circle at 50% 40%,
    color-mix(in srgb, var(--ari-scarlet) 16%, transparent), transparent 72%);
  color: var(--ari-heading);
  font-weight: 700;
  font-size: 0.8rem;
}

.figure-cycle .cyc-core small {
  display: block;
  font-weight: 400;
  opacity: 0.78;
  font-size: 0.64rem;
  line-height: 1.3;
  margin-top: 0.25rem;
  color: var(--ari-ink);
}

@media (max-width: 520px) {
  .md-typeset .figure-cycle { max-width: 22rem; aspect-ratio: 1 / 1; }
  .figure-cycle .cyc-node { width: 7rem; font-size: 0.85rem; }
}

/* ---- Eval pyramid — a layered-tier figure (deliberately NOT a flowchart).
   Wide/cheap/abundant at the base, narrow/costly/rare at the apex. Stepped
   (ziggurat) silhouette suits the Labyrinth motif; pure CSS, air-gap-safe. --- */
.md-typeset .eval-pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem auto 2.4rem;
  max-width: 42rem;
}

.md-typeset .eval-pyramid .tier {
  width: var(--w);
  padding: 0.85rem 1.2rem 0.9rem;
  text-align: center;
  border-radius: 0.6rem;
  border: 1px solid color-mix(in srgb, var(--tint, var(--ari-thread)) 40%, transparent);
  background:
    radial-gradient(ellipse 70% 120% at 50% 0%,
      color-mix(in srgb, var(--tint, var(--ari-thread)) 12%, transparent), transparent 70%),
    color-mix(in srgb, var(--ari-panel) 55%, transparent);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.md-typeset .eval-pyramid .tier:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--tint, var(--ari-thread)) 75%, transparent);
}

.eval-pyramid .tier .tk {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ari-heading);
}

.eval-pyramid .tier .td {
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0.85;
  margin-top: 0.15rem;
}

.eval-pyramid .tier .tmeta {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: color-mix(in srgb, var(--tint, var(--ari-thread)) 90%, var(--ari-ink));
  margin-top: 0.35rem;
}

.md-typeset .eval-pyramid .pyramid-axis {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  opacity: 0.6;
  text-align: center;
}

/* ---- Architecture diagram (bespoke, zero-dependency, air-gap-safe) -------- */
/* research(2026-06): docs UX guidance favors a visual alongside the written
   spec for a topology like orchestrator-worker. Built in CSS rather than Mermaid
   because Zensical's mermaid driver renders blank in this version AND Mermaid
   loads from a CDN at runtime, which would break Ariadne's own air-gapped
   deployment (ADR-0012). */

.md-typeset .arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 2rem 0;
  padding: 1.6rem 1rem;
  border: 1px solid color-mix(in srgb, var(--ari-thread) 16%, transparent);
  border-radius: 1rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--ari-mist), transparent 70%),
    color-mix(in srgb, var(--ari-bg) 55%, transparent);
}

.arch-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.arch-row--three {
  flex-wrap: wrap;
  align-items: stretch;
}

.md-typeset .arch-node {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: center;
  padding: 0.85rem 1.3rem;
  border-radius: 0.7rem;
  border: 1px solid color-mix(in srgb, var(--ari-thread) 22%, transparent);
  background: color-mix(in srgb, var(--ari-panel) 45%, transparent);
  min-width: 9rem;
}

.arch-node-title {
  font-weight: 700;
  color: var(--ari-thread-light);
  font-size: 1rem;
}

.arch-node-sub {
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  opacity: 0.75;
}

/* Lead orchestrator and synthesis are the load-bearing nodes: heavier border. */
.md-typeset .arch-node--lead,
.md-typeset .arch-node--synth {
  border-color: color-mix(in srgb, var(--ari-thread) 55%, transparent);
  background: color-mix(in srgb, var(--ari-panel) 70%, transparent);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--ari-thread) 12%, transparent);
}

.md-typeset .arch-node--input {
  background: color-mix(in srgb, var(--ari-panel) 28%, transparent);
}

/* The output node is the end of the thread: scarlet, mirroring the hero trace. */
.md-typeset .arch-node--output {
  border-color: color-mix(in srgb, var(--ari-scarlet) 50%, transparent);
  background: color-mix(in srgb, var(--ari-scarlet) 14%, transparent);
  color: var(--ari-scarlet);
  font-weight: 700;
}

.md-typeset .arch-node--worker {
  flex: 1 1 0;
  min-width: 8.5rem;
  max-width: 13rem;
}

.arch-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ari-thread-light);
  border: 1px solid color-mix(in srgb, var(--ari-thread) 28%, transparent);
  border-radius: 2rem;
  padding: 0.05rem 0.55rem;
  margin: 0 auto 0.35rem;
}

/* Vertical connector between rows: a golden thread segment with a caption. */
.arch-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 2.4rem;
  padding: 0.3rem 0;
}

.arch-flow::before {
  content: "";
  width: 2px;
  height: 1.5rem;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--ari-thread) 70%, transparent),
    color-mix(in srgb, var(--ari-thread) 30%, transparent));
}

.arch-flow-label {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  opacity: 0.7;
  color: var(--ari-thread-light);
  text-align: center;
}

@media (max-width: 600px) {
  .arch-row--three {
    flex-direction: column;
    align-items: stretch;
  }
  .md-typeset .arch-node--worker {
    max-width: none;
  }
}

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 960px) {
  .md-typeset .hero {
    align-items: center;
    text-align: center;
    padding: 4rem 6vw;
  }

  /* Centered layout — let the text use the full width again. */
  .md-typeset .hero > * {
    max-width: 100%;
  }

  .md-typeset .hero .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .md-typeset .hero .hero-buttons,
  .md-typeset .hero .hero-buttons > p {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .md-typeset .hero h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
    max-width: 16ch;
  }

  .md-typeset .hero .hero-buttons > p {
    flex-direction: column;
    width: 100%;
    align-items: center;
  }

  .hero-buttons .md-button {
    width: 85%;
    max-width: 280px;
  }

  .landing-section {
    padding: 3rem 1.4rem;
  }
}
