/* ConfigHub Mini - Landing Page Stylesheet (Sans-serif, High Contrast) */

:root {
  color-scheme: light;
  --bg: #f8f6f2;
  --bg-stone: #efeae1;
  --surface: #ffffff;
  --surface-recessed: #f4f1ea;
  --surface-elevated: #faf8f4;
  --ink: #141311;
  --ink-2: #35322d;
  --muted: #555048;
  --rule: #dcd6cb;
  --rule-strong: #bbb3a5;
  --accent: #b83b04;
  --accent-ink: #9c3002;
  --accent-hover: #962f02;
  --accent-soft: #fdf0ea;
  --accent-border: #e5b39c;
  --btn-primary-bg: #b83b04;
  --btn-primary-hover: #962f02;
  --btn-primary-ink: #ffffff;
  --mint: #15803d;
  --mint-ink: #146c35;
  --mint-soft: #eefaf2;
  --mint-border: #9fdcb6;
  --term-bg: #171614;
  --term-chrome: #23211e;
  --term-border: #3b3731;
  --term-ink: #faf8f5;
  --term-muted: #c6bfb4;
  --closing-bg: #171614;
  --closing-surface: #23211e;
  --closing-rule: #34302a;
  --closing-ink: #faf8f5;
  --closing-muted: #c2bbb0;
  --sans: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max-w: 1140px;
  --gutter: clamp(1.25rem, 4vw, 2.75rem);
  --r-sm: 5px;
  --r-md: 9px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #11100f;
    --bg-stone: #191715;
    --surface: #201e1b;
    --surface-recessed: #151412;
    --surface-elevated: #282521;
    --ink: #faf8f5;
    --ink-2: #e2dcd2;
    --muted: #bab3a8;
    --rule: #35312b;
    --rule-strong: #504a41;
    --accent: #f27138;
    --accent-ink: #ff9c6e;
    --accent-hover: #ff854f;
    --accent-soft: rgba(242, 113, 56, 0.16);
    --accent-border: rgba(242, 113, 56, 0.45);
    --btn-primary-bg: #c94610;
    --btn-primary-hover: #dc5219;
    --btn-primary-ink: #ffffff;
    --mint: #6ee7a8;
    --mint-ink: #8ef2bd;
    --mint-soft: rgba(110, 231, 168, 0.12);
    --mint-border: rgba(110, 231, 168, 0.36);
    --term-bg: #0f0e0c;
    --term-chrome: #1b1916;
    --term-border: #3d3831;
    --term-ink: #faf8f5;
    --term-muted: #c6bfb4;
    --closing-bg: #0c0b09;
    --closing-surface: #181613;
    --closing-rule: #302c27;
    --closing-ink: #faf8f5;
    --closing-muted: #c2bbb0;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11100f;
  --bg-stone: #191715;
  --surface: #201e1b;
  --surface-recessed: #151412;
  --surface-elevated: #282521;
  --ink: #faf8f5;
  --ink-2: #e2dcd2;
  --muted: #bab3a8;
  --rule: #35312b;
  --rule-strong: #504a41;
  --accent: #f27138;
  --accent-ink: #ff9c6e;
  --accent-hover: #ff854f;
  --accent-soft: rgba(242, 113, 56, 0.16);
  --accent-border: rgba(242, 113, 56, 0.45);
  --btn-primary-bg: #c94610;
  --btn-primary-hover: #dc5219;
  --btn-primary-ink: #ffffff;
  --mint: #6ee7a8;
  --mint-ink: #8ef2bd;
  --mint-soft: rgba(110, 231, 168, 0.12);
  --mint-border: rgba(110, 231, 168, 0.36);
  --term-bg: #0f0e0c;
  --term-chrome: #1b1916;
  --term-border: #3d3831;
  --term-ink: #faf8f5;
  --term-muted: #c6bfb4;
  --closing-bg: #0c0b09;
  --closing-surface: #181613;
  --closing-rule: #302c27;
  --closing-ink: #faf8f5;
  --closing-muted: #c2bbb0;
}

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

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

h1, h2, h3, p, pre, ul, ol, dl, dt, dd {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

code, pre {
  font-family: var(--mono);
}

:where(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.ch-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;
}

.ch-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
  font-weight: 600;
}

.ch-skip:focus {
  left: 1rem;
  top: 1rem;
}

.mh-wrap {
  width: min(100% - 2 * var(--gutter), var(--max-w));
  margin-inline: auto;
}

