/* ─────────────────────────────────────────────────────────────
   Trustbit Technologies — design system
   Dark-first, security-focused, monospace accents.
   All tweakable values are CSS variables on :root.
   ───────────────────────────────────────────────────────────── */

:root {
  /* — Color tokens (dark default) — */
  --bg:           oklch(0.16 0.018 252);
  --bg-2:         oklch(0.185 0.02 252);
  --surface:      oklch(0.205 0.022 252);
  --surface-2:    oklch(0.235 0.024 252);
  --line:         oklch(0.30 0.022 252 / 0.65);
  --line-strong:  oklch(0.36 0.025 252 / 0.85);
  --text:         oklch(0.965 0.005 252);
  --text-dim:     oklch(0.74 0.012 252);
  --text-mute:    oklch(0.55 0.014 252);
  --text-faint:   oklch(0.42 0.014 252);

  /* — Accent (trust-blue default; overridden by tweak) — */
  --accent-h:     258;
  --accent:       oklch(0.72 0.16 var(--accent-h));
  --accent-soft:  oklch(0.72 0.16 var(--accent-h) / 0.16);
  --accent-line:  oklch(0.72 0.16 var(--accent-h) / 0.45);
  --accent-ink:   oklch(0.16 0.018 252);

  --signal:       oklch(0.82 0.14 175); /* teal — used for "operational" status */
  --warn:         oklch(0.82 0.14 75);
  --crit:         oklch(0.72 0.18 25);

  /* — Typography (overridden by tweak) — */
  --font-display: "IBM Plex Sans Condensed", "IBM Plex Sans", ui-sans-serif, sans-serif;
  --font-body:    "IBM Plex Sans", ui-sans-serif, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "JetBrains Mono", monospace;

  /* — Density (overridden by tweak) — */
  --gap:          24px;
  --gap-lg:       48px;
  --section-y:    112px;
  --pad-card:     28px;

  /* — Geometry — */
  --radius:       4px;
  --radius-lg:    8px;
  --container:    100%;
  --gutter:       clamp(20px, 3vw, 64px);
}

/* Light theme override (toggle) */
:root[data-theme="light"] {
  --bg:           oklch(0.985 0.003 252);
  --bg-2:         oklch(0.965 0.005 252);
  --surface:      oklch(1 0 0);
  --surface-2:    oklch(0.97 0.005 252);
  --line:         oklch(0.78 0.012 252 / 0.7);
  --line-strong:  oklch(0.66 0.014 252 / 0.85);
  --text:         oklch(0.18 0.018 252);
  --text-dim:     oklch(0.38 0.014 252);
  --text-mute:    oklch(0.52 0.014 252);
  --text-faint:   oklch(0.66 0.012 252);
  --accent-ink:   oklch(0.99 0 0);
}

/* Density variants */
:root[data-density="compact"] {
  --gap: 16px; --gap-lg: 28px; --section-y: 72px; --pad-card: 18px;
}
:root[data-density="comfy"] {
  --gap: 32px; --gap-lg: 64px; --section-y: 160px; --pad-card: 36px;
}

/* Font pairing variants */
:root[data-fontset="geometric"] {
  --font-display: "Space Grotesk", ui-sans-serif, sans-serif;
  --font-body:    "Space Grotesk", ui-sans-serif, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;
}
:root[data-fontset="editorial"] {
  --font-display: "Instrument Serif", ui-serif, Georgia, serif;
  --font-body:    "IBM Plex Sans", ui-sans-serif, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, monospace;
}

/* ─── Base ─── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent-soft); color: var(--text); }

/* ─── Layout primitives ─── */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: var(--section-y) 0; position: relative; }
.section-tight { padding: calc(var(--section-y) * 0.55) 0; }

.hairline { height: 1px; background: var(--line); border: 0; margin: 0; }
.hairline-strong { height: 1px; background: var(--line-strong); border: 0; margin: 0; }

/* ─── Typography utilities ─── */
.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
}
.eyebrow .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-right: 8px;
  box-shadow: 0 0 0 4px var(--accent-soft);
  vertical-align: 1px;
}
.idx {
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 5.6vw, 84px); line-height: 1.02; letter-spacing: -0.03em; }
h2 { font-size: clamp(30px, 3.4vw, 50px); line-height: 1.05; }
h3 { font-size: clamp(20px, 1.6vw, 26px); line-height: 1.18; }
h4 { font-size: 16px; line-height: 1.3; letter-spacing: -0.01em; }

p { margin: 0; }
.lead { font-size: clamp(17px, 1.3vw, 20px); color: var(--text-dim); line-height: 1.5; max-width: 62ch; }
.body-dim { color: var(--text-dim); }
.body-mute { color: var(--text-mute); }

/* Serif (Instrument Serif) special-cases */
:root[data-fontset="editorial"] h1,
:root[data-fontset="editorial"] h2 { font-weight: 400; letter-spacing: -0.015em; }

