/* ==========================================================================
   RelaNex Energy — specialist protection-engineering site
   Visual system: graphite/navy engineering canvas for interactive work,
   warm paper for reading, teal for selection, amber for fault/attention.
   ========================================================================== */

:root {
  /* Reading surfaces */
  --paper: #f7f5f0;
  --paper-2: #efebe3;
  --surface: #fffdf9;
  --surface-2: #f3f0e9;
  --surface-3: #e4dfd4;
  --ink: #131c28;
  --ink-2: #354150;
  --muted: #5a6574;
  --line: rgba(19, 28, 40, 0.12);
  --line-strong: rgba(19, 28, 40, 0.22);

  /* Accents on light */
  --accent: #0a7069;
  --accent-ink: #075751;
  --accent-soft: rgba(10, 112, 105, 0.09);
  --amber: #9a4b00;
  --amber-soft: rgba(214, 135, 18, 0.13);
  --ok: #0f7a52;
  --ok-soft: rgba(15, 122, 82, 0.1);
  --danger: #b4232c;
  --danger-soft: rgba(180, 35, 44, 0.08);

  /* Engineering canvas */
  --cv-bg: #0b1420;
  --cv-2: #101b2a;
  --cv-panel: #13202f;
  --cv-raise: #182a3d;
  --cv-line: #283a52;
  --cv-line-2: #3a4f6a;
  --cv-text: #e8eef5;
  --cv-muted: #a3b2c4;
  --cv-accent: #3dd6c6;
  --cv-accent-soft: rgba(61, 214, 198, 0.14);
  --cv-amber: #f2b33d;
  --cv-amber-soft: rgba(242, 179, 61, 0.16);

  /* Read by the canvas tools (hex where scripts append alpha) */
  --curve-1: #0b7fa8;
  --curve-2: #c76a00;
  --sig: #0a7069;
  --text: #131c28;
  --chart-grid: rgba(19, 28, 40, 0.07);
  --chart-grid-strong: rgba(19, 28, 40, 0.17);
  --chart-fault: rgba(19, 28, 40, 0.6);
  --chart-cross: rgba(19, 28, 40, 0.25);

  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
.canvas :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible,
.enquire :focus-visible,
.lab-card--dark :focus-visible { outline-color: var(--cv-accent); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--cv-accent);
  color: #06201d;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 800px; }
.reading { max-width: 1000px; }
.mono { font-family: var(--font-mono); }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: currentColor;
}
.eyebrow--light { color: var(--cv-accent); }