/* Header — unified site ribbon matching stories.html (assets/site.css) */
.mh-header {
  background: var(--bg);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem 1.25rem;
  padding-block: 1rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.91rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
  color: var(--ink);
}

.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.42rem;
  flex-shrink: 0;
  background: linear-gradient(150deg, transparent 32%, #f27138 32% 42%, transparent 42% 52%, #ff9c6e 52% 62%, transparent 62%), #171614;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 550;
  padding: 0.22rem 0.1rem;
}

.topnav a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 0.19em;
}

.topnav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 650;
  border-bottom: 2px solid var(--accent);
}

.themesw {
  display: inline-flex;
  gap: 0.12rem;
  padding: 0.16rem;
  border: 1px solid var(--rule);
  border-radius: 0.45rem;
  background: var(--bg-stone);
}

.themesw button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 0.74rem/1 var(--sans);
  padding: 0.3rem 0.48rem;
  border-radius: 0.3rem;
}

.themesw button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

/* Shared Layout Bands & Typography */
.mh-band {
  padding-block: clamp(3rem, 5.5vh, 4.25rem);
}

.mh-band-tight {
  padding-block: clamp(2.25rem, 4vh, 3rem);
}

.mh-band-stone {
  background: var(--bg-stone);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.mh-eyebrow {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.95rem;
}

.mh-eyebrow-dot {
  width: 7px;
  height: 7px;
  margin-top: 0.44em;
  border-radius: 999px;
  background: var(--accent);
  flex-shrink: 0;
}

.mh-section-head {
  max-width: 44rem;
  margin-bottom: clamp(1.85rem, 3.5vh, 2.5rem);
}

.mh-h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}

.mh-sub {
  margin-top: 0.75rem;
  font-size: 1.02rem;
  line-height: 1.58;
  color: var(--ink-2);
}

.mh-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--accent-border);
  transition: text-decoration-color 140ms ease, color 140ms ease;
}

.mh-link:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

.mh-btn-primary,
.mh-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  border-radius: var(--r-sm);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background-color 140ms ease, border-color 140ms ease, transform 120ms ease;
}

.mh-btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
  border: 1px solid var(--btn-primary-bg);
}

.mh-btn-primary:hover {
  background: var(--btn-primary-hover);
  border-color: var(--btn-primary-hover);
}

.mh-btn-primary:active,
.mh-btn-secondary:active {
  transform: translateY(1px);
}

.mh-btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}

.mh-btn-secondary:hover {
  border-color: var(--ink);
}

/* Section 1: Hero */
.mh-hero {
  padding-block: clamp(2.5rem, 5vh, 3.75rem);
}

.mh-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: clamp(2.25rem, 4.5vw, 4rem);
  align-items: start;
}

.mh-hero h1 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2.15rem, 3.6vw, 3.05rem);
  line-height: 1.07;
  letter-spacing: -0.035em;
  color: var(--ink);
  max-width: 18ch;
  text-wrap: balance;
}

.mh-lead {
  margin-top: 1.1rem;
  font-size: 1.06rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 46ch;
}

.mh-hero-list {
  list-style: none;
  padding: 0;
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
  max-width: 48ch;
}

.mh-hero-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.96rem;
  line-height: 1.52;
  color: var(--ink-2);
}

.mh-hero-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.56em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.mh-hero-list strong {
  color: var(--ink);
  font-weight: 600;
}

.mh-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.65rem;
}

.mh-hero-note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Hero Right Column: 3-Session Story Stack */
.mh-story-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mh-story-card {
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  overflow: hidden;
}

.mh-story-outcome {
  border-color: var(--mint-border);
}

.mh-story-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.62rem 1rem;
  background: var(--surface-recessed);
  border-bottom: 1px solid var(--rule);
}

.mh-story-outcome .mh-story-head {
  background: var(--mint-soft);
  border-bottom-color: var(--mint-border);
}

.mh-story-session {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.mh-story-pill {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.14rem 0.52rem;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--ink-2);
}

.mh-story-pill-mint {
  border-color: var(--mint-border);
  background: var(--surface);
  color: var(--mint-ink);
}

.mh-story-body {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mh-story-quote {
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--ink);
}

.mh-story-quote code {
  font-size: 0.88em;
  padding: 0.06em 0.34em;
  border-radius: 3px;
  background: var(--surface-recessed);
  border: 1px solid var(--rule);
  color: var(--ink);
}

.mh-story-speaker {
  font-weight: 700;
  color: var(--muted);
  margin-right: 0.35rem;
}

