/* Rhizant site styles. Dark slate with one warm accent. */

@font-face {
  font-family: 'Instrument Sans';
  src: url('/assets/fonts/instrument-sans-latin-wght-normal.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0e1116;
  --bg-2: #12161c;
  --surface: #1a2029;
  --surface-2: #262e3a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eaed;
  --muted: #9aa3ae;
  --faint: #6b7480;
  --accent: #f2a03d;
  --accent-2: #e8862a;
  --accent-soft: rgba(242, 160, 61, 0.14);
  --accent-ink: #b45f06;
  --paper: #f4f2ee;
  --paper-2: #ebe8e2;
  --ink: #14181f;
  --ink-muted: #5a6270;
  --alarm: #e5534b;
  --alarm-soft: rgba(229, 83, 75, 0.14);

  --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --gutter: 24px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: dark;
}

/* Diagram tokens: dark by default, paper inside .theme-paper. */
:root,
.theme-dark {
  --d-line: #5d6775;
  --d-node: #1d2430;
  --d-node-stroke: #3b4554;
  --d-text: #d3d8de;
  --d-muted: #8a939f;
  --d-box: rgba(255, 255, 255, 0.025);
  --d-box-stroke: rgba(255, 255, 255, 0.13);
  --d-accent: #f2a03d;
  --d-accent-soft: rgba(242, 160, 61, 0.16);
  --d-surface: #12161c;
}
.theme-paper {
  --d-line: #8d9199;
  --d-node: #ffffff;
  --d-node-stroke: #cbc5bb;
  --d-text: #14181f;
  --d-muted: #5a6270;
  --d-box: #ffffff;
  --d-box-stroke: #d8d2c8;
  --d-accent: #c46f0c;
  --d-accent-soft: rgba(196, 111, 12, 0.12);
  --d-surface: #ffffff;
}

/* ------------------------------------------------------------------ */
/* Base                                                                 */
/* ------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html.nav-open body {
  overflow: hidden;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.12;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
}
h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  letter-spacing: -0.03em;
}
h3 {
  font-size: 1.25rem;
}
p {
  margin: 0;
  text-wrap: pretty;
}
ul,
ol {
  margin: 0;
  padding: 0;
}
em {
  font-style: italic;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection {
  background: rgba(242, 160, 61, 0.35);
  color: #fff;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow {
  max-width: 820px;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--ink);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}
.mono {
  font-family: var(--font-mono);
}

/* ------------------------------------------------------------------ */
/* Small components                                                     */
/* ------------------------------------------------------------------ */

.icon {
  width: 1em;
  height: 1em;
  flex: none;
}
.icon-inline {
  display: inline-block;
  vertical-align: -0.14em;
  margin: 0 0.2em;
  color: var(--faint);
}
.theme-paper .icon-inline {
  color: var(--ink-muted);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.lead {
  font-size: clamp(1.06rem, 1.4vw, 1.2rem);
  line-height: 1.6;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.btn .icon {
  transition: transform 0.2s var(--ease);
}
.btn:hover .icon {
  transform: translateX(3px);
}
.btn-primary {
  background: var(--accent);
  color: #15120d;
}
.btn-primary:hover {
  background: #f7b45f;
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.04);
}
.btn-link {
  height: auto;
  padding: 0;
  border-radius: 0;
  color: var(--accent);
}
.btn-link:hover {
  color: #f7b45f;
}
.btn-sm {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
}
.btn-block {
  width: 100%;
}
.theme-paper .btn-ghost {
  color: var(--ink);
  border-color: rgba(20, 24, 31, 0.2);
}
.theme-paper .btn-ghost:hover {
  border-color: rgba(20, 24, 31, 0.45);
  background: rgba(20, 24, 31, 0.04);
}
.theme-paper .btn-link {
  color: var(--accent-ink);
}
.theme-paper .theme-dark .btn-link {
  color: var(--accent);
}

/* Visible placeholder for anything that does not exist yet. */
.ph {
  display: inline-block;
  padding: 0.12em 0.5em;
  border: 1px dashed var(--accent);
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.82em;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.theme-paper .ph {
  color: var(--accent-ink);
  border-color: var(--accent-ink);
  background: rgba(180, 95, 6, 0.08);
}

.tag-illustrative {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
.tag-illustrative::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.draft-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px dashed var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.draft-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 15px;
}
.draft-note strong {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-top: 2px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.chip--accent {
  border-color: rgba(242, 160, 61, 0.45);
  background: var(--accent-soft);
  color: var(--accent);
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.site-header.is-scrolled,
html.nav-open .site-header {
  background: rgba(14, 17, 22, 0.86);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--header-h);
}
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--text);
}
.wordmark::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-1px);
}
.site-nav {
  flex: 1;
}
.site-nav ul {
  display: flex;
  gap: 2px;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.site-nav a:hover {
  color: var(--text);
}
.site-nav a[aria-current='page'] {
  color: var(--text);
}
.site-nav a[aria-current='page']::after {
  content: '';
  display: block;
  height: 2px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--accent);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease);
}
.nav-toggle-bars {
  position: relative;
  background: transparent;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: '';
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before {
  transform: translateY(-4px);
}
.nav-toggle-bars::after {
  transform: translateY(4px);
}
.nav-toggle[aria-expanded='true'] .nav-toggle-bars::before {
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded='true'] .nav-toggle-bars::after {
  transform: rotate(-45deg);
}
.mobile-nav {
  border-top: 1px solid var(--line);
  background: var(--bg);
  height: calc(100dvh - var(--header-h));
  overflow-y: auto;
}
.mobile-nav[hidden] {
  display: none;
}
.mobile-nav ul {
  list-style: none;
  padding: 16px 0 24px;
}
.mobile-nav li + li {
  border-top: 1px solid var(--line);
}
.mobile-nav ul a {
  display: block;
  padding: 16px 0;
  font-size: 1.35rem;
  font-weight: 550;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.mobile-nav ul a[aria-current='page'] {
  color: var(--accent);
}

@media (max-width: 1000px) {
  .site-nav {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
}
@media (max-width: 520px) {
  .header-cta {
    display: none;
  }
}

/* ------------------------------------------------------------------ */
/* Sections                                                             */
/* ------------------------------------------------------------------ */

.section {
  position: relative;
  padding: clamp(80px, 10vw, 136px) 0;
}
.section--tight {
  padding: clamp(56px, 7vw, 88px) 0;
}
.section--line {
  border-top: 1px solid var(--line);
}
.section--alt {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.theme-paper {
  background: var(--paper);
  color: var(--ink);
}
.theme-paper .eyebrow {
  color: var(--accent-ink);
}
.theme-paper .lead,
.theme-paper .muted {
  color: var(--ink-muted);
}
.section-head {
  max-width: 760px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-head h2 + .lead {
  margin-top: 20px;
}
.after-diagram {
  margin-top: clamp(32px, 4vw, 48px);
}
.subhead {
  margin: clamp(48px, 6vw, 72px) 0 24px;
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
}
.section-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-head--wide {
  max-width: 900px;
}

/* Reveal on scroll (only when JS runs). */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

.hero {
  position: relative;
  padding: clamp(64px, 9vw, 120px) 0 clamp(48px, 6vw, 72px);
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
}
.hero h1 {
  max-width: 16ch;
}
.hero .lead {
  max-width: 620px;
  margin-top: 28px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 36px;
}
.hero-decor {
  position: absolute;
  right: max(-80px, calc((100vw - 1200px) / 2 - 60px));
  top: 40px;
  width: min(560px, 52vw);
  opacity: 0.5;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent);
  mask-image: radial-gradient(closest-side, #000 40%, transparent);
}
.hero-decor .n circle {
  fill: var(--bg);
}
.hero-glow {
  position: absolute;
  inset: -20% -10% auto auto;
  width: 900px;
  height: 700px;
  background: radial-gradient(closest-side, rgba(242, 160, 61, 0.1), transparent 70%);
  pointer-events: none;
}
@media (max-width: 900px) {
  .hero-decor {
    opacity: 0.22;
    width: 420px;
    right: -140px;
    top: 10px;
  }
}

.page-hero {
  position: relative;
  padding: clamp(64px, 8vw, 112px) 0 clamp(48px, 6vw, 80px);
  overflow: hidden;
}
.page-hero h1 {
  max-width: 20ch;
  font-size: clamp(2.2rem, 4.8vw, 3.8rem);
}
.page-hero .lead {
  max-width: 680px;
  margin-top: 24px;
}
.page-hero .hero-actions {
  margin-top: 32px;
}

/* ------------------------------------------------------------------ */
/* Window frame (demos, diagrams)                                       */
/* ------------------------------------------------------------------ */

.window {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--bg-2);
  box-shadow:
    0 30px 80px -30px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.window-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.window-dots {
  display: flex;
  gap: 6px;
}
.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-2);
}
.window-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.window-bar .tag-illustrative {
  margin-left: auto;
}
.window-body {
  padding: clamp(18px, 3vw, 32px);
}
.window-caption {
  margin-top: 16px;
  color: var(--faint);
  font-size: 13.5px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.icon-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
}
.icon-btn[hidden] {
  display: none;
}

/* ------------------------------------------------------------------ */
/* SVG diagram primitives                                               */
/* ------------------------------------------------------------------ */

svg text {
  font-family: var(--font-sans);
  fill: var(--d-text);
  font-size: 13px;
}
.e .ln {
  fill: none;
  stroke: var(--d-line);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.e .ah {
  fill: var(--d-line);
  stroke: none;
}
.e.is-dashed .ln {
  stroke-dasharray: 4 4;
}
.e.is-hot .ln {
  stroke: var(--d-accent);
  stroke-width: 2;
}
.e.is-hot .ah {
  fill: var(--d-accent);
}
.n circle {
  fill: var(--d-node);
  stroke: var(--d-node-stroke);
  stroke-width: 1.5;
}
.n text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  fill: var(--d-text);
}
.n.is-hot circle {
  fill: var(--d-accent-soft);
  stroke: var(--d-accent);
  stroke-width: 2;
}
.n.is-hot text {
  fill: var(--d-accent);
}
.n.is-alarm circle {
  fill: var(--alarm-soft);
  stroke: var(--alarm);
}

.box {
  fill: var(--d-box);
  stroke: var(--d-box-stroke);
  stroke-width: 1.2;
}
.box--accent {
  fill: var(--d-accent-soft);
  stroke: var(--d-accent);
  stroke-opacity: 0.6;
}
.box--soft {
  fill: var(--d-box);
  stroke-dasharray: 3 4;
}
.box-label {
  font-size: 15px;
  font-weight: 600;
  fill: var(--d-text);
  letter-spacing: -0.01em;
}
.box-label--accent {
  fill: var(--d-accent);
}
.box-label--sm {
  font-size: 12.5px;
}
.dg-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  fill: var(--d-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.arrow-label {
  font-family: var(--font-mono);
  font-size: 12px;
  fill: var(--d-muted);
}
.arrow-label--sm {
  font-size: 11px;
}
.arrow-label--accent {
  fill: var(--d-accent);
  font-weight: 500;
}
.arrow-label--muted {
  fill: var(--d-muted);
  opacity: 0.75;
}
.e--flow .ln {
  stroke-dasharray: 5 5;
}
.e--out .ln,
.e--act .ln {
  stroke: var(--d-text);
  stroke-opacity: 0.55;
}
.e--out .ah,
.e--act .ah {
  fill: var(--d-text);
  fill-opacity: 0.55;
}
.e--loop .ln {
  stroke: var(--d-accent);
  stroke-width: 1.8;
}
.e--loop .ah {
  fill: var(--d-accent);
}
.var-dots circle {
  fill: var(--d-muted);
  opacity: 0.45;
}

.machine .m-body {
  fill: var(--d-node);
  stroke: var(--d-text);
  stroke-opacity: 0.55;
  stroke-width: 1.6;
}
.machine .m-part {
  fill: var(--d-node);
  stroke: var(--d-text);
  stroke-opacity: 0.45;
  stroke-width: 1.4;
}
.machine .m-hub {
  fill: var(--d-text);
  opacity: 0.55;
}
.machine .m-line {
  fill: none;
  stroke: var(--d-text);
  stroke-opacity: 0.3;
  stroke-width: 1.4;
  stroke-linecap: round;
}
.machine .m-pipe {
  stroke-opacity: 0.5;
  stroke-width: 3;
}
.machine--wire .m-body,
.machine--wire .m-part {
  fill: none;
  stroke-dasharray: 3 3;
  stroke-opacity: 0.35;
}
.machine--wire .m-hub,
.machine--wire .m-line {
  opacity: 0.25;
}
.people circle,
.people path {
  fill: var(--d-text);
  opacity: 0.5;
}

.diagram {
  width: 100%;
  height: auto;
}

/* ------------------------------------------------------------------ */
/* Home: root-cause demo                                                */
/* ------------------------------------------------------------------ */

.demo-section {
  padding-top: 0;
}
.demo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 24px;
}
.demo-head h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}
.demo-head p {
  color: var(--muted);
  max-width: 520px;
  font-size: 15px;
}
.demo-grid {
  display: grid;
  grid-template-columns: minmax(230px, 270px) minmax(0, 1fr) minmax(250px, 300px);
  grid-template-areas: 'alarms graph chat';
}
.demo-panel {
  min-width: 0;
  padding: 20px;
}
.demo-panel + .demo-panel {
  border-left: 1px solid var(--line);
}
.demo-panel--alarms {
  grid-area: alarms;
}
.demo-panel--graph {
  grid-area: graph;
  display: flex;
  flex-direction: column;
}
.demo-panel--chat {
  grid-area: chat;
  display: flex;
  flex-direction: column;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.panel-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.panel-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
  white-space: nowrap;
}
.panel-meta .count {
  color: var(--alarm);
  font-weight: 500;
}

/* Elements revealed step by step. The HTML ships with every step on. */
.demo [data-step] {
  transition:
    opacity 0.45s var(--ease),
    transform 0.45s var(--ease);
}
.demo [data-step]:not(.is-on) {
  opacity: 0;
}
.demo li[data-step]:not(.is-on),
.demo .bubble[data-step]:not(.is-on),
.demo .chat-follow[data-step]:not(.is-on) {
  transform: translateY(6px);
}

.alarm-list {
  list-style: none;
  display: grid;
  gap: 4px;
}
.alarm {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--alarm-soft);
  border: 1px solid rgba(229, 83, 75, 0.28);
  font-size: 13px;
  line-height: 1.35;
  transition:
    opacity 0.45s var(--ease),
    transform 0.45s var(--ease),
    background-color 0.5s var(--ease),
    border-color 0.5s var(--ease);
}
.alarm-time {
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  padding-top: 2px;
}
.alarm-name {
  color: #ffd9d6;
}
.alarm-role {
  display: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--faint);
}
.demo.is-traced .alarm-role {
  display: block;
}
.demo.is-traced .alarm.is-consequence {
  background: rgba(255, 255, 255, 0.025);
  border-color: var(--line);
}
.demo.is-traced .alarm.is-consequence .alarm-name {
  color: var(--muted);
}
.demo.is-traced .alarm.is-root {
  background: var(--accent-soft);
  border-color: rgba(242, 160, 61, 0.55);
}
.demo.is-traced .alarm.is-root .alarm-name {
  color: var(--text);
  font-weight: 600;
}
.demo.is-traced .alarm.is-root .alarm-role {
  color: var(--accent);
}

