/* ============================================================
   IA SYSTEMS — design system
   Palette: #F4F4F6 / #E7E7E7 / #D2D2D4 / accent #FF634A / ink #101014
   ============================================================ */

:root {
  --bg: #F4F4F6;
  --surface: #E7E7E7;
  --line: #D2D2D4;
  --line-soft: #E0E0E3;
  --ink: #101014;
  --ink-soft: #6B6B72;
  --accent: #FF634A;
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --pad: clamp(20px, 4.5vw, 76px);
  --nav-h: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; }
svg { display: block; }
em { font-style: italic; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.shell { padding-inline: var(--pad); }

.sq {
  display: inline-block;
  width: 0.42em; height: 0.42em;
  background: var(--accent);
  flex: none;
}

.skip-link {
  position: fixed; top: -100px; left: 16px;
  background: var(--ink); color: var(--bg);
  padding: 10px 18px; z-index: 300;
  font-family: var(--font-mono); font-size: 0.75rem;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ============ SECTION PRIMITIVES ============ */

.section-tag {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink-soft);
  margin-bottom: clamp(1.6rem, 3vw, 2.8rem);
}
.section-tag .sq { width: 8px; height: 8px; }

.section-head { margin-bottom: clamp(3rem, 6vw, 5.5rem); }

.section-title {
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  font-weight: 630;
  font-stretch: 112%;
  line-height: 1.0;
  letter-spacing: -0.025em;
  text-wrap: balance;
  max-width: 14ch;
}
.st-line { display: inline-block; }

/* ============ LOADER ============ */

.loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.loader-inner { width: min(420px, 78vw); }
.loader-mark {
  font-weight: 680; font-stretch: 118%;
  font-size: 1.4rem; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 2.2rem;
}
.loader-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 0.7rem; color: var(--ink-soft);
}
.loader-count { color: var(--ink); font-size: 0.8rem; }
.loader-bar {
  height: 2px; background: var(--line);
  overflow: hidden;
}
.loader-bar span {
  display: block; height: 100%; width: 100%;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
}

/* ============ CURSOR ============ */

.cursor {
  position: fixed; top: 0; left: 0; z-index: 250;
  pointer-events: none;
  opacity: 0;
}
.cursor-core {
  position: absolute; top: -18px; left: -18px;
  width: 36px; height: 36px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  transition: transform 0.25s var(--ease-out), background 0.25s, border-color 0.25s;
}
.cursor-core::before, .cursor-core::after {
  content: ""; position: absolute; background: var(--accent);
  top: 50%; left: 50%;
}
.cursor-core::before { width: 9px; height: 1px; transform: translate(-50%, -50%); }
.cursor-core::after { width: 1px; height: 9px; transform: translate(-50%, -50%); }
.cursor-label {
  position: absolute; top: 14px; left: 22px;
  color: var(--ink); font-size: 0.6rem;
  background: var(--bg);
  padding: 3px 7px;
  border: 1px solid var(--line);
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}
.cursor.is-active .cursor-core {
  transform: scale(1.5);
  background: rgba(255, 99, 74, 0.08);
  border-color: var(--accent);
}
.cursor.is-active .cursor-label { opacity: 1; transform: translateY(0); }
@media (pointer: coarse) { .cursor { display: none; } }

/* ============ NAV ============ */

.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 120;
  transition: transform 0.5s var(--ease-out), background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.site-nav.is-hidden { transform: translateY(-100%); }
