/* =========================================================================
   Vibrolyx website stylesheet
   Layout: instrument panel. One deep-navy "signal" band carries the live
   oscilloscope, then calm measurement-log sheets on a cool ground. 1160px measure.
   All colours are tokens; light values first, dark values redefine them.
   ========================================================================= */

@font-face {
  font-family: "Vibrolyx Display";
  src: url("../fonts/adventor-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vibrolyx Display";
  src: url("../fonts/adventor-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* colour */
  --ground: #f3f6fa;
  --sheet: #ffffff;
  --text: #13233a;
  --heading: #0b2a4f;
  --muted: #4f6079;
  --rule: #d7e0ea;
  --brand: #0a7cc4;
  --link: #0868a8;
  --btn-bg: #0868a8;
  --btn-bg-hover: #0b2a4f;
  --btn-fg: #ffffff;
  --ink: #0a1f3a;
  --ink-2: #0e284a;
  --ink-rule: #234268;
  --on-ink: #eaf2fb;
  --on-ink-muted: #a3b8cf;
  --signal: #4fb6ff;
  --signal-2: #f3b343;
  --on-signal: #04111f;
  --ok: #13805a;
  --ok-bg: #e2f3eb;
  --warn: #a8650a;
  --warn-bg: #fbefd9;
  --crit: #bf3a30;
  --crit-bg: #fbe4e1;
  --zone-a: rgba(19, 128, 90, 0.10);
  --zone-b: rgba(10, 124, 196, 0.07);
  --zone-c: rgba(222, 150, 30, 0.14);
  --zone-d: rgba(191, 58, 48, 0.12);
  --focus: #0a7cc4;
  --shadow: 0 1px 2px rgba(11, 42, 79, 0.06), 0 8px 24px rgba(11, 42, 79, 0.06);

  /* logo switching (light logo on light surfaces) */
  --logo-on-light: block;
  --logo-on-dark: none;

  /* type */
  --font-display: "Vibrolyx Display", "Avenir Next", "Century Gothic", "Futura", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  --step-4: clamp(2.05rem, 1.3rem + 3.2vw, 3.4rem);

  /* layout */
  --measure: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(56px, 8vw, 104px);
  --radius: 10px;
  --radius-sm: 6px;
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #07111d;
    --sheet: #0d1b2c;
    --text: #d9e4f0;
    --heading: #f1f6fb;
    --muted: #93a6bc;
    --rule: #1e3047;
    --brand: #3fa2e8;
    --link: #6bb8f0;
    --btn-bg: #3fa2e8;
    --btn-bg-hover: #7cc3f4;
    --btn-fg: #04111f;
    --ink: #040c16;
    --ink-2: #0a1a2c;
    --ink-rule: #1b3352;
    --on-ink: #e6eef7;
    --on-ink-muted: #93a8c0;
    --signal: #5cbcff;
    --signal-2: #f3b343;
    --ok: #45c78f;
    --ok-bg: #0d2c21;
    --warn: #f0a63a;
    --warn-bg: #33240b;
    --crit: #f0675d;
    --crit-bg: #3a1714;
    --zone-a: rgba(69, 199, 143, 0.10);
    --zone-b: rgba(63, 162, 232, 0.08);
    --zone-c: rgba(240, 166, 58, 0.13);
    --zone-d: rgba(240, 103, 93, 0.13);
    --focus: #7cc3f4;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --logo-on-light: none;
    --logo-on-dark: block;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #07111d;
  --sheet: #0d1b2c;
  --text: #d9e4f0;
  --heading: #f1f6fb;
  --muted: #93a6bc;
  --rule: #1e3047;
  --brand: #3fa2e8;
  --link: #6bb8f0;
  --btn-bg: #3fa2e8;
  --btn-bg-hover: #7cc3f4;
  --btn-fg: #04111f;
  --ink: #040c16;
  --ink-2: #0a1a2c;
  --ink-rule: #1b3352;
  --on-ink: #e6eef7;
  --on-ink-muted: #93a8c0;
  --signal: #5cbcff;
  --signal-2: #f3b343;
  --ok: #45c78f;
  --ok-bg: #0d2c21;
  --warn: #f0a63a;
  --warn-bg: #33240b;
  --crit: #f0675d;
  --crit-bg: #3a1714;
  --zone-a: rgba(69, 199, 143, 0.10);
  --zone-b: rgba(63, 162, 232, 0.08);
  --zone-c: rgba(240, 166, 58, 0.13);
  --zone-d: rgba(240, 103, 93, 0.13);
  --focus: #7cc3f4;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --logo-on-light: none;
  --logo-on-dark: block;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* paints the phone status-bar band in the header colour */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--sheet);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--heading); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; color: var(--heading); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.3; }
