/* pdigger.com and scada.pdigger.com: the pdigger family look (as factory.pdigger.com and outdoors.pdigger.com),
   with the components both sites share: header, buttons, (i) informers, looping films, figures, forms and footer.
   No inline styles anywhere: the Content-Security-Policy forbids them. */

/* ─── Fonts: Adobe Source families (SIL OFL 1.1), latin subsets, hosted here ─── */
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 200 900; font-display: swap; src: url('fonts/source-sans-3-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: italic; font-weight: 200 900; font-display: swap; src: url('fonts/source-sans-3-latin-wght-italic.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 200 900; font-display: swap; src: url('fonts/source-serif-4-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 200 900; font-display: swap; src: url('fonts/source-serif-4-latin-wght-italic.woff2') format('woff2'); }
@font-face { font-family: 'Source Code Pro'; font-style: normal; font-weight: 200 900; font-display: swap; src: url('fonts/source-code-pro-latin-wght-normal.woff2') format('woff2'); }

/* ─── Tokens ─── */
:root {
  --font-sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono: 'Source Code Pro', ui-monospace, 'SF Mono', Menlo, monospace;

  --paper: #ece9e4;
  --paper-2: #e3dfd8;
  --surface: #f6f4f0;
  --surface-2: #ffffff;
  --ink: #16181b;
  --ink-2: #33373c;
  --muted: #595e65;
  --faint: #8a8f95;
  --line: rgb(22 24 27 / 0.12);
  --line-strong: rgb(22 24 27 / 0.26);
  --grid: rgb(22 24 27 / 0.055);
  --accent: #e4502a;
  --accent-ink: #a8391a;
  --accent-soft: #f6d3c5;
  --teal: #0e6f73;
  --teal-soft: #cfe3e1;
  --data: #2c66c9;
  --data-soft: #d9e4f7;
  --amber: #9a6600;
  --alarm: #c8372d;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.6) inset, 0 18px 40px -24px rgb(22 24 27 / 0.35);
  --focus: #0e6f73;

  --hmi: #16191d;
  --hmi-2: #1f2328;
  --hmi-ink: #e9e6e1;
  --hmi-muted: #9da3aa;
  --hmi-line: rgb(233 230 225 / 0.1);

  --radius-s: 10px;
  --radius: 18px;
  --radius-l: 28px;
  --radius-xl: 44px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0d0e10; --paper-2: #131518; --surface: #181b1f; --surface-2: #1f2327;
    --ink: #ece9e4; --ink-2: #cbc7c0; --muted: #a2a7ad; --faint: #777d84;
    --line: rgb(236 233 228 / 0.12); --line-strong: rgb(236 233 228 / 0.26); --grid: rgb(236 233 228 / 0.045);
    --accent: #ff6b3d; --accent-ink: #ff8f68; --accent-soft: #3a1d13;
    --teal: #3fbfc2; --teal-soft: #10302f; --data: #7ea8f0; --data-soft: #16233a; --amber: #ffb627; --alarm: #ff6a5a;
    --shadow: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 24px 60px -30px rgb(0 0 0 / 0.8);
    --focus: #3fd0d4; --hmi: #111316; --hmi-2: #191c20;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #0d0e10; --paper-2: #131518; --surface: #181b1f; --surface-2: #1f2327;
  --ink: #ece9e4; --ink-2: #cbc7c0; --muted: #a2a7ad; --faint: #777d84;
  --line: rgb(236 233 228 / 0.12); --line-strong: rgb(236 233 228 / 0.26); --grid: rgb(236 233 228 / 0.045);
  --accent: #ff6b3d; --accent-ink: #ff8f68; --accent-soft: #3a1d13;
  --teal: #3fbfc2; --teal-soft: #10302f; --data: #7ea8f0; --data-soft: #16233a; --amber: #ffb627; --alarm: #ff6a5a;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 24px 60px -30px rgb(0 0 0 / 0.8);
  --focus: #3fd0d4; --hmi: #111316; --hmi-2: #191c20;
  color-scheme: dark;
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--paper); }
body {
  margin: 0; min-height: 100svh; background: var(--paper); color: var(--ink);
  font-family: var(--font-sans); font-size: 1.0625rem; line-height: 1.55; font-optical-sizing: auto; font-kerning: normal;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow-x: clip;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #111; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1.02; letter-spacing: -0.025em; text-wrap: balance; }
p, ul, ol, dl, figure { margin: 0; }
p { text-wrap: pretty; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: 12px; z-index: 1000; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; transform: translateY(-160%); transition: transform 0.2s var(--ease); }
.skip-link:focus { transform: none; }

.display { font-size: clamp(3rem, 7.4vw, 7.2rem); line-height: 0.9; letter-spacing: -0.045em; font-weight: 850; }
.h1 { font-size: clamp(2.5rem, 5.6vw, 5.25rem); line-height: 0.95; letter-spacing: -0.04em; font-weight: 830; }
.h2 { font-size: clamp(2rem, 3.9vw, 3.4rem); line-height: 1; letter-spacing: -0.035em; }
.h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.1; letter-spacing: -0.02em; }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 500; letter-spacing: -0.02em; }
.lead { font-size: clamp(1.15rem, 1.5vw, 1.4rem); line-height: 1.45; color: var(--ink-2); max-width: 40ch; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--font-mono); }
.kicker { display: inline-flex; align-items: center; gap: 0.6em; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.kicker::before { content: ''; width: 0.62em; height: 0.62em; border-radius: 2px; background: var(--accent); flex: none; }
.kicker--teal::before { background: var(--teal); }
.kicker--data::before { background: var(--data); }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(900px + 2 * var(--gutter)); }
.section { padding-block: clamp(64px, 9vw, 128px); position: relative; scroll-margin-top: var(--header-h); }
.section--tight { padding-block: clamp(40px, 6vw, 80px); }
.section--dark { background: var(--hmi); color: var(--hmi-ink); }
.section--dark .kicker { color: var(--hmi-muted); }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(32px, 4.5vw, 60px); }
.section-head--split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: end; column-gap: 48px; }
.section-head .lead { max-width: 44ch; }
.title-line { display: flex; align-items: baseline; gap: 0.35em; flex-wrap: wrap; }
.cluster { display: flex; flex-wrap: wrap; gap: var(--gap, 12px); align-items: center; }