.nav-inner {
  height: var(--nav-h);
  padding-inline: var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
}
.logo {
  font-weight: 680; font-stretch: 118%;
  font-size: 1.05rem; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 5px;
  z-index: 130; position: relative;
}
.nav-links {
  display: flex; gap: clamp(1.4rem, 2.5vw, 2.6rem);
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-links a {
  font-size: 0.82rem; font-weight: 500;
  position: relative; padding-block: 6px;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right center;
  transition: transform 0.35s var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left center; }
.nav-right { display: flex; align-items: center; gap: 1.6rem; }
.nav-clock { color: var(--ink-soft); font-size: 0.62rem; }
.nav-cta {
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 9px 16px;
  position: relative; overflow: hidden;
  transition: color 0.3s;
}
.nav-cta::before {
  content: ""; position: absolute; inset: 0;
  background: var(--ink);
  transform: scaleY(0); transform-origin: bottom center;
  transition: transform 0.3s var(--ease-out);
  z-index: -1;
}
.nav-cta:hover { color: var(--bg); }
.nav-cta:hover::before { transform: scaleY(1); }
.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  position: relative; z-index: 130;
  flex-direction: column; align-items: center; justify-content: center; gap: 7px;
}
.menu-toggle span {
  display: block; width: 22px; height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out);
}
.menu-open .menu-toggle span:first-child { transform: translateY(4.25px) rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
.menu-open .menu-toggle { color: var(--bg); }
.menu-open .logo { color: var(--bg); }

/* ============ MENU OVERLAY ============ */

body.menu-open .site-nav {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
  transform: none !important;
}
body.menu-open .nav-cta, body.menu-open .nav-clock { opacity: 0; pointer-events: none; }

body.brief-open { overflow: hidden; }

.menu-overlay {
  position: fixed; inset: 0; z-index: 110;
  background: var(--ink);
  color: var(--bg);
  display: flex; flex-direction: column; justify-content: center;
  padding-inline: var(--pad);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}
.menu-grid {
  position: absolute; inset: 0; opacity: 0.35;
  background-image:
    linear-gradient(to right, rgba(244,244,246,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244,244,246,0.06) 1px, transparent 1px);
  background-size: 80px 80px;
}
.menu-links { display: flex; flex-direction: column; position: relative; }
.menu-links a {
  font-size: clamp(2.2rem, 7.5vh, 4.2rem);
  font-weight: 620; font-stretch: 112%;
  letter-spacing: -0.02em; line-height: 1.22;
  display: flex; align-items: baseline; gap: 1.2rem;
  border-bottom: 1px solid rgba(244,244,246,0.12);
  padding-block: 0.35em;
  transition: color 0.3s, padding-left 0.4s var(--ease-out);
}
.menu-links a:hover { color: var(--accent); padding-left: 0.4em; }
.menu-num { font-size: 0.75rem; color: var(--accent); }
.menu-foot {
  position: absolute; bottom: 28px; left: var(--pad); right: var(--pad);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: rgba(244,244,246,0.45);
}
.menu-foot a { color: rgba(244,244,246,0.75); transition: color 0.25s; }
.menu-foot a:hover { color: var(--accent); }

/* ============ HERO ============ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.hero-field {
  position: absolute; inset: 0; z-index: 1;
}
.hero-field canvas { width: 100%; height: 100%; display: block; }
.hero-field::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, var(--bg) 4%, rgba(244,244,246,0) 46%),
    linear-gradient(105deg, rgba(244,244,246,0.75) 0%, rgba(244,244,246,0) 55%);
  pointer-events: none;
}
.hero-field.no-webgl {
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(to top, black 0%, transparent 70%);
  mask-image: linear-gradient(to top, black 0%, transparent 70%);
}

.hero-hud { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hero-hud .hud {
  position: absolute; color: var(--ink-soft); font-size: 0.6rem;
}
.hud.tl { top: calc(var(--nav-h) + 18px); left: var(--pad); }
.hud.tr { top: calc(var(--nav-h) + 18px); right: var(--pad); }
.hud.bl { bottom: 76px; left: var(--pad); }
.hud.br { bottom: 76px; right: var(--pad); }

.hero-content {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: calc(var(--nav-h) + 4vh);
  padding-bottom: 12vh;
  pointer-events: none;
}
.hero-content a, .hero-content .btn { pointer-events: auto; }

.hero-eyebrow {
  color: var(--ink-soft);
  margin-bottom: clamp(1.2rem, 2.6vh, 2rem);
  display: flex; align-items: center; gap: 12px;
}
.hero-eyebrow::before {
  content: ""; width: 34px; height: 1px; background: var(--accent);
  display: inline-block;
}

.hero-title {
  font-size: clamp(3rem, 7.5vw, 9.4rem);
  font-weight: 660; font-stretch: 116%;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: clamp(2.4rem, 5.5vh, 4.2rem);
}
.h-line { display: block; overflow: hidden; padding-block: 0.02em; }
.h-inner { display: inline-block; will-change: transform; }
.h-inner.outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
}
@supports not (-webkit-text-stroke: 2px black) {
  .h-inner.outline { color: var(--ink); }
}
.hero-title .dot { color: var(--accent); font-style: normal; -webkit-text-stroke: 0; }

.hero-foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 3rem; flex-wrap: wrap;
}
.hero-sub {
  max-width: 44ch;
  font-size: clamp(0.95rem, 1.25vw, 1.12rem);
  color: var(--ink-soft);
  line-height: 1.65;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* buttons */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 18px 34px;
  font-weight: 560; font-size: 0.95rem;
  letter-spacing: 0.01em;
  overflow: hidden;
  transition: color 0.35s;
  will-change: transform;
}
.btn .btn-txt { position: relative; z-index: 2; display: inline-block; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  transform: scaleY(0); transform-origin: bottom center;
  transition: transform 0.4s var(--ease-out);
}
.btn:hover::before { transform: scaleY(1); }
.btn-solid { background: var(--accent); color: var(--ink); }
.btn-solid::before { background: var(--ink); }
.btn-solid:hover { color: var(--bg); }
.btn-ghost { border: 1px solid var(--ink); color: var(--ink); }
.btn-ghost::before { background: var(--ink); }
.btn-ghost:hover { color: var(--bg); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink::before { background: var(--bg); }
.btn-ink:hover { color: var(--ink); }

.hero-ticker {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 65%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  overflow: hidden;
  padding-block: 14px;
}
.ticker-track {
  display: flex; white-space: nowrap;
  color: var(--ink-soft); font-size: 0.66rem;
  will-change: transform;
}
.ticker-track span { flex: none; }

/* ============ MANIFESTO ============ */

.manifesto {
  padding-block: clamp(7rem, 15vw, 14rem);
  border-top: 1px solid var(--line);
}
.manifesto-text {
  font-size: clamp(1.7rem, 4.1vw, 3.5rem);
  font-weight: 540; font-stretch: 106%;
  line-height: 1.22;
  letter-spacing: -0.02em;
  max-width: 26ch;
}
.manifesto-text .word { display: inline-block; }
.manifesto-text em { color: var(--accent); font-style: italic; }

/* ============ WHAT WE BUILD ============ */

.build {
  border-top: 1px solid var(--line);
  padding-block: clamp(5.5rem, 10vw, 9rem);
}
.build-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(2.5rem, 5vw, 6rem);
  align-items: start;
}
.build-index { border-top: 1px solid var(--line); }
.build-row a {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 0.9fr) minmax(0, 1.1fr) 2.5rem;
  align-items: center; gap: 1.4rem;
  padding-block: clamp(1.3rem, 2.4vw, 1.9rem);
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding-left 0.45s var(--ease-out);
}
.build-row a::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: -1px;
  width: 0; background: var(--surface); z-index: -1;
  transition: width 0.5s var(--ease-out);
}
.build-row.is-active a::before, .build-row a:hover::before { width: 100%; }
.build-row.is-active a { padding-left: 1.2rem; }
.b-num { color: var(--ink-soft); }
.build-row.is-active .b-num { color: var(--accent); }
.b-name {
  font-size: clamp(1.25rem, 2.1vw, 1.85rem);
  font-weight: 600; font-stretch: 108%;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.b-desc {
  font-size: 0.86rem; color: var(--ink-soft); line-height: 1.55;
  opacity: 0.85;
}
.b-arrow {
  font-size: 1.2rem;
  opacity: 0; transform: translateX(-8px);
  transition: opacity 0.3s, transform 0.4s var(--ease-out);
  color: var(--accent);
}
.build-row.is-active .b-arrow { opacity: 1; transform: translateX(0); }

.build-figure { position: sticky; top: calc(var(--nav-h) + 4vh); }
.figure-frame {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--bg);
}
.figure-label {
  position: absolute; top: 14px; left: 16px;
  color: var(--ink-soft); font-size: 0.6rem;
  z-index: 2;
}
.fig {
  position: absolute; inset: 8%;
  width: 84%; height: 84%;
  color: var(--ink);
  opacity: 0; transform: scale(0.96);
  transition: opacity 0.45s, transform 0.55s var(--ease-out);
}
.fig.is-active { opacity: 1; transform: scale(1); }
.fig .acc, .m-fig .acc, #blueprint .acc { stroke: var(--accent); fill: none; }
.fig rect.acc[stroke-width], .fig .acc { fill: none; }
.figure-corner {
  position: absolute; width: 14px; height: 14px;
  border-color: var(--ink); border-style: solid; border-width: 0;
}
.figure-corner.c1 { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.figure-corner.c2 { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.figure-corner.c3 { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.figure-corner.c4 { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

/* ============ SERVICES (horizontal) ============ */

.services { background: var(--surface); }
.services-pin {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  padding-block: clamp(3rem, 6vh, 5rem);
  position: relative;
}
.services-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
  margin-bottom: clamp(2.5rem, 5vh, 4.5rem);
}
.services-head .section-head { margin-bottom: 0; }
.services-head .section-tag { margin-bottom: 1.4rem; }
.services-hint { color: var(--ink-soft); padding-bottom: 0.5rem; }
.services-track {
  display: flex; gap: clamp(1.2rem, 2vw, 2rem);
  padding-inline: var(--pad);
  position: relative;
  width: max-content;
  will-change: transform;
  align-items: stretch;
}
.services-ghost {
  position: absolute; top: 50%; left: var(--pad);
  transform: translateY(-50%);
  font-size: clamp(10rem, 26vw, 24rem);
  font-weight: 700; font-stretch: 120%;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
}
.module {
  position: relative; z-index: 1;
  width: clamp(280px, 26vw, 390px);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: clamp(1.4rem, 2vw, 2rem);
  display: flex; flex-direction: column;
  min-height: clamp(420px, 56vh, 520px);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s;
}
.module:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px -24px rgba(16, 16, 20, 0.18);
}
.module::after {
  content: ""; position: absolute; top: -1px; left: -1px; right: -1px;
  height: 3px; background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.5s var(--ease-out);
}
.module:hover::after { transform: scaleX(1); }
.module header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: clamp(1.6rem, 3vh, 2.4rem);
}
.m-tag { color: var(--ink-soft); }
.m-line { flex: 1; height: 1px; background: var(--line); }
.m-fig {
  width: clamp(84px, 8vw, 110px); height: auto;
  color: var(--ink);
  margin-bottom: auto;
}
.module h3 {
  font-size: clamp(1.35rem, 1.9vw, 1.7rem);
  font-weight: 620; font-stretch: 110%;
  letter-spacing: -0.02em;
  margin-top: 2rem; margin-bottom: 0.8rem;
}
.module p { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.6; margin-bottom: 1.4rem; }
.m-list { display: flex; flex-wrap: wrap; gap: 6px; }
.m-list li {
  border: 1px solid var(--line);
  padding: 5px 10px;
  color: var(--ink-soft);
  font-size: 0.6rem;
}
.services-end {
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  color: var(--ink-soft);
  padding-inline: 2rem;
  font-size: 0.66rem;
}
.services-end .sq { width: 10px; height: 10px; }

/* ============ PROCESS (dark) ============ */

.process { background: var(--ink); color: var(--bg); }
.process .section-tag { color: rgba(244,244,246,0.5); }
.process-pin {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-block: clamp(3.5rem, 7vh, 6rem);
}
.process-grid { width: 100%; }
.process-head { margin-bottom: clamp(2.5rem, 5vh, 4rem); }
.process-head .section-title { color: var(--bg); }

.process-rail { margin-bottom: clamp(2rem, 4vh, 3rem); position: relative; }
.rail-line { height: 1px; background: rgba(244,244,246,0.15); position: relative; }
.rail-line span {
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
}
.rail-marks {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between;
}
.rail-mark {
  width: 9px; height: 9px;
  border: 1px solid rgba(244,244,246,0.4);
  background: var(--ink);
  transform: translateY(-50%) rotate(45deg);
  transition: background 0.3s, border-color 0.3s;
}
.rail-mark.is-on { background: var(--accent); border-color: var(--accent); }

.process-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  min-height: 46vh;
}
.stage-num {
  font-size: clamp(7rem, 17vw, 15rem);
  font-weight: 700; font-stretch: 118%;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(244,244,246,0.35);
  display: block;
}
.stage-body { position: relative; min-height: 15rem; }
.stage-item {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
}
.stage-item.is-on { opacity: 1; visibility: visible; }
.stage-item h3 {
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  font-weight: 630; font-stretch: 112%;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.stage-item p {
  color: rgba(244,244,246,0.62);
  max-width: 42ch;
  margin-bottom: 1.5rem;
  line-height: 1.65;
}
.stage-list { display: flex; flex-wrap: wrap; gap: 8px; }
.stage-list li {
  border: 1px solid rgba(244,244,246,0.2);
  color: rgba(244,244,246,0.6);
  padding: 6px 11px; font-size: 0.6rem;
}
.stage-diagram svg {
  width: 100%; max-width: 400px; height: auto;
  color: rgba(244,244,246,0.5);
  margin-left: auto;
}
.bp { opacity: 0.12; transition: opacity 0.5s; }
.bp.is-on { opacity: 1; }

/* ============ ENGINEERING ============ */

.engineering {
  padding-block: clamp(6rem, 11vw, 10rem);
}
.eng-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(3rem, 6vw, 7rem);
  align-items: center;
}
.eng-stack-wrap { position: relative; }
.eng-stack {
  position: relative;
  height: clamp(360px, 46vw, 560px);
  perspective: 1200px;
}
.layer {
  position: absolute; top: 50%; left: 50%;
  width: 0; height: 0;
  will-change: transform;
}
.layer-face {
  position: absolute; top: 0; left: 0;
  width: clamp(200px, 22vw, 300px);
  height: clamp(200px, 22vw, 300px);
  transform: translate(-50%, -50%) rotateX(58deg) rotateZ(45deg);
  border: 1.5px solid var(--ink);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.layer-face.acc-face { border-color: var(--accent); background: rgba(255, 99, 74, 0.07); }
.layer-tag {
  position: absolute; left: clamp(120px, 13vw, 180px); top: -0.5em;
  white-space: nowrap;
  color: var(--ink-soft); font-size: 0.62rem;
  padding-left: 44px;
}
.layer-tag::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 36px; height: 1px; background: var(--line);
}
.eng-lead {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 520;
  line-height: 1.45;
  letter-spacing: -0.015em;
  margin-bottom: 2.5rem;
  max-width: 34ch;
}
.eng-lead em { color: var(--accent); }
.eng-layers { border-top: 1px solid var(--line); margin-bottom: 2.8rem; }
.eng-layer-row {
  display: grid; grid-template-columns: minmax(9rem, 0.65fr) 1fr;
  gap: 1rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.eng-layer-row dt { color: var(--ink-soft); font-size: 0.62rem; }
.eng-layer-row dd { font-size: 0.9rem; color: var(--ink); }
.eng-specs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.spec { display: flex; flex-direction: column; gap: 6px; }
.spec-val {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  color: var(--ink); letter-spacing: 0;
}
.spec-key { color: var(--ink-soft); font-size: 0.6rem; }

/* ============ PRODUCTS ============ */

.products {
  padding-block: clamp(6rem, 12vw, 11rem) 0;
}
.products-head { margin-bottom: clamp(2.4rem, 5vw, 4rem); }
.products-lead {
  max-width: 56ch;
  margin-top: 1.6rem;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  color: var(--ink-soft);
  line-height: 1.62;
}

.prod-list { border-top: 1px solid var(--line); }

.product {
  border-bottom: 1px solid var(--line);
  padding-block: clamp(3rem, 6.5vw, 6rem);
  position: relative;
}
.product::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--surface);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.55s var(--ease-out);
  pointer-events: none;
}
.product:hover::before { transform: scaleY(1); }
.product > .shell { position: relative; }

.prod-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.2rem, 5vw, 5rem);
  align-items: start;
}
.product.flip .prod-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.product.flip .prod-body { order: 2; }
.product.flip .prod-view { order: 1; }