/* ─── Buttons & chips ─── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.04em;
  text-transform: uppercase; font-weight: 500;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--surface-2); border-color: var(--accent-line); }
.btn-primary {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.btn-primary:hover { background: oklch(from var(--accent) calc(l + 0.04) c h); border-color: transparent; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); background: transparent; }
.btn .arr { display: inline-block; transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 8px; border-radius: 100px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--text-dim);
  border: 1px solid var(--line);
  background: color-mix(in oklch, var(--surface) 60%, transparent);
}
.chip .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--signal) 30%, transparent);
}
.chip-accent .dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ─── Cards ─── */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--pad-card);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--line-strong); }
.card-link { cursor: pointer; }
.card-link:hover { border-color: var(--accent-line); }

.card-tick {
  position: absolute; top: 16px; right: 16px;
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--text-faint); letter-spacing: 0.08em;
}

/* ─── Header ─── */
.hdr {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.hdr-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 32px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.02em; color: var(--text); font-weight: 500; }
.brand-img {
  height: 26px; width: auto; display: block;
  /* Logo carries its own colour — float through theme changes cleanly. */
}
/* Dark-on-transparent (white text) is the default; colorful version swaps in for light theme. */
.brand-light { display: none; }
.brand-dark  { display: block; }
:root[data-theme="light"] .brand-light { display: block; }
:root[data-theme="light"] .brand-dark  { display: none; }
.ftr .brand-img { height: 32px; }
.brand-mark {
  width: 22px; height: 22px; position: relative;
  display: grid; place-items: center;
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-tag { color: var(--text-mute); font-weight: 400; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 12px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em;
  color: var(--text-dim); transition: color .12s ease, background .12s ease;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.active { color: var(--text); background: var(--surface); }
.nav a.active::before {
  content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); margin-right: 8px; vertical-align: 2px;
}

.hdr-cta { display: flex; align-items: center; gap: 10px; }
.hdr-status {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-mute);
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 100px;
}
.hdr-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--signal) 30%, transparent); }

/* ─── Footer ─── */
.ftr {
  border-top: 1px solid var(--line);
  padding: 80px 0 32px;
  background: var(--bg-2);
  margin-top: 80px;
}
.ftr-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr;
  gap: 48px;
}
.ftr h5 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-mute); margin: 0 0 18px;
  font-weight: 500;
}
.ftr ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ftr a { color: var(--text-dim); font-size: 14px; }
.ftr a:hover { color: var(--text); }
.ftr-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; color: var(--text-faint);
  letter-spacing: 0.05em;
}
.ftr-meta .pulse {
  display: inline-flex; align-items: center; gap: 8px;
}
.ftr-meta .pulse .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal);
  animation: pulse 2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in oklch, var(--signal) 30%, transparent); }
  50% { opacity: 0.5; box-shadow: 0 0 0 6px color-mix(in oklch, var(--signal) 0%, transparent); }
}

/* ─── Section header pattern ─── */
.s-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--gap-lg);
  align-items: end;
  margin-bottom: var(--gap-lg);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.s-head .left { display: flex; flex-direction: column; gap: 14px; }
.s-head h2 { max-width: 14ch; }

/* ─── Hero ─── */
.hero { position: relative; padding: 80px 0 96px; overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
  opacity: 0.5;
}
.hero-inner { position: relative; }

.hero-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-mute);
  letter-spacing: 0.08em; text-transform: uppercase;
  padding-bottom: 28px; margin-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.hero-meta .group { display: flex; gap: 32px; align-items: center; }

.hero-h1 { max-width: 18ch; }
.hero-h1 em {
  font-style: normal;
  background: linear-gradient(180deg, var(--text) 60%, var(--accent) 60%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub { margin-top: 28px; max-width: 56ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }

.hero-stats {
  margin-top: 96px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden;
  background: color-mix(in oklch, var(--surface) 50%, transparent);
}
.hero-stat { padding: 28px; border-right: 1px solid var(--line); position: relative; }
.hero-stat:last-child { border-right: 0; }
.hero-stat .lbl {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-mute);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.hero-stat .val {
  font-family: var(--font-display); font-size: 38px; line-height: 1;
  margin: 12px 0 8px; letter-spacing: -0.02em;
}
.hero-stat .val sup { font-size: 14px; color: var(--accent); margin-left: 4px; vertical-align: 8px;
  font-family: var(--font-mono); font-weight: 500; }
.hero-stat .delta { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); }
.hero-stat .delta b { color: var(--signal); font-weight: 500; }

/* ─── Industries grid ─── */
.ind-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface);
}
.ind-card {
  padding: 28px 24px 24px;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 16px;
  min-height: 280px;
  position: relative;
  transition: background .2s ease;
}
.ind-card:last-child { border-right: 0; }
.ind-card:hover { background: var(--surface-2); }
.ind-card .ind-head {
  display: flex; justify-content: space-between; align-items: start;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-mute);
  letter-spacing: 0.06em;
}
.ind-card h3 { font-size: 22px; margin-top: 4px; }
.ind-card .ind-tags {
  margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px;
}
.ind-card .ind-tag {
  font-family: var(--font-mono); font-size: 10.5px;
  padding: 3px 8px; border-radius: 3px;
  background: color-mix(in oklch, var(--bg) 70%, transparent);
  color: var(--text-dim); letter-spacing: 0.04em;
}
.ind-card .ind-sym {
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong); border-radius: 6px;
  display: grid; place-items: center;
  color: var(--text-dim);
}
.ind-card:hover .ind-sym { color: var(--accent); border-color: var(--accent-line); }