/* Graph */
.dg {
  width: 100%;
  height: auto;
}
.dg--tall {
  display: none;
}
.gn {
  transition: opacity 0.45s var(--ease);
}
.gn rect {
  fill: var(--alarm-soft);
  stroke: var(--alarm);
  stroke-opacity: 0.7;
  stroke-width: 1.2;
  transition:
    fill 0.5s var(--ease),
    stroke 0.5s var(--ease);
}
.gn .gn-dir {
  fill: var(--alarm);
}
.gn-name {
  font-size: 12.5px;
  font-weight: 600;
  fill: #ffd9d6;
}
.gn-state {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--alarm);
  letter-spacing: 0.02em;
}
.gn-state--traced,
.gn-state--whatif {
  display: none;
}
.demo.is-traced .gn-state--alarm {
  display: none;
}
.demo.is-traced .gn-state--traced {
  display: inline;
}
.demo.is-traced .gn.is-consequence rect {
  fill: var(--surface);
  stroke: var(--d-node-stroke);
  stroke-opacity: 1;
}
.demo.is-traced .gn.is-consequence .gn-name {
  fill: var(--d-text);
}
.demo.is-traced .gn.is-consequence .gn-dir {
  fill: var(--d-muted);
}
.demo.is-traced .gn.is-consequence .gn-state {
  fill: var(--d-muted);
}
.demo.is-traced .gn.is-root rect {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-opacity: 1;
  stroke-width: 1.8;
}
.demo.is-traced .gn.is-root .gn-name,
.demo.is-traced .gn.is-root .gn-state {
  fill: var(--accent);
}
.demo.is-traced .gn.is-root .gn-dir {
  fill: var(--accent);
}
.dg .e .ln {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition:
    stroke-dashoffset 0.8s var(--ease),
    opacity 0.2s linear;
}
.dg .e .ah {
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.demo.is-traced .dg .e .ln {
  stroke-dashoffset: 0;
  opacity: 1;
}
.demo.is-traced .dg .e .ah {
  opacity: 1;
}
.dg .e:nth-child(2) .ln,
.dg .e:nth-child(2) .ah {
  transition-delay: 0.06s;
}
.dg .e:nth-child(3) .ln,
.dg .e:nth-child(3) .ah {
  transition-delay: 0.3s;
}
.dg .e:nth-child(4) .ln,
.dg .e:nth-child(4) .ah {
  transition-delay: 0.36s;
}
.dg .e:nth-child(5) .ln,
.dg .e:nth-child(5) .ah {
  transition-delay: 0.42s;
}
.dg .e:nth-child(6) .ln,
.dg .e:nth-child(6) .ah {
  transition-delay: 0.48s;
}
.dg .e:nth-child(7) .ln,
.dg .e:nth-child(7) .ah {
  transition-delay: 0.6s;
}
.dg .e:nth-child(8) .ln,
.dg .e:nth-child(8) .ah {
  transition-delay: 0.66s;
}
.dg .e:nth-child(9) .ln,
.dg .e:nth-child(9) .ah {
  transition-delay: 0.72s;
}
.dg .e:nth-child(10) .ln,
.dg .e:nth-child(10) .ah {
  transition-delay: 0.78s;
}
.dg .e:nth-child(11) .ln,
.dg .e:nth-child(11) .ah {
  transition-delay: 0.9s;
}
.dg .e:nth-child(12) .ln,
.dg .e:nth-child(12) .ah {
  transition-delay: 1.02s;
}
.demo.is-traced .dg .e .ah {
  transition-duration: 0.3s;
}
.root-ann,
.whatif-ann {
  opacity: 0;
  transition: opacity 0.5s var(--ease) 0.3s;
}
.root-ann-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
}
.root-ann-title {
  font-size: 13px;
  font-weight: 600;
  fill: var(--accent);
}
.root-ann-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--muted);
}
.demo.is-traced .root-ann {
  opacity: 1;
}
.trace-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
}
.trace-status .is-after {
  display: none;
  color: var(--accent);
}
.demo.is-traced .trace-status .is-before {
  display: none;
}
.demo.is-traced .trace-status .is-after {
  display: inline;
}
.graph-wrap {
  flex: 1;
  display: flex;
  align-items: center;
}