.prod-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  margin-bottom: 1.4rem;
}
.prod-index { color: var(--ink-soft); }
.prod-index::before { content: "PRODUCT/"; color: var(--accent); }
.prod-cat {
  color: var(--ink-soft);
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.prod-name {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.035em;
  line-height: 0.92;
}
.prod-expand {
  color: var(--ink-soft);
  margin-top: 0.85rem;
}

.prod-status {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 1.5rem;
  padding: 7px 13px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
.prod-status .status-dot { flex: none; }

.prod-desc {
  margin-top: 1.5rem;
  max-width: 54ch;
  color: var(--ink-soft);
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  line-height: 1.68;
}
.prod-desc strong { color: var(--ink); font-weight: 700; }

.prod-stats {
  display: flex; flex-wrap: wrap; gap: clamp(1.6rem, 3.5vw, 3rem);
  margin-top: 2.2rem;
  padding-top: 1.7rem;
  border-top: 1px solid var(--line);
}
.prod-stats li { display: flex; flex-direction: column; gap: 5px; }
.ps-val {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: none;
}
.ps-key { color: var(--ink-soft); }

.prod-stack {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-top: 1.9rem;
}
.prod-stack li {
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.prod-cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 2.1rem;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  transition: color 0.3s, border-color 0.3s;
}
.prod-cta .arr { transition: transform 0.35s var(--ease-out); display: inline-block; }
.prod-cta:hover { color: var(--accent); border-color: var(--accent); }
.prod-cta:hover .arr { transform: translate(3px, -3px); }

/* ---------- live browser frame ---------- */

.frame {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 24px 60px -30px rgba(16, 16, 20, 0.35);
}
.frame-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.frame-dots { display: flex; gap: 6px; flex: none; }
.frame-dots i {
  width: 8px; height: 8px; border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: var(--bg);
}
.frame-url {
  flex: 1 1 auto; min-width: 0;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  color: var(--ink-soft);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.frame-toggle {
  flex: none;
  padding: 5px 10px;
  border: 1px solid var(--line-soft);
  color: var(--ink-soft);
  font-size: 0.6rem;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.frame-toggle:hover { color: var(--ink); border-color: var(--ink); }
.frame-toggle[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

.frame-view {
  position: relative;
  aspect-ratio: 1440 / 900;
  overflow: hidden;
  background: var(--bg);
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 32px 32px;
}
.frame-scaler {
  position: absolute; top: 0; left: 0;
  width: 1440px; height: 900px;
  transform-origin: 0 0;
  transform: scale(var(--frame-scale, 1));
}
.frame-scaler iframe {
  width: 1440px; height: 900px;
  border: 0; display: block;
  background: #fff;
  /* Non-interactive by default so page scroll is never trapped. */
  pointer-events: none;
}
.frame.is-live .frame-scaler iframe { pointer-events: auto; }

.frame-live {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px;
  background: var(--ink); color: var(--bg);
  font-size: 0.6rem;
  pointer-events: none;
}
.frame-live .status-dot { width: 6px; height: 6px; }

.frame-cap {
  margin-top: 0.95rem;
  color: var(--ink-soft);
  font-size: 0.6rem;
}

/* ---------- accmerio, extended ---------- */

.acc-ext {
  border-bottom: 1px solid var(--line);
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
}
.acc-ext-head { margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.acc-ext-head .section-tag { margin-bottom: 1.2rem; }
.acc-ext-title {
  font-size: clamp(1.7rem, 3.4vw, 3rem);
  font-weight: 650;
  font-stretch: 108%;
  letter-spacing: -0.025em;
  line-height: 1.05;
  max-width: 24ch;
  text-wrap: balance;
}
.acc-ext-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.acc-col {
  min-width: 0;
  padding: clamp(1.5rem, 3vw, 2.6rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.acc-col-tag { color: var(--accent); margin-bottom: 0.9rem; }
.acc-col-name {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  font-stretch: 106%;
  letter-spacing: -0.025em;
  line-height: 1.08;
}
.acc-col-lead {
  margin-top: 1rem;
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: clamp(0.95rem, 1.1vw, 1.02rem);
  line-height: 1.68;
}

.conn-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.6rem;
  background: var(--line);
  border: 1px solid var(--line);
}
.conn {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 1rem 1.1rem 1.15rem;
  background: var(--bg);
}
.conn-kind { color: var(--accent); font-size: 0.56rem; }
.conn-name { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.conn-desc { color: var(--ink-soft); font-size: 0.84rem; line-height: 1.55; }

.conn-next {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem;
  margin-top: 0.9rem;
  color: var(--ink-soft);
}
.conn-next b { color: var(--accent); font-weight: 500; }
.acc-sub {
  margin-top: 2.2rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
}
.acc-tech, .app-flow, .pipe { list-style: none; }
.acc-tech { counter-reset: tech; }
.acc-tech li {
  counter-increment: tech;
  position: relative;
  padding: 0.85rem 0 0.85rem 2.4rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.62;
}
.acc-tech li::before {
  content: counter(tech, decimal-leading-zero);
  position: absolute; left: 0; top: 1.08rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.acc-tech b { color: var(--ink); font-weight: 650; }
.acc-tech code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  padding: 1px 5px;
  border: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
}

.app-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 1.6rem 0 0.8rem;
  border: 1px solid var(--line);
}
.app-flow li {
  position: relative;
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 0.8rem 0.55rem 0.75rem 0.7rem;
  border-right: 1px solid var(--line);
  font-size: 0.58rem;
  color: var(--ink);
}
.app-flow li:last-child { border-right: 0; }
.app-flow li b { color: var(--accent); font-weight: 500; }
.app-flow li span {
  color: var(--ink-soft);
  font-size: 0.58rem;
  letter-spacing: 0.02em;
  text-transform: none;
}
.app-flow li.on { background: var(--ink); color: var(--bg); }
.app-flow li.on span { color: rgba(244, 244, 246, 0.62); }
.app-flow li:not(:last-child)::after {
  content: "→";
  position: absolute; z-index: 1; top: 50%; right: -0.5em;
  transform: translateY(-50%);
  padding: 2px 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 0.7rem; line-height: 1;
}
.acc-note { margin-top: 1.4rem; color: var(--ink-soft); }

/* ---------- apps ----------
   One row per app: the phone, then what it is. Alternating sides keeps three
   tall phones from reading as a gallery. */

.apps {
  padding-block: clamp(5rem, 10vw, 9rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.apps-head { margin-bottom: clamp(2.8rem, 6vw, 4.5rem); }

.app-grid {
  display: flex; flex-direction: column;
  gap: clamp(1.6rem, 3vw, 2.6rem);
}
.app-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: clamp(1.4rem, 3.4vw, 3.4rem);
}
.app-card:nth-child(even) { grid-template-columns: minmax(0, 1fr) auto; }
.app-card:nth-child(even) .app-shot { order: 2; }
.app-shot { display: flex; justify-content: center; }
.app-body { max-width: 62ch; }
.app-cat { color: var(--accent); margin-bottom: 0.85rem; }
.app-name {
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 800;
  font-stretch: 110%;
  letter-spacing: -0.03em;
  line-height: 1;
}
.app-tagline {
  margin-top: 0.8rem;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  font-weight: 520;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.app-desc {
  margin-top: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.68;
}
.app-desc em { color: var(--ink); }
.app-points {
  display: grid; gap: 0.55rem;
  margin-top: 1.3rem;
}
.app-points li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}
.app-points li::before {
  content: "";
  position: absolute; left: 0; top: 0.6em;
  width: 6px; height: 6px;
  background: var(--accent);
}
.app-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.app-tags li {
  padding: 4px 9px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- phone mockups ----------
   Each screen is authored at device pixels (390 x 844) with the spacing, radius,
   type and colour tokens of the app it depicts, then scaled down as a whole.
   That is why every value below looks like an app value rather than a web
   value — it is one. --phone-scale is the only knob. All three apps ship on
   Android, so the chrome is Android's: punch-hole camera, 36px status bar,
   gesture pill; safe-area insets are 36 top and 24 bottom. */

.ph-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ph-sprite symbol { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }

.phone {
  --phone-scale: 0.76;
  position: relative;
  width: calc(390px * var(--phone-scale) + 16px);
  max-width: 100%;
  padding: 8px;
  border-radius: calc(44px * var(--phone-scale) + 8px);
  background: linear-gradient(150deg, #33333a, #131317 42%, #0a0a0d);
  box-shadow:
    0 30px 60px -26px rgba(16, 16, 20, 0.55),
    0 2px 0 0 rgba(255, 255, 255, 0.16) inset,
    0 0 0 1px rgba(16, 16, 20, 0.5);
}
.phone-cam {
  position: absolute; z-index: 3;
  top: calc(8px + 12px * var(--phone-scale));
  left: 50%; transform: translateX(-50%);
  width: calc(12px * var(--phone-scale));
  height: calc(12px * var(--phone-scale));
  border-radius: 50%;
  background: #040406;
  box-shadow: 0 0 0 calc(1.5px * var(--phone-scale)) rgba(255, 255, 255, 0.05);
}
.phone-screen {
  position: relative;
  width: calc(390px * var(--phone-scale));
  height: calc(844px * var(--phone-scale));
  border-radius: calc(38px * var(--phone-scale));
  overflow: hidden;
  isolation: isolate;
}
.phone-canvas {
  position: absolute; top: 0; left: 0;
  width: 390px; height: 844px;
  transform-origin: 0 0;
  transform: scale(var(--phone-scale));
  font-family: "Inter", var(--font-sans);
  font-size: 15px;
  line-height: 1.32;
  letter-spacing: 0;
  text-transform: none;
  overflow: hidden;
}
.phone-canvas :where(svg) { width: 100%; height: 100%; fill: none; stroke: currentColor; }
/* Android gesture pill. */
.phone-canvas::after {
  content: "";
  position: absolute; z-index: 5; bottom: 8px; left: 50%;
  transform: translateX(-50%);
  width: 108px; height: 4px; border-radius: 999px;
  background: var(--home-bar, rgba(233, 236, 242, 0.34));
}

/* status bar — Android: time left, signal and battery right */
.ph-status {
  position: relative; z-index: 2;
  height: 36px;
  padding: 6px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.ph-time { font-family: "Inter", var(--font-sans); font-size: 14px; font-weight: 500; letter-spacing: 0.1px; }
.ph-sysicons { display: flex; align-items: flex-end; gap: 4px; }
.ph-sysicons i { width: 3px; background: currentColor; border-radius: 1px; }
.ph-sysicons i.s1 { height: 5px; }
.ph-sysicons i.s2 { height: 8px; }
.ph-sysicons i.s3 { height: 11px; }
.ph-sysicons b {
  width: 20px; height: 10px; margin-left: 4px;
  border: 1.3px solid currentColor; border-radius: 3px;
  background:
    linear-gradient(currentColor, currentColor) left center / 72% 100% no-repeat
    padding-box;
  padding: 1.3px;
}

/* ══════════ AH LITE ══════════ */

.pl {
  --bg: #0B0E13; --surface: #11151C;
  --tint: rgba(28, 34, 45, 0.66);
  --border: rgba(233, 236, 242, 0.09);
  --hl: rgba(233, 236, 242, 0.11);
  --hair: rgba(233, 236, 242, 0.07);
  --text: #E9ECF2; --dim: #98A2B3; --faint: #5D6675;
  --accent: #4C7BE0; --deep: #2F5CBF; --ok: #3E9E7C;
  /* A blue wash top-left, an amber one low right. */
  background:
    radial-gradient(circle 485px at 31px 17px, rgba(76, 123, 224, 0.10), rgba(76, 123, 224, 0.028) 50%, rgba(76, 123, 224, 0) 100%),
    radial-gradient(circle 401px at 390px 608px, rgba(217, 164, 65, 0.05), rgba(217, 164, 65, 0.014) 50%, rgba(217, 164, 65, 0) 100%),
    var(--bg);
  color: var(--text);
  display: flex; flex-direction: column;
}
.pl svg { stroke-width: 1.75; }

.pl > *, .pl-body > *, .pl-hero > * { flex: none; }
.pl-body {
  position: relative; z-index: 1;
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  padding: 12px 16px 0;
  display: flex; flex-direction: column; gap: 16px;
}
.pl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pl-micro, .pl-lbl, .pl-blabel, .pl-qt, .pl-tab b {
  font-size: 10.5px; line-height: 13px; font-weight: 500;
  letter-spacing: 0.7px; text-transform: uppercase;
}
.pl-micro { color: var(--faint); }
.pl-cap { font-size: 12.5px; line-height: 17px; color: var(--dim); }
.pl-cap.faint { color: var(--faint); }

.pl-head { display: flex; align-items: center; }
.pl-who { flex: 1 1 auto; min-width: 0; }
.pl-name { margin-top: 3px; font-size: 16px; line-height: 21px; font-weight: 600; letter-spacing: -0.2px; white-space: nowrap; }
.pl-tools { display: flex; gap: 8px; margin-right: 8px; }
.pl-tool {
  width: 38px; height: 38px; border-radius: 19px;
  display: grid; place-items: center;
  background: var(--tint); color: var(--dim);
}
.pl-tool svg { width: 17px; height: 17px; }
.pl-avatar { position: relative; width: 44px; height: 44px; flex: none; }
.pl-ring { position: absolute; inset: 0; }
.pl-disc {
  position: absolute; left: 6.52px; top: 6.52px;
  width: 30.95px; height: 30.95px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--deep); color: #fff;
  font-size: 13.6px; line-height: 1; font-weight: 500;
}

.pl-hero {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px;
  border: 1px solid var(--border); border-radius: 18px;
  background: linear-gradient(132deg, rgba(76, 123, 224, 0.14) 0%, rgba(17, 21, 28, 0.9) 52%, var(--surface) 100%);
}
.pl-cols { display: flex; align-items: stretch; gap: 12px; }
.pl-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pl-vdiv { flex: none; width: 1px; align-self: stretch; background: var(--border); }
.pl-lbl { display: inline-flex; align-items: center; gap: 2px; color: var(--faint); }
.pl-lbl svg { width: 11px; height: 11px; }
.pl-delta {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 4px 9px 4px 5px; border-radius: 999px;
  background: rgba(62, 158, 124, 0.13); color: var(--ok);
  font-size: 13px; line-height: 17px; font-weight: 500;
}
.pl-delta svg { width: 12px; height: 12px; stroke-width: 2.4; }
.pl-fig {
  font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.4px;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
/* adjustsFontSizeToFit: the six-figure column shrinks before it can wrap. */
.pl-fig.sm { font-size: 18px; letter-spacing: -0.3px; }
.pl-fig.ok { color: var(--ok); }
.pl-spark { width: 100%; height: 38px; display: block; }
.pl-rate { font-size: 12.5px; line-height: 17px; color: var(--dim); white-space: nowrap; }
.pl-note { margin-top: -2px; }
.pl-saved {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(62, 158, 124, 0.22); border-radius: 14px;
  background: rgba(62, 158, 124, 0.09);
}
.pl-saved .pl-lbl { flex: 1 1 auto; }
.pl-link { font-size: 13px; line-height: 17px; font-weight: 500; color: var(--accent); }
.pl-budget {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px;
  border: 1px solid var(--border); border-radius: 14px;
  background: rgba(233, 236, 242, 0.04);
}
.pl-blabel { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); }
.pl-blabel svg { width: 13px; height: 13px; color: var(--ok); }
.pl-bpct { font-size: 13px; line-height: 17px; font-weight: 500; color: var(--ok); }
.pl-track { display: block; height: 6px; border-radius: 3px; background: rgba(233, 236, 242, 0.08); overflow: hidden; }
.pl-track i { display: block; height: 100%; border-radius: 3px; background: var(--ok); }

.pl-ask {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--border); border-radius: 26px;
  background: var(--tint);
}
.pl-imark { width: 22px; height: 22px; flex: none; }
.pl-askt { flex: 1 1 auto; min-width: 0; font-size: 14.5px; line-height: 21px; color: var(--faint); white-space: nowrap; overflow: hidden; }
.pl-send {
  flex: none; width: 36px; height: 36px; border-radius: 18px;
  display: grid; place-items: center;
  background: rgba(76, 123, 224, 0.14); color: var(--accent);
}
.pl-send svg { width: 16px; height: 16px; }

/* Glass card: tint, hairline, and a 1.5px highlight along the top edge. */
.pl-glass {
  position: relative; overflow: hidden;
  background: var(--tint);
  border: 1px solid var(--border); border-radius: 18px;
}
.pl-glass::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1.5px;
  background: linear-gradient(90deg, var(--hl), rgba(255, 255, 255, 0));
  opacity: 0.9;
}

.pl-kpis { display: flex; gap: 8px; }
.pl-kpi {
  flex: 1 1 0; min-width: 0; min-height: 104px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 8px;
}
.pl-kico {
  width: 30px; height: 30px; border-radius: 15px;
  display: grid; place-items: center;
  background: rgba(76, 123, 224, 0.12); color: var(--accent);
}
.pl-kico svg { width: 15px; height: 15px; }
.pl-kval { font-size: 13px; line-height: 17px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }

.pl-qa { display: flex; flex-wrap: wrap; padding: 4px; }
.pl-qt {
  width: 25%;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 2px;
  color: var(--dim); white-space: nowrap;
}
.pl-qt:nth-child(-n+4) { border-bottom: 1px solid var(--hair); }
.pl-qt:not(:nth-child(4n)) { border-right: 1px solid var(--hair); }
.pl-qt i {
  width: 34px; height: 34px; border-radius: 17px;
  display: grid; place-items: center;
  background: rgba(76, 123, 224, 0.12); color: var(--accent);
}
.pl-qt svg { width: 17px; height: 17px; }

/* Floating dock: [tab tab] (orb) [tab tab], flat blue field under the active tab. */
.pl-dockwrap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; }
.pl-scrim {
  position: absolute; left: 0; right: 0; bottom: 0; height: 188px;
  background: linear-gradient(to top, var(--bg) 0%, var(--bg) 30%, rgba(11, 14, 19, 0.92) 48%, rgba(11, 14, 19, 0.55) 72%, rgba(11, 14, 19, 0) 100%);
}
.pl-dock {
  position: relative;
  height: 68px; margin: 0 16px 36px;
  display: flex; align-items: center;
  padding: 0 8px;
  border: 1px solid var(--border); border-radius: 999px;
  background: rgba(14, 22, 38, 0.92);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}
.pl-dockrow { position: relative; flex: 1 1 auto; align-self: stretch; display: flex; align-items: center; }
.pl-hl {
  position: absolute; left: -2px; top: 8px; bottom: 8px;
  width: calc((100% - 74px) / 4 + 4px);
  border-radius: 26px 18px 18px 26px;
  background: var(--deep);
}
.pl-tab {
  position: relative;
  flex: 1 1 0; align-self: stretch;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--faint);
}
.pl-tab svg { width: 22px; height: 22px; }
.pl-tab b { margin-top: 3px; font-size: 9.5px; line-height: 12px; letter-spacing: 0.3px; }
.pl-tab.on { color: #fff; }
.pl-tab.on svg { stroke-width: 2; }
.pl-orbslot { flex: none; width: 74px; align-self: stretch; display: grid; place-items: center; }
.pl-orb { position: relative; width: 60px; height: 60px; }
.pl-orbdisc {
  position: absolute; left: 9.49px; top: 9.49px;
  width: 41.02px; height: 41.02px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
}
.pl-orbdisc svg { width: 24px; height: 24px; stroke-width: 2.2; }

/* ══════════ AH SPLIT ══════════ */

.ps {
  --bg: #0B1120; --surface: #101A2E; --raised: #16223A;
  --text: #EDF2FB; --dim: #93A1B8; --faint: #5D6B82;
  --hair: rgba(148, 163, 184, 0.14); --hair2: rgba(148, 163, 184, 0.26);
  --primary: #5B8DEF; --tint: rgba(91, 141, 239, 0.14);
  --pos: #10B981; --neg: #EF4444; --pend: #F59E0B;
  --home-bar: rgba(237, 242, 251, 0.32);
  background: var(--bg);
  color: var(--text);
  font-family: "Schibsted Grotesk", "Inter", var(--font-sans);
  display: flex; flex-direction: column;
}
.ps svg { stroke-width: 2; }
.ps > *, .ps-body > * { flex: none; }
.ps-body {
  position: relative; z-index: 1;
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  padding: 12px 16px 0;
  display: flex; flex-direction: column;
}
.ps-micro { font-size: 10.5px; line-height: 13px; font-weight: 500; letter-spacing: 0.8px; text-transform: uppercase; color: var(--dim); }
.ps-row { display: flex; align-items: center; justify-content: space-between; }

.ps-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.ps-word { display: flex; align-items: center; gap: 8px; }
.ps-mark { width: 24px; height: 24px; flex: none; }
.ps-title { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.4px; }
.ps-iconbtn {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  border: 1px solid var(--hair); background: var(--surface); color: var(--text);
}
.ps-iconbtn svg { width: 19px; height: 19px; }

.ps-card { padding: 16px; border: 1px solid var(--hair); border-radius: 16px; background: var(--surface); }
.ps-card.flush { padding: 0; }
.ps-hero { margin-top: 12px; display: flex; align-items: stretch; }
.ps-cell { flex: 1 1 0; min-width: 0; }
.ps-vdiv { flex: none; width: 1px; margin: 0 16px; background: var(--hair); }

/* Amounts: sign spaced off, the currency code as a smaller dim suffix. */
.ps-amt {
  font-family: "Spline Sans Mono", var(--font-mono);
  font-size: 17px; line-height: 22px; font-weight: 600;
  color: var(--text);
  text-transform: none; letter-spacing: 0;
}
.ps-amt span { font-weight: 500; font-size: 12px; color: var(--dim); }
.ps-amt.lg { margin-top: 4px; font-size: 28px; line-height: 34px; letter-spacing: -0.5px; }
.ps-amt.lg span { font-size: 20px; letter-spacing: 0; }
.ps-amt.sm { margin-top: 4px; font-size: 13px; line-height: 18px; font-weight: 500; }
.ps-amt.sm span { font-size: 9px; }
.ps-amt.pos { color: var(--pos); }
.ps-amt.neg { color: var(--neg); }

.ps-quick { display: flex; gap: 8px; margin-top: 12px; }
.ps-tile {
  flex: 1 1 0; min-width: 0; min-height: 78px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 8px;
  border: 1px solid var(--hair); border-radius: 16px;
  background: var(--surface);
  font-size: 13px; line-height: 18px; font-weight: 500; letter-spacing: 0.2px; text-align: center;
}
.ps-tile svg { width: 20px; height: 20px; color: var(--primary); }

.ps-sect { margin: 24px 0 8px; }
.ps-action { font-size: 13px; line-height: 18px; font-weight: 500; letter-spacing: 0.2px; color: var(--primary); }
.ps-stats { display: flex; align-items: flex-start; }
.ps-stats > div { flex: 1 1 0; min-width: 0; }

.ps-person { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.ps-lrow { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; }
.ps-av {
  flex: none; width: 36px; height: 36px; border-radius: 18px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 500;
}
.ps-pbody { flex: 1 1 auto; min-width: 0; }
.ps-name { font-size: 15px; line-height: 21px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-cap { margin-top: 1px; font-size: 12px; line-height: 16px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-pright { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ps-pright.tight { gap: 4px; }
.ps-pright .ps-amt { margin-top: 0; }
.ps-ghost {
  height: 44px; padding: 0 16px;
  display: inline-flex; align-items: center;
  border: 1px solid var(--hair2); border-radius: 12px;
  font-size: 15px; font-weight: 500;
}
.ps-div { display: block; height: 1px; background: var(--hair); }
.ps-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border: 1px solid; border-radius: 8px;
  font-size: 13px; line-height: 18px; font-weight: 500; letter-spacing: 0.2px;
}
.ps-chip i { width: 6px; height: 6px; border-radius: 3px; background: currentColor; }
.ps-chip.pend { color: var(--pend); background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.25); }
.ps-chip.ok { color: var(--pos); background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.25); }

/* Dock: pill of four tabs with the brand orb (Payments) in the middle slot. */
.ps-dockwrap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; }
.ps-scrim {
  position: absolute; left: 0; right: 0; bottom: 0; height: 152px;
  background: linear-gradient(to top, var(--bg) 0%, rgba(11, 17, 32, 0.75) 50%, rgba(11, 17, 32, 0) 100%);
}
.ps-dock { position: relative; height: 64px; margin: 0 16px 34px; }
.ps-dockrow {
  position: relative; overflow: hidden;
  height: 64px; padding: 0 8px;
  display: flex; align-items: stretch;
  border: 1px solid var(--hair); border-radius: 999px;
  background: var(--surface);
}
.ps-tab {
  position: relative; z-index: 0;
  flex: 1 1 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--faint);
}
.ps-tab svg { width: 21px; height: 21px; stroke-width: 1.8; }
.ps-tab b { margin-top: 2px; font-size: 10px; line-height: 12px; font-weight: 500; letter-spacing: 0.2px; }
.ps-tab.on { color: var(--primary); }
.ps-tab.on svg { stroke-width: 2.1; }
.ps-tab.on::before {
  content: "";
  position: absolute; z-index: -1; left: 0; right: 0; top: 8px; bottom: 8px;
  border-radius: 999px;
  background: var(--tint);
}
.ps-orbslot { flex: none; width: 78px; }
.ps-orb { position: absolute; left: 50%; bottom: 4px; width: 56px; height: 56px; transform: translateX(-50%); }
.ps-orbmark { position: absolute; inset: 0; }
.ps-orbdisc {
  position: absolute; left: 16.5px; top: 16.5px;
  width: 23px; height: 23px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--raised); color: var(--primary);
}
.ps-orbdisc svg { width: 13px; height: 13px; stroke-width: 1.9; }

/* ══════════ ACCOUNTHOUSE MOBILE ══════════ */

.pa {
  --canvas: #0b1120; --card: #151e2e; --line: #1e2a3a; --chrome: #151e2e;
  --text: #f8fafc; --dim: #94a3b8; --muted: #64748b;
  --primary: #5b8def; --bad: #ef4444;
  background: linear-gradient(180deg, #16264a 0%, #0b1120 55%, #04070d 100%);
  color: var(--text);
  display: flex; flex-direction: column;
}
.pa svg { stroke-width: 1.8; }
.pa-status { color: #fff; margin: 0 -16px; }

.pa-hero {
  position: relative; overflow: hidden;
  padding: 0 16px 60px;
  border-radius: 0 0 30px 30px;
  background: linear-gradient(150deg, #22375f, #16264a 52%, #0e1830);
}
.pa-orb { position: absolute; border-radius: 999px; background: rgba(255, 255, 255, 0.07); }
.pa-orb.o1 { width: 240px; height: 240px; top: -100px; right: -80px; }
.pa-orb.o2 { width: 150px; height: 150px; bottom: -60px; left: -50px; background: rgba(255, 255, 255, 0.05); }
.pa-ring {
  position: absolute; top: 64px; right: -64px;
  width: 190px; height: 190px; border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
}
.pa-hero > *:not(.pa-orb):not(.pa-ring) { position: relative; z-index: 1; }

.pa-top { display: flex; align-items: center; margin: 8px 0 20px; }
.pa-chip {
  flex: none; width: 38px; height: 38px; border-radius: 13px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
}
.pa-chip svg { width: 20px; height: 20px; stroke-width: 2.2; }
.pa-greet { flex: 1 1 auto; min-width: 0; margin: 0 12px; }
.pa-hi { font-size: 11px; font-weight: 600; letter-spacing: 0.3px; color: rgba(255, 255, 255, 0.78); }
.pa-nm { margin-top: 1px; font-size: 17px; font-weight: 800; color: #fff; white-space: nowrap; }
.pa-bell { position: relative; width: 34px; height: 34px; display: grid; place-items: center; color: rgba(255, 255, 255, 0.92); }
.pa-bell svg { width: 20px; height: 20px; }
.pa-bell i { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 999px; background: #ef4444; border: 1.5px solid #1b2c4d; }
.pa-avring { flex: none; margin-left: 8px; padding: 2px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, 0.45); }
.pa-avatar {
  width: 34px; height: 34px; border-radius: 999px;
  display: grid; place-items: center;
  background: #3a5da8; color: #fff;
  font-size: 12px; font-weight: 700;
}

.pa-spend { display: flex; flex-direction: column; align-items: center; }
.pa-slabel { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.6px; color: rgba(255, 255, 255, 0.7); }
.pa-amount { margin-top: 4px; font-size: 42px; font-weight: 800; letter-spacing: -1px; color: #fff; white-space: nowrap; }
.pa-sub { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.75); }
.pa-sub svg { flex: none; width: 13px; height: 13px; }

.pa-glass {
  margin-top: 16px; padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 14px;
  background: rgba(7, 18, 40, 0.32);
}
.pa-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pa-glabel { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #fff; }
.pa-glabel svg { width: 14px; height: 14px; color: #bbf7d0; }
.pa-gpct { font-size: 13px; font-weight: 800; color: #bbf7d0; }
.pa-track { display: block; height: 8px; margin-top: 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.28); overflow: hidden; }
.pa-track i { display: block; height: 100%; border-radius: 4px; background: #ffffff; }
.pa-gfootrow { margin-top: 7px; }
.pa-gfoot { font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.92); }

/* Card sheen over a transparent shell, soft blue ring. */
.pa-quick, .pa-mcard, .pa-sect {
  background: linear-gradient(135deg, #1d2f55 0%, #141f3b 50%, #101a30 100%);
  border: 1px solid rgba(91, 141, 239, 0.22);
}
.pa-quick {
  position: relative; z-index: 2;
  margin: -40px 16px 16px;
  display: flex;
  padding: 14px 4px;
  border-color: rgba(91, 141, 239, 0.35); border-radius: 20px;
  box-shadow: 0 14px 28px -16px rgba(0, 0, 0, 0.8);
}
.pa-qi { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 2px 0; font-size: 11px; font-weight: 700; color: var(--text); }
.pa-well {
  width: 46px; height: 46px; border-radius: 16px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 24%, transparent);
  color: var(--c);
}
.pa-well svg { width: 22px; height: 22px; }

.pa > *, .pa-body > * { flex: none; }
.pa-body { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 0 16px; }
.pa-mini { display: flex; gap: 8px; margin-bottom: 16px; }
.pa-mcard {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px; border-radius: 14px;
}
.pa-miw {
  width: 32px; height: 32px; border-radius: 16px; margin-bottom: 2px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c);
}
.pa-miw svg { width: 16px; height: 16px; }
.pa-mval { font-size: 13px; font-weight: 700; white-space: nowrap; }
.pa-mlab { font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--muted); }

.pa-sect { padding: 16px; border-radius: 20px; }
.pa-shead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pa-stitle { font-size: 15px; font-weight: 700; }
.pa-see { font-size: 13px; font-weight: 700; color: var(--primary); }
.pa-tx { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pa-tx:last-child { border-bottom: 0; }
.pa-init {
  flex: none; width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
}
.pa-txb { flex: 1 1 auto; min-width: 0; }
.pa-txn { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-txm { margin-top: 1px; font-size: 11px; color: var(--muted); }
.pa-txv { flex: none; font-size: 13px; font-weight: 700; color: var(--bad); }

/* Household tab bar: Home · Expenses · (Add Expense) · Shopping · Chat */
.pa-tabs {
  position: relative;
  height: 86px; padding: 6px 0 30px;
  display: flex;
  background: var(--chrome);
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.08);
}
.pa-tab { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--dim); }
.pa-tab svg { width: 24px; height: 24px; }
.pa-tab b { margin-top: 2px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.pa-tab.on { color: var(--primary); }
.pa-tab.add i {
  width: 30px; height: 30px; border-radius: 15px;
  display: grid; place-items: center;
  background: #1e2a3a; border: 1.5px solid var(--primary);
  color: var(--primary);
}
.pa-tab.add svg { width: 20px; height: 20px; }
.pa-tab.add b { margin-top: 0; }

/* ============ OPEN BY IA ============ */

.open {
  padding-block: clamp(6rem, 11vw, 10rem) 0;
  border-bottom: 1px solid var(--line);
}
.open-head { margin-bottom: clamp(2.4rem, 5vw, 4rem); }
.open-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}
.open-rules { border-top: 1px solid var(--ink); }
.open-rules li {
  display: flex; gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.open-rules b { color: var(--accent); font-weight: 500; }
.open-proj { border-top: 1px solid var(--line); }
.open-proj .prod-index::before { content: "OPEN/"; }
.pipe {
  display: flex; flex-wrap: wrap;
  margin-top: 1.8rem;
  border: 1px solid var(--line);
}
.pipe li {
  flex: 1 1 auto;
  padding: 0.62rem 0.6rem;
  border-right: 1px solid var(--line);
  font-size: 0.58rem;
  text-align: center;
  background: var(--bg);
}
.pipe li:last-child { border-right: 0; }
.pipe li.on { background: var(--ink); color: var(--bg); }
.open-ctas { display: flex; flex-wrap: wrap; gap: 0 2.2rem; }
.open-notes { margin-top: 1.6rem; border-top: 1px solid var(--ink); }
.open-notes div {
  display: grid; grid-template-columns: minmax(7.5rem, 0.42fr) 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.open-notes dt { color: var(--ink-soft); font-size: 0.6rem; padding-top: 0.2rem; }
.open-notes dd { color: var(--ink-soft); font-size: 0.88rem; line-height: 1.6; }
.open-notes dd b { color: var(--ink); font-weight: 650; }

/* ============ CAPABILITY INDEX (engineering) ============ */

.cap-index { margin-top: clamp(4rem, 8vw, 7rem); }
.cap-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.8rem 2rem;
  margin-bottom: 1.4rem;
}
.cap-tag { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-soft); }
.cap-tag .sq { width: 8px; height: 8px; }
.cap-note { max-width: 52ch; color: var(--ink-soft); font-size: 0.92rem; }
.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: clamp(1.2rem, 2.4vw, 2.4rem);
  border-top: 1px solid var(--ink);
}
.cap-grid > div { padding: 1.3rem 0 1.5rem; border-bottom: 1px solid var(--line); }
.cap-grid dt { margin-bottom: 0.7rem; color: var(--accent); font-size: 0.6rem; }
.cap-grid dd { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.6; }

/* ============ SYSTEMS (dark) ============ */

.systems {
  background: var(--ink);
  color: var(--bg);
  padding-block: clamp(6rem, 11vw, 10rem);
  --sys-line: rgba(244, 244, 246, 0.16);
  --sys-line-soft: rgba(244, 244, 246, 0.09);
  --sys-dim: rgba(244, 244, 246, 0.56);
  --sys-faint: rgba(244, 244, 246, 0.38);
}
.systems .section-tag { color: rgba(244, 244, 246, 0.5); }
.systems .section-title { color: var(--bg); }
.systems-head { margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.systems-lead {
  max-width: 64ch;
  margin-top: 1.7rem;
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.65;
  color: var(--sys-dim);
}

.sys-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--sys-line-soft);
  border-left: 1px solid var(--sys-line-soft);
}
.sys-card {
  min-width: 0;
  background: var(--ink);
  border-right: 1px solid var(--sys-line-soft);
  border-bottom: 1px solid var(--sys-line-soft);
  padding: clamp(1.6rem, 2.6vw, 2.4rem);
  display: flex; flex-direction: column;
  transition: background 0.4s var(--ease-out);
}
.sys-card:hover { background: #16161b; }

.sys-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  margin-bottom: 1.3rem;
}
.sys-idx { color: var(--accent); }
.sys-kind {
  color: var(--sys-faint);
  padding-left: 12px;
  border-left: 1px solid var(--sys-line);
}
.sys-name {
  font-size: clamp(1.6rem, 2.5vw, 2.15rem);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.028em;
  line-height: 1.04;
}
.sys-tag {
  margin-top: 0.6rem;
  font-size: clamp(0.98rem, 1.25vw, 1.1rem);
  color: var(--accent);
  font-style: italic;
}

/* ---- schematic figures ---- */

.sys-fig {
  margin: 1.7rem 0 1.6rem;
  padding: clamp(0.7rem, 1.4vw, 1.1rem);
  border: 1px solid var(--sys-line-soft);
  background:
    linear-gradient(rgba(244, 244, 246, 0.035) 1px, transparent 1px) 0 0 / 100% 22px,
    linear-gradient(90deg, rgba(244, 244, 246, 0.035) 1px, transparent 1px) 0 0 / 22px 100%;
  overflow-x: auto;
}
.sys-fig::after {
  content: "SCROLL →";
  display: none;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--sys-faint);
}
.sys-fig svg {
  width: 100%;
  min-width: 420px;
  height: auto;
  color: var(--bg);
  overflow: visible;
}

/* boxes, bands and rules share one language with the rest of the page:
   hairlines, no fills, coral for the part that matters. */
.d-box rect {
  fill: none;
  stroke: rgba(244, 244, 246, 0.5);
  stroke-width: 1;
}
.d-box rect.acc { stroke: var(--accent); }
.d-box rect.dash { stroke: rgba(244, 244, 246, 0.3); stroke-dasharray: 3 3; }
.d-lines path {
  fill: none;
  stroke: rgba(244, 244, 246, 0.34);
  stroke-width: 1;
}
.d-ghost {
  fill: none;
  stroke: rgba(244, 244, 246, 0.2);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}
.d-band rect {
  fill: rgba(244, 244, 246, 0.035);
  stroke: rgba(244, 244, 246, 0.13);
  stroke-width: 1;
}
.d-band rect.acc-band { fill: rgba(255, 99, 74, 0.06); stroke: rgba(255, 99, 74, 0.28); }
.d-txn {
  fill: rgba(255, 99, 74, 0.05);
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}

.sys-fig text {
  font-family: var(--font-mono);
  fill: rgba(244, 244, 246, 0.88);
  stroke: none;
}
.d-t text, text.d-t {
  font-size: 8.5px;
  letter-spacing: 0.055em;
  text-anchor: middle;
}
.d-t.d-xs text { font-size: 7.2px; }
.d-cap, .d-cap text {
  fill: var(--accent);
  font-size: 7.4px;
  letter-spacing: 0.12em;
  text-anchor: start;
}
.d-s text {
  font-size: 7.4px;
  fill: rgba(244, 244, 246, 0.42);
  letter-spacing: 0.05em;
  text-anchor: start;
  text-transform: none;
}

.sys-desc {
  margin-bottom: 1rem;
  color: var(--sys-dim);
  font-size: clamp(0.93rem, 1.1vw, 1rem);
  line-height: 1.68;
}
.sys-desc em { color: var(--bg); font-style: italic; }
.sys-desc code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--bg);
  padding: 1px 5px;
  border: 1px solid var(--sys-line);
  white-space: nowrap;
}

.sys-done {
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 1px solid var(--sys-line-soft);
  color: rgba(244, 244, 246, 0.82);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  line-height: 1.6;
}
.sys-done span { display: block; margin-bottom: 0.3rem; color: var(--accent); }
.sys-facts {
  display: flex; flex-wrap: wrap; gap: 7px;
  padding-top: 1rem;
}
.sys-facts li {
  padding: 5px 10px;
  border: 1px solid var(--sys-line);
  color: rgba(244, 244, 246, 0.7);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sys-foot {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.9rem 1.6rem;
  margin-top: clamp(2.4rem, 4vw, 3.4rem);
  max-width: 82ch;
  color: var(--sys-dim);
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  line-height: 1.65;
}
.sys-foot > .mono { color: var(--accent); flex: none; }
.sys-foot-link {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--bg);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--bg);
  transition: color 0.3s, border-color 0.3s;
}
.sys-foot-link .arr { transition: transform 0.35s var(--ease-out); display: inline-block; }
.sys-foot-link:hover { color: var(--accent); border-color: var(--accent); }
.sys-foot-link:hover .arr { transform: translateX(5px); }

/* ============ WHY ============ */

.why {
  padding-block: clamp(6rem, 11vw, 10rem);
}
.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(3rem, 6vw, 7rem);
  align-items: start;
}
.why-left { position: sticky; top: calc(var(--nav-h) + 4vh); }
.why-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.w-stat {
  background: var(--bg);
  padding: clamp(1.4rem, 2.6vw, 2.2rem);
  display: flex; flex-direction: column; gap: 8px;
}
.w-val {
  font-size: clamp(2.6rem, 4.6vw, 4.4rem);
  font-weight: 660; font-stretch: 114%;
  letter-spacing: -0.03em; line-height: 1;
}
.w-key { color: var(--ink-soft); font-size: 0.6rem; }
.why-list { border-top: 1px solid var(--line); }
.why-row {
  display: grid; grid-template-columns: 4.4rem 1fr;
  gap: 1.4rem;
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
  border-bottom: 1px solid var(--line);
}
.why-num { color: var(--accent); padding-top: 0.5em; }
.why-row h3 {
  font-size: clamp(1.3rem, 2.1vw, 1.8rem);
  font-weight: 620; font-stretch: 110%;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}
.why-row p { color: var(--ink-soft); line-height: 1.6; max-width: 52ch; }

/* ============ CTA ============ */

.cta {
  background: var(--accent);
  color: var(--ink);
  position: relative;
  overflow: hidden;
  padding-block: clamp(7rem, 14vw, 13rem);
}
.cta-ghost {
  position: absolute; right: -0.06em; bottom: -0.28em;
  font-size: clamp(18rem, 42vw, 42rem);
  font-weight: 700; font-stretch: 120%;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(16, 16, 20, 0.16);
  pointer-events: none;
  user-select: none;
}
.cta-inner { position: relative; z-index: 1; }
.cta-tag { color: rgba(16,16,20,0.65); margin-bottom: 2.2rem; }
.cta-title {
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 670; font-stretch: 116%;
  line-height: 0.98; letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.cta-sub {
  max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: rgba(16,16,20,0.78);
  line-height: 1.6;
  margin-bottom: 3rem;
}
.cta-actions { display: flex; align-items: center; gap: 2.2rem; flex-wrap: wrap; }
.cta-mail {
  color: var(--ink);
  position: relative; padding-bottom: 4px;
  font-size: 0.78rem;
  /* a <button>, not a link — there is no address to send anyone to */
  display: inline-block;
  text-align: left;
}
.cta-mail::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--ink);
  transform-origin: right center;
  transition: transform 0.4s var(--ease-out);
}
.cta-mail:hover::after { transform: scaleX(0); transform-origin: left center; }

/* ============ FOOTER ============ */

.footer {
  background: var(--ink); color: var(--bg);
  padding-block: clamp(3.5rem, 6vw, 5.5rem) 2rem;
}
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 3rem; flex-wrap: wrap;
  padding-bottom: clamp(3rem, 5vw, 4.5rem);
  border-bottom: 1px solid rgba(244,244,246,0.12);
  margin-bottom: 1.6rem;
}
.footer-mark {
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 680; font-stretch: 118%;
  letter-spacing: -0.02em;
  display: inline-flex; align-items: center; gap: 8px;
}
.footer-cols {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.6rem, 3.4vw, 3.4rem);
}
.f-col { display: flex; flex-direction: column; gap: 0.7rem; }
.f-head { color: rgba(244,244,246,0.4); margin-bottom: 0.5rem; }
.f-col a {
  font-size: 0.9rem; color: rgba(244,244,246,0.78);
  transition: color 0.25s, transform 0.3s;
  width: fit-content;
}
.f-col a:hover { color: var(--accent); }
.f-plain { font-size: 0.9rem; color: rgba(244,244,246,0.55); }
.f-time { font-size: 0.62rem; }
.footer-bar {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: rgba(244,244,246,0.4);
  font-size: 0.6rem;
}
.f-status { display: inline-flex; align-items: center; gap: 8px; }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,99,74,0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 5px rgba(255,99,74,0); }
}