/* ─── Modules grid ─── */
.mod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mod {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: 12px;
  min-height: 180px;
  transition: border-color .2s ease;
}
.mod:hover { border-color: var(--accent-line); }
.mod .mod-head { display: flex; justify-content: space-between; align-items: center; }
.mod .mod-key { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.mod h4 { font-size: 17px; }
.mod p { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }
.mod .mod-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--signal);
  letter-spacing: 0.05em; margin-top: auto;
}
.mod .mod-status .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--signal); }

/* ─── Console block (terminal-styled) ─── */
.console {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: 13px;
  overflow: hidden;
}
.console-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-size: 11px; color: var(--text-mute); letter-spacing: 0.06em;
}
.console-hd .dots { display: flex; gap: 6px; }
.console-hd .dots span {
  width: 9px; height: 9px; border-radius: 50%; background: var(--surface-2);
}
.console-hd .dots span:nth-child(3) { background: var(--accent); opacity: 0.7; }
.console-body { padding: 18px 20px; line-height: 1.7; color: var(--text-dim); }
.console-body .pf { color: var(--accent); }
.console-body .ok { color: var(--signal); }
.console-body .k { color: var(--text); }
.console-body .c { color: var(--text-faint); }

/* ─── Case study tile ─── */
.cs-list { display: grid; grid-template-columns: 1fr; gap: 0;
  border-top: 1px solid var(--line); }
.cs {
  display: grid; grid-template-columns: 90px 1fr 1.4fr 1fr 60px;
  gap: 24px; align-items: center;
  padding: 28px 0; border-bottom: 1px solid var(--line);
  transition: background .2s ease;
  cursor: pointer;
}
.cs:hover { background: color-mix(in oklch, var(--surface) 50%, transparent); }
.cs .cs-idx { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint);
  letter-spacing: 0.06em; padding-left: 8px; }
.cs .cs-co { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.01em; }
.cs .cs-co .sub { display: block; font-family: var(--font-mono); font-size: 11px;
  color: var(--text-mute); margin-top: 4px; letter-spacing: 0.04em; text-transform: uppercase; }
.cs .cs-tagline { color: var(--text-dim); font-size: 15px; }
.cs .cs-result { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim);
  display: flex; flex-direction: column; gap: 4px; }
.cs .cs-result b { color: var(--signal); font-weight: 500; font-size: 16px;
  font-family: var(--font-display); letter-spacing: -0.01em; }
.cs .cs-arr { font-family: var(--font-mono); font-size: 16px; color: var(--text-faint);
  text-align: right; padding-right: 8px; transition: transform .2s ease, color .2s ease; }
.cs:hover .cs-arr { color: var(--accent); transform: translateX(4px); }

/* ─── Process / steps ─── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.step { padding: 32px 28px 32px 0; border-right: 1px solid var(--line);
  position: relative; }
.step:last-child { border-right: 0; padding-right: 0; }
.step .num { font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  letter-spacing: 0.08em; }
.step h4 { margin: 12px 0 10px; font-size: 18px; }
.step p { font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.step .when { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint);
  letter-spacing: 0.06em; margin-top: 14px; text-transform: uppercase; }

/* ─── Logos strip ─── */
.logo-row-label {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--text-faint); letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 8px;
}
.logos {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.logo-cell {
  display: grid; place-items: center;
  padding: 32px 16px; border-right: 1px solid var(--line);
  font-family: var(--font-display); font-size: 18px; color: var(--text-mute);
  letter-spacing: -0.01em;
  transition: color .2s ease;
}
.logo-cell:last-child { border-right: 0; }
.logo-cell:hover { color: var(--text); }
.logo-cell .small { font-family: var(--font-mono); font-size: 9.5px;
  color: var(--text-faint); letter-spacing: 0.1em; margin-top: 2px;
  text-transform: uppercase; }

/* ─── Testimonial ─── */
.quote {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 56px;
  background:
    radial-gradient(ellipse at top right, var(--accent-soft), transparent 60%),
    var(--surface);
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px;
  align-items: center;
}
.quote blockquote {
  margin: 0; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(22px, 2vw, 30px); line-height: 1.3; letter-spacing: -0.01em;
  text-wrap: balance;
}
.quote blockquote::before { content: "“"; color: var(--accent); margin-right: 4px; }
.quote .who { display: flex; flex-direction: column; gap: 6px;
  border-left: 1px solid var(--line); padding-left: 28px; }
.quote .who .name { font-size: 15px; color: var(--text); }
.quote .who .role { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-mute);
  letter-spacing: 0.05em; text-transform: uppercase; }
.quote .who .co { margin-top: 18px; font-family: var(--font-mono); font-size: 11px;
  color: var(--text-faint); letter-spacing: 0.06em; text-transform: uppercase; }