/* What-if toggle: a checkbox placed before the grid, styled through its label. */
.whatif-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  align-self: flex-start;
  padding: 7px 12px 7px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition:
    opacity 0.3s var(--ease),
    border-color 0.2s var(--ease);
}
.whatif-toggle:hover {
  border-color: rgba(255, 255, 255, 0.3);
}
.switch {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: var(--surface-2);
  transition: background-color 0.2s var(--ease);
  flex: none;
}
.switch::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  transition:
    transform 0.2s var(--ease),
    background-color 0.2s var(--ease);
}
.whatif-input:checked ~ .demo-grid .switch {
  background: var(--accent-soft);
}
.whatif-input:checked ~ .demo-grid .switch::after {
  transform: translateX(14px);
  background: var(--accent);
}
.whatif-input:focus-visible ~ .demo-grid .whatif-toggle {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.whatif-input:disabled ~ .demo-grid .whatif-toggle {
  opacity: 0.35;
  cursor: default;
}
.whatif-input:checked ~ .demo-grid .alarm.is-consequence {
  opacity: 0.32;
}
.whatif-input:checked ~ .demo-grid .alarm.is-consequence .alarm-name {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}
.whatif-input:checked ~ .demo-grid .gn.is-consequence {
  opacity: 0.28;
}
.whatif-input:checked ~ .demo-grid .dg .e {
  opacity: 0.22;
  transition: opacity 0.4s var(--ease);
}
.whatif-input:checked ~ .demo-grid .root-ann {
  opacity: 0;
  transition-delay: 0s;
}
.whatif-input:checked ~ .demo-grid .whatif-ann {
  opacity: 1;
  transition-delay: 0s;
}
.whatif-input:checked ~ .demo-grid .gn.is-root rect {
  stroke-dasharray: 4 3;
}
.whatif-input:checked ~ .demo-grid .gn-state--origin {
  display: none;
}
.whatif-input:checked ~ .demo-grid .gn-state--whatif {
  display: inline;
}
.whatif-input:checked ~ .demo-grid .panel-meta .count {
  color: var(--muted);
}
.whatif-note {
  display: none;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.whatif-input:checked ~ .demo-grid .whatif-note {
  display: block;
}

/* Chat */
.chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.bubble {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
}
.bubble-who {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.bubble--q {
  align-self: flex-end;
  max-width: 92%;
  background: var(--surface-2);
  border-bottom-right-radius: 4px;
}
.bubble--a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.bubble--a .bubble-who {
  color: var(--accent);
}
.bubble p + p {
  margin-top: 8px;
}
.causal-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 10px 0 2px;
  padding: 0;
  list-style: none;
}
.causal-chain li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}
.causal-chain li span {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text);
}
.causal-chain li:first-child span {
  border-color: rgba(242, 160, 61, 0.5);
  color: var(--accent);
}
.causal-chain .icon {
  color: var(--faint);
}
.typing {
  display: none;
  gap: 4px;
  padding: 14px 16px;
  align-self: flex-start;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.demo.is-typing .typing {
  display: inline-flex;
}
.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing 1s infinite ease-in-out;
}
.typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.typing span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes typing {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}
.chat-follow {
  margin-top: auto;
  padding-top: 12px;
}
.chat-follow-label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.chat-follow-q {
  display: inline-block;
  padding: 8px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .demo-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      'graph graph'
      'alarms chat';
  }
  .demo-panel + .demo-panel {
    border-left: 0;
  }
  .demo-panel--graph {
    border-bottom: 1px solid var(--line);
  }
  .demo-panel--chat {
    border-left: 1px solid var(--line) !important;
  }
}
@media (max-width: 720px) {
  .demo-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'alarms'
      'graph'
      'chat';
  }
  .demo-panel--alarms {
    border-bottom: 1px solid var(--line);
  }
  .demo-panel--chat {
    border-left: 0 !important;
  }
  .dg--wide {
    display: none;
  }
  .dg--tall {
    display: block;
    max-width: 380px;
    margin: 0 auto;
  }
  .demo-panel {
    padding: 18px 16px;
  }
  .window-bar .tag-illustrative {
    margin-left: 0;
    order: 3;
  }
}

