/* Kymata Systems: design v3 (round 3, closer to Stereolabs).
   White base, charcoal bands for media and signal; pills and 4/8 px cards; crosshair marks and bracket frames.
   Kymata keeps its own accent (#C5F82A), type (Geist) and logo. */
@layer tokens, base, layout, components, sections, utilities;

/* ============================== TOKENS ============================== */
@layer tokens {
  :root {
    /* light */
    --white: #FFFFFF;  --mist: #F2F2F2;  --silver: #CCCCCC;  --stone: #D8D4CC;
    --ink: #050505;    --ink-2: #3C3C3C; --ink-3: #666666;
    /* dark */
    --char: #191919;   --char-2: #2D2D2D; --char-3: #0F0F0F;
    --snow: #F2F2F2;   --snow-2: #C2C2C2; --snow-3: #999999;
    /* accent: Kymata's own */
    --signal: #C5F82A; --signal-hover: #B4EA14; --signal-deep: #3E6B00;
    --amber: #F0A43A;  --amber-deep: #9A5B00;
    --accent-fill: var(--signal); --on-accent: var(--ink);

    --font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

    --space-1: 4px;  --space-2: 8px;  --space-3: 16px; --space-4: 24px; --space-5: 32px;
    --space-6: 48px; --space-7: 64px; --space-8: 96px; --space-9: 128px;
    --band-pad: clamp(40px, 5vw, 72px);

    --measure: 1072px; --cols: 12; --col-gap: 24px; --margin: 32px;
    --radius-pill: 9999px; --radius: 4px; --radius-lg: 8px;
    --header-top: 16px; --header-h: 56px;
    --subnav-top: calc(var(--header-top) + var(--header-h) + 8px); --subnav-h: 52px;
    --ease: cubic-bezier(.2, .7, .1, 1);
    --dur: 200ms;
  }

  /* White is the default surface. */
  :root, [data-theme="light"] {
    --surface: var(--white); --surface-alt: var(--mist); --surface-panel: var(--stone); --surface-inset: var(--white);
    --text: var(--ink); --text-2: var(--ink-2); --text-3: var(--ink-3);
    --line: #E6E6E6; --line-strong: #CCCCCC; --mark: #B3B3B3; --grid-line: rgba(5, 5, 5, .06);
    --btn-2-bg: var(--silver); --btn-2-text: var(--ink); --btn-2-hover: #BDBDBD;
    --card-hover: #E9E9E9;
    --accent-text: var(--signal-deep); --accent-line: var(--signal-deep);
    --focus: var(--ink); --warn: var(--amber-deep);
    color-scheme: light;
    background: var(--surface); color: var(--text);
  }

  [data-theme="dark"] {
    --surface: var(--char); --surface-alt: var(--char-2); --surface-panel: var(--char-2); --surface-inset: var(--char-3);
    --text: var(--snow); --text-2: var(--snow-2); --text-3: var(--snow-3);
    --line: rgba(255, 255, 255, .10); --line-strong: rgba(255, 255, 255, .22); --mark: rgba(255, 255, 255, .30); --grid-line: rgba(255, 255, 255, .06);
    --btn-2-bg: var(--char-2); --btn-2-text: var(--snow); --btn-2-hover: #3C3C3C;
    --card-hover: #353535;
    --accent-text: var(--signal); --accent-line: var(--signal);
    --focus: var(--signal); --warn: var(--amber);
    color-scheme: dark;
    background: var(--surface); color: var(--text);
  }

  @media (max-width: 1023px) { :root { --cols: 8; --margin: 24px; } }
  @media (max-width: 599px)  { :root { --cols: 4; --margin: 16px; --col-gap: 16px; --header-top: 12px; } }
}

/* ============================== BASE ============================== */
@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-top) + var(--header-h) + 24px); }
  html:has(.subnav) { scroll-padding-top: calc(var(--subnav-top) + var(--subnav-h) + 24px); }
  body {
    margin: 0; min-width: 320px;
    font-family: var(--font-sans); font-size: 16px; line-height: 1.5; font-weight: 400;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  }
  img, svg, canvas, video { display: block; max-width: 100%; }
  h1, h2, h3, h4, p, ul, ol, figure, fieldset, legend { margin: 0; padding: 0; }
  ul, ol { list-style: none; }
  fieldset { border: 0; min-width: 0; }
  a { color: inherit; }
  button, input, select, textarea { font: inherit; color: inherit; }
  h1, h2, h3, h4 { font-weight: 500; color: var(--text); text-wrap: balance; }
  h1, h2 { font-size: clamp(36px, 4.4vw, 62px); line-height: 1.05; letter-spacing: -0.03em; }
  h3 { font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; }
  p { max-width: 62ch; }
  :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
  ::selection { background: var(--signal); color: var(--ink); }
  table, .figure-value, .stat-value, .tabular { font-variant-numeric: tabular-nums; }
}

/* ============================== LAYOUT ============================== */
@layer layout {
  .wrap { max-width: calc(var(--measure) + 2 * var(--margin)); margin-inline: auto;
          padding-inline: max(var(--margin), env(safe-area-inset-left, 0px)); }
  .grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--col-gap); }
  .band { position: relative; padding-block: var(--band-pad); }
  .band-alt { background: var(--surface-alt); }

  /* Device 2 v2: three free-standing crosshair marks between sections */
  .marks { position: relative; height: 32px; margin-bottom: var(--space-6); }
  .marks i { position: absolute; top: 0; width: 32px; height: 32px; }
  .marks i::before, .marks i::after { content: ""; position: absolute; background: var(--mark); }
  .marks .l { left: 0; } .marks .c { left: 50%; transform: translateX(-50%); } .marks .r { right: 0; }
  .marks i::before { top: 0; bottom: 0; width: 1px; }
  .marks .l::before { left: 0; } .marks .c::before { left: 50%; } .marks .r::before { right: 0; }
  .marks i::after { top: 50%; height: 1px; }
  .marks .l::after { left: 0; width: 12px; } .marks .c::after { left: 0; right: 0; } .marks .r::after { right: 0; width: 12px; }

  /* Device 4: bracket frame around figure rows */
  .bracket { position: relative; padding-block: var(--space-6); }
  .bracket::before, .bracket::after {
    content: ""; position: absolute; left: 0; right: 0; height: 12px; pointer-events: none;
    background:
      linear-gradient(var(--mark), var(--mark)) left top / 1px 100% no-repeat,
      linear-gradient(var(--mark), var(--mark)) left top / 12px 1px no-repeat,
      linear-gradient(var(--mark), var(--mark)) right top / 1px 100% no-repeat,
      linear-gradient(var(--mark), var(--mark)) right top / 12px 1px no-repeat,
      linear-gradient(var(--mark), var(--mark)) center top / 1px 100% no-repeat,
      linear-gradient(var(--mark), var(--mark)) center top / 24px 1px no-repeat;
  }
  .bracket::before { top: 0; }
  .bracket::after { bottom: 0; transform: scaleY(-1); }
}