.mh-story-saved {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.45;
  padding: 0.48rem 0.72rem;
  border-radius: var(--r-sm);
  background: var(--surface-recessed);
  border: 1px solid var(--rule);
  color: var(--ink-2);
}

.mh-story-recall {
  font-size: 0.875rem;
  line-height: 1.48;
  padding: 0.58rem 0.78rem;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--ink);
}

.mh-story-recall strong {
  color: var(--accent-ink);
  font-weight: 700;
}

.mh-story-step {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.mh-story-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--accent-ink);
  font-size: 0.78rem;
  flex-shrink: 0;
}

.mh-story-foot {
  margin-top: 0.85rem;
  padding-inline: 0.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.85rem;
  font-size: 0.84rem;
  color: var(--muted);
}

/* Looping Hero Story Reveal (Zero Layout Shift) */
html[data-js="1"] [data-story-loop][data-story-stage] [data-story-el] {
  transition: opacity 320ms ease-out, transform 320ms ease-out, border-color 240ms ease;
}

html[data-js="1"] [data-story-loop][data-story-stage="0"] [data-story-el] {
  opacity: 0.12;
  transform: translateY(3px);
}

html[data-js="1"] [data-story-loop][data-story-stage="1"] [data-story-el="saved-1"],
html[data-js="1"] [data-story-loop][data-story-stage="1"] [data-story-el="step-1"],
html[data-js="1"] [data-story-loop][data-story-stage="1"] [data-story-el="card-2"],
html[data-js="1"] [data-story-loop][data-story-stage="1"] [data-story-el="recall-2"],
html[data-js="1"] [data-story-loop][data-story-stage="1"] [data-story-el="step-2"],
html[data-js="1"] [data-story-loop][data-story-stage="1"] [data-story-el="card-3"],
html[data-js="1"] [data-story-loop][data-story-stage="2"] [data-story-el="step-1"],
html[data-js="1"] [data-story-loop][data-story-stage="2"] [data-story-el="card-2"],
html[data-js="1"] [data-story-loop][data-story-stage="2"] [data-story-el="recall-2"],
html[data-js="1"] [data-story-loop][data-story-stage="2"] [data-story-el="step-2"],
html[data-js="1"] [data-story-loop][data-story-stage="2"] [data-story-el="card-3"],
html[data-js="1"] [data-story-loop][data-story-stage="3"] [data-story-el="recall-2"],
html[data-js="1"] [data-story-loop][data-story-stage="3"] [data-story-el="step-2"],
html[data-js="1"] [data-story-loop][data-story-stage="3"] [data-story-el="card-3"],
html[data-js="1"] [data-story-loop][data-story-stage="4"] [data-story-el="step-2"],
html[data-js="1"] [data-story-loop][data-story-stage="4"] [data-story-el="card-3"] {
  opacity: 0;
  transform: translateY(6px);
}

html[data-js="1"] [data-story-loop][data-story-stage="2"] [data-story-el="saved-1"] {
  border-color: var(--accent-border);
}

.mh-story-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.mh-story-pips {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.mh-story-pip {
  width: 18px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--rule-strong);
  transition: background-color 180ms ease;
}

.mh-story-pip[data-active="true"] {
  background: var(--accent);
}

.mh-story-pip[data-story-jump="5"][data-active="true"] {
  background: var(--mint);
}

.mh-story-btn {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 0.22rem 0.5rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--ink-2);
}

.mh-story-btn:hover {
  border-color: var(--accent);
  color: var(--ink);
}

html:not([data-js="1"]) .mh-story-controls {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  html[data-js="1"] [data-story-loop][data-story-stage] [data-story-el] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Section 2: Quick Start Callout */
.mh-quickstart-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}

.mh-meta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.15rem;
  margin-top: 1.15rem;
  font-size: 0.88rem;
}

.mh-meta-links a {
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-strong);
}

.mh-meta-links a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

.mh-install-card {
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  padding: 1.3rem;
}

.mh-install-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.mh-install-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.mh-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  background: var(--surface-recessed);
}

.mh-tabs button {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.32rem 0.78rem;
  min-height: 32px;
}

.mh-tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--rule-strong);
}

.snip,
.say {
  position: relative;
  width: 100%;
  border-radius: var(--r-sm);
  overflow: visible;
}

.snip {
  background: var(--term-bg);
  color: var(--term-ink);
  border: 1px solid var(--term-border);
}