/* ------------------------------------------------------------------ */
/* How it works (paper band with sticky steps)                          */
/* ------------------------------------------------------------------ */

.steps {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.steps-nav {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}
.steps-nav ol {
  list-style: none;
  display: grid;
  gap: 4px;
  border-left: 1px solid rgba(20, 24, 31, 0.14);
}
.steps-nav a {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin-left: -1px;
  padding: 10px 0 10px 18px;
  border-left: 2px solid transparent;
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 550;
  font-size: 17px;
  transition:
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.steps-nav a span {
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.steps-nav a:hover {
  color: var(--ink);
}
.steps-nav a[aria-current] {
  color: var(--ink);
  border-left-color: var(--accent-ink);
}
.steps-nav a[aria-current] span {
  color: var(--accent-ink);
}
.theme-dark .steps-nav ol {
  border-left-color: var(--line-strong);
}
.theme-dark .steps-nav a {
  color: var(--muted);
}
.theme-dark .steps-nav a:hover,
.theme-dark .steps-nav a[aria-current] {
  color: var(--text);
}
.theme-dark .steps-nav a[aria-current] {
  border-left-color: var(--accent);
}
.theme-dark .steps-nav a[aria-current] span {
  color: var(--accent);
}
.step-cards {
  display: grid;
  gap: 24px;
}
.step-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: clamp(24px, 3.4vw, 40px);
  border-radius: 20px;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid rgba(20, 24, 31, 0.08);
}
.theme-dark .step-card {
  background: var(--surface);
  border-color: var(--line);
}
.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 14px;
}
.step-card h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
}
.step-card .step-kicker {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}
.step-card p.step-copy {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15.5px;
}
.step-card .btn-link {
  margin-top: 20px;
  font-size: 14.5px;
}
.step-visual {
  min-width: 0;
}
.card-visual,
.step-art {
  width: 100%;
  height: auto;
}
.src .pill {
  fill: var(--d-node);
  stroke: var(--d-node-stroke);
}
.src .pill-text {
  font-family: var(--font-mono);
  font-size: 11.5px;
  fill: var(--d-text);
}
.src .flow {
  fill: none;
  stroke: var(--d-accent);
  stroke-opacity: 0.6;
  stroke-width: 1.4;
  stroke-dasharray: 4 6;
  animation: flow 1.6s linear infinite;
}
@keyframes flow {
  to {
    stroke-dashoffset: -20;
  }
}
.callout rect {
  fill: var(--d-surface);
  stroke: var(--d-accent);
  stroke-opacity: 0.6;
}
.callout-title {
  font-size: 13px;
  font-weight: 600;
  fill: var(--d-accent);
}
.callout-row {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--d-muted);
}
.callout-line {
  fill: none;
  stroke: var(--d-accent);
  stroke-dasharray: 3 3;
}
.act-visual {
  display: grid;
  gap: 10px;
}
.act-q {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
}
.act-q b {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
}
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 6px;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 13px;
  text-align: center;
}
.mode-switch span {
  padding: 8px 6px;
  border-radius: 8px;
  color: var(--muted);
}
.mode-switch span:first-child {
  background: var(--surface-2);
  color: var(--text);
}