/* ============================== COMPONENTS ============================== */
@layer components {
  /* ---- type roles ---- */
  .display, .page-title { font-size: clamp(36px, 4.4vw, 62px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 500; max-width: 18ch; }
  .panel-title { font-size: clamp(28px, 2.6vw, 36px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 500; }
  .lede { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.45; max-width: 56ch; color: var(--text); }
  .index, .eyebrow, .label {
    font-family: var(--font-mono); font-size: 12px; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase;
    font-weight: 500; color: var(--text-2);
  }
  .tag {
    display: inline-block; justify-self: start; padding: 4px 8px; border: 1px solid var(--text-3); border-radius: var(--radius);
    font-family: var(--font-mono); font-size: 12px; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase;
    font-weight: 500; color: var(--text); white-space: nowrap;
  }
  .tbd { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--text-3); }

  /* ---- buttons (all pills) ---- */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 48px; padding: 0 22px; border: 0; border-radius: var(--radius-pill);
    font-family: var(--font-sans); font-size: 17px; font-weight: 500; line-height: 1; white-space: nowrap;
    text-decoration: none; cursor: pointer; transition: background-color var(--dur) var(--ease);
  }
  .btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform var(--dur) var(--ease); }
  .btn:hover svg, a:hover > .btn svg, a:hover .card-body > .btn svg { transform: translateX(3px); }
  .btn-primary { background: var(--accent-fill); color: var(--on-accent); }
  .btn-primary:hover { background: var(--signal-hover); }
  .btn-secondary, .btn-ghost { background: var(--btn-2-bg); color: var(--btn-2-text); }
  .btn-secondary:hover, .btn-ghost:hover, a.card:hover .btn-secondary { background: var(--btn-2-hover); }
  .btn-sm { height: 36px; padding: 0 16px; font-size: 15px; }
  .btn-sm svg { width: 16px; height: 16px; }
  .actions { display: flex; flex-wrap: wrap; gap: 12px; }

  .text-link {
    display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500;
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  }
  .text-link:hover { text-decoration-thickness: 2px; }
  .text-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform var(--dur) var(--ease); }
  .text-link:hover svg { transform: translateX(3px); }
  .source { font-family: var(--font-mono); font-size: 12px; line-height: 1.45; letter-spacing: .02em; color: var(--text-3); }
  .source a, a.src, .src a { color: var(--text-3); text-decoration: underline; text-underline-offset: 3px; }
  a.src, .src a { font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em; white-space: nowrap; }
  .source a:hover, a.src:hover, .src a:hover { color: var(--text); }
  .coming { display: inline-block; padding: 3px 7px 2px; border: 1px solid var(--text-3); border-radius: var(--radius);
    font-family: var(--font-mono); font-size: 11px; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; color: var(--text); vertical-align: middle; }

  .skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 12px 18px; border-radius: var(--radius-pill); background: var(--signal); color: var(--ink); font-weight: 500; text-decoration: none; }
  .skip-link:focus { top: 16px; }
  .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

  /* ---- floating header ---- */
  .site-header {
    position: fixed; inset: var(--header-top) 0 auto 0; z-index: 50; margin-inline: auto;
    width: min(calc(var(--measure) + 32px), calc(100% - 24px)); height: var(--header-h);
    background: var(--surface); color: var(--text); border: 1px solid transparent; border-radius: var(--radius);
    transition: border-color var(--dur) var(--ease);
  }
  .site-header.is-scrolled, .site-header.is-open { border-color: var(--line); }
  .header-inner { height: 100%; padding: 0 10px 0 16px; display: flex; align-items: center; gap: 20px; }
  .brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: none; }
  .brand-mark { width: 30px; height: 24px; fill: none; stroke: var(--text); stroke-width: 2.6; stroke-linecap: round; }
  .brand-word { display: flex; flex-direction: column; font-size: 15px; font-weight: 600; letter-spacing: .14em; line-height: 1; }
  .brand-word small { margin-top: 4px; font-family: var(--font-mono); font-size: 8.5px; font-weight: 500; letter-spacing: .42em; color: var(--text-2); }

  .main-nav { display: flex; align-items: center; margin-left: auto; }
  .nav-list { display: flex; align-items: center; gap: 2px; }
  .nav-item { position: relative; }
  .nav-link, .nav-trigger {
    display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 0; border-radius: var(--radius-pill); background: none; cursor: pointer;
    font-size: 15px; font-weight: 500; color: var(--text); text-decoration: none; white-space: nowrap;
  }
  .nav-link:hover, .nav-trigger:hover, .nav-trigger[aria-expanded="true"] { background: var(--surface-alt); }
  .nav-trigger::after {
    content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
    transform: translateY(-2px) rotate(45deg); transition: transform var(--dur) var(--ease); opacity: .8;
  }
  .nav-trigger[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
  .nav-item.is-current > .nav-link::before, .nav-item.is-current > .nav-trigger::before { content: ""; width: 6px; height: 6px; flex: none; background: var(--text); }

  .nav-panel {
    position: absolute; top: calc(100% + 18px); left: -6px; z-index: 2; display: none; min-width: 330px; padding: 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  }
  .nav-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -19px; height: 19px; }
  .nav-item.is-open > .nav-panel { display: grid; }
  .nav-panel a { display: grid; gap: 3px; padding: 12px 14px; border-radius: var(--radius); color: var(--text); text-decoration: none; transition: background-color var(--dur) var(--ease); }
  .nav-panel a b { font-size: 15px; font-weight: 500; }
  .nav-panel a span { font-family: var(--font-mono); font-size: 12px; line-height: 1.4; letter-spacing: .02em; color: var(--text-2); }
  .nav-panel a:hover { background: var(--surface-alt); }
  .nav-panel a[aria-current="page"] b::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; vertical-align: 2px; background: var(--text); }
  .nav-cta { display: none; }
  .header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
  .menu-toggle {
    display: none; align-items: center; gap: 10px; height: 36px; padding: 0 14px; border: 0; cursor: pointer;
    border-radius: var(--radius-pill); background: var(--btn-2-bg); color: var(--btn-2-text); font-size: 15px; font-weight: 500;
  }
  .menu-toggle-lines { display: grid; gap: 5px; width: 16px; }
  .menu-toggle-lines i { display: block; height: 1.5px; background: currentColor; transition: transform var(--dur) var(--ease); }
  .site-header.is-open .menu-toggle-lines i:first-child { transform: translateY(3.25px) rotate(45deg); }
  .site-header.is-open .menu-toggle-lines i:last-child { transform: translateY(-3.25px) rotate(-45deg); }

  @media (max-width: 1023px) {
    .site-header { width: calc(100% - 24px); }
    .menu-toggle { display: inline-flex; }
    .header-actions { margin-left: auto; }
    .main-nav {
      position: fixed; top: calc(var(--header-top) + var(--header-h) + 8px); left: 12px; right: 12px; bottom: 12px; z-index: 1;
      display: none; flex-direction: column; align-items: stretch; padding: 8px 20px 28px; overflow-y: auto;
      background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    }
    .site-header.is-open .main-nav { display: flex; }
    .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav-item { border-bottom: 1px solid var(--line); }
    .nav-link, .nav-trigger { width: 100%; height: auto; padding: 18px 0; border-radius: 0; font-size: 20px; }
    .nav-link:hover, .nav-trigger:hover, .nav-trigger[aria-expanded="true"] { background: none; }
    .nav-trigger::after { margin-left: auto; }
    .nav-panel { position: static; min-width: 0; padding: 0 0 14px; border: 0; }
    .nav-panel::before { display: none; }
    .nav-panel a { padding: 10px 0; }
    .nav-panel a:hover { background: none; }
    .nav-cta { display: inline-flex; align-self: flex-start; margin-top: 28px; }
  }
  @media (max-width: 599px) {
    .header-cta { display: none; }
    .header-inner { gap: 12px; }
  }

  /* ---- section head: H2 left, tag right on the first line (tag above the H2 on mobile) ---- */
  .sec-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; row-gap: 20px; margin-bottom: var(--space-6); }
  .sec-head > .tag { grid-column: 2; grid-row: 1; align-self: start; justify-self: end; margin-top: 12px; }
  .sec-head > h1, .sec-head > h2 { grid-column: 1; grid-row: 1; max-width: 20ch; }
  .sec-head > .lede { grid-column: 1; color: var(--text-2); }
  .sec-head > .actions, .sec-head > .sec-head-action { grid-column: 1; }
  .sec-head > .sec-head-action { margin-top: 4px; }
  @media (max-width: 767px) {
    .sec-head { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
    .sec-head > .tag, .sec-head > h1, .sec-head > h2 { grid-column: 1; grid-row: auto; margin-top: 0; }
    .sec-head > .tag { justify-self: start; }
  }

  /* ---- figures: sans with mono labels ---- */
  .figure-value {
    font-family: var(--font-sans); font-weight: 400; font-size: clamp(44px, 5vw, 72px); line-height: 1; letter-spacing: -0.03em;
    color: var(--text); white-space: nowrap;
  }
  .figure-value .unit { margin-left: .12em; font-size: .45em; letter-spacing: 0; }
  .figure-value .pre { margin-right: .14em; font-size: .45em; letter-spacing: 0; }
  .figure-label { margin-top: 12px; font-family: var(--font-mono); font-size: 14px; line-height: 1.35; letter-spacing: .08em; text-transform: uppercase; color: var(--text); max-width: 30ch; }
  .figure-caption { margin-top: 12px; max-width: 34ch; font-size: 15px; line-height: 1.5; color: var(--text-2); }
  .figure-label + .source, .figure-caption + .source { margin-top: 8px; }
  .stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 40px; }
  .stat-row.n-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row.n-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-row > * { padding-inline: 24px; }
  .stat-row.n-4 .figure-value { font-size: clamp(30px, 3vw, 44px); }
  .stat-row.is-compact .figure-value { font-size: clamp(32px, 3.4vw, 48px); }
  .stat-row.n-4.is-compact .figure-value { font-size: clamp(26px, 2.6vw, 36px); }
  .stat-row.is-dense .figure-value { font-size: clamp(26px, 2.4vw, 36px); }
  .stat-value { font-family: var(--font-sans); font-size: clamp(24px, 2vw, 30px); line-height: 1.1; letter-spacing: -0.02em; color: var(--text); white-space: nowrap; }
  .stat-value .unit, .stat-value .pre { font-size: .55em; letter-spacing: 0; }
  .stat-value .unit { margin-left: .14em; } .stat-value .pre { margin-right: .14em; }
  .stat-caption { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--text-2); }
  .stat-list { display: grid; gap: 18px; }
  @media (max-width: 1023px) { .stat-row.n-4, .stat-row.is-dense { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 767px) { .stat-row, .stat-row.n-2, .stat-row.n-4, .stat-row.is-dense { grid-template-columns: minmax(0, 1fr); } .stat-row > * { padding-inline: 16px; } }

  /* ---- card grids (former hairline grids): mist cards, 4 px ---- */
  .hairgrid { display: grid; gap: 16px; }
  .hairgrid > * { padding: 24px; border-radius: var(--radius); background: var(--surface-alt); }
  .open-cells.cols-1 { grid-template-columns: minmax(0, 1fr); }
  .open-cells.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .open-cells.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .open-cells.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .open-cells.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  @media (max-width: 1023px) { .open-cells.cols-3, .open-cells.cols-4, .open-cells.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 599px) { .open-cells.cols-2, .open-cells.cols-3, .open-cells.cols-4, .open-cells.cols-5 { grid-template-columns: minmax(0, 1fr); } }
  .text-cells .label { margin-bottom: 12px; }
  .text-cells h3 { margin-bottom: 10px; }
  .text-cells p:not(.label) { color: var(--text-2); }
  .cap-cells h3 { font-size: 18px; }

  /* ---- ledger row ---- */
  .ledger { border-bottom: 1px solid var(--line); }
  .ledger-row {
    position: relative; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--col-gap);
    padding-block: 26px 30px; border-top: 1px solid var(--line);
  }

  /* ---- data window ---- */
  .data-window { position: relative; isolation: isolate; overflow: hidden; background: var(--surface-inset); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); }
  .data-window::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(to right, var(--grid-line) 1px, transparent 1px) 0 0 / 12.5% 100%;
  }
  .feature-panel .data-window, .media-panel .data-window, .band[data-theme="dark"] .data-window { border: 0; }
  .window-body { position: relative; aspect-ratio: 16 / 10; }
  .window-body > canvas, .window-body > svg, .window-body > img { position: absolute; inset: 0; width: 100%; height: 100%; }
  .window-body > img { object-fit: contain; }
  .window-body:has(> img) { aspect-ratio: 9 / 5; }
  .window-bar {
    display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--line);
    font-family: var(--font-mono); font-size: 12px; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3);
  }
  .window-bar span:last-child { text-align: right; }

  /* ---- small pill tabs ---- */
  .pill-tabs, .tabs { display: flex; flex-wrap: wrap; gap: 6px; }
  .pill-tabs [role="tab"], .tabs [role="tab"] {
    height: 32px; padding: 0 14px; border: 0; border-radius: var(--radius-pill); cursor: pointer;
    background: var(--btn-2-bg); color: var(--btn-2-text); font-size: 14px; font-weight: 500;
  }
  .pill-tabs [role="tab"]:hover, .tabs [role="tab"]:hover { background: var(--btn-2-hover); }
  .pill-tabs [role="tab"][aria-selected="true"], .tabs [role="tab"][aria-selected="true"] { background: var(--text); color: var(--surface); }

  /* ---- cards ---- */
  .cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards > li { display: flex; }
  .cards > li > .card { flex: 1; }
  .card {
    position: relative; display: flex; flex-direction: column; gap: 14px; padding: 12px 12px 20px;
    border-radius: var(--radius); background: var(--surface-alt); color: var(--text); text-decoration: none;
    transition: background-color var(--dur) var(--ease);
  }
  a.card:hover { background: var(--card-hover); }
  .card-media { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--surface-panel); }
  .card-media > svg { width: 78%; height: 78%; fill: none; stroke: var(--text); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
  .card-media .accent { stroke: var(--accent-line); stroke-width: 1.6; }
  .card-media .faint { stroke: var(--text-2); stroke-width: .8; }
  .card-media .ink-fill { fill: var(--text); stroke: none; }
  .card-media > .data-window { position: absolute; inset: 0; border: 0; border-radius: 0; }
  .card-media > .data-window .window-body { height: 100%; aspect-ratio: auto; }
  .card-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 4px 8px 0; }
  .card-meta { display: flex; justify-content: space-between; gap: 12px; }
  .card-desc { font-size: 15px; line-height: 1.45; color: var(--text-2); }
  .card-body > .btn { align-self: flex-start; margin-top: auto; }
  .card-body > .coming { align-self: flex-start; }
  .card.is-planned h3 { color: var(--text-2); }
  @media (max-width: 1023px) { .cards, .cards.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 599px) { .cards, .cards.cols-3 { grid-template-columns: minmax(0, 1fr); } }

  /* index tiles = icon cards */
  .index-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .index-tiles.tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .index-tiles > li { padding: 0; background: none; }
  .index-tile {
    display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 20px; border-radius: var(--radius);
    background: var(--surface-alt); color: var(--text); text-decoration: none; transition: background-color var(--dur) var(--ease);
  }
  .index-tile:hover { background: var(--card-hover); }
  .tile-icon { width: 32px; height: 32px; padding: 5px; border: 1px solid var(--text); border-radius: var(--radius); fill: none; stroke: var(--text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .tile-name { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
  .tile-desc { font-size: 15px; line-height: 1.45; color: var(--text-2); max-width: 34ch; }
  .tile-arrow { display: grid; place-items: center; width: 36px; height: 36px; margin-top: auto; border-radius: var(--radius-pill); background: var(--btn-2-bg); color: var(--btn-2-text); }
  .tile-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform var(--dur) var(--ease); }
  .index-tile:hover .tile-arrow { background: var(--btn-2-hover); }
  .index-tile:hover .tile-arrow svg { transform: translateX(3px); }
  @media (max-width: 1023px) { .index-tiles.tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 599px) { .index-tiles, .index-tiles.tiles-4 { grid-template-columns: minmax(0, 1fr); } }

  /* ---- media panel and feature panel ---- */
  .panel-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .media-panel { display: flex; flex-direction: column; gap: 20px; padding: 24px; border-radius: var(--radius-lg); background: var(--surface-panel); color: var(--text); }
  .media-panel.is-signal { background: var(--char-3); }
  .panel-copy p { margin-top: 12px; max-width: 34ch; color: var(--text-2); }
  .panel-media { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; }
  .media-panel > .btn { align-self: flex-start; margin-top: auto; }
  .panel-note { font-size: 14px; line-height: 1.5; color: var(--text-2); max-width: 46ch; }
  .feature-panels { display: grid; gap: 16px; }
  .feature-panel { display: grid; gap: 24px; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); }
  .feature-panel .panel-copy p { max-width: 52ch; }
  .feature-panel .window-body { aspect-ratio: 21 / 8; }
  .feature-panel .tbd { display: block; margin-top: 12px; }
  @media (max-width: 767px) { .panel-pair { grid-template-columns: minmax(0, 1fr); } .feature-panel .window-body { aspect-ratio: 16 / 10; } }

  /* ---- icon feature row ---- */
  .icon-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px var(--col-gap); }
  .icon-row.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .icon-feature { display: flex; flex-direction: column; gap: 14px; }
  .icon-box { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--text); border-radius: var(--radius); }
  .icon-box svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .icon-feature p { color: var(--text-2); }
  .tag-link {
    margin-top: auto; align-self: flex-start; padding: 4px 8px; border: 1px solid var(--text-3); border-radius: var(--radius);
    font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text); text-decoration: none;
  }
  .tag-link:hover { border-color: var(--text); background: var(--surface-alt); }
  @media (max-width: 1023px) { .icon-row, .icon-row.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 599px) { .icon-row, .icon-row.cols-3 { grid-template-columns: minmax(0, 1fr); } }

  /* ---- step cards ---- */
  .step-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .step { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: var(--radius); background: var(--surface-alt); }
  .step-index { font-family: var(--font-mono); font-size: 13px; letter-spacing: .02em; color: var(--text-2); }
  .step-art { aspect-ratio: 4 / 3; }
  .step-art svg { width: 100%; height: 100%; fill: none; stroke: var(--text); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
  .step-art .acoustic { stroke: var(--accent-line); stroke-width: 1.6; }
  .step-art .ink-fill { fill: var(--text); stroke: none; }
  .step-art .soft-fill { fill: var(--surface); }
  .step-art .faint { stroke: var(--text-2); stroke-width: .8; }
  .step-art text { fill: var(--text-2); stroke: none; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; }
  .step p:not(.step-index) { color: var(--text-2); }
  .plus-list { display: grid; gap: 6px; font-size: 15px; color: var(--text-2); }
  .plus-list li { display: flex; gap: 10px; }
  .plus-list li::before { content: "+"; flex: none; font-family: var(--font-mono); color: var(--text-2); }
  @media (max-width: 1023px) { .step-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 599px) { .step-row { grid-template-columns: minmax(0, 1fr); } }

  /* ---- sub-navigation: white bar, text pills ---- */
  .subnav { position: sticky; top: var(--subnav-top); z-index: 40; height: var(--subnav-h); background: var(--surface); border-bottom: 1px solid var(--line); }
  .subnav-inner {
    height: 100%; max-width: calc(var(--measure) + 2 * var(--margin)); margin-inline: auto; padding-inline: var(--margin);
    display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none;
  }
  .subnav-inner::-webkit-scrollbar { display: none; }
  .subnav a {
    display: inline-flex; align-items: center; flex: none; height: 32px; padding: 0 12px; border-radius: var(--radius-pill);
    font-size: 14px; font-weight: 500; color: var(--text-2); text-decoration: none; white-space: nowrap;
  }
  .subnav a:hover { background: var(--surface-alt); color: var(--text); }
  .subnav a.is-current { background: var(--text); color: var(--surface); }
  /* scroll cue: a fade and a chevron while more items sit off-screen */
  .subnav.has-more .subnav-inner { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
  .subnav.has-more::after {
    content: "›"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    font-size: 22px; line-height: 1; color: var(--text); pointer-events: none;
  }

  /* ---- crumbs ---- */
  .crumbs { display: flex; flex-wrap: wrap; gap: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
  .crumbs a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
  .crumbs a:hover { color: var(--text); }
  .crumbs [aria-current] { color: var(--text); }

  /* ---- CTA band ---- */
  .cta-grid { row-gap: 24px; }
  .cta-grid > .tag { grid-column: 1 / -1; }
  .cta-title { grid-column: 1 / span 7; max-width: 18ch; }
  .cta-grid > .lede { grid-column: 1 / span 6; color: var(--text-2); }
  .cta-grid > .actions { grid-column: 1 / span 6; }
  .cta-trace { grid-column: 8 / -1; grid-row: 2 / span 3; align-self: end; }
  .cta-trace svg { width: 100%; height: auto; fill: none; }
  .cta-trace .trace { stroke: var(--text); stroke-width: 1.4; }
  .cta-trace .base, .cta-trace .tick { stroke: var(--line-strong); }
  .cta-trace .arrival { stroke: var(--accent-line); stroke-width: 1.5; }
  .cta-trace text { fill: var(--text-2); font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; }
  .cta-trace .arrival-label { fill: var(--accent-text); }
  @media (max-width: 1023px) {
    .cta-title, .cta-grid > .lede, .cta-grid > .actions { grid-column: 1 / -1; }
    .cta-trace { grid-column: 1 / -1; grid-row: auto; max-width: 560px; }
  }

  /* ---- footer ---- */
  .site-footer { padding: 72px 0 32px; }
  .footer-top { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 48px; }
  .footer-brand { grid-column: 1 / span 3; display: grid; align-content: start; gap: 18px; }
  .footer-brand p { font-size: 15px; color: var(--text-2); max-width: 34ch; }
  .footer-brand .footer-note { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
  .social { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-pill); background: var(--btn-2-bg); color: var(--btn-2-text); }
  .social svg { width: 16px; height: 16px; fill: currentColor; }
  .footer-cols { grid-column: 4 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px var(--col-gap); }
  .footer-cols > div { display: grid; align-content: start; gap: 10px; }
  .footer-label { margin-bottom: 6px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
  .footer-cols a { font-size: 15px; color: var(--text-2); text-decoration: none; }
  .footer-cols a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
  .footer-bottom {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
    margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line);
    font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--text-3);
  }
  .legal { display: flex; flex-wrap: wrap; gap: 24px; }
  .legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
  .concept { text-transform: uppercase; letter-spacing: .08em; }
  @media (max-width: 1023px) { .footer-brand, .footer-cols { grid-column: 1 / -1; } }
  @media (max-width: 767px) { .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (max-width: 599px) { .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

  /* ---- dialog ---- */
  .contact-dialog {
    width: min(760px, calc(100vw - 24px)); max-height: calc(100svh - 24px); padding: clamp(24px, 4vw, 44px);
    background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-lg);
  }
  .contact-dialog::backdrop { background: rgba(5, 5, 5, .6); }
  .contact-dialog h2 { margin: 12px 0; font-size: clamp(28px, 3vw, 40px); }
  .dialog-lede { margin-bottom: 28px; color: var(--text-2); }
  .dialog-close {
    position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; padding: 0; border: 0; cursor: pointer;
    border-radius: var(--radius-pill); background: var(--btn-2-bg); color: var(--btn-2-text); font-size: 20px; line-height: 1;
  }
  .dialog-close:hover { background: var(--btn-2-hover); }

  /* ---- form fields ---- */
  .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .field { display: grid; align-content: start; gap: 8px; }
  .field-wide { grid-column: 1 / -1; }
  .field label { font-size: 14px; font-weight: 500; color: var(--text); }
  .field .req { color: var(--text-2); }
  .field .optional { margin-left: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
  .field input, .field select, .field textarea {
    width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--text-3); border-radius: var(--radius);
    background: var(--surface-inset); color: var(--text); font-size: 16px;
  }
  .field textarea { height: auto; min-height: 112px; padding: 12px 14px; resize: vertical; }
  .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--text-2); }
  .field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 1px; }
  .field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--warn); }
  .field-error { font-size: 14px; color: var(--warn); }
  .field-error:empty { display: none; }
  .field-error::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 8px; border: 1px solid currentColor; border-radius: var(--radius); font-family: var(--font-mono); font-size: 11px; font-weight: 600; vertical-align: 1px; }
  .field-check label { display: flex; align-items: center; gap: 10px; font-weight: 400; }
  .field-check input { width: 18px; height: 18px; accent-color: var(--ink); }
  .form-note { margin-top: 20px; font-size: 14px; color: var(--text-2); }
  .form-note a { color: inherit; }
  .form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
  .form-required { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
  .form-done { display: grid; gap: 12px; padding: 24px 0; }
  .form-done h3:focus { outline: none; }
  @media (max-width: 599px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

  /* ---- tables ---- */
  .table-scroll { position: relative; overflow-x: auto; }
  .data-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
  .data-table th, .data-table td { padding: 16px 20px 16px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
  .data-table thead th { padding-top: 0; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); border-bottom-color: var(--line-strong); }
  .data-table tbody th { font-weight: 500; color: var(--text); }
  .data-table tbody th a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
  .data-table td { color: var(--text-2); }
  .data-table .group th { padding-top: 28px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); border-bottom-color: var(--line-strong); }
  .data-table .growth, .data-table .num { font-family: var(--font-mono); color: var(--text); white-space: nowrap; }
  .matrix .is-focus { color: var(--text); font-weight: 500; white-space: nowrap; }
  .matrix .mark { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; border: 1px solid currentColor; border-radius: var(--radius); font-family: var(--font-mono); font-size: 12px; }
  .matrix .is-none { color: var(--text-3); }
  .post-index .status { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
  .post-index .is-published .status { color: var(--text); }
  .post-index tbody th { font-weight: 400; }
  .post-index .is-published th { font-weight: 500; }
  .sector-cell:target, .tl-item:target, .data-table tr:target { outline: 2px solid var(--text); outline-offset: -2px; }

  /* ---- notes ---- */
  .review-note { margin-top: 24px; max-width: 90ch; font-size: 14px; line-height: 1.5; color: var(--text-2); }
  .review-note .label { margin-right: 10px; }
  .bottom-line { margin-top: 32px; padding-top: 18px; max-width: 80ch; border-top: 1px solid var(--line-strong); font-size: 17px; }
  .bottom-line .label { display: block; margin-bottom: 8px; }
  .fine-print { margin-top: 20px; font-family: var(--font-mono); font-size: 12px; line-height: 1.5; color: var(--text-3); max-width: 90ch; }
  .section-foot { margin-top: var(--space-6); }
}

/* ============================== SECTIONS ============================== */
@layer sections {
  /* ---- hero media band (charcoal, full bleed) ---- */
  .hero-media { position: relative; overflow: hidden; height: min(72svh, 760px); min-height: 440px; background: var(--surface); }
  .hero-media::before {
    content: ""; position: absolute; inset: 0; z-index: 1; margin-inline: auto; pointer-events: none;
    width: min(var(--measure), calc(100% - 2 * var(--margin)));
    background: linear-gradient(to right, var(--grid-line) 1px, transparent 1px) 0 0 / calc((100% + var(--col-gap)) / var(--cols)) 100%;
    border-right: 1px solid var(--grid-line);
  }
  .hero-stage { position: absolute; inset: 0; }
  .hero-stage canvas, .hero-stage video, .hero-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .media-ui { position: absolute; left: 0; right: 0; bottom: 20px; z-index: 2; }
  .media-ui .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
  .scene-pills { display: flex; flex-wrap: wrap; gap: 6px; }
  .scene-pill {
    height: 32px; padding: 0 14px; border: 0; border-radius: var(--radius-pill); cursor: pointer;
    background: rgba(45, 45, 45, .9); color: var(--text); font-size: 14px; font-weight: 500;
  }
  .scene-pill:hover { background: #3C3C3C; }
  .scene-pill[aria-selected="true"] { background: var(--snow); color: var(--ink); }
  .media-meta { display: flex; align-items: center; gap: 14px; margin-left: auto; }
  .media-caption { max-width: none; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
  .hero-pause {
    display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; cursor: pointer;
    border-radius: var(--radius-pill); background: rgba(45, 45, 45, .9); color: var(--text);
    font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  }
  .hero-pause:hover { background: #3C3C3C; }
  .hero-pause svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
  .hero-pause .i-play { display: none; fill: currentColor; stroke: none; }
  .hero-pause.is-paused .i-pause { display: none; }
  .hero-pause.is-paused .i-play { display: block; }
  .hero-media.is-compact { height: min(56svh, 560px); min-height: 380px; }
  @media (max-width: 767px) {
    .hero-media, .hero-media.is-compact { height: 44svh; min-height: 260px; }
    .media-ui { bottom: 10px; }
    .media-caption { display: block; font-size: 11px; letter-spacing: .05em; }
    .scene-pill { height: 30px; padding: 0 11px; font-size: 13px; }
  }

  /* ---- headline block (white) ---- */
  .headline { padding-block: 40px clamp(48px, 6vw, 80px); }
  .headline .crumbs { margin-bottom: 20px; }
  .headline .sec-head { margin-bottom: 0; }
  .headline .actions { margin-top: 8px; }
  @media (max-width: 767px) {
    .headline { padding-block: 20px 48px; }
    .headline .marks { margin-bottom: 20px; }
    .headline .sec-head { row-gap: 14px; }
  }

  /* ---- home: transducer / signal pair ---- */
  .xdcr-drawing { width: 86%; height: 86%; fill: none; stroke: var(--text); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
  .xdcr-drawing .ink-fill { fill: var(--text); stroke: none; }
  .xdcr-drawing .soft-fill { fill: var(--white); }
  .xdcr-drawing .acoustic { stroke: var(--signal-deep); stroke-width: 1.6; }
  .xdcr-drawing .thin { stroke: var(--text-2); stroke-width: .8; }
  .xdcr-drawing text { fill: var(--text); stroke: none; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; }
  .panel-mems { padding-top: 16px; border-top: 1px solid rgba(5, 5, 5, .16); }
  .panel-mems .mems-drawing { width: 100%; height: auto; }
  .panel-mems figcaption { margin-top: 8px; }
  .panel-mems .coming { margin-left: 4px; }
  @media (max-width: 599px) {
    /* drawings scale down on phones; keep their labels at 11 px or more on screen */
    .xdcr-drawing text { font-size: 17.5px; }
    .mems-drawing text { font-size: 16.5px; }
  }
  .frame-panel .data-window { border: 0; }
  .frame-panel .window-body { aspect-ratio: 4 / 3; }
  .frame-panel > p { margin-top: 12px; }
  .stack-svg .stack-top { fill: var(--char-2); stroke: var(--line-strong); }
  .stack-svg .stack-side { fill: var(--char); stroke: var(--line-strong); }
  .stack-svg .l3 .stack-top { stroke: var(--accent-line); }
  .stack-svg .code { fill: var(--text-2); }
  .stack-svg .code.dim { fill: var(--text-3); opacity: .7; }
  .stack-svg .chip { fill: var(--surface-inset); stroke: var(--text-2); stroke-width: .01; }
  .stack-svg .trace, .stack-svg .disc-ring { fill: none; stroke: var(--text-3); stroke-width: 1; }
  .stack-svg .pad { fill: var(--text-3); }
  .stack-svg .disc { fill: var(--text-3); opacity: .55; }
  .stack-svg .stack-beam { stroke: var(--line-strong); stroke-dasharray: 3 4; }
  .stack-svg .stack-labels path { fill: none; stroke: var(--line-strong); }
  .stack-svg text { fill: var(--text-2); font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; }
  .stack-svg .l3-label { fill: var(--accent-text); }

  /* ---- home: applications ---- */
  .apps-stats { margin-bottom: var(--space-6); }
  .word-index { margin-top: var(--space-6); }
  .word-index ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: var(--col-gap); border-bottom: 1px solid var(--line); }
  .word-index li { border-top: 1px solid var(--line); }
  .word-index a {
    display: flex; justify-content: space-between; gap: 8px; padding: 14px 0; text-decoration: none;
    font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--text);
  }
  .word-index a::after { content: "→"; color: var(--text-2); }
  .word-index a:hover { text-decoration: underline; text-underline-offset: 4px; }
  @media (max-width: 1023px) { .word-index ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (max-width: 599px) { .word-index ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

  /* ---- split rows and copy flow ---- */
  .split-row { row-gap: 40px; align-items: start; }
  .split-left { grid-column: 1 / span 6; }
  .split-right { grid-column: 7 / -1; }
  .flow > * + * { margin-top: 16px; }
  .flow > .lede + * { margin-top: 20px; }
  .flow > .tag + h2, .flow > .tag + h3 { margin-top: 18px; }
  .flow > h2 + *, .flow > h3 + * { margin-top: 20px; }
  .flow > .text-link, .flow > .actions { margin-top: 28px; }

  /* ---- technology: what it is (diagram on a stone panel) ---- */
  .stone-panel { padding: 24px; border-radius: var(--radius-lg); background: var(--surface-panel); }
  .stone-panel figcaption { display: grid; gap: 6px; margin-top: 16px; }
  .stone-panel figcaption p { font-size: 15px; color: var(--text-2); }
  .stone-panel .label { color: var(--text); }
  .tof-drawing svg { width: 100%; height: auto; fill: none; }
  .tof-drawing .wall { stroke: var(--text); stroke-width: 1.5; }
  .tof-drawing .wall-inner { stroke: var(--text); stroke-width: 1; }
  .tof-drawing .hatch { stroke: var(--text-2); stroke-width: .75; }
  .tof-drawing .center { stroke: var(--text-2); stroke-width: .75; stroke-dasharray: 14 4 2 4; }
  .tof-drawing .xdcr { fill: var(--text); }
  .tof-drawing .path { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 4; }
  .tof-drawing .flow { stroke: var(--text); stroke-width: 1; }
  .tof-drawing .axis, .tof-drawing .tick { stroke: var(--text); stroke-width: 1; }
  .tof-drawing .dt { stroke: var(--accent-line); stroke-width: 1.8; }
  .tof-drawing .pulse { fill: var(--accent-line); offset-path: path('M164 108L316 212'); offset-rotate: 0deg; opacity: 0; }
  .tof-drawing text { fill: var(--text-2); font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; }
  .tof-drawing .dt-label { fill: var(--text); }
  .tof-drawing.is-playing .pulse.down { animation: pulseDown 3.2s linear infinite; }
  .tof-drawing.is-playing .pulse.up { animation: pulseUp 3.2s linear infinite; }
  @keyframes pulseDown { 0% { offset-distance: 0%; opacity: 0; } 4% { opacity: 1; } 42% { offset-distance: 100%; opacity: 1; } 46%, 100% { offset-distance: 100%; opacity: 0; } }
  @keyframes pulseUp { 0%, 50% { offset-distance: 100%; opacity: 0; } 54% { opacity: 1; } 96% { offset-distance: 0%; opacity: 1; } 100% { offset-distance: 0%; opacity: 0; } }

  /* ---- technology: five problems (ledger in a bracket frame) ---- */
  .problem-row { grid-template-rows: auto 1fr; }
  .problem-index { grid-column: 1; grid-row: 1 / span 2; display: grid; align-content: start; gap: 14px; }
  .problem-title { grid-column: 2 / span 5; grid-row: 1; }
  .problem-body { grid-column: 2 / span 5; grid-row: 2; margin-top: 10px; max-width: 52ch; }
  .problem-size { grid-column: 7 / span 3; grid-row: 1 / span 2; }
  .problem-size > .label { margin-bottom: 10px; }
  .problem-size .figure-value { font-size: clamp(36px, 3.6vw, 52px); }
  .problem-size .figure-caption { margin-top: 10px; font-size: 14px; }
  .problem-approach { grid-column: 10 / span 3; grid-row: 1 / span 2; }
  .problem-approach .approach-label { color: var(--accent-text); }
  .problem-approach p:not(.label) { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--text-2); }
  .bracket > .ledger { border-bottom: 0; }
  .bracket > .ledger > .ledger-row:first-child { border-top: 0; padding-top: 4px; }
  @media (max-width: 1023px) {
    .problem-row { grid-template-rows: none; row-gap: 16px; }
    .problem-index, .problem-title, .problem-body, .problem-size, .problem-approach { grid-column: 1 / -1; grid-row: auto; }
    .problem-index { grid-auto-flow: column; justify-content: start; align-items: center; }
    .problem-body { margin-top: 0; }
  }

  /* ---- technology: conventional methods (charcoal band, char-2 cards) ---- */
  .segmented { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 16px; }
  .segmented legend { float: left; margin-right: 4px; padding: 0; }
  .segmented-options { display: flex; flex-wrap: wrap; gap: 6px; }
  .segmented label { position: relative; cursor: pointer; }
  .segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; appearance: none; }
  .segmented span { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--btn-2-bg); color: var(--btn-2-text); font-size: 14px; font-weight: 500; }
  .segmented label:hover span { background: var(--btn-2-hover); }
  .segmented input:checked + span { background: var(--text); color: var(--surface); }
  .segmented input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
  .scenario-text { margin-bottom: 28px; color: var(--text-2); }
  .methods-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .methods-grid > * { --btn-2-bg: #3C3C3C; --btn-2-hover: #4A4A4A; }
  .tof-method { display: flex; flex-direction: column; gap: 14px; }
  .tof-method > p:not(.tof-result):not(.label):not(.tof-status) { font-size: 15px; line-height: 1.5; color: var(--text-2); }
  .tof-method .data-window { background: var(--char-3); }
  .tof-result { display: flex; gap: 10px; align-items: baseline; margin-top: auto; font-size: 15px; line-height: 1.45; color: var(--text); }
  .result-icon {
    flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid currentColor; border-radius: var(--radius);
    font-family: var(--font-mono); font-size: 12px; font-weight: 600; line-height: 1; transform: translateY(3px);
  }
  .tof-result.is-ok .result-icon { color: var(--text); }
  .tof-result.is-risk .result-icon { color: var(--warn); }
  .tof-kymata { position: relative; overflow: hidden; }
  .tof-kymata::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--accent-fill); }
  .tof-kymata .tof-status { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--text-3); }
  .tof-kymata .btn { align-self: flex-start; margin-top: auto; }
  @media (max-width: 1023px) { .methods-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 599px) { .methods-grid { grid-template-columns: minmax(0, 1fr); } }

  /* ---- system diagram (inside data windows) ---- */
  .system-diagram { display: flex; align-items: center; justify-content: center; height: 100%; padding: 24px; }
  .system-diagram .block {
    flex: 1 1 0; min-width: 0; padding: 18px 8px; text-align: center; border: 1px solid var(--line-strong); border-radius: var(--radius);
    font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); background: var(--char-2);
  }
  .system-diagram .block.is-kymata { border-color: var(--accent-line); color: var(--text); }
  .system-diagram i { flex: 0 0 18px; height: 1px; background: var(--line-strong); }
  .window-body:has(.system-diagram) { display: grid; }
  .window-body:has(.system-diagram.is-wide) { aspect-ratio: auto; min-height: 160px; }
  .system-diagram.is-wide .block { padding: 18px 6px; font-size: 11px; }
  @media (max-width: 599px) {
    .system-diagram { flex-direction: column; align-items: stretch; }
    .system-diagram i { flex-basis: 14px; width: 1px; height: 14px; align-self: center; }
  }

  /* ---- subpages ---- */
  .lead-copy { grid-column: 1 / span 8; }
  .intro-pair { row-gap: 24px; margin-bottom: var(--space-6); }
  .intro-pair > .lede { grid-column: 1 / span 6; }
  .intro-pair > .plus-list { grid-column: 8 / -1; align-self: start; }
  .figures-col, .split-right.figure { padding-top: 18px; border-top: 1px solid var(--line-strong); }
  .figures-col .stat-list { margin-top: 18px; }
  .split-right.figure .label { margin-bottom: 14px; }
  .split-right .figure-caption { margin-top: 12px; }
  .split-right figcaption { margin-top: 14px; }
  .sub-block { margin-top: var(--space-8); }
  .sub-block > .tag { margin-bottom: 20px; }
  .sub-title { font-size: clamp(28px, 2.6vw, 36px); line-height: 1.1; letter-spacing: -0.03em; }
  .sub-block > .hairgrid, .sub-block > .grid + .hairgrid { margin-top: var(--space-6); }
  .bracket + .sub-block { margin-top: var(--space-7); }
  .index-tiles + .bracket, .grid + .bracket { margin-top: var(--space-6); }
  .conventional-grid { row-gap: 32px; align-items: start; }
  .conventional-cells { grid-column: 1 / span 7; }
  .conventional-plot { grid-column: 8 / -1; }
  .sector-cells.cols-1 { grid-template-columns: minmax(0, 1fr); }
  .sector-cells.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sector-cells.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sector-cell { display: flex; flex-direction: column; gap: 14px; }
  .cell-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
  .cell-top .line-icon { width: 32px; height: 32px; padding: 4px; border: 1px solid var(--text); border-radius: var(--radius); fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .cell-body { color: var(--text-2); }
  .sector-cell .stat-list { padding-top: 18px; border-top: 1px solid var(--line-strong); }
  .cell-focus { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-strong); font-size: 15px; }
  .cell-focus .label { display: block; margin-bottom: 6px; }
  @media (max-width: 1023px) { .sector-cells.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 767px) { .sector-cells.cols-2, .sector-cells.cols-3 { grid-template-columns: minmax(0, 1fr); } }
  .window-body:has(.echo-art) { aspect-ratio: 2 / 1; }
  .echo-art .zone { fill: rgba(255, 255, 255, .04); stroke: var(--line-strong); stroke-dasharray: 3 4; }
  .echo-art .base { stroke: var(--line-strong); }
  .echo-art .sig { fill: none; stroke: var(--text); stroke-width: 1.4; }
  .echo-art .hidden-echo { fill: none; stroke: var(--text-3); stroke-width: 1.4; stroke-dasharray: 2 3; }
  .echo-art .marker { stroke: var(--text-2); }
  .echo-art text { fill: var(--text-2); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; }
  .echo-art .t-cyan { fill: var(--accent-text); }

  /* timeline ledger (industries) */
  .timeline.ledger { margin-top: var(--space-3); }
  .tl-date { grid-column: 1 / span 2; font-family: var(--font-mono); font-size: 13px; letter-spacing: .02em; color: var(--text); }
  .tl-statement { grid-column: 3 / span 5; font-size: 19px; line-height: 1.35; }
  .tl-effect { grid-column: 8 / -1; font-size: 15px; color: var(--text-2); }
  .tl-effect .source { margin-top: 8px; }
  .tl-item.is-past .tl-date { color: var(--text-2); }
  .tl-today {
    display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--text);
    font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text);
  }
  .tl-today::before { content: ""; width: 6px; height: 6px; background: var(--text); }

  /* validation */
  .check-list { border-top: 1px solid var(--line-strong); }
  .check-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
  .check-row .line-icon { width: 32px; height: 32px; padding: 4px; border: 1px solid var(--text); border-radius: var(--radius); fill: none; stroke: var(--text); stroke-width: 2; }
  .check-row p { margin-top: 6px; color: var(--text-2); }
  .diagnostics-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
  .diagnostics-list li {
    display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: var(--radius-pill);
    background: var(--btn-2-bg); color: var(--btn-2-text); font-size: 14px; font-weight: 500;
  }
  .diagnostics-list li.is-active { background: var(--text); color: var(--surface); }

  /* about */
  .claim { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.3; letter-spacing: -0.01em; font-weight: 500; color: var(--text); }
  .compact-ledger { margin-top: 18px; border-bottom: 1px solid var(--line); }
  .compact-row { grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; padding-block: 18px 20px; }
  .compact-row .index { grid-row: 1 / span 2; padding-top: 4px; }
  .compact-row h3 { font-size: 18px; }
  .compact-row p:not(.index) { grid-column: 2; margin-top: 6px; font-size: 15px; color: var(--text-2); }
  .data-window + .cap-cells { margin-top: 16px; }
  .values-grid { row-gap: 40px; }
  .values-grid li { grid-column: span 4; padding-top: 20px; border-top: 1px solid var(--line-strong); }
  .value-word { margin-bottom: 18px; max-width: none; font-size: clamp(44px, 5.4vw, 80px); line-height: .95; letter-spacing: -0.04em; font-weight: 500; color: var(--text); }
  .values-grid p:not(.value-word) { color: var(--text-2); }
  .band .plus-list { max-width: 62ch; }

  /* insights */
  .featured { row-gap: 32px; align-items: center; }
  .featured-window { grid-column: 1 / span 7; }
  .featured-copy { grid-column: 8 / -1; }
  .featured-copy h2 { font-size: clamp(28px, 2.6vw, 36px); }
  .featured-copy h2 a { text-decoration: none; }
  .featured-copy h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

  /* article */
  .page-article .site-header { border-color: var(--line); }
  .article { padding: calc(var(--header-top) + var(--header-h) + 40px) 0 var(--band-pad); }
  .article-head { max-width: 900px; }
  .article-head .crumbs { margin-bottom: 28px; }
  .article-head .tag { margin-bottom: 18px; }
  .article-head .lede { margin-top: 24px; }
  .article-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
  .prose { max-width: 68ch; margin-top: var(--space-7); }
  .prose > * + * { margin-top: 18px; }
  .prose > h2 { margin-top: 48px; font-size: clamp(26px, 2.4vw, 34px); }
  .prose ul:not(.hairgrid):not(.stat-row), .prose ol { padding-left: 1.3em; list-style: revert; }
  .prose li + li { margin-top: 8px; }
  .prose .stat-row > li + li { margin-top: 0; }
  .prose a:not(.btn) { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
  .prose sup a { font-family: var(--font-mono); font-size: 11px; text-decoration: none; }
  .article-figure { margin-top: 32px; }
  .figure-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .article-figure figcaption { margin-top: 12px; font-size: 14px; color: var(--text-2); }
  .article-callout { margin-block: 32px; }
  .article-sources { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
  .article-sources h2 { margin-bottom: 16px; font-size: 20px; }
  .article-sources ol { padding-left: 1.4em; list-style: decimal; font-family: var(--font-mono); font-size: 13px; line-height: 1.5; color: var(--text-2); }
  .article-sources li + li { margin-top: 10px; }
  .article-sources .back { margin-left: 6px; text-decoration: none; }

  /* contact */
  .contact-grid { row-gap: 48px; align-items: start; }
  .form-card { grid-column: 1 / span 7; }
  .form-card h2 { margin: 18px 0 32px; }
  .contact-aside { grid-column: 9 / -1; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); }
  .contact-detail { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
  .contact-detail p:not(.label) { margin-top: 6px; font-size: 15px; color: var(--text-2); }

  @media (max-width: 1023px) {
    .split-left, .split-right, .lead-copy, .intro-pair > .lede, .intro-pair > .plus-list,
    .conventional-cells, .conventional-plot, .featured-window, .featured-copy, .form-card, .contact-aside { grid-column: 1 / -1; }
    .tl-date, .tl-statement, .tl-effect { grid-column: 1 / -1; }
    .tl-statement { margin-top: 6px; } .tl-effect { margin-top: 8px; }
  }
  @media (max-width: 599px) { .figure-pair { grid-template-columns: minmax(0, 1fr); } }
}

/* ============================== UTILITIES ============================== */
@layer utilities {
  /* Optional announcement bar (off by default): <div class="announce" data-theme="light">…</div> above the header. */
  .announce { display: flex; align-items: center; justify-content: center; gap: 16px; height: 40px; padding: 0 48px; background: var(--signal); color: var(--ink); font-size: 15px; font-weight: 500; }
  html.motion-paused *, html.motion-paused *::before, html.motion-paused *::after { animation-play-state: paused !important; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
    .tof-drawing .pulse.down { opacity: 1; offset-distance: 45%; }
  }
  [hidden] { display: none !important; }
}


/* ===== round 4 fixes ===== */
@layer sections {
  .cta-trace text { font-size: 14.5px; }
  .tof-drawing text { font-size: 11.5px; }
  /* the illustrated steps on Home use two columns; plain four-step rows keep four */
  @media (min-width: 1024px) { .step-row:not(.is-plain) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 1023px) { .step-art text { font-size: 12px; } }
  @media (max-width: 599px) {
    .cta-trace { display: none; }
    .tof-drawing text { font-size: 18px; }
    .echo-art text { font-size: 13px; }
    .hero-media, .hero-media.is-compact { height: clamp(200px, 34svh, 300px); min-height: 0; }
    .headline .marks { display: none; }
    .headline { padding-top: 24px; }
  }
}

/* ===== round 5: product illustrations (sections layer, so it can override the hero heights) ===== */
@layer sections {
  /* An illustration with HTML labels. The .fig box always has the SVG's own 9:5 ratio,
     so labels placed in % of it stay on their leader lines at every size. */
  .fig-stage { position: absolute; inset: 0; overflow: hidden; container-type: size; display: grid; place-items: center; background: var(--char-3); }
  .fig { position: relative; aspect-ratio: 9 / 5; width: max(100cqw, 180cqh); }          /* cover */
  .fig > img { position: absolute; inset: 0; width: 100%; height: 100%; }
  .fig-label { position: absolute; transform: translateY(-78%); white-space: nowrap;
    font: 500 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
  .fig-label.is-end { transform: translate(-100%, -78%); }
  .fig-label.is-center { transform: translate(-50%, -78%); }
  .fig-label.is-kymata { color: var(--accent-text); }
  /* Image heroes take the illustration's 9:5 height (no letterboxing), capped like the canvas heroes */
  .hero-media.is-image { background: var(--char-3); min-height: 0; height: min(100vw / 1.8, 72svh, 760px); }
  .hero-media.is-image.is-compact { height: min(100vw / 1.8, 56svh, 560px); }
  /* Below 1024 px the illustration is shown whole (contain), so it starts under the floating header, not behind it */
  @media (max-width: 1023px) {
    .hero-media.is-image, .hero-media.is-image.is-compact { height: calc(100vw / 1.8 + var(--header-top) + var(--header-h)); }
    .hero-media.is-image .fig-stage { top: calc(var(--header-top) + var(--header-h)); }
  }
  .hero-media.is-image::before { display: none; }   /* the illustration has its own grid */
  @media (max-width: 1023px) {
    .fig { width: min(100cqw, 180cqh); }                                                   /* contain */
    .fig-label { font-size: 11px; }
  }
  @media (max-width: 599px) { .fig-label { display: none; } }
  /* On phones the labels are hidden; the system diagram further down carries them */

  /* System diagram, built in HTML so it reflows instead of shrinking */
  .sys { margin-top: var(--space-7); }
  .sys-board { border-radius: var(--radius-lg); background: var(--char-3); padding: clamp(20px, 4vw, 48px);
    display: grid; grid-template-columns: auto minmax(64px, 1fr) auto 24px minmax(0, 2.4fr); align-items: center; }
  .sys-node { border-radius: var(--radius); background: var(--char-2); border: 1px solid var(--line-strong);
    padding: 16px 18px; min-width: 120px; display: grid; justify-items: center; gap: 8px; text-align: center;
    font: 500 12px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
  .sys-node small { font: inherit; color: var(--text-3); margin-top: -4px; }
  .sys-node .nw { white-space: nowrap; }  /* never break "front-end" at its hyphen */
  .sys-node svg { width: 56px; height: 36px; fill: none; stroke: var(--text-2); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
  .sys-node svg .sig { stroke: var(--accent-line); }
  .sys-node.is-kymata { border-color: var(--accent-line); }
  .sys-node.is-yours { background: transparent; border: 1px dashed rgba(255, 255, 255, .45); color: var(--text-2); min-width: 0; }
  .sys-link { position: relative; height: 1px; background: var(--line-strong); }
  .sys-link span { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); white-space: nowrap; padding: 0 4px;
    background: var(--char-3); font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
  .sys-branch { position: relative; display: grid; gap: 24px; padding-left: 24px; }
  .sys-branch::before { content: ""; position: absolute; left: 0; top: 25%; bottom: 25%; width: 1px; background: var(--line-strong); }
  .sys-row { position: relative; display: grid; grid-template-columns: minmax(96px, 1fr) auto 32px auto; align-items: center; }
  .sys-row::before { content: ""; position: absolute; left: -24px; top: 50%; width: 24px; height: 1px; background: var(--line-strong); }
  .sys-key { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 20px; font: 500 12px/1 var(--font-mono);
    letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
  .sys-key i { display: inline-block; width: 12px; height: 12px; border-radius: var(--radius); margin-right: 8px; vertical-align: -2px; }
  .sys-key .k { border: 1.2px solid var(--accent-line); }
  .sys-key .y { border: 1px dashed var(--text-3); }
  @media (max-width: 1023px) {
    .sys-board { grid-template-columns: 1fr; justify-items: center; }
    .sys-link { width: 1px; height: 28px; margin: 2px 0; }
    .sys-link span { left: 12px; bottom: auto; top: 50%; transform: translateY(-50%); }
    .sys-branch { width: 100%; padding-left: 0; grid-template-columns: 1fr 1fr; gap: 12px; }
    .sys-branch::before, .sys-row::before { display: none; }
    .sys-row { grid-template-columns: 1fr; justify-items: center; }
    .sys-row > .sys-link:first-child { display: none; }
    .sys-node { min-width: 0; width: 100%; max-width: 220px; }
  }
}


/* ===== landing hero: 3D flow meter cutaway (Inkworks kit, js/hero3d/), headline over it from 1024 px ===== */
@layer sections {
  .hero-3d .hero-stage canvas { object-fit: fill; }
  .hero-3d #hero-3d { opacity: 0; transition: opacity .8s var(--ease); cursor: grab; }
  .hero-3d.is-turning #hero-3d { cursor: grabbing; }
  .hero-3d.is-ready #hero-3d { opacity: 1; }
  .hero-3d .hero-overlay { pointer-events: none; z-index: 1; }
  /* the still shows until the live drawing is ready, and stays if WebGL or the script is unavailable */
  .hero-3d .hero-poster { object-position: 50% 50%; transition: opacity .8s var(--ease); }
  @media (min-width: 1024px) { .hero-3d .hero-poster { object-position: 75% 47%; } }
  .hero-3d.is-ready .hero-poster { opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility 0s .8s; }
  .hero-3d .media-ui { z-index: 3; }
  /* "What we do": the concept picture (js/tof-explainer.js) over the 3D piezo model. While that tab is selected the hero
     carries .is-combined (explainer and link shown, poster hidden) and .is-concept (the model's own overlay hidden). */
  .hero-3d .hero-explainer { z-index: 2; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility 0s .3s; }
  .hero-3d.is-combined .hero-explainer { opacity: 1; visibility: visible; transition: opacity .3s var(--ease); }
  .hero-3d.is-combined .hero-poster { opacity: 0; visibility: hidden; }
  .hero-3d.is-concept .hero-overlay { opacity: 0; }
  .hero-tech-link {
    position: absolute; z-index: 4; display: none; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
    border: 1px solid rgba(197, 248, 42, .45); border-radius: var(--radius-pill); background: rgba(45, 45, 45, .92); color: var(--snow);
    font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  }
  .hero-tech-link:hover { background: var(--signal); color: var(--ink); }
  .hero-tech-link svg { width: 14px; height: 14px; fill: none; stroke: var(--signal); stroke-width: 1.6; }
  .hero-tech-link:hover svg { stroke: currentColor; }
  .hero-3d.is-combined .hero-tech-link { display: inline-flex; }
  @media (max-width: 599px) { .hero-tech-link { height: 30px; padding: 0 12px; font-size: 11px; } }
  /* the frame holds the drawing (tab panel) and, as its sibling, the tab row */
  .hero-3d .hero-frame { position: absolute; inset: 0; }
  @media (prefers-reduced-motion: reduce) { .hero-3d #hero-3d { transition: none; } }

  /* desktop: the headline sits over the drawing, in the left half of the measure */
  @media (min-width: 1024px) {
    .hero-3d { height: min(78svh, 780px); min-height: 640px; }   /* room for the piezo model and the explainer on short screens */
    .hero-copy { position: absolute; inset: 0; z-index: 2; pointer-events: none; display: grid; align-content: center;
      padding: calc(var(--header-top) + var(--header-h) + 8px) 0 64px; }
    .hero-copy > .wrap { width: 100%; }   /* a grid item with auto margins would shrink to its content */
    .hero-copy .marks { display: none; }
    .hero-copy .sec-head { display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
      max-width: calc((100% - var(--col-gap)) / 2); pointer-events: auto; }
    .hero-copy .sec-head > .tag { margin: 0; }
    .hero-copy .lede { color: var(--text-2); max-width: 40ch; }
    .hero-copy .actions { margin-top: 4px; }
  }
  /* below 1024 px: the drawing on top and the headline underneath, both in the dark animation section (as on desktop) */
  @media (max-width: 1023px) {
    .hero-3d { height: auto; min-height: 0; overflow: visible; }
    .hero-3d .hero-frame { position: relative; height: 56svh; min-height: 320px; overflow: hidden; }
    .hero-copy .marks { display: none; }       /* the drawing above already marks the start of the page */
    .hero-copy { position: relative; z-index: 2; padding: 32px 0 56px; }
    .hero-copy .sec-head { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
    .hero-copy .sec-head > .tag { margin: 0; }
    .hero-copy .lede { color: var(--text-2); max-width: 46ch; }
    .hero-copy .actions { margin-top: 4px; }
  }
  @media (max-width: 599px) {
    .hero-3d .hero-frame { height: clamp(270px, 46svh, 400px); min-height: 0; }
    .hero-copy { padding: 20px 0 40px; }
    /* the positioning tag fits one line from 360 px; below that it wraps instead of running off the screen */
    .hero-copy .tag { font-size: 11px; letter-spacing: .04em; white-space: normal; }
  }
  /* shorter phones (375 × 667, 360 × 740): a slightly lower drawing keeps title, intro and the first button above the fold */
  @media (max-width: 599px) and (max-height: 760px) {
    .hero-3d .hero-frame { height: clamp(260px, 42svh, 400px); }
    .hero-copy { padding-top: 16px; }
  }
}

/* ===== landing hero: application tabs (water flow / domestic gas) ===== */
@layer sections {
  .app-pills { visibility: hidden; opacity: 0; transition: opacity .4s var(--ease); }       /* only once the live drawing runs */
  .hero-3d.is-ready .app-pills { visibility: visible; opacity: 1; }
  .hero-3d.is-fallback .app-pills { display: none; }
  /* six tabs: the short names everywhere, so tabs, caption and pause share one row and stay clear of the headline */
  .app-pills .pill-long { display: none; }
  .pill-status { margin-left: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--snow-3); }
  .scene-pill[aria-selected="true"] .pill-status { color: var(--ink-3); }
  .hero-3d.has-switched #hero-3d { transition-duration: .3s; }
  .hero-3d .hero-overlay { transition: opacity .3s var(--ease); }
  .hero-3d.is-switching #hero-3d, .hero-3d.is-switching .hero-overlay { opacity: 0; }
  @media (prefers-reduced-motion: reduce) { .hero-3d .hero-overlay, .hero-3d.has-switched #hero-3d { transition: none; } }
  @media (max-width: 599px) {
    .hero-3d .hero-pause { padding: 0 11px; }
    .hero-3d .hero-pause-label { display: none; }      /* the tabs need the room; the button keeps its accessible name */
  }
  /* below 1024 px the tabs use their short names, so tabs, caption and pause button share one row */
  @media (max-width: 1023px) {
    .app-pills .pill-long { display: none; }
    .app-pills .pill-short { display: inline; }
  }
}
@layer sections {
  /* phones: tighter tabs, so the four tabs and the pause button keep one row */
  @media (max-width: 599px) {
    .app-pills { gap: 4px; }
    .app-pills .scene-pill { padding: 0 9px; font-size: 12px; }
    .app-pills .pill-status { margin-left: 4px; }
    .hero-3d .media-ui .wrap { gap: 6px; }
    .hero-3d .hero-pause { padding: 0 10px; }
  }
  /* below 1024 px: one row; if the tabs do not fit they scroll sideways, with a fade when there is more */
  @media (max-width: 1023px) {
    .hero-3d .media-ui .wrap { flex-wrap: nowrap; align-items: center; }
    .app-pills { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
    .app-pills::-webkit-scrollbar { display: none; }
    .app-pills .scene-pill { flex: none; }
    .app-pills.has-more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
    .hero-3d .media-meta { flex: none; }
  }
}
@layer sections {
  /* 1024-1279 px: the four tabs take their own row above the caption, so the headline sits a little higher */
  @media (min-width: 1024px) and (max-width: 1279px) { .hero-copy { padding-bottom: 112px; } }
}
@layer sections {
  /* the narrowest phones: drawing labels scaled up so they render at 11 px or more */
  @media (max-width: 359px) {
    .xdcr-drawing text { font-size: 21.5px; }
    .mems-drawing { overflow: visible; }
    .mems-drawing text { font-size: 20.2px; letter-spacing: 0; }   /* the right-hand labels sit close to the edge */
    .step-art text { font-size: 14.5px; }
    .echo-art text { font-size: 15.5px; }
    .tof-drawing text { font-size: 22px; }
    /* tighter page headline so title, lede and button fit on a 320 × 640 screen */
    .headline { padding-top: 16px; }
    .headline .crumbs { margin-bottom: 12px; }
  }
  /* shorter phones: a little less space above page titles keeps the first button above the fold */
  @media (max-width: 599px) and (max-height: 760px) {
    .headline:not(.hero-copy) { padding-top: 18px; }
  }
}

/* ===== compact page hero (every subpage): title, intro and actions left; a framed visual right ===== */
@layer sections {
  .subpage-hero { padding: calc(var(--header-top) + var(--header-h) + 40px) 0 56px; background: var(--surface); color: var(--text); }
  .subpage-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 28px; align-items: center; }
  .subpage-copy { grid-column: 1 / span 7; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; min-width: 0; }
  .subpage-copy .crumbs { margin: 0 0 2px; }
  .subpage-copy h1 { font-size: clamp(34px, 3.9vw, 54px); max-width: 18ch; }
  .subpage-copy .lede { color: var(--text-2); max-width: 46ch; }
  .subpage-copy .actions { margin-top: 4px; }
  .subpage-visual { grid-column: 8 / -1; margin: 0; display: grid; gap: 10px; min-width: 0; }
  .subpage-frame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--char-3); }
  .subpage-frame > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
  .subpage-frame .fig { width: min(100cqw, 180cqh); }                      /* the whole illustration, labels on it */
  .subpage-frame .fig-label { display: none; }   /* too small for labels here; the alt text and the diagrams further down carry them */
  .subpage-visual .media-meta { justify-content: space-between; margin-left: 0; }
  .subpage-visual .media-caption { color: var(--text-2); }
  .subpage-hero.no-visual { padding-bottom: 44px; }
  .subpage-hero.no-visual .subpage-copy { grid-column: 1 / span 9; }
  @media (max-width: 1023px) {
    .subpage-copy, .subpage-visual, .subpage-hero.no-visual .subpage-copy { grid-column: 1 / -1; }
    .subpage-frame { aspect-ratio: auto; height: clamp(220px, 34vw, 260px); }
  }
  @media (max-width: 767px) { .subpage-visual .media-caption { display: block; } }
  @media (max-width: 599px) {
    .subpage-hero { padding: calc(var(--header-top) + var(--header-h) + 24px) 0 40px; }
    .subpage-copy { gap: 14px; }
  }
}

/* ===== UX round: roadmap row, two active cards, featured article, point list, benchmark note ===== */
@layer sections {
  .cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards.cols-2 .card-media { aspect-ratio: 16 / 9; }
  .index-tiles.tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roadmap-row { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 12px;
    margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); align-items: start; }
  .roadmap-row > .label { grid-column: 1 / span 3; padding-top: 4px; color: var(--text-2); }
  .roadmap-row > ul { grid-column: 4 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 8px; }
  .roadmap-row a { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; padding: 4px 0;
    color: var(--text); text-decoration: none; }
  .roadmap-row a b { font-weight: 500; }
  .roadmap-row a span { grid-column: 1; font-size: 15px; color: var(--text-2); }
  .roadmap-row a svg { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform var(--dur) var(--ease); }
  .roadmap-row a:hover b { text-decoration: underline; text-underline-offset: 4px; }
  .roadmap-row a:hover svg { transform: translateX(3px); }
  .insight-feature { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 24px; align-items: start; }
  .insight-feature > .card-lead { grid-column: 1 / span 8; }
  .insight-feature > .upcoming { grid-column: 9 / -1; }
  .card-lead .card-media { aspect-ratio: 16 / 9; }
  .upcoming > .label { color: var(--text-2); margin-bottom: 8px; }
  .upcoming ul { border-bottom: 1px solid var(--line); }
  .upcoming li { display: grid; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); }
  .upcoming li p:not(.label) { font-size: 15px; color: var(--text); }
  .point-list { display: grid; border-top: 1px solid var(--line); }
  .point-list li { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
  .point-list b { font-weight: 500; color: var(--text); }
  .bench-note { margin-top: 24px; max-width: 72ch; }
  /* grey light bands: cards, tiles, cells and steps turn white so they still read as surfaces */
  .band-alt[data-theme="light"] { background: var(--mist); --surface-alt: var(--white); --card-hover: #FAFAFA; }
  .topic-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--col-gap); border-bottom: 1px solid var(--line); }
  .topic-list li { display: grid; gap: 6px; align-content: start; padding: 16px 0; border-top: 1px solid var(--line); }
  .topic-list li p:not(.label) { color: var(--text); }
  .topic-list .label, .upcoming li .label { color: var(--text-2); }
  .glance { margin-top: 40px; padding: 24px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); }
  .glance > .label { color: var(--text-2); }
  .glance-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px var(--col-gap); margin: 16px 0 0; }
  .glance-grid dt { font-weight: 500; }
  .glance-grid dd { margin: 6px 0 0; font-size: 15px; color: var(--text-2); }
  .glance + .sys, .split-row + .glance { margin-top: 40px; }
  @media (max-width: 1023px) {
    .roadmap-row > .label, .roadmap-row > ul, .insight-feature > .card-lead, .insight-feature > .upcoming { grid-column: 1 / -1; }
    .glance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 599px) {
    .cards.cols-2, .index-tiles.tiles-2, .roadmap-row > ul, .topic-list, .glance-grid { grid-template-columns: minmax(0, 1fr); }
  }
}

/* ===== Technology, "Our method": the time-of-flight explainer (js/tof-explainer.js) as a standalone dark panel ===== */
@layer sections {
  .tof-explainer-panel { margin: 0; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); }
  .tof-explainer-stage { position: relative; height: clamp(480px, 56vw, 600px); }
  .tof-explainer-stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
  .tof-explainer-panel figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 0 22px 18px; }
  .tof-explainer-panel + .fine-print { margin-top: 16px; }
  @media (max-width: 767px) { .tof-explainer-panel .media-caption { display: block; } }
  @media (max-width: 599px) { .tof-explainer-panel figcaption { padding: 0 14px 14px; } .tof-explainer-panel .media-caption { font-size: 11px; } }
}