/* ============ BRIEF MODAL ============ */

.brief {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-items: center;
  padding: clamp(0px, 3vw, 40px);
}
.brief[hidden] { display: none; }
.brief [hidden] { display: none !important; }

.brief-scrim {
  position: absolute; inset: 0;
  background: rgba(10, 10, 13, 0.82);
  -webkit-backdrop-filter: blur(7px) saturate(120%);
  backdrop-filter: blur(7px) saturate(120%);
  opacity: 0;
  transition: opacity 0.42s var(--ease-out);
}
.brief-scrim::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(244, 244, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 244, 246, 0.04) 1px, transparent 1px);
  background-size: 46px 46px;
}

.brief-panel {
  position: relative;
  width: min(1040px, 100%);
  max-height: min(880px, 100vh);
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  background: var(--bg);
  border: 1px solid var(--ink);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.75);
  opacity: 0;
  transform: translateY(22px) scale(0.985);
  transition: opacity 0.42s var(--ease-out), transform 0.52s var(--ease-out);
  overflow: hidden;
}
.brief.is-open .brief-scrim { opacity: 1; }
.brief.is-open .brief-panel { opacity: 1; transform: none; }

/* crosshair corners, same device as the figure frames elsewhere */
.brief-corner {
  position: absolute; width: 12px; height: 12px; z-index: 4;
  pointer-events: none;
  /* the colour goes in each shorthand: a bare `1px solid` resets it to
     currentColor, which is invisible against the dark rail */
}
.brief-corner.k1 { top: 8px; left: 8px; border-top: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.brief-corner.k2 { top: 8px; right: 8px; border-top: 1px solid var(--accent); border-right: 1px solid var(--accent); }
.brief-corner.k3 { bottom: 8px; left: 8px; border-bottom: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.brief-corner.k4 { bottom: 8px; right: 8px; border-bottom: 1px solid var(--accent); border-right: 1px solid var(--accent); }

.brief-x {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--bg);
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease-out);
}
.brief-x span {
  position: absolute; width: 15px; height: 1px; background: var(--ink);
  transition: background 0.25s;
}
.brief-x span:first-child { transform: rotate(45deg); }
.brief-x span:last-child { transform: rotate(-45deg); }
.brief-x:hover { background: var(--ink); border-color: var(--ink); transform: rotate(90deg); }
.brief-x:hover span { background: var(--bg); }