@media (max-width: 960px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .steps-nav {
    display: none;
  }
}
@media (max-width: 760px) {
  .step-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

/* ------------------------------------------------------------------ */
/* Ladder of causation                                                  */
/* ------------------------------------------------------------------ */

.ladder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  column-gap: 20px;
  row-gap: 12px;
}
.rung {
  grid-column: 1;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.rung--3 {
  grid-row: 1;
}
.rung--2 {
  grid-row: 2;
}
.rung--1 {
  grid-row: 3;
}
.rung--2,
.rung--3 {
  border-color: rgba(242, 160, 61, 0.32);
  background: linear-gradient(90deg, rgba(242, 160, 61, 0.07), rgba(242, 160, 61, 0.015));
}
.rung-num {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 500;
  color: var(--faint);
  line-height: 1;
}
.rung--2 .rung-num,
.rung--3 .rung-num {
  color: var(--accent);
}
.rung h3 {
  font-size: 1.3rem;
}
.rung-q {
  margin-top: 4px;
  font-size: 15px;
  color: var(--muted);
}
.rung-ex {
  font-size: 15px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.rung-tag {
  display: none;
}
.ladder-bracket {
  grid-column: 2;
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 26px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}
.ladder-bracket::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 12px;
  border: 1.5px solid currentColor;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  opacity: 0.7;
}
.ladder-bracket small {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}
.ladder-bracket--cdt {
  grid-row: 1 / span 2;
  color: var(--accent);
}
.ladder-bracket--ml {
  grid-row: 3;
  color: var(--muted);
}
.ladder-axis {
  grid-column: 1;
  display: flex;
  justify-content: space-between;
  padding: 4px 28px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
}
@media (max-width: 860px) {
  .ladder {
    grid-template-columns: minmax(0, 1fr);
  }
  .ladder-bracket {
    display: none;
  }
  .rung {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px 16px;
    padding: 20px;
  }
  .rung-ex {
    grid-column: 2;
    border-left: 0;
    padding-left: 0;
  }
  .rung-tag {
    display: inline-block;
    grid-column: 2;
    justify-self: start;
    padding: 3px 9px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11px;
    border: 1px solid var(--line-strong);
    color: var(--muted);
  }
  .rung--2 .rung-tag,
  .rung--3 .rung-tag {
    color: var(--accent);
    border-color: rgba(242, 160, 61, 0.45);
  }
  .rung-num {
    font-size: 22px;
  }
  .ladder-axis {
    padding: 4px 4px 0;
  }
}

/* ------------------------------------------------------------------ */
/* Where this applies (accordion + art)                                 */
/* ------------------------------------------------------------------ */

.where {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.where-list {
  border-top: 1px solid var(--line-strong);
}
.where-item {
  border-bottom: 1px solid var(--line-strong);
}
.where-item summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
}
.where-item summary::-webkit-details-marker {
  display: none;
}
.where-item summary h3 {
  flex: 1;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
}
.where-item summary h3 small {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.where-num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--faint);
  align-self: flex-start;
  padding-top: 6px;
}
.where-plus {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  flex: none;
}
.where-plus::before,
.where-plus::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.25s var(--ease);
}
.where-plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
.where-item[open] .where-plus {
  border-color: var(--accent);
  color: var(--accent);
}
.where-item[open] .where-plus::after {
  transform: translate(-50%, -50%) rotate(0deg);
}
.where-item[open] .where-num {
  color: var(--accent);
}
.where-body {
  display: grid;
  gap: 16px;
  padding: 0 0 26px 44px;
}
.where-body dt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 4px;
}
.where-body dd {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
}
.where-body dl {
  display: grid;
  gap: 14px;
  margin: 0;
}
.where-ask {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(242, 160, 61, 0.35);
  color: var(--text) !important;
  font-weight: 500;
}
.where-art {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  aspect-ratio: 32 / 24;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 70% 20%, rgba(242, 160, 61, 0.08), transparent 60%),
    var(--bg-2);
  overflow: hidden;
}
.where-art > svg {
  position: absolute;
  inset: 8% 6%;
  width: 88%;
  height: 84%;
  opacity: 0;
  transform: scale(0.97);
  transition:
    opacity 0.5s var(--ease),
    transform 0.6s var(--ease);
}
.where-art[data-active='engines'] > [data-art='engines'],
.where-art[data-active='grid'] > [data-art='grid'],
.where-art[data-active='process'] > [data-art='process'],
.where-art[data-active='wind'] > [data-art='wind'] {
  opacity: 1;
  transform: none;
}
.industry-art .ground {
  fill: none;
  stroke: var(--d-line);
  stroke-width: 1.4;
  stroke-linecap: round;
}
.industry-art .spark circle {
  fill: none;
  stroke: var(--d-accent);
  stroke-width: 2;
}
.industry-art .spark circle:first-child {
  fill: var(--d-accent);
}
.industry-art .spark circle:last-child {
  animation: pulse 2.2s ease-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes pulse {
  0% {
    opacity: 0.9;
    transform: scale(0.6);
  }
  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}
.industry-art .tower path,
.industry-art .plant path,
.industry-art .wafer path {
  fill: none;
  stroke: var(--d-text);
  stroke-opacity: 0.55;
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.industry-art .tower--far path {
  stroke-opacity: 0.3;
}
.industry-art .wire {
  fill: none;
  stroke: var(--d-accent);
  stroke-width: 1.5;
  stroke-opacity: 0.85;
}
.industry-art .wire--out {
  stroke: var(--alarm);
  stroke-dasharray: 3 4;
}
.industry-art .plant rect {
  fill: var(--d-node);
  stroke: var(--d-text);
  stroke-opacity: 0.55;
  stroke-width: 1.6;
}
.industry-art .plant .valve {
  fill: var(--d-accent);
  stroke: none;
}
.industry-art .wafer circle {
  fill: var(--d-accent-soft);
  stroke: var(--d-accent);
  stroke-width: 1.6;
}
.industry-art .wafer path {
  stroke: var(--d-accent);
  stroke-opacity: 0.45;
  stroke-width: 1;
}
.industry-art .tower-pole {
  fill: var(--d-text);
  opacity: 0.6;
}
.industry-art .turbine--far .tower-pole {
  opacity: 0.3;
}
.industry-art .nacelle {
  fill: var(--d-text);
  opacity: 0.7;
}
.industry-art .blades path,
.industry-art .blades circle {
  fill: var(--d-text);
  opacity: 0.85;
}
.industry-art .turbine--far .blades path,
.industry-art .turbine--far .blades circle {
  opacity: 0.4;
}
.industry-art .blades {
  transform-box: view-box;
  animation: spin 9s linear infinite;
}
.industry-art .blades--slow {
  animation-duration: 13s;
}
.industry-art .blades--main {
  transform-origin: 157px 79px;
}
.industry-art .blades--r {
  transform-origin: 256px 128px;
}
.industry-art .blades--l {
  transform-origin: 66px 140px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.industry-art .machine .m-body,
.industry-art .machine .m-part {
  stroke-opacity: 0.7;
}
@media (max-width: 900px) {
  .where {
    grid-template-columns: minmax(0, 1fr);
  }
  .where-art {
    position: relative;
    top: 0;
    order: -1;
    max-width: 460px;
    width: 100%;
  }
  .where-body {
    padding-left: 0;
  }
}

/* ------------------------------------------------------------------ */
/* Cards and grids                                                      */
/* ------------------------------------------------------------------ */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.card {
  position: relative;
  padding: clamp(22px, 2.6vw, 32px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-2);
  transition: border-color 0.25s var(--ease);
}
.card:hover {
  border-color: var(--line-strong);
}
.card h3 {
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}
.card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15.5px;
}
.card .ticon {
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
}
.card-num {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
}
.theme-paper .card {
  background: #fff;
  border-color: rgba(20, 24, 31, 0.08);
}
.theme-paper .card p {
  color: var(--ink-muted);
}
.ticon .ic-line {
  fill: none;
  stroke: var(--d-text);
  stroke-opacity: 0.6;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ticon .ic-accent {
  fill: none;
  stroke: var(--d-accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ticon .ic-accent-ring {
  fill: none;
  stroke: var(--d-accent);
  stroke-width: 2.2;
}
.ticon .ic-dot {
  fill: var(--d-accent);
}
.ticon .ic-fill {
  fill: var(--d-text);
  opacity: 0.6;
}
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Split layout: text + visual */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.split--top {
  align-items: start;
}
.split h2 + .lead,
.split h2 + p {
  margin-top: 18px;
}
.split .lead + .lead,
.split .lead + p,
.split p + p {
  margin-top: 16px;
}
.split p + .btn-link {
  margin-top: 20px;
}
.split-visual {
  min-width: 0;
}
@media (max-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.science-visual {
  padding: clamp(20px, 4vw, 48px);
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 70% at 50% 40%, rgba(242, 160, 61, 0.07), transparent 70%),
    var(--bg-2);
}
.science-visual .dag-svg {
  max-width: 420px;
  margin: 0 auto;
}
.science-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}
.dag-anim .e .ln {
  transition: stroke-dashoffset 0.9s var(--ease);
}
.js .dag-anim .e .ln {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.js .dag-anim .e .ah {
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.js .is-visible .dag-anim .e .ln {
  stroke-dashoffset: 0;
}
.js .is-visible .dag-anim .e .ah {
  opacity: 1;
}
.dag-anim .e:nth-child(1) .ln, .dag-anim .e:nth-child(1) .ah { transition-delay: 0.1s; }
.dag-anim .e:nth-child(2) .ln, .dag-anim .e:nth-child(2) .ah { transition-delay: 0.18s; }
.dag-anim .e:nth-child(3) .ln, .dag-anim .e:nth-child(3) .ah { transition-delay: 0.26s; }
.dag-anim .e:nth-child(4) .ln, .dag-anim .e:nth-child(4) .ah { transition-delay: 0.34s; }
.dag-anim .e:nth-child(5) .ln, .dag-anim .e:nth-child(5) .ah { transition-delay: 0.6s; }
.dag-anim .e:nth-child(6) .ln, .dag-anim .e:nth-child(6) .ah { transition-delay: 0.68s; }
.dag-anim .e:nth-child(7) .ln, .dag-anim .e:nth-child(7) .ah { transition-delay: 0.76s; }
.dag-anim .e:nth-child(8) .ln, .dag-anim .e:nth-child(8) .ah { transition-delay: 0.84s; }
.dag-anim .e:nth-child(9) .ln, .dag-anim .e:nth-child(9) .ah { transition-delay: 0.92s; }
.dag-anim .e:nth-child(10) .ln, .dag-anim .e:nth-child(10) .ah { transition-delay: 1.18s; }
.dag-anim .e:nth-child(11) .ln, .dag-anim .e:nth-child(11) .ah { transition-delay: 1.26s; }
.dag-anim .e:nth-child(12) .ln, .dag-anim .e:nth-child(12) .ah { transition-delay: 1.34s; }
.dag-anim .e:nth-child(13) .ln, .dag-anim .e:nth-child(13) .ah { transition-delay: 1.42s; }
.js .is-visible .dag-anim .e .ah {
  transition-duration: 0.3s;
}

/* ------------------------------------------------------------------ */
/* Final CTA                                                            */
/* ------------------------------------------------------------------ */

.cta {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.cta h2 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  max-width: 18ch;
}
.cta .lead {
  margin-top: 22px;
  max-width: 560px;
}
.cta .hero-actions {
  margin-top: 32px;
}
.cta-card {
  padding: clamp(22px, 3vw, 32px);
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
}
.cta-card h3 {
  font-size: 1.05rem;
  margin-bottom: 18px;
}
.cta-card ul {
  list-style: none;
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}
.cta-card li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.cta-card li .icon {
  width: 36px;
  height: 36px;
  padding: 9px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--accent);
}
.cta-card li b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.cta-glow {
  position: absolute;
  left: -200px;
  bottom: -300px;
  width: 800px;
  height: 600px;
  background: radial-gradient(closest-side, rgba(242, 160, 61, 0.09), transparent 70%);
  pointer-events: none;
}
.cta--simple .cta-grid {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 900px) {
  .cta-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------------ */
/* Capabilities                                                         */
/* ------------------------------------------------------------------ */

.diagram-frame .window-body {
  padding: clamp(16px, 3vw, 36px);
}
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.scroll-x .diagram-b {
  min-width: 760px;
}
.scroll-hint {
  display: none;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
}
@media (max-width: 820px) {
  .scroll-hint {
    display: block;
  }
}
.modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.mode {
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.mode h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
}
.mode h3::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--d-text);
  opacity: 0.55;
}
.mode--closed h3::before {
  background: var(--accent);
  opacity: 1;
}
.mode p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}
@media (max-width: 720px) {
  .modes {
    grid-template-columns: minmax(0, 1fr);
  }
}

.why-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid rgba(20, 24, 31, 0.14);
}
.why-points li {
  list-style: none;
  padding: 28px 28px 0 0;
}
.why-points li + li {
  padding-left: 28px;
  border-left: 1px solid rgba(20, 24, 31, 0.14);
}
.why-points h3 {
  font-size: 1.15rem;
}
.why-points p {
  margin-top: 10px;
  color: var(--ink-muted);
  font-size: 15.5px;
}
@media (max-width: 860px) {
  .why-points {
    grid-template-columns: minmax(0, 1fr);
  }
  .why-points li,
  .why-points li + li {
    padding: 24px 0;
    border-left: 0;
  }
  .why-points li + li {
    border-top: 1px solid rgba(20, 24, 31, 0.14);
  }
}

.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.cap-card {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.4vw, 30px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-2);
  transition: border-color 0.25s var(--ease);
}
.cap-card:hover {
  border-color: var(--line-strong);
}
.cap-card--feature {
  grid-column: span 2;
  grid-row: span 2;
}
.cap-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  margin-bottom: 22px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
}
.cap-card--feature .cap-visual {
  flex: 1;
  min-height: 260px;
  padding: 24px;
}
.cap-art {
  width: 100%;
  height: auto;
  max-height: 150px;
}
.cap-card--feature .cap-art {
  max-height: 240px;
}
.cap-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.cap-card h3 {
  margin-top: 10px;
  font-size: 1.15rem;
  line-height: 1.25;
}
.cap-card--feature h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}
.cap-card p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}
.cap-card--feature p {
  font-size: 16px;
  max-width: 640px;
}
.chip-node rect {
  fill: var(--d-node);
  stroke: var(--d-node-stroke);
  stroke-width: 1.2;
}
.chip-node text {
  font-size: 12px;
  font-weight: 500;
  fill: var(--d-text);
}
.chip-node.is-hot rect {
  fill: var(--d-accent-soft);
  stroke: var(--d-accent);
}
.chip-node.is-hot text {
  fill: var(--d-accent);
}
.cap-art .trace,
.cap-art .marker {
  fill: none;
  stroke: var(--d-accent);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}