.snip pre {
  padding: 0.9rem 5rem 0.9rem 1rem;
  font-size: 0.875rem;
  line-height: 1.58;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.say {
  background: var(--surface-recessed);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  padding: 0.9rem 5rem 0.9rem 1rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.28rem 0.68rem;
  min-height: 28px;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--ink);
}

.snip .copy-btn {
  background: var(--term-chrome);
  color: var(--term-ink);
  border-color: var(--term-border);
}

.copy-btn:hover {
  border-color: var(--accent);
}

.mh-install-foot {
  margin-top: 0.9rem;
  font-size: 0.88rem;
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.45rem 1rem;
}

/* Section 3: Full-Width Sequential Cookbook */
.mh-cookbook-list {
  display: flex;
  flex-direction: column;
  gap: 1.65rem;
}

.mh-recipe {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  padding: clamp(1.35rem, 2.5vw, 1.85rem);
  scroll-margin-top: 2rem;
}

.mh-recipe-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem 1.25rem;
}

.mh-recipe-intro {
  display: flex;
  align-items: flex-start;
  gap: 1.05rem;
  flex: 1 1 28rem;
  max-width: 37rem;
}

.mh-recipe-num {
  font-family: var(--sans);
  font-size: clamp(2.35rem, 3.4vw, 3rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  flex-shrink: 0;
  padding-top: 0.08rem;
}

.mh-recipe h3 {
  font-family: var(--sans);
  font-size: clamp(1.22rem, 1.8vw, 1.42rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.mh-recipe-desc {
  margin-top: 0.35rem;
  font-size: 0.96rem;
  color: var(--ink-2);
  line-height: 1.55;
}

.mh-recipe-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.mh-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.mh-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid var(--rule-strong);
  background: var(--surface-recessed);
  color: var(--ink-2);
}

.mh-badge-accent {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.mh-recipe-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0.34rem 0.85rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule-strong);
  background: var(--surface-elevated);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  transition: border-color 140ms ease, color 140ms ease;
}

.mh-recipe-cta:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* Labeled Multi-Step Boxes inside Each Full-Width Workflow */
.mh-step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.mh-step-box {
  display: flex;
  flex-direction: column;
  background: var(--surface-recessed);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  overflow: hidden;
}

.mh-step-box-cmd {
  background: var(--term-bg);
  border-color: var(--term-border);
}

.mh-step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 0.58rem 0.95rem;
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--rule);
}

.mh-step-box-cmd .mh-step-head {
  background: var(--term-chrome);
  border-bottom-color: var(--term-border);
}

.mh-step-badge {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.14rem 0.5rem;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-ink);
}

.mh-step-badge-cmd {
  background: var(--mint-soft);
  border-color: var(--mint-border);
  color: var(--mint-ink);
}

.mh-step-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.mh-step-box-cmd .mh-step-title {
  color: var(--term-ink);
}

.mh-step-box .say {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0.95rem 5rem 0.95rem 1rem;
  flex: 1;
}

.mh-step-box .snip {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.mh-step-box .snip pre {
  padding: 0.95rem 5rem 0.95rem 1rem;
}

.mh-step-result {
  padding: 0.82rem 1rem;
  border-top: 1px solid var(--rule);
  background: var(--surface);
  font-size: 0.9rem;
  line-height: 1.54;
  color: var(--ink-2);
}

.mh-step-box-cmd .mh-step-result {
  border-top-color: var(--term-border);
  background: var(--term-chrome);
  color: var(--term-muted);
}

.mh-step-result strong {
  color: var(--ink);
  font-weight: 700;
}

.mh-step-box-cmd .mh-step-result strong {
  color: var(--term-ink);
}

.mh-step-box-cmd .mh-step-result code {
  background: var(--term-bg);
  border-color: var(--term-border);
  color: var(--term-ink);
}

.mh-step-box-cmd .mh-step-result a,
.mh-step-box-cmd .mh-step-result .mh-link {
  color: #ff9c6e;
  text-decoration-color: rgba(255, 156, 110, 0.55);
}

.mh-step-box-cmd .mh-step-result a:hover,
.mh-step-box-cmd .mh-step-result .mh-link:hover {
  color: #ffb693;
  text-decoration-color: #ffb693;
}

.mh-step-result code,
.mh-tier p code {
  font-size: 0.87em;
  background: var(--surface-recessed);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: 0.05em 0.34em;
  color: var(--ink);
}

.mh-record-list {
  padding: 0.95rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}

.mh-record-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.9rem;
  line-height: 1.5;
}

