/* ============================================================================
   AMAADOR OPERATIONAL EXCELLENCE — PREMIUM SITE SYSTEM
   Loaded last. Consolidates the legacy blueprint/page layers into one coherent
   product language without changing calculator or generator contracts.
   ============================================================================ */

/* Legacy-token bridge ------------------------------------------------------- */
:root {
  --field-1: var(--bg);
  --field-2: var(--bg-subtle);
  --field-3: var(--surface);
  --field-wave: transparent;
  --field-wave-2: transparent;
  --panel-edge: var(--line);
  --border-violet: var(--line-strong);
  --nm-dark: color-mix(in oklch, var(--ink) 12%, transparent);
  --nm-light: color-mix(in oklch, white 80%, transparent);
  --nm-raised: var(--shadow-sm);
  --nm-raised-sm: var(--shadow-xs);
  --nm-raised-lg: var(--shadow-md);
  --nm-hover: var(--shadow-md);
  --nm-inset: inset 0 0 0 1px var(--line);
  --nm-inset-sm: inset 0 0 0 1px var(--line);
  --nm-pressed: inset 0 1px 2px color-mix(in oklch, var(--ink) 10%, transparent);
  --nm-sheen: none;
  --nm-panel: none;
  --gloss: none;
  --grad-accent: var(--brand);
  --glow-violet: transparent;
  --glow-violet-soft: transparent;
  --glow-magenta: transparent;
  --glow-cyan: transparent;
  --good: var(--success);
  --warn: var(--warning);
  --bad: var(--danger);
  --p-maint: oklch(0.49 0.10 160);
  --p-ops: oklch(0.50 0.10 220);
  --p-fac: oklch(0.53 0.10 82);
  --p-ci: oklch(0.48 0.11 151);
  --p-asset: oklch(0.45 0.07 260);
  --p-supply: oklch(0.48 0.08 315);
  --maxw: var(--wrap);
  --display: var(--font-sans);
  /* Older brand-kit page aliases. */
  --txt: var(--ink-soft);
  --hair: var(--line);
  --glass: var(--surface);
  --window: var(--surface);
  --r-md: var(--radius);
  --r-lg: var(--radius-lg);
  --acc: var(--brand);
  --acc2: var(--brand-strong);
  --on-navy: white;
  --pill: var(--radius-pill);
}

html[data-theme="dark"],
html[data-theme="pitch"] {
  --field-1: var(--bg);
  --field-2: var(--bg-subtle);
  --field-3: var(--surface);
}

/* Global cleanup ------------------------------------------------------------ */
body {
  padding: 0;
  background: var(--bg);
  color: var(--ink-soft);
  overflow-x: clip;
}

body::before { content: none; }

.app-shell {
  position: relative;
  z-index: 0;
  isolation: isolate;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
}

.wrap {
  width: min(calc(100% - 2.5rem), var(--wrap));
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0;
}

.muted { color: var(--ink-muted); }
.accent { color: var(--brand); }
.grad { color: inherit; }

.section {
  padding-block: var(--space-9);
}

.section-head {
  max-width: 48rem;
  margin: 0 auto var(--space-7);
  text-align: center;
}

.section-head h2 { margin-bottom: 0.85rem; }
.section-head p { margin: 0; }

.kicker,
.label,
.nm-eyebrow {
  display: inline-block;
  color: var(--brand-strong);
  font-size: var(--text-sm);
  font-weight: 680;
  letter-spacing: -0.01em;
  text-transform: none;
}

.badge,
.pill {
  min-height: 1.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: var(--text-xs);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
}

.badge .dot,
.pill .dot,
.dot {
  width: 0.45rem;
  height: 0.45rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: none;
}

.dot-maint { background: var(--p-maint); }
.dot-ops { background: var(--p-ops); }
.dot-fac { background: var(--p-fac); }
.dot-ci { background: var(--p-ci); }
.dot-asset { background: var(--p-asset); }
.dot-supply { background: var(--p-supply); }

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Remove accumulated floating chrome. The suite launcher remains the one
   intentional cross-property control. */
#amx-fabs,
.amx-pop,
.amc-float,
.pitch-switch {
  display: none !important;
}

/* Shared header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  box-shadow: none;
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.site-header .wrap { width: min(calc(100% - 2.5rem), var(--wrap)); }

.nav {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.brand,
.nav .brand,
.site-footer .brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  text-decoration: none;
}

.brand:hover { color: var(--ink); }

.brand .logo {
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand .logo img { width: 100%; height: 100%; }

.brand .bwm {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  line-height: 1;
}

.brand .bn {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 760;
  letter-spacing: 0.055em;
}

.brand .bs {
  color: var(--ink-muted);
  font-size: 0.55rem;
  font-weight: 610;
  letter-spacing: 0.035em;
  text-transform: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.nav-links a,
.nav-links .dropdown-toggle {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 580;
  text-decoration: none;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.nav-links a:hover,
.nav-links .dropdown-toggle:hover,
.dropdown.open > .dropdown-toggle {
  background: var(--bg-subtle);
  color: var(--ink);
}

.nav-links a.active {
  background: transparent;
  color: var(--ink);
  font-weight: 690;
  box-shadow: none;
}

.nav-links .nav-cta,
.nav-cta {
  min-height: 2.55rem !important;
  margin-left: 0.35rem;
  padding: 0.65rem 1rem !important;
  border: 1px solid var(--ink) !important;
  border-radius: var(--radius-pill) !important;
  background: var(--ink) !important;
  color: var(--ink-inverse) !important;
  font-weight: 680 !important;
  box-shadow: none !important;
}

.nav-links .nav-cta:hover,
.nav-cta:hover {
  border-color: var(--brand-strong) !important;
  background: var(--brand-strong) !important;
  color: white !important;
}

.theme-toggle,
.hamburger,
.nav-menu-toggle {
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  box-shadow: none;
  cursor: pointer;
}

.theme-toggle:hover,
.hamburger:hover,
.nav-menu-toggle:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.hamburger,
.nav-menu-toggle { display: none; margin-left: auto; font-size: 0; }

.hamburger::before,
.nav-menu-toggle::before,
.hamburger::after,
.nav-menu-toggle::after {
  content: "";
  position: absolute;
  width: 1.15rem;
  height: 1px;
  background: currentColor;
  transition: transform 180ms var(--ease-out);
}

.hamburger::before,
.nav-menu-toggle::before { transform: translateY(-0.22rem); }
.hamburger::after,
.nav-menu-toggle::after { transform: translateY(0.22rem); }

.hamburger[aria-expanded="true"]::before,
.nav-menu-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
.hamburger[aria-expanded="true"]::after,
.nav-menu-toggle[aria-expanded="true"]::after { transform: rotate(-45deg); }

.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  z-index: 120;
  min-width: 17rem;
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--ink-soft);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.4rem);
  transition: opacity 160ms ease, transform 200ms var(--ease-out), visibility 0s linear 200ms;
}

.dropdown-menu::before {
  content: "";
  position: absolute;
  inset: -0.6rem 0 auto;
  height: 0.7rem;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.dropdown-menu a {
  width: 100%;
  justify-content: flex-start;
  border-radius: var(--radius-sm);
}

.dropdown-menu .dd-all {
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  color: var(--brand-strong);
}

/* Homepage ------------------------------------------------------------------ */
.home-page { background: var(--bg); }

.home-hero {
  position: relative;
  overflow: hidden;
  padding: 6.75rem 0 5.5rem;
  background: var(--bg);
}

.home-hero::before {
  content: "";
  position: absolute;
  width: 40rem;
  height: 40rem;
  top: -22rem;
  left: -18rem;
  border-radius: 50%;
  background: color-mix(in oklch, var(--brand-wash) 65%, transparent);
  filter: blur(1px);
  pointer-events: none;
}

.home-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(32rem, 1.14fr);
  align-items: center;
  gap: 5rem;
}

.home-hero__copy { position: relative; z-index: 1; }

.hero-proof {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 620;
}

.hero-proof span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0.3rem var(--brand-wash);
}

.home-hero h1 {
  max-width: 10.5ch;
  margin: 0 0 1.5rem;
  color: var(--ink);
  font-size: var(--text-display);
  font-weight: 720;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.home-hero__lead {
  max-width: 35rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.18rem;
  line-height: 1.55;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.home-hero__note {
  max-width: 31rem;
  margin: 1.25rem 0 0;
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.ops-monitor {
  position: relative;
  min-height: 38rem;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-inverse);
  border-radius: 2rem;
  background:
    radial-gradient(circle at 80% 12%, color-mix(in oklch, var(--brand) 24%, transparent), transparent 34%),
    var(--surface-inverse);
  color: var(--ink-inverse);
  box-shadow: var(--shadow-lg);
}

.ops-monitor::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, color-mix(in oklch, var(--ink-inverse) 9%, transparent) 1px, transparent 1px);
  background-size: 1.25rem 1.25rem;
  mask-image: linear-gradient(to bottom, black, transparent 68%);
  opacity: 0.5;
}

.ops-monitor__bar {
  position: relative;
  z-index: 2;
  height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--line-inverse);
  color: var(--ink-inverse-soft);
  font-size: var(--text-sm);
  font-weight: 620;
}

.ops-monitor__status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.ops-monitor__status i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--brand-bright);
  box-shadow: 0 0 0 0.25rem color-mix(in oklch, var(--brand-bright) 14%, transparent);
}

.ops-monitor__main {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 12rem;
  align-items: center;
  gap: 1rem;
  padding: 2.25rem 2rem 1.75rem;
}

.ops-monitor__score > span {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--ink-inverse-soft);
  font-size: var(--text-sm);
}

.ops-monitor__score strong {
  display: block;
  color: var(--ink-inverse);
  font-family: var(--font-mono);
  font-size: 4.25rem;
  font-weight: 560;
  line-height: 1;
  letter-spacing: -0.055em;
}

.ops-monitor__score strong small { font-size: 0.4em; }

.ops-monitor__score em {
  display: block;
  margin-top: 0.75rem;
  color: var(--brand-bright);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: 620;
}

.ops-monitor__dial {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
}

.ops-monitor__dial svg { position: absolute; inset: 0; transform: rotate(-110deg); }
.ops-monitor__dial circle { fill: none; stroke-width: 6; }
.dial-track { stroke: color-mix(in oklch, var(--ink-inverse) 12%, transparent); }
.dial-value {
  stroke: var(--brand-bright);
  stroke-linecap: round;
  stroke-dasharray: 452;
  stroke-dashoffset: 136;
  animation: dial-in 900ms var(--ease-out) both 160ms;
}
.dial-node { fill: var(--brand-bright) !important; stroke: none !important; }
.ops-monitor__dial span { color: var(--ink-inverse-soft); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; }

@keyframes dial-in { from { stroke-dashoffset: 452; } }

.ops-monitor__factors {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0 2rem;
}

.ops-monitor__factors > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line-inverse);
}

.ops-monitor__factors span { color: var(--ink-inverse-soft); font-size: var(--text-xs); }
.ops-monitor__factors strong { color: var(--ink-inverse); font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 560; }
.ops-monitor__factors i {
  grid-column: 1 / -1;
  height: 2px;
  overflow: hidden;
  border-radius: 1px;
  background: color-mix(in oklch, var(--ink-inverse) 10%, transparent);
}
.ops-monitor__factors i::after {
  content: "";
  display: block;
  width: var(--value);
  height: 100%;
  background: var(--brand-bright);
  transform-origin: left;
  animation: factor-in 700ms var(--ease-out) both 320ms;
}
@keyframes factor-in { from { transform: scaleX(0); } }

.ops-monitor__flow {
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: 11.25rem;
  color: var(--brand-bright);
}