/* ─── Big CTA banner ─── */
.bigcta {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 64px;
  background:
    linear-gradient(180deg, transparent 0%, color-mix(in oklch, var(--accent) 8%, transparent) 100%),
    var(--surface);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center;
  position: relative; overflow: hidden;
}
.bigcta::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.4; pointer-events: none;
  mask-image: radial-gradient(circle at 100% 50%, black, transparent 70%);
}
.bigcta h2 { font-size: clamp(28px, 3vw, 42px); }
.bigcta .actions { display: flex; flex-direction: column; gap: 12px; position: relative; }

/* ─── Form ─── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-mute);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.field input, .field select, .field textarea {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 14px; border-radius: var(--radius);
  font: 14px var(--font-body);
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent-line); background: var(--surface);
}
.field textarea { resize: vertical; min-height: 120px; font-family: var(--font-body); }

/* ──────────────────────────────────────────────────────────
   Motion hero
   ────────────────────────────────────────────────────────── */
.hero-motion-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.3fr;
  gap: 56px;
  align-items: center;
}

.motion-stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
  overflow: hidden;
  min-height: 520px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* Top strip — industry cycler */
.motion-top {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11.5px;
  background: var(--bg-2);
}
.motion-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  position: relative; flex: 0 0 8px;
}
.motion-pulse span {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--accent);
  animation: motionPulse 1.6s ease-out infinite;
}
@keyframes motionPulse {
  0% { transform: scale(0.4); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}
.motion-tag { color: var(--text-mute); letter-spacing: 0.08em; text-transform: uppercase; }
.motion-cycle {
  display: flex; gap: 12px; align-items: baseline;
  flex: 1; min-width: 0;
  animation: cycleIn .55s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes cycleIn {
  0%   { opacity: 0; transform: translateY(8px); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0);   filter: blur(0); }
}
.motion-cycle-name {
  font-family: var(--font-display); font-size: 15px; color: var(--text);
  letter-spacing: 0.04em;
}
.motion-cycle-sub { color: var(--text-mute); letter-spacing: 0.04em; font-size: 11px; }
.motion-dots { display: flex; gap: 5px; }
.motion-dot {
  width: 14px; height: 2px; border-radius: 1px; background: var(--line-strong);
  transition: background .3s ease, width .3s ease;
}
.motion-dot.on { background: var(--accent); width: 22px; }

/* 3-column body */
.motion-3col {
  display: grid; grid-template-columns: 1fr 0.9fr 1.3fr;
  align-items: stretch;
  position: relative;
}
.motion-col {
  position: relative;
  padding: 16px 16px 14px;
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  min-height: 380px;
}
.motion-col:last-child { border-right: 0; }
.motion-col-hd {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.motion-col-hd.center { justify-content: center; }
.motion-col-hd.right { justify-content: flex-end; }
.motion-col-idx { color: var(--text-faint); }
.motion-col-ttl { color: var(--text); font-weight: 500; letter-spacing: 0.12em; }
.motion-col-tag { color: var(--text-mute); }
.motion-col-ft {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--text-mute); letter-spacing: 0.05em; text-transform: uppercase;
  padding-top: 8px; border-top: 1px solid var(--line);
}
.motion-col-ft.center { justify-content: center; }
.meter {
  flex: 1; height: 5px; background: var(--bg-2); border-radius: 3px; overflow: hidden;
  border: 1px solid var(--line);
}
.meter-fill {
  height: 100%;
  background: var(--warn);
  animation: meterBreathe 2.4s ease-in-out infinite;
}
.meter-fill.meter-low { background: var(--signal); animation: none; }
@keyframes meterBreathe {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
.meter-v { color: var(--warn); }

/* BEFORE — paper lane */
.paper-lane {
  position: relative; overflow: hidden;
  height: 100%; min-height: 280px;
}
.paper-noise {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, var(--line) 0.5px, transparent 1px),
    radial-gradient(circle at 70% 60%, var(--line) 0.5px, transparent 1px),
    radial-gradient(circle at 40% 80%, var(--line) 0.5px, transparent 1px);
  background-size: 40px 40px, 50px 50px, 30px 30px;
  opacity: 0.5;
}
.paper-tile {
  position: absolute; left: 8px; right: 8px;
  background:
    repeating-linear-gradient(180deg, transparent 0 11px, color-mix(in oklch, var(--line) 50%, transparent) 11px 12px),
    color-mix(in oklch, var(--bg) 70%, var(--surface));
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 10px 10px;
  font-family: var(--font-mono);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25), 0 1px 0 var(--line-strong);
  will-change: transform, opacity;
}
.paper-tile-k {
  font-size: 9px; color: var(--text-faint);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.paper-tile-t {
  font-size: 11.5px; color: var(--text-dim); margin-top: 2px;
  font-family: var(--font-body);
}
.paper-tile-lines {
  margin-top: 8px; display: flex; flex-direction: column; gap: 3px;
}
.paper-tile-lines span {
  display: block; height: 2px; width: 100%;
  background: color-mix(in oklch, var(--line) 70%, transparent);
  border-radius: 1px;
}
/* Distribute 5 tiles across the lane via nth-child */
.paper-tile:nth-child(1) { top:  4%; }
.paper-tile:nth-child(2) { top: 22%; }
.paper-tile:nth-child(3) { top: 40%; }
.paper-tile:nth-child(4) { top: 58%; }
.paper-tile:nth-child(5) { top: 76%; }

@keyframes paperDrift {
  0%   { transform: translate(0, 0) rotate(var(--r, -2deg)); opacity: 0.7; }
  25%  { transform: translate(3px, -2px) rotate(var(--r, -1deg)); opacity: 1; }
  50%  { transform: translate(-2px, 1px) rotate(var(--r, -3deg)); opacity: 0.85; }
  75%  { transform: translate(2px, 2px) rotate(var(--r, -2deg)); opacity: 1; }
  100% { transform: translate(0, 0) rotate(var(--r, -2deg)); opacity: 0.7; }
}

/* PIPELINE */
.pipe { position: relative; padding: 4px 0; min-height: 320px; }
.pipe-svg { width: 100%; height: 320px; display: block; }
.pipe-foot {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 8px; font-family: var(--font-mono); font-size: 10.5px;
  color: var(--text-mute); letter-spacing: 0.06em;
}
.pipe-thru em { font-style: normal; color: var(--accent); font-weight: 500; }

/* AFTER dashboard */
.after-dash {
  display: flex; flex-direction: column; gap: 12px; min-height: 280px;
}
.after-kpis {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); overflow: hidden;
}
.kpi-row {
  display: grid; grid-template-columns: 1.2fr 1.5fr 0.8fr;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  opacity: 0;
  animation: rowIn .5s ease-out forwards;
}
.kpi-row:last-child { border-bottom: 0; }
@keyframes rowIn {
  0%   { opacity: 0; transform: translateX(8px); }
  100% { opacity: 1; transform: translateX(0); }
}
.kpi-lbl  { font-size: 10.5px; color: var(--text-mute); letter-spacing: 0.05em; text-transform: uppercase; }
.kpi-vals { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.kpi-from { color: var(--text-faint); text-decoration: line-through; }
.kpi-arr  { color: var(--text-mute); }
.kpi-to   { color: var(--text); font-family: var(--font-display); font-size: 16px; letter-spacing: -0.01em; }
.kpi-trend{ font-size: 11px; color: var(--signal); text-align: right; }

.after-bars {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.after-bars-hd {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px;
}
.bar-row {
  display: grid; grid-template-columns: 95px 1fr 56px;
  gap: 10px; align-items: center;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text);
  opacity: 0;
  animation: rowIn .4s ease-out forwards;
}
.bar-n { color: var(--text-dim); }
.bar-track { height: 5px; background: var(--bg); border-radius: 3px; overflow: hidden;
  border: 1px solid var(--line); }
.bar-fill {
  height: 100%; background: var(--accent);
  width: 0; animation: barFill .9s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes barFill { to { width: var(--w, 100%); } }
.bar-s { text-align: right; font-size: 10px; letter-spacing: 0.05em; }

/* Bottom strip — running totals */
.motion-bottom {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.motion-bot-cell {
  padding: 14px 16px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
}
.motion-bot-cell:last-child { border-right: 0; }
.motion-bot-cell .lbl {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-mute);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.motion-bot-cell .val {
  font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em;
  color: var(--text);
}

@media (max-width: 980px) {
  .hero-motion-grid { grid-template-columns: 1fr; }
  .motion-3col { grid-template-columns: 1fr; }
  .motion-col { border-right: 0; border-bottom: 1px solid var(--line); }
  .motion-col:last-child { border-bottom: 0; }
  .motion-stage { min-height: 0; }
  .motion-bottom { grid-template-columns: repeat(2, 1fr); }
}

/* ──────────────────────────────────────────────────────────
   Factory tour — five-floor live scenes
   ────────────────────────────────────────────────────────── */
.factory-tour-section {
  padding: var(--section-y) 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, var(--accent-soft), transparent 70%),
    var(--bg);
}

.ft-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* TOP STRIP */
.ft-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-mute); letter-spacing: 0.05em;
}
.ft-top-left { display: flex; align-items: center; gap: 10px; }
.ft-top-right { justify-self: end; color: var(--accent); }