.mh-record-row dt {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

.mh-record-row dd {
  color: var(--ink-2);
}

.mh-record-row dd code {
  font-size: 0.88em;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: 0.06em 0.34em;
  color: var(--ink);
}

/* Recipe Generator Callout */
.mh-recipe-gen {
  margin-top: 1.65rem;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.35rem 2rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-md);
  padding: clamp(1.35rem, 2.5vw, 1.85rem);
}

.mh-recipe-gen h3 {
  margin-top: 0.7rem;
  font-family: var(--sans);
  font-size: clamp(1.2rem, 1.75vw, 1.38rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.mh-recipe-gen-desc {
  margin-top: 0.45rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.mh-recipe-gen-link {
  margin-top: 0.95rem;
}

.mh-browse-row {
  margin-top: 1.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1.45rem;
  font-size: 0.93rem;
  color: var(--ink-2);
}

.mh-browse-row.mh-browse-hero {
  margin-top: 2rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--rule);
  gap: 0.5rem 1.4rem;
  font-size: 0.92rem;
}

/* Section 4: Alice -> Bob Handoff + OSS Tiers + Proof Strip */
.mh-handoff {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  margin-bottom: 1.5rem;
}

.mh-handoff-step {
  background: var(--surface-recessed);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  padding: 1.15rem 1.25rem;
}

.mh-handoff-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.mh-handoff-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
}

.mh-handoff-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.mh-handoff-step p {
  font-size: 0.9rem;
  line-height: 1.54;
  color: var(--ink-2);
}

.mh-handoff-step code {
  font-size: 0.87em;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: 0.05em 0.34em;
  color: var(--ink);
}

.mh-tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.mh-tier {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  padding: 1.45rem;
}

.mh-tier-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-ink);
  margin-bottom: 0.55rem;
}

.mh-tier .mh-badges {
  margin-bottom: 0.7rem;
}

.mh-tier h3 {
  font-family: var(--sans);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.mh-tier p {
  margin-top: 0.5rem;
  font-size: 0.94rem;
  color: var(--ink-2);
  line-height: 1.58;
}

.mh-tier-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.1rem;
}

/* One ConfigHub Stage Progression (Full-Width Stacked Rows) */
.mh-stage-list {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.mh-stage-row {
  display: grid;
  grid-template-columns: minmax(0, 0.36fr) minmax(0, 0.64fr);
  gap: 1.15rem 1.75rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  padding: 1.35rem 1.5rem;
}

.mh-stage-meta {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mh-stage-meta .mh-tier-tag {
  margin-bottom: 0;
}

.mh-stage-meta h3 {
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.22;
}

.mh-stage-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mh-stage-body p {
  font-size: 0.94rem;
  line-height: 1.58;
  color: var(--ink-2);
}

.mh-stage-body p code,
.mh-details p code,
.mh-compare-row code {
  font-size: 0.87em;
  background: var(--surface-recessed);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: 0.05em 0.34em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.mh-stage-cmd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  padding: 0.62rem 0.85rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule-strong);
  background: var(--surface-recessed);
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.mh-stage-cmd strong {
  color: var(--ink);
  font-weight: 600;
}

.mh-stage-cmd code {
  font-size: 0.88em;
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Collapsible Reference Drawers */
.mh-drawer-stack {
  margin-top: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mh-details {
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
}

.mh-details-compact {
  margin-top: 1rem;
  background: var(--surface);
}

.mh-details summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.mh-details-compact summary {
  padding: 0.72rem 0.95rem;
  font-size: 0.875rem;
}

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

.mh-details summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-ink);
  flex-shrink: 0;
  line-height: 1;
}

.mh-details[open] summary::after {
  content: "-";
}

.mh-details summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: var(--r-md);
}

.mh-details-body {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mh-details-compact .mh-details-body {
  padding: 0.75rem 0.95rem 0.9rem;
  gap: 0.55rem;
}

.mh-details-body > p:first-child {
  padding-top: 1rem;
}

.mh-details-compact .mh-details-body > p:first-child {
  padding-top: 0;
}

.mh-drawer-note {
  font-size: 0.9rem;
  line-height: 1.56;
  color: var(--ink-2);
}

.mh-drawer-note strong {
  color: var(--ink);
  font-weight: 600;
}

.mh-drawer-note a {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-border);
}

.mh-drawer-note a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

/* 7 Canonical cub Command Groups Grid */
.mh-cmd-grid {
  padding-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.mh-cmd-card {
  background: var(--surface-recessed);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 0.82rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mh-cmd-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
}

.mh-cmd-name {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
}

.mh-cmd-verbs {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.58;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

/* 5-Step Data Flow Strip */
.mh-flow-strip {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.mh-flow-strip li {
  background: var(--surface-recessed);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mh-flow-strip strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.mh-flow-strip span {
  font-size: 0.8125rem;
  line-height: 1.42;
  color: var(--ink-2);
}

/* Stacked Comparison Rows (Architecture Boundary) */
.mh-compare-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.mh-compare-row {
  display: grid;
  grid-template-columns: minmax(9.5rem, 0.26fr) minmax(0, 0.35fr) minmax(0, 0.39fr);
  gap: 0.65rem 1.25rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.88rem;
  line-height: 1.52;
  color: var(--ink-2);
}

.mh-compare-row:first-child {
  border-top: 0;
}

.mh-compare-head {
  background: var(--surface-recessed);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  padding-block: 0.65rem;
}

.mh-compare-tool {
  font-weight: 700;
  color: var(--ink);
}

.mh-compare-row a {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-border);
}

.mh-compare-row a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

.mh-repo-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mh-repo-list li {
  font-size: 0.9rem;
  line-height: 1.54;
  color: var(--ink-2);
}

.mh-repo-list strong {
  color: var(--ink);
  font-weight: 600;
}

.mh-repo-list a {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-border);
}

.mh-repo-list a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

.mh-proof-strip {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule-strong);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 1.5rem 2rem;
  align-items: center;
}

.mh-stat-num {
  font-family: var(--sans);
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.mh-stat-label {
  margin-top: 0.45rem;
  font-size: 0.89rem;
  color: var(--ink-2);
  line-height: 1.48;
}

.mh-stat-label a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-strong);
}

.mh-stat-label a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

/* Section 5: Grounded Charcoal Closing Band & Footer */
.mh-closing {
  background: var(--closing-bg);
  color: var(--closing-ink);
  padding-block: clamp(3.25rem, 6.5vh, 4.75rem) clamp(2.25rem, 4.5vh, 3rem);
}

.mh-closing-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2.25rem;
  padding-bottom: clamp(2.25rem, 4.5vh, 3rem);
  border-bottom: 1px solid var(--closing-rule);
}

