/* CiviSight - site styles
 * Editorial, light, with two dark instrument panels: the live monitoring view in the hero and
 * the digital twin chapter. One typeface (Instrument Sans), real photography, thin rules as the
 * only structural device, the brand teal used for signals and selection.
 */

:root {
  --ink: #0B1A2E;
  --muted: #5A6675;
  --rule: #DADFE3;
  --paper: #FFFFFF;
  --tint: #F4F6F6;
  --teal: #0799A6;
  --teal-ink: #05707A;
  --focus: #05707A;

  /* dark panels */
  --d-bg: #0B1A2E;
  --d-bg2: #10223A;
  --d-text: #F3F5F7;
  --d-muted: #9AA7B5;
  --d-rule: rgba(255, 255, 255, 0.14);
  --signal: #4FD3DD;
  --amber: #F2B33D;

  --font: 'Instrument Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --text: 1.0625rem;
  --lead: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --h1: clamp(2.375rem, 1.2rem + 3.8vw, 4.75rem);
  --h2: clamp(1.75rem, 1.25rem + 1.6vw, 2.75rem);
  --h3: 1.25rem;

  --gutter: clamp(20px, 4vw, 56px);
  --wrap: 1360px;
  --header-h: 72px;
  --section-y: clamp(72px, 9vw, 128px);
  --r: 4px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: var(--text); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: var(--h1); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: var(--h2); letter-spacing: -0.02em; }
h3 { font-size: var(--h3); line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; }
a, button, input, textarea { touch-action: manipulation; -webkit-tap-highlight-color: rgba(7, 153, 166, 0.15); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 2px; }
.live :focus-visible, .twin :focus-visible { outline-color: var(--signal); }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: var(--r); font-weight: 500; }
.skip-link:focus { top: 16px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.link { color: var(--teal-ink); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.link:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: var(--r); font-weight: 500; font-size: 1rem; line-height: 1; white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: #22324A; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-bar { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); margin-right: auto; }
.brand svg { height: 30px; width: auto; }
.brand-teal { fill: var(--teal); }
.site-nav { display: flex; gap: 2px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 11px; font-size: 0.9375rem; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color 150ms ease; }
.site-nav a:hover, .site-nav a.is-current { color: var(--ink); }
.site-nav a.is-current { box-shadow: inset 0 -2px 0 var(--teal); }
.header-tools { display: flex; align-items: center; gap: 20px; }
.lang { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.9375rem; }
.lang button { min-width: 36px; min-height: 44px; font-weight: 500; color: var(--muted); }
.lang button:hover { color: var(--ink); }
.lang button.is-active { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--teal); }
.header-cta { min-height: 42px; padding: 0 18px; font-size: 0.9375rem; }
.menu-toggle { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.menu-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform 200ms ease; }
.menu-open .menu-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(48px, 6vw, 96px); }
.hero h1 { max-width: 16ch; }
.hero-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px 48px; align-items: end; margin-top: clamp(24px, 3vw, 40px); padding-bottom: clamp(32px, 4vw, 56px); }
.hero-lead { font-size: var(--lead); line-height: 1.5; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; align-items: center; gap: 28px; justify-content: flex-end; flex-wrap: wrap; }
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero-row { animation: rise 800ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-row { animation-delay: 120ms; }
  .live { animation: rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) 220ms both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ---------- live monitoring view ---------- */
.live { background: var(--d-bg); color: var(--d-text); padding-block: 22px 32px; }
.live-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-bottom: 18px; border-bottom: 1px solid var(--d-rule); }
.live-tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--d-rule); border-radius: var(--r); }
.live-tabs [role="tab"] { min-height: 38px; padding: 0 16px; border-radius: 2px; color: var(--d-muted); font-weight: 500; font-size: 0.9375rem; transition: background-color 150ms ease, color 150ms ease; }
.live-tabs [role="tab"]:hover { color: var(--d-text); }
.live-tabs [role="tab"][aria-selected="true"] { background: var(--d-text); color: var(--d-bg); }
.live-facts { display: flex; align-items: center; gap: 10px; flex: 1 1 240px; min-width: 0; font-size: 0.875rem; color: var(--d-muted); margin-right: auto; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(79, 211, 221, 0.18); flex: none; }
.motion-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--d-rule); border-radius: var(--r); color: var(--d-text); font-size: 0.875rem; font-weight: 500; transition: border-color 150ms ease; }
.motion-toggle:hover { border-color: rgba(255, 255, 255, 0.5); }
.motion-toggle svg { width: 12px; height: 12px; }
.motion-toggle .icon-play, .motion-toggle.is-paused .icon-pause { display: none; }
.motion-toggle.is-paused .icon-play { display: block; }
.motion-toggle[hidden] { display: none; }