.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ─── Header ─── */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.site-header.is-scrolled { background: color-mix(in srgb, var(--paper) 96%, transparent); box-shadow: 0 1px 0 var(--line); }
.site-header__inner { height: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 850; font-size: 1.4rem; letter-spacing: -0.045em; margin-right: auto; white-space: nowrap; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__plate { fill: var(--ink); transition: fill 0.5s var(--ease); }
.brand__a { fill: var(--accent); }
.brand__b { fill: var(--paper); }
.brand__word { line-height: 1; padding-bottom: 2px; }
.brand__slash { color: var(--accent); font-weight: 600; margin: 0 0.06em; }
.site-nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 5px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.site-nav__list a { display: block; padding: 7px 14px 8px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.96rem; transition: background-color 0.25s var(--ease), color 0.25s var(--ease); white-space: nowrap; }
.site-nav__list a:hover { background: var(--paper-2); }
.site-nav__list a.site-nav__cta { background: var(--accent); color: #16181b; }
.site-nav__toggle { display: none; }
.lights { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.lights__plate { position: relative; width: 26px; height: 38px; border-radius: 8px; background: linear-gradient(180deg, #d9dcdf, #aeb3b8); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.7), inset 0 -2px 3px rgb(0 0 0 / 0.25), 0 1px 2px rgb(0 0 0 / 0.25); }
.lights__plate::before { content: ''; position: absolute; inset: 7px 9px; border-radius: 5px; background: #3b4046; box-shadow: inset 0 2px 3px rgb(0 0 0 / 0.6); }
.lights__lever { position: absolute; left: 50%; top: 50%; width: 12px; height: 17px; margin-left: -6px; border-radius: 4px; background: linear-gradient(180deg, #f4f5f6, #c3c8cd); box-shadow: 0 2px 3px rgb(0 0 0 / 0.35), inset 0 -2px 0 rgb(0 0 0 / 0.12); transform: translateY(-15px); transition: transform 0.35s var(--ease-spring), background 0.35s; }
.lights[aria-checked='false'] .lights__lever { transform: translateY(-2px); background: linear-gradient(180deg, #ff8a5f, #e4502a); }
.lights__label { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }

/* ─── Buttons, chips ─── */
.button { --b-bg: var(--ink); --b-fg: var(--paper); display: inline-flex; align-items: center; gap: 0.6em; min-height: 48px; padding: 0.7em 1.35em 0.78em; border: 0; border-radius: 999px; background: var(--b-bg); color: var(--b-fg); font-weight: 700; font-size: 1.02rem; line-height: 1.1; text-decoration: none; white-space: nowrap; transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgb(0 0 0 / 0.55); }
.button:active { transform: translateY(0); }
.button [aria-hidden] { transition: transform 0.25s var(--ease); }
.button:hover [aria-hidden] { transform: translateX(4px); }
.button--accent { --b-bg: var(--accent); --b-fg: #16181b; }
.button--ghost { --b-bg: transparent; --b-fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.button--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.button--small { min-height: 38px; font-size: 0.92rem; padding: 0.5em 1em 0.56em; }
.button[disabled] { opacity: 0.55; cursor: progress; transform: none; }
.text-link { font-weight: 700; text-decoration: underline; text-underline-offset: 0.22em; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px 6px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: var(--dot, var(--accent)); flex: none; }
.pill--outdoors { --dot: var(--accent); }
.pill--factory { --dot: var(--teal); }
.pill--scada { --dot: var(--data); }
.card { position: relative; border-radius: var(--radius-l); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); overflow: hidden; }

/* ─── (i) informers: a small button; its text sits beside it for screen readers and shows in a floating card ─── */
.info { position: relative; display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; padding: 0; margin: 0 0 0 0.3em; border: 0; border-radius: 50%; vertical-align: 0.2em; background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line-strong); font-family: var(--font-serif); font-style: italic; font-weight: 700; font-size: 14px; line-height: 1; letter-spacing: 0; text-transform: none; transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease); }
.info::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; }
.info:hover, .info[aria-expanded='true'] { background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); }
.info:active { transform: scale(0.94); }
.info--light { background: rgb(22 25 29 / 0.82); color: #f4f1ec; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.55); }
.info--light:hover, .info--light[aria-expanded='true'] { background: #f4f1ec; color: #16181b; box-shadow: inset 0 0 0 1.5px #f4f1ec; }
.h1 .info, .h2 .info, .display .info { width: 26px; height: 26px; font-size: 16px; vertical-align: 0.45em; }
.info-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
html:not(.js) .info { display: none; }
html:not(.js) .info-text { position: static !important; width: auto; height: auto; margin: 6px 0 0; clip: auto; white-space: normal; overflow: visible; display: block; font-size: 0.92rem; color: var(--muted); font-weight: 400; letter-spacing: 0; text-transform: none; font-family: var(--font-sans); }
.info-pop { position: fixed; z-index: 90; left: 0; top: 0; width: max-content; max-width: min(360px, calc(100vw - 24px)); padding: 14px 16px 15px; border-radius: 14px; background: var(--surface-2); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong), 0 26px 50px -22px rgb(0 0 0 / 0.55); font-family: var(--font-sans); font-size: 0.97rem; font-weight: 400; line-height: 1.45; letter-spacing: 0; text-transform: none; text-align: left; opacity: 0; transform: translateY(4px); transition: opacity 0.16s var(--ease), transform 0.16s var(--ease); pointer-events: none; }
.info-pop.is-open { opacity: 1; transform: none; pointer-events: auto; }
.info-pop[hidden] { display: none; }
.info-pop__t { display: block; font-weight: 800; font-size: 1.02rem; letter-spacing: -0.01em; margin-bottom: 4px; }
.info-pop__v { display: block; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.93rem; }
.info-pop__v::before { content: 'Value'; display: block; margin-bottom: 2px; font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.info-pop__arrow { position: absolute; width: 12px; height: 12px; background: var(--surface-2); transform: rotate(45deg); box-shadow: 1px 1px 0 0 var(--line-strong); left: var(--ax, 50%); margin-left: -6px; }
.info-pop[data-side='below'] .info-pop__arrow { top: -6px; box-shadow: -1px -1px 0 0 var(--line-strong); }
.info-pop[data-side='above'] .info-pop__arrow { bottom: -6px; }
.info-pop code, .info-text code { font-family: var(--font-mono); font-size: 0.86em; padding: 0.05em 0.3em; border-radius: 5px; background: var(--paper-2); }

/* ─── Hotspots over a picture ─── */
.hotspots { position: relative; }
.hs { position: absolute; z-index: 2; transform: translate(-50%, -50%); display: grid; place-items: center; width: 28px; height: 28px; }
.hs .info { margin: 0; width: 28px; height: 28px; font-size: 16px; }
.hs::before { content: ''; position: absolute; width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 0 rgb(255 255 255 / 0.65); animation: hs-pulse 2.6s var(--ease) infinite; pointer-events: none; }
@keyframes hs-pulse { 0% { box-shadow: 0 0 0 0 rgb(255 255 255 / 0.65); } 70%, 100% { box-shadow: 0 0 0 14px rgb(255 255 255 / 0); } }

/* ─── Looping films (play only while on screen; muted unless asked) ─── */
.loop { position: relative; border-radius: var(--radius-l); overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 40px 80px -50px rgb(0 0 0 / 0.6); }
.loop video, .loop img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #e8e4e0; }
.loop__bar { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--surface); }
.loop__bar .loop__label { margin-right: auto; padding-left: 6px; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.loop__bar button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 5px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.loop__bar button:hover { background: var(--paper-2); }
.loop__bar button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.loop__bar svg { width: 16px; height: 16px; }
.loop video::cue { font-family: var(--font-sans); font-size: 1rem; background: rgb(22 25 29 / 0.82); color: #f4f2ee; }

/* ─── YouTube films: a local poster until the visitor presses play ─── */
.yt { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--hmi); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -40px rgb(0 0 0 / 0.7); }
.yt__poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; }
.yt__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.yt__poster:hover img, .yt__poster:focus-visible img { transform: scale(1.03); }
.yt__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #16181b; box-shadow: 0 16px 34px -14px rgb(0 0 0 / 0.65); transition: transform 0.25s var(--ease); pointer-events: none; }
.yt__play svg { width: 24px; height: 24px; margin-left: 4px; }
.yt__poster:hover .yt__play, .yt__poster:focus-visible .yt__play { transform: translate(-50%, -50%) scale(1.08); }
.yt__len { position: absolute; right: 10px; bottom: 10px; padding: 4px 8px; border-radius: 6px; background: rgb(22 25 29 / 0.86); color: #f1eee9; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; pointer-events: none; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt [hidden] { display: none; }

/* ─── Figures and diagrams ─── */
.fig { display: grid; gap: 12px; }
.fig__cap { display: flex; gap: 10px; align-items: baseline; font-size: 0.95rem; color: var(--muted); }
.fig__n { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.diagram { width: 100%; height: auto; overflow: visible; font-family: var(--font-sans); }
.d-text { fill: var(--ink); font-size: 15px; font-weight: 700; }
.d-small { fill: var(--muted); font-size: 12.5px; font-weight: 500; }
.d-mono { fill: var(--muted); font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.d-box { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.5; }
.d-box--ink { fill: var(--ink); stroke: none; }
.d-box--soft { fill: var(--paper-2); stroke: var(--line); stroke-width: 1; }
.d-box--data { fill: var(--data-soft); stroke: var(--data); stroke-width: 1.5; }
.d-box--accent { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.d-box--teal { fill: var(--teal-soft); stroke: var(--teal); stroke-width: 1.5; }
.d-box--dash { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 6 6; }
.d-inv { fill: var(--paper); }
.d-line { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.d-line--ink { stroke: var(--ink); }
.d-line--data { stroke: var(--data); }
.d-line--accent { stroke: var(--accent); }
.d-line--teal { stroke: var(--teal); }
.d-line--dash { stroke-dasharray: 5 6; }
.d-flow { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 2 12; animation: d-flow 1.4s linear infinite; }
.d-flow--data { stroke: var(--data); }
.d-flow--teal { stroke: var(--teal); }
@keyframes d-flow { to { stroke-dashoffset: -28; } }
.d-fill-data { fill: var(--data); }
.d-fill-accent { fill: var(--accent); }
.d-fill-teal { fill: var(--teal); }
.d-fill-ink { fill: var(--ink); }
.d-fill-muted { fill: var(--faint); }
.d-fill-line { fill: var(--line-strong); }
.d-fill-paper2 { fill: var(--paper-2); }

/* ─── Code card ─── */
.code { margin: 0; padding: clamp(16px, 2.2vw, 24px); border-radius: var(--radius); background: var(--hmi); color: var(--hmi-ink); font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.6; overflow-x: auto; white-space: pre; box-shadow: 0 30px 60px -40px rgb(0 0 0 / 0.7); }
.code .c-m { color: #ffb627; font-weight: 700; }
.code .c-k { color: #9fd3ce; }
.code .c-s { color: #f2b49e; }
.code .c-n { color: #e9e6e1; }
.code .c-c { color: #9da3aa; }

/* ─── Contact form ─── */
.form { display: grid; gap: 18px; padding: clamp(22px, 3vw, 40px); }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
.form legend, .form label { font-family: var(--font-mono); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.form legend { margin-bottom: 10px; }
.form label { display: grid; gap: 8px; }
.form .optional { color: var(--muted); font-weight: 500; letter-spacing: 0.04em; text-transform: none; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.options label { position: relative; display: block; font-family: var(--font-sans); font-size: 1rem; letter-spacing: 0; text-transform: none; font-weight: 600; }
.options input { position: absolute; opacity: 0; inset: 0; }
.options span { display: flex; align-items: center; gap: 10px; height: 100%; padding: 13px 15px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line-strong); cursor: pointer; line-height: 1.25; }
.options span::before { content: ''; flex: none; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); background: var(--surface-2); }
.options input:checked + span { box-shadow: inset 0 0 0 2px var(--ink); }
.options input:checked + span::before { background: var(--accent); box-shadow: inset 0 0 0 3px var(--surface-2), 0 0 0 1.5px var(--ink); }
.options input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.form input:not([type='radio']), .form textarea { width: 100%; min-height: 52px; padding: 13px 16px; border: 0; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line-strong); font-family: var(--font-sans); font-size: 1.05rem; letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--ink); transition: box-shadow 0.2s var(--ease); }
.form textarea { min-height: 128px; resize: vertical; line-height: 1.5; }
.form input::placeholder, .form textarea::placeholder { color: var(--muted); }
.form input:not([type='radio']):focus, .form textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--focus), 0 0 0 4px color-mix(in srgb, var(--focus) 22%, transparent); }
.form [aria-invalid='true'] { box-shadow: inset 0 0 0 2px var(--alarm) !important; }
.field-error { font-family: var(--font-sans); font-size: 0.93rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--alarm); }
.field-error:empty { display: none; }
.form__foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.form__foot p { font-size: 0.93rem; color: var(--muted); }
.form-status { font-weight: 600; min-height: 1.5em; }
.form-status.is-error { color: var(--alarm); }
.form-status.is-ok { color: var(--teal); }
.honeypot { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ─── Legal pages ─── */
.legal { max-width: calc(820px + 2 * var(--gutter)); margin: 0 auto; padding: calc(var(--header-h) + clamp(36px, 6vw, 84px)) var(--gutter) 40px; }
.legal h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); letter-spacing: -0.045em; line-height: 0.95; margin: 16px 0 28px; }
.legal h2 { margin-top: 2.2em; font-size: clamp(1.35rem, 2.2vw, 1.75rem); letter-spacing: -0.02em; }
.legal p, .legal li { font-size: 1.06rem; line-height: 1.65; color: var(--ink-2); }
.legal p + p, .legal h2 + p, .legal ul { margin-top: 0.9em; }
.legal a { color: var(--accent-ink); }
.legal .button { color: var(--b-fg); text-decoration: none; margin-top: 28px; }

/* ─── Footer ─── */
.site-footer { position: relative; margin-top: clamp(40px, 8vw, 120px); background: var(--ink); color: var(--paper); border-radius: var(--radius-xl) var(--radius-xl) 0 0; overflow: hidden; }
.site-footer a { color: inherit; }
.site-footer .kicker { color: color-mix(in srgb, var(--paper) 65%, transparent); }
.site-footer__inner { max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding: clamp(56px, 8vw, 104px) var(--gutter) 40px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; }
.site-footer__word { font-weight: 900; font-size: clamp(3.6rem, 10vw, 9.5rem); line-height: 0.8; letter-spacing: -0.065em; margin: 0 0 24px -0.05em; }
.site-footer__tag { max-width: 40ch; color: color-mix(in srgb, var(--paper) 78%, transparent); margin-bottom: 28px; }
.site-footer .button--ghost { --b-fg: var(--paper); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--paper) 35%, transparent); }
.site-footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-content: start; }
.site-footer__cols ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.site-footer__cols a { text-decoration: none; overflow-wrap: anywhere; }
.site-footer__cols a:hover { text-decoration: underline; }
.site-footer__base { max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding: 24px var(--gutter) 32px; border-top: 1px solid color-mix(in srgb, var(--paper) 14%, transparent); display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; font-size: 0.86rem; color: color-mix(in srgb, var(--paper) 72%, transparent); }
.site-footer__base a { text-decoration: underline; text-underline-offset: 3px; }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .section-head--split { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  .site-nav { order: 3; }
  .site-nav__toggle { display: inline-grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
  .site-nav__toggle-bars, .site-nav__toggle-bars::before, .site-nav__toggle-bars::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.2s; }
  .site-nav__toggle-bars { position: relative; }
  .site-nav__toggle-bars::before, .site-nav__toggle-bars::after { content: ''; position: absolute; left: 0; }
  .site-nav__toggle-bars::before { top: -6px; }
  .site-nav__toggle-bars::after { top: 6px; }
  .site-nav__toggle[aria-expanded='true'] .site-nav__toggle-bars { background: transparent; }
  .site-nav__toggle[aria-expanded='true'] .site-nav__toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .site-nav__toggle[aria-expanded='true'] .site-nav__toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
  .site-nav__list { position: fixed; top: calc(var(--header-h) + 6px); left: var(--gutter); right: var(--gutter); flex-direction: column; padding: 10px; border-radius: 24px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -30px rgb(0 0 0 / 0.45); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s; }
  .site-nav__list a { padding: 14px 18px; font-size: 1.15rem; }
  .site-nav.is-open .site-nav__list { opacity: 1; visibility: visible; transform: none; }
  .lights__label { display: none; }
  .lights { padding: 5px; }
  .site-footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .form__row, .options { grid-template-columns: 1fr; }
  .site-footer__cols { grid-template-columns: 1fr 1fr; }
  .brand { font-size: 1.2rem; }
  .brand__mark { width: 30px; height: 30px; }
  .loop__bar { padding: 6px 8px; gap: 4px; }
  .loop__bar button { padding: 5px 9px; }
  .loop__bar .loop__label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .d-flow { animation: none; stroke-dasharray: none; }
}
@media print {
  .site-header, .site-footer, .loop__bar, .info, .skip-link, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .info-text { position: static !important; width: auto; height: auto; margin: 4px 0 0; clip: auto; white-space: normal; overflow: visible; display: block; font-size: 9pt; color: #333; }
  .section { padding-block: 18pt; }
  .loop, .card { box-shadow: none; break-inside: avoid; }
}