.ops-monitor__flow svg { width: 100%; height: 100%; }
.flow-grid { fill: none; stroke: color-mix(in oklch, var(--ink-inverse) 8%, transparent); stroke-width: 1; }
.flow-area { fill: color-mix(in oklch, var(--brand-bright) 12%, transparent); }
.flow-line {
  fill: none;
  stroke: url(#flowStroke);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 920;
  stroke-dashoffset: 0;
  animation: flow-in 1100ms var(--ease-out) both 220ms;
}
@keyframes flow-in { from { stroke-dashoffset: 920; } }
.ops-monitor__flow span,
.ops-monitor__flow b {
  position: absolute;
  bottom: 1.2rem;
  font-size: var(--text-xs);
}
.ops-monitor__flow span { left: 2rem; color: var(--ink-inverse-soft); }
.ops-monitor__flow b { right: 2rem; color: var(--brand-bright); font-family: var(--font-mono); font-weight: 560; }

.proof-rail {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.proof-rail dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
}

.proof-rail dl > div {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1.55rem 1.5rem;
  border-right: 1px solid var(--line);
}
.proof-rail dl > div:first-child { padding-left: 0; }
.proof-rail dl > div:last-child { border-right: 0; }
.proof-rail dt { color: var(--ink); font-family: var(--font-mono); font-size: 1.45rem; font-weight: 600; }
.proof-rail dd { margin: 0; color: var(--ink-muted); font-size: var(--text-sm); line-height: 1.3; }

.home-intro { padding: 9rem 0; }

.home-intro__grid {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 3rem;
}

.home-intro__index {
  margin: 0.55rem 0 0;
  color: var(--brand-strong);
  font-size: var(--text-sm);
  font-weight: 680;
}

.home-intro h2 {
  max-width: 21ch;
  margin-bottom: 1.75rem;
  font-size: 3.7rem;
  line-height: 1.02;
}

.home-intro h2 + p {
  max-width: 42rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.2rem;
}

.feature-stage { padding: 8rem 0; }

.feature-stage--dark {
  background: var(--surface-inverse);
  color: var(--ink-inverse-soft);
}

.feature-stage--paper { background: var(--bg-subtle); }

.feature-stage__grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  align-items: center;
  gap: 6rem;
}

.feature-stage__grid--reverse { grid-template-columns: 1.22fr 0.78fr; }

.feature-stage__copy h2 {
  max-width: 12ch;
  margin-bottom: 1.5rem;
  font-size: 3.4rem;
  line-height: 1;
}

.feature-stage--dark .feature-stage__copy h2 { color: var(--ink-inverse); }

.feature-stage__copy > p:not(.feature-stage__number) {
  max-width: 34rem;
  margin-bottom: 1.5rem;
  color: inherit;
  font-size: 1.08rem;
}

.feature-stage__number {
  margin: 0 0 1.4rem;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
}

.feature-stage--dark .feature-stage__number { color: var(--brand-bright); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--brand-strong);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
}

.feature-stage--dark .text-link { color: var(--brand-bright); }
.text-link span { transition: transform 180ms var(--ease-out); }
.text-link:hover span { transform: translateX(0.2rem); }

.decision-panel {
  overflow: hidden;
  border: 1px solid var(--line-inverse);
  border-radius: var(--radius-xl);
  background: var(--surface-inverse-raised);
  box-shadow: 0 32px 80px -45px rgba(0, 0, 0, 0.85);
}

.decision-panel__head {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--line-inverse);
  color: var(--ink-inverse-soft);
  font-size: var(--text-sm);
}

.decision-panel__head span:first-child { color: var(--ink-inverse); font-weight: 650; }

.decision-panel__body {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  min-height: 26rem;
}

.decision-panel__inputs {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  padding: 2rem;
  border-right: 1px solid var(--line-inverse);
}

.decision-panel__inputs label {
  display: grid;
  gap: 0.45rem;
  color: var(--ink-inverse-soft);
  font-size: var(--text-xs);
}

.decision-panel__inputs label span {
  min-height: 3rem;
  display: flex;
  align-items: center;
  padding: 0 0.85rem;
  border: 1px solid var(--line-inverse);
  border-radius: var(--radius-sm);
  background: color-mix(in oklch, var(--surface-inverse) 60%, transparent);
  color: var(--ink-inverse);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.decision-panel__answer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  background: color-mix(in oklch, var(--brand) 8%, transparent);
}

.decision-panel__answer > span { color: var(--ink-inverse-soft); font-size: var(--text-sm); }
.decision-panel__answer > strong {
  margin: 0.6rem 0 1.5rem;
  color: var(--ink-inverse);
  font-family: var(--font-mono);
  font-size: 4.8rem;
  font-weight: 540;
  line-height: 1;
  letter-spacing: -0.06em;
}
.decision-panel__answer p {
  max-width: 24rem;
  margin: 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-inverse);
  color: var(--ink-inverse-soft);
  font-size: var(--text-sm);
}
.decision-panel__answer b { color: var(--brand-bright); }

.disciplines-section { padding: 9rem 0; }

.disciplines-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 7rem;
}

.disciplines-copy { align-self: start; position: sticky; top: 7rem; }
.disciplines-copy h2 { margin-bottom: 1.4rem; font-size: 3.4rem; line-height: 1; }
.disciplines-copy p { max-width: 30rem; margin-bottom: 1.5rem; font-size: 1.08rem; }

.discipline-list { border-top: 1px solid var(--line-strong); }

.discipline-list a {
  min-height: 5.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 2rem;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: color 160ms ease;
}

.discipline-list a:hover { color: var(--brand-strong); }
.discipline-list span { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.02em; transition: transform 180ms var(--ease-out); }
.discipline-list a:hover span { transform: translateX(0.35rem); }
.discipline-list small { color: var(--ink-muted); font-size: var(--text-sm); }
.discipline-list b { color: var(--ink-muted); font-size: 1.1rem; font-weight: 400; transition: transform 180ms var(--ease-out); }
.discipline-list a:hover b { transform: translate(0.15rem, -0.15rem); }

.document-visual {
  position: relative;
  min-height: 40rem;
  display: grid;
  place-items: center;
}

.document-sheet {
  position: relative;
  z-index: 2;
  width: min(92%, 35rem);
  min-height: 42rem;
  padding: 2.8rem;
  border: 1px solid color-mix(in oklch, var(--ink) 10%, transparent);
  border-radius: 0.35rem;
  background: white;
  color: #202824;
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.2deg);
}

.document-sheet--back {
  position: absolute;
  z-index: 1;
  transform: translate(2.2rem, 1.2rem) rotate(3deg);
  background: #e9eeeb;
}

.document-sheet__brand {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid #cfd6d2;
  font-size: var(--text-sm);
  font-weight: 760;
  line-height: 1.1;
}
.document-sheet__brand small { color: #68736d; font-size: 0.65rem; font-weight: 560; }
.document-sheet__brand b { color: #68736d; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 520; }
.document-sheet > p { margin: 2rem 0 0.45rem; color: #68736d; font-size: var(--text-xs); font-weight: 680; }
.document-sheet h3 { max-width: 14ch; color: #202824; font-size: 2rem; line-height: 1.05; }
.document-sheet__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 2rem 0;
  border-block: 1px solid #dbe1de;
}
.document-sheet__meta span { padding: 0.9rem 0.5rem 0.9rem 0; color: #68736d; font-size: 0.67rem; line-height: 1.5; }
.document-sheet__meta b { color: #202824; font-family: var(--font-mono); font-size: 0.75rem; }
.document-sheet ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.document-sheet li {
  min-height: 3.4rem;
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid #e3e7e5;
  color: #39443f;
  font-size: 0.78rem;
  counter-increment: step;
}
.document-sheet li::before { content: counter(step, decimal-leading-zero); color: #0d6a50; font-family: var(--font-mono); font-size: 0.7rem; }
.document-sheet__sign { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 3rem; }
.document-sheet__sign span { padding-top: 1.5rem; border-top: 1px solid #aeb8b3; color: #68736d; font-size: 0.65rem; }

.guide-feature { padding: 9rem 0; background: var(--surface); }

.guide-feature__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 7rem;
}

.guide-feature__heading h2 { max-width: 12ch; font-size: 3.4rem; line-height: 1; }

.guide-list { border-top: 1px solid var(--line-strong); }
.guide-list a {
  min-height: 7rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.guide-list a:hover { color: var(--brand-strong); }
.guide-list span { display: grid; gap: 0.4rem; max-width: 34rem; font-size: 1.15rem; font-weight: 650; line-height: 1.3; letter-spacing: -0.02em; }
.guide-list small { color: var(--ink-muted); font-size: var(--text-xs); font-weight: 560; }
.guide-list b { color: var(--ink-muted); font-size: 1.2rem; font-weight: 400; transition: transform 180ms var(--ease-out); }
.guide-list a:hover b { transform: translateX(0.25rem); }
.guide-list .guide-list__all { min-height: 5rem; color: var(--brand-strong); }
.guide-list .guide-list__all span { font-size: var(--text-sm); }

.trust-stage {
  padding: 6.5rem 0;
  border-block: 1px solid var(--line);
  background: var(--brand-wash);
}

.trust-stage__grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 3rem 6rem;
  align-items: center;
}

.trust-stage__grid > div:first-child { display: grid; grid-template-columns: 2.75rem 1fr; align-items: center; gap: 1.2rem; }
.trust-stage svg { width: 2.75rem; fill: none; stroke: var(--brand-strong); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.trust-stage h2 { max-width: 16ch; font-size: 2.8rem; }
.trust-stage__grid > p { max-width: 34rem; margin: 0; color: var(--ink-soft); font-size: 1.05rem; }
.trust-stage__standards { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.55rem; padding-top: 2rem; border-top: 1px solid color-mix(in oklch, var(--brand-strong) 18%, transparent); }
.trust-stage__standards span { padding: 0.45rem 0.75rem; border: 1px solid color-mix(in oklch, var(--brand-strong) 22%, transparent); border-radius: var(--radius-pill); color: var(--brand-strong); font-size: var(--text-xs); font-weight: 650; }

.final-cta {
  padding: 10rem 0;
  background: var(--bg);
  text-align: center;
}
.final-cta p { margin: 0 0 1rem; color: var(--ink-muted); font-size: var(--text-sm); }
.final-cta h2 { margin-bottom: 2rem; font-size: 4.4rem; line-height: 0.98; }

/* Standard page heroes ------------------------------------------------------ */
.tool-hero,
.gen-hero {
  width: min(calc(100% - 2.5rem), var(--wrap));
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 6rem 0 3rem;
}

.tool-hero .kicker,
.tool-hero > .badge,
.gen-hero > .badge { margin-bottom: 1rem; }

.tool-hero h1,
.gen-hero h1 {
  max-width: 18ch;
  margin: 0 0 1.15rem;
  color: var(--ink);
  font-size: 3.5rem;
  line-height: 1;
}

.tool-hero .sub,
.gen-hero .sub {
  max-width: 47rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.6;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.35rem;
  color: var(--ink-muted);
  font-size: var(--text-xs);
}

.breadcrumb a { color: var(--ink-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-strong); }

.tool-tags,
.gen-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; }

/* Tool library and content cards ------------------------------------------- */
.library-hero {
  padding: 7rem 0 3.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.library-hero h1 {
  max-width: 13ch;
  margin: 0 0 1.25rem;
  color: var(--ink);
  font-size: 4.8rem;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.library-hero > .wrap > p:not(.hero-proof) {
  max-width: 44rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.15rem;
}

.library-search {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.4rem;
}

.library-search .search-well { flex: 1; }
.library-search kbd {
  min-width: 1.55rem;
  min-height: 1.55rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--bg-subtle);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  box-shadow: var(--shadow-xs);
}

.library-search > span { color: var(--ink-muted); font-size: var(--text-xs); white-space: nowrap; }

.library-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.2rem;
}

.library-jump a {
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-size: var(--text-xs);
  font-weight: 620;
  text-decoration: none;
}

.library-jump a:hover { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }

.tool-library { padding-block: 2rem 6rem; }
.tool-group { scroll-margin-top: 5.5rem; margin: 0 !important; padding: 3rem 0; border-bottom: 1px solid var(--line); }
.tool-group:last-child { border-bottom: 0; }

.tool-group__heading,
.library-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.4rem;
}

.tool-group__heading > div { display: flex; align-items: center; gap: 0.7rem; }
.tool-group__heading h2,
.library-section-heading h2 { margin: 0; color: var(--ink); font-size: 1.75rem; }
.tool-group__heading > span,
.library-section-heading > span { color: var(--ink-muted); font-size: var(--text-xs); white-space: nowrap; }
.library-section-heading p { max-width: 40rem; margin: 0.55rem 0 0; color: var(--ink-soft); }

.library-secondary { padding: 7rem 0; border-top: 1px solid var(--line); background: var(--bg-subtle); }
.library-secondary--surface { background: var(--surface); }

.generator-glyph,
.guide-glyph {
  font-family: var(--font-mono);
  font-size: 0.55rem !important;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.search-well {
  max-width: 42rem;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: none;
}

.search-well:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--brand) 12%, transparent);
}

.search-well svg { width: 1.15rem; height: 1.15rem; fill: var(--ink-muted); }
.search-well input { min-height: auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
.search-well input:focus { box-shadow: none; }

.card,
.tool-card,
.feat,
.price-card,
.free-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: none;
}

a.card,
a.tool-card {
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 220ms ease, transform 220ms var(--ease-out), background-color 180ms ease;
}

a.card:hover,
a.tool-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-strong);
  color: var(--ink-soft);
  box-shadow: var(--shadow-md);
  transform: translateY(-0.2rem);
}

.tool-card {
  min-height: 15.5rem;
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
  overflow: hidden;
}

.tool-card .ic,
.feat .ic {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  margin-bottom: 2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--brand-strong);
  font-size: 1rem;
  filter: grayscale(1);
}