.live-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px 48px; align-items: start; padding-top: 24px; }
.live-drawing { margin: 0; }
.live-drawing svg { width: 100%; height: auto; overflow: visible; }
.live-drawing figcaption { margin-top: 10px; font-size: 0.875rem; color: var(--d-muted); }
.live-hint { color: var(--signal); }
/* linework */
.lk { fill: none; stroke: rgba(255, 255, 255, 0.82); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.lk-thin { stroke: rgba(255, 255, 255, 0.4); stroke-width: 1; }
.lk-fill { fill: #22324A; stroke: rgba(255, 255, 255, 0.5); stroke-width: 1; }
.lk-bearing { fill: var(--signal); opacity: 0.8; }
.lk-deckfill { fill: rgba(255, 255, 255, 0.05); }
.lk-corefill { fill: rgba(255, 255, 255, 0.07); }
.ltruck rect { fill: var(--d-bg); stroke: var(--amber); stroke-width: 1.4; }
.ltruck circle { fill: var(--d-bg); stroke: var(--amber); stroke-width: 1.4; }
.lwind { fill: none; stroke: rgba(255, 255, 255, 0.6); stroke-width: 1.2; }
.ld line { stroke: rgba(255, 255, 255, 0.35); stroke-width: 1; }
.ld text { font-family: var(--font); font-size: 11px; fill: var(--d-muted); }
/* sensors */
.ls { cursor: pointer; }
.ls-halo { fill: rgba(79, 211, 221, 0.12); stroke: rgba(79, 211, 221, 0.45); stroke-width: 1; transition: fill 150ms ease; }
.ls-dot { fill: var(--signal); }
.ls-label { font-family: var(--font); font-size: 11px; font-weight: 500; fill: var(--d-muted); }
.ls:hover .ls-halo, .ls:focus-visible .ls-halo { fill: rgba(79, 211, 221, 0.3); }
.ls.is-on .ls-halo { fill: rgba(79, 211, 221, 0.34); stroke: var(--signal); }
.ls.is-on .ls-label { fill: var(--d-text); }
@media (prefers-reduced-motion: no-preference) {
  .ls-halo { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 0%, 100% { stroke-opacity: 0.45; } 50% { stroke-opacity: 1; } }
}
/* channel panel */
.live-panel { border-left: 1px solid var(--d-rule); padding-left: 32px; min-width: 0; }
.live-ch-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.live-ch-id { font-size: 1.25rem; font-weight: 500; letter-spacing: 0.02em; }
.live-ch-type { font-size: 0.875rem; color: var(--d-muted); }
.live-ch-loc { margin-top: 4px; font-size: 0.9375rem; color: var(--d-muted); }
.live-value { margin-top: 16px; font-size: clamp(2rem, 1.4rem + 1.6vw, 2.75rem); font-weight: 500; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.live-unit { font-size: 1rem; font-weight: 400; color: var(--d-muted); letter-spacing: 0; }
#live-trace { width: 100%; height: auto; margin-top: 16px; }
.lt-line { fill: none; stroke: var(--signal); stroke-width: 1.6; stroke-linejoin: round; }
.lt-grid line { stroke: var(--d-rule); stroke-width: 1; }
.lt-text { font-family: var(--font); font-size: 10px; fill: var(--d-muted); }
.live-spec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--d-rule); }
.live-spec dt { font-size: 0.75rem; color: var(--d-muted); }
.live-spec dd { font-size: 0.875rem; margin-top: 2px; }
.live-list-label { margin-top: 22px; font-size: 0.75rem; color: var(--d-muted); }
.live-list { margin-top: 6px; display: grid; }
.live-list button {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 40px;
  padding: 0 8px; margin: 0 -8px; border-radius: 3px; text-align: left; font-size: 0.875rem; color: var(--d-muted);
  border-top: 1px solid var(--d-rule); transition: background-color 150ms ease, color 150ms ease;
}
.live-list li:first-child button { border-top: 0; }
.live-list button:hover { color: var(--d-text); background: rgba(255, 255, 255, 0.04); }
.live-list button.is-on { color: var(--d-text); }
.lc-id { font-weight: 500; letter-spacing: 0.02em; }
.live-list button.is-on .lc-id { color: var(--signal); }
.lc-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-val { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- photography ---------- */
.bleed { margin: 0; }
.bleed img { width: 100%; aspect-ratio: 16 / 9; max-height: 78vh; object-fit: cover; background: #E6EAEC; }
.bleed figcaption, .photo figcaption { margin-top: 12px; font-size: 0.875rem; color: var(--muted); }
.photo { margin: 0; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #E6EAEC; border-radius: 2px; }

/* ---------- sections ---------- */
.section { border-top: 1px solid var(--rule); padding-block: var(--section-y); }
.section-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px 48px; align-items: start; }
.section-label { font-size: 0.9375rem; font-weight: 500; color: var(--muted); padding-top: 0.35em; }
.section h2 + .intro, .section h2 + .steps, .section h2 + .sector-list { margin-top: 24px; }
.intro { font-size: var(--lead); line-height: 1.5; max-width: 34em; }
.intro + .cols-4, .intro + .schedule, .intro + .principles { margin-top: clamp(40px, 5vw, 64px); }
.aside { margin-top: 40px; color: var(--muted); max-width: 44em; }
.cols-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.cols-4 > div { border-top: 1px solid var(--ink); padding-top: 18px; }
.cols-4 h3 { margin-bottom: 10px; }
.cols-4 p { color: var(--muted); font-size: 1rem; }

/* APCE feature */
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px 56px; align-items: center; }
.feature-text h2 { margin-bottom: 20px; max-width: 20ch; }
.feature-text p { max-width: 36em; }
.feature-text p + p { margin-top: 16px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.facts > div { border-top: 1px solid var(--ink); padding-top: 12px; }
.facts dt { font-size: 1.375rem; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.facts dd { margin-top: 4px; font-size: 0.875rem; color: var(--muted); line-height: 1.45; }

/* schedule */
.schedule { width: 100%; }
.schedule thead th { text-align: left; font-size: 0.875rem; font-weight: 500; color: var(--muted); padding: 0 20px 12px 0; border-bottom: 1px solid var(--ink); }
.schedule tbody th, .schedule td { text-align: left; vertical-align: top; padding: 18px 20px 18px 0; border-bottom: 1px solid var(--rule); font-weight: 400; }
.schedule tbody th { font-weight: 500; width: 20%; }
.schedule td:nth-of-type(1) { width: 27%; }
.schedule td:nth-of-type(2) { color: var(--muted); width: 28%; }
.schedule td.spec { color: var(--ink); font-size: 0.9375rem; font-variant-numeric: tabular-nums; padding-right: 0; }

/* statement */
.statement-block { border-top: 1px solid var(--rule); }
.statement { padding-block: var(--section-y); }
.statement-text { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3.25rem); font-weight: 500; line-height: 1.12; letter-spacing: -0.02em; max-width: 22ch; text-wrap: balance; }
.statement-sub { margin-top: 24px; font-size: var(--lead); line-height: 1.5; color: var(--muted); max-width: 32em; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.steps li { border-top: 1px solid var(--ink); padding-top: 18px; counter-increment: step; }
.steps li::before { content: counter(step); display: block; font-size: 0.875rem; color: var(--muted); margin-bottom: 28px; font-variant-numeric: tabular-nums; }
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: 1rem; }

/* sectors */
.sector-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.sector-list > div { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.sector-list > div:nth-child(-n+2) { border-top: 1px solid var(--ink); }
.sector-list dt { font-weight: 500; font-size: var(--h3); line-height: 1.3; }
.sector-list dd { margin-top: 6px; color: var(--muted); font-size: 1rem; }
.photo-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: clamp(40px, 5vw, 64px); }

/* about */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.principles > div { border-top: 1px solid var(--ink); padding-top: 18px; }
.principles dt { font-weight: 500; font-size: var(--h3); line-height: 1.3; margin-bottom: 8px; }
.principles dd { color: var(--muted); font-size: 1rem; }

/* ---------- digital twin chapter (dark, interactive) ---------- */
.twin { background: var(--d-bg); color: var(--d-text); padding-block: var(--section-y); }
.twin .section-label { color: var(--d-muted); }
.twin h2 { color: var(--d-text); max-width: 20ch; }
.twin .intro { color: var(--d-muted); }
.twin-step { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 48px; align-items: start; margin-top: clamp(56px, 7vw, 96px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--d-rule); }
.twin-text { display: grid; gap: 14px; align-content: start; }
.twin-num { font-size: 0.875rem; color: var(--d-muted); font-variant-numeric: tabular-nums; }
.twin-text h3 { color: var(--d-text); font-size: 1.5rem; }
.twin-text > p:not(.twin-num) { color: var(--d-muted); max-width: 36em; }
.twin-figure { margin: 0; }
.twin-figure svg { width: 100%; height: auto; display: block; overflow: visible; }
.twin-figure figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 14px; font-size: 0.875rem; color: var(--d-muted); }
.twin-figure .key { display: inline-flex; align-items: center; gap: 8px; }
.twin-figure .note { margin-left: auto; }
.sw { display: inline-block; width: 20px; height: 0; border-top: 2px solid #fff; }
.sw-model { height: 10px; border: 0; background: linear-gradient(90deg, #1E6FD9, #1AA3A3, #3DA35D, #F2D13D, #F28C28, #E0392B); }
.sw-sensor { width: 9px; height: 9px; border: 0; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgba(79, 211, 221, 0.25); }
.sw-model-line { border-top-style: dashed; border-top-color: var(--signal); }
.sw-residual { height: 10px; border: 0; background: rgba(224, 161, 27, 0.35); }
.sw-band { height: 10px; border: 0; background: rgba(79, 211, 221, 0.22); }
.sw-limit { border-top: 1.5px dashed var(--amber); }

/* controls */
.controls { display: grid; gap: 14px; margin-top: 6px; }
.controls label { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 0.9375rem; color: var(--d-text); }
.controls label > span { grid-column: 1; }
.controls output { grid-column: 2; grid-row: 1; font-variant-numeric: tabular-nums; color: var(--signal); font-weight: 500; white-space: nowrap; }
.controls input[type="range"] { grid-column: 1 / -1; width: 100%; height: 28px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
.controls input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: rgba(255, 255, 255, 0.28); border-radius: 1px; }
.controls input[type="range"]::-moz-range-track { height: 2px; background: rgba(255, 255, 255, 0.28); border-radius: 1px; }
.controls input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -8px; border-radius: 50%; background: var(--signal); border: 3px solid var(--d-bg); box-shadow: 0 0 0 1px var(--signal); }
.controls input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--signal); border: 3px solid var(--d-bg); box-shadow: 0 0 0 1px var(--signal); }
.controls input[type="range"]:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; border-radius: 4px; }
.readouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--d-rule); }
.readouts dt { font-size: 0.8125rem; color: var(--d-muted); line-height: 1.35; }
.readouts dt small { display: block; font-size: 0.75rem; color: rgba(154, 167, 181, 0.8); }
.readouts dd { margin-top: 3px; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--d-text); }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--d-rule); border-radius: var(--r); margin-top: 6px; }
.seg button { min-height: 38px; padding: 0 14px; border-radius: 2px; color: var(--d-muted); font-size: 0.875rem; font-weight: 500; transition: background-color 150ms ease, color 150ms ease; }
.seg button:hover { color: var(--d-text); }
.seg button[aria-pressed="true"] { background: var(--d-text); color: var(--d-bg); }
.cal-params { display: grid; gap: 8px; }
.cal-params li { --fill: 0%; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; font-size: 0.9375rem; border-bottom: 1px solid var(--d-rule); background: linear-gradient(90deg, rgba(79, 211, 221, 0.7) 0 var(--fill), transparent var(--fill)) bottom / 100% 1px no-repeat; }
.cal-params b { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--signal); }