/* ===== stone surfaces: grey #666 and dark green fall under 4.5:1 on stone, so they use darker values there ===== */
@layer sections {
  [data-theme="light"] :is(.media-panel, .stone-panel, .card-media):not([data-theme="dark"]) { --text-3: var(--ink-2); --accent-text: #2B4A00; }
}

/* ===== products page ===== */
@layer sections {
  .product-for { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--text-2); }
  .product-for .coming { flex: none; }
  .split-right > .list-label { margin-bottom: 8px; color: var(--text-2); }
  h2 .nw { white-space: nowrap; }   /* keep "time-of-flight" and "self-check" whole */
  .product-art { margin: 0; }
  .product-art img { display: block; width: 100%; height: auto; }
}

/* ===== v18: investor clarity, mobile simulation caption, readiness ladder, moat & stage ===== */
@layer sections {
  /* keep "Simulated · illustrative signals" readable on phones without squeezing the tab strip */
  @media (max-width: 767px) {
    .hero-3d .media-ui .wrap { flex-wrap: wrap; row-gap: 6px; }
    .hero-3d .app-pills { flex: 1 0 100%; }
    .hero-3d .media-meta { width: 100%; justify-content: space-between; margin-left: 0; }
  }
  .scene-pill.is-roadmap { background: rgba(45, 45, 45, .68); border: 1px dashed rgba(255, 255, 255, .24); }
  .scene-pill.is-roadmap[aria-selected="true"] { background: var(--snow); border-style: solid; border-color: transparent; }

  /* compact 4-column executive snapshot strip immediately below the landing hero */
  .snapshot-strip { padding-block: 22px; background: var(--mist); border-bottom: 1px solid var(--line); }
  .snapshot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px var(--col-gap); margin: 0; }
  .snapshot-grid > div { min-width: 0; }
  .snapshot-grid dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
  .snapshot-grid dd { margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--text); }
  .snapshot-grid dd b { font-weight: 500; }
  @media (max-width: 1023px) { .snapshot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (max-width: 599px) { .snapshot-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; } }

  /* executive summary callout box (technology, markets, products) */
  .exec-box { padding: 20px 24px; border: 1px solid var(--line-strong); border-left: 3px solid var(--accent-line);
    border-radius: var(--radius-lg); background: var(--surface); display: grid; gap: 8px; }
  .exec-box .label { color: var(--accent-text); }
  .exec-box p { max-width: 72ch; color: var(--text-2); }
  .exec-box p b { color: var(--text); font-weight: 500; }
  .sec-head + .exec-box, .exec-box + .grid, .exec-box + .bracket { margin-top: 28px; }

  /* commercial readiness ladder & milestone-gated validation roadmap */
  .readiness-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
  .readiness-step { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: grid; gap: 8px; align-content: start; }
  .readiness-step.is-current { border-color: var(--accent-line); }
  .readiness-stage { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
  .readiness-step.is-current .readiness-stage { color: var(--accent-text); }
  .readiness-step h3 { font-size: 18px; line-height: 1.25; }
  .readiness-step p { font-size: 14px; color: var(--text-2); }
  .readiness-tag { justify-self: start; display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--radius-pill);
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
    background: var(--surface-alt); color: var(--text-2); border: 1px solid var(--line); }
  .readiness-step.is-current .readiness-tag { background: var(--signal); color: var(--ink); border-color: transparent; }
  @media (max-width: 1023px) { .readiness-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 599px) { .readiness-grid { grid-template-columns: minmax(0, 1fr); } }

  /* role badge on industry cards (Direct buyer vs Demand driver) */
  .role-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--radius-pill);
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
    border: 1px solid var(--line-strong); color: var(--text-2); background: var(--surface-alt); }
  .role-badge.is-buyer { border-color: var(--accent-line); color: var(--accent-text); }
  .card-meta .role-badge { margin-left: auto; }

  /* subtle scoping note & secondary action link inside dark tof-kymata card */
  .tof-kymata .tof-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
  .scoping-note { margin-top: 18px; padding: 14px 18px; border-left: 2px solid var(--line-strong); background: var(--surface-alt);
    font-size: 14px; color: var(--text-2); max-width: 78ch; }
  .scoping-note b { color: var(--text); font-weight: 500; }

  /* early-stage company notice on About & Contact */
  .stage-box { padding: 24px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); display: grid; gap: 12px; max-width: 72ch; }
  .stage-box .label { color: var(--accent-text); }
  .stage-box p { color: var(--text-2); }
}