.mh-closing h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.85rem, 3.1vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--closing-ink);
  max-width: 20ch;
}

.mh-closing .mh-actions {
  margin-top: 0;
}

.mh-closing .mh-btn-secondary {
  background: var(--closing-surface);
  color: var(--closing-ink);
  border-color: var(--closing-rule);
}

.mh-closing .mh-btn-secondary:hover {
  border-color: var(--closing-muted);
}

.ch-footer {
  padding-top: 1.75rem;
  font-size: 0.875rem;
  line-height: 1.85;
  color: var(--closing-muted);
}

.ch-footer p + p {
  margin-top: 0.45rem;
}

.ch-footer a {
  color: var(--closing-ink);
  opacity: 0.9;
}

.ch-footer a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* No-JS graceful degradation */
html:not([data-js="1"]) .copy-btn {
  display: none;
}

html:not([data-js="1"]) [data-client-pane][hidden] {
  display: block !important;
  margin-top: 1rem;
}

html:not([data-js="1"]) [data-client-pane="claude"]::before {
  content: "Claude Code";
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

html:not([data-js="1"]) [data-client-pane="codex"]::before {
  content: "Codex CLI";
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

html:not([data-js="1"]) [data-client-pane="agent"]::before {
  content: "Ask your agent";
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

/* Responsive */
@media (max-width: 960px) {
  .mh-hero-grid,
  .mh-quickstart-grid,
  .mh-recipe-gen {
    grid-template-columns: 1fr;
  }

  .mh-handoff,
  .mh-tiers,
  .mh-stage-row {
    grid-template-columns: 1fr;
  }

  .mh-flow-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mh-proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .mh-step-grid,
  .mh-cmd-grid,
  .mh-compare-row {
    grid-template-columns: 1fr;
  }

  .mh-compare-head {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding-block: 0.75rem;
    gap: 0.55rem 0.9rem;
  }

  .topnav {
    gap: 0.35rem 0.75rem;
  }

  .mh-hero {
    padding-block: 2rem 2.5rem;
  }

  .mh-recipe-intro {
    flex-direction: column;
    gap: 0.5rem;
  }

  .mh-record-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .mh-proof-strip,
  .mh-flow-strip {
    grid-template-columns: 1fr;
  }
}