.tool-card .meta { margin-bottom: 0.7rem; }
.tool-card h3 { margin: 0 0 0.7rem; color: var(--ink); font-size: 1.15rem; line-height: 1.2; }
.tool-card p { margin: 0 0 1.4rem; color: var(--ink-soft); font-size: var(--text-sm); line-height: 1.55; }
.tool-card .arrow { margin-top: auto; color: var(--brand-strong); font-size: var(--text-xs); font-weight: 700; }

.brd-maint,
.brd-ops,
.brd-fac,
.brd-ci,
.brd-asset,
.brd-supply { border-color: var(--line); }

#tool-library section { margin-block: 3.5rem !important; }
#tool-library section > h2 {
  margin: 0 0 1.25rem !important;
  color: var(--ink);
  font-size: 1.65rem !important;
  letter-spacing: -0.03em;
}

/* Calculators --------------------------------------------------------------- */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 4rem;
}

.calc-panel {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: none;
}

.calc-panel h2,
.gen-form h2 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.4rem;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.calc-panel h2 .n,
.gen-form h2 .n {
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  box-shadow: none;
}

.field,
.gen-field { margin-bottom: 1rem; }

.field label,
.gen-field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 610;
}

.field .u { color: var(--ink-muted); font-size: var(--text-xs); font-weight: 500; }
.field .help,
.gen-field .help { margin-top: 0.35rem; color: var(--ink-muted); font-size: var(--text-xs); }

.results {
  position: sticky;
  top: 5.4rem;
  align-self: start;
  border-color: var(--line-inverse);
  background: var(--surface-inverse);
  color: var(--ink-inverse-soft);
}

.safety-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem 1rem;
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid color-mix(in oklch, var(--danger) 34%, var(--line));
  border-radius: var(--radius-sm);
  background: color-mix(in oklch, var(--danger) 8%, var(--surface));
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.safety-notice strong { color: var(--danger); }

.results h2 { color: var(--ink-inverse); }
.results h2 .n { border-color: var(--line-inverse); background: var(--surface-inverse-raised); color: var(--ink-inverse-soft); }

.results .primary {
  margin-bottom: 1rem;
  padding: 1.75rem;
  border: 1px solid var(--line-inverse);
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--brand) 9%, transparent);
  text-align: left;
}

.results .primary .lbl { color: var(--ink-inverse-soft); font-size: var(--text-xs); }
.results .primary .val {
  margin: 0.35rem 0;
  color: var(--ink-inverse);
  font-family: var(--font-mono);
  font-size: 3.35rem;
  font-weight: 520;
  line-height: 1;
  letter-spacing: -0.055em;
}
.results .primary .hint { color: var(--brand-bright); font-size: var(--text-xs); font-weight: 620; }

.res-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.res {
  min-height: 5.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.9rem;
  border: 1px solid var(--line-inverse);
  border-radius: var(--radius-sm);
  background: var(--surface-inverse-raised);
}
.res .lbl { color: var(--ink-inverse-soft); font-size: 0.68rem; }
.res .val { color: var(--ink-inverse); font-family: var(--font-mono); font-size: 1.15rem; font-weight: 560; }
.res.good .val { color: oklch(0.77 0.12 151); }
.res.warn .val { color: oklch(0.78 0.11 82); }
.res.bad .val { color: oklch(0.75 0.11 28); }

.formula,
.insight {
  margin-top: 0.7rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-inverse);
  border-radius: var(--radius-sm);
  color: var(--ink-inverse-soft);
  font-size: var(--text-xs);
  line-height: 1.55;
}

.formula { font-family: var(--font-mono); }
.insight b { color: var(--ink-inverse); }

.tool-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.results .tool-actions .btn-ghost {
  border-color: var(--line-inverse);
  background: transparent;
  color: var(--ink-inverse);
}
.results .tool-actions .btn-ghost:hover { border-color: var(--ink-inverse-soft); background: var(--surface-inverse-raised); }

.standard-note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
  padding: 1rem;
  border: 1px solid color-mix(in oklch, var(--brand) 28%, var(--line));
  border-radius: var(--radius-sm);
  background: var(--brand-wash);
  color: var(--ink-soft);
  font-size: var(--text-sm);
}
.standard-note b { color: var(--brand-strong); }

.article-toc {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin: 1rem 0 4rem;
  padding: 0.45rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: none;
  white-space: nowrap;
}
.article-toc h4 { margin: 0 0.4rem 0 0.6rem; color: var(--ink-muted); font-size: var(--text-xs); letter-spacing: 0; }
.article-toc a { padding: 0.5rem 0.7rem; border-radius: var(--radius-pill); color: var(--ink-soft); font-size: var(--text-xs); text-decoration: none; }
.article-toc a:hover { background: var(--bg-subtle); color: var(--ink); }

.tool-content { max-width: 50rem; margin: 0 auto; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }

/* Prose and guides ---------------------------------------------------------- */
.editorial-hero {
  padding: 7.5rem 0 5rem;
  border-bottom: 1px solid var(--line);
}

.editorial-hero__grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: end;
  gap: 6rem;
}

.editorial-hero h1 {
  max-width: 11ch;
  margin: 0;
  font-size: 4.8rem;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.editorial-hero__grid > p {
  max-width: 32rem;
  margin: 0 0 0.4rem;
  color: var(--ink-soft);
  font-size: 1.12rem;
}

.featured-guide-section { padding: 5rem 0; }

.featured-guide {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 35rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: none;
  transition: box-shadow 220ms ease, transform 220ms var(--ease-out);
}

.featured-guide:hover { color: var(--ink); box-shadow: var(--shadow-md); transform: translateY(-0.2rem); }

.featured-guide__visual {
  display: grid;
  place-items: center;
  padding: 3.5rem;
  background:
    radial-gradient(circle at 22% 18%, color-mix(in oklch, var(--brand) 24%, transparent), transparent 34%),
    var(--surface-inverse);
}

.featured-oee {
  width: min(100%, 29rem);
  padding: 2rem;
  border: 1px solid var(--line-inverse);
  border-radius: var(--radius-lg);
  color: var(--ink-inverse);
}

.featured-oee > span { color: var(--ink-inverse-soft); font-size: var(--text-sm); }
.featured-oee > strong { display: block; margin: 1rem 0 2rem; font-family: var(--font-mono); font-size: 5rem; font-weight: 520; line-height: 1; letter-spacing: -0.06em; }
.featured-oee > strong small { font-size: 0.4em; }
.featured-oee > div { display: grid; gap: 0.7rem; }
.featured-oee i { height: 0.35rem; overflow: hidden; border-radius: var(--radius-pill); background: color-mix(in oklch, var(--ink-inverse) 12%, transparent); }
.featured-oee i::after { content: ""; display: block; width: var(--w); height: 100%; background: var(--brand-bright); }

.featured-guide__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem;
}

.featured-guide__copy > span { margin-bottom: 1.4rem; color: var(--brand-strong); font-size: var(--text-sm); font-weight: 680; }
.featured-guide__copy h2 { margin-bottom: 1.3rem; font-size: 2.65rem; line-height: 1.03; }
.featured-guide__copy p { margin: 0 0 2rem; color: var(--ink-soft); font-size: 1.03rem; }
.featured-guide__copy b { margin-top: auto; color: var(--brand-strong); font-size: var(--text-sm); }

.guide-library { padding: 3rem 0 8rem; }

.guide-library__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-strong);
}

.guide-library__head h2 { font-size: 2.4rem; }
.guide-library__head p { margin: 0.4rem 0 0; color: var(--ink-muted); font-size: var(--text-sm); }

.topic-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.35rem; }
.topic-filters button {
  min-height: 2.4rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-soft);
  font-size: var(--text-xs);
  font-weight: 620;
  cursor: pointer;
}
.topic-filters button:hover { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.topic-filters button.on { border-color: var(--ink); background: var(--ink); color: var(--ink-inverse); }

.article-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 4rem;
}

.article-index > a {
  min-height: 15rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.article-index > a:hover { color: var(--brand-strong); }
.article-index small { display: block; margin-bottom: 0.8rem; color: var(--ink-muted); font-size: var(--text-xs); font-weight: 560; }
.article-index h3 { margin: 0 0 0.7rem; font-size: 1.45rem; line-height: 1.12; }
.article-index p { margin: 0; color: var(--ink-soft); font-size: var(--text-sm); line-height: 1.55; }
.article-index > a > b { color: var(--ink-muted); font-size: 1.15rem; font-weight: 400; transition: transform 180ms var(--ease-out); }
.article-index > a:hover > b { transform: translateX(0.25rem); }

.prose {
  max-width: var(--measure);
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.76;
}

.article-page article.prose {
  max-width: 50rem !important;
  margin: 0 auto !important;
  padding: 5rem 0 7rem !important;
}

.article-page article.prose > .kicker { margin-bottom: 1rem; }
.article-page article.prose > h1 { max-width: 20ch; font-size: 3.7rem; line-height: 1.02; }
.article-page article.prose > .dek { max-width: 45rem; }

.prose > * { max-width: 100%; }
.prose h1 { margin-bottom: 1.25rem; font-size: 3.25rem; }
.prose h2 { margin: 3.5rem 0 1rem; font-size: 2rem; line-height: 1.12; }
.prose h3 { margin: 2.4rem 0 0.7rem; font-size: 1.3rem; }
.prose h4 { margin: 1.8rem 0 0.6rem; font-size: 1.08rem; }
.prose p { margin: 0 0 1.15rem; }
.prose ul,
.prose ol { margin: 0 0 1.35rem; padding-left: 1.4rem; }
.prose li { margin-bottom: 0.45rem; }
.prose strong { color: var(--ink); }
.prose a { color: var(--brand-strong); }
.prose .dek { color: var(--ink-soft); font-size: 1.18rem; line-height: 1.6; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.2rem;
  margin: 1.5rem 0 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: var(--text-xs);
}

.prose table {
  width: 100%;
  margin: 1.5rem 0 2rem;
  border-collapse: collapse;
  border: 1px solid var(--line);
  font-size: var(--text-sm);
}
.prose th,
.prose td { padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--bg-subtle); color: var(--ink); font-weight: 680; }
.prose tr:last-child td { border-bottom: 0; }
.prose table.cmp tr:nth-child(even) td { background: color-mix(in oklch, var(--bg-subtle) 58%, transparent); }

.faq details {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  min-height: 4.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-muted); font-size: 1.2rem; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 0 1.4rem; color: var(--ink-soft); }

.rel-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rel-tools a { padding: 0.55rem 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-pill); text-decoration: none; font-size: var(--text-sm); }

.cta-band {
  padding: 3rem;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface-inverse);
  color: var(--ink-inverse-soft);
  text-align: center;
  box-shadow: none;
}
.cta-band::before { content: none; }
.cta-band h3 { color: var(--ink-inverse); }