p { margin: 0; }
.prose { max-width: 62ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--btn-bg); color: var(--btn-fg); padding: 10px 14px; border-radius: var(--radius-sm);
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border-radius: var(--radius-sm);
  font: 600 var(--step-0)/1.2 var(--font-body);
  text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: var(--btn-bg-hover); color: var(--btn-fg); }
.btn-ghost { background: transparent; color: var(--heading); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--brand); color: var(--heading); }
.on-ink .btn-ghost { color: var(--on-ink); border-color: var(--ink-rule); }
.on-ink .btn-ghost:hover { border-color: var(--signal); color: var(--on-ink); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--sheet);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 34px; width: auto; }
.logo-for-light { display: var(--logo-on-light); }
.logo-for-dark { display: var(--logo-on-dark); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  padding: 8px 12px; border-radius: var(--radius-sm);
}
.nav a:hover { color: var(--heading); background: var(--ground); }
.nav a[aria-current="page"] { color: var(--heading); box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.lang {
  display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius-sm); overflow: hidden;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
}
.lang a, .lang span { padding: 7px 10px; text-decoration: none; line-height: 1; }
.lang a { color: var(--muted); }
.lang a:hover { color: var(--heading); background: var(--ground); }
.lang span { background: var(--heading); color: var(--sheet); }
.header-actions .btn { min-height: 40px; padding: 8px 16px; font-size: 0.95rem; }
.menu-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: var(--radius-sm);
  border: 1px solid var(--rule); background: var(--sheet); color: var(--heading); cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle svg { width: 22px; height: 22px; }

@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }
  .nav-panel {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--sheet); border-bottom: 1px solid var(--rule);
    padding: 12px max(var(--gutter), env(safe-area-inset-right, 0px)) 20px max(var(--gutter), env(safe-area-inset-left, 0px));
    box-shadow: var(--shadow);
  }
  .nav-panel.open { display: block; }
  .nav { flex-direction: column; align-items: stretch; margin: 0 0 12px; gap: 0; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brand); padding-left: 12px; }
  .header-actions { justify-content: space-between; }
}
@media (min-width: 961px) {
  .nav-panel { display: flex; align-items: center; gap: 20px; margin-left: auto; }
}

/* ---------- hero (signal band) ---------- */
.on-ink { background: var(--ink); color: var(--on-ink); }
.on-ink h1, .on-ink h2, .on-ink h3 { color: var(--on-ink); }
.on-ink .eyebrow { color: var(--signal); }
.on-ink .muted { color: var(--on-ink-muted); }
.on-ink a:not(.btn) { color: var(--signal); }

.hero { padding-block: clamp(48px, 7vw, 88px) clamp(48px, 6vw, 80px); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero-copy .lead { font-size: var(--step-1); color: var(--on-ink-muted); max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.on-ink .btn-primary { background: var(--signal); color: var(--on-signal); }
.on-ink .btn-primary:hover { background: var(--on-ink); color: var(--on-signal); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 0.92rem; color: var(--on-ink-muted); }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }

/* scope panel */
.scope {
  margin: 0;
  background: var(--ink-2); border: 1px solid var(--ink-rule); border-radius: var(--radius);
  overflow: hidden; min-width: 0;
}
.scope-head {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--ink-rule);
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--on-ink-muted);
}
.scope-head strong { color: var(--on-ink); font-weight: 600; }
.live { display: inline-flex; align-items: center; gap: 8px; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 0 var(--signal); animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(79, 182, 255, .6); } 100% { box-shadow: 0 0 0 10px rgba(79, 182, 255, 0); } }
.scope canvas { display: block; width: 100%; height: 280px; }
.readouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink-rule); }
.readout { padding: 12px 16px; border-left: 1px solid var(--ink-rule); min-width: 0; }
.readout:first-child { border-left: 0; }
.readout dt { font-size: 0.72rem; color: var(--on-ink-muted); letter-spacing: 0.04em; }
.readout dd { margin: 2px 0 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 1.05rem; color: var(--on-ink); white-space: nowrap; }
.readout dd small { font-size: 0.75rem; color: var(--on-ink-muted); margin-left: 3px; }
.scope-foot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--ink-rule); font-size: 0.78rem; color: var(--on-ink-muted); }