/* ---------- left rail ---------- */

.brief-rail {
  position: relative;
  background: var(--ink);
  color: var(--bg);
  padding: clamp(1.6rem, 2.4vw, 2.2rem);
  display: flex; flex-direction: column; gap: clamp(1.2rem, 2.4vw, 1.9rem);
  overflow: hidden;
}
.brief-rail::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg, transparent 0 9px, rgba(244, 244, 246, 0.028) 9px 10px);
  pointer-events: none;
}
.brief-rail > * { position: relative; z-index: 1; }

.brief-rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.brief-mark {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em;
  font-size: 0.98rem;
}
.brief-doc { color: rgba(244, 244, 246, 0.38); font-size: 0.6rem; }

.brief-fig { color: rgba(244, 244, 246, 0.32); }
.brief-fig svg { width: min(170px, 62%); margin: 0 auto; display: block; }
.brief-fig .r1 { transform-origin: 100px 100px; animation: briefSpin 26s linear infinite; }
.brief-fig .r2 { transform-origin: 100px 100px; animation: briefSpin 17s linear infinite reverse; }
.brief-fig .r3 { transform-origin: 100px 100px; animation: briefSpin 34s linear infinite; }
.brief-fig .r4 { transform-origin: 100px 100px; animation: briefSpin 9s linear infinite; }
@keyframes briefSpin { to { transform: rotate(360deg); } }