/* Generators --------------------------------------------------------------- */
.gen-grid {
  max-width: var(--wrap);
  display: grid;
  grid-template-columns: minmax(18rem, 0.72fr) minmax(0, 1.28fr);
  gap: 1.25rem;
  align-items: start;
  margin: 1rem auto 4rem;
  padding: 0;
}

.gen-form {
  position: sticky;
  top: 5.6rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: none;
}

.gen-field input,
.gen-field select,
.gen-field textarea,
.why-row input,
.cat-block textarea {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  box-shadow: none;
}

.gen-field .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }

.gen-intervals,
.rca-tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.gen-chip,
.rca-tab {
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: var(--text-xs);
  font-weight: 620;
  box-shadow: none;
  cursor: pointer;
}
.gen-chip.on,
.rca-tab.on { border-color: var(--brand-strong); background: var(--brand-strong); color: white; }

.gen-upsell { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-subtle); box-shadow: none; }

.pm-doc {
  padding: 3rem;
  border: 1px solid #d9dfdc;
  border-radius: 0.4rem;
  background: #fff;
  color: #202824;
  font-family: var(--font-sans);
  box-shadow: var(--shadow-lg);
}
.pm-doc h2,
.pm-doc h3,
.pm-doc h4 { color: #202824; font-family: var(--font-sans); }
.pm-doc .doc-title { border-bottom-color: #0d6a50; }
.pm-doc .doc-brand,
.pm-doc h3.pm-h .num,
.pm-doc .ivl-band,
.pm-doc .loto b,
.pm-doc .why-step .wlab,
.pm-doc .cm-box h4,
.pm-doc .fish-cat h4,
.pm-doc .d8-item h4,
.pm-doc .a3 .a3-box h4 { color: #0d6a50; }
.pm-doc table.tasks th { background: #164c3d; }
.pm-doc .ivl-band::before { background: #0d6a50; }
.pm-doc .safety-flag { padding: 0.8rem; border: 1px solid #ebc7c2; border-radius: var(--radius-sm); background: #fff4f2; }

/* Pricing, about and legal -------------------------------------------------- */
.bp-wrap { width: min(calc(100% - 2.5rem), var(--wrap)); max-width: var(--wrap) !important; padding-inline: 0 !important; }
.bp-hero { padding: 7rem 0 5rem !important; }
.bp-hero .d2-eyebrow { color: var(--brand-strong); font-size: var(--text-sm); font-weight: 680; letter-spacing: 0; text-transform: none; }
.bp-hero h1 { max-width: 13ch !important; margin: 1rem 0 1.5rem !important; color: var(--ink); font-size: 4.5rem !important; line-height: 0.98 !important; }
.bp-hero h1 i { background: none !important; color: var(--brand-strong) !important; font-style: normal !important; }
.bp-hero p { color: var(--ink-soft) !important; font-size: 1.1rem !important; }
.bp-sec { padding: 6rem 0 !important; border-color: var(--line) !important; }
.bp-sec > .bp-wrap > h2,
.bp-sec > h2 { color: var(--ink); font-size: 2.5rem !important; }
.bp-card,
.bp-chip,
.bp-spec { border-color: var(--line) !important; border-radius: var(--radius-lg) !important; background: var(--surface) !important; box-shadow: none !important; }
.bp-card .cap { border-color: var(--line) !important; }
.bp-card .cap a,
.bp-spec .lbl { color: var(--brand-strong) !important; letter-spacing: 0 !important; text-transform: none !important; }
.bp-dl th,
.bp-dl td { border-color: var(--line) !important; }
.bp-dl th { color: var(--ink-muted) !important; letter-spacing: 0 !important; text-transform: none !important; }
.bp-dl a.get { border-radius: var(--radius-pill) !important; background: var(--ink) !important; color: var(--ink-inverse) !important; letter-spacing: 0 !important; text-transform: none !important; }
.bp-rules h3 { letter-spacing: 0 !important; text-transform: none !important; }
.bp-hero > *,
.bp-sec > * { opacity: 1 !important; }

.about-hero {
  padding: 8rem 0 6rem;
  background: var(--surface-inverse);
  color: var(--ink-inverse-soft);
}

.about-hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: end;
  gap: 6rem;
}

.about-hero .hero-proof { color: var(--ink-inverse-soft); }
.about-hero .hero-proof span { background: var(--brand-bright); box-shadow: 0 0 0 0.3rem color-mix(in oklch, var(--brand-bright) 12%, transparent); }
.about-hero h1 { max-width: 11ch; color: var(--ink-inverse); font-size: 4.8rem; line-height: 0.98; letter-spacing: -0.04em; }
.about-hero__grid > p { max-width: 32rem; margin: 0 0 0.35rem; color: var(--ink-inverse-soft); font-size: 1.15rem; }

.about-belief { padding: 9rem 0; }
.about-belief__grid { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 3rem; }
.about-belief__grid > p { margin: 0.5rem 0 0; color: var(--brand-strong); font-size: var(--text-sm); font-weight: 680; }
.about-belief h2 { max-width: 21ch; margin-bottom: 1.5rem; font-size: 3.65rem; line-height: 1.02; }
.about-belief h2 + p { max-width: 44rem; margin: 0; font-size: 1.18rem; }

.principle-band { border-block: 1px solid var(--line); background: var(--surface); }
.principle-band .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.principle-band .wrap > div { min-height: 21rem; padding: 3rem 2rem; border-right: 1px solid var(--line); }
.principle-band .wrap > div:first-child { padding-left: 0; }
.principle-band .wrap > div:last-child { border-right: 0; }
.principle-band span { color: var(--brand-strong); font-family: var(--font-mono); font-size: var(--text-xs); }
.principle-band h3 { max-width: 12ch; margin: 4rem 0 1rem; font-size: 1.75rem; }
.principle-band p { max-width: 25rem; margin: 0; color: var(--ink-soft); font-size: var(--text-sm); }

.standards-section { padding: 9rem 0; }
.standards-section__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 7rem; }
.standards-section__intro h2 { max-width: 12ch; margin-bottom: 1.5rem; font-size: 3.25rem; line-height: 1; }
.standards-section__intro p { max-width: 32rem; font-size: 1.05rem; }
.standards-list { border-top: 1px solid var(--line-strong); }
.standards-list > div { min-height: 5.2rem; display: grid; grid-template-columns: 0.9fr 1.1fr; align-items: center; gap: 1rem; border-bottom: 1px solid var(--line); }
.standards-list span { color: var(--ink-muted); font-size: var(--text-sm); }
.standards-list strong { color: var(--ink); font-size: var(--text-sm); font-weight: 650; }

.accuracy-section { padding: 7rem 0; background: var(--brand-wash); }
.accuracy-section__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 7rem; }
.accuracy-section__grid > div:first-child { display: grid; grid-template-columns: 2.75rem 1fr; align-items: start; gap: 1.2rem; }
.accuracy-section svg { width: 2.75rem; fill: none; stroke: var(--brand-strong); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.accuracy-section h2 { max-width: 10ch; font-size: 2.8rem; }
.accuracy-section__grid > div:last-child { max-width: 40rem; }
.accuracy-section p { font-size: 1.03rem; }

.founder-section { padding: 9rem 0; background: var(--surface); }
.founder-section__grid { display: grid; grid-template-columns: minmax(18rem, 0.75fr) 1.25fr; align-items: center; gap: 6rem; }
.founder-section img { width: 100%; max-height: 34rem; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); object-fit: cover; filter: saturate(0.72) contrast(1.04); }
.founder-section__role { margin: 0 0 1rem; color: var(--brand-strong); font-size: var(--text-sm); font-weight: 680; }
.founder-section h2 { margin-bottom: 1.5rem; font-size: 3.4rem; }
.founder-section p:not(.founder-section__role) { max-width: 40rem; font-size: 1.05rem; }

.funding-section { padding: 8rem 0; border-block: 1px solid var(--line); }
.funding-section__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 7rem; }
.funding-section h2 { font-size: 3.25rem; }
.funding-section__grid > div { max-width: 42rem; }
.funding-section p { font-size: 1.05rem; }

.about-final { background: var(--surface); }

.pricing-hero {
  padding: 8rem 0 6rem;
  background: var(--bg);
  text-align: center;
}

.pricing-hero .hero-proof { justify-content: center; }
.pricing-hero h1 { margin: 0 auto 1.5rem; font-size: 5rem; line-height: 0.98; letter-spacing: -0.04em; }
.pricing-hero > .wrap > p:last-child { max-width: 43rem; margin: 0 auto; color: var(--ink-soft); font-size: 1.15rem; }

.free-plan-section { padding: 0 0 8rem; }
.free-plan {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.free-plan__price {
  min-height: 34rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem;
  background: var(--surface-inverse);
  color: var(--ink-inverse-soft);
}
.free-plan__price > span { font-size: var(--text-sm); }
.free-plan__price strong { margin: 1rem 0 0.5rem; color: var(--ink-inverse); font-family: var(--font-mono); font-size: 6rem; font-weight: 500; line-height: 1; letter-spacing: -0.06em; }
.free-plan__price small { color: var(--brand-bright); font-size: var(--text-sm); font-weight: 650; }

.free-plan__contents { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 4rem; }
.free-plan__contents h2 { margin-bottom: 2rem; font-size: 2.65rem; }
.free-plan__contents ul { display: grid; gap: 0.9rem; margin: 0 0 2.3rem; padding: 0; list-style: none; }
.free-plan__contents li { display: grid; grid-template-columns: 1.4rem 1fr; gap: 0.65rem; color: var(--ink-soft); }
.free-plan__contents li span { color: var(--brand-strong); font-weight: 800; }

.funding-explainer { padding: 8rem 0; border-block: 1px solid var(--line); background: var(--surface); }
.funding-explainer__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 7rem; }
.funding-explainer__grid > div:first-child h2 { max-width: 11ch; margin-bottom: 1rem; font-size: 3.25rem; line-height: 1; }
.funding-explainer__grid > div:first-child p { color: var(--ink-muted); }
.funding-rows { border-top: 1px solid var(--line-strong); }
.funding-rows > div { display: grid; grid-template-columns: 0.55fr 1.45fr; gap: 2rem; padding: 1.7rem 0; border-bottom: 1px solid var(--line); }
.funding-rows span { color: var(--ink); font-weight: 680; }
.funding-rows p { margin: 0; color: var(--ink-soft); font-size: var(--text-sm); }

.support-invite { padding: 5rem 0; background: var(--brand-wash); }
.support-invite .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.support-invite h2 { margin-bottom: 0.4rem; font-size: 2.4rem; }
.support-invite p { margin: 0; color: var(--ink-soft); }

.pricing-faq { padding: 8rem 0; }
.pricing-faq__grid { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 7rem; }
.pricing-faq h2 { max-width: 8ch; font-size: 3.25rem; line-height: 1; }

.free-card {
  max-width: 38rem;
  padding: 2.25rem;
  text-align: left;
  align-items: stretch;
}
.free-tag {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 3.2rem;
  font-weight: 560;
  letter-spacing: -0.055em;
}
.free-tag small { color: var(--ink-muted); font-size: var(--text-sm); font-weight: 560; }
.incl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }

.amaador-brand-logo { position: absolute; top: 1.25rem; left: 1.25rem; z-index: 2; }
.page-header {
  padding: 7rem 1.5rem 4rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  text-align: center;
}
.page-header .brand { justify-content: center; margin-bottom: 0.75rem; color: var(--brand-strong); font-size: var(--text-sm); letter-spacing: 0; text-transform: none; }
.page-header h1 { margin-bottom: 0.7rem; color: var(--ink); font-family: var(--font-sans); font-size: 3.25rem; }
.page-header .updated { color: var(--ink-muted); font-size: var(--text-sm); }
.container {
  max-width: 52rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  background: transparent;
}

.legal-page > footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: var(--text-xs);
  text-align: center;
}