/* ---------- status chips (semantic colours) ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-ok { color: var(--ok); background: var(--ok-bg); }
.chip-warn { color: var(--warn); background: var(--warn-bg); }
.chip-crit { color: var(--crit); background: var(--crit-bg); }

/* ---------- sections ---------- */
.section { padding-block: var(--section); }
.section + .section { border-top: 1px solid var(--rule); }
.section-sheet { background: var(--sheet); }
.section.section-tight { padding-block: clamp(36px, 5vw, 56px) var(--section); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 4vw, 48px); max-width: 760px; }
.section-head p { color: var(--muted); font-size: var(--step-1); }

/* approach: P-F curve + three strategies */
.approach-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.figure { margin: 0; min-width: 0; }
.figure figcaption { margin-top: 12px; font-size: var(--step--1); color: var(--muted); max-width: 60ch; }
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chart-scroll svg { display: block; width: 100%; min-width: 540px; height: auto; }
.chart-scroll svg.pf-chart { min-width: 400px; }
.strategies { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.strategy { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 4px 20px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.strategy h3 { font-size: var(--step-1); }
.strategy .tag { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.strategy p { color: var(--muted); }
.strategy.is-ours {
  background: var(--sheet); border: 1.5px solid var(--brand); border-radius: var(--radius);
  padding: 20px; margin-top: 12px; box-shadow: var(--shadow);
}
.strategy.is-ours .tag { color: var(--brand); }
.strategy.is-ours p { color: var(--text); }

/* P-F curve svg */
.pf-axis { stroke: var(--muted); stroke-width: 1.2; fill: none; }
.pf-grid { stroke: var(--rule); stroke-width: 1; }
.pf-curve { stroke: var(--heading); stroke-width: 3; fill: none; stroke-linecap: round; }
.pf-window { fill: var(--zone-b); }
.pf-window-edge { stroke: var(--brand); stroke-width: 1.2; stroke-dasharray: 4 4; }
.pf-dot { fill: var(--sheet); stroke: var(--heading); stroke-width: 2.5; }
.pf-dot-ours { fill: var(--brand); stroke: var(--brand); }
.pf-dot-fail { fill: var(--crit); stroke: var(--crit); }
.pf-label { fill: var(--text); font: 600 13px var(--font-body); }
.pf-sub { fill: var(--muted); font: 12px var(--font-body); }
.pf-ours { fill: var(--brand); font: 700 13px var(--font-body); }
.pf-axis-label { fill: var(--muted); font: 12px var(--font-mono); letter-spacing: 0.06em; }
.pf-window-label { fill: var(--brand); font: 600 12px var(--font-mono); letter-spacing: 0.04em; }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step { position: relative; padding: 28px 24px 0 0; border-top: 2px solid var(--rule); counter-increment: step; display: grid; gap: 10px; align-content: start; min-width: 0; }
.step::before {
  content: counter(step);
  position: absolute; top: -17px; left: 0;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ground); border: 2px solid var(--brand); color: var(--brand);
  font: 700 0.9rem var(--font-mono);
}
.section-sheet .step::before { background: var(--sheet); }
.step .step-icon { width: 40px; height: 40px; color: var(--brand); margin-top: 6px; }
.step p { color: var(--muted); }
.step-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }

/* dashboard mock */
.dash-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: end; margin-bottom: 36px; }
.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 0; padding: 0; list-style: none; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.feature-list svg { width: 18px; height: 18px; color: var(--brand); flex: none; margin-top: 4px; }
.dash {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.dash-bar {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  padding: 12px 18px; border-bottom: 1px solid var(--rule); background: var(--ground);
  font-size: 0.85rem; color: var(--muted);
}
.dash-bar .dots { display: inline-flex; gap: 6px; }
.dash-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); display: block; }
.dash-bar strong { color: var(--heading); font-weight: 600; }
.dash-body { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.assets { margin: 0; padding: 8px 0; list-style: none; border-right: 1px solid var(--rule); }
.asset { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 18px; border-left: 3px solid transparent; }
.asset.is-selected { background: var(--ground); border-left-color: var(--brand); }
.asset .tagno { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600; color: var(--heading); }
.asset .name { font-size: 0.86rem; color: var(--muted); grid-column: 1; }
.asset .val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 0.86rem; color: var(--text); text-align: right; }
.asset .chip { grid-row: 1; grid-column: 2; justify-self: end; }
.dash-main { padding: 18px; min-width: 0; display: grid; gap: 16px; }
.dash-title { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.dash-title h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; }
.dash-title span { font-size: 0.82rem; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.kpi { padding: 12px 14px; border-left: 1px solid var(--rule); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi dt { font-size: 0.75rem; color: var(--muted); }
.kpi dd { margin: 2px 0 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 1.1rem; color: var(--heading); font-weight: 600; }
.kpi dd.warn { color: var(--warn); }
.dash-note { font-size: var(--step--1); color: var(--muted); margin-top: 14px; }

/* trend chart svg */
.ch-zone-a { fill: var(--zone-a); }
.ch-zone-b { fill: var(--zone-b); }
.ch-zone-c { fill: var(--zone-c); }
.ch-zone-d { fill: var(--zone-d); }
.ch-grid { stroke: var(--rule); stroke-width: 1; }
.ch-limit { stroke: var(--crit); stroke-width: 1.2; stroke-dasharray: 5 4; }
.ch-limit-c { stroke: var(--warn); stroke-width: 1.2; stroke-dasharray: 5 4; }
.ch-tick { fill: var(--muted); font: 11px var(--font-mono); }
.ch-zone-label { fill: var(--muted); font: 700 11px var(--font-mono); }
.ch-line { stroke: var(--heading); stroke-width: 1.8; fill: none; stroke-linejoin: round; }
.ch-band { fill: var(--brand); opacity: 0.16; }
.ch-fc { stroke: var(--brand); stroke-width: 2.2; fill: none; stroke-dasharray: 6 5; }
.ch-now { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.ch-now-label { fill: var(--muted); font: 600 11px var(--font-mono); }
.ch-dot { fill: var(--heading); stroke: var(--sheet); stroke-width: 2; }
.ch-hit { fill: var(--crit); stroke: var(--sheet); stroke-width: 2; }
.ch-ann { fill: var(--crit); font: 600 12px var(--font-body); }
.ch-ann-sub { fill: var(--muted); font: 11px var(--font-body); }
.ch-leader { stroke: var(--crit); stroke-width: 1; fill: none; }

/* applications */
.apps-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px clamp(28px, 5vw, 64px); align-items: start; margin-bottom: clamp(32px, 4vw, 48px); }
.machines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.machines li { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); font-weight: 500; color: var(--heading); min-width: 0; }
.machines svg { width: 28px; height: 28px; color: var(--brand); flex: none; }
.industries { display: grid; gap: 12px; }
.industries h3 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pills li { padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; font-size: 0.88rem; color: var(--text); background: var(--sheet); }
.faults-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.faults { width: 100%; border-collapse: collapse; min-width: 480px; }
.faults caption { text-align: left; padding: 16px 18px 6px; font-weight: 600; color: var(--heading); }
.faults th, .faults td { text-align: left; padding: 12px 18px; border-top: 1px solid var(--rule); vertical-align: top; }
.faults thead th { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; border-top: 0; }
.faults tbody th { font-weight: 600; color: var(--heading); white-space: nowrap; }
.faults td { color: var(--muted); font-size: 0.95rem; }
.faults td.sig { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text); white-space: nowrap; }

