/* ==========================================================================
   im dev · site styles
   Graphite at night, stone by day. One brand accent: amber, the pilot light.
   Every color is a token defined once with light-dark(): the page follows the
   operating system by default, and [data-theme] pins it when the visitor chooses.
   Static CSS, no build step.
   ========================================================================== */

/* ---------- Fonts: subset woff2 (SIL OFL 1.1), plus metric-matched local fallbacks ---------- */
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 300 500; font-style: normal; font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00B0, U+00B3, U+00B7, U+00C7, U+00D6, U+00D7, U+00DC, U+00E7, U+00F6, U+00FC, U+0131, U+2018-2019, U+201C-201D, U+2022, U+2026;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-az.woff2") format("woff2");
  font-weight: 300 500; font-style: normal; font-display: swap;
  unicode-range: U+011E-011F, U+0130, U+015E-015F, U+018F, U+0259;
}
@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/mona-sans-latin.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00B0, U+00B3, U+00B7, U+00C7, U+00D6, U+00D7, U+00DC, U+00E7, U+00F6, U+00FC, U+0131, U+2018-2019, U+201C-201D, U+2022, U+2026;
}
@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/mona-sans-az.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+011E-011F, U+0130, U+015E-015F, U+018F, U+0259;
}
@font-face {
  font-family: "Fragment Mono";
  src: url("../fonts/fragment-mono-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00B0, U+00B3, U+00B7, U+00C7, U+00D6, U+00D7, U+00DC, U+00E7, U+00F6, U+00FC, U+0131, U+2018-2019, U+201C-201D, U+2022, U+2026;
}
@font-face {
  font-family: "Fragment Mono";
  src: url("../fonts/fragment-mono-az.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+011E-011F, U+0130, U+015E-015F, U+018F, U+0259;
}
/* While the web fonts load, local fonts stand in at the same width and height, so nothing jumps. */
@font-face { font-family: "Newsreader Fallback"; src: local("Georgia"); size-adjust: 92.68%; ascent-override: 79.31%; descent-override: 28.59%; line-gap-override: 0%; }
@font-face { font-family: "Mona Sans Fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 103.25%; ascent-override: 105.57%; descent-override: 30.99%; line-gap-override: 0%; }
@font-face { font-family: "Fragment Mono Fallback"; src: local("Courier New"); size-adjust: 102.98%; ascent-override: 92.25%; descent-override: 24.28%; line-gap-override: 0%; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  --f-display: "Newsreader", "Newsreader Fallback", Georgia, serif;
  --f-text: "Mona Sans", "Mona Sans Fallback", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "Fragment Mono", "Fragment Mono Fallback", ui-monospace, Consolas, monospace;
  --f-win: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", var(--f-text);
  --f-win-display: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", var(--f-text);

  /* spacing (4-based) and radius */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 22px; --r-xl: 30px; --r-pill: 999px;

  --gutter: clamp(16px, 5.5vw, 80px);
  --wrap: 1280px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.36, .5, 1);

  /* surfaces and text: light (stone), dark (graphite) */
  --bg: light-dark(#EDECE9, #0A0B0D);
  --bg-2: light-dark(#E6E4E0, #0D0E11);
  --s1: light-dark(#F4F3F0, #111215);
  --s2: light-dark(#FBFBFA, #15161A);
  --s3: light-dark(#F0EFEC, #1B1D21);
  --s4: light-dark(#FFFFFF, #24262B);
  --card: light-dark(#FFFFFF, #15161A);
  --stage: light-dark(#E4E2DD, #131417);
  --wash: light-dark(rgba(255, 255, 255, .6), rgba(255, 239, 220, .045));
  --line: light-dark(rgba(24, 22, 20, .09), rgba(255, 255, 255, .075));
  --line-2: light-dark(rgba(24, 22, 20, .14), rgba(255, 255, 255, .12));
  --line-3: light-dark(rgba(24, 22, 20, .22), rgba(255, 255, 255, .19));
  --hi: light-dark(rgba(255, 255, 255, .85), rgba(255, 255, 255, .065));
  --text: light-dark(#141517, #EDEEF0);
  --text-2: light-dark(#45484D, #A9AEB6);
  --text-3: light-dark(#5D6167, #858B94);

  /* the one brand accent */
  --accent: light-dark(#F08A00, #FFB224);
  --accent-ink: light-dark(#8A4F00, #FFBE4D);
  --accent-soft: light-dark(rgba(240, 138, 0, .12), rgba(255, 178, 36, .11));
  --accent-glow: light-dark(rgba(240, 138, 0, 0), rgba(255, 178, 36, .45));
  --focus: light-dark(#8F5200, #FFB224);

  /* status colors, used inside the interface mockups only */
  --ok: light-dark(#1A7F4D, #5BC48E);
  --bad: light-dark(#B3261E, #FF8A7A);

  /* controls */
  --btn-bg: light-dark(#141517, #EDEEF0);
  --btn-fg: light-dark(#F4F3F0, #0A0B0D);
  --btn-hover: light-dark(#000000, #FFFFFF);
  --btn-top: light-dark(rgba(255, 255, 255, .14), rgba(255, 255, 255, .9));
  --btn-bottom: light-dark(rgba(0, 0, 0, .4), rgba(0, 0, 0, .14));
  --field-bg: light-dark(#FFFFFF, #0E0F12);
  --field-border: light-dark(#8A8E94, #6C717A);

  /* depth */
  --sh-1: light-dark(rgba(38, 32, 24, .06), rgba(0, 0, 0, .3));
  --sh-2: light-dark(rgba(38, 32, 24, .13), rgba(0, 0, 0, .45));
  --sh-3: light-dark(rgba(38, 32, 24, .25), rgba(0, 0, 0, .7));
  --sh-edge: light-dark(rgba(38, 32, 24, .07), rgba(0, 0, 0, .6));
  --shadow-win: 0 0 0 1px var(--sh-edge), 0 2px 4px var(--sh-1), 0 24px 48px -20px var(--sh-3), 0 60px 110px -50px var(--sh-3);
  --shadow-float: 0 0 0 1px var(--sh-edge), 0 3px 8px -3px var(--sh-2), 0 26px 52px -22px var(--sh-3);
  --shadow-soft: 0 1px 2px var(--sh-1), 0 30px 60px -44px var(--sh-3);

  /* the mark */
  --logo-ink: var(--text);
  --logo-light: var(--accent);
  --logo-door: light-dark(#3F4247, #0A0B0D);

  /* code panes stay dark in both themes */
  --code-bg: light-dark(#15171A, #111216);
  --code-bar: light-dark(#1B1D21, #16171B);
  --code-ink: #DCDFE4;
  --code-dim: #8C929B;
  --code-key: #C9CDD4;
  --code-str: #9ED1B3;
  --code-bool: #EAA08D;
  --code-num: #FFBE4D;
}
[data-theme="light"] { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);
  font-synthesis: none;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.nowrap { white-space: nowrap; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg); font-size: 14px; font-weight: 560; text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.label {
  display: flex; align-items: center; gap: 12px;
  font-size: 12.5px; font-weight: 500; letter-spacing: .085em; text-transform: uppercase; color: var(--text-2);
}
.st { display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--text-3); vertical-align: 1px; }
.st-open { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mini-btn { white-space: nowrap; padding: 5px 10px; border-radius: 7px; font-size: 11px; font-weight: 600; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.mini-btn-solid { background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 1px 2px var(--sh-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 32px -24px var(--sh-3);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: var(--s-5); }
.brand { display: inline-flex; align-items: center; padding: 8px; margin-left: -8px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; }
.logo-svg { height: 22px; width: auto; }
.logo-block, .logo-word { fill: var(--logo-ink); }
.logo-lamp { fill: var(--logo-light); }
.logo-door { fill: var(--logo-door); }
.nav { margin-left: auto; }
.nav-list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: var(--r-pill);
  color: var(--text-2); font-size: 15px; font-weight: 500; letter-spacing: -.005em; text-decoration: none;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-list a:hover { color: var(--text); background: var(--line); }
.header-tools { display: flex; align-items: center; gap: var(--s-3); padding-left: var(--s-4); margin-left: var(--s-1); border-left: 1px solid var(--line); height: 28px; }

/* theme switch: native radios with a sliding thumb (hidden when JavaScript is off) */
html:not(.js) .header-tools { display: none; }
.theme-switch {
  --seg: 32px;
  position: relative; display: inline-flex; gap: 2px;
  margin: 0; padding: 3px; border: 0; min-inline-size: 0;
  border-radius: var(--r-pill);
  background: var(--s1);
  box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 2px var(--sh-1);
}
.ts-opt {
  position: relative; z-index: 1; width: var(--seg); height: 28px;
  display: grid; place-items: center; border-radius: var(--r-pill);
  color: var(--text-3); cursor: pointer; transition: color .2s;
}
.ts-opt input { position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; appearance: none; -webkit-appearance: none; }
.ts-opt svg { width: 16px; height: 16px; pointer-events: none; }
.ts-opt:hover, .ts-opt:has(input:checked) { color: var(--text); }
.ts-opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }
.ts-label {
  position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% -4px;
  padding: 4px 8px; border-radius: 6px;
  background: var(--s4); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2), 0 8px 20px -8px var(--sh-3);
  font-size: 12px; font-weight: 500; line-height: 1.3; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s, translate .2s var(--ease);
}
.ts-opt:hover .ts-label, .ts-opt:has(input:focus-visible) .ts-label { opacity: 1; translate: -50% 0; }
.ts-thumb {
  position: absolute; top: 3px; left: 3px; width: var(--seg); height: 28px; border-radius: var(--r-pill);
  background: var(--s4);
  box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--line-2), 0 1px 3px var(--sh-2);
  transform: translateX(calc(var(--i, 2) * (var(--seg) + 2px)));
  transition: transform .42s var(--ease-spring);
}
[data-theme-pref="light"] .ts-thumb { --i: 0; }
[data-theme-pref="dark"] .ts-thumb { --i: 1; }

.menu-btn {
  display: none; align-items: center; gap: 10px;
  height: 36px; padding: 0 14px 0 12px;
  border: 0; border-radius: var(--r-pill);
  background: var(--s1); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2);
  font: 500 14px/1 var(--f-text); cursor: pointer;
}
.menu-icon { display: grid; gap: 4px; width: 14px; }
.menu-icon i { display: block; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease); }
.menu-btn[aria-expanded="true"] .menu-icon i:first-child { transform: translateY(2.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon i:last-child { transform: translateY(-2.75px) rotate(-45deg); }
.mobile-nav { border-top: 1px solid var(--line); background: var(--bg); }
.mobile-nav ul { list-style: none; margin: 0 auto; padding: 8px 0 16px; }
.mobile-nav a { display: flex; padding: 14px 0; border-bottom: 1px solid var(--line); font: 390 26px/1.1 var(--f-display); letter-spacing: -.015em; text-decoration: none; }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 22px 0 26px;
  border: 0; border-radius: var(--r-pill);
  font: 560 15.5px/1 var(--f-text); letter-spacing: -.006em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .25s var(--ease), background-color .2s, box-shadow .25s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn-icon { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn-primary {
  background: var(--btn-bg); color: var(--btn-fg);
  box-shadow: inset 0 1px 0 var(--btn-top), inset 0 -1px 0 var(--btn-bottom), 0 1px 2px var(--sh-2), 0 10px 26px -10px var(--sh-3);
}
.btn-primary:hover { background: var(--btn-hover); transform: translateY(-1px); }
.btn-primary:hover .btn-icon { transform: translateX(3px); }
.btn:active { transform: translateY(0) scale(.98); transition-duration: .08s; }
.btn:focus-visible { outline-offset: 4px; border-radius: var(--r-pill); }
.text-link {
  color: var(--text); font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--line-3);
  transition: color .2s var(--ease), text-decoration-color .2s var(--ease);
}
.text-link:hover { color: var(--accent-ink); text-decoration-color: currentColor; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(4px, 1.6vh, 20px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-copy { position: relative; z-index: 2; padding-block: 24px; }
.eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.eyebrow-rule { width: 28px; height: 1px; background: var(--line-3); }
.display {
  font-family: var(--f-display); font-weight: 380;
  font-size: clamp(44px, 2.9vw + 26px, 72px); line-height: 1.0; letter-spacing: -.032em;
  font-optical-sizing: auto; text-wrap: balance;
}
.full-stop { color: var(--accent); text-shadow: 0 0 .28em var(--accent-glow); }
.lede { margin: 28px 0 36px; max-width: 30em; font-size: clamp(17px, 15.5px + .3vw, 18.5px); line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; }

/* stage: a softly lit panel that frames the scene and bleeds off the right edge */
.stage {
  position: relative; margin: 0; height: 680px;
  margin-right: calc((min(100vw - 2 * var(--gutter), var(--wrap)) - 100vw) / 2);
  border-radius: var(--r-xl) 0 0 var(--r-xl);
  background: var(--stage);
  box-shadow: inset 0 1px 0 var(--hi), inset 0 0 0 1px var(--line);
  overflow: hidden; isolation: isolate;
}
.stage-wash { position: absolute; inset: 0 0 18% 0; z-index: 0; pointer-events: none; background: radial-gradient(70% 90% at 50% 0%, var(--wash), transparent 72%); }
.stage-caption { position: absolute; left: 30px; bottom: 20px; z-index: 2; font-size: 12.5px; color: var(--text-2); }
.scene-box { position: absolute; inset: 0; z-index: 1; }
.scene { position: absolute; top: 28px; left: 50%; width: 740px; height: 592px; margin-left: -370px; }
.scene-m-box { display: none; }

/* ---------- The four windows of the hero (1:1, text 11px and up) ---------- */
.win { position: absolute; overflow: hidden; border-radius: var(--r-sm); background: var(--card); box-shadow: var(--shadow-win); }
.win::after {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--win-edge, var(--line-2));
}
.win-api { left: 0; top: 30px; width: 290px; height: 262px; z-index: 1; border-radius: 12px; }
.win-desktop { left: 304px; top: 0; width: 436px; height: 262px; z-index: 2; }
.win-hmi { left: 0; top: 282px; width: 480px; height: 300px; z-index: 3; border-radius: 9px; }
.win-ai { left: 494px; top: 262px; width: 246px; height: 330px; z-index: 4; border-radius: var(--r-md); }
.scene[data-focus] .win { opacity: .35; filter: saturate(.5); transition: opacity .3s, filter .3s; }
.scene[data-focus="desktop"] .win-desktop, .scene[data-focus="web"] .win-api,
.scene[data-focus="industrial"] .win-hmi, .scene[data-focus="ai"] .win-ai { opacity: 1; filter: none; }

/* Windows 11 app, shared by the hero and the Desktop row */
.win-desktop, .w11 {
  --w11-mica: light-dark(#EEEDEA, #1F2023);
  --w11-layer: light-dark(#FBFBFA, #27282C);
  --w11-text: light-dark(rgba(0, 0, 0, .9), #FFFFFF);
  --w11-text-2: light-dark(rgba(0, 0, 0, .66), rgba(255, 255, 255, .78));
  --w11-text-3: light-dark(rgba(0, 0, 0, .62), rgba(255, 255, 255, .62));
  --w11-stroke: light-dark(rgba(0, 0, 0, .07), rgba(255, 255, 255, .075));
  --w11-sub: light-dark(rgba(0, 0, 0, .045), rgba(255, 255, 255, .06));
  --w11-sub-2: light-dark(rgba(0, 0, 0, .065), rgba(255, 255, 255, .085));
  --w11-ctl: light-dark(#FFFFFF, #2D2E33);
  --w11-accent: light-dark(#A35C00, #FFB224);
  --w11-on-accent: light-dark(#FFFFFF, #111111);
  --win-edge: light-dark(rgba(0, 0, 0, .1), rgba(255, 255, 255, .1));
  background: var(--w11-mica); color: var(--w11-text); font-family: var(--f-win); border-radius: 8px;
}
.w11-titlebar { display: flex; align-items: center; justify-content: space-between; height: 32px; }
.w11-app { display: flex; align-items: center; gap: 10px; padding-left: 14px; font-size: 12px; color: var(--w11-text); }
.w11-appicon {
  display: inline-grid; grid-template-columns: repeat(3, 3px); align-items: end; gap: 1.5px;
  width: 16px; height: 16px; padding: 3px 2px 3px 2.5px; border-radius: 4px;
  background: #1D1F23; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.w11-appicon i { display: block; background: #E8EAED; border-radius: .5px; }
.w11-appicon i:nth-child(1) { height: 5px; }
.w11-appicon i:nth-child(2) { height: 10px; }
.w11-appicon i:nth-child(3) { height: 7px; background: #FFB224; }
.w11-caption { display: flex; height: 100%; }
.cap { width: 46px; height: 100%; display: grid; place-items: center; color: var(--w11-text); }
.cap svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1; }
.cap.is-hover { background: var(--w11-sub-2); }
.w11-body { display: grid; grid-template-columns: 150px 1fr; height: calc(100% - 32px); }
.w11-nav { display: flex; flex-direction: column; gap: 3px; padding: 6px 6px 8px; }
.w11-ni { position: relative; display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 12px; border-radius: 5px; font-size: 13px; color: var(--w11-text); }
.w11-ni svg { width: 16px; height: 16px; color: var(--w11-text-2); }
.w11-ni.is-sel { background: var(--w11-sub); }
.w11-ni.is-sel::before, .w11-tr.is-sel::after, .vd-rail .is-sel::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 16px; margin-top: -8px; border-radius: 2px; background: var(--w11-accent);
}
.w11-content { background: var(--w11-layer); border-top-left-radius: 8px; box-shadow: inset 1px 1px 0 var(--w11-stroke); padding: 16px 18px 0 20px; overflow: hidden; }
.w11-crumb { font-size: 12px; color: var(--w11-text-2); }
.w11-h { font-family: var(--f-win-display); font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; margin: 2px 0 12px; }
.w11-cmd { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.w11-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 4px;
  background: var(--w11-ctl); box-shadow: inset 0 0 0 1px var(--w11-stroke), inset 0 -1px 0 var(--w11-stroke);
  font-size: 12px; color: var(--w11-text); white-space: nowrap;
}
.w11-btn svg { width: 14px; height: 14px; }
.w11-btn-accent { background: var(--w11-accent); color: var(--w11-on-accent); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .18); font-weight: 600; }
.w11-btn.is-off { background: var(--w11-sub); color: var(--w11-text-2); box-shadow: inset 0 0 0 1px var(--w11-stroke); font-weight: 600; }
.w11-table { font-size: 12.5px; }
.w11-tr { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 14px; height: 34px; padding: 0 10px; border-radius: 4px; color: var(--w11-text-2); }
.w11-tr > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.w11-tr + .w11-tr:not(.is-sel)::before { content: ""; position: absolute; left: 10px; right: 10px; top: 0; height: 1px; background: var(--w11-stroke); }
.w11-th { height: 28px; font-size: 11.5px; font-weight: 600; color: var(--w11-text-3); }
.w11-tr .w11-name { color: var(--w11-text); }
.w11-tr.is-sel { background: var(--w11-sub-2); }

/* API console: dark in both themes, like a code editor */
.win-api, .vw-api { --win-edge: rgba(255, 255, 255, .09); background: var(--code-bg); color: var(--code-ink); font-family: var(--f-mono); }
.api-bar { display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 10px 0 6px; background: var(--code-bar); border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 11px; }
.api-tabs { display: flex; height: 100%; }
.api-tabs span { position: relative; display: flex; align-items: center; padding: 0 10px; color: var(--code-ink); }
.api-tabs span::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--code-ink); border-radius: 1px; }
.api-env { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--r-pill); color: var(--code-ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); font-size: 11px; }
.api-env i, .api-ok i { width: 6px; height: 6px; border-radius: 50%; background: #5BC48E; }
.api-req { display: flex; align-items: center; gap: 8px; margin: 10px 10px 0; padding: 4px; border-radius: 8px; background: #1C1E22; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.api-method { flex: none; padding: 3px 6px; border-radius: 5px; background: #1F3A2D; color: #8BDDB3; font-size: 11px; }
.api-url { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; color: var(--code-ink); }
.api-send { flex: none; padding: 4px 9px; border-radius: 6px; background: #EDEEF0; color: #0A0B0D; font-size: 11px; }
.api-status { display: flex; align-items: center; gap: 14px; padding: 10px 14px 8px; font-size: 11px; color: var(--code-dim); }
.api-ok { display: inline-flex; align-items: center; gap: 6px; color: #8BDDB3; }
.code { counter-reset: ln; font-size: 11px; line-height: 1.7; padding: 6px 0 8px; border-top: 1px solid rgba(255, 255, 255, .07); }
.code .l { display: block; position: relative; padding-left: 36px; color: var(--code-dim); white-space: pre; }
.code .l::before { counter-increment: ln; content: counter(ln); position: absolute; left: 0; width: 24px; text-align: right; color: var(--code-dim); }
.code b { font-weight: 400; }
.code .p { color: var(--code-dim); }
.code .k { color: var(--code-key); }
.code .s { color: var(--code-str); }
.code .n { color: var(--code-num); }
.code .b { color: var(--code-bool); }
.code .l.is-hl { background: #2A2416; box-shadow: inset 2px 0 0 #FFB224; }

/* Operator panel: gray high-performance HMI, color only for the abnormal value */
.win-hmi, .vi, .m-hmi {
  --hmi-bg: light-dark(#E8E7E4, #121417);
  --hmi-panel: light-dark(#F1F0EE, #16191D);
  --hmi-line: light-dark(rgba(24, 22, 20, .1), rgba(255, 255, 255, .07));
  --hmi-text: light-dark(#1B1D20, #DCDFE4);
  --hmi-dim: light-dark(#53575D, #9AA0A9);
  --hmi-grid: light-dark(rgba(24, 22, 20, .08), rgba(255, 255, 255, .06));
  --hmi-trend: light-dark(#33373D, #C8CCD3);
  --hmi-flow: light-dark(#7F858C, #7C8794);
  --hmi-alarm-bg: light-dark(#F1E6D6, #2A2318);
  --win-edge: light-dark(rgba(24, 22, 20, .12), rgba(255, 255, 255, .1));
  background: var(--hmi-bg); color: var(--hmi-text); font-size: 12px;
}
.hmi-bar { display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--hmi-line); }
.hmi-title { display: flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap; }
.hmi-live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.hmi-slash { color: var(--hmi-dim); font-weight: 400; }
.hmi-sub { color: var(--hmi-dim); font-weight: 500; }
.hmi-meta { display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 11px; color: var(--hmi-dim); }
.hmi-mode { padding: 1px 7px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--hmi-line); }
.hmi-clock { color: var(--hmi-text); font-variant-numeric: tabular-nums; }
.hmi-body { display: grid; grid-template-columns: 290px 1fr; height: calc(100% - 34px - 38px); }
.hmi-trend { padding: 12px 14px 10px; border-right: 1px solid var(--hmi-line); }
.hmi-trend-head { margin-bottom: 8px; font-size: 12px; color: var(--hmi-text); }
.hmi-tag { margin-right: 6px; font-family: var(--f-mono); font-size: 11px; }
.chart { position: relative; aspect-ratio: 2 / 1; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-lbl { position: absolute; font-family: var(--f-mono); font-size: 11px; line-height: 1; white-space: nowrap; }
.chart-lbl.hi { left: 2px; top: calc(24% - 15px); color: var(--accent-ink); }
.chart-lbl.sp { left: 2px; top: calc(70.8% - 15px); color: var(--hmi-dim); }
.chart-lbl.mk { left: calc(52.1% + 5px); bottom: 3px; color: var(--hmi-dim); }
.trend-grid path { stroke: var(--hmi-grid); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.trend-line { fill: none; stroke: var(--hmi-trend); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.trend-line-hi { stroke: var(--accent); stroke-width: 2; }
.tf-0 { stop-color: var(--hmi-trend); stop-opacity: .14; }
.tf-1 { stop-color: var(--hmi-trend); stop-opacity: 0; }
.trend-flow { fill: none; stroke: var(--hmi-flow); stroke-width: 1.2; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.trend-limit { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.trend-sp { stroke: var(--hmi-dim); stroke-width: 1; stroke-dasharray: 1 3; opacity: .7; vector-effect: non-scaling-stroke; }
.trend-mark { stroke: var(--hmi-dim); stroke-width: 1; opacity: .55; vector-effect: non-scaling-stroke; }
.trend-dot { fill: var(--accent); stroke: var(--hmi-bg); stroke-width: 1.5; }
.trend-dot-halo { fill: var(--accent); opacity: 0; transform-box: fill-box; transform-origin: center; }
.hmi-axis { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--f-mono); font-size: 11px; color: var(--hmi-dim); }
.hmi-tags { display: flex; flex-direction: column; background: var(--hmi-panel); }
.ht { position: relative; flex: 1; display: grid; grid-template-columns: 1fr auto; align-content: center; column-gap: 6px; padding: 0 12px 0 14px; border-bottom: 1px solid var(--hmi-line); }
.ht:last-child { border-bottom: 0; }
.ht-id { font-family: var(--f-mono); font-size: 11px; }
.ht-d { grid-row: 2; font-size: 11px; color: var(--hmi-dim); }
.ht-v { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-family: var(--f-mono); font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; text-align: right; white-space: nowrap; }
.ht-v small { margin-left: 4px; font-family: var(--f-text); font-size: 11px; letter-spacing: 0; color: var(--hmi-dim); }
.ht.is-alarm { background: var(--hmi-alarm-bg); box-shadow: inset 3px 0 0 var(--accent); }
.ht.is-alarm .ht-v { color: var(--accent-ink); }
.hmi-alarm {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px 0 14px;
  border-top: 1px solid var(--hmi-line); background: var(--hmi-alarm-bg); box-shadow: inset 3px 0 0 var(--accent);
  font-size: 12px; white-space: nowrap;
}
.al-light { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.al-time { font-family: var(--f-mono); font-size: 11px; color: var(--hmi-dim); font-variant-numeric: tabular-nums; }
.al-pri { padding: 1px 6px; border-radius: 4px; background: var(--accent); color: #1A1000; font-family: var(--f-mono); font-size: 11px; }
.al-tag { font-family: var(--f-mono); font-size: 11px; }
.al-msg { color: var(--hmi-text); overflow: hidden; text-overflow: ellipsis; }
.al-ack { margin-left: auto; padding: 4px 10px; border-radius: 5px; background: var(--hmi-panel); box-shadow: inset 0 0 0 1px var(--hmi-line); font-size: 11px; font-weight: 600; }

/* Model note */
.win-ai, .m-note {
  --win-edge: var(--line-2);
  --note-bg: light-dark(#FFFFFF, #18191D);
  background: var(--note-bg); color: var(--text-2); font-size: 12.5px;
}
.win-ai { display: flex; flex-direction: column; padding: 14px 16px; }
.note-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.note-mark { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--text); }
.note-mark i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.note-time { font-family: var(--f-mono); font-size: 11px; color: var(--text-2); }
.note-sub { margin: 4px 0 10px 16px; font-family: var(--f-mono); font-size: 11px; color: var(--text-2); }
.note-text { padding-top: 10px; border-top: 1px solid var(--line); line-height: 1.55; text-wrap: pretty; }
.note-text p + p { margin-top: 8px; }
.note-text b, .m-note-text b { font-family: var(--f-mono); font-size: 11px; font-weight: 400; color: var(--text); padding: 1px 4px; border-radius: 4px; background: var(--line); white-space: nowrap; }
.note-ev { margin-top: 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.ev-row { display: grid; grid-template-columns: 50px 1fr 36px; align-items: center; gap: 8px; height: 30px; padding: 0 10px; font-family: var(--f-mono); font-size: 11px; color: var(--text); }
.ev-row + .ev-row { border-top: 1px solid var(--line); }
.ev-v { text-align: right; color: var(--text-2); }
.ev-spark { width: 100%; height: 18px; overflow: visible; }
.ev-spark path { fill: none; stroke: var(--text-2); stroke-width: 1.4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.note-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.note-conf { white-space: nowrap; font-family: var(--f-mono); font-size: 11px; color: var(--text-2); }

/* ---------- Hero scene on small screens: fewer, larger pieces ---------- */
.m-scene { display: grid; gap: 0; width: min(100%, 520px); margin-inline: auto; }
.m-api {
  display: flex; align-items: center; gap: 8px; width: max-content; max-width: 92%;
  padding: 8px 12px 8px 8px; border-radius: 10px; background: var(--code-bg); color: var(--code-ink);
  box-shadow: var(--shadow-float); font-family: var(--f-mono); font-size: 11px;
}
.m-api-path { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.m-api .api-ok { flex: none; margin-left: 4px; white-space: nowrap; }
.m-hmi { position: relative; margin: -6px 0 0 14px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-win); }
.m-hmi::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--win-edge); }
.m-read { display: flex; align-items: flex-end; justify-content: space-between; padding: 12px 14px 4px; }
.m-read-l { display: grid; gap: 2px; }
.m-name { font-size: 12px; color: var(--hmi-dim); }
.m-big { font-family: var(--f-mono); font-size: 30px; line-height: 1; letter-spacing: -.03em; color: var(--accent-ink); }
.m-big small { margin-left: 4px; font-family: var(--f-text); font-size: 12px; letter-spacing: 0; color: var(--hmi-dim); }
.m-chart { margin: 6px 12px 10px; }
.m-hmi .hmi-alarm { font-size: 12px; }
.m-note { position: relative; width: 86%; margin: 12px 0 0 auto; padding: 12px 14px; border-radius: var(--r-md); box-shadow: var(--shadow-float); }
.m-note::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line-2); }
.m-note-text { margin: 8px 0 10px; line-height: 1.5; }

/* ---------- Hero index: the four areas ---------- */
.hero-index { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.hero-index a { display: grid; grid-template-columns: auto 1fr; align-content: start; column-gap: 14px; row-gap: 2px; height: 100%; padding: 18px 20px 22px 0; text-decoration: none; color: inherit; border-radius: 0; }
.hero-index li + li a { padding-left: 22px; box-shadow: inset 1px 0 0 var(--line); }
.ix-num { grid-row: span 2; padding-top: 3px; font-family: var(--f-mono); font-size: 11.5px; color: var(--accent-ink); }
.ix-title { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -.005em; transition: color .2s var(--ease); }
.ix-sub { font-size: 13.5px; color: var(--text-3); line-height: 1.45; text-wrap: pretty; }
.hero-index a:hover .ix-title { color: var(--accent-ink); }
.hero-index a:focus-visible { outline-offset: -2px; }

/* ---------- Section heads ---------- */
.section-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 22px; margin-bottom: clamp(48px, 6vw, 88px); }
.section-head .label { grid-column: 1 / 4; padding-top: 16px; }
.h2 {
  grid-column: 4 / 12;
  font-family: var(--f-display); font-weight: 380;
  font-size: clamp(36px, 1.9vw + 22px, 58px); line-height: 1.04; letter-spacing: -.028em;
  font-optical-sizing: auto; text-wrap: balance;
}
.section-lede { grid-column: 4 / 10; font-size: 18px; line-height: 1.62; color: var(--text-2); text-wrap: pretty; }
.h3 { font-family: var(--f-display); font-weight: 390; font-size: clamp(30px, 1vw + 22px, 40px); line-height: 1.08; letter-spacing: -.02em; font-optical-sizing: auto; }

/* ---------- What we build: alternating rows ---------- */
.build { padding: clamp(96px, 11vw, 160px) 0 clamp(72px, 8vw, 120px); }
.rows { display: grid; gap: clamp(72px, 8vw, 120px); }
.area-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; }
.area-text { grid-column: 1 / 5; grid-row: 1; }
.area-visual { grid-column: 6 / 13; grid-row: 1; }
.area-row.is-flip .area-text { grid-column: 9 / 13; }
.area-row.is-flip .area-visual { grid-column: 1 / 8; }
.area-text .h3 { margin-bottom: 18px; }
.area-text p { font-size: 17px; line-height: 1.62; color: var(--text-2); text-wrap: pretty; }
.area-text p:first-of-type { color: var(--text); }
.area-text p + p { margin-top: 14px; }

/* panels: a quiet stone (or graphite) niche, compositions centered at 1:1 */
.vz {
  position: relative; height: 470px; border-radius: var(--r-lg); overflow: hidden; isolation: isolate;
  background: var(--stage); box-shadow: inset 0 1px 0 var(--hi), inset 0 0 0 1px var(--line);
}
.vz-wash { position: absolute; inset: 0 0 30% 0; z-index: 0; pointer-events: none; background: radial-gradient(80% 90% at 50% 0%, var(--wash), transparent 70%); }
.vz-inner { position: absolute; z-index: 1; left: 50%; top: 50%; width: 640px; height: 400px; margin: -200px 0 0 -320px; }
.vz-inner > * { position: absolute; }

/* 01 desktop: the report, with Snap layouts open under the maximize button */
.vd-win { left: 0; top: 20px; width: 560px; overflow: hidden; box-shadow: var(--shadow-win); }
.vd-win::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--win-edge); }
.vd-body { display: grid; grid-template-columns: 52px 1fr; }
.vd-rail { display: flex; flex-direction: column; gap: 4px; padding: 6px; }
.vd-rail span { position: relative; display: grid; place-items: center; height: 36px; border-radius: 5px; color: var(--w11-text-2); }
.vd-rail span.is-sel { background: var(--w11-sub); color: var(--w11-text); }
.vd-rail svg { width: 16px; height: 16px; }
.vd-rail-fill { flex: 1; height: 36px; }
.vd-main { background: var(--w11-layer); border-top-left-radius: 8px; box-shadow: inset 1px 1px 0 var(--w11-stroke); padding: 16px 22px 20px; }
.vd-chev { margin: 0 4px; color: var(--w11-text-2); }
.vd-title { margin: 2px 0 0; }
.vd-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; font-size: 12px; color: var(--w11-text-2); }
.vd-pill { display: inline-flex; align-items: center; padding: 2px 9px 2px 7px; border-radius: var(--r-pill); font-size: 11.5px; color: var(--w11-text); background: var(--w11-sub); box-shadow: inset 0 0 0 1px var(--w11-stroke); }
.vd-pill .st { margin-right: 6px; }
.vd-section { margin: 16px 0 6px; font-size: 12px; font-weight: 600; color: var(--w11-text-2); }
.vd-events { list-style: none; margin: 0; padding: 0; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--w11-stroke); overflow: hidden; }
.vd-events li { display: grid; grid-template-columns: 64px 14px minmax(0, 1fr) auto; align-items: center; height: 38px; padding: 0 12px; font-size: 12.5px; color: var(--w11-text); }
.vd-events li + li { box-shadow: inset 0 1px 0 var(--w11-stroke); }
.vd-events li.is-open { background: light-dark(#F7EEE2, #2F2A21); }
.vd-t { font-family: var(--f-mono); font-size: 11px; color: var(--w11-text-2); }
.vd-e { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vd-events em { font-style: normal; font-size: 11px; color: var(--w11-text-2); padding-left: 10px; }
.vd-events li.is-open em { color: light-dark(#7A4600, #FFBE4D); font-weight: 600; }
.vd-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.vd-hint { margin-left: 6px; font-size: 11.5px; color: var(--w11-text-2); }
.snap {
  left: 384px; top: 52px; z-index: 6;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  width: 210px; padding: 12px; border-radius: 10px;
  background: light-dark(#F7F7F6, #26282C); box-shadow: inset 0 0 0 1px light-dark(rgba(0, 0, 0, .1), rgba(255, 255, 255, .1)), var(--shadow-float);
}
.snap-l { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; height: 44px; }
.snap-l i { display: block; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .4); background: rgba(127, 127, 127, .1); }
.snap-l i.on { background: var(--accent); box-shadow: none; }
.snap-l.s2 { grid-template-columns: 2fr 1fr; }
.snap-l.s3 { grid-template-columns: 1fr 1fr 1fr; }

/* 02 web: the web app, with the API answer below it */
.vw-app { left: 0; top: 0; width: 540px; height: 256px; border-radius: 12px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-win); color: var(--text-2); font-size: 12.5px; }
.vw-app::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line-2); }
.vw-top { display: flex; align-items: center; gap: 18px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.vw-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.vw-brand i { width: 14px; height: 14px; border-radius: 4px; background: #F2A019; }
.vw-tabs { display: flex; gap: 2px; }
.vw-tabs span { padding: 5px 10px; border-radius: 7px; }
.vw-tabs .is-on { color: var(--text); background: var(--line); }
.vw-body { padding: 14px 16px; }
.vw-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.vw-h { font-size: 15px; font-weight: 600; color: var(--text); }
.vw-seg { display: inline-flex; padding: 2px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 11.5px; }
.vw-seg b, .vw-seg span { padding: 3px 10px; border-radius: 6px; font-weight: 500; }
.vw-seg b { background: var(--s4); color: var(--text); box-shadow: 0 1px 2px var(--sh-2), inset 0 0 0 1px var(--line); }
.vw-row { display: grid; grid-template-columns: 56px 60px minmax(0, 1fr) 64px 64px; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 8px; }
.vw-row + .vw-row { box-shadow: inset 0 1px 0 var(--line); }
.vw-th { height: 28px; font-size: 11px; color: var(--text-2); }
.vw-row.is-hi { background: light-dark(#F6ECDD, #2A2318); box-shadow: none; }
.vw-row > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vw-tag { font-family: var(--f-mono); font-size: 11px; color: var(--text); }
.vw-time { font-family: var(--f-mono); font-size: 11px; color: var(--text-2); }
.vw-state { font-size: 11.5px; }
.vw-state.un { color: var(--accent-ink); font-weight: 600; }
.pri { display: inline-block; min-width: 42px; padding: 2px 6px; border-radius: 5px; text-align: center; font-family: var(--f-mono); font-size: 11px; font-weight: 400; }
.pri-hi { background: var(--accent); color: #1A1000; }
.pri-hihi { color: light-dark(#A1221B, #FF9592); background: light-dark(#F7E3E1, #331C1D); box-shadow: inset 0 0 0 1px light-dark(rgba(179, 38, 30, .3), rgba(229, 72, 77, .4)); }
.pri-ok { color: light-dark(#146B40, #7DD3A6); background: light-dark(#E1F1E8, #17291F); box-shadow: inset 0 0 0 1px light-dark(rgba(26, 127, 77, .3), rgba(91, 196, 142, .35)); }
.vw-api { left: 250px; top: 250px; width: 390px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-float); }
.vw-api::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); }
.vwa-head { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; background: var(--code-bar); font-size: 11px; }
.vwa-path { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vwa-ms { color: var(--code-dim); }

/* 03 industrial: the station overview */
.vi { left: 20px; top: 35px; width: 600px; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-win); }
.vi::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--win-edge); }
.vi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--hmi-line); }
.vi-tile { position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 2px; min-height: 122px; padding: 14px 16px; background: var(--hmi-panel); }
.vi-id { font-family: var(--f-mono); font-size: 11px; }
.vi-name { font-size: 11.5px; color: var(--hmi-dim); }
.vi-val { align-self: end; margin-top: 8px; font-family: var(--f-mono); font-size: 24px; font-weight: 400; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.vi-val small { margin-left: 5px; font-family: var(--f-text); font-size: 11px; letter-spacing: 0; color: var(--hmi-dim); }
.vi-state { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 11.5px; color: var(--hmi-dim); }
.vi-state i { width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--hmi-dim); }
.vi-state.is-run { color: var(--hmi-text); }
.vi-state.is-run i { background: var(--hmi-text); box-shadow: none; }
.vi-state.is-hi { color: var(--accent-ink); font-family: var(--f-mono); font-size: 11px; }
.vi-state.is-hi i { background: var(--accent); box-shadow: none; }
.vi-tile.is-alarm { background: var(--hmi-alarm-bg); box-shadow: inset 3px 0 0 var(--accent); }
.vi-tile.is-alarm .vi-val { color: var(--accent-ink); }
.vi-spark { display: block; margin-top: 12px; height: 16px; }
.vi-spark svg { width: 100%; height: 16px; overflow: visible; }
.vi-spark path { fill: none; stroke: var(--hmi-dim); stroke-width: 1.4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.vi-bar { position: relative; display: block; margin-top: 14px; height: 6px; border-radius: 3px; background: var(--hmi-line); }
.vi-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--hmi-dim); }
.vi-bar b { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--hmi-text); }
.vi-bar .v38 { width: 38%; }
.vi-bar .sp62 { left: 62%; }
.vi-tank { padding-right: 46px; }
.vi-level { position: absolute; right: 16px; top: 14px; bottom: 14px; width: 18px; border-radius: 5px; background: var(--hmi-line); overflow: hidden; }
.vi-level i { position: absolute; inset: auto 0 0 0; height: 62%; background: color-mix(in srgb, var(--hmi-dim) 55%, transparent); border-top: 1.5px solid var(--hmi-text); }
.vi-foot { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px; border-top: 1px solid var(--hmi-line); font-size: 12px; }
.vi-foot-t { color: var(--hmi-text); font-weight: 600; }
.vi-counts { display: flex; gap: 12px; font-family: var(--f-mono); font-size: 11px; color: var(--hmi-dim); }
.vi-counts .c-hi { color: var(--accent-ink); }
.vi-foot-btn { margin-left: auto; padding: 5px 11px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--hmi-line); font-size: 11.5px; font-weight: 600; }

/* 04 AI: the score that flagged it, and the draft that explains it */
.va-score { left: 0; top: 0; width: 440px; padding: 16px 18px 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-win); color: var(--text-2); font-size: 12.5px; }
.va-score::after, .va-draft::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line-2); }
.va-score-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.va-score-val { font-family: var(--f-mono); font-size: 13px; color: var(--accent-ink); }
.va-chart { position: relative; aspect-ratio: 400 / 110; }
.va-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.va-band { fill: var(--accent); opacity: .1; }
.va-thr { stroke: var(--accent); stroke-dasharray: 4 4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.va-line { fill: none; stroke: var(--text); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.va-dot { fill: var(--accent); }
.va-axis { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--f-mono); font-size: 11px; color: var(--text-2); }
.va-draft { left: 230px; top: 206px; width: 410px; padding: 16px 20px 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-float); }
.va-label { margin-bottom: 8px; font-family: var(--f-mono); font-size: 11px; color: var(--text-2); }
.va-text { font-family: var(--f-display); font-weight: 390; font-size: 18px; line-height: 1.42; letter-spacing: -.005em; color: var(--text); }
.va-text mark { color: inherit; background: light-dark(#F6E2C4, #4A3612); padding: 0 2px; border-radius: 2px; white-space: nowrap; }
.va-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--text-2); }
.va-foot > span:first-child { white-space: nowrap; }
.va-actions { display: inline-flex; gap: 6px; margin-left: auto; }

/* ---------- About: the Old City arcade, drawn ---------- */
.about { padding: clamp(80px, 9vw, 140px) 0; border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 48px; align-items: center; }
.about-visual { grid-column: 1 / 7; margin: 0; }
.about-body { grid-column: 8 / 13; }
.about-body .label { margin-bottom: 22px; }
.about-body .h2 { margin-bottom: 26px; }
.about-text p { font-size: 17.5px; line-height: 1.65; color: var(--text-2); text-wrap: pretty; max-width: 34em; }
.about-text p + p { margin-top: 14px; }
.arcade-cap { margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.arcade { display: block; width: 100%; height: auto; color: var(--text); overflow: visible; }
.arcade path { fill: none; vector-effect: non-scaling-stroke; stroke: currentColor; stroke-width: 1; }
.arcade .ln-1 { stroke-opacity: .7; }
.arcade .ln-2 { stroke-opacity: .42; }
.arcade .ln-3 { stroke-opacity: .2; }
.arcade .ln-4 { stroke-opacity: .09; }
.arcade .shade { stroke: none; fill: currentColor; fill-opacity: .06; }
.arcade .recess { stroke: none; fill: currentColor; fill-opacity: .025; }
.arcade .lit { stroke: none; fill: url(#arc-lit); }
.arcade .lit-line { stroke: #E08600; stroke-opacity: .9; }
.facts { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0 32px; margin: 36px 0 0; }
.fact { padding: 16px 0 18px; border-top: 1px solid var(--line-2); }
.fact dt { margin-bottom: 6px; font-size: 12px; font-weight: 500; letter-spacing: .085em; text-transform: uppercase; color: var(--text-2); }
.fact dd { margin: 0; font-size: 16.5px; line-height: 1.55; color: var(--text); }

/* ---------- Products (hidden until launch) ---------- */
.products { padding: clamp(80px, 9vw, 140px) 0; border-top: 1px solid var(--line); }
.product-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.product { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; padding: 32px; border-radius: var(--r-lg); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-soft); }
.product-text { grid-column: 1 / 6; }
.product-kind { margin-bottom: 14px; font-family: var(--f-mono); font-size: 12px; color: var(--accent-ink); }
.product-text .h3 { margin-bottom: 12px; }
.product-text > p:not(.product-kind) { color: var(--text-2); font-size: 17px; }
.product-meta { display: flex; gap: 32px; margin: 22px 0 26px; }
.product-meta dt { font-size: 12px; letter-spacing: .085em; text-transform: uppercase; color: var(--text-2); }
.product-meta dd { margin: 4px 0 0; color: var(--text); }
.product-shot { grid-column: 6 / 13; margin: 0; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-win); }
.product-shot img { width: 100%; height: auto; }

/* ---------- Contact ---------- */
.contact { padding: clamp(24px, 3vw, 40px) 0 clamp(96px, 10vw, 150px); }
.contact-panel {
  position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px;
  padding: clamp(28px, 5vw, 72px); border-radius: var(--r-xl); overflow: hidden; isolation: isolate;
  background: var(--stage); box-shadow: inset 0 1px 0 var(--hi), inset 0 0 0 1px var(--line);
}
.contact-wash { position: absolute; z-index: 0; top: 0; right: 0; width: 60%; height: 70%; pointer-events: none; background: radial-gradient(70% 80% at 70% 0%, var(--wash), transparent 70%); }
.contact-info { position: relative; z-index: 1; grid-column: 1 / 6; align-self: center; }
.contact-info .label { margin-bottom: 22px; }
.contact-info .h2 { margin-bottom: 20px; }
.contact-intro { font-size: 17.5px; line-height: 1.6; color: var(--text-2); max-width: 26em; text-wrap: pretty; }
.contact-mail {
  display: inline-block; margin-top: 28px;
  font-family: var(--f-display); font-weight: 380; font-size: clamp(28px, 1.4vw + 18px, 42px); letter-spacing: -.02em; line-height: 1.1;
  color: var(--text); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 8px; text-decoration-color: transparent;
  transition: text-decoration-color .3s var(--ease);
}
.contact-mail:hover { text-decoration-color: var(--accent); }
.contact-address { margin-top: 24px; font-style: normal; color: var(--text-2); font-size: 16px; line-height: 1.6; }
.contact-card { position: relative; z-index: 1; grid-column: 7 / 13; padding: clamp(22px, 2.6vw, 36px); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-float); }
.contact-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line-2); }

/* form */
.form { display: grid; gap: 18px; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--text); }
.field input, .field textarea {
  width: 100%; padding: 0 14px; border: 1px solid var(--field-border); border-radius: 12px;
  background: var(--field-bg); color: var(--text);
  font: 400 16px/1.5 var(--f-text);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input { height: 48px; }
.field textarea { min-height: 156px; padding-top: 12px; padding-bottom: 12px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--text-2); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus), 0 0 0 5px var(--accent-soft); }
.field [aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.field-error { font-size: 13.5px; color: var(--bad); }
.field-error:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 4px; }
.form-note { font-size: 13px; color: var(--text-2); }
.form-note a { color: var(--text); }
.form-note a:hover { color: var(--accent-ink); }
.btn[aria-disabled="true"] { opacity: .7; cursor: progress; }
.form-status:empty { display: none; }
.form-status { margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-size: 14px; color: var(--text); background: var(--s3); }
.form-status.is-error { background: light-dark(#F8E6E4, #2B1918); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 45%, transparent); }
.form-status a { color: inherit; font-weight: 600; }
.form-done { display: grid; justify-items: start; gap: 10px; padding: 12px 0; }
.form-done-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); }
.form-done-icon svg { width: 20px; height: 20px; }
.form-done-title { font-family: var(--f-display); font-weight: 390; font-size: 30px; letter-spacing: -.02em; }
.form-done p { color: var(--text-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); }
.footer-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; padding: 64px 0 56px; }
.footer-brand { grid-column: 1 / 6; }
.footer-brand .logo-svg { height: 24px; }
.footer-brand p { margin-top: 18px; max-width: 26em; font-size: 15px; color: var(--text-2); }
.footer-nav { grid-column: 7 / 9; }
.footer-contact { grid-column: 9 / 13; display: grid; align-content: start; gap: 8px; font-size: 15px; color: var(--text-2); }
.footer-h { margin-bottom: 14px; font-size: 12px; font-weight: 500; letter-spacing: .085em; text-transform: uppercase; color: var(--text-2); }
.footer-contact .footer-h { margin-bottom: 6px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-nav a, .footer-contact a { color: var(--text); text-decoration: none; font-size: 15px; transition: color .2s; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--accent-ink); }
.footer-contact address { font-style: normal; line-height: 1.6; }
.footer-bottom { display: flex; align-items: center; gap: 24px; padding: 20px 0 28px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }
.footer-bottom a { color: var(--text-2); text-decoration: none; }
.footer-bottom a:hover { color: var(--text); }
.footer-top-link { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.footer-top-link svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.footer-top-link:hover svg { transform: translateY(-2px); }

/* ---------- Inner pages: privacy, thanks, 404 ---------- */
.page-head { padding: clamp(40px, 6vw, 88px) 0 clamp(36px, 4vw, 56px); }
.page-head-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 22px; }
.page-head .label { grid-column: 1 / 4; padding-top: 18px; }
.page-title {
  grid-column: 4 / 12;
  font-family: var(--f-display); font-weight: 380;
  font-size: clamp(40px, 2.6vw + 22px, 64px); line-height: 1.02; letter-spacing: -.03em;
  font-optical-sizing: auto; text-wrap: balance;
}
.page-lede { grid-column: 4 / 11; max-width: 34em; font-size: clamp(17px, .3vw + 15.5px, 19px); line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.page-meta { grid-column: 4 / 12; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.page-meta::before { content: ""; width: 24px; height: 1px; background: var(--line-3); }

/* privacy: a typeset document with a contents rail */
.doc { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding-bottom: clamp(96px, 10vw, 150px); }
.doc-toc { grid-column: 1 / 4; align-self: start; position: sticky; top: calc(var(--header-h) + 28px); padding-top: 6px; }
.doc-toc-h { margin-bottom: 14px; font-size: 12px; font-weight: 500; letter-spacing: .085em; text-transform: uppercase; color: var(--text-2); }
.doc-toc ol { list-style: none; margin: 0; padding: 0; display: grid; border-left: 1px solid var(--line-2); }
.doc-toc a {
  display: grid; grid-template-columns: 30px 1fr; align-items: baseline;
  margin-left: -1px; padding: 8px 12px 8px 14px; border-left: 1px solid transparent;
  color: var(--text-2); font-size: 14.5px; text-decoration: none;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.doc-toc a:hover { color: var(--text); border-left-color: var(--accent); }
.doc-toc a:focus-visible { outline-offset: 0; }
.doc-toc .n, .doc-n { font-family: var(--f-mono); font-size: 11.5px; color: var(--accent-ink); }
.doc-body { grid-column: 4 / 11; }
.doc-summary { display: grid; grid-template-columns: max-content 1fr; gap: 0 28px; margin: 0 0 48px; border-top: 1px solid var(--line-2); }
.doc-summary dt, .doc-summary dd { margin: 0; padding: 13px 0; border-bottom: 1px solid var(--line); }
.doc-summary dt { font-size: 12px; font-weight: 500; letter-spacing: .085em; text-transform: uppercase; color: var(--text-2); padding-top: 16px; }
.doc-summary dd { font-size: 16.5px; color: var(--text); }
.doc-sec { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 8px; padding: 34px 0 38px; border-top: 1px solid var(--line); }
.doc-sec > .doc-n { grid-row: span 9; padding-top: 11px; }
.doc-sec h2 { margin-bottom: 14px; font-family: var(--f-display); font-weight: 390; font-size: clamp(26px, .8vw + 19px, 32px); line-height: 1.15; letter-spacing: -.018em; font-optical-sizing: auto; }
.doc-sec p { max-width: 36em; font-size: 17.5px; line-height: 1.7; color: var(--text-2); text-wrap: pretty; }
.doc-sec p + p { margin-top: 14px; }
.doc-sec a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s; }
.doc-sec a:hover { color: var(--accent-ink); }
.doc-sec code { padding: 1px 6px; border-radius: 6px; background: var(--line); color: var(--text); font-family: var(--f-mono); font-size: .86em; }
.doc-address { margin-top: 14px; padding: 16px 18px; border-radius: var(--r-sm); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); font-style: normal; font-size: 16px; line-height: 1.6; color: var(--text); max-width: 36em; }
.doc-end { margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }

/* thanks and 404: a short message beside the drawing */
.page-simple { padding: clamp(32px, 5vw, 72px) 0 clamp(96px, 10vw, 150px); }
.simple-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; align-items: center; }
.simple-copy { grid-column: 1 / 6; }
.simple-copy .label { margin-bottom: 24px; }
.simple-copy .page-title { margin-bottom: 22px; }
.simple-copy .page-title + .btn { margin-top: 14px; }
.simple-copy .page-lede { margin-bottom: 34px; }
.simple-visual { grid-column: 7 / 13; margin: 0; }

/* ---------- Theme change ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
/* fallback crossfade for browsers without View Transitions; the switch thumb keeps its own slide */
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, fill .3s ease, stroke .3s ease;
}
html.theme-fade .ts-thumb { transition: transform .42s var(--ease-spring), background-color .3s ease; }

/* ---------- Motion: a few cycles, then still ---------- */
@media (prefers-reduced-motion: no-preference) {
  .trend-dot-halo { animation: halo 2.4s var(--ease) 3 both; }
  .al-light { animation: blink 1.6s steps(1) 3; }
}
@keyframes halo { 0% { transform: scale(.5); opacity: .45; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
@keyframes blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Forced colors (Windows contrast themes) ---------- */
@media (forced-colors: active) {
  .btn, .menu-btn, .mini-btn, .w11-btn, .api-send { border: 1px solid ButtonText; }
  .field input, .field textarea { border: 1px solid CanvasText; }
  .field [aria-invalid="true"] { border: 2px solid Mark; }
  .theme-switch { border: 1px solid CanvasText; }
  .ts-thumb { display: none; }
  .ts-opt:has(input:checked) { outline: 2px solid Highlight; outline-offset: -1px; }
  .ts-opt:has(input:focus-visible) { outline: 3px solid Highlight; outline-offset: 2px; }
  :focus-visible { outline: 2px solid Highlight; }
  .stage, .vz, .contact-panel, .contact-card, .win, .doc-address, .product { border: 1px solid CanvasText; }
  .site-header.is-scrolled { border-bottom: 1px solid CanvasText; }
  .text-link, .contact-mail, .doc-sec a { text-decoration-color: currentColor; }
  .logo-svg, .arcade { forced-color-adjust: none; }
}

/* ---------- Responsive ---------- */
@media (min-width: 1600px) {
  .hero-grid { grid-template-columns: minmax(0, 510px) minmax(0, 1fr); }
}
@media (max-width: 1366px) {
  .hero-grid { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 32px; }
  .display { font-size: 58px; }
}
@media (max-width: 1240px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .display { font-size: clamp(44px, 2.9vw + 26px, 64px); }
  .hero-copy { max-width: 40rem; padding-block: 24px 0; }
  .stage { margin-right: 0; border-radius: var(--r-xl); }
  .hero-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-index li:nth-child(3) a { padding-left: 0; box-shadow: none; }
  .hero-index li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 1100px) {
  .area-row, .area-row.is-flip { row-gap: 32px; }
  .area-text, .area-row.is-flip .area-text { grid-column: 1 / 13; grid-row: 1; max-width: 40rem; }
  .area-visual, .area-row.is-flip .area-visual { grid-column: 1 / 13; grid-row: 2; }
  .about-visual { grid-column: 1 / 13; max-width: 640px; }
  .about-body { grid-column: 1 / 13; }
  .contact-info, .contact-card { grid-column: 1 / 13; }
  .contact-wash { display: none; }
  .simple-copy, .simple-visual { grid-column: 1 / 13; }
  .simple-visual { max-width: 640px; }
  .footer-brand { grid-column: 1 / 13; }
  .footer-nav { grid-column: 1 / 5; }
  .footer-contact { grid-column: 5 / 13; }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .header-tools { margin-left: auto; border-left: 0; padding-left: 0; }
  .menu-btn { display: inline-flex; }
  .section-head, .page-head-grid { display: block; }
  .section-head .label, .page-head .label { padding-top: 0; margin-bottom: 18px; }
  .section-head .section-lede, .page-lede, .page-meta { margin-top: 20px; }
  /* the hero scene becomes the small-screen composition */
  .stage { height: auto; padding: 22px 18px 52px; }
  .scene-box { display: none; }
  .scene-m-box { display: block; position: relative; z-index: 1; }
  .stage-caption { left: 20px; bottom: 18px; }
  .doc { display: block; }
  .doc-toc { position: static; margin-bottom: 40px; padding: 18px 20px 12px; border-radius: var(--r-md); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
  .doc-toc ol { border-left: 0; }
  .doc-toc a { padding: 7px 0; border-left: 0; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .logo-svg { height: 20px; }
  .menu-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .menu-btn { width: 36px; padding: 0; justify-content: center; }
  .theme-switch { --seg: 30px; }
  .hero-copy { padding-block: 16px 0; }
  .eyebrow { margin-bottom: 20px; }
  .display { font-size: clamp(40px, 11vw, 48px); line-height: 1.02; }
  .lede { margin: 20px 0 28px; font-size: 17px; }
  .actions { gap: 16px 24px; }
  .btn { height: 50px; }
  .stage { margin-inline: -6px; border-radius: var(--r-lg); }
  .hero-index { grid-template-columns: minmax(0, 1fr); margin-top: 20px; }
  .hero-index li + li a, .hero-index li:nth-child(3) a { padding-left: 0; box-shadow: none; }
  .hero-index li + li { border-top: 1px solid var(--line); }
  .hero-index a { padding: 14px 0 16px; }
  /* area mockups: stacked at 1:1, cropped to what reads on a phone */
  .vz { height: auto; padding: 16px 14px 18px; }
  .vz-inner { position: relative; left: auto; top: auto; width: auto; height: auto; margin: 0; display: grid; }
  .vz-inner > * { position: relative; left: auto; top: auto; width: auto; }
  .snap, .vd-rail, .vd-events em, .vd-hint, .vw-tabs span:not(.is-on), .vw-th, .vw-row > :nth-child(4), .vw-row > :nth-child(5), .vi-tile.m-hide { display: none; }
  .vd-body { grid-template-columns: minmax(0, 1fr); }
  .vd-main { border-top-left-radius: 0; box-shadow: inset 0 1px 0 var(--w11-stroke); padding: 14px 16px 16px; }
  .vd-events li { grid-template-columns: 62px 14px minmax(0, 1fr); }
  .vw-app { height: auto; }
  .vw-row { grid-template-columns: 50px 56px minmax(0, 1fr); }
  .vw-api { margin: -10px 0 0 18px; }
  .vi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vi-foot .vi-counts, .vi .hmi-mode, .vwa-ms { display: none; }
  .va-draft { margin: -8px 0 0 18px; }
  .va-text { font-size: 17px; }
  .about-grid { row-gap: 40px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .contact-panel { padding: 24px 18px; margin-inline: -6px; border-radius: var(--r-lg); }
  .form-pair { grid-template-columns: minmax(0, 1fr); }
  .doc-summary { grid-template-columns: minmax(0, 1fr); }
  .doc-summary dt { padding-bottom: 0; border-bottom: 0; }
  .doc-summary dd { padding-top: 4px; }
  .doc-sec { grid-template-columns: minmax(0, 1fr); padding: 28px 0 30px; }
  .doc-sec > .doc-n { grid-row: auto; padding-top: 0; margin-bottom: 8px; }
  .doc-sec p { font-size: 17px; }
  .footer-nav, .footer-contact { grid-column: 1 / 13; }
  .footer-bottom { flex-wrap: wrap; gap: 12px 20px; }
}
@media (max-width: 420px) {
  .eyebrow { flex-direction: column; align-items: flex-start; gap: 4px; }
  .eyebrow-rule { display: none; }
}

/* ---------- Print: content in black on white, no decoration, no controls ---------- */
@media print {
  :root, [data-theme] { color-scheme: light; --logo-ink: #000; --logo-door: #555; --accent-ink: #000; --text: #000; --text-2: #222; --bg: #FFF; --bg-2: #FFF; --stage: #FFF; --card: #FFF; --s1: #FFF; }
  html, body { background: #fff !important; color: #000; }
  body { font-size: 11pt; }
  .skip-link, .header-tools, .nav, .mobile-nav, .stage, .area-visual, .about-visual, .simple-visual,
  .contact-card, .contact-wash, .footer-top-link, .doc-toc, .hero-index { display: none !important; }
  .site-header { position: static; border: 0; background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .hero-grid, .area-row, .about-grid, .contact-panel, .simple-grid, .page-head-grid, .doc, .footer-top { display: block; }
  .hero, .build, .about, .contact, .page-head, .page-simple { padding: 12pt 0; border: 0; }
  .contact-panel { padding: 0; box-shadow: none; }
  .area-row, .doc-sec, .fact { break-inside: avoid; }
  .rows { gap: 18pt; }
  .full-stop { text-shadow: none; }
  a { color: #000; }
  .site-footer { border-top: 1px solid #ccc; }
  .footer-nav, .footer-contact { margin-top: 14pt; }
  .footer-nav ul { display: flex; gap: 14pt; }
}