/* FEM figures */
.fem-cell { stroke: rgba(11, 26, 46, 0.9); stroke-width: 0.8; }
.fem-core { stroke-width: 1.6; }
.fem-outline { fill: none; stroke: rgba(255, 255, 255, 0.35); stroke-width: 1; stroke-dasharray: 4 4; }
.fem-pier { fill: #22324A; }
.fem-ground { stroke: rgba(255, 255, 255, 0.25); stroke-width: 1; }
.fem-sensor-dot { fill: var(--signal); }
.fem-sensor-tie { stroke: var(--signal); stroke-width: 1; }
.fem-arrow { fill: none; stroke: rgba(255, 255, 255, 0.6); stroke-width: 1.2; }
.fem-load .fem-arrow { stroke: var(--amber); stroke-width: 1.6; }
.fem-text { font-family: var(--font); font-size: 12px; fill: var(--d-muted); }
.fem-load .fem-text { fill: var(--amber); font-weight: 500; }
.fem-pred { fill: var(--signal); font-variant-numeric: tabular-nums; }

/* 3D FEM render */
.f3-grid line { stroke: rgba(255, 255, 255, 0.09); stroke-width: 1; }
.f3-pier { fill: #2A3A52; stroke: rgba(255, 255, 255, 0.18); stroke-width: 0.6; }
.f3-cell { stroke-width: 0.7; stroke-linejoin: round; }
.f3-plane { fill: rgba(255, 255, 255, 0.025); }
.f3-shadow { fill: rgba(0, 0, 0, 0.38); }
.f3-cap { fill: #34465F; }
.f3-parapet { fill: #5C6B80; stroke: rgba(11, 26, 46, 0.6); stroke-width: 0.5; }
.f3-parapet-top { fill: #8392A6; }
.f3-truck { stroke: var(--amber); stroke-width: 1; opacity: 0.85; }
.f3-bar { stroke: rgba(255, 255, 255, 0.35); stroke-width: 0.6; }
.f3-leader { stroke: rgba(255, 255, 255, 0.6); stroke-width: 1; }
.f3-label { fill: #fff; font-weight: 500; paint-order: stroke; stroke: #0B1A2E; stroke-width: 3px; stroke-linejoin: round; }
.f3-load { fill: var(--amber); }
#fem-figure { cursor: grab; touch-action: pan-y; }
#fem-figure.is-dragging { cursor: grabbing; }

/* charts */
.ch-axis { stroke: rgba(255, 255, 255, 0.4); stroke-width: 1; }
.ch-grid { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; }
.ch-text { font-family: var(--font); font-size: 12px; fill: #9AA7B5; }
.cal-measured, .pr-measured { fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cal-model, .pr-forecast { fill: none; stroke: var(--signal); stroke-width: 2; stroke-dasharray: 6 5; stroke-linejoin: round; }
.cal-residual { fill: rgba(224, 161, 27, 0.35); }
.pr-band { fill: rgba(79, 211, 221, 0.22); }
.pr-today { stroke: rgba(255, 255, 255, 0.4); stroke-dasharray: 2 4; }
.pr-limit { stroke: var(--amber); stroke-width: 1.5; stroke-dasharray: 6 5; }
.pr-limit-hit { fill: transparent; cursor: ns-resize; }
.pr-handle rect { fill: var(--amber); }
.pr-handle-grip { stroke: var(--d-bg); stroke-width: 1.2; }
.pr-handle { pointer-events: none; }
.pr-limit-text { fill: var(--amber); }
.pr-cross circle { fill: var(--amber); }
.pr-cross-text { fill: var(--amber); }
.pr-cursor line { stroke: rgba(255, 255, 255, 0.5); stroke-width: 1; }
.pr-cursor circle { fill: #fff; }
.pr-cursor text { fill: var(--d-text); }
#pred-figure { touch-action: pan-y; }
#pred-figure.is-dragging { cursor: ns-resize; }

/* contact */
.contact-block { border-top: 1px solid var(--rule); }
.contact { padding-block: var(--section-y); }
.contact-cols { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px 56px; align-items: start; }
.contact-copy .intro { margin-top: 20px; }
.contact-direct { margin-top: 28px; color: var(--muted); }
.contact-direct a { overflow-wrap: anywhere; }
.contact-details { padding-top: 12px; border-top: 1px solid var(--ink); font-style: normal; display: grid; gap: 16px; align-content: start; font-size: 1.0625rem; }
.contact-details p { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px; align-items: baseline; }
.cd-label { font-size: 0.875rem; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 56px 0 32px; font-size: 0.9375rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 5fr); gap: 40px; }
.footer-brand svg { height: 30px; width: auto; color: var(--ink); }
.footer-brand p { margin-top: 18px; max-width: 28em; }
.footer-illus { font-size: 0.8125rem; line-height: 1.55; }
.footer-nav { display: grid; gap: 2px; align-content: start; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 36px; color: var(--muted); }
.footer-nav a:hover { color: var(--ink); }
.footer-contact { font-style: normal; line-height: 1.6; display: grid; gap: 10px; align-content: start; }
.footer-label { color: var(--ink); font-weight: 500; }
.footer-contact a:hover { color: var(--ink); }
.footer-small { font-size: 0.8125rem; }
.footer-small a { text-decoration: underline; text-underline-offset: 3px; }
.footer-small a:hover { color: var(--ink); }
.linklike { text-decoration: underline; text-underline-offset: 3px; color: inherit; font-size: inherit; }
.linklike:hover { color: var(--ink); }

/* cookie consent */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--paper); border-top: 1px solid var(--ink); box-shadow: 0 -8px 30px rgba(11, 26, 46, 0.12); }
.cookie-banner[hidden] { display: none; }
.cookie-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px 40px; padding-block: 18px; }
.cookie-text { font-size: 0.9375rem; color: var(--muted); max-width: 60em; }
.cookie-text strong { color: var(--ink); font-weight: 500; }
.cookie-actions { display: flex; gap: 10px; flex: none; }
.btn-ghost { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--tint); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 0.875rem; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .menu-open .site-nav { display: flex; }
  .site-nav a { min-height: 52px; padding: 0 4px; font-size: 1.0625rem; color: var(--ink); border-bottom: 1px solid var(--rule); }
  .site-nav a.is-current { box-shadow: none; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--teal); }
  .menu-toggle { display: flex; }
  .cols-4, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
@media (max-width: 960px) {
  .live-grid { grid-template-columns: 1fr; }
  .live-panel { border-left: 0; padding-left: 0; border-top: 1px solid var(--d-rule); padding-top: 20px; }
  .schedule-4 td.spec { display: none; }
  .schedule-4 th:nth-child(4) { display: none; }
}
@media (max-width: 900px) {
  .section-grid { grid-template-columns: 1fr; gap: 20px; }
  .section-label { padding-top: 0; }
  .feature, .contact-cols, .twin-step { grid-template-columns: 1fr; }
  .twin-step { gap: 24px; }
  .hero-row { grid-template-columns: 1fr; }
  .hero-actions { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  :root { --header-h: 64px; }
  .header-cta { display: none; }
  .brand svg { height: 26px; }
  .header-tools { gap: 8px; }
  .hero h1 { max-width: none; }
  .hero-actions { gap: 20px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .live-facts { order: 3; flex-basis: 100%; }
  .bleed img { aspect-ratio: 4 / 3; max-height: 70vh; }
  .cols-4, .steps, .sector-list, .principles, .photo-pair, .facts { grid-template-columns: 1fr; }
  .sector-list > div:nth-child(2) { border-top: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .cookie-inner { flex-direction: column; align-items: stretch; }
  .cookie-actions .btn { flex: 1; }
  .readouts { grid-template-columns: 1fr 1fr; }
  .live-spec { grid-template-columns: 1fr 1fr; }
  .live-drawing { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .live-drawing svg { min-width: 680px; }
  .twin-figure .ch-text, .twin-figure .fem-text { font-size: 21px; }
  .schedule thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .schedule, .schedule tbody, .schedule tr, .schedule th, .schedule td { display: block; width: auto !important; }
  .schedule tr { padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .schedule tbody th, .schedule td { padding: 0; border: 0; }
  .schedule td:nth-of-type(1) { margin-top: 4px; }
  .schedule td:nth-of-type(2) { margin-top: 2px; font-size: 0.9375rem; }
  .schedule-4 td.spec { display: block; margin-top: 4px; font-size: 0.875rem; color: var(--muted); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