/* ===== phones: long section tags wrap instead of running off the screen ===== */
@layer sections {
  @media (max-width: 599px) { .tag { white-space: normal; max-width: 100%; } }
}

/* ===== standalone 3D panels (js/hero3d/panel3d.js): Products, the Sig.IO evaluation kit ===== */
@layer sections {
  .p3d { margin: 40px 0 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius-lg); background: var(--char-3); }
  .p3d-stage { position: relative; height: clamp(400px, 46vw, 580px);
    background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 48px 48px; background-position: center; }
  .p3d-stage > canvas, .p3d-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; }
  .p3d-stage > img { object-fit: cover; transition: opacity .6s var(--ease), visibility 0s .6s; }
  .p3d canvas[data-3d-scene] { opacity: 0; transition: opacity .6s var(--ease); }
  .p3d.is-ready canvas[data-3d-scene] { opacity: 1; }
  .p3d.is-ready .p3d-poster { opacity: 0; visibility: hidden; }
  .p3d figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 12px 18px 14px; border-top: 1px solid rgba(255, 255, 255, .1); }
  @media (max-width: 767px) { .p3d figcaption .media-caption { display: block; } }
  @media (max-width: 599px) { .p3d { margin-top: 28px; } .p3d-stage { height: 400px; } .p3d figcaption { padding: 10px 12px 12px; } }
  @media (prefers-reduced-motion: reduce) { .p3d-stage > img, .p3d canvas[data-3d-scene] { transition: none; } }
}