.ft-rec { width: 10px; height: 10px; border-radius: 50%; background: var(--crit);
  position: relative; flex: 0 0 10px; }
.ft-rec span {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--crit);
  animation: motionPulse 1.6s ease-out infinite;
}

.ft-tabs { display: flex; gap: 4px; padding: 3px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.ft-tab {
  position: relative;
  padding: 6px 12px 8px;
  border: 0; background: transparent; border-radius: 5px;
  display: flex; flex-direction: column; gap: 1px; align-items: center;
  font-family: var(--font-mono); color: var(--text-mute);
  letter-spacing: 0.04em; min-width: 78px;
  transition: color .15s ease, background .15s ease;
}
.ft-tab:hover { color: var(--text); }
.ft-tab.on { color: var(--text); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); }
.ft-tab-idx { font-size: 9px; color: var(--text-faint); }
.ft-tab.on .ft-tab-idx { color: var(--accent); }
.ft-tab-name { font-size: 11px; text-transform: uppercase; }
.ft-tab-bar {
  position: absolute; left: 8px; right: 8px; bottom: 2px;
  height: 2px; background: var(--line); border-radius: 1px; overflow: hidden;
}
.ft-tab-bar-fill {
  display: block; height: 100%; width: 100%;
  background: var(--accent);
  transform-origin: left;
  animation: ftTabBar linear forwards;
}
@keyframes ftTabBar {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

/* BODY */
.ft-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  min-height: 540px;
  position: relative;
}