.brief-steps { display: flex; flex-direction: column; gap: 0.95rem; margin-top: auto; }
.brief-steps li { display: grid; grid-template-columns: 2rem 1fr; gap: 0.6rem; }
.brief-steps .mono { color: var(--accent); font-size: 0.62rem; padding-top: 2px; }
.brief-steps b { display: block; font-size: 0.86rem; font-weight: 600; letter-spacing: -0.005em; }
.brief-steps p { margin-top: 3px; font-size: 0.78rem; line-height: 1.5; color: rgba(244, 244, 246, 0.5); }

.brief-rail-foot {
  padding-top: 1.1rem;
  border-top: 1px solid rgba(244, 244, 246, 0.14);
  color: rgba(244, 244, 246, 0.45);
  font-size: 0.6rem; line-height: 1.9;
}
.brief-rail-foot a { color: var(--bg); border-bottom: 1px solid rgba(244, 244, 246, 0.3); }
.brief-rail-foot a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- form side ---------- */

.brief-main {
  position: relative;
  padding: clamp(1.7rem, 3vw, 2.6rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.brief-head { margin-bottom: clamp(1.4rem, 2.6vw, 2rem); padding-right: 46px; }
.brief-tag { display: inline-flex; align-items: center; gap: 9px; color: var(--ink-soft); }
.brief-tag .sq { width: 7px; height: 7px; }
.brief-title {
  margin-top: 0.85rem;
  font-size: clamp(1.7rem, 3.1vw, 2.5rem);
  font-weight: 800; font-stretch: 110%;
  letter-spacing: -0.035em; line-height: 1.02;
}

.brief-form { display: flex; flex-direction: column; gap: clamp(1rem, 1.9vw, 1.4rem); }
.brief-field { display: block; border: 0; padding: 0; margin: 0; min-width: 0; }
.brief-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(0.8rem, 1.6vw, 1.2rem);
}
.brief-label {
  display: block; margin-bottom: 0.55rem;
  color: var(--ink-soft); font-size: 0.6rem;
}

.brief-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.brief-chip { position: relative; cursor: pointer; }
.brief-chip input {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.brief-chip span {
  display: block;
  padding: 8px 13px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.63rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color 0.22s, border-color 0.22s, background 0.22s;
}
.brief-chip:hover span { color: var(--ink); border-color: var(--ink); }
.brief-chip input:checked + span {
  background: var(--ink); border-color: var(--ink); color: var(--bg);
}
.brief-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.brief-input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  transition: border-color 0.22s, box-shadow 0.22s;
  -webkit-appearance: none; appearance: none;
}
.brief-input::placeholder { color: #A6A6AE; }
.brief-input:hover { border-color: #BDBDC2; }
.brief-input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: inset 0 -2px 0 0 var(--accent);
}
.brief-input.is-invalid { border-color: var(--accent); }
.brief-textarea { resize: vertical; min-height: 118px; line-height: 1.55; }

.brief-selectwrap { position: relative; }
.brief-select { padding-right: 38px; cursor: pointer; }
.brief-caret {
  position: absolute; right: 15px; top: 50%;
  width: 7px; height: 7px; margin-top: -5px;
  border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  transform: rotate(45deg);
  pointer-events: none;
}

.brief-count {
  display: block; margin-top: 6px; text-align: right;
  color: var(--ink-soft); font-size: 0.58rem;
}
.brief-count.is-near b { color: var(--accent); }

/* honeypot — off-screen rather than display:none, which some bots skip */
.brief-hp {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

.brief-error {
  padding: 10px 13px;
  border: 1px solid var(--accent);
  background: rgba(255, 99, 74, 0.07);
  color: var(--ink);
  font-size: 0.63rem; line-height: 1.7;
  text-transform: none; letter-spacing: 0.03em;
}
.brief-error a { border-bottom: 1px solid var(--accent); }

.brief-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.9rem 1.4rem;
  margin-top: 0.3rem;
}
.brief-submit {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 26px;
  background: var(--ink); color: var(--bg);
  font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em;
  transition: background 0.25s, color 0.25s;
}
.brief-submit::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.42s var(--ease-out);
}
.brief-submit:hover::before { transform: scaleX(1); }
.brief-submit > * { position: relative; z-index: 1; }
.brief-submit-arrow { transition: transform 0.35s var(--ease-out); }
.brief-submit:hover .brief-submit-arrow { transform: translateX(5px); }
.brief-submit-bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
}
.brief-submit[disabled] { cursor: default; opacity: 0.85; }
.brief-submit[disabled]::before { transform: scaleX(0); }
.brief-submit.is-sending .brief-submit-bar {
  animation: briefProgress 1.6s ease-in-out infinite;
}
@keyframes briefProgress {
  0% { transform: scaleX(0); transform-origin: left; }
  50% { transform: scaleX(1); transform-origin: left; }
  51% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}