.cap-art .trace-head {
  fill: var(--d-accent);
}
.art-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--d-text);
}
.art-label--muted {
  fill: var(--d-muted);
}
.art-label--accent {
  fill: var(--d-accent);
}
.art-label--alarm {
  fill: var(--alarm);
}
.art-label--tiny {
  font-size: 8.5px;
  fill: var(--d-muted);
}
.flood-dot {
  fill: var(--alarm);
  opacity: 0.55;
}
.flood-root circle {
  fill: none;
  stroke: var(--d-accent);
  stroke-width: 1.5;
}
.flood-root .is-core {
  fill: var(--d-accent);
}
.cap-art .axis,
.lag-art .axis {
  fill: none;
  stroke: var(--d-line);
  stroke-width: 1.2;
}
.cap-art .series,
.lag-art .series {
  fill: none;
  stroke: var(--d-text);
  stroke-opacity: 0.6;
  stroke-width: 2;
  stroke-linecap: round;
}
.cap-art .series--base {
  stroke-dasharray: 3 4;
}
.cap-art .series--whatif,
.lag-art .series--whatif {
  stroke: var(--d-accent);
  stroke-opacity: 1;
}
.lag-art .marker {
  fill: none;
  stroke: var(--d-muted);
  stroke-dasharray: 3 4;
  stroke-width: 1;
}
.slider .track {
  stroke: var(--d-line);
  stroke-width: 3;
  stroke-linecap: round;
}
.slider circle {
  fill: var(--d-node);
  stroke: var(--d-text);
  stroke-opacity: 0.6;
  stroke-width: 1.5;
}
.slider.is-hot circle {
  fill: var(--d-accent);
  stroke: var(--d-accent);
}
.slider.is-hot .track {
  stroke: var(--d-accent);
  stroke-opacity: 0.5;
}
@media (max-width: 960px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cap-card--feature {
    grid-row: auto;
  }
}
@media (max-width: 640px) {
  .bento {
    grid-template-columns: minmax(0, 1fr);
  }
  .cap-card--feature {
    grid-column: auto;
  }
  .cap-card--feature .cap-visual {
    min-height: 180px;
  }
}