/* CTA band */
.cta-band { padding-block: clamp(56px, 7vw, 88px); }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px 48px; align-items: center; }
.cta-inner p { color: var(--on-ink-muted); font-size: var(--step-1); margin-top: 14px; max-width: 56ch; }
.cta-side { display: grid; gap: 14px; justify-items: start; }
.cta-mail { font-family: var(--font-mono); font-size: 0.95rem; color: var(--on-ink-muted); }

/* ---------- contact page ---------- */
.page-head { padding-block: clamp(44px, 6vw, 72px); }
.page-head .lead { color: var(--on-ink-muted); font-size: var(--step-1); max-width: 58ch; margin-top: 16px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(22px, 3.5vw, 36px); min-width: 0; }
.panel-main { box-shadow: var(--shadow); display: grid; gap: 18px; }
.mail-address {
  font-family: var(--font-display); font-weight: 700; color: var(--heading);
  font-size: clamp(1.4rem, 1rem + 2.4vw, 2.3rem); line-height: 1.15;
  overflow-wrap: anywhere; user-select: all;
}
.mail-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.copy-status { font-size: var(--step--1); color: var(--ok); font-weight: 600; }
.copy-status:empty { display: none; }
.hint { font-size: var(--step--1); color: var(--muted); max-width: 60ch; }
.topics { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--rule); }
.topics h2 { font-family: var(--font-body); font-size: var(--step-0); font-weight: 600; }
.topic-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.topic-links a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--rule); color: var(--heading); text-decoration: none; font-size: 0.92rem; font-weight: 500;
}
.topic-links a:hover { border-color: var(--brand); background: var(--ground); }
.topic-links svg { width: 15px; height: 15px; color: var(--brand); }
.details { display: grid; gap: 0; margin: 0; }
.details div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.details div:first-child { padding-top: 0; }
.details dt { font-size: 0.85rem; color: var(--muted); }
.details dd { margin: 0; color: var(--heading); font-weight: 500; overflow-wrap: anywhere; }
.panel h2.panel-title { font-family: var(--font-body); font-size: var(--step-1); font-weight: 600; margin-bottom: 16px; }
.todo { color: var(--muted); font-style: italic; font-weight: 400; border-bottom: 1px dashed var(--muted); }
.next-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; align-items: start; }
.checklist { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist svg { width: 18px; height: 18px; color: var(--brand); flex: none; margin-top: 4px; }
.timeline { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; counter-reset: t; }
.timeline li { counter-increment: t; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; padding-bottom: 18px; position: relative; }
.timeline li::before {
  content: counter(t); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--brand); color: var(--brand); font: 700 0.8rem var(--font-mono); background: var(--sheet);
}
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--rule); }
.timeline strong { display: block; color: var(--heading); }
.timeline span { color: var(--muted); font-size: 0.95rem; }