.brief-note { color: var(--ink-soft); font-size: 0.58rem; }

/* ---------- success ---------- */

.brief-done {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1rem;
  padding-block: clamp(1.5rem, 4vw, 3rem);
}
.brief-done[hidden] { display: none; }
.brief-done-mark { color: var(--line); }
.brief-done-mark svg { width: 46px; height: 46px; }
.brief-done-title {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700; font-stretch: 108%; letter-spacing: -0.03em;
}
.brief-done-text { max-width: 46ch; color: var(--ink-soft); line-height: 1.65; }
.brief-done-close {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 0.4rem; padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.09em; text-transform: uppercase;
  transition: color 0.25s, border-color 0.25s;
}
.brief-done-close:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .brief { padding: 0; place-items: end stretch; }
  .brief-panel {
    grid-template-columns: 1fr;
    width: 100%;
    max-height: 100vh; max-height: 100dvh;
    border: 0; border-top: 1px solid var(--ink);
    transform: translateY(38px);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .brief-corner.k1, .brief-corner.k2 { display: none; }
  /* The rail collapses to a header strip: identity and the direct email stay,
     the schematic and the three steps are noise on a phone. */
  .brief-rail {
    flex-direction: row; align-items: center; justify-content: space-between;
    gap: 12px; padding: 14px clamp(1.1rem, 4vw, 1.6rem);
  }
  .brief-fig, .brief-steps { display: none; }
  .brief-rail-head { flex: 1 1 auto; }
  .brief-doc { display: none; }
  .brief-rail-foot { padding-top: 0; border-top: 0; text-align: right; line-height: 1.5; }
  .brief-rail-foot br { display: none; }
  .brief-main { padding: clamp(1.3rem, 5vw, 2rem); }
  .brief-x { top: 10px; right: 10px; width: 34px; height: 34px; background: transparent; border-color: rgba(244,244,246,0.28); }
  .brief-x span { background: var(--bg); }
  .brief-title { font-size: clamp(1.55rem, 7vw, 2.1rem); }
}