.cap-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}
.cap-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.cap-list .card-num {
  margin: 3px 0 0;
}
.cap-list h3 {
  font-size: 1.08rem;
}
.cap-list .cap-q {
  grid-column: 2;
  font-weight: 500;
  color: var(--text);
  font-size: 15px;
}
.cap-list p {
  grid-column: 2;
  color: var(--muted);
  font-size: 15px;
}
@media (max-width: 820px) {
  .cap-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}
.outcomes li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(20, 24, 31, 0.14);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}
.outcomes li .icon {
  color: var(--accent-ink);
}

/* ------------------------------------------------------------------ */
/* How it's built                                                       */
/* ------------------------------------------------------------------ */

.flow-diagram {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1.1fr) 56px minmax(0, 1fr);
  align-items: center;
}
.flow-col h3 {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.flow-col ul {
  list-style: none;
  display: grid;
  gap: 10px;
}
.flow-col li {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  font-size: 14.5px;
  line-height: 1.4;
  transition:
    border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}
.flow-col li:hover {
  border-color: rgba(242, 160, 61, 0.5);
  background: var(--accent-soft);
}
.flow-col li small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 12.5px;
}
.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.flow-arrow .icon {
  width: 26px;
  height: 26px;
}
.flow-core {
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgba(242, 160, 61, 0.45);
  background:
    radial-gradient(90% 70% at 50% 30%, rgba(242, 160, 61, 0.1), transparent 70%),
    var(--bg-2);
  text-align: center;
}
.flow-core .dag-svg {
  max-width: 220px;
  margin: 0 auto 12px;
}
.flow-core b {
  display: block;
  font-size: 1.1rem;
}
.flow-core span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13.5px;
}
@media (max-width: 960px) {
  .flow-diagram {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .flow-arrow .icon {
    transform: rotate(90deg);
  }
  .flow-core {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
  }
}

.diagram-a-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.diagram-panel {
  margin: 0;
  padding: clamp(16px, 2.5vw, 28px);
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.diagram-a {
  max-width: 360px;
  margin: 0 auto;
}
@media (max-width: 640px) {
  .diagram-a-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

.lag-art {
  width: 100%;
  height: auto;
}
.lag-panel {
  padding: clamp(20px, 3vw, 32px);
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}

.qa-window .window-body {
  display: grid;
  gap: 16px;
}
.qa-window .bubble--q {
  max-width: 80%;
  justify-self: end;
}
.tally {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin-top: 4px;
}
.tally li {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  color: var(--muted);
}
.tally b {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
}
.tally .is-accent {
  border-color: rgba(242, 160, 61, 0.45);
  color: var(--accent);
}
.tally .is-accent b {
  color: var(--accent);
}

.problems {
  list-style: none;
  counter-reset: problem;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-strong);
}
.problems li {
  display: grid;
  grid-template-columns: 56px minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 16px 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.problems .card-num {
  margin: 4px 0 0;
}
.problems h3 {
  font-size: 1.2rem;
}
.problems p {
  color: var(--muted);
  font-size: 15.5px;
}
@media (max-width: 760px) {
  .problems li {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .problems p {
    grid-column: 2;
  }
}
.approach-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  list-style: none;
}
.approach-tags li {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.inputs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
}
.inputs-grid li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid rgba(20, 24, 31, 0.1);
  background: #fff;
  font-weight: 500;
  line-height: 1.35;
}
.inputs-grid li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex: none;
  background: rgba(180, 95, 6, 0.1);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 12px;
}
@media (max-width: 900px) {
  .inputs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .inputs-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.doc rect {
  fill: var(--d-node);
  stroke: var(--d-text);
  stroke-opacity: 0.45;
  stroke-width: 1.4;
}
.doc path {
  fill: none;
  stroke: var(--d-text);
  stroke-opacity: 0.3;
  stroke-width: 2;
  stroke-linecap: round;
}
.dag-draft .ln {
  stroke-dasharray: 4 4;
}
.dag-draft .n circle {
  stroke-dasharray: 3 3;
}
.mini-badge rect {
  fill: rgba(80, 180, 120, 0.12);
  stroke: rgba(110, 200, 140, 0.55);
}
.mini-badge text {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: #9fdcb4;
}
.mini-badge--warn rect {
  fill: var(--d-accent-soft);
  stroke: var(--d-accent);
}
.mini-badge--warn text {
  fill: var(--d-accent);
}
.mini-badge--muted rect {
  fill: transparent;
  stroke: var(--d-line);
  stroke-dasharray: 3 3;
}
.mini-badge--muted text {
  fill: var(--d-muted);
  text-decoration: line-through;
}
.mini-badge--accent rect {
  fill: var(--d-node);
  stroke: var(--d-text);
  stroke-opacity: 0.4;
}
.mini-badge--accent text {
  fill: var(--d-text);
}
.eq rect {
  fill: var(--d-node);
  stroke: var(--d-accent);
  stroke-opacity: 0.6;
}
.eq text {
  font-family: var(--font-mono);
  font-size: 14px;
  fill: var(--d-accent);
}

/* ------------------------------------------------------------------ */
/* Research                                                             */
/* ------------------------------------------------------------------ */

.post-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(24px, 3.5vw, 44px);
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  text-decoration: none;
  transition: border-color 0.25s var(--ease);
}
.post-feature:hover,
.post-card:hover {
  border-color: rgba(242, 160, 61, 0.5);
}
.post-feature h2 {
  margin-top: 18px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}
.post-feature p,
.post-card p {
  margin-top: 14px;
  color: var(--muted);
}
.post-feature .btn-link,
.post-card .btn-link {
  margin-top: 22px;
  font-size: 14.5px;
}
.post-feature-visual {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
}
.post-feature-visual .dag-svg {
  max-width: 300px;
  margin: 0 auto;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.post-card {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 3vw, 32px);
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  text-decoration: none;
  transition: border-color 0.25s var(--ease);
}
.post-card h2 {
  margin-top: 16px;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.post-card .btn-link {
  margin-top: auto;
  padding-top: 22px;
  align-self: flex-start;
}
.post-card .draft-badge {
  align-self: flex-start;
}
@media (max-width: 820px) {
  .post-feature,
  .post-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.article-head {
  padding: clamp(56px, 7vw, 96px) 0 clamp(32px, 4vw, 48px);
}
.article-head .back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14.5px;
  text-decoration: none;
}
.article-head .back .icon {
  transform: rotate(180deg);
}
.article-head .back:hover {
  color: var(--text);
}
.article-head h1 {
  margin-top: 18px;
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  max-width: 22ch;
}
.article-head .lead {
  margin-top: 20px;
  max-width: 680px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.article-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}
.copy-done {
  display: none;
}
[data-state='copied'] .copy-idle {
  display: none;
}
[data-state='copied'] .copy-done {
  display: inline;
}

.prose {
  font-size: 1.075rem;
  line-height: 1.75;
  color: #d5d9de;
}
.prose > * + * {
  margin-top: 1.15em;
}
.prose h2 {
  margin-top: 2em;
  font-size: 1.6rem;
  color: var(--text);
}
.prose h3 {
  margin-top: 1.8em;
  font-size: 1.2rem;
  color: var(--text);
}
.prose h2 + *,
.prose h3 + * {
  margin-top: 0.7em;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li + li {
  margin-top: 0.45em;
}
.prose li::marker {
  color: var(--accent);
}
.prose a {
  color: var(--accent);
  text-underline-offset: 3px;
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent);
  color: var(--text);
  font-size: 1.15rem;
}
.prose figure {
  margin: 2em 0;
}
.prose figcaption {
  margin-top: 10px;
  color: var(--faint);
  font-size: 14px;
}
.prose strong {
  color: var(--text);
}
.article-body {
  padding-bottom: clamp(72px, 9vw, 120px);
}
.article-end {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.article-end h2 {
  font-size: 1.3rem;
}
.article-end ul {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.article-end a {
  color: var(--text);
  text-decoration: none;
}
.article-end a:hover {
  color: var(--accent);
}

/* ------------------------------------------------------------------ */
/* About                                                                */
/* ------------------------------------------------------------------ */

.statement {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 550;
  letter-spacing: -0.025em;
  line-height: 1.25;
  max-width: 28ch;
}
.statement + .lead {
  margin-top: 24px;
  max-width: 680px;
}
.problem-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.problem-list li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 22px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 15.5px;
}
.problem-list li .card-num {
  margin: 2px 0 0;
}
.problem-list li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
@media (max-width: 760px) {
  .problem-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
.isnot {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.isnot li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: var(--muted);
}
.isnot li::before {
  content: '';
  flex: none;
  width: 12px;
  height: 1.5px;
  background: var(--faint);
  transform: translateY(-4px);
}
.users {
  margin-top: 18px;
}
.name-origin {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: clamp(24px, 3.5vw, 40px);
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.name-origin .wordmark {
  font-size: clamp(2rem, 4vw, 3rem);
}
.name-origin .wordmark::after {
  width: 10px;
  height: 10px;
}
.name-origin p {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--muted);
}
.name-origin p em {
  color: var(--text);
}
@media (max-width: 640px) {
  .name-origin {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------------ */
/* Contact                                                              */
/* ------------------------------------------------------------------ */

.contact-section {
  position: relative;
  overflow: hidden;
  padding-top: clamp(64px, 8vw, 112px);
}
.contact-section h1 {
  max-width: 16ch;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
}
.contact-section .lead {
  margin: 20px 0 36px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.contact-aside {
  display: grid;
  gap: 18px;
}
.contact-line {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.contact-line .icon {
  width: 40px;
  height: 40px;
  padding: 11px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--accent);
}
.contact-line b {
  display: block;
  margin-bottom: 4px;
  font-size: 14.5px;
}
.contact-line p {
  color: var(--muted);
  font-size: 15px;
}
.form {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 3.5vw, 36px);
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.field {
  display: grid;
  gap: 8px;
}
.field label {
  font-size: 14px;
  font-weight: 550;
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15.5px;
  transition: border-color 0.2s var(--ease);
}
.field textarea {
  min-height: 160px;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--faint);
}
.form-note {
  color: var(--faint);
  font-size: 13.5px;
}
.form .btn {
  justify-self: start;
}
@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .form .btn {
    justify-self: stretch;
  }
}

/* ------------------------------------------------------------------ */
/* Legal and 404                                                        */
/* ------------------------------------------------------------------ */

.legal .prose h2 {
  font-size: 1.3rem;
}
.legal .draft-note {
  margin-top: 28px;
}
.legal h1 {
  margin-top: 12px;
}
.legal .prose {
  margin-top: 40px;
}
.notfound .lead {
  margin-top: 16px;
}
.notfound {
  min-height: 60vh;
  display: flex;
  align-items: center;
}
.notfound-code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}
.notfound h1 {
  margin-top: 16px;
}
.notfound ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

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

.site-footer {
  position: relative;
  overflow: hidden;
  padding: 72px 0 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
}
.footer-brand p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  max-width: 300px;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, auto));
  gap: 48px;
}
.footer-cols h2 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}
.footer-cols ul {
  list-style: none;
  display: grid;
  gap: 10px;
}
.footer-cols a,
.footer-bottom a {
  color: var(--muted);
  font-size: 14.5px;
  text-decoration: none;
}
.footer-cols a:hover,
.footer-bottom a:hover {
  color: var(--text);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 56px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 14px;
}
.footer-bottom ul {
  display: flex;
  gap: 20px;
  list-style: none;
}
.footer-mark {
  margin-top: 8px;
  font-size: clamp(88px, 21vw, 300px);
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 0.74;
  text-align: center;
  color: rgba(255, 255, 255, 0.035);
  white-space: nowrap;
  user-select: none;
  transform: translateY(10%);
}
@media (max-width: 760px) {
  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
}

/* ------------------------------------------------------------------ */
/* Small screens and reduced motion                                     */
/* ------------------------------------------------------------------ */

@media (max-width: 560px) {
  :root {
    --gutter: 16px;
    --header-h: 62px;
  }
  .hero-actions .btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