.ft-ind-label {
  position: absolute;
  top: 20px; left: 24px; z-index: 2;
  display: flex; flex-direction: column; gap: 2px;
  pointer-events: none;
  animation: indLabelIn .8s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes indLabelIn {
  0% { opacity: 0; transform: translateX(-12px); filter: blur(4px); }
  100% { opacity: 1; transform: translateX(0); filter: blur(0); }
}
.ft-ind-name {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: -0.02em;
  color: var(--text);
}
.ft-ind-sub {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-mute); letter-spacing: 0.06em;
}

.ft-scene {
  position: relative;
  background:
    linear-gradient(180deg, var(--bg-2) 0%, var(--surface) 100%);
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.ft-scene::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.25; pointer-events: none;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, black 40%, transparent 100%);
}
/* Canvas wraps SVG + callouts so callouts position relative to the canvas, not the
   whole scene — this lets us shrink the canvas (e.g. for the ethanol approval panel)
   without the callouts drifting off the machinery. */
.ft-scene-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}
.factory-svg {
  position: relative; z-index: 1;
  width: 100%; height: 100%; min-height: 480px;
  animation: sceneIn .65s ease-out both;
}
@keyframes sceneIn {
  0%   { opacity: 0; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}

/* When the scene has the approval-flow panel, split horizontally:
   factory canvas on the left, approval panel on the right — no overlap. */
.ft-scene.has-approval {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr);
  gap: 0;
}
.ft-scene.has-approval .ft-scene-canvas {
  border-right: 1px solid var(--line);
  min-height: 480px;
}