@media (max-width: 600px) {
  .brief-row { grid-template-columns: 1fr; }
  .brief-rail-foot { display: none; }
  .brief-chip span { padding: 7px 11px; font-size: 0.6rem; }
  .brief-submit { width: 100%; justify-content: center; }
  .brief-actions { gap: 0.7rem; }
  .brief-note { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .brief-scrim, .brief-panel { transition: none; }
  .brief-fig .r1, .brief-fig .r2, .brief-fig .r3, .brief-fig .r4,
  .brief-submit.is-sending .brief-submit-bar { animation: none; }
  .brief-submit.is-sending .brief-submit-bar { transform: scaleX(0.4); }
  .brief-x:hover { transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .build-layout { grid-template-columns: 1fr; }
  .build-figure { display: none; }
  /* The row highlight exists to drive the figure. With the figure gone it is
     a hover affordance on a device with no hover — and a tap that fires
     mouseenter leaves one row stuck shaded and indented. */
  .build-row.is-active a::before, .build-row a:hover::before { width: 0; }
  .build-row.is-active a { padding-left: 0; }
  .b-arrow { opacity: 1; transform: none; }
  .build-row a {
    grid-template-columns: 3rem 1fr 2rem;
    grid-template-areas: "num name arrow" ". desc .";
    row-gap: 0.45rem;
  }
  .b-num { grid-area: num; }
  .b-name { grid-area: name; }
  .b-desc { grid-area: desc; max-width: 56ch; }
  .b-arrow { grid-area: arrow; }
  .process-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .stage-diagram { display: none; }
  .eng-grid { grid-template-columns: 1fr; gap: 4rem; }
  .eng-stack { height: clamp(340px, 52vw, 460px); }
  .layer-face { width: clamp(190px, 26vw, 260px); height: clamp(190px, 26vw, 260px); }
  .layer-tag { left: clamp(110px, 15vw, 150px); }
  .why-grid { grid-template-columns: 1fr; }
  .why-left { position: static; }
  .why-stats { max-width: 560px; }
  .prod-grid, .product.flip .prod-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .sys-grid { grid-template-columns: minmax(0, 1fr); }
  .product.flip .prod-body, .product.flip .prod-view { order: 0; }
  .prod-view { max-width: 760px; }
  .acc-ext-grid { grid-template-columns: minmax(0, 1fr); }
  .acc-col-lead, .acc-tech { max-width: 72ch; }
  .open-intro { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .open-rules { max-width: 560px; }
}

@media (max-width: 900px) {
  .cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  :root { --nav-h: 62px; }
  .nav-clock { display: none; }
  .nav-cta { display: none; }
  .hero-hud .hud.bl, .hero-hud .hud.tr { display: none; }
  .hero-title { font-size: clamp(2.6rem, 11.8vw, 5.2rem); margin-bottom: clamp(1.6rem, 4vh, 3rem); }
  .hero-content { padding-bottom: 9vh; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 1.6rem; }
  .app-card, .app-card:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .app-card:nth-child(even) .app-shot { order: 0; }
  .app-body { max-width: none; }
  .prod-name { font-size: clamp(2.4rem, 12vw, 3.4rem); }
  .sys-kind { padding-left: 0; border-left: 0; flex-basis: 100%; }
  .sys-fig::after { display: block; }
  .frame-toggle { display: none; }
  .process-stage { grid-template-columns: 1fr; gap: 1.5rem; min-height: 0; }
  .stage-num { font-size: clamp(4.5rem, 18vw, 7rem); }
  .stage-body { min-height: 17rem; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .eng-specs { grid-template-columns: repeat(3, auto); justify-content: start; gap: 2rem; }
  .menu-links a { font-size: clamp(1.6rem, 7vw, 2.6rem); }
}

@media (max-width: 600px) {
  .layer-tag { display: none; }
  .eng-stack { height: clamp(300px, 84vw, 400px); }
  .layer-face { width: clamp(170px, 46vw, 230px); height: clamp(170px, 46vw, 230px); }
  .eng-stack .layer:nth-child(1) { transform: translateY(-19vw); }
  .eng-stack .layer:nth-child(2) { transform: translateY(-9.5vw); }
  .eng-stack .layer:nth-child(4) { transform: translateY(9.5vw); }
  .eng-stack .layer:nth-child(5) { transform: translateY(19vw); }
}

@media (max-width: 560px) {
  .btn { padding: 15px 24px; font-size: 0.88rem; width: 100%; }
  .hero-ctas { width: 100%; flex-direction: column; }
  .hero-sub { font-size: 0.95rem; }
  .build-row a { gap: 0.9rem; }
  .b-name { font-size: 1.15rem; }
  .why-stats { grid-template-columns: 1fr 1fr; }
  .w-val { font-size: 2.2rem; }
  .why-row { grid-template-columns: 3rem 1fr; gap: 1rem; }
  .prod-stats { gap: 1.2rem 1.8rem; }
  .prod-name { font-size: clamp(2rem, 10.5vw, 3rem); }
  .prod-meta { gap: 8px; }
  .prod-cat { padding-left: 0; border-left: 0; flex-basis: 100%; }
  .frame-url { font-size: 0.55rem; }
  .cta-actions { flex-direction: column; align-items: flex-start; }
  .btn-ink { width: auto; }
  .footer-cols { grid-template-columns: 1fr; gap: 1.8rem; }
  .footer-bar { flex-direction: column; gap: 0.5rem; }
  .eng-specs { grid-template-columns: 1fr 1fr; }
  .services-hint { display: none; }
  .conn-list { grid-template-columns: minmax(0, 1fr); }
  .app-flow { grid-template-columns: minmax(0, 1fr); }
  .app-flow li { flex-direction: row; align-items: baseline; gap: 0.7rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .app-flow li:last-child { border-bottom: 0; }
  .app-flow li::after { display: none; }
  .cap-grid { grid-template-columns: minmax(0, 1fr); }
  .open-notes div { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .pipe li { flex-basis: 25%; border-bottom: 1px solid var(--line); }
  .open-ctas { flex-direction: column; align-items: flex-start; }
  .open-ctas .prod-cta { margin-top: 1.4rem; }
}

/* The phones are drawn at a fixed device size; on the narrowest screens the
   whole device scales down instead of overflowing the card. */
@media (max-width: 420px) {
  .phone { --phone-scale: 0.66; }
}
@media (max-width: 350px) {
  .phone { --phone-scale: 0.6; }
}

/* ============ MOBILE: services fallback (no pin) ============ */
@media (max-width: 900px) {
  .services-pin { min-height: 0; }
  .services-track {
    width: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    /* The snapport is the padding box, so a `start`-aligned card snaps to the
       container edge and swallows padding-inline — the first card ends up
       flush with the screen. scroll-padding insets the snapport to match. */
    scroll-padding-inline: var(--pad);
    padding-bottom: 1.5rem;
  }
  .services-track::-webkit-scrollbar { height: 3px; }
  .services-track::-webkit-scrollbar-thumb { background: var(--accent); }
  .services-track::-webkit-scrollbar-track { background: var(--line); }
  .module { scroll-snap-align: start; flex: none; width: min(78vw, 340px); min-height: 0; }
  /* On a tall desktop card the figure floats to the top and the copy sits on
     the floor; at phone width that same rule leaves a dead band mid-card. */
  .m-fig { margin-bottom: 1.4rem; }
  .module h3 { margin-top: 0; }
  .module header { margin-bottom: 1.4rem; }
  .services-ghost { display: none; }
  .services-end { display: none; }
}

/* ============ MOBILE: process fallback (no pin) ============ */
@media (max-width: 820px) {
  .process-pin { min-height: 0; display: block; }
  .process-rail { display: none; }
  .stage-num-wrap { display: none; }
  .stage-body { min-height: 0; }
  .stage-item {
    position: static;
    opacity: 1; visibility: visible;
    padding-block: 2rem;
    border-top: 1px solid rgba(244,244,246,0.14);
  }
  .stage-item::before {
    content: "0" counter(stage);
  }
  .stage-item { counter-increment: stage; }
  .stage-item::before {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    display: block;
    margin-bottom: 0.8rem;
  }
  .stage-body { counter-reset: stage; }
}

/* ============ SHORT VIEWPORTS (small laptops, landscape tablets) ============ */
@media (min-width: 901px) and (max-height: 820px) {
  .services-pin { padding-block: 1.5rem; }
  .services-head { margin-bottom: 1.6rem; }
  .services-head .section-tag { margin-bottom: 0.9rem; }
  .services-head .section-title { font-size: clamp(1.9rem, 3.4vw, 3rem); }
  .module { min-height: min(64vh, 480px); padding: 1.4rem; }
  .module h3 { margin-top: 1.2rem; font-size: 1.3rem; }
  .module p { font-size: 0.84rem; margin-bottom: 1rem; }
  .m-fig { width: clamp(60px, 9vh, 96px); }
}

@media (min-width: 821px) and (max-height: 780px) {
  .process-pin { padding-block: 1.5rem; }
  .process-head { margin-bottom: 1.2rem; }
  .process-head .section-tag { margin-bottom: 0.9rem; }
  .process-head .section-title { font-size: clamp(1.9rem, 3.4vw, 3rem); }
  .process-rail { margin-bottom: 1.6rem; }
  .process-stage { min-height: 0; align-items: center; }
  .stage-num { font-size: clamp(5rem, 24vh, 10rem); }
  .stage-body { min-height: 13rem; }
  .stage-item h3 { font-size: clamp(1.5rem, 3.4vh, 2.2rem); margin-bottom: 0.7rem; }
  .stage-item p { margin-bottom: 1rem; }
  .stage-diagram svg { max-width: min(320px, 40vh); }
}

/* ============ SHORT DESKTOP WINDOWS (scaled laptops, split screens) ============ */
@media (min-width: 821px) and (max-height: 660px) {
  .hero-content { padding-top: calc(var(--nav-h) + 1vh); padding-bottom: 9vh; }
  .hero-eyebrow { margin-bottom: 0.9rem; }
  .hero-title { font-size: clamp(2.2rem, 11.5vh, 5.2rem); margin-bottom: 1.4rem; }
  .hero-sub { font-size: 0.9rem; }
  .hero-hud .hud.tl, .hero-hud .hud.tr { display: none; }
}

/* ============ LANDSCAPE PHONES ============ */
@media (max-height: 540px) and (orientation: landscape) {
  .hero-content {
    padding-top: calc(var(--nav-h) + 2vh);
    padding-bottom: 9vh;
  }
  .hero-eyebrow { margin-bottom: 0.8rem; }
  .hero-title { font-size: clamp(1.8rem, 12vh, 3.4rem); margin-bottom: 1.2rem; }
  .hero-foot { flex-direction: row; align-items: flex-end; gap: 1.5rem; }
  .hero-sub { font-size: 0.82rem; }
  .hero-ctas { flex-direction: row; width: auto; }
  .btn { width: auto; padding: 12px 20px; font-size: 0.85rem; }
  .hero-hud { display: none; }
  .manifesto-text { font-size: clamp(1.4rem, 6.5vh, 2.2rem); }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============ ENGINEERING: reduced motion ============
   The layers are spread apart by a scroll animation that never runs here, so
   they are set out statically at the same spacing instead of piling up. */
@media (prefers-reduced-motion: reduce) and (min-width: 601px) {
  .eng-stack .layer:nth-child(1) { transform: translateY(calc(-2 * clamp(64px, 8.2vw, 100px))); }
  .eng-stack .layer:nth-child(2) { transform: translateY(calc(-1 * clamp(64px, 8.2vw, 100px))); }
  .eng-stack .layer:nth-child(4) { transform: translateY(clamp(64px, 8.2vw, 100px)); }
  .eng-stack .layer:nth-child(5) { transform: translateY(calc(2 * clamp(64px, 8.2vw, 100px))); }
}

/* ============ PRODUCTS: reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  .prod-status .status-dot,
  .frame-live .status-dot { animation: none; }
  .product::before { display: none; }
}