.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
}
.section-title--sm { font-size: clamp(1.6rem, 2.8vw, 2.25rem); }
.section-lead { color: var(--ink-2); font-size: 1.06rem; max-width: 60ch; }
.section-lead p + p { margin-top: 12px; }
.intro-text {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 62ch;
  margin-bottom: clamp(36px, 5vw, 56px);
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 560;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn .icon { width: 18px; height: 18px; flex: none; transition: transform 0.2s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn--sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn--lg { min-height: 50px; padding: 12px 24px; font-size: 16px; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); }
.btn--primary:disabled { opacity: 0.6; cursor: progress; }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn--ghost-light { border-color: var(--cv-line-2); color: var(--cv-text); background: transparent; }
.btn--ghost-light:hover { border-color: var(--cv-accent); color: #fff; }
.canvas .btn--primary,
.enquire .btn--primary,
.site-header .btn--primary,
.lab-card--dark .btn--primary { background: var(--cv-accent); color: #04211e; }
.canvas .btn--primary:hover,
.enquire .btn--primary:hover,
.site-header .btn--primary:hover,
.lab-card--dark .btn--primary:hover { background: #6ee5d8; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-ink);
  font-weight: 560;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.link-arrow .icon { width: 16px; height: 16px; flex: none; transition: transform 0.2s var(--ease); }
.link-arrow:hover { border-bottom-color: currentColor; }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow--light { color: var(--cv-accent); }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.tag--dark { border-color: var(--cv-line-2); color: var(--cv-muted); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  background: var(--surface);
}
.chips--dark .chip { background: transparent; border-color: var(--cv-line-2); color: var(--cv-muted); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 14px 7px 8px;
  border: 1px solid var(--cv-line-2);
  border-radius: 999px;
  color: var(--cv-text);
  font-size: 14px;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.pill__num { padding: 2px 6px; border-radius: 999px; background: var(--cv-raise); font-family: var(--font-mono); font-size: 11px; color: var(--cv-muted); }
.pill:hover { border-color: var(--cv-accent); }
.pill.is-current { border-color: var(--cv-accent); background: var(--cv-accent-soft); }
.pill.is-current .pill__num { background: var(--cv-accent); color: #04211e; }

.ticks { display: grid; gap: 9px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .icon { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--accent); }

.bullets { display: grid; gap: 10px; }
.bullets li { position: relative; padding-left: 20px; }
.bullets li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 8px;
  height: 1.5px;
  background: var(--accent);
}
.bullets--sm { font-size: 15px; gap: 8px; }

.icon { width: 20px; height: 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 20, 32, 0.96);
  border-bottom: 1px solid transparent;
  color: var(--cv-text);
  transition: border-color 0.2s;
}
/* Desktop only: backdrop-filter makes the header the containing block for
   position: fixed children, which would trap the full-screen mobile menu
   inside the 68 px header. */
@supports (backdrop-filter: blur(8px)) {
  @media (min-width: 1025px) {
    .site-header { background: rgba(11, 20, 32, 0.86); backdrop-filter: blur(10px); }
  }
}
.site-header.is-scrolled { border-bottom-color: var(--cv-line); }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.site-header__brand { text-decoration: none; flex: none; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__mark { width: 30px; height: auto; }
.logo__word { display: inline-flex; align-items: baseline; gap: 7px; font-size: 18px; font-weight: 650; letter-spacing: -0.01em; color: var(--cv-text); }
.logo__sub { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cv-accent); }

.nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 2px; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--cv-muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.nav__link:hover,
.nav__link.is-active { color: var(--cv-text); }
.nav__link.is-active { box-shadow: inset 0 -2px 0 var(--cv-accent); border-radius: 0; }
.nav__menu {
  position: absolute;
  top: 100%;
  left: -8px;
  width: 340px;
  padding: 8px;
  border: 1px solid var(--cv-line);
  border-radius: var(--radius);
  background: var(--cv-2);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.nav__item--has-menu:hover .nav__menu,
.nav__item--has-menu:focus-within .nav__menu { opacity: 1; visibility: visible; transform: none; }
.nav__menu-link {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--cv-text);
}
.nav__menu-link:hover { background: var(--cv-raise); }
.nav__menu-num { font-family: var(--font-mono); font-size: 12px; color: var(--cv-accent); padding-top: 2px; }
.nav__menu-title { display: block; font-size: 14.5px; font-weight: 550; }
.nav__menu-text { display: block; font-size: 12.5px; color: var(--cv-muted); }
.nav__cta { flex: none; }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid var(--cv-line-2);
  border-radius: var(--radius-sm);
  background: transparent;
}
.nav-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1.5px;
  background: var(--cv-text);
  transition: transform 0.2s;
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 1024px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px var(--gutter) 32px;
    background: var(--cv-bg);
    overflow-y: auto;
  }
  .nav-open .nav { display: flex; }
  .nav-open { overflow: hidden; }
  .nav__list { flex-direction: column; align-items: stretch; }
  .nav__link { font-size: 17px; color: var(--cv-text); }
  .nav__link svg { display: none; }
  .nav__link.is-active { box-shadow: inset 2px 0 0 var(--cv-accent); }
  .nav__menu {
    position: static;
    width: auto;
    padding: 0 0 8px 12px;
    border: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav__menu-text { display: none; }
  .nav__cta { align-self: flex-start; }
}
/* Without JS the menu cannot open, so the links stay visible as a wrapped list. */
@media (max-width: 1024px) {
  html:not(.js) .nav { position: static; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; width: 100%; padding: 0 0 12px; background: none; }
  html:not(.js) .nav__list { flex-direction: row; flex-wrap: wrap; }
  html:not(.js) .nav__link { font-size: 15px; }
  html:not(.js) .site-header__inner { flex-wrap: wrap; }
  html:not(.js) .nav__menu { display: none; }
  html:not(.js) .nav-toggle { display: none; }
}

/* ---------- Engineering canvas ---------- */
.canvas {
  position: relative;
  background:
    linear-gradient(rgba(61, 214, 198, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(61, 214, 198, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--cv-bg);
  color: var(--cv-text);
}

/* ---------- Hero ---------- */
.hero { padding: clamp(32px, 4.5vw, 60px) 0 clamp(48px, 6vw, 88px); }
.hero__top {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px clamp(32px, 5vw, 64px);
  align-items: end;
}
.hero__title {
  font-size: clamp(2.4rem, 5.2vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 620;
}
.hero__title span { display: block; }
.hero__title-accent { color: var(--cv-accent); }
.hero__lead { font-size: clamp(1.05rem, 1.5vw, 1.18rem); color: var(--cv-muted); max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero__message {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--cv-line);
}
.hero__message li {
  display: flex;
  gap: 12px;
  padding: 14px 16px 0 0;
  font-size: 15px;
  color: var(--cv-text);
}
.hero__message .mono { color: var(--cv-accent); font-size: 12px; padding-top: 3px; }
.hero__explorer { margin-top: clamp(32px, 4vw, 48px); }
.hero__explorer--page { margin-top: 32px; }
.explorer-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 48px; align-items: end; margin-bottom: 20px; }
.explorer-head__title { font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 600; letter-spacing: -0.02em; }
.explorer-head__text { color: var(--cv-muted); font-size: 15px; max-width: 58ch; }

@media (max-width: 900px) {
  .hero__top,
  .explorer-head { grid-template-columns: 1fr; }
  .hero__message { grid-template-columns: 1fr; }
  .hero__message li { padding: 10px 0 0; }
}

/* ---------- Challenge explorer ---------- */
.explorer {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.3fr) minmax(0, 1.05fr);
  gap: 1px;
  border: 1px solid var(--cv-line);
  border-radius: var(--radius-lg);
  background: var(--cv-line);
  overflow: hidden;
}
.explorer > * { background: var(--cv-2); min-width: 0; }
.explorer__tabs { display: flex; flex-direction: column; padding: 8px; gap: 4px; }
.xtab {
  display: flex;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 14px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  text-align: left;
  color: var(--cv-muted);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.xtab:hover { background: var(--cv-panel); color: var(--cv-text); }
.xtab.is-active { background: var(--cv-raise); border-color: var(--cv-accent); color: var(--cv-text); }
.xtab__num { font-family: var(--font-mono); font-size: 12px; color: var(--cv-accent); padding-top: 2px; }
.xtab__title { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.xtab__text { display: block; margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--cv-muted); }
.xtab.is-active .xtab__title::after {
  content: 'Selected';
  display: inline-block;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 3px;
  background: var(--cv-accent);
  color: #04211e;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 2px;
}

.explorer__diagram { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.diagram-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.diagram-badge {
  padding: 3px 8px;
  border: 1px solid var(--cv-amber);
  border-radius: 4px;
  color: var(--cv-amber);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.diagram-head__note { font-size: 12.5px; color: var(--cv-muted); }
.diagram-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--cv-muted); }
.diagram-legend span { display: inline-flex; align-items: center; gap: 6px; }
.diagram-legend__note { flex-basis: 100%; font-size: 12.5px; color: var(--cv-muted); }
.lg { display: inline-block; width: 18px; height: 0; border-top: 2px solid; }
.lg--hl { border-color: var(--cv-accent); }
.lg--attn { border-color: var(--cv-amber); }
.lg--change { border-top-style: dashed; border-color: var(--cv-amber); }

.explorer__panels { padding: 22px 22px 24px; }
.xpanel + .xpanel { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--cv-line); }
.is-enhanced .xpanel + .xpanel { margin-top: 0; padding-top: 0; border-top: 0; }
.xpanel:focus-visible { outline-offset: 6px; }
.xpanel__num { font-size: 12px; color: var(--cv-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.xpanel__num .mono { color: var(--cv-accent); }
.xpanel__title { margin-top: 4px; font-size: 1.35rem; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; }
.xpanel__summary { margin-top: 10px; font-size: 15px; color: var(--cv-text); }
.xpanel__label {
  margin: 18px 0 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cv-muted);
}
.xpanel__callouts { display: grid; gap: 8px; font-size: 14px; }
.xpanel__callouts li { display: flex; gap: 10px; align-items: flex-start; }
.xpanel__marker {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cv-accent);
  color: #04211e;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}
.xpanel__marker--attn { background: var(--cv-amber); color: #2a1a00; }
.xpanel__cols { display: grid; grid-template-columns: 1fr; gap: 0 20px; }
.xpanel__list { display: grid; gap: 6px; font-size: 14px; color: var(--cv-text); }
.xpanel__list li { position: relative; padding-left: 16px; }
.xpanel__list li::before { content: ''; position: absolute; left: 0; top: 0.7em; width: 7px; height: 1.5px; background: var(--cv-accent); }
.xpanel__deliv { display: flex; flex-wrap: wrap; gap: 6px; }
.xpanel__deliv a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--cv-line-2);
  border-radius: var(--radius-sm);
  color: var(--cv-text);
  font-size: 13.5px;
  text-decoration: none;
}
.xpanel__deliv a:hover { border-color: var(--cv-accent); }
.xpanel__deliv .icon { width: 16px; height: 16px; color: var(--cv-accent); }
.xpanel__scope { margin-top: 10px; font-size: 12.5px; color: var(--cv-muted); font-style: italic; }
.xpanel__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }

@media (max-width: 1180px) {
  .explorer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .explorer__tabs { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .xtab { flex: 1 1 calc(50% - 4px); }
  .xtab__text { display: none; }
}
@media (max-width: 760px) {
  .explorer { grid-template-columns: 1fr; }
  .explorer__tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .explorer__tabs[hidden] { display: none !important; }
  .xtab { padding: 10px; }
  .xtab__title { font-size: 14px; }
  .xtab.is-active .xtab__title::after { display: none; }
  .explorer__panels { padding: 18px 16px 20px; }
}

/* ---------- Single-line diagram ---------- */
.sld { width: 100%; height: auto; max-height: 640px; }
.sld text { font-family: var(--font-mono); }
.sld-line, .sld-wire { fill: none; stroke: #8496ad; stroke-width: 1.6; transition: stroke 0.25s, opacity 0.25s; }
.sld-bus { stroke: #a9b8ca; stroke-width: 4.5; stroke-linecap: round; transition: stroke 0.25s; }
.sld-cb { fill: var(--cv-2); stroke: #a9b8ca; stroke-width: 1.6; transition: stroke 0.25s, fill 0.25s; }
.sld-ct { fill: none; stroke: #8496ad; stroke-width: 1.4; }
.sld-id { font-size: 12.5px; fill: var(--cv-text); }
.sld-sub { font-size: 10.5px; fill: var(--cv-muted); }
.sld-glyph { font-size: 14px; font-weight: 600; fill: var(--cv-text); }
.sld-relay rect { fill: var(--cv-panel); stroke: var(--cv-line-2); stroke-width: 1.2; transition: stroke 0.25s, fill 0.25s; }
.sld-relay-id { font-size: 12.5px; font-weight: 600; fill: var(--cv-text); }
.sld-relay-fn { font-size: 10.5px; fill: var(--cv-muted); }
.sld-box { fill: var(--cv-panel); stroke: var(--cv-line-2); stroke-width: 1.2; }
.sld-link { fill: none; stroke: #4d6380; stroke-width: 1.1; transition: stroke 0.25s; }
.sld-link--trip { stroke-dasharray: 4 3; }
.sld-link--comms { stroke-dasharray: 2 3; }
.sld-change { stroke: var(--cv-amber); stroke-dasharray: 5 4; }
.sld-fault { fill: none; stroke: var(--cv-amber); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sld-fault--head { fill: var(--cv-amber); }
.sld-fault-label { font-size: 11px; fill: var(--cv-amber); text-transform: uppercase; letter-spacing: 0.06em; }
.sld-zone { fill: rgba(61, 214, 198, 0.05); stroke: var(--cv-accent); stroke-width: 1.3; stroke-dasharray: 6 4; }
.sld-zone-label { font-size: 9.5px; fill: var(--cv-accent); letter-spacing: 0.08em; }
.sld-marker circle { fill: var(--cv-accent); stroke: var(--cv-bg); stroke-width: 2; }
.sld-marker text { font-family: var(--font-mono); font-size: 12px; font-weight: 700; fill: #04211e; }
.sld-marker--attn circle { fill: var(--cv-amber); }
.sld-marker--attn text { fill: #2a1a00; }

.sld-only, .sld-callouts { display: none; }
.sld[data-scenario='trips'] [data-only~='trips'],
.sld[data-scenario='changes'] [data-only~='changes'],
.sld[data-scenario='aging'] [data-only~='aging'],
.sld[data-scenario='design'] [data-only~='design'],
.sld[data-scenario='trips'] .sld-callouts[data-for='trips'],
.sld[data-scenario='changes'] .sld-callouts[data-for='changes'],
.sld[data-scenario='aging'] .sld-callouts[data-for='aging'],
.sld[data-scenario='design'] .sld-callouts[data-for='design'] { display: inline; }

/* Highlighted (teal) */
.sld[data-scenario='trips'] [data-hl~='trips'] :is(.sld-line, .sld-wire, .sld-cb, .sld-link),
.sld[data-scenario='changes'] [data-hl~='changes'] :is(.sld-line, .sld-wire, .sld-cb, .sld-link),
.sld[data-scenario='aging'] [data-hl~='aging'] :is(.sld-line, .sld-wire, .sld-cb, .sld-link),
.sld[data-scenario='design'] [data-hl~='design'] :is(.sld-line, .sld-wire, .sld-cb, .sld-link) { stroke: var(--cv-accent); }
.sld[data-scenario='trips'] [data-hl~='trips'] .sld-bus,
.sld[data-scenario='changes'] [data-hl~='changes'] .sld-bus,
.sld[data-scenario='design'] [data-hl~='design'] .sld-bus { stroke: var(--cv-accent); }
.sld[data-scenario='trips'] .sld-relay[data-hl~='trips'] rect,
.sld[data-scenario='changes'] .sld-relay[data-hl~='changes'] rect,
.sld[data-scenario='design'] .sld-relay[data-hl~='design'] rect,
.sld[data-scenario='aging'] [data-hl~='aging'] .sld-box { stroke: var(--cv-accent); fill: #10302f; }
.sld[data-scenario='aging'] [data-id='ct1'] .sld-ct { stroke: var(--cv-accent); stroke-width: 2; }
/* Attention (amber) */
.sld[data-scenario='aging'] .sld-relay[data-attn~='aging'] rect { stroke: var(--cv-amber); fill: #33270f; stroke-dasharray: 4 2; }
.sld[data-scenario='aging'] .sld-relay[data-attn~='aging'] .sld-link { stroke: var(--cv-accent); }
/* De-emphasise what is not part of the selected scenario */
.sld[data-scenario='trips'] .sld-el:not([data-hl~='trips']):not([data-attn~='trips']),
.sld[data-scenario='changes'] .sld-el:not([data-hl~='changes']):not([data-attn~='changes']),
.sld[data-scenario='aging'] .sld-el:not([data-hl~='aging']):not([data-attn~='aging']),
.sld[data-scenario='design'] .sld-el:not([data-hl~='design']):not([data-attn~='design']) { opacity: 0.55; }

@media (max-width: 560px) {
  .sld-sub, .sld-zone-label { display: none; }
  .sld-id, .sld-relay-id { font-size: 15px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--paper { background: var(--paper); }
.section--warm { background: var(--paper-2); }
.section-head { margin-bottom: clamp(32px, 4.5vw, 56px); }
.section-head .section-lead { margin-top: 14px; }
.section-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 56px;
  align-items: end;
}
.section-head--split > .section-lead { margin-top: 0; }
.section-head--end > .link-arrow { justify-self: end; }
.section-head__aside { display: grid; gap: 16px; justify-items: start; }
@media (max-width: 860px) {
  .section-head--split { grid-template-columns: 1fr; }
  .section-head--end > .link-arrow { justify-self: start; }
}

/* ---------- Deliverables ---------- */
.dlv { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); }
.dlv:not(.is-enhanced) { grid-template-columns: 1fr; }
.dlv__list { display: flex; flex-direction: column; border-top: 1px solid var(--line-strong); }
.dlv__tab {
  display: flex;
  gap: 12px;
  align-items: baseline;
  width: 100%;
  min-height: 48px;
  padding: 12px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  font-size: 15.5px;
  font-weight: 520;
  color: var(--ink-2);
  transition: color 0.2s, background-color 0.2s;
}
.dlv__tab:hover { color: var(--ink); background: var(--surface-2); }
.dlv__tab.is-active { color: var(--ink); background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
.dlv__n { font-family: var(--font-mono); font-size: 12px; color: var(--accent-ink); }
.dlv__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.dlv:not(.is-enhanced) .dlv__panel + .dlv__panel { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--line); }
.dlv__title { font-size: 1.5rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; }
.dlv__summary { margin-top: 10px; color: var(--ink-2); }
.dlv__label { margin: 20px 0 10px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dlv__distinction {
  margin-top: 22px;
  padding: 14px 16px;
  border-left: 3px solid var(--amber);
  background: var(--amber-soft);
  font-size: 15px;
  color: var(--ink);
}
@media (max-width: 1000px) {
  .dlv { grid-template-columns: 1fr; }
  .dlv__list { flex-direction: row; overflow-x: auto; border-top: 0; border-bottom: 1px solid var(--line-strong); scrollbar-width: thin; }
  .dlv__tab { flex: none; width: auto; border-bottom: 0; white-space: nowrap; padding: 12px 14px; }
  .dlv__tab.is-active { box-shadow: inset 0 -3px 0 var(--accent); }
  .dlv__n { display: none; }
}
@media (max-width: 760px) {
  .dlv__panel { grid-template-columns: 1fr; }
}

/* Illustrative document previews */
.doc {
  position: relative;
  padding: 0 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 0 var(--line), 8px 8px 0 -1px var(--surface-3);
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
}
.doc__ribbon {
  padding: 7px 14px;
  background: var(--amber-soft);
  border-bottom: 1px solid rgba(154, 75, 0, 0.25);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.doc__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.doc__kind { color: var(--accent-ink); font-weight: 600; }
.doc__meta { color: var(--muted); }
.doc__h { padding: 14px 18px 8px; font-weight: 600; font-size: 13.5px; }
.doc__table { width: calc(100% - 36px); margin: 4px 18px 0; border-collapse: collapse; font-size: 12.5px; }
.doc__table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--line-strong); padding: 6px 6px 6px 0; }
.doc__table td { padding: 7px 6px 7px 0; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; }
.doc__table--matrix td:not(:first-child),
.doc__table--matrix th:not(:first-child) { text-align: center; color: var(--accent-ink); }
.doc__note { padding: 10px 18px 0; font-size: 12px; color: var(--muted); }
.doc__tcc, .doc__logic { width: calc(100% - 36px); margin: 0 18px; height: auto; }
.doc__grid path { stroke: var(--line); stroke-width: 1; fill: none; }
.doc__c1 { fill: none; stroke: var(--curve-1); stroke-width: 2; }
.doc__c2 { fill: none; stroke: var(--curve-2); stroke-width: 2; }
.doc__fl { stroke: var(--ink-2); stroke-dasharray: 3 3; stroke-width: 1; }
.doc__tcc text, .doc__logic text { font-family: var(--font-mono); font-size: 9.5px; fill: var(--muted); }
.doc__tcc .doc__c1t { fill: var(--curve-1); }
.doc__tcc .doc__c2t { fill: var(--curve-2); }
.doc__blk rect { fill: var(--surface-2); stroke: var(--ink-2); stroke-width: 1; }
.doc__blk text { fill: var(--ink); font-size: 10.5px; }
.doc__wire path { fill: none; stroke: var(--ink-2); stroke-width: 1.2; }
.doc__logic .doc__small { font-size: 9px; }
.doc__pri { padding: 1px 6px; border-radius: 3px; font-size: 11px; }
.doc__pri--h { background: var(--danger-soft); color: var(--danger); }
.doc__pri--m { background: var(--amber-soft); color: var(--amber); }
.doc__pri--u { background: var(--surface-2); color: var(--muted); }
.doc__steps { display: grid; gap: 10px; padding: 4px 18px 0; }
.doc__steps li { display: grid; grid-template-columns: 14px 1fr; gap: 4px 10px; font-size: 12.5px; }
.doc__box { width: 13px; height: 13px; margin-top: 3px; border: 1.5px solid var(--ink-2); border-radius: 2px; }
.doc__res { grid-column: 2; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.doc__memo { display: grid; gap: 10px; padding: 4px 18px 0; }
.doc__memo div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.doc__memo dt { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding-top: 2px; }
.doc__memo dd { font-size: 13px; }
@media (max-width: 480px) {
  .doc__memo div { grid-template-columns: 1fr; gap: 2px; }
  .doc__table--matrix { font-size: 11px; }
  .doc__table td, .doc__table th { padding-right: 4px; }
}

/* ---------- Collaboration stages ---------- */
.process-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.process-wrap__intro { position: sticky; top: calc(var(--header-h) + 32px); }
.process-wrap__intro .section-lead { margin-top: 14px; }
.split-note { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.split-note > div { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.split-note__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 600; font-size: 15px; }
.split-note__head .icon { color: var(--accent); }
.split-note ul { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.split-note__foot { margin-top: 12px; font-size: 13px; color: var(--muted); }
.stages { position: relative; display: grid; gap: 0; --progress: 1; }
.stages::before,
.stages::after { content: ''; position: absolute; left: 11px; top: 10px; bottom: 10px; width: 2px; }
.stages::before { background: var(--line-strong); }
.stages::after { background: var(--accent); transform-origin: top; transform: scaleY(var(--progress)); }
.stage { position: relative; padding: 0 0 36px 48px; }
.stage__dot { position: absolute; left: 4px; top: 6px; width: 16px; height: 16px; border: 2px solid var(--accent); border-radius: 50%; background: var(--paper-2); z-index: 1; transition: background-color 0.3s; }
.stages:not(.is-enhanced) .stage__dot,
.stage.is-active .stage__dot { background: var(--accent); }
.stage__num { font-family: var(--font-mono); font-size: 12px; color: var(--accent-ink); }
.stage__title { margin-top: 4px; font-size: 1.2rem; line-height: 1.3; font-weight: 600; }
.stage__text { margin-top: 8px; color: var(--ink-2); }
.stage__where { margin-top: 10px; font-size: 13.5px; color: var(--ink); }
.stage__where .mono { margin-right: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
@media (max-width: 960px) {
  .process-wrap { grid-template-columns: 1fr; }
  .process-wrap__intro { position: static; }
}
@media (max-width: 560px) {
  .split-note { grid-template-columns: 1fr; }
}

/* ---------- Resources ---------- */
.resources { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr); gap: clamp(20px, 3vw, 40px); }
.resources__tools { display: grid; gap: 10px; align-content: start; }
.tool-link {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.2s;
}
.tool-link:hover { border-color: var(--accent); }
.tool-link__kind { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-ink); }
.tool-link__title { font-weight: 600; }
.tool-link__text { font-size: 14px; color: var(--ink-2); }
.resources__note { font-size: 13px; color: var(--muted); }
.resources__articles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) {
  .resources { grid-template-columns: 1fr; }
  .resources__tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .resources__note { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .resources__tools, .resources__articles { grid-template-columns: 1fr; }
}

.insight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.insight-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .insight-grid, .insight-grid--two { grid-template-columns: 1fr; } }
.insight-card { height: 100%; }
.insight-card__link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.2s;
}
.insight-card__link:hover { border-top-color: var(--accent); }
.insight-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.insight-card__title { font-size: 1.12rem; line-height: 1.3; font-weight: 600; }
.insight-card__text { font-size: 14.5px; color: var(--ink-2); }
.insight-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-size: 13.5px; font-weight: 560; color: var(--accent-ink); }
.insight-card__more .icon { width: 15px; height: 15px; }

.filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.filter__btn {
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
}
.filter__btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Enquiry band ---------- */
.enquire { background: var(--cv-bg); color: var(--cv-text); padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--cv-line); }
.enquire__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px clamp(32px, 6vw, 88px); align-items: start; }
.enquire__title { font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.12; letter-spacing: -0.025em; font-weight: 600; text-wrap: balance; }
.enquire__text { margin-top: 16px; color: var(--cv-muted); max-width: 54ch; }
.enquire__actions { display: grid; gap: 14px; justify-items: start; }
.enquire__label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cv-muted); }
.enquire__picks { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 860px) { .enquire__inner { grid-template-columns: 1fr; } }

/* ---------- Page hero ---------- */
.page-hero { padding: clamp(36px, 5vw, 64px) 0 clamp(44px, 6vw, 72px); }
.page-hero__title {
  max-width: 22ch;
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 620;
  text-wrap: balance;
}
.page-hero__lead { margin-top: 16px; max-width: 62ch; font-size: clamp(1.02rem, 1.4vw, 1.15rem); color: var(--cv-muted); }
.page-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.page-hero--article .article__title { max-width: 26ch; }
.fn-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fn-chips__label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cv-muted); }

.crumbs { margin-bottom: 20px; font-size: 13.5px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li { display: inline-flex; align-items: center; gap: 4px; color: var(--cv-muted); }
.crumbs li + li::before { content: '/'; color: var(--cv-line-2); }
.crumbs a { color: var(--cv-muted); text-decoration: none; }
.crumbs a:hover { color: var(--cv-text); text-decoration: underline; }
.crumbs [aria-current] { color: var(--cv-text); }

/* ---------- Challenge pages ---------- */
.challenge-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(32px, 5vw, 72px); align-items: start; }
.challenge-hero__copy .btn { margin-top: 24px; }
.challenge-hero__diagram {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--cv-line);
  border-radius: var(--radius-lg);
  background: var(--cv-2);
}
.challenge-hero__diagram .sld { max-height: 520px; }
.challenge-hero__diagram .xpanel__callouts { color: var(--cv-text); }
.challenge-hero__diagram figcaption { display: grid; gap: 10px; }
@media (max-width: 900px) { .challenge-hero { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.facts--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts__block { padding-top: 16px; border-top: 2px solid var(--ink); }
.facts__title { margin-bottom: 16px; font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
.facts__note { margin-top: 14px; font-size: 14px; color: var(--muted); }
@media (max-width: 860px) { .facts, .facts--two { grid-template-columns: 1fr; } }

.boundary {
  margin-bottom: 48px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  background: var(--surface);
}
.boundary__title { margin-bottom: 14px; font-size: 1.2rem; font-weight: 600; }
.boundary p + p { margin-top: 12px; }
.boundary .bullets li::before { background: var(--amber); }

.related-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.related-links__title { margin-bottom: 12px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.related-links ul { display: grid; gap: 10px; }

.challenge-list { border-top: 1px solid var(--line-strong); }
.challenge-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1.1fr) minmax(0, 1.2fr) auto;
  gap: 12px 28px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--line-strong);
}
.challenge-row__num { font-size: 14px; color: var(--accent-ink); padding-top: 4px; }
.challenge-row__title { font-size: 1.25rem; line-height: 1.3; font-weight: 600; margin-bottom: 6px; }
.challenge-row__title a { text-decoration: none; }
.challenge-row__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.challenge-row p { color: var(--ink-2); font-size: 15px; }
.challenge-row__signs { display: grid; gap: 6px; font-size: 14.5px; color: var(--ink-2); }
.challenge-row__signs li { position: relative; padding-left: 16px; }
.challenge-row__signs li::before { content: ''; position: absolute; left: 0; top: 0.7em; width: 7px; height: 1.5px; background: var(--accent); }
@media (max-width: 960px) {
  .challenge-row { grid-template-columns: 40px 1fr; }
  .challenge-row__signs, .challenge-row > .link-arrow { grid-column: 2; }
}

/* ---------- Engineering (services) ---------- */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.segmented__btn {
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 540;
}
.segmented__btn:hover { color: var(--ink); background: var(--surface-2); }
.segmented__btn.is-active { background: var(--ink); color: #fff; }
.segmented--dark { border-color: var(--cv-line-2); background: var(--cv-2); }
.segmented--dark .segmented__btn { color: var(--cv-muted); }
.segmented--dark .segmented__btn:hover { color: var(--cv-text); background: var(--cv-raise); }
.segmented--dark .segmented__btn.is-active { background: var(--cv-accent); color: #04211e; }
.engage-summary { color: var(--ink-2); font-size: 15px; max-width: 52ch; }
[data-mode='engineering'] [data-engage-text='consulting'],
[data-mode='consulting'] [data-engage-text='engineering'],
[data-mode='engineering'] [data-engage-list='consulting'],
[data-mode='consulting'] [data-engage-list='engineering'] { display: none; }
html:not(.js) [data-engage-scope] .segmented { display: none; }
html:not(.js) [data-engage-scope] [data-engage-text],
html:not(.js) [data-engage-scope] [data-engage-list] { display: revert; }
html:not(.js) [data-engage-scope] [data-engage-list] { display: grid; margin-bottom: 12px; }

.svc-rows { border-top: 1px solid var(--line-strong); }
.svc-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px clamp(24px, 3vw, 48px);
  padding: clamp(28px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--line-strong);
}
.svc-row__num { font-size: 12px; color: var(--accent-ink); text-transform: uppercase; letter-spacing: 0.06em; }
.svc-row__title { margin: 8px 0 10px; font-size: 1.45rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; }
.svc-row__title a { text-decoration: none; }
.svc-row__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.svc-row__text { color: var(--ink-2); margin-bottom: 16px; }
.svc-row__label { margin-bottom: 12px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.svc-row .ticks { font-size: 15px; }
@media (max-width: 960px) { .svc-row { grid-template-columns: 1fr; } }

.map { display: grid; gap: 10px; }
.map__row { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 12px; align-items: center; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.map__challenge { font-weight: 600; text-decoration: none; }
.map__challenge .mono { color: var(--accent-ink); font-size: 13px; margin-right: 6px; }
.map__challenge:hover { text-decoration: underline; }
.map__arrow { height: 1px; background: var(--line-strong); position: relative; }
.map__arrow::after { content: ''; position: absolute; right: 0; top: -3px; border: 3.5px solid transparent; border-left: 6px solid var(--line-strong); border-right: 0; }
.map__services { display: flex; flex-wrap: wrap; gap: 6px; }
.map__services a { display: inline-block; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 14px; text-decoration: none; }
.map__services a:hover { border-color: var(--accent); color: var(--accent-ink); }
@media (max-width: 700px) {
  .map__row { grid-template-columns: 1fr; }
  .map__arrow { display: none; }
}

.scope-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 clamp(24px, 4vw, 56px); }
.scope-list li { display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; padding: 22px 0; border-top: 1px solid var(--line-strong); }
.scope-list__num { grid-row: span 2; font-size: 13px; color: var(--accent-ink); padding-top: 3px; }
.scope-list__title { font-size: 1.1rem; font-weight: 600; }
.scope-list__text { color: var(--ink-2); font-size: 15.5px; }

.outputs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.outputs__col { padding: clamp(20px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.outputs__col--accent { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.outputs__title { font-size: 1.2rem; font-weight: 600; }
.outputs__lead { margin: 8px 0 18px; color: var(--ink-2); font-size: 15px; }
.outputs__more { margin-top: 20px; font-size: 14.5px; color: var(--ink-2); }
.outputs__more a { color: var(--accent-ink); }
@media (max-width: 760px) { .outputs { grid-template-columns: 1fr; } }

.mini-process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: none; }
.mini-process li { display: grid; gap: 6px; align-content: start; padding-top: 14px; border-top: 2px solid var(--accent); font-size: 15px; color: var(--ink-2); }
.mini-process .mono { font-size: 12px; color: var(--accent-ink); }
.mini-process strong { color: var(--ink); }
@media (max-width: 860px) { .mini-process { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .mini-process { grid-template-columns: 1fr; } }

.faq { border-top: 1px solid var(--line-strong); }
.faq__item { border-bottom: 1px solid var(--line-strong); }
.faq__item summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 56px;
  padding: 14px 0;
  font-weight: 560;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__icon { position: relative; flex: none; width: 14px; height: 14px; }
.faq__icon::before, .faq__icon::after { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--accent); transition: transform 0.2s; }
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon::after { transform: rotate(0); }
.faq__body { padding: 0 0 18px; color: var(--ink-2); max-width: 70ch; }

/* ---------- Tools ---------- */
.tool-section .section-head { margin-bottom: 28px; }
.lab-card {
  padding: clamp(14px, 2.5vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.lab-card--dark { background: var(--cv-bg); border-color: var(--cv-line); color: var(--cv-text); }
.tool-notes { display: grid; gap: 10px; margin-top: 16px; }
.formula { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.formula summary { min-height: 48px; padding: 12px 16px; font-weight: 560; cursor: pointer; }
.formula__body { display: grid; gap: 8px; padding: 0 16px 16px; font-size: 14.5px; color: var(--ink-2); }
.formula__body ul { display: grid; gap: 8px; }
.formula__body li { position: relative; padding-left: 16px; }
.formula__body li::before { content: ''; position: absolute; left: 0; top: 0.7em; width: 7px; height: 1.5px; background: var(--accent); }
.formula__body .mono { color: var(--ink); }

.edu-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid rgba(154, 75, 0, 0.35);
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
}
.edu-notice .icon { flex: none; width: 18px; height: 18px; color: var(--amber); margin-top: 1px; }
.lab-card--dark .edu-notice { border-color: rgba(242, 179, 61, 0.45); background: var(--cv-amber-soft); color: var(--cv-text); }
.lab-card--dark .edu-notice .icon { color: var(--cv-amber); }

/* Form controls (shared by tools and the enquiry form) */
.field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.field__label { display: flex; align-items: baseline; gap: 6px; font-size: 14px; font-weight: 560; color: var(--ink); }
.field__label output { margin-left: auto; font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.field__hint { font-size: 12.5px; color: var(--muted); }
.req, .opt { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.req { color: var(--amber); }
.opt { color: var(--muted); }
.field input:not([type='range']):not([type='checkbox']):not([type='radio']),
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.5; }
.field select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%235a6574' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field [aria-invalid='true'], .has-error input, .has-error textarea, .has-error select { border-color: var(--danger) !important; }
.field__error { color: var(--danger); font-size: 13.5px; font-weight: 500; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field-row--tight { gap: 10px; }
@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .field-row--tight { grid-template-columns: 1fr 1fr; }
}
.lab-card--dark .field__label { color: var(--cv-text); }
.lab-card--dark .field select { background-color: var(--cv-2); color: var(--cv-text); border-color: var(--cv-line-2); }

input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  background: transparent;
  cursor: pointer;
  --fill: 50%;
}
input[type='range']::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--fill), var(--surface-3) var(--fill)); }
input[type='range']::-moz-range-track { height: 4px; border-radius: 4px; background: var(--surface-3); }
input[type='range']::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border: 3px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
input[type='range']::-moz-range-thumb { width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
input[type='range']:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; flex: none; width: 36px; height: 20px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-strong); transition: background-color 0.2s; }
.switch__track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 0.2s var(--ease); }
.switch input:checked + .switch__track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.swatch { display: inline-block; width: 12px; height: 3px; border-radius: 2px; }
.swatch--r1 { background: var(--curve-1); }
.swatch--r2 { background: var(--curve-2); }
.chip .led, .led { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }

/* Coordination tool */
.coord { display: grid; gap: 16px; }
.coord__relays { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.coord__relay { display: grid; gap: 14px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); min-width: 0; }
.coord__relay--r1 { box-shadow: inset 3px 0 0 var(--curve-1); }
.coord__relay--r2 { box-shadow: inset 3px 0 0 var(--curve-2); }
.coord__relay legend { display: flex; align-items: center; gap: 8px; float: left; width: 100%; padding: 0; font-size: 15px; font-weight: 600; }
.coord__relay legend + * { clear: both; }
.coord__relay-name { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; font-weight: 400; color: var(--muted); }
.coord__hs { display: grid; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.coord__hs:not(.is-on) .field-row { opacity: 0.55; }
.coord__main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
.coord__chart { position: relative; padding: 12px 12px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; min-width: 0; }
.coord__chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 8px; }
.coord__legend { display: inline-flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); }
.coord__legend span { display: inline-flex; align-items: center; gap: 6px; }
.coord__canvas-wrap { position: relative; }
.coord__canvas-wrap canvas { width: 100%; height: 380px; cursor: crosshair; touch-action: pan-y; }
.coord__hint { padding: 6px 4px 0; font-size: 12.5px; color: var(--muted); }
.coord__eq { padding: 6px 4px 0; font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.coord__tip { position: absolute; top: 0; left: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 255, 255, 0.97); font-family: var(--font-mono); font-size: 11.5px; line-height: 1.5; white-space: nowrap; pointer-events: none; }
.coord__tip .c1 { color: var(--curve-1); }
.coord__tip .c2 { color: var(--curve-2); }
.coord__panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.coord__results { display: grid; gap: 8px; }
.metric { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.metric__label { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.metric__value { font-family: var(--font-mono); font-size: 17px; font-variant-numeric: tabular-nums; }
.metric--margin .metric__value { font-size: 22px; }
.metric--margin[data-state='ok'] { border-color: rgba(15, 122, 82, 0.45); background: var(--ok-soft); }
.metric--margin[data-state='ok'] .metric__value { color: var(--ok); }
.metric--margin[data-state='bad'] { border-color: rgba(180, 35, 44, 0.45); background: var(--danger-soft); }
.metric--margin[data-state='bad'] .metric__value { color: var(--danger); }
.metric--margin[data-state='na'] .metric__value { color: var(--muted); }
.coord__verdict { font-size: 14px; color: var(--ink-2); line-height: 1.5; min-height: 3em; }
.coord__verdict strong { color: var(--ink); }
.coord__errors { padding: 10px 12px; border: 1px solid rgba(180, 35, 44, 0.4); border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 13.5px; }
@media (max-width: 1000px) {
  .coord__main, .coord__relays { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .coord__canvas-wrap canvas { height: 280px; } }

/* Breaker-failure demonstration */
.bf { display: grid; gap: 14px; }
.bf__toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.bf__diagram-wrap { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); overflow-x: auto; }
.bf__diagram { width: 100%; max-width: 820px; min-width: 600px; height: auto; margin-inline: auto; }
.bf__block rect:first-child { fill: #fff; stroke: var(--line-strong); stroke-width: 1.2; transition: stroke 0.15s, fill 0.15s; }
.bf__block.is-on rect:first-child { stroke: var(--accent); fill: #e6f3f1; }
.bf__block--danger.is-on rect:first-child { stroke: var(--danger); fill: #fbeaea; }
.bf__t1 { font-family: var(--font-mono); font-size: 11px; font-weight: 600; fill: var(--ink); letter-spacing: 0.04em; }
.bf__t2 { font-family: var(--font-mono); font-size: 9.5px; fill: var(--muted); }
.bf__val { fill: var(--accent-ink); }
.bf__gate { font-size: 26px; font-weight: 650; fill: var(--muted); }
.bf__block.is-on .bf__gate { fill: var(--accent); }
.bf__track { fill: var(--surface-3); }
.bf__prog { fill: var(--accent); }
.sig { stroke: #c3c8cf; stroke-width: 2; transition: stroke 0.12s; }
.sig.is-on { stroke: var(--accent); }
.sig[data-sig='backtrip'].is-on { stroke: var(--danger); }
.sig-dot { fill: #c3c8cf; }
.sig-dot.is-on { fill: var(--accent); }
.bf__status { display: flex; flex-wrap: wrap; gap: 8px; }
.chip[data-state='closed'] .led { background: var(--amber); }
.chip[data-state='open'] .led { background: var(--ok); }
.chip[data-state='flowing'] .led { background: var(--danger); }
.chip[data-state='none'] .led { background: var(--muted); }
.chip--time { margin-left: auto; font-variant-numeric: tabular-nums; }
.bf__traces-wrap { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.bf__traces { width: 100%; height: 210px; }
.bf__side { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 18px; align-items: start; }
.bf__controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 20px; }
.bf__verdict { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14.5px; line-height: 1.55; color: var(--ink-2); min-height: 3.4em; }
.bf__verdict[data-state='ok'] { border-color: rgba(15, 122, 82, 0.4); background: var(--ok-soft); }
.bf__verdict[data-state='warn'] { border-color: rgba(154, 75, 0, 0.4); background: var(--amber-soft); }
.bf__verdict[data-state='bad'] { border-color: rgba(180, 35, 44, 0.4); background: var(--danger-soft); }
.bf__verdict strong { color: var(--ink); }
@media (max-width: 900px) { .bf__side { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .bf__controls { grid-template-columns: 1fr; }
  .chip--time { margin-left: 0; }
}

/* Feeder fault sequence */
.fseq { display: grid; gap: 18px; }
.fseq__controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; }
.fseq__group { margin: 0; padding: 0; border: 0; display: grid; gap: 6px; min-width: 0; }
.fseq__group legend { padding: 0; margin-bottom: 6px; color: var(--cv-text); }
.fseq__run { margin-left: auto; }
.fseq__main { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 18px; }
.fseq__stage { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px solid var(--cv-line); border-radius: var(--radius); background: var(--cv-2); }
.fseq__svg svg { width: 100%; height: auto; }
.fseq__noscript { color: var(--cv-muted); font-size: 14px; }
.fseq__side { display: grid; gap: 10px; align-content: start; }
.fseq__label { margin-top: 6px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cv-muted); }
.fseq__assume { display: grid; gap: 4px; font-size: 13.5px; }
.fseq__assume div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--cv-line); }
.fseq__assume dt { color: var(--cv-muted); }
.fseq__assume dd { font-family: var(--font-mono); font-size: 12.5px; text-align: right; }
.fseq__log { display: grid; gap: 6px; min-height: 120px; font-size: 13px; }
.fseq__log li { display: grid; grid-template-columns: 70px 1fr; gap: 8px; padding: 6px 8px; border-left: 2px solid var(--cv-line-2); background: var(--cv-2); }
.fseq__log time { font-family: var(--font-mono); font-size: 11.5px; color: var(--cv-muted); }
.fseq__log li[data-tone='bad'] { border-left-color: var(--cv-amber); }
.fseq__log li[data-tone='warn'] { border-left-color: #8fa3bb; }
.fseq__log li[data-tone='ok'] { border-left-color: var(--cv-accent); }
.fseq__foot { font-size: 12.5px; color: var(--cv-muted); }
@media (max-width: 900px) {
  .fseq__main { grid-template-columns: 1fr; }
  .fseq__run { margin-left: 0; }
}
.gs-text, .gs-cb-label, .gs-load-label { font-family: var(--font-mono); font-size: 11px; fill: var(--cv-muted); }
.gs-seg { fill: none; stroke: #8496ad; stroke-width: 2; transition: stroke 0.2s; }
.gs-seg[data-state='fault'] { stroke: var(--cv-amber); }
.gs-seg[data-state='dead'] { stroke: #3a4a5e; stroke-dasharray: 3 4; }
.gs-bus { stroke: #a9b8ca; stroke-width: 5; stroke-linecap: round; }
.gs-bus.is-fault { stroke: #d7b46a; }
.gs-xfmr { fill: none; stroke: #8496ad; stroke-width: 1.6; }
.gs-cb { fill: var(--cv-2); stroke: #a9b8ca; stroke-width: 1.6; }
.gs-cb[data-closed='true'] { fill: #a9b8ca; }
.gs-cb[data-closed='false'] { fill: var(--cv-bg); stroke: var(--cv-accent); }
.gs-tag rect { fill: var(--cv-panel); stroke: var(--cv-line-2); }
.gs-tag text { font-family: var(--font-mono); font-size: 10.5px; fill: var(--cv-text); }
.gs-tag .gs-tag-state { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.gs-tag[data-state='pickup'] rect { stroke: #8fa3bb; stroke-dasharray: 3 2; }
.gs-tag[data-state='pickup'] .gs-tag-state { fill: #8fa3bb; }
.gs-tag[data-state='trip'] rect,
.gs-tag[data-state='lockout'] rect { stroke: var(--cv-amber); }
.gs-tag[data-state='trip'] .gs-tag-state,
.gs-tag[data-state='lockout'] .gs-tag-state { fill: var(--cv-amber); }
.gs-load { fill: none; stroke: #8496ad; stroke-width: 1.4; }
.gs-fault-mark { fill: none; stroke: var(--cv-amber); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gs-fault-label { font-family: var(--font-mono); font-size: 10px; fill: var(--cv-amber); text-transform: uppercase; }

/* ---------- Article ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--cv-accent); transform-origin: left; transform: scaleX(0); }
.article__title { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.1; letter-spacing: -0.028em; font-weight: 620; text-wrap: balance; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 20px; font-size: 14px; color: var(--cv-muted); }
.article__body { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(56px, 8vw, 96px); font-size: 1.08rem; line-height: 1.7; }
.article__body > * + * { margin-top: 1.1em; }
.article__body h2 { margin-top: 2em; font-size: 1.45rem; line-height: 1.25; letter-spacing: -0.015em; }
.article__body ul { display: grid; gap: 8px; }
.article__body ul li { position: relative; padding-left: 20px; }
.article__body ul li::before { content: ''; position: absolute; left: 2px; top: 0.8em; width: 8px; height: 1.5px; background: var(--accent); }
.article__body blockquote { padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); font-size: 1.2rem; line-height: 1.5; color: var(--ink); }
.article__body a { color: var(--accent-ink); }
.article__formula { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow-x: auto; }
.article__formula code { font-family: var(--font-mono); font-size: 0.95rem; white-space: nowrap; }
.article__note { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid rgba(154, 75, 0, 0.35); border-radius: var(--radius-sm); background: var(--amber-soft); font-size: 0.98rem; }
.article__note .icon { flex: none; width: 18px; height: 18px; color: var(--amber); margin-top: 4px; }
.article__aside, .article__related { margin-top: 2.4em; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.article__aside .btn { margin-top: 12px; }
.article__related ul { display: grid; gap: 8px; }
.legal h2 { font-size: 1.25rem; }
.legal a { color: var(--accent-ink); }

/* ---------- About ---------- */
.about-split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px clamp(32px, 6vw, 88px); }
.prose { display: grid; gap: 16px; font-size: 1.06rem; color: var(--ink-2); max-width: 64ch; }
@media (max-width: 860px) { .about-split { grid-template-columns: 1fr; } }
.group-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px 48px; align-items: center; padding: clamp(24px, 4vw, 44px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.group-card__title { font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.25; font-weight: 600; margin-bottom: 12px; }
.group-card__copy p:last-child { color: var(--ink-2); }
.group-card__links { display: grid; gap: 14px; justify-items: start; }
@media (max-width: 860px) { .group-card { grid-template-columns: 1fr; } }
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.principle { padding-top: 16px; border-top: 2px solid var(--ink); }
.principle__num { font-size: 12px; color: var(--accent-ink); }
.principle__title { margin: 8px 0; font-size: 1.1rem; font-weight: 600; }
.principle__text { color: var(--ink-2); font-size: 15px; }
@media (max-width: 960px) { .principles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .principles { grid-template-columns: 1fr; } }
.audiences { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.audiences li { padding: 20px 0; border-top: 1px solid var(--line-strong); }
.audiences__title { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.audiences p { color: var(--ink-2); font-size: 15px; }
@media (max-width: 960px) { .audiences { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .audiences { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.page-hero--contact { padding-bottom: clamp(56px, 8vw, 96px); }
.contact { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 32px clamp(32px, 5vw, 72px); align-items: start; }
.next-steps { display: grid; gap: 16px; margin-top: 32px; }
.next-steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.next-steps .mono { color: var(--cv-accent); font-size: 12px; padding-top: 3px; }
.next-steps p { color: var(--cv-muted); font-size: 14.5px; }
.contact__note { margin-top: 20px; font-size: 14px; color: var(--cv-muted); }
.contact__note a { color: var(--cv-text); }
.contact__form-wrap { padding: clamp(20px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--paper); color: var(--ink); }
.form { display: grid; gap: 18px; }
.form__group { display: grid; gap: 14px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.form__legend { padding: 0 6px; font-weight: 600; font-size: 15px; }
.form__privacy-note { font-size: 13.5px; color: var(--ink-2); padding: 12px 14px; border-left: 3px solid var(--line-strong); background: var(--surface-2); }
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__footer { display: grid; gap: 16px; justify-items: start; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 14.5px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.check label a { color: var(--accent-ink); }
.check .field__error { grid-column: 2; }
.form__alert { padding: 12px 14px; border: 1px solid rgba(180, 35, 44, 0.4); border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-weight: 500; }
.form__status { font-size: 14px; color: var(--ink-2); min-height: 1.4em; }
.form-success { display: grid; gap: 12px; justify-items: start; padding: 8px 0; }
.form-success h2 { font-size: 1.6rem; }
.form-success p { color: var(--ink-2); }
.form-success__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
@media (max-width: 960px) { .contact { grid-template-columns: 1fr; } }

.form-failed { display: grid; gap: 12px; justify-items: start; padding: 16px; border: 1px solid rgba(180, 35, 44, 0.4); border-left: 4px solid var(--danger); border-radius: var(--radius); background: var(--danger-soft); }
.form-failed h2 { font-size: 1.4rem; }
.form-failed a:not(.btn) { color: var(--accent-ink); }

/* ---------- Direct contact details (About, Contact, enquiry band) ---------- */
.hero-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 32px clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 900px) { .hero-split { grid-template-columns: 1fr; } }
.direct { display: grid; gap: 12px; }
.direct__title { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cv-accent); }
.direct__list { display: grid; gap: 10px; }
.direct__item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 14px 18px;
  border: 1px solid var(--cv-line-2);
  border-radius: var(--radius);
  background: var(--cv-panel);
  color: var(--cv-text);
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}
.direct__item:hover { border-color: var(--cv-accent); background: var(--cv-raise); }
.direct__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--cv-accent-soft); color: var(--cv-accent); }
.direct__icon .icon { width: 22px; height: 22px; }
.direct__body { display: grid; min-width: 0; }
.direct__label { font-size: 13px; color: var(--cv-muted); }
.direct__value { font-size: clamp(1.1rem, 1.8vw, 1.35rem); font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.direct__note { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--cv-muted); }
.direct__note .icon { width: 18px; height: 18px; color: var(--cv-accent); flex: none; }
.contact__intro .direct { margin-top: 28px; }
.direct--compact { width: 100%; margin-top: 6px; }
.direct--compact .direct__title { color: var(--cv-muted); }
.direct--compact .direct__list { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.direct--compact .direct__item { min-height: 56px; padding: 10px 14px; }
.direct--compact .direct__icon { width: 38px; height: 38px; }
.direct--compact .direct__value { font-size: 1.05rem; }
@media (prefers-reduced-motion: no-preference) {
  .direct__item:hover { transform: translateY(-2px); }
}

/* ---------- 404 ---------- */
.notfound__code { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; color: var(--cv-amber); }

/* ---------- Footer ---------- */
.site-footer { background: #080f18; color: var(--cv-muted); padding: clamp(48px, 6vw, 72px) 0 28px; font-size: 14.5px; }
.site-footer a { color: var(--cv-text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer__top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-footer__brand { display: grid; gap: 14px; align-content: start; }
.site-footer__brand p { max-width: 42ch; }
.site-footer__message { font-family: var(--font-mono); font-size: 12.5px; color: var(--cv-muted); }
.site-footer__brand .link-arrow { color: var(--cv-accent); }
.site-footer__heading { margin-bottom: 14px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cv-muted); }
.site-footer__col ul { display: grid; gap: 4px; }
.site-footer__col li a { display: inline-block; padding: 6px 0; }
.site-footer__contact li { display: flex; gap: 8px; align-items: center; }
.site-footer__contact .icon { width: 16px; height: 16px; color: var(--cv-accent); flex: none; }
.site-footer__contact-note { font-size: 13.5px; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--cv-line); font-size: 13px; }
.site-footer__legal { display: flex; gap: 18px; }
@media (max-width: 900px) { .site-footer__top { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .site-footer__top { grid-template-columns: 1fr; } }

/* ==========================================================================
   Motion — every animation explains something and runs once (under 5 s),
   except the fault-current flow in the fault-sequence tool, which lasts only
   while that fault exists. All of it is switched off for reduced motion.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {

  /* ---------- Shared keyframes ---------- */
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
  @keyframes fade-in { from { opacity: 0; } }
  @keyframes draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
  @keyframes appear { to { opacity: 1; } }
  @keyframes vanish { to { opacity: 0; } }
  @keyframes travel { from { stroke-dashoffset: 12; } to { stroke-dashoffset: -100; } }
  @keyframes ripple {
    from { opacity: 0.9; transform: scale(1); }
    to { opacity: 0; transform: scale(4.2); }
  }
  @keyframes pop {
    0% { opacity: 0; transform: scale(0.2); }
    70% { opacity: 1; transform: scale(1.18); }
    100% { opacity: 1; transform: scale(1); }
  }
  @keyframes halo {
    0% { opacity: 0; transform: scale(0.9); }
    35% { opacity: 1; }
    100% { opacity: 0; transform: scale(1.12); }
  }
  @keyframes zone-in {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: none; }
  }
  @keyframes march { to { stroke-dashoffset: -24; } }
  @keyframes blink-once { 0%, 100% { opacity: 1; } 40% { opacity: 0.25; } }
  @keyframes dot-pop { 50% { transform: scale(1.45); } }

  /* ---------- Hero and page heroes: staggered entrance ---------- */
  .hero__copy .eyebrow,
  .hero__title span,
  .hero__lead,
  .hero__actions,
  .hero__message li,
  .page-hero .crumbs,
  .page-hero .eyebrow,
  .page-hero__title,
  .page-hero__lead,
  .page-hero__actions,
  .challenge-hero__copy .btn,
  .article__title,
  .article__meta { animation: rise 0.7s var(--ease) both; }
  .hero__title span:nth-child(1) { animation-delay: 0.08s; }
  .hero__title span:nth-child(2) { animation-delay: 0.2s; }
  .hero__lead, .page-hero__title, .article__title { animation-delay: 0.12s; }
  .hero__actions, .page-hero__lead, .article__meta { animation-delay: 0.24s; }
  .page-hero__actions, .challenge-hero__copy .btn { animation-delay: 0.34s; }
  .hero__message li:nth-child(1) { animation-delay: 0.36s; }
  .hero__message li:nth-child(2) { animation-delay: 0.46s; }
  .hero__message li:nth-child(3) { animation-delay: 0.56s; }
  .hero__explorer, .challenge-hero__diagram { animation: fade-in 0.9s ease 0.3s both; }

  /* ---------- Scroll entrances (classes added by main.js) ---------- */
  .rv {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
    transition-delay: calc(var(--rv, 0) * 70ms);
  }
  .rv.rv-in { opacity: 1; transform: none; }

  /* ---------- Diagram: one-off scenario illustration ---------- */
  .sld.is-animating[data-scenario='trips'] .sld-anim > [data-for='trips'],
  .sld.is-animating[data-scenario='changes'] .sld-anim > [data-for='changes'],
  .sld.is-animating[data-scenario='aging'] .sld-anim > [data-for='aging'] { display: inline; }

  /* Fault / contribution current: the path draws from the source towards the
     fault, a brighter pulse travels along it, then it hands back to the
     static highlight. */
  .sld-flow {
    fill: none;
    stroke: var(--cv-amber);
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    opacity: 0;
  }
  .sld.is-animating .sld-flow {
    animation:
      appear 0s linear var(--d) forwards,
      draw var(--t, 0.8s) cubic-bezier(0.5, 0, 0.6, 1) var(--d) forwards,
      vanish 0.7s ease 3.9s forwards;
  }
  .sld-pulse {
    fill: none;
    stroke: #fff1cf;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 12 100;
    stroke-dashoffset: 12;
    opacity: 0;
  }
  .sld.is-animating .sld-pulse {
    animation:
      appear 0s linear var(--d) forwards,
      travel 0.85s linear var(--d) 2 forwards,
      vanish 0.2s ease calc(var(--d) + 1.7s) forwards;
  }
  .sld-ripple {
    fill: none;
    stroke: var(--cv-amber);
    stroke-width: 1.6;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
  }
  .sld.is-animating .sld-ripple { animation: ripple 1.2s ease-out var(--d) both; }

  /* The fault itself strikes first. */
  .sld.is-animating[data-scenario='trips'] .sld-fault:not(.sld-fault--head) {
    stroke-dasharray: 100;
    animation: draw 0.3s ease-in both;
  }
  .sld.is-animating[data-scenario='trips'] .sld-fault--head,
  .sld.is-animating[data-scenario='trips'] .sld-fault-label { animation: fade-in 0.2s ease 0.25s both; }

  /* Network change: the added source is drawn in before its contribution flows. */
  .sld.is-animating[data-scenario='changes'] [data-id='gen'] .sld-change {
    stroke-dasharray: none;
    animation: fade-in 0.6s ease both;
  }
  .sld.is-animating[data-scenario='changes'] [data-id='gen'] text { animation: fade-in 0.5s ease 0.35s both; }

  /* Aging protection: the relay under review is singled out, then each
     interface it depends on is traced in turn. */
  .sld-halo {
    fill: none;
    stroke: var(--cv-amber);
    stroke-width: 1.5;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
  }
  .sld.is-animating .sld-halo { animation: halo 1.1s ease-out 0.1s 2 both; }
  .sld-signal {
    fill: none;
    stroke: var(--cv-accent);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 14 100;
    stroke-dashoffset: 14;
    opacity: 0;
  }
  .sld.is-animating .sld-signal {
    animation:
      appear 0s linear var(--d) forwards,
      travel 0.75s ease-in-out var(--d) 2 forwards,
      vanish 0.2s ease calc(var(--d) + 1.5s) forwards;
  }

  /* New design: zones are laid out one after another. */
  .sld-zone { transform-box: fill-box; transform-origin: center; }
  .sld.is-animating[data-scenario='design'] .sld-zone {
    animation: zone-in 0.55s var(--ease) calc(0.15s + var(--z, 0) * 0.32s) both;
  }
  .sld.is-animating[data-scenario='design'] .sld-zone-label { animation: fade-in 0.4s ease 0.6s both; }

  /* Numbered callouts arrive in reading order once the story has played. */
  .sld-marker__in { transform-box: fill-box; transform-origin: center; }
  .sld.is-animating .sld-marker__in {
    animation: pop 0.42s var(--ease) calc(var(--base, 1.5s) + var(--i, 0) * 0.22s) both;
  }

  /* Highlight colours ease in rather than snapping. */
  .sld-el { transition: opacity 0.45s ease; }

  /* ---------- Explorer: panel content follows the selection ---------- */
  .is-enhanced .xpanel:not([hidden]) > * { animation: rise 0.45s var(--ease) both; }
  .is-enhanced .xpanel:not([hidden]) > :nth-child(2) { animation-delay: 0.04s; }
  .is-enhanced .xpanel:not([hidden]) > :nth-child(3) { animation-delay: 0.08s; }
  .is-enhanced .xpanel:not([hidden]) > :nth-child(n + 4) { animation-delay: 0.12s; }
  .is-enhanced .xpanel:not([hidden]) .xpanel__callouts li { animation: rise 0.4s var(--ease) both; }
  .is-enhanced .xpanel:not([hidden]) .xpanel__callouts li:nth-child(2) { animation-delay: 0.08s; }
  .is-enhanced .xpanel:not([hidden]) .xpanel__callouts li:nth-child(3) { animation-delay: 0.16s; }
  .is-enhanced .xpanel:not([hidden]) .xpanel__callouts li:nth-child(4) { animation-delay: 0.24s; }
  .is-enhanced .xpanel:not([hidden]) .xpanel__callouts li:nth-child(5) { animation-delay: 0.32s; }
  .xtab { transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease); }
  .xtab:hover:not(.is-active) { transform: translateX(3px); }
  .xtab.is-active .xtab__num { animation: dot-pop 0.35s var(--ease); display: inline-block; }

  /* ---------- Deliverable previews draw themselves ---------- */
  .dlv.is-inview .dlv__panel:not([hidden]) .dlv__text > * { animation: rise 0.45s var(--ease) both; }
  .dlv.is-inview .dlv__panel:not([hidden]) .dlv__text > :nth-child(n + 3) { animation-delay: 0.06s; }
  .dlv.is-inview .dlv__panel:not([hidden]) .dlv__text > :nth-child(n + 5) { animation-delay: 0.12s; }
  .dlv.is-inview .dlv__panel:not([hidden]) .doc { animation: rise 0.6s var(--ease) 0.08s both; }
  .dlv.is-inview .dlv__panel:not([hidden]) .doc__ribbon { animation: fade-in 0.5s ease 0.4s both; }
  .dlv.is-inview .dlv__panel:not([hidden]) :is(.doc__c1, .doc__c2) { stroke-dasharray: 100; animation: draw 1.1s cubic-bezier(0.4, 0, 0.2, 1) both; }
  .dlv.is-inview .dlv__panel:not([hidden]) .doc__c1 { animation-delay: 0.45s; }
  .dlv.is-inview .dlv__panel:not([hidden]) .doc__c2 { animation-delay: 0.75s; }
  .dlv.is-inview .dlv__panel:not([hidden]) .doc__fl { transform-box: fill-box; transform-origin: top; animation: zone-in 0.5s var(--ease) 1.5s both; }
  .dlv.is-inview .dlv__panel:not([hidden]) .doc__tcc text { animation: fade-in 0.4s ease 1.4s both; }
  .dlv.is-inview .dlv__panel:not([hidden]) .doc__wire path { stroke-dasharray: 100; animation: draw 1.3s ease-in-out 0.55s both; }
  .dlv.is-inview .dlv__panel:not([hidden]) .doc__blk > * { animation: fade-in 0.4s ease 0.35s both; }
  .dlv.is-inview .dlv__panel:not([hidden]) :is(.doc__table tr, .doc__steps li, .doc__memo > div) { animation: rise 0.4s var(--ease) both; }
  .dlv.is-inview .dlv__panel:not([hidden]) :is(.doc__table tr, .doc__steps li, .doc__memo > div):nth-child(2) { animation-delay: 0.45s; }
  .dlv.is-inview .dlv__panel:not([hidden]) :is(.doc__table tr, .doc__steps li, .doc__memo > div):nth-child(3) { animation-delay: 0.55s; }
  .dlv.is-inview .dlv__panel:not([hidden]) :is(.doc__table tr, .doc__steps li, .doc__memo > div):nth-child(4) { animation-delay: 0.65s; }
  .dlv.is-inview .dlv__panel:not([hidden]) :is(.doc__table tr, .doc__steps li, .doc__memo > div):nth-child(5) { animation-delay: 0.75s; }
  .dlv.is-inview .dlv__panel:not([hidden]) :is(.doc__table tr, .doc__steps li, .doc__memo > div):nth-child(n + 6) { animation-delay: 0.85s; }
  .dlv.is-inview .dlv__panel:not([hidden]) :is(.doc__table tr, .doc__steps li, .doc__memo > div):first-child { animation-delay: 0.35s; }
  .dlv__tab { transition: color 0.2s, background-color 0.2s, box-shadow 0.25s var(--ease), padding-left 0.25s var(--ease); }
  .dlv__tab.is-active { padding-left: 14px; }

  /* ---------- Collaboration stages ---------- */
  .stage.is-active .stage__dot { animation: dot-pop 0.4s var(--ease); }
  .stages::after { transition: transform 0.15s linear; }

  /* ---------- Feeder fault sequence: fault current is shown flowing ---------- */
  .gs-seg[data-state='fault'] { stroke-dasharray: 8 4; animation: march 0.45s linear infinite; stroke-width: 2.6; }
  .gs-ring { fill: none; stroke: var(--cv-amber); stroke-width: 1.4; transform-box: fill-box; transform-origin: center; animation: ripple 1.3s ease-out infinite; }
  .gs-ring + .gs-ring { animation-delay: 0.65s; }
  .gs-cb { transition: fill 0.25s, stroke 0.25s; }
  .gs-tag rect { transition: stroke 0.2s; }
  .gs-tag[data-state='trip'] rect { animation: blink-once 0.5s ease 2; }
  .gs-bus { transition: stroke 0.3s; }
  .fseq__log li { animation: rise 0.35s var(--ease) both; }

  /* ---------- Micro-interactions ---------- */
  .tool-link, .insight-card__link, .map__row, .outputs__col { transition: border-color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s; }
  .tool-link:hover, .insight-card__link:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -20px rgba(19, 28, 40, 0.45); }
  .pill { transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease); }
  .pill:hover { transform: translateY(-2px); }
  .btn { transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.15s; }
  .btn:active { transform: translateY(1px); }
  .xpanel__deliv a { transition: border-color 0.2s, transform 0.2s var(--ease); }
  .xpanel__deliv a:hover { transform: translateY(-2px); }
}

/* The motion layer only shows while a scenario is being illustrated. */
.sld-anim > g { display: none; }
html:not(.js) .sld-anim { display: none; }

/* ---------- Touch targets: at least 44 px on phones and tablets ---------- */
@media (max-width: 1024px) {
  .site-header__brand, .site-footer__brand > a:first-child { display: inline-flex; align-items: center; min-height: 44px; }
  .btn--sm, .pill, .nav__menu-link, .xpanel__deliv a, .segmented__btn, .filter__btn { min-height: 44px; }
  .nav__menu-link { align-items: center; }
  .link-arrow { min-height: 44px; }
  .site-footer__col li a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
  .site-footer__contact li { min-height: 44px; }
  .site-footer__contact li a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer__legal a { display: inline-flex; align-items: center; min-height: 44px; }
  .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
  .crumbs { margin-bottom: 8px; }
  .related-links ul, .article__related ul { gap: 0; }
  input[type='range'] { height: 44px; }
  .switch { min-height: 44px; }
  .check { grid-template-columns: 26px 1fr; }
  .check input { width: 24px; height: 24px; margin-top: 0; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .enquire, .explorer__tabs, .read-progress { display: none !important; }
  .canvas { background: none; color: #000; }
}