/* ===== feature headers: text left, a large 3D panel right, as on the landing page (Technology: tofstory.js; Industrial Flow Metering: multipath.js) ===== */
@layer sections {
  .feature-hero .subpage-copy { grid-column: 1 / span 5; }
  .feature-hero .feature-visual { grid-column: 6 / -1; margin: 0; }
  .feature-hero .p3d-stage { height: clamp(520px, 41vw, 600px); }
  .feature-hero .p3d-poster { object-fit: contain; }
  @media (max-width: 1023px) {
    .feature-hero .subpage-copy, .feature-hero .feature-visual { grid-column: 1 / -1; }
    .feature-hero .p3d-stage { height: clamp(500px, 66vw, 580px); }
  }
  @media (max-width: 599px) { .feature-hero .feature-visual { margin: 0; } .feature-hero .p3d-stage { height: 540px; } }
  /* a panel with several scenes: the tabs on their own row under the drawing, then the caption and the pause button */
  .p3d figcaption.has-tabs { flex-wrap: wrap; row-gap: 10px; }
  .p3d .panel-pills { flex: 1 0 100%; }
  .p3d:not(.is-ready) .panel-pills { visibility: hidden; }   /* the tabs work once the drawing runs */
  .p3d.is-fallback .panel-pills { display: none; }
  @media (max-width: 359px) { .p3d .panel-pills { gap: 4px; } .p3d .panel-pills .scene-pill { padding: 0 9px; } }
}

/* ===== Industrial Flow Metering: the multipath section ===== */
@layer sections {
  .index-tiles.tiles-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  @media (max-width: 1023px) { .index-tiles.tiles-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 599px) { .index-tiles.tiles-5 { grid-template-columns: minmax(0, 1fr); } }
  .sec-head > .sec-body { grid-column: 1; max-width: 66ch; color: var(--text-2); }
}