.legal-page > footer a { color: var(--brand-strong); }
.container h2 { margin: 3rem 0 0.8rem; padding: 0; border: 0; color: var(--ink); font-family: var(--font-sans); font-size: 1.55rem; }
.container p,
.container ul { color: var(--ink-soft); }
.highlight-box,
.contact-card {
  padding: 1.2rem;
  border: 1px solid color-mix(in oklch, var(--brand) 28%, var(--line));
  border-radius: var(--radius);
  background: var(--brand-wash);
}
.contact-card { background: var(--surface); }
.back-link { border-radius: var(--radius-pill); background: var(--ink); color: var(--ink-inverse); }

/* Footer -------------------------------------------------------------------- */
.site-footer {
  padding: 5.5rem 0 2rem;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
}

.site-footer .wrap { width: min(calc(100% - 2.5rem), var(--wrap)); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 3.5rem;
  padding-bottom: 4rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.footer-brand p {
  max-width: 31rem;
  margin: 0;
}

.footer-support {
  margin-top: 0.35rem;
}

.footer-links h5 {
  margin: 0 0 0.9rem;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 680;
  letter-spacing: -0.01em;
}

.footer-links a {
  display: block;
  width: fit-content;
  margin: 0.55rem 0;
  color: var(--ink-muted);
  font-size: var(--text-sm);
  text-decoration: none;
}

.footer-links a:hover { color: var(--ink); }

.footer-grid p { color: var(--ink-muted); }
.footer__col-dd { border: 0; }
.footer__col-dd summary {
  margin-bottom: 0.9rem;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 680;
  list-style: none;
  cursor: default;
}
.footer__col-dd summary::-webkit-details-marker { display: none; }
.footer__col-dd a { display: block; width: fit-content; margin: 0.55rem 0; color: var(--ink-muted); font-size: var(--text-sm); text-decoration: none; }
.footer__col-dd a:hover { color: var(--ink); }
.foot-mail { color: var(--brand-strong); font-size: var(--text-sm); text-decoration: none; }

.footer-standards {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem 2rem;
  align-items: baseline;
  padding: 1.4rem 0;
  border-block: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: var(--text-xs);
}

.footer-standards strong { color: var(--ink); font-size: var(--text-sm); }

.fnet {
  padding: 2rem 0;
  border-block: 1px solid var(--line);
}
.fnet h5 { margin-bottom: 0.7rem; font-size: var(--text-sm); letter-spacing: -0.01em; }
.fnet-grid { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.fnet-item {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-muted);
  filter: grayscale(1);
  text-decoration: none;
}
.fnet-item:hover,
.fnet-item:focus-visible { border-color: var(--line-strong); background: var(--bg-subtle); color: var(--ink); transform: none; box-shadow: none; }
.fnet-item.current { border-color: var(--brand); color: var(--brand-strong); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1.5rem;
  color: var(--ink-muted);
  font-size: var(--text-xs);
}
.footer-bottom a { color: var(--ink-soft) !important; }

/* Donation modal: available only from explicit controls -------------------- */
#donate-fab { display: none !important; }

#donate-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  place-items: center;
  padding: 1rem;
}
#donate-modal.on { display: grid; }
.dm-backdrop { position: absolute; inset: 0; background: rgba(6, 12, 10, 0.68); }
.dm-card {
  position: relative;
  z-index: 1;
  width: min(100%, 34rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  color: var(--ink-soft);
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.dm-card h3 { margin: 0 0 0.7rem; font-size: 1.75rem; }
.dm-heart { color: var(--brand); font-size: 1.5rem; }
.dm-x { position: absolute; top: 1rem; right: 1rem; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; }
.dm-go { width: 100%; margin-top: 0.5rem; }
.dm-later { width: 100%; min-height: 2.75rem; margin-top: 0.7rem; border: 0; background: transparent; color: var(--ink-muted); cursor: pointer; }
.dm-secure { margin-top: 0.7rem; color: var(--ink-muted); font-size: var(--text-xs); text-align: center; }
.dm-or { display: flex; align-items: center; gap: 0.7rem; margin: 1rem 0; color: var(--ink-muted); font-size: var(--text-xs); }
.dm-or::before,
.dm-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dm-bank-toggle { width: 100%; min-height: 3rem; display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); cursor: pointer; }
.dm-bank-toggle .chev { margin-left: auto; }
.dm-bank { margin-top: 0.7rem; }
.dm-tabs { display: flex; gap: 0.35rem; margin-bottom: 0.6rem; }
.dm-tab { min-height: 2.25rem; padding: 0.45rem 0.65rem; border: 1px solid var(--line); border-radius: var(--radius-pill); background: transparent; color: var(--ink-soft); font-size: var(--text-xs); cursor: pointer; }
.dm-tab.on { border-color: var(--ink); background: var(--ink); color: var(--ink-inverse); }
.dm-acc { display: none; }
.dm-acc.on { display: block; }
.dm-field { display: flex; gap: 0.7rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.dm-field-main { min-width: 0; flex: 1; display: grid; gap: 0.2rem; }
.dm-field-k { color: var(--ink-muted); font-size: var(--text-xs); }
.dm-field-v { color: var(--ink); font-size: var(--text-sm); overflow-wrap: anywhere; }
.dm-field-v.mono { font-family: var(--font-mono); }
.dm-field-note,
.dm-bank-ref { color: var(--ink-muted); font-size: 0.7rem; }
.dm-copy { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-soft); cursor: pointer; }
.dm-copy svg { width: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* Contextual Academy pathway ----------------------------------------------- */
.academy-pathway {
  margin-block: 2rem;
  padding: clamp(1.15rem, 2.5vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem clamp(1.5rem, 4vw, 3rem);
}
.academy-pathway__eyebrow {
  color: var(--brand-strong);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.academy-pathway > strong {
  color: var(--ink);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.2;
}
.academy-pathway > span:not(.academy-pathway__eyebrow) {
  max-width: 60ch;
  font-size: var(--text-sm);
  line-height: 1.55;
}
.academy-pathway__actions {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}
.academy-pathway__button {
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--ink-inverse);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.academy-pathway__button {
  border: 1px solid color-mix(in oklch, var(--brand-bright) 82%, white);
  background: var(--brand-bright);
  color: var(--button-text);
}

.academy-pathway__button:hover {
  border-color: var(--cosmic-cyan);
  background: var(--cosmic-cyan);
  color: var(--button-text);
}
.academy-pathway__langs { display: flex; align-items: center; gap: 0.35rem; }
.academy-pathway__langs a {
  min-width: 2.15rem;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 700px) {
  .academy-pathway { grid-template-columns: 1fr; }
  .academy-pathway__actions {
    grid-column: 1;
    grid-row: auto;
    align-items: flex-start;
    margin-top: 0.5rem;
  }
}

/* Ads stay structurally reserved without looking like product UI. */
.ad-wrap,
.ad-slot,
.blend-ad-inner {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.blend-ad { margin: 2rem auto; }
.blend-ad-inner { padding: 0; }
.ad-label,
.blend-ad-lbl { color: var(--ink-muted); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* Never depend on JS reveal scripts for visibility. */
.card[style*="opacity: 0"],
.tool-card[style*="opacity: 0"],
.calc-panel[style*="opacity: 0"],
.gen-form[style*="opacity: 0"] { opacity: 1 !important; }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1080px) {
  .home-hero__grid { grid-template-columns: 1fr; gap: 4rem; }
  .home-hero__copy { max-width: 48rem; }
  .home-hero h1 { max-width: 11ch; }
  .ops-monitor { width: 100%; }
  .feature-stage__grid,
  .feature-stage__grid--reverse,
  .disciplines-layout,
  .guide-feature__grid { gap: 4rem; }
  .feature-stage__grid { grid-template-columns: 0.8fr 1.2fr; }
  .feature-stage__grid--reverse { grid-template-columns: 1.1fr 0.9fr; }
  .footer-grid { grid-template-columns: 1.3fr repeat(2, 1fr); }
  .footer-grid .footer-links:last-child { grid-column: 2 / -1; }
}

@media (max-width: 900px) {
  .hamburger,
  .nav-menu-toggle { position: relative; display: inline-grid; }
  .nav-links {
    position: fixed;
    inset: 4.75rem 0 auto;
    z-index: 110;
    max-height: calc(100dvh - 4.75rem);
    display: grid;
    align-content: start;
    gap: 0.2rem;
    padding: 1rem;
    overflow-y: auto;
    border-bottom: 1px solid var(--line);
    background: var(--surface-strong);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: opacity 160ms ease, transform 200ms var(--ease-out), visibility 0s linear 200ms;
  }
  .nav-links.open,
  .nav-links[data-open="true"] { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-links a,
  .nav-links .dropdown-toggle { width: 100%; min-height: 3.2rem; justify-content: flex-start; padding-inline: 1rem; }
  .nav-links .nav-cta { width: 100%; margin: 0.5rem 0 0; }
  .nav-links .theme-toggle { position: absolute; right: 1rem; bottom: 1rem; }
  .dropdown-menu { position: static; min-width: 0; display: none; margin: 0.2rem 0 0.5rem 1rem; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
  .dropdown.open .dropdown-menu { display: grid; }

  .proof-rail dl { grid-template-columns: repeat(2, 1fr); }
  .proof-rail dl > div:nth-child(2) { border-right: 0; }
  .proof-rail dl > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  .home-intro__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .feature-stage__grid,
  .feature-stage__grid--reverse,
  .disciplines-layout,
  .guide-feature__grid,
  .trust-stage__grid { grid-template-columns: 1fr; }
  .feature-stage__copy { max-width: 42rem; }
  .feature-stage__grid--reverse .feature-stage__copy { order: -1; }
  .disciplines-copy { position: static; }
  .trust-stage__standards { grid-column: 1; }
  .editorial-hero__grid,
  .featured-guide { grid-template-columns: 1fr; }
  .editorial-hero__grid { align-items: start; gap: 2rem; }
  .featured-guide__visual { min-height: 26rem; }
  .guide-library__head { align-items: flex-start; flex-direction: column; }
  .topic-filters { justify-content: flex-start; }
  .about-hero__grid,
  .standards-section__grid,
  .accuracy-section__grid,
  .founder-section__grid,
  .funding-section__grid,
  .funding-explainer__grid,
  .pricing-faq__grid { grid-template-columns: 1fr; gap: 3rem; }
  .free-plan { grid-template-columns: 1fr; }
  .free-plan__price { min-height: 20rem; }
  .about-hero__grid { align-items: start; }
  .principle-band .wrap { grid-template-columns: 1fr; }
  .principle-band .wrap > div { min-height: 0; padding: 3rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .principle-band .wrap > div:last-child { border-bottom: 0; }
  .principle-band h3 { margin-top: 2rem; }
  .founder-section img { max-width: 30rem; }
  .calc { grid-template-columns: 1fr; }
  .results { position: static; }
  .gen-grid { grid-template-columns: 1fr; width: min(calc(100% - 2.5rem), var(--wrap)); }
  .gen-form { position: static; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-grid .footer-links:last-child { grid-column: auto; }
}

@media (max-width: 640px) {
  .wrap,
  .site-header .wrap,
  .site-footer .wrap { width: min(calc(100% - 1.5rem), var(--wrap)); }
  .brand .bs { display: none; }
  .brand .bn { font-size: 0.78rem; }
  .nav { min-height: 4rem; }
  .home-hero { padding: 4.75rem 0 4rem; }
  .home-hero h1 { font-size: 3.45rem; }
  .home-hero__lead { font-size: 1.05rem; }
  .home-hero__actions .btn { width: 100%; }
  .ops-monitor { min-height: 34rem; border-radius: 1.25rem; }
  .ops-monitor__bar { padding-inline: 1rem; }
  .ops-monitor__main { grid-template-columns: 1fr 8rem; padding: 1.5rem 1rem; }
  .ops-monitor__score strong { font-size: 3.2rem; }
  .ops-monitor__factors { gap: 0.4rem; padding-inline: 1rem; }
  .ops-monitor__factors > div { grid-template-columns: 1fr; }
  .ops-monitor__factors strong { grid-row: 2; }
  .proof-rail dl > div { align-items: flex-start; flex-direction: column; gap: 0.15rem; padding: 1.2rem 0.8rem; }
  .proof-rail dl > div:first-child { padding-left: 0.8rem; }
  .home-intro,
  .disciplines-section,
  .guide-feature { padding: 6rem 0; }
  .home-intro h2,
  .feature-stage__copy h2,
  .disciplines-copy h2,
  .guide-feature__heading h2 { font-size: 2.7rem; }
  .feature-stage { padding: 6rem 0; }
  .decision-panel__body { grid-template-columns: 1fr; }
  .decision-panel__inputs { border-right: 0; border-bottom: 1px solid var(--line-inverse); }
  .decision-panel__answer { padding: 2rem; }
  .decision-panel__answer > strong { font-size: 3.7rem; }
  .discipline-list a { grid-template-columns: minmax(0, 1fr) 1.5rem; }
  .discipline-list small { display: none; }
  .document-visual { min-height: 32rem; }
  .document-sheet { min-height: 35rem; padding: 1.5rem; }
  .document-sheet--back { transform: translate(0.7rem, 0.8rem) rotate(2deg); }
  .document-sheet h3 { font-size: 1.55rem; }
  .trust-stage { padding: 5rem 0; }
  .trust-stage__grid > div:first-child { grid-template-columns: 2rem 1fr; }
  .trust-stage svg { width: 2rem; }
  .trust-stage h2 { font-size: 2.15rem; }
  .final-cta { padding: 7rem 0; }
  .final-cta h2 { font-size: 3.25rem; }
  .tool-hero,
  .gen-hero { padding: 4rem 0 2.5rem; }
  .library-hero { padding: 4.5rem 0 2.5rem; }
  .library-hero h1 { font-size: 3.2rem; }
  .library-search { align-items: stretch; flex-direction: column; }
  .library-search > span { padding-left: 0.5rem; }
  .library-section-heading { align-items: flex-start; flex-direction: column; }
  .library-secondary { padding: 5rem 0; }
  .editorial-hero { padding: 5rem 0 3.5rem; }
  .editorial-hero h1 { font-size: 3.15rem; }
  .featured-guide-section { padding: 2rem 0 4rem; }
  .featured-guide { min-height: 0; border-radius: var(--radius-lg); }
  .featured-guide__visual { min-height: 19rem; padding: 1.5rem; }
  .featured-oee { padding: 1.4rem; }
  .featured-oee > strong { font-size: 3.7rem; }
  .featured-guide__copy { padding: 2rem; }
  .featured-guide__copy h2 { font-size: 2rem; }
  .article-index { grid-template-columns: 1fr; }
  .article-index > a { min-height: 12rem; }
  .about-hero { padding: 5.5rem 0 4rem; }
  .bp-wrap { width: min(calc(100% - 1.5rem), var(--wrap)); }
  .bp-hero { padding: 4.5rem 0 3rem !important; }
  .bp-hero h1 { font-size: 3rem !important; }
  .bp-sec { padding: 4rem 0 !important; }
  .about-hero h1 { font-size: 3.15rem; }
  .about-belief,
  .standards-section,
  .founder-section { padding: 6rem 0; }
  .about-belief__grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .about-belief h2,
  .standards-section__intro h2,
  .founder-section h2,
  .funding-section h2 { font-size: 2.55rem; }
  .standards-list > div { grid-template-columns: 1fr; gap: 0.35rem; padding-block: 1rem; }
  .accuracy-section { padding: 5rem 0; }
  .accuracy-section__grid > div:first-child { grid-template-columns: 2rem 1fr; }
  .accuracy-section svg { width: 2rem; }
  .accuracy-section h2 { font-size: 2.2rem; }
  .funding-section { padding: 5rem 0; }
  .pricing-hero { padding: 5.5rem 0 4rem; }
  .pricing-hero h1 { font-size: 3.35rem; }
  .free-plan-section { padding-bottom: 5rem; }
  .free-plan { border-radius: var(--radius-lg); }
  .free-plan__price,
  .free-plan__contents { padding: 2rem; }
  .free-plan__price strong { font-size: 4.4rem; }
  .free-plan__contents h2,
  .funding-explainer__grid > div:first-child h2,
  .pricing-faq h2 { font-size: 2.45rem; }
  .funding-explainer,
  .pricing-faq { padding: 5rem 0; }
  .funding-rows > div { grid-template-columns: 1fr; gap: 0.5rem; }
  .support-invite .wrap { align-items: stretch; flex-direction: column; }
  .tool-hero h1,
  .gen-hero h1,
  .prose h1,
  .page-header h1 { font-size: 2.55rem; }
  .article-page article.prose { padding: 3.5rem 0 5rem !important; }
  .article-page article.prose > h1 { font-size: 2.55rem; }
  .grid-2,
  .grid-3,
  .grid-4,
  .incl-grid,
  .related-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 13rem; }
  .res-grid { grid-template-columns: 1fr; }
  .article-toc {
    flex-wrap: wrap;
    overflow: visible;
    border-radius: var(--radius);
    white-space: normal;
  }
  .article-toc h4 { display: none; }
  .prose { font-size: 1rem; }
  .prose h2 { font-size: 1.65rem; }
  .prose table { display: block; overflow-x: auto; white-space: nowrap; }
  .gen-grid { width: min(calc(100% - 1.5rem), var(--wrap)); }
  .pm-doc { padding: 1.5rem; overflow-x: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 1rem; }
  .footer-grid > div:first-child,
  .footer-grid .footer-links:last-child { grid-column: auto; }
  .footer-links { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .footer-standards { grid-template-columns: 1fr; gap: 0.35rem; }
  .footer__col-dd { border-bottom: 1px solid var(--line); }
  .footer__col-dd summary { min-height: 3rem; display: flex; align-items: center; justify-content: space-between; margin: 0; cursor: pointer; }
  .footer__col-dd summary::after { content: "+"; color: var(--ink-muted); font-weight: 400; }
  .footer__col-dd[open] summary::after { content: "−"; }
  .footer__col-dd a { margin-left: 0.25rem; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .dial-value,
  .flow-line,
  .ops-monitor__factors i::after { animation: none; }
}

@media print {
  body { padding: 0; background: white; }
  body::before { content: none; }
  .app-shell { max-width: none; border: 0; background: white; box-shadow: none; }
  .pm-doc { border: 0; border-radius: 0; box-shadow: none; }
}

/* ==========================================================================
   CELESTIAL REBUILD — one coherent operational knowledge universe
   ========================================================================== */

:root {
  --p-maint: oklch(0.70 0.14 222);
  --p-ops: oklch(0.68 0.16 258);
  --p-fac: oklch(0.77 0.12 82);
  --p-ci: oklch(0.68 0.14 300);
  --p-asset: oklch(0.64 0.15 276);
  --p-supply: oklch(0.68 0.13 330);
  --button-text: white;
}

html[data-theme="dark"],
html[data-theme="pitch"] {
  --button-text: oklch(0.13 0.04 276);
}

body {
  position: relative;
  background:
    radial-gradient(circle at 78% -10%, color-mix(in oklch, var(--cosmic-violet) 12%, transparent), transparent 34rem),
    radial-gradient(circle at 8% 28%, color-mix(in oklch, var(--cosmic-cyan) 7%, transparent), transparent 28rem),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, color-mix(in oklch, var(--ink) 36%, transparent) 0 1px, transparent 1.35px),
    radial-gradient(circle, color-mix(in oklch, var(--brand) 24%, transparent) 0 0.8px, transparent 1.2px),
    radial-gradient(circle, color-mix(in oklch, var(--ink) 18%, transparent) 0 0.7px, transparent 1px);
  background-position: 0 0, 2.4rem 1.8rem, 1.2rem 3.4rem;
  background-size: 7.5rem 7.5rem, 10.5rem 10.5rem, 13rem 13rem;
  opacity: 0.28;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 78% 5%, color-mix(in oklch, var(--cosmic-violet) 8%, transparent), transparent 32%),
    radial-gradient(ellipse at 5% 70%, color-mix(in oklch, var(--cosmic-cyan) 5%, transparent), transparent 28%);
}

.app-shell {
  z-index: 1;
  background: transparent;
}

.site-header {
  border-bottom-color: color-mix(in oklch, var(--brand) 18%, var(--line));
  background: color-mix(in oklch, var(--bg) 86%, transparent);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
}

.brand .logo {
  border: 1px solid color-mix(in oklch, var(--brand) 20%, var(--line));
  border-radius: 0.55rem;
  background: oklch(0.13 0.04 276);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.brand .logo img { width: 1.55rem; height: 1.55rem; }
.nav-links a.active { color: var(--brand-strong); }

.btn-primary,
.nav-cta,
button[type="submit"] {
  border-color: color-mix(in oklch, var(--brand-bright) 82%, white);
  background: var(--brand-bright);
  color: var(--button-text);
  box-shadow: 0 10px 30px -18px color-mix(in oklch, var(--brand-bright) 70%, transparent);
}

.btn-primary:hover,
.nav-cta:hover,
button[type="submit"]:hover {
  border-color: var(--cosmic-cyan);
  background: var(--cosmic-cyan);
  color: var(--button-text);
  box-shadow: 0 12px 34px -18px color-mix(in oklch, var(--cosmic-cyan) 78%, transparent);
}

.btn-ghost,
.btn-secondary {
  border-color: color-mix(in oklch, var(--brand) 26%, var(--line));
  background: color-mix(in oklch, var(--surface) 45%, transparent);
}

/* Full-screen knowledge graph hero */
.home-hero {
  min-height: calc(100svh - 4.25rem);
  display: grid;
  align-items: stretch;
  padding: 0;
  isolation: isolate;
  background:
    linear-gradient(90deg, color-mix(in oklch, var(--surface-inverse) 99%, transparent) 0%, color-mix(in oklch, var(--surface-inverse) 94%, transparent) 34%, color-mix(in oklch, var(--surface-inverse) 20%, transparent) 68%, transparent 100%),
    radial-gradient(circle at 72% 42%, color-mix(in oklch, var(--cosmic-violet) 13%, transparent), transparent 32%),
    radial-gradient(circle at 88% 12%, color-mix(in oklch, var(--cosmic-cyan) 9%, transparent), transparent 28%),
    var(--surface-inverse);
  color: var(--ink-inverse-soft);
}

.home-hero::before {
  width: auto;
  height: auto;
  inset: 0;
  border-radius: 0;
  background:
    linear-gradient(to bottom, transparent 70%, color-mix(in oklch, var(--surface-inverse) 92%, transparent)),
    radial-gradient(circle at 16% 18%, color-mix(in oklch, var(--cosmic-cyan) 8%, transparent), transparent 22%);
  filter: none;
}

.home-hero__cosmos {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.home-hero__cosmos canvas {
  width: 100%;
  height: 100%;
  max-width: none;
  cursor: grab;
  touch-action: pan-y;
}

.home-hero__cosmos canvas:active { cursor: grabbing; }

.home-hero__grid {
  position: relative;
  z-index: 2;
  min-height: inherit;
  grid-template-columns: minmax(0, 0.92fr) minmax(28rem, 1.08fr);
  align-items: center;
  gap: 3rem;
  padding-block: clamp(2.5rem, 7vh, 5.5rem);
}

.home-hero__copy {
  max-width: 47rem;
  text-shadow: 0 2px 28px rgba(2, 5, 18, 0.34);
}

.language-switcher {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: clamp(1.6rem, 4vh, 3rem);
  color: var(--ink-inverse-soft);
  font-size: 0.68rem;
  font-weight: 680;
}

.language-switcher > span { opacity: 0.75; }

.language-switcher > div {
  display: inline-flex;
  padding: 0.2rem;
  border: 1px solid color-mix(in oklch, var(--ink-inverse) 16%, transparent);
  border-radius: var(--radius-pill);
  background: color-mix(in oklch, var(--surface-inverse-raised) 66%, transparent);
}

.language-switcher button {
  min-width: 2.25rem;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-inverse-soft);
  font-size: 0.68rem;
  font-weight: 760;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.language-switcher button:hover { color: var(--ink-inverse); }
.language-switcher button.is-active,
.language-switcher button[aria-pressed="true"] {
  background: var(--ink-inverse);
  color: oklch(0.14 0.04 276);
}

.home-hero .hero-proof {
  margin-bottom: 1.25rem;
  color: var(--ink-inverse-soft);
}

.home-hero .hero-proof span:first-child {
  background: var(--cosmic-cyan);
  box-shadow: 0 0 0 0.3rem color-mix(in oklch, var(--cosmic-cyan) 12%, transparent), 0 0 18px color-mix(in oklch, var(--cosmic-cyan) 58%, transparent);
}

.home-hero .hero-proof > span:last-child {
  width: auto;
  height: auto;
  flex: 0 1 auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.home-hero h1 {
  max-width: 12ch;
  margin-bottom: 1.5rem;
  color: var(--ink-inverse);
  font-size: clamp(3.4rem, 6.7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.home-hero__lead {
  max-width: 39rem;
  color: var(--ink-inverse-soft);
  font-size: 1.15rem;
}

.home-hero__note { color: color-mix(in oklch, var(--ink-inverse-soft) 78%, transparent); }

.home-hero .btn-ghost {
  border-color: color-mix(in oklch, var(--ink-inverse) 24%, transparent);
  background: color-mix(in oklch, var(--surface-inverse-raised) 44%, transparent);
  color: var(--ink-inverse);
}

.home-hero .btn-ghost:hover {
  border-color: color-mix(in oklch, var(--ink-inverse) 46%, transparent);
  background: color-mix(in oklch, var(--surface-inverse-raised) 86%, transparent);
  color: white;
}

.home-hero__graph-caption {
  position: absolute;
  inset-inline-end: 0;
  bottom: 2.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid color-mix(in oklch, var(--ink-inverse) 13%, transparent);
  border-radius: var(--radius-pill);
  background: color-mix(in oklch, var(--surface-inverse) 68%, transparent);
  color: var(--ink-inverse-soft);
  font-size: 0.68rem;
}

.graph-live-dot {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--cosmic-cyan);
  box-shadow: 0 0 12px color-mix(in oklch, var(--cosmic-cyan) 72%, transparent);
}

/* Celestial section rhythm */
.proof-rail {
  border-color: color-mix(in oklch, var(--brand) 17%, var(--line));
  background: color-mix(in oklch, var(--surface) 88%, transparent);
}

.proof-rail dl > div { border-color: color-mix(in oklch, var(--brand) 14%, var(--line)); }

.home-intro,
.disciplines-section,
.guide-feature,
.final-cta {
  background: color-mix(in oklch, var(--bg) 90%, transparent);
}

.home-intro { border-bottom: 1px solid color-mix(in oklch, var(--brand) 11%, var(--line)); }

.feature-stage--dark {
  border-block: 1px solid color-mix(in oklch, var(--brand) 15%, var(--line-inverse));
  background:
    radial-gradient(circle at 82% 28%, color-mix(in oklch, var(--cosmic-violet) 9%, transparent), transparent 28rem),
    var(--surface-inverse);
}

.feature-stage--paper {
  border-block: 1px solid color-mix(in oklch, var(--brand) 12%, var(--line));
  background:
    radial-gradient(circle at 12% 40%, color-mix(in oklch, var(--brand) 6%, transparent), transparent 25rem),
    color-mix(in oklch, var(--bg-subtle) 92%, transparent);
}

.decision-panel,
.results,
.featured-guide__visual,
.free-plan__price,
.cta-band,
.about-hero {
  background:
    radial-gradient(circle at 80% 12%, color-mix(in oklch, var(--cosmic-violet) 10%, transparent), transparent 22rem),
    var(--surface-inverse);
}

.decision-panel {
  border-color: color-mix(in oklch, var(--brand-bright) 22%, var(--line-inverse));
  box-shadow: 0 34px 90px -48px rgba(0,0,0,.9);
}

.decision-panel__answer { background: color-mix(in oklch, var(--brand) 9%, transparent); }
.decision-panel__inputs .decision-panel__label {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-inverse-soft);
  font-family: inherit;
  font-size: var(--text-xs);
}
.document-sheet { box-shadow: 0 35px 90px -42px rgba(2,6,25,.62); }

.guide-feature {
  border-block: 1px solid color-mix(in oklch, var(--brand) 11%, var(--line));
}

.guide-list .guide-list__title {
  display: block;
  max-width: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

.trust-stage {
  border-color: color-mix(in oklch, var(--brand) 18%, var(--line));
  background:
    radial-gradient(circle at 12% 24%, color-mix(in oklch, var(--cosmic-cyan) 8%, transparent), transparent 24rem),
    color-mix(in oklch, var(--brand-wash) 72%, var(--bg));
}

.final-cta {
  position: relative;
  border-bottom: 1px solid color-mix(in oklch, var(--brand) 12%, var(--line));
  background:
    radial-gradient(circle at 50% 35%, color-mix(in oklch, var(--cosmic-violet) 8%, transparent), transparent 28rem),
    color-mix(in oklch, var(--bg) 92%, transparent);
}

/* Shared page families */
.tool-hero,
.gen-hero,
.library-hero,
.editorial-hero,
.pricing-hero,
.bp-hero,
.page-header {
  position: relative;
}

.tool-hero::after,
.gen-hero::after,
.library-hero::after,
.editorial-hero::after,
.pricing-hero::after,
.bp-hero::after,
.page-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in oklch, var(--brand) 38%, transparent), transparent);
}

.card,
.tool-card,
.calc-panel,
.gen-form,
.article-index > a,
.featured-guide,
.free-plan,
.bp-card,
.bp-chip,
.bp-spec,
.faq details,
.funding-rows,
.standard-note,
.article-toc {
  border-color: color-mix(in oklch, var(--brand) 15%, var(--line));
  background: color-mix(in oklch, var(--surface) 94%, var(--bg));
}

a.card:hover,
a.tool-card:hover,
.article-index > a:hover,
.featured-guide:hover {
  border-color: color-mix(in oklch, var(--brand) 44%, var(--line));
  box-shadow: 0 22px 55px -38px color-mix(in oklch, var(--brand) 48%, transparent);
}

.calc-panel,
.gen-form {
  box-shadow: 0 28px 70px -52px rgba(0,0,0,.8);
}

.results {
  border-color: color-mix(in oklch, var(--brand-bright) 20%, var(--line-inverse));
}

.res {
  border-color: color-mix(in oklch, var(--brand-bright) 14%, var(--line-inverse));
  background: color-mix(in oklch, var(--surface-inverse-raised) 72%, transparent);
}

input,
select,
textarea {
  border-color: color-mix(in oklch, var(--brand) 15%, var(--line-strong));
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--brand) 14%, transparent);
}

.prose {
  background: color-mix(in oklch, var(--bg) 88%, transparent);
}

.prose blockquote,
.prose .note,
.prose .callout {
  border-color: color-mix(in oklch, var(--brand) 20%, var(--line));
  background: color-mix(in oklch, var(--brand-wash) 42%, var(--surface));
}

.site-footer {
  border-top-color: color-mix(in oklch, var(--brand) 17%, var(--line));
  background:
    radial-gradient(circle at 12% 8%, color-mix(in oklch, var(--cosmic-violet) 7%, transparent), transparent 24rem),
    color-mix(in oklch, var(--bg-subtle) 96%, transparent);
}

.footer-standards,
.footer-bottom,
.footer-links {
  border-color: color-mix(in oklch, var(--brand) 13%, var(--line));
}

/* Arabic reads naturally without mirroring the visual graph. */
[dir="rtl"] .home-hero {
  background:
    linear-gradient(270deg, color-mix(in oklch, var(--surface-inverse) 99%, transparent) 0%, color-mix(in oklch, var(--surface-inverse) 94%, transparent) 34%, color-mix(in oklch, var(--surface-inverse) 20%, transparent) 68%, transparent 100%),
    radial-gradient(circle at 28% 42%, color-mix(in oklch, var(--cosmic-violet) 13%, transparent), transparent 32%),
    var(--surface-inverse);
}

[dir="rtl"] .home-hero__copy { text-align: right; }
[dir="rtl"] .home-hero__actions { justify-content: flex-start; }
[dir="rtl"] .discipline-list a:hover span { transform: translateX(-0.35rem); }
[dir="rtl"] .text-link:hover span { transform: translateX(-0.2rem); }
[dir="rtl"] .nav-links .theme-toggle { right: auto; left: 1rem; }

@media (max-width: 1080px) {
  .home-hero__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .home-hero__copy { max-width: 44rem; }
  .home-hero h1 { max-width: 11ch; }
}

@media (max-width: 700px) {
  .home-hero {
    min-height: calc(100svh - 4rem);
    background:
      linear-gradient(to bottom, color-mix(in oklch, var(--surface-inverse) 84%, transparent), color-mix(in oklch, var(--surface-inverse) 94%, transparent)),
      radial-gradient(circle at 58% 32%, color-mix(in oklch, var(--cosmic-violet) 15%, transparent), transparent 42%),
      var(--surface-inverse);
  }

  [dir="rtl"] .home-hero {
    background:
      linear-gradient(to bottom, color-mix(in oklch, var(--surface-inverse) 84%, transparent), color-mix(in oklch, var(--surface-inverse) 94%, transparent)),
      radial-gradient(circle at 42% 32%, color-mix(in oklch, var(--cosmic-violet) 15%, transparent), transparent 42%),
      var(--surface-inverse);
  }

  .home-hero__grid {
    min-height: inherit;
    padding-block: 1.5rem 3.5rem;
  }

  .language-switcher { margin-bottom: 1.4rem; }
  .home-hero h1 { max-width: 11ch; font-size: clamp(3rem, 14vw, 4.4rem); }
  .home-hero__lead { max-width: 34rem; font-size: 1rem; line-height: 1.55; }
  .home-hero__actions { margin-top: 1.5rem; }
  .home-hero__actions .btn { width: auto; }
  .home-hero__graph-caption { inset-inline: 0 auto; bottom: 1rem; }
  [dir="rtl"] .home-hero__graph-caption { inset-inline: auto 0; }
  .home-hero__cosmos { opacity: 0.48; }

  .proof-rail dl > div { border-color: color-mix(in oklch, var(--brand) 14%, var(--line)); }
}

@media (max-width: 430px) {
  .home-hero h1 { font-size: 2.95rem; }
  .home-hero .hero-proof { margin-bottom: 1rem; font-size: 0.76rem; }
  .home-hero__note { display: none; }
  .home-hero__graph-caption { display: none; }
  .language-switcher > span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__cosmos canvas { cursor: default; }
}

@media print {
  body::before,
  body::after,
  .home-hero__cosmos,
  .language-switcher { display: none !important; }
  .app-shell,
  .prose,
  .pm-doc { background: white !important; }
}

/* ========================================================================== 
   KNOWLEDGE UNIVERSE CONTINUITY — graph-derived navigation on inner pages
   ========================================================================== */

body:not(.graph-home) main {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
}

.tool-hero,
.gen-hero,
.library-hero,
.editorial-hero,
.pricing-hero,
.about-hero,
.bp-hero,
.page-header {
  isolation: isolate;
  overflow: hidden;
}

.tool-hero > *,
.gen-hero > *,
.library-hero > .wrap,
.editorial-hero > .wrap,
.pricing-hero > .wrap,
.about-hero > .wrap,
.bp-hero > .wrap,
.page-header > .wrap {
  position: relative;
  z-index: 2;
}

.legal-page .page-header > * {
  position: relative;
  z-index: 2;
}

.tool-hero::before,
.gen-hero::before,
.library-hero::before,
.editorial-hero::before,
.pricing-hero::before,
.about-hero::before,
.bp-hero::before,
.page-header::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: clamp(18rem, 34vw, 34rem);
  aspect-ratio: 1;
  inset-inline-end: clamp(-10rem, -8vw, -4rem);
  top: 50%;
  translate: 0 -50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in oklch, var(--brand) 12%, transparent) 0 0.18rem, transparent 0.24rem),
    radial-gradient(circle at 29% 31%, color-mix(in oklch, var(--cosmic-cyan) 70%, transparent) 0 0.16rem, transparent 0.23rem),
    radial-gradient(circle at 71% 27%, color-mix(in oklch, var(--cosmic-violet) 70%, transparent) 0 0.2rem, transparent 0.27rem),
    radial-gradient(circle at 79% 68%, color-mix(in oklch, var(--brand-bright) 70%, transparent) 0 0.14rem, transparent 0.21rem),
    radial-gradient(circle at 35% 77%, color-mix(in oklch, var(--cosmic-cyan) 62%, transparent) 0 0.13rem, transparent 0.2rem),
    conic-gradient(from 33deg at 50% 50%, transparent 0 9%, color-mix(in oklch, var(--brand) 12%, transparent) 9.2% 9.45%, transparent 9.7% 34%, color-mix(in oklch, var(--cosmic-cyan) 10%, transparent) 34.2% 34.45%, transparent 34.7% 62%, color-mix(in oklch, var(--brand) 10%, transparent) 62.2% 62.45%, transparent 62.7%);
  border: 1px solid color-mix(in oklch, var(--brand) 9%, transparent);
  border-radius: 50%;
  opacity: 0.76;
  mask-image: radial-gradient(circle, black 0 58%, transparent 78%);
}

.library-hero,
.editorial-hero,
.pricing-hero,
.bp-hero,
.page-header {
  background:
    radial-gradient(circle at 82% 18%, color-mix(in oklch, var(--cosmic-violet) 9%, transparent), transparent 26rem),
    radial-gradient(circle at 12% 100%, color-mix(in oklch, var(--cosmic-cyan) 5%, transparent), transparent 24rem),
    color-mix(in oklch, var(--bg) 94%, transparent);
}

/* A compact, semantic version of the home graph. */
.opex-context-map {
  --context-color: var(--brand-bright);
  width: min(calc(100% - 2.5rem), var(--wrap));
  max-width: var(--wrap);
  position: relative;
  z-index: 3;
  margin: 0 auto clamp(2.25rem, 5vw, 4.5rem);
  padding: clamp(1rem, 2.4vw, 1.55rem);
  overflow: hidden;
  border: 1px solid color-mix(in oklch, var(--context-color) 22%, var(--line));
  border-radius: clamp(1rem, 2vw, 1.45rem);
  background:
    radial-gradient(circle at 92% 4%, color-mix(in oklch, var(--context-color) 10%, transparent), transparent 17rem),
    color-mix(in oklch, var(--surface) 90%, transparent);
  box-shadow: 0 28px 72px -54px color-mix(in oklch, var(--context-color) 62%, transparent);
  color: var(--ink);
  font-family: var(--font-body);
  text-align: start;
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
}

.opex-context-map::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, color-mix(in oklch, var(--context-color) 32%, transparent) 0 0.7px, transparent 1px),
    linear-gradient(110deg, transparent 10%, color-mix(in oklch, var(--context-color) 6%, transparent), transparent 72%);
  background-size: 4.5rem 4.5rem, 100% 100%;
  opacity: 0.6;
}

.library-hero .opex-context-map,
.editorial-hero .opex-context-map,
.pricing-hero .opex-context-map,
.about-hero .opex-context-map,
.bp-hero .opex-context-map,
.page-header .opex-context-map {
  width: 100%;
  margin: clamp(2rem, 4vw, 3.5rem) 0 0;
}

.editorial-hero__grid > .opex-context-map,
.about-hero__grid > .opex-context-map {
  grid-column: 1 / -1;
}

.about-hero .opex-context-map {
  --ink: var(--ink-inverse);
  --ink-soft: var(--ink-inverse-soft);
  --ink-muted: color-mix(in oklch, var(--ink-inverse-soft) 72%, transparent);
  --line: var(--line-inverse);
  --surface: var(--surface-inverse-raised);
  background:
    radial-gradient(circle at 92% 4%, color-mix(in oklch, var(--context-color) 13%, transparent), transparent 17rem),
    color-mix(in oklch, var(--surface-inverse-raised) 68%, transparent);
}

.prose .opex-context-map {
  width: 100%;
  margin: 1.75rem 0 3rem;
  padding: 1rem;
}

.opex-context-map__head,
.opex-context-map__path,
.opex-context-map__related {
  position: relative;
  z-index: 1;
}

.opex-context-map__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid color-mix(in oklch, var(--context-color) 13%, var(--line));
  color: var(--ink-muted);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.opex-context-map__head > span,
.opex-context-map__head > a {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
}

.opex-context-map__head > span > i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--context-color);
  box-shadow: 0 0 0 0.28rem color-mix(in oklch, var(--context-color) 10%, transparent), 0 0 1.2rem color-mix(in oklch, var(--context-color) 60%, transparent);
}