/* Floating callouts on top of SVG */
.ft-callouts { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.ft-callout {
  position: absolute;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(4px);
  border: 1px solid var(--accent-line);
  border-left: 2px solid var(--accent);
  border-radius: 3px;
  padding: 5px 9px 6px;
  font-family: var(--font-mono);
  display: flex; flex-direction: column; gap: 0;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
  white-space: nowrap;
  opacity: 0;
  animation: calloutIn .5s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes calloutIn {
  0%   { opacity: 0; transform: translateY(-6px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.ft-callout::before {
  content: ""; position: absolute; left: -4px; top: 50%; width: 4px; height: 4px;
  border-radius: 50%; background: var(--accent); transform: translateY(-50%);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.ft-callout-k {
  font-size: 9.5px; color: var(--accent);
  letter-spacing: 0.06em; font-weight: 500;
}
.ft-callout-v {
  font-size: 10.5px; color: var(--text); margin-top: 1px;
}

/* SIDE RAIL */
.ft-side {
  display: flex; flex-direction: column;
  padding: 18px;
  gap: 14px;
  background: var(--bg-2);
}
.ft-side-hd {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.ft-side-eyebrow {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-mute);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.ft-kpis { display: flex; flex-direction: column; gap: 8px; }
.ft-kpi {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  align-items: baseline;
  font-family: var(--font-mono);
  animation: kpiIn .55s cubic-bezier(.2,.7,.2,1) both;
}
.ft-kpi:nth-child(2) { animation-delay: 0.15s; }
.ft-kpi:nth-child(3) { animation-delay: 0.30s; }
@keyframes kpiIn {
  0%   { opacity: 0; transform: translateX(10px); }
  100% { opacity: 1; transform: translateX(0); }
}
.ft-kpi-lbl {
  font-size: 10.5px; color: var(--text-mute);
  letter-spacing: 0.05em; text-transform: uppercase;
  grid-column: 1 / -1;
}
.ft-kpi-vals { display: flex; align-items: baseline; gap: 8px; }
.ft-kpi-prev { color: var(--text-faint); font-size: 11px; text-decoration: line-through; }
.ft-kpi-arr  { color: var(--text-mute); font-size: 11px; }
.ft-kpi-now  {
  color: var(--text); font-size: 18px;
  font-family: var(--font-display); letter-spacing: -0.01em;
}
.ft-kpi-trend {
  font-size: 11px; color: var(--signal);
  align-self: end; justify-self: end;
}

.ft-ticker {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-dim); line-height: 1.4;
}
.ft-ticker-line {
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 3px;
  opacity: 0;
  animation: tickerIn .5s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes tickerIn {
  0%   { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}
.ft-ticker-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
  flex: 0 0 5px;
  align-self: center;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* BOTTOM */
.ft-bot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.ft-bot-cell { font-size: 10.5px; color: var(--text-mute); letter-spacing: 0.05em; }

@media (max-width: 980px) {
  .ft-body { grid-template-columns: 1fr; min-height: 0; }
  .ft-scene { border-right: 0; border-bottom: 1px solid var(--line); min-height: 360px; }
  .factory-svg { min-height: 320px; }
  .ft-callout { font-size: 9px; padding: 3px 6px; }
  .ft-top { grid-template-columns: 1fr; gap: 8px; }
  .ft-top-right { justify-self: start; }
  .ft-tabs { overflow-x: auto; }
}

/* ─── MR → PO approval flow (Ethanol scene panel) ─── */
.ft-approval {
  /* Default (when used as floating overlay on small screens) */
  position: relative;
  width: auto;
  align-self: stretch;
  margin: 16px;
  z-index: 3;
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32), 0 0 0 1px var(--accent-soft);
  font-family: var(--font-mono);
  overflow: hidden;
  animation: approvalIn .6s cubic-bezier(.2,.7,.2,1) both;
  display: flex; flex-direction: column;
}
.ft-scene.has-approval .ft-approval {
  margin: 16px;
  align-self: center;
}
@keyframes approvalIn {
  0%   { opacity: 0; transform: translateY(8px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.ft-approval-hd {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  display: flex; flex-direction: column; gap: 4px;
}
.ft-approval-title {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 12.5px; color: var(--text); font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis;
}
.ft-approval-mr { color: var(--text); }
.ft-approval-arr { color: var(--text-mute); font-size: 11px; }
.ft-approval-po { color: var(--accent); }
.ft-approval-meta {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 10.5px; color: var(--text-dim);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.ft-approval-amt { color: var(--signal); font-weight: 500; flex: 0 0 auto; }
.ft-approval-sep { color: var(--text-faint); flex: 0 0 auto; }
.ft-approval-meta > span:last-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ft-approval-cc {
  font-size: 10px; color: var(--text-mute);
  letter-spacing: 0.04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ft-approval-cc-k { color: var(--accent); }

.ft-approval-chain {
  padding: 8px 12px;
  display: flex; flex-direction: column;
  position: relative;
}
/* Vertical line behind nodes */
.ft-approval-chain::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: var(--line);
  z-index: 0;
}
.ft-approval-step {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  padding: 4px 0;
  position: relative;
  z-index: 1;
  align-items: start;
  transition: opacity .25s ease;
  opacity: 0.6;
}
.ft-approval-step.done    { opacity: 1; }
.ft-approval-step.current { opacity: 1; }

.ft-approval-node {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  transition: background .2s ease, border-color .2s ease;
}
.ft-approval-step.done .ft-approval-node {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.ft-approval-step.current .ft-approval-node {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.ft-approval-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--text-faint);
}
.ft-approval-spinner {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ft-approval-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ft-approval-row {
  display: flex; align-items: baseline; gap: 4px;
  font-size: 10.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ft-approval-role { color: var(--text); font-weight: 500; }
.ft-approval-who  { color: var(--text-dim); }
.ft-approval-at   { color: var(--text-faint); margin-left: auto; font-size: 10px; }
.ft-approval-note { font-size: 9.5px; color: var(--text-mute); letter-spacing: 0.02em; }

.ft-approval-ft {
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; color: var(--text-mute);
  letter-spacing: 0.05em;
}
.ft-approval-ft-k { color: var(--text-mute); }
.ft-approval-ft-v { display: flex; align-items: center; gap: 8px; color: var(--text-dim); }
.ft-approval-progress {
  display: inline-block; width: 60px; height: 3px;
  background: var(--line); border-radius: 2px; overflow: hidden;
}
.ft-approval-progress-fill {
  display: block; height: 100%; background: var(--accent);
  transition: width .4s cubic-bezier(.2,.7,.2,1);
}

@media (max-width: 980px) {
  .ft-scene.has-approval { grid-template-columns: 1fr; }
  .ft-scene.has-approval .ft-scene-canvas { border-right: 0; border-bottom: 1px solid var(--line); }
  .ft-approval { margin: 12px; }
}

/* ─── Page hero (interior pages) ─── */
.phero { padding: 88px 0 64px; position: relative; border-bottom: 1px solid var(--line); }
.phero .breadcrumb {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-mute);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 28px;
}
.phero .breadcrumb a:hover { color: var(--text); }
.phero h1 { font-size: clamp(36px, 4.4vw, 64px); max-width: 22ch; }
.phero .lead { margin-top: 24px; }
.phero .phero-side {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: end;
}

/* ─── Tab-like filter rail ─── */
.rail {
  display: flex; gap: 4px; padding: 4px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; width: fit-content;
}
.rail button {
  padding: 8px 14px; border: 0; background: transparent; border-radius: 5px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-dim);
  letter-spacing: 0.04em; transition: background .15s ease, color .15s ease;
}
.rail button:hover { color: var(--text); }
.rail button.active { background: var(--bg-2); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line); }

/* ─── Articles ─── */
.art-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.art {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; background: var(--surface);
  display: flex; flex-direction: column; gap: 14px;
  min-height: 280px; transition: border-color .2s ease;
  cursor: pointer;
}
.art:hover { border-color: var(--accent-line); }
.art-meta { display: flex; gap: 14px;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-mute);
  letter-spacing: 0.05em; text-transform: uppercase; }
.art-meta .cat { color: var(--accent); }
.art h3 { font-size: 22px; text-wrap: balance; }
.art p { font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.art-foot { margin-top: auto; display: flex; justify-content: space-between;
  align-items: center; font-family: var(--font-mono); font-size: 11.5px;
  color: var(--text-faint); padding-top: 16px; border-top: 1px solid var(--line); }
.art-feat {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 0;
  min-height: 360px; padding: 0; overflow: hidden;
}
.art-feat .art-feat-img {
  background:
    repeating-linear-gradient(45deg, var(--line) 0 1px, transparent 1px 12px),
    color-mix(in oklch, var(--accent) 10%, var(--surface-2));
  border-right: 1px solid var(--line);
  position: relative;
}
.art-feat .art-feat-img::before {
  content: "// editorial-spread"; position: absolute;
  top: 20px; left: 24px;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-mute);
  letter-spacing: 0.06em;
}
.art-feat .art-feat-body { padding: 48px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.art-feat h3 { font-size: 32px; line-height: 1.15; }

/* ─── Team / values grid ─── */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.value { padding: 36px 32px 36px 0; border-right: 1px solid var(--line); }
.value:last-child { border-right: 0; padding-right: 0; }
.value .num { font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  letter-spacing: 0.06em; }
.value h3 { margin: 14px 0 12px; font-size: 22px; }
.value p { color: var(--text-dim); line-height: 1.55; font-size: 14.5px; }

.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; }
.tm { background: var(--surface); padding: 24px; display: flex; flex-direction: column; gap: 12px; min-height: 220px; }
.tm .av {
  width: 56px; height: 56px; border-radius: 50%;
  background:
    repeating-linear-gradient(45deg, var(--line) 0 1px, transparent 1px 8px),
    var(--surface-2);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 13px; color: var(--text-dim);
  letter-spacing: 0.06em;
}
.tm .nm { font-size: 16px; }
.tm .rl { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-mute);
  letter-spacing: 0.04em; text-transform: uppercase; }
.tm .bio { font-size: 13px; color: var(--text-dim); line-height: 1.5; margin-top: auto; }

/* ─── Suite anatomy (Products page) ─── */
.suite {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 0;
  overflow: hidden;
  background: var(--surface);
}
.suite + .suite { margin-top: 24px; }
.suite-left { padding: 36px; display: flex; flex-direction: column; gap: 16px;
  border-right: 1px solid var(--line); }
.suite-left .badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  padding: 4px 10px 4px 8px;
  border: 1px solid var(--accent-line); border-radius: 100px;
  background: var(--accent-soft);
  width: fit-content;
}
.suite-left h3 { font-size: 28px; }
.suite-left .desc { color: var(--text-dim); font-size: 14.5px; line-height: 1.55; }
.suite-left .meta {
  margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.suite-left .meta .k { font-family: var(--font-mono); font-size: 10.5px;
  color: var(--text-mute); letter-spacing: 0.06em; text-transform: uppercase; }
.suite-left .meta .v { font-size: 14px; color: var(--text); margin-top: 2px; }

.suite-right {
  padding: 36px; display: grid;
  grid-template-columns: 1fr 1fr; gap: 14px;
  align-content: start;
}
.feat {
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in oklch, var(--bg) 65%, transparent);
  display: flex; flex-direction: column; gap: 8px;
}
.feat .feat-k {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.05em;
  color: var(--text-faint);
}
.feat .feat-t { font-size: 14px; color: var(--text); }
.feat .feat-d { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }

/* ─── Print-style data table ─── */
.tbl {
  width: 100%; border-collapse: collapse;
  font-size: 13.5px;
}
.tbl th, .tbl td {
  text-align: left; padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.tbl th {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-mute);
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500;
}
.tbl td .mono-cell { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }

/* ─── Tweak panel pill on toolbar trigger; hide nav on small screens (keep simple) ─── */
@media (max-width: 980px) {
  .nav { display: none; }
  .hdr-cta .hdr-status { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat:nth-child(2) { border-right: 0; }
  .ind-grid { grid-template-columns: repeat(2, 1fr); }
  .ind-card { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .mod-grid, .art-list { grid-template-columns: 1fr; }
  .s-head { grid-template-columns: 1fr; }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
  .quote, .bigcta { grid-template-columns: 1fr; padding: 32px; }
  .suite { grid-template-columns: 1fr; }
  .suite-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .steps, .values, .logos { grid-template-columns: repeat(2, 1fr); }
  .cs { grid-template-columns: 60px 1fr; gap: 12px; }
  .cs .cs-tagline, .cs .cs-result, .cs .cs-arr { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .phero .phero-side { grid-template-columns: 1fr; }
}