/* ---------- footer ---------- */
.site-footer { padding-block: 56px 28px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.footer-grid img { height: 32px; width: auto; }
.footer-grid p { color: var(--on-ink-muted); margin-top: 14px; max-width: 40ch; font-size: 0.95rem; }
.footer-grid h2 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-ink-muted); font-weight: 600; margin-bottom: 12px; }
.footer-links { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.site-footer a { color: var(--on-ink); text-decoration: none; }
.site-footer a:hover { color: var(--signal); text-decoration: underline; }
.site-footer .todo { color: var(--on-ink-muted); border-color: var(--on-ink-muted); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--ink-rule); font-size: 0.85rem; color: var(--on-ink-muted); }

/* ---------- 404 ---------- */
.notfound { padding-block: clamp(64px, 10vw, 120px); display: grid; gap: 18px; justify-items: start; }
.notfound .code { font-family: var(--font-mono); color: var(--signal); }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .hero-grid, .approach-grid, .apps-grid, .dash-intro, .cta-inner { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
  .dash-body { grid-template-columns: minmax(0, 1fr); }
  .assets { border-right: 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .contact-grid, .next-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { padding-right: 0; }
  .readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout:nth-child(3) { border-left: 0; }
  .readout:nth-child(n+3) { border-top: 1px solid var(--ink-rule); }
  .scope canvas { height: 230px; }
  .strategy { grid-template-columns: minmax(0, 1fr); }
  .feature-list, .machines { grid-template-columns: minmax(0, 1fr); }
  .assets { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kpi { border-left: 0; border-top: 1px solid var(--rule); }
  .kpi:first-child { border-top: 0; }
  .details div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .brand img { height: 28px; }
  .mail-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live::before { animation: none; }
  * { transition: none !important; }
}