.opex-context-map__head > a {
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0;
  text-transform: none;
}

.opex-context-map__head > a:hover { color: var(--context-color); }

.opex-context-map__path {
  min-width: 0;
  display: flex;
  align-items: stretch;
  padding-block: 1.1rem;
}

.opex-context-map__node {
  min-width: 0;
  flex: 0 1 18rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.72rem 0.82rem;
  border: 1px solid color-mix(in oklch, var(--context-color) 10%, var(--line));
  border-radius: 0.88rem;
  background: color-mix(in oklch, var(--surface) 76%, transparent);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

a.opex-context-map__node:hover {
  border-color: color-mix(in oklch, var(--context-color) 42%, var(--line));
  background: color-mix(in oklch, var(--context-color) 6%, var(--surface));
  transform: translateY(-1px);
}

.opex-context-map__node.is-current {
  flex-grow: 1.2;
  border-color: color-mix(in oklch, var(--context-color) 48%, var(--line));
  background: color-mix(in oklch, var(--context-color) 9%, var(--surface));
  box-shadow: inset 0 1px 0 color-mix(in oklch, white 7%, transparent);
}

.opex-context-map__pulse {
  width: 0.66rem;
  height: 0.66rem;
  flex: 0 0 auto;
  border: 2px solid color-mix(in oklch, var(--context-color) 68%, var(--surface));
  border-radius: 50%;
  background: color-mix(in oklch, var(--surface) 88%, transparent);
  box-shadow: 0 0 0 0.32rem color-mix(in oklch, var(--context-color) 8%, transparent);
}

.is-current .opex-context-map__pulse {
  border-color: var(--context-color);
  background: var(--context-color);
  box-shadow: 0 0 0 0.34rem color-mix(in oklch, var(--context-color) 10%, transparent), 0 0 1.1rem color-mix(in oklch, var(--context-color) 58%, transparent);
}

.opex-context-map__node > span:last-child {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
}

.opex-context-map__node small {
  overflow: hidden;
  color: var(--ink-muted);
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  font-weight: 680;
  letter-spacing: 0.08em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.opex-context-map__node strong {
  overflow: hidden;
  color: inherit;
  font-size: clamp(0.76rem, 1vw, 0.88rem);
  font-weight: 680;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opex-context-map__link {
  min-width: 1.1rem;
  flex: 1 1 4rem;
  align-self: center;
  height: 1px;
  position: relative;
  background: linear-gradient(90deg, color-mix(in oklch, var(--context-color) 14%, transparent), color-mix(in oklch, var(--context-color) 56%, transparent), color-mix(in oklch, var(--context-color) 14%, transparent));
}

.opex-context-map__link::after {
  content: "";
  position: absolute;
  width: 0.3rem;
  height: 0.3rem;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--context-color);
  box-shadow: 0 0 0.85rem color-mix(in oklch, var(--context-color) 72%, transparent);
}

.opex-context-map__related {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid color-mix(in oklch, var(--context-color) 10%, var(--line));
}

.opex-context-map__related > span {
  color: var(--ink-muted);
  font-size: 0.64rem;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.opex-context-map__related > div {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}

.opex-context-map__related a {
  min-width: 0;
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.42rem;
  padding: 0.48rem 0.62rem;
  border: 1px solid color-mix(in oklch, var(--context-color) 10%, var(--line));
  border-radius: var(--radius-pill);
  background: color-mix(in oklch, var(--surface) 76%, transparent);
  color: var(--ink-soft);
  font-size: 0.68rem;
  text-decoration: none;
}

.opex-context-map__related a:hover {
  border-color: color-mix(in oklch, var(--context-color) 36%, var(--line));
  color: var(--ink);
}

.opex-context-map__related a > span {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--context-color);
}

.opex-context-map__related b {
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opex-context-map__related small {
  display: none;
}

/* Calculators and generators read as connected decision flows. */
.calc,
.gen-grid {
  position: relative;
}

.calc::before,
.gen-grid::before {
  content: "";
  position: absolute;
  z-index: 0;
  height: 1px;
  width: min(10vw, 7rem);
  top: 3.1rem;
  left: 50%;
  translate: -50% 0;
  background: linear-gradient(90deg, transparent, color-mix(in oklch, var(--brand-bright) 48%, transparent), transparent);
  pointer-events: none;
}

.calc > *,
.gen-grid > * { position: relative; z-index: 1; }

.calc-panel,
.gen-form,
.document-sheet {
  border-color: color-mix(in oklch, var(--brand) 16%, var(--line));
  box-shadow: 0 30px 74px -58px color-mix(in oklch, var(--brand) 48%, transparent);
}

.tool-card,
.article-index > a,
.featured-guide,
.gen-card {
  position: relative;
  overflow: hidden;
}

.tool-card::after,
.article-index > a::after,
.gen-card::after {
  content: "";
  position: absolute;
  width: 0.34rem;
  height: 0.34rem;
  inset: 0.82rem 0.82rem auto auto;
  border-radius: 50%;
  background: color-mix(in oklch, var(--brand) 62%, var(--surface));
  box-shadow: 0 0 0 0.26rem color-mix(in oklch, var(--brand) 7%, transparent);
}

.prose > h2 {
  position: relative;
}

.prose > h2::before {
  content: "";
  position: absolute;
  width: 0.42rem;
  height: 0.42rem;
  inset: 0.64em auto auto -1.15rem;
  border-radius: 50%;
  background: var(--brand-bright);
  box-shadow: 0 0 0 0.3rem color-mix(in oklch, var(--brand-bright) 9%, transparent);
}

@media (max-width: 900px) {
  .tool-hero::before,
  .gen-hero::before,
  .library-hero::before,
  .editorial-hero::before,
  .pricing-hero::before,
  .about-hero::before,
  .bp-hero::before,
  .page-header::before {
    opacity: 0.45;
    inset-inline-end: -12rem;
  }

  .opex-context-map__node { flex-basis: 12rem; }
  .opex-context-map__related { grid-template-columns: 1fr; }
  .opex-context-map__related > div { justify-content: flex-start; }
  .opex-context-map__related a { flex: 1 1 0; }
}

@media (max-width: 680px) {
  .opex-context-map {
    width: min(calc(100% - 1.25rem), var(--wrap));
    padding: 0.85rem;
    margin-bottom: 2rem;
  }

  .opex-context-map__head { align-items: center; gap: 0.5rem; font-size: 0.6rem; }
  .opex-context-map__head > a { text-align: end; white-space: nowrap; }
  .opex-context-map__path { display: grid; grid-template-columns: 1fr; padding-block: 0.85rem; }
  .opex-context-map__node { width: 100%; flex-basis: auto; }
  .opex-context-map__link { width: 1px; min-width: 1px; height: 0.65rem; margin-inline-start: 1.12rem; background: linear-gradient(to bottom, color-mix(in oklch, var(--context-color) 14%, transparent), color-mix(in oklch, var(--context-color) 50%, transparent)); }
  .opex-context-map__link::after { width: 0.24rem; height: 0.24rem; }
  .opex-context-map__related > div { overflow-x: auto; padding-bottom: 0.15rem; scrollbar-width: none; }
  .opex-context-map__related > div::-webkit-scrollbar { display: none; }
  .opex-context-map__related a { min-width: min(15rem, 78vw); flex: 0 0 auto; }
  .calc::before,
  .gen-grid::before { display: none; }
  .prose > h2::before { inset-inline-start: -0.85rem; opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .opex-context-map__node { transition: none; }
}

@media print {
  .opex-context-map { display: none !important; }
}
