/* ATH/N — one stylesheet for the whole site.
   Light by default with a matching dark theme (html[data-theme="dark"]). White and near-white
   planes, one neutral grey scale, system type with tight display tracking, frosted glass for
   chrome, pill buttons. Colour appears only as small accents: the link blue, the brand's
   electric blue (the slash, status lights, progress), and status colours.

   Contents: 1 tokens · 2 base · 3 chrome · 4 hero · 5 sections · 6 home blocks
             7 inner pages · 8 forms · 9 cursor · 10 reveals · 11 small screens · 12 reduced motion
             13 site assistant */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --card-raised: #ffffff;
  --fill: #f2f2f4;
  --fill-2: #e8e8ed;

  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --hairline: #d2d2d7;
  --hairline-soft: #e8e8ed;

  --accent: #0066cc;            /* links and focus */
  --accent-wash: #0066cc14;
  --brand: #0b6bff;             /* electric blue: the slash, lights, progress */
  --brand-wash: #0b6bff14;
  --danger: #d70015;
  --ok: #1a9f5b;
  --warn: #b25e00;

  --primary-bg: #1d1d1f;
  --primary-fg: #ffffff;
  --primary-hover: #000000;

  --glass: #ffffffb8;
  --glass-strong: #ffffffe6;
  --glass-edge: #0000000f;
  --glass-blur: saturate(180%) blur(20px);

  --shadow-1: 0 1px 2px #0000000a, 0 4px 14px #0000000d;
  --shadow-2: 0 2px 8px #0000000f, 0 24px 60px -18px #00000033;

  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --t-hero: clamp(2.8rem, 1.6rem + 4.2vw, 5.6rem);
  --t-display: clamp(2.2rem, 1.5rem + 2.6vw, 3.6rem);
  --t-section: clamp(1.8rem, 1.3rem + 1.6vw, 2.8rem);
  --t-title: 1.3125rem;
  --t-body: 1.0625rem;
  --t-callout: .9375rem;
  --t-foot: .8125rem;
  --t-caption: .75rem;
  --track-display: -.028em;
  --track-title: -.015em;

  --r-card: 20px;
  --r-panel: 28px;
  --r-glass: 22px;
  --r-control: 12px;
  --r-pill: 999px;

  --ease-out: cubic-bezier(.25, .8, .25, 1);
  --ease-spring: cubic-bezier(.34, 1.35, .64, 1);
  --t-fast: 150ms;
  --t-med: 260ms;
  --t-slow: 560ms;

  --page: 1320px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --nav-h: 52px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #0f0f10;
  --card: #1c1c1e;
  --card-raised: #242426;
  --fill: #1c1c1e;
  --fill-2: #2c2c2e;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --hairline: #38383a;
  --hairline-soft: #242426;
  --accent: #2997ff;
  --accent-wash: #2997ff1f;
  --brand: #3b8eff;
  --brand-wash: #3b8eff24;
  --danger: #ff453a;
  --ok: #32d74b;
  --warn: #ffb340;
  --primary-bg: #f5f5f7;
  --primary-fg: #1d1d1f;
  --primary-hover: #ffffff;
  --glass: #161617b8;
  --glass-strong: #161617e6;
  --glass-edge: #ffffff14;
  --shadow-1: 0 1px 2px #0000004d, 0 4px 14px #00000059;
  --shadow-2: 0 2px 8px #00000066, 0 24px 60px -18px #000000b3;
  color-scheme: dark;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* the attribute always wins over component display rules */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 1.5rem); }
body {
  margin: 0;
  font: 400 var(--t-body)/1.5 var(--font-ui);
  letter-spacing: -.01em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  transition: background-color var(--t-med), color var(--t-med);
}
img, video, canvas, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }

h1, h2, h3, h4 { margin: 0; color: var(--text); font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--t-display); line-height: 1.06; letter-spacing: var(--track-display); }
h2 { font-size: var(--t-section); line-height: 1.1; letter-spacing: var(--track-display); }
h3 { font-size: var(--t-title); line-height: 1.2; letter-spacing: var(--track-title); }
p { margin: 0; color: var(--text-2); text-wrap: pretty; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: .5rem; left: .5rem; z-index: 200; padding: .6rem 1rem; border-radius: var(--r-pill); background: var(--primary-bg); color: var(--primary-fg); transform: translateY(-200%); }
.skip:focus { transform: none; }

/* Buttons: pills. Primary is filled, secondary is outlined, quiet is link-coloured text. */
.button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 48px; padding: 0 1.5rem;
  border: 0; border-radius: var(--r-pill);
  background: var(--fill); color: var(--text);
  font-size: var(--t-callout); font-weight: 500; text-decoration: none; white-space: nowrap;
  cursor: pointer; -webkit-user-select: none; user-select: none; touch-action: manipulation;
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast) var(--ease-out), translate 380ms var(--ease-spring);
}
.button:hover { background: var(--fill-2); text-decoration: none; }
.button:active { transform: scale(.97); }
.button:disabled, .button[aria-disabled="true"] { opacity: .45; cursor: default; transform: none; }
.button.primary { background: var(--primary-bg); color: var(--primary-fg); }
.button.primary:hover { background: var(--primary-hover); }
.button.secondary { background: transparent; box-shadow: inset 0 0 0 1px var(--hairline); }
.button.secondary:hover { background: var(--fill); }
.button.quiet { min-height: 40px; padding: 0 .7rem; background: transparent; color: var(--accent); }
.button.quiet:hover { background: var(--accent-wash); }
.button.small { min-height: 36px; padding: 0 1rem; font-size: var(--t-foot); }

kbd { display: inline-grid; place-items: center; min-width: 1.6em; padding: .1em .45em; border-radius: 6px; background: var(--fill-2); color: var(--text-2); font: 600 var(--t-caption)/1.4 var(--font-ui); }

/* ---------- 3. Chrome ---------- */
.globalnav {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  height: var(--nav-h); padding: 0 max(1rem, calc((100% - var(--page)) / 2 + var(--gutter) - .6rem));
  background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med), box-shadow var(--t-med), background-color var(--t-med);
}
.globalnav.scrolled { border-bottom-color: var(--hairline-soft); box-shadow: 0 6px 20px -16px #0000004d; }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: .55rem; min-height: 36px; padding: 0 .5rem 0 .2rem; color: var(--text); font: 600 1.0625rem/1 var(--font-display); letter-spacing: -.022em; border-radius: 10px; transition: opacity var(--t-fast); }
.brand:hover { opacity: .75; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 6.1px; }
:root[data-theme="dark"] .brand-mark { box-shadow: 0 0 0 1px #ffffff24; }
.slash { color: var(--brand); margin: 0 .04em; }

.sections { display: flex; align-items: center; gap: .15rem; }
.nav-link {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  height: 34px; padding: 0 .85rem; border-radius: var(--r-pill);
  color: var(--text-2); font-size: var(--t-foot); font-weight: 500; white-space: nowrap;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.nav-link svg { display: none; width: 22px; height: 22px; }
.nav-link:hover { background: var(--fill); color: var(--text); text-decoration: none; }
.nav-link[aria-current="page"] { color: var(--text); background: var(--fill); font-weight: 600; }

.nav-actions { justify-self: end; display: flex; align-items: center; gap: .35rem; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); cursor: pointer; transition: background-color var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.icon-button svg { width: 19px; height: 19px; }
.icon-button:hover, .icon-button[aria-expanded="true"] { background: var(--fill); color: var(--text); }
.icon-button:active { transform: scale(.94); }

/* Appearance popover */
.popover {
  position: fixed; z-index: 60; top: calc(var(--nav-h) + 8px); right: max(1rem, calc((100% - var(--page)) / 2 + var(--gutter) - .6rem));
  width: 288px; padding: 1rem; display: grid; gap: .9rem;
  background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge); border-radius: 18px; box-shadow: var(--shadow-2);
  transform-origin: top right; animation: pop var(--t-med) var(--ease-spring);
}
.popover[hidden] { display: none; }
.popover h2 { font-size: var(--t-foot); font-weight: 600; letter-spacing: 0; color: var(--text-2); }
.segmented { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); padding: 2px; border-radius: var(--r-pill); background: var(--fill); }
:root[data-theme="dark"] .segmented { background: var(--fill-2); }
.segmented button { position: relative; z-index: 1; height: 32px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-2); font-size: var(--t-foot); font-weight: 600; cursor: pointer; transition: color var(--t-med); }
.segmented button[aria-pressed="true"] { color: var(--text); }
.segmented .thumb { position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / 3); border-radius: var(--r-pill); background: var(--card-raised); box-shadow: 0 1px 3px #0000001f, 0 0 0 .5px #0000000a; transition: transform var(--t-med) var(--ease-spring); }
:root[data-theme="dark"] .segmented .thumb { background: #48484a; }
.segmented[data-value="dark"] .thumb { transform: translateX(100%); }
.segmented[data-value="system"] .thumb { transform: translateX(200%); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: var(--t-callout); color: var(--text); }
.switch-row small { display: block; font-size: var(--t-caption); color: var(--text-3); }
.switch { position: relative; flex: none; width: 51px; height: 31px; border: 0; border-radius: var(--r-pill); background: var(--fill-2); cursor: pointer; transition: background-color var(--t-med); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px #00000033; transition: transform var(--t-med) var(--ease-spring); }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* Command palette */
.backdrop { position: fixed; inset: 0; z-index: 100; display: grid; justify-items: center; align-items: start; padding: 14vh 1rem 1rem; background: #00000033; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade var(--t-med) var(--ease-out); }
:root[data-theme="dark"] .backdrop { background: #00000080; }
.backdrop[hidden] { display: none; }
.palette { width: min(100%, 620px); padding: .5rem; background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-edge); border-radius: 18px; box-shadow: var(--shadow-2); animation: rise var(--t-slow) var(--ease-spring); }
.palette-field { position: relative; display: flex; align-items: center; }
.palette-field svg { position: absolute; left: 1rem; width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.palette .palette-field input, .palette .palette-field input:focus { width: 100%; min-height: 52px; padding: 0 1rem 0 2.8rem; border: 0; outline: 0; box-shadow: none; background: transparent; font-size: 1.2rem; }
.palette-field input::placeholder { color: var(--text-3); }
.command-list { display: grid; gap: 2px; max-height: min(52vh, 420px); overflow: auto; padding: .35rem 0 .1rem; border-top: 1px solid var(--hairline-soft); }
.command-list [role="option"] { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; padding: 0 .9rem; border-radius: 10px; font-size: var(--t-callout); font-weight: 500; color: var(--text); cursor: pointer; }
.command-list [role="option"] span { font-size: var(--t-foot); font-weight: 400; color: var(--text-3); }
.command-list [role="option"][aria-selected="true"] { background: var(--accent); color: #fff; }
.command-list [role="option"][aria-selected="true"] span { color: #ffffffb3; }
.command-list p { padding: 1rem; font-size: var(--t-callout); }

/* Footer */
.footer { background: var(--bg-alt); padding: clamp(2.5rem, 5vw, 4rem) 0 2rem; font-size: var(--t-foot); color: var(--text-2); }
.footer-inner { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--hairline); }
.footer-brand { display: grid; gap: .7rem; align-content: start; justify-items: start; }
.footer-brand p { max-width: 30ch; font-size: var(--t-foot); }
.footer h2 { margin-bottom: .7rem; font-size: var(--t-foot); font-weight: 600; letter-spacing: 0; color: var(--text); }
.footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--text); }
.footer-bottom { padding-top: 1.2rem; font-size: var(--t-caption); color: var(--text-3); }

/* ---------- 4. Hero ---------- */
.hero { position: relative; overflow: clip; }
.hero-block { display: grid; justify-items: center; gap: 1.1rem; padding: clamp(3.5rem, 8vw, 6.5rem) 1.5rem 0; text-align: center; }
.eyebrow { font-size: var(--t-callout); font-weight: 600; color: var(--text-2); }
.hero-block h1 { font-size: var(--t-hero); line-height: 1.04; max-width: 14ch; }
.hero-block .lede { font-size: clamp(1.1rem, 1rem + .4vw, 1.35rem); line-height: 1.4; max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: .6rem; }

/* The studio: the build section is always dark, whatever the page theme. */
.build, html.nav-dark .globalnav, html.nav-dark .sections {
  --bg: #000000; --bg-alt: #0f0f10; --card: #1c1c1e; --card-raised: #242426; --fill: #1c1c1e; --fill-2: #2c2c2e;
  --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #6e6e73; --hairline: #38383a; --hairline-soft: #242426;
  --accent: #2997ff; --accent-wash: #2997ff1f; --brand: #3b8eff;
  --primary-bg: #f5f5f7; --primary-fg: #1d1d1f; --primary-hover: #ffffff;
  --glass: #161617b8; --glass-strong: #161617e6; --glass-edge: #ffffff14;
  --shadow-1: 0 1px 2px #0000004d, 0 4px 14px #00000059; --shadow-2: 0 2px 8px #00000066, 0 24px 60px -18px #000000b3;
  color-scheme: dark;
}
.build { background: #000; color: var(--text); }
html.nav-dark .globalnav { color: var(--text); }
html.nav-dark .globalnav.scrolled { border-bottom-color: transparent; box-shadow: none; }

/* The build: by default (no script, no WebGL, reduced motion) a still of the finished system under the
   headline; when motion is allowed the section grows tall and its view pins while the system assembles. */
.build-sticky { position: relative; display: flex; flex-direction: column; }
.build .hero-block { order: 1; }
.build .hero-3d { order: 2; position: relative; height: clamp(400px, 60vh, 700px); background: #000 url("/assets/images/device-poster.webp") center / contain no-repeat; }
@media (max-width: 449px) { .build .hero-3d { background-image: url("/assets/images/device-poster-compact.webp"); } }
.hero-3d canvas { width: 100%; height: 100%; opacity: 0; transition: opacity 700ms var(--ease-out); touch-action: pan-y; }
.hero-3d.live { background-image: none; }
.hero-3d.live canvas { opacity: 1; }
.build-hud, .build-hint { display: none; }


.reveals .build:not(.no-webgl) { height: 620vh; }
.reveals .build:not(.no-webgl) .build-sticky { position: sticky; top: 0; display: block; height: 100vh; height: 100svh; overflow: hidden; }
.reveals .build:not(.no-webgl) .hero-3d { position: absolute; inset: 0; height: auto; background-image: none; }
.reveals .build:not(.no-webgl) .hero-block {
  position: absolute; z-index: 2; left: 0; right: 0; top: calc(var(--nav-h) * .2 + clamp(1.5rem, 7vh, 5rem));
  opacity: var(--intro, 1); translate: 0 calc((1 - var(--intro, 1)) * -36px);
}
.reveals .build.past-intro .hero-block { visibility: hidden; }
.reveals .build.past-intro .hero-block:focus-within { visibility: visible; opacity: 1; }
.reveals .build:not(.no-webgl) .build-hud { display: block; position: absolute; z-index: 3; inset: 0; pointer-events: none; }

.build-rail {
  position: absolute; top: calc(var(--nav-h) + clamp(.6rem, 2vh, 1.2rem)); left: 50%; translate: -50% 0;
  display: flex; gap: .45rem; margin: 0; padding: .55rem .9rem .6rem; list-style: none;
  border-radius: var(--r-pill); background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-1); opacity: var(--hud, 0); transition: opacity var(--t-med);
}
.build-rail li { display: grid; gap: .35rem; width: clamp(64px, 9vw, 112px); font-size: var(--t-caption); font-weight: 600; color: var(--text-3); transition: color var(--t-med); }
.build-rail li.on, .build-rail li.done { color: var(--text); }
.build-rail i { position: relative; height: 3px; border-radius: 3px; background: var(--fill-2); overflow: hidden; }
.build-rail i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--brand); transform-origin: left; transform: scaleX(var(--f, 0)); }
.build-skip { position: absolute; top: calc(var(--nav-h) + clamp(.6rem, 2vh, 1.2rem)); right: max(1rem, calc((100% - var(--page)) / 2 + var(--gutter) - .6rem)); margin-top: .35rem; pointer-events: auto; opacity: var(--hud, 0); }
.build.is-done .build-skip, .build:not(.past-intro) .build-skip { visibility: hidden; }

.build-captions { position: absolute; left: 0; right: 0; bottom: clamp(1.8rem, 7vh, 4.5rem); display: grid; padding: 0 var(--gutter); }
.build-captions::before { content: ""; position: absolute; inset: -40% -10% -30%; z-index: -1; background: radial-gradient(closest-side, color-mix(in srgb, var(--bg) 82%, transparent), transparent); opacity: var(--hud, 0); }
/* One caption at a time: the outgoing one leaves quickly, then the next one arrives. */
.build-caption { grid-area: 1 / 1; align-self: end; display: grid; justify-items: center; gap: .45rem; text-align: center; opacity: 0; translate: 0 12px; visibility: hidden; transition: opacity 180ms ease-in, translate 180ms ease-in, visibility 0s 180ms; }
.build-caption.on { opacity: 1; translate: 0 0; visibility: visible; transition: opacity 500ms var(--ease-out) 200ms, translate 650ms var(--ease-out) 200ms, visibility 0s; }
.build-caption h2 { font-size: clamp(1.9rem, 1.3rem + 1.8vw, 2.8rem); }
.build-caption p { max-width: 34rem; font-size: var(--t-body); }
.build-kicker { font-size: var(--t-foot) !important; font-weight: 600; color: var(--brand) !important; }
.build-caption.final { gap: .7rem; }
.build-caption.final h2 { font-size: var(--t-display); }
.build-caption.final.on { pointer-events: auto; }
.build-caption.final .hero-actions { margin-top: .2rem; }

.reveals .build:not(.no-webgl) .build-hint {
  display: grid; justify-items: center; gap: .6rem; position: absolute; z-index: 2; left: 50%; bottom: clamp(1.4rem, 5vh, 3rem); translate: -50% 0;
  margin: 0; font-size: var(--t-foot); font-weight: 500; color: var(--text-3); opacity: var(--hint, 1);
}
.build-hint span { width: 1.5px; height: 30px; border-radius: 2px; background: linear-gradient(var(--text-3), transparent); transform-origin: top; animation: hint 1.8s var(--ease-out) infinite; }
@keyframes hint { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
/* Callouts pinned to the device's layers (positioned by the scene). */
.build-labels { display: none; }
.reveals .build:not(.no-webgl) .build-labels { display: block; position: absolute; z-index: 2; inset: 0; pointer-events: none; overflow: hidden; }
.build-label { position: absolute; left: 0; top: 0; opacity: 0; visibility: hidden; will-change: transform, opacity; transition: opacity 250ms var(--ease-out); }
.build-label-in { display: flex; align-items: center; gap: .65rem; translate: -4px -50%; }
.build-label i { position: relative; flex: none; width: 64px; height: 1px; background: linear-gradient(90deg, var(--text-2), color-mix(in srgb, var(--text-2) 30%, transparent)); }
.build-label i::before { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #000; box-shadow: 0 0 0 1.5px var(--text-2); transition: background-color var(--t-med), box-shadow var(--t-med); }
.build-label span { display: grid; gap: .1rem; white-space: nowrap; }
.build-label strong { font: 600 var(--t-callout)/1.2 var(--font-display); color: var(--text); }
.build-label small { font-size: var(--t-caption); color: var(--text-2); }
.build-label.active i::before { background: var(--brand); box-shadow: 0 0 0 1.5px var(--brand), 0 0 14px 2px color-mix(in srgb, var(--brand) 60%, transparent); }
.build-label.active strong { color: #fff; }
.build-label.flip .build-label-in { flex-direction: row-reverse; translate: calc(-100% + 4px) -50%; text-align: right; }
.build-label.flip i { background: linear-gradient(270deg, var(--text-2), color-mix(in srgb, var(--text-2) 30%, transparent)); }
.build-label.flip i::before { left: auto; right: 0; margin: -4px -4px 0 0; }

/* While the system builds (and, on phones, while its final buttons are on screen) the chat button steps aside. */
.is-building .chat-launcher { opacity: 0; pointer-events: none; }
/* On phones the story fills the screen, so the chat button waits until you've scrolled past it. */
@media (max-width: 760px) { .is-build-view .chat-launcher { opacity: 0; pointer-events: none; } }

/* Three plain outcomes under the hero */
.outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter); }
.outcome { display: grid; gap: .35rem; align-content: start; padding: 0 clamp(1rem, 3vw, 2.2rem); text-align: center; }
.outcome + .outcome { border-left: 1px solid var(--hairline-soft); }
.outcome strong { font: 600 var(--t-title)/1.2 var(--font-display); letter-spacing: var(--track-title); color: var(--text); }
.outcome span { font-size: var(--t-callout); color: var(--text-2); }

/* ---------- 5. Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; background: var(--bg); transition: background-color var(--t-med); }
.section.alt { background: var(--bg-alt); }
.section-inner { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.section-inner.narrow { max-width: 1040px; }
.section-head { display: grid; justify-items: center; gap: .7rem; margin-bottom: clamp(2rem, 4vw, 3.2rem); text-align: center; }
.section-head p { font-size: var(--t-body); max-width: 40rem; }
.center-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: clamp(1.8rem, 3vw, 2.6rem); }

/* Cards lift on hover; tilt and glare come from the cursor script (--rx/--ry/--gx/--gy). */
.card { border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow-1); }
[data-tilt] { --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%; position: relative; transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform 520ms var(--ease-spring), box-shadow var(--t-med), background-color var(--t-med); }
[data-tilt]:hover { box-shadow: var(--shadow-2); }
[data-tilt].tilting { transition: transform 90ms linear, box-shadow var(--t-med); }
[data-tilt]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; background: radial-gradient(420px circle at var(--gx) var(--gy), #ffffff66, transparent 45%); transition: opacity var(--t-med); }
:root[data-theme="dark"] [data-tilt]::after { background: radial-gradient(420px circle at var(--gx) var(--gy), #ffffff14, transparent 45%); }
[data-tilt].tilting::after { opacity: 1; }

/* ---------- 6. Home blocks ---------- */
/* Solutions: four cards of two sizes, each with its own small drawing */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.2rem; }
.solution { display: grid; grid-template-rows: auto 1fr; overflow: hidden; color: inherit; text-align: left; }
.solution:hover { text-decoration: none; }
.solution.wide { grid-column: span 4; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-rows: auto; align-items: stretch; }
.solution.tall { grid-column: span 2; }
.solution .copy { display: grid; gap: .55rem; align-content: start; padding: clamp(1.4rem, 2.4vw, 2.1rem); }
.solution.wide .copy { align-content: center; }
.solution .copy p { font-size: var(--t-callout); line-height: 1.5; }
.solution .more { margin-top: .4rem; font-size: var(--t-callout); font-weight: 500; color: var(--accent); }
.solution .art { position: relative; min-height: 190px; display: grid; place-items: center; padding: 1.4rem; background: var(--fill); overflow: hidden; }
:root[data-theme="dark"] .solution .art { background: var(--card-raised); }
.solution.tall .art { order: -1; }
.art svg { width: min(100%, 300px); height: auto; overflow: visible; }
.solution.wide .art svg { width: min(100%, 400px); }
.art .ln { fill: none; stroke: var(--text-3); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.art .ln.soft { stroke: var(--hairline); }
.art .sf { fill: var(--card); stroke: var(--hairline); stroke-width: 1; }
.art .sf.deep { fill: var(--fill-2); }
.art .ink { fill: var(--text); }
.art .mut { fill: var(--text-3); }
.art .acc { fill: var(--brand); }
.art .acc-ln { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; }
.art .okc { fill: var(--ok); }
.art .flow { stroke-dasharray: 5 7; }
.solution:hover .art .flow, .feature-art:hover .flow { animation: dash 1.6s linear infinite; }
.art .slide { transition: transform 700ms var(--ease-spring); }
.solution:hover .art .slide.a, .feature-art:hover .slide.a { transform: translateY(-6px); }
.solution:hover .art .slide.b, .feature-art:hover .slide.b { transform: translateY(-3px); }
.solution:hover .art .spin, .feature-art:hover .spin { transform: rotate(90deg); }
.art .spin { transform-box: fill-box; transform-origin: center; transition: transform 900ms var(--ease-spring); }

/* The film */
.film { position: relative; overflow: hidden; border-radius: var(--r-panel); background: #000; box-shadow: var(--shadow-2); aspect-ratio: 16 / 9; }
.film video { width: 100%; height: 100%; object-fit: cover; }
.film-note { margin-top: 1rem; text-align: center; font-size: var(--t-foot); color: var(--text-3); }

/* Selected work: wide panels, text beside a schematic */
.work-list { display: grid; gap: 1.4rem; }
.work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: stretch; overflow: hidden; border-radius: var(--r-panel); }
.work:nth-child(even) .work-copy { order: 2; }
.work-copy { display: grid; gap: .8rem; align-content: center; padding: clamp(1.6rem, 4vw, 3.4rem); }
.work-copy h3 { font-size: clamp(1.45rem, 1.1rem + 1vw, 2rem); letter-spacing: var(--track-display); line-height: 1.12; }
.work-copy p { max-width: 34rem; }
.tag { justify-self: start; display: inline-flex; align-items: center; gap: .45rem; padding: .28rem .75rem; border-radius: var(--r-pill); background: var(--fill); font-size: var(--t-foot); font-weight: 500; color: var(--text-2); }
.work-art { position: relative; display: grid; place-items: center; min-height: 320px; padding: clamp(1.4rem, 3vw, 2.6rem); background: var(--fill); }
:root[data-theme="dark"] .work-art { background: var(--card-raised); }

/* Schematic 1: an operations board */
.board { width: min(100%, 420px); display: grid; gap: .8rem; padding: 1rem; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-1); }
.board-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; font-size: var(--t-caption); font-weight: 600; color: var(--text-2); }
.status { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.status.warn::before { background: var(--warn); }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; gap: 5px; height: 110px; padding-top: .4rem; }
.bars i { display: block; height: calc(var(--h) * 1%); border-radius: 4px 4px 2px 2px; background: var(--fill-2); transform-origin: bottom; }
.bars i.now { background: var(--brand); }
.board-rows { display: grid; gap: .45rem; }
.board-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; padding: .5rem .65rem; border-radius: 10px; background: var(--fill); font-size: var(--t-caption); color: var(--text-2); }
.board-row b { font-weight: 600; color: var(--text); }
.board-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.board-row .dot.warn { background: var(--warn); }
.reveals [data-reveal] .bars i { transform: scaleY(.08); transition: transform 900ms var(--ease-spring); transition-delay: calc(240ms + var(--n) * 45ms); }
.reveals [data-reveal].in .bars i { transform: none; }

/* Schematic 2 and 3 are inline drawings */
.work-art svg { width: min(100%, 440px); height: auto; overflow: visible; }
.art text { font: 600 13px var(--font-ui); fill: var(--text); letter-spacing: 0; }
.art text.quiet { font-weight: 500; font-size: 12px; fill: var(--text-3); }
.reveals [data-reveal] .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1400ms var(--ease-out) 300ms; }   /* paths carry pathLength="1" */
.reveals [data-reveal].in .draw { stroke-dashoffset: 0; }

/* How it works: four steps on a line that fills as you read */
.steps { --p: 0; position: relative; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.4rem); }
.steps::before, .steps::after { content: ""; position: absolute; left: 0; right: 0; top: 18px; height: 2px; border-radius: 2px; background: var(--hairline-soft); }
.steps::after { background: var(--brand); transform-origin: left; transform: scaleX(var(--p)); }
.step { position: relative; z-index: 1; display: grid; gap: .5rem; align-content: start; }
.step-n { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: .7rem; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--hairline-soft); font: 600 var(--t-callout)/1 var(--font-display); color: var(--text-3); transition: background-color var(--t-med), color var(--t-med), box-shadow var(--t-med), transform var(--t-med) var(--ease-spring); }
.section.alt .step-n { background: var(--bg-alt); }
.step.done .step-n { background: var(--brand); box-shadow: none; color: #fff; transform: scale(1.06); }
.step p { font-size: var(--t-callout); }

/* What you can bring us: a small living arrangement of topics */
.constellation { position: relative; max-width: 920px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: .55rem; padding: .55rem 1.05rem .55rem .8rem; border-radius: var(--r-pill); background: var(--card); box-shadow: var(--shadow-1); font-size: var(--t-callout); font-weight: 500; color: var(--text); }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hairline); flex: none; transition: background-color var(--t-med); }
.chip:hover::before, .chip.dragging::before { background: var(--brand); }
.constellation.live { display: block; }
.constellation.live .chip { position: absolute; left: 0; top: 0; will-change: transform; cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; transition: box-shadow var(--t-med), scale var(--t-med) var(--ease-spring); }
.constellation.live .chip:hover { box-shadow: var(--shadow-2); }
.constellation .chip.dragging { cursor: grabbing; z-index: 2; scale: 1.06; box-shadow: var(--shadow-2); }
.hint { margin-top: 1.4rem; text-align: center; font-size: var(--t-foot); color: var(--text-3); }

/* Closing invitation */
.cta { display: grid; justify-items: center; gap: 1rem; text-align: center; }
.cta h2 { font-size: var(--t-display); max-width: 16ch; }
.cta p { max-width: 36rem; }
.cta .button { margin-top: .8rem; }

/* ---------- 7. Inner pages ---------- */
.page-head { display: grid; justify-items: center; gap: 1rem; padding: clamp(3.5rem, 8vw, 6rem) var(--gutter) clamp(2.5rem, 5vw, 4rem); text-align: center; }
.page-head h1 { max-width: 18ch; }
.page-head .lede { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.4; max-width: 40rem; }
.jump { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: .4rem; }
.jump a { padding: .4rem .95rem; border-radius: var(--r-pill); background: var(--fill); font-size: var(--t-foot); font-weight: 500; color: var(--text-2); transition: background-color var(--t-fast), color var(--t-fast); }
.jump a:hover { background: var(--fill-2); color: var(--text); text-decoration: none; }

/* Solutions page: one solution per row, drawing on alternating sides */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 6vw, 5.5rem); }
.feature + .feature { margin-top: clamp(3.5rem, 7vw, 6rem); }
.feature:nth-child(even) .feature-copy { order: 2; }
.feature-copy { display: grid; gap: .9rem; align-content: start; }
.feature-copy h2 { font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.5rem); }
.checks { margin: .4rem 0 0; padding: 0; list-style: none; display: grid; gap: .6rem; }
.checks li { position: relative; padding-left: 1.7rem; font-size: var(--t-callout); color: var(--text); }
.checks li::before { content: ""; position: absolute; left: 0; top: .28em; width: 16px; height: 16px; border-radius: 50%; background: var(--brand-wash); }
.checks li::after { content: ""; position: absolute; left: 5px; top: calc(.28em + 4px); width: 6px; height: 3.5px; border-left: 1.8px solid var(--brand); border-bottom: 1.8px solid var(--brand); transform: rotate(-45deg); }
.feature-art { display: grid; place-items: center; min-height: clamp(260px, 30vw, 400px); padding: 2rem; border-radius: var(--r-panel); background: var(--bg-alt); }
.section.alt .feature-art { background: var(--card); box-shadow: var(--shadow-1); }
.feature-art.art svg { width: min(100%, 380px); }

/* Ways to engage / principles: quiet columns, no boxes */
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(1.4rem, 3vw, 2.6rem); }
.column { display: grid; gap: .5rem; align-content: start; padding-top: 1.1rem; border-top: 1px solid var(--hairline); }
.column p { font-size: var(--t-callout); }
.column a { font-size: var(--t-callout); font-weight: 500; }

/* About: large statements */
.statements { display: grid; gap: 0; max-width: 980px; margin: 0 auto; }
.statement { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(1rem, 4vw, 3rem); align-items: baseline; padding: clamp(1.6rem, 3vw, 2.4rem) 0; border-top: 1px solid var(--hairline); }
.statement:last-child { border-bottom: 1px solid var(--hairline); }
.statement h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); letter-spacing: var(--track-display); }
.name-line { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem clamp(.8rem, 2.5vw, 2rem); font: 600 clamp(1.5rem, 1rem + 2.4vw, 3rem)/1.15 var(--font-display); letter-spacing: var(--track-display); color: var(--text-3); }
.name-line b { font-weight: 600; color: var(--text); }
.name-line .slash { margin: 0; }

/* Legal documents */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--gutter) clamp(3.5rem, 7vw, 6rem); }
.doc h1 { margin-bottom: .6rem; }
.doc .meta { margin-bottom: 2.4rem; font-size: var(--t-callout); color: var(--text-3); }
.doc h2 { margin: 2.6rem 0 .8rem; font-size: var(--t-title); line-height: 1.25; letter-spacing: var(--track-title); }
.doc p { margin: 0 0 .9rem; color: var(--text-2); max-width: 68ch; }
.doc ul { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--text-2); display: grid; gap: .35rem; }
.doc strong { color: var(--text); font-weight: 600; }

/* Not found */
.notfound { min-height: calc(100svh - var(--nav-h) - 280px); display: grid; place-content: center; justify-items: center; gap: 1rem; padding: 4rem var(--gutter); text-align: center; }
.notfound .code { font: 600 var(--t-callout)/1 var(--font-display); color: var(--text-3); }

/* ---------- 8. Forms ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; max-width: 1180px; margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) var(--gutter) clamp(3.5rem, 7vw, 6rem); }
.contact-intro { position: sticky; top: calc(var(--nav-h) + 2rem); display: grid; gap: 1.1rem; }
.contact-intro .lede { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.45; }
.next-steps { margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 1rem; }
.next-steps li { counter-increment: step; display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start; font-size: var(--t-callout); color: var(--text-2); }
.next-steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--fill); font: 600 var(--t-foot)/1 var(--font-display); color: var(--text); }
.next-steps b { display: block; font-weight: 600; color: var(--text); }

.form-card { padding: clamp(1.4rem, 3vw, 2.4rem); border-radius: var(--r-panel); background: var(--card); box-shadow: var(--shadow-2); transition: opacity var(--t-med); }
:root:not([data-theme="dark"]) .form-card { box-shadow: var(--shadow-1), 0 0 0 1px var(--hairline-soft); }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset + fieldset { margin-top: 1.8rem; padding-top: 1.6rem; border-top: 1px solid var(--hairline-soft); }
legend { float: left; width: 100%; padding: 0; margin-bottom: .2rem; font: 600 var(--t-title)/1.2 var(--font-display); letter-spacing: var(--track-title); color: var(--text); }
legend + * { clear: both; }   /* a floated legend sits inside the fieldset instead of on its top line */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.field { display: flow-root; }
.field label, .doc-form label.block { display: block; margin: 1.1rem 0 .45rem; font-size: var(--t-foot); font-weight: 600; color: var(--text-2); }
.field .optional { font-weight: 400; color: var(--text-3); }
input[type="text"], input[type="email"], textarea, select {
  width: 100%; min-height: 46px; padding: .65rem .9rem;
  border: 1px solid var(--hairline); border-radius: var(--r-control);
  background: var(--card); color: var(--text);
  -webkit-appearance: none; appearance: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-med);
}
:root[data-theme="dark"] :is(input[type="text"], input[type="email"], textarea, select) { background: var(--fill-2); border-color: transparent; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
:is(input, textarea, select)[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 12%, transparent); }
:is(input, textarea, select):disabled { opacity: .6; cursor: not-allowed; }
textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
select { padding-right: 2.4rem; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2386868b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .95rem center; }
select:invalid, select.placeholder { color: var(--text-3); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.2rem; margin-top: 1.8rem; }
.form-foot .small { font-size: var(--t-foot); color: var(--text-3); }
.form-status { display: none; width: 100%; padding: .8rem 1rem; border-radius: var(--r-control); background: color-mix(in srgb, var(--danger) 9%, var(--card)); font-size: var(--t-callout); color: var(--text); animation: rise var(--t-med) var(--ease-out); }
.form-status.show { display: block; }
.form-status button { margin-left: .4rem; padding: 0; border: 0; background: none; color: var(--accent); font-weight: 500; cursor: pointer; }
.form-status button:hover { text-decoration: underline; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; border-radius: 50%; animation: spin .6s linear infinite; }
.success-panel { display: none; gap: .8rem; justify-items: start; padding: clamp(1.6rem, 4vw, 3rem); border-radius: var(--r-panel); background: var(--card); box-shadow: var(--shadow-2); opacity: 0; transition: opacity 600ms var(--ease-out); }
.success-panel.show { display: grid; }
.success-panel.in { opacity: 1; }
.success-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.success-mark svg { width: 22px; height: 22px; }
.success-panel h2 { font-size: var(--t-section); }

.check-row { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; margin-top: 1rem; font-size: var(--t-callout); color: var(--text); }
.check-row input { flex: none; width: 22px; height: 22px; margin: .1rem 0 0; accent-color: var(--accent); }
.check-row label { margin: 0; font-weight: 400; color: var(--text); cursor: pointer; }
.doc-form { margin-top: 2rem; }

/* Admin */
.admin { max-width: 1100px; margin: 0 auto; padding: 2rem var(--gutter) 4rem; }
.admin-page .globalnav { grid-template-columns: 1fr auto auto; }
.admin-user { font-size: var(--t-foot); color: var(--text-2); }
.admin-signin { display: grid; justify-items: center; gap: .8rem; max-width: 460px; margin: 10vh auto 0; padding: 2.4rem 2rem; text-align: center; box-shadow: var(--shadow-2); }
.admin-signin h1 { font-size: var(--t-title); }
.admin-signin .brand-mark { border-radius: 10px; }
.admin-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.admin-tabs { width: min(100%, 420px); }
.admin-tabs [role="tab"] { height: 34px; }
.admin-tabs [role="tab"][aria-selected="true"] { background: var(--card-raised); color: var(--text); box-shadow: 0 1px 3px #0000001f, 0 0 0 .5px #0000000a; }
:root[data-theme="dark"] .admin-tabs [role="tab"][aria-selected="true"] { background: #48484a; }
.admin-refresh { display: flex; align-items: center; gap: .5rem; font-size: var(--t-foot); color: var(--text-3); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat { display: grid; gap: .2rem; padding: 1.1rem 1.2rem; }
.stat-label { font-size: var(--t-foot); font-weight: 600; color: var(--text-2); }
.stat-value { font: 600 1.7rem/1.15 var(--font-display); letter-spacing: var(--track-display); color: var(--text); font-variant-numeric: tabular-nums; }
.stat-note { font-size: var(--t-caption); color: var(--text-3); }
.admin-table { padding: 1.2rem 1.4rem; }
.admin-table h2 { font-size: var(--t-title); margin-bottom: .6rem; }
.table-scroll { overflow-x: auto; }
.admin table { width: 100%; border-collapse: collapse; font-size: var(--t-foot); font-variant-numeric: tabular-nums; }
.admin th, .admin td { padding: .55rem .5rem; border-bottom: 1px solid var(--hairline-soft); text-align: left; white-space: nowrap; }
.admin th { font-weight: 600; color: var(--text-2); }
.empty { padding: 1.4rem 0; font-size: var(--t-callout); color: var(--text-3); }
.request-list, .chat-list { display: grid; gap: .9rem; }
.request { display: grid; gap: .8rem; justify-items: start; padding: 1.2rem 1.4rem; }
.request-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; width: 100%; }
.request-who { display: grid; gap: .1rem; }
.request-who strong { font: 600 var(--t-body)/1.3 var(--font-display); }
.request-who span, .request-meta time { font-size: var(--t-foot); color: var(--text-2); }
.request-meta { display: flex; align-items: center; gap: .6rem; }
.badge { display: inline-flex; align-items: center; padding: .15rem .6rem; border-radius: var(--r-pill); background: var(--fill); font-size: var(--t-caption); font-weight: 600; color: var(--text-2); }
.badge.chat { background: var(--brand-wash); color: var(--brand); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin: 0; font-size: var(--t-callout); }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; color: var(--text); }
.request-message { max-width: 70ch; font-size: var(--t-callout); white-space: pre-wrap; }
.chat-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: 1rem 1.2rem; border: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; transition: box-shadow var(--t-med); }
.chat-row:hover { box-shadow: var(--shadow-2); }
.chat-row-main { display: grid; gap: .15rem; min-width: 0; }
.chat-row-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.chat-row-main span { font-size: var(--t-foot); color: var(--text-2); }
.chat-row-side { display: flex; align-items: center; gap: .6rem; flex: none; }
.chat-cost { font-size: var(--t-foot); color: var(--text-3); font-variant-numeric: tabular-nums; }
.transcript { width: min(100% - 2rem, 620px); max-height: min(86vh, 820px); padding: 0; border: 0; border-radius: var(--r-glass); background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); color: var(--text); box-shadow: var(--shadow-2); }
.transcript[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.transcript::backdrop { background: #00000040; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.transcript-head { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.1rem .9rem 1.4rem; border-bottom: 1px solid var(--hairline-soft); }
.transcript-head h2 { font-size: var(--t-title); }
.transcript-head p { font-size: var(--t-foot); }
.transcript-log { max-height: none; }

/* ---------- 9. Cursor (mouse and trackpad only; text fields keep the native I-beam) ---------- */
html.fx-cursor, html.fx-cursor * { cursor: none !important; }
html.fx-cursor.fx-text :is(input, textarea) { cursor: text !important; }
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; mix-blend-mode: difference; }
.cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 45%, transparent);
  transition: width 260ms var(--ease-spring), height 260ms var(--ease-spring), margin 260ms var(--ease-spring), background-color 200ms, box-shadow 200ms, opacity 200ms;
}
.cursor-ring.active { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: color-mix(in srgb, var(--text) 6%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 70%, transparent); }
.cursor-ring.pressed { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
html.fx-text .cursor-ring, html.fx-text .cursor-dot { opacity: 0; }

/* ---------- 10. Reveals ---------- */
/* Elements marked data-reveal rise softly into place the first time they are seen. */
.reveals [data-reveal] { opacity: 0; translate: 0 28px; transition: opacity 900ms var(--ease-out), translate 1100ms cubic-bezier(.2, .75, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.reveals [data-reveal].in { opacity: 1; translate: 0 0; }
.reveals :is(.hero-block, .page-head) [data-reveal] { translate: 0 18px; filter: blur(6px); transition-property: opacity, translate, filter; transition-duration: 1000ms, 1100ms, 900ms; }
.reveals :is(.hero-block, .page-head) [data-reveal].in { filter: none; }
.reveals .film[data-reveal] video { scale: 1.06; transition: scale 1600ms var(--ease-out); }
.reveals .film[data-reveal].in video { scale: 1; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.985); } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(-6px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dash { to { stroke-dashoffset: -24; } }

/* ---------- 11. Small screens ---------- */
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .solution.wide, .solution.tall { grid-column: span 1; grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .solution.wide .art { order: -1; }
  .work, .feature { grid-template-columns: 1fr; }
  .work:nth-child(even) .work-copy, .feature:nth-child(even) .feature-copy { order: 0; }
  .work-art { order: -1; min-height: 260px; }
  .feature-art { order: -1; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-intro { position: static; }
}

@media (max-width: 760px) {
  /* A backdrop-filter would make the header the containing block of the fixed tab bar below. */
  .globalnav { grid-template-columns: 1fr auto; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-strong); }
  .sections { position: fixed; z-index: 55; left: 0; right: 0; bottom: 0; justify-content: space-around; gap: 0; padding: 4px 6px max(6px, env(safe-area-inset-bottom)); background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-top: 1px solid var(--hairline-soft); }
  .nav-link { flex: 1; flex-direction: column; height: auto; min-height: 50px; padding: 4px 6px; gap: 2px; border-radius: 12px; font-size: 11px; background: transparent !important; }
  .nav-link svg { display: block; }
  .nav-link[aria-current="page"] { color: var(--accent); }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .popover { right: 1rem; left: auto; }

  .build .hero-3d { height: 360px; }
  .reveals .build:not(.no-webgl) { height: 540vh; }
  .build-rail { gap: .3rem; padding: .5rem .7rem .55rem; }
  .build-rail li { width: 54px; }
  .build-rail span { display: none; }
  .build-label i { width: 28px; }
  .build-label small { display: none; }
  .build-label strong { font-size: var(--t-foot); }
  .build-skip { display: none; }
  .build-captions { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .build-caption p { font-size: var(--t-callout); }
  .reveals .build:not(.no-webgl) .build-hint { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .outcomes { grid-template-columns: 1fr; gap: 1.2rem; }
  .outcome + .outcome { border-left: 0; border-top: 1px solid var(--hairline-soft); padding-top: 1.2rem; }
  .bento { grid-template-columns: 1fr; }
  .film { border-radius: var(--r-card); aspect-ratio: 4 / 3; }
  .steps { grid-template-columns: 1fr; gap: 1.6rem; }
  .steps::before, .steps::after { left: 18px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .steps::after { transform-origin: top; transform: scaleY(var(--p)); }
  .step { grid-template-columns: 38px 1fr; column-gap: 1rem; }
  .step-n { grid-row: span 2; margin: 0; }
  .statement { grid-template-columns: 1fr; gap: .5rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .form-foot .button { width: 100%; }
}
/* Touch screens: 16px fields (iPhone zooms into anything smaller) and 44px tap targets. */
@media (pointer: coarse) {
  input, textarea, select { font-size: 16px; }
  .icon-button, .chat-head .icon-button { width: 44px; height: 44px; }
  .brand { min-height: 44px; }
  .jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 1.05rem; }
  .column a { display: inline-flex; align-items: center; min-height: 44px; }
  .chat-starters button { min-height: 40px; }
}

/* ---------- 13. Site assistant ---------- */
.chat-launcher {
  position: fixed; z-index: 70; right: max(1.25rem, env(safe-area-inset-right)); bottom: max(1.25rem, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: .5rem; height: 48px; padding: 0 1.2rem 0 1rem;
  border: 0; border-radius: var(--r-pill); background: var(--primary-bg); color: var(--primary-fg);
  font-size: var(--t-callout); font-weight: 600; cursor: pointer; box-shadow: var(--shadow-2);
  transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast), opacity var(--t-med);
  animation: rise var(--t-slow) var(--ease-spring) 600ms both;
}
.chat-launcher svg { width: 20px; height: 20px; }
.chat-launcher:hover { background: var(--primary-hover); }
.chat-launcher:active { transform: scale(.96); }
.chat-launcher[hidden] { display: none; }

.chat-panel {
  position: fixed; z-index: 80; right: max(1.25rem, env(safe-area-inset-right)); bottom: max(1.25rem, env(safe-area-inset-bottom));
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: min(400px, calc(100vw - 2.5rem)); height: min(640px, calc(100dvh - var(--nav-h) - 2.5rem));
  background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge); border-radius: var(--r-glass); box-shadow: var(--shadow-2);
  overflow: hidden; transform-origin: bottom right; animation: pop var(--t-med) var(--ease-spring);
}
.chat-panel[hidden] { display: none; }
.chat-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: .65rem; padding: .8rem .7rem .8rem 1rem; border-bottom: 1px solid var(--hairline-soft); }
.chat-head .brand-mark { width: 30px; height: 30px; border-radius: 7px; }
.chat-title { display: grid; gap: .05rem; min-width: 0; }
.chat-title strong { font: 600 var(--t-callout)/1.2 var(--font-display); color: var(--text); }
.chat-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-caption); color: var(--text-3); }
.chat-head .icon-button svg { width: 18px; height: 18px; }

.chat-log { display: flex; flex-direction: column; gap: .6rem; overflow-y: auto; overscroll-behavior: contain; padding: 1rem; scroll-behavior: smooth; }
.chat-msg { display: flex; animation: rise var(--t-med) var(--ease-out); }
.chat-msg.user { justify-content: flex-end; }
.chat-bubble { max-width: 86%; padding: .6rem .85rem; border-radius: 18px; font-size: var(--t-callout); line-height: 1.45; overflow-wrap: anywhere; }
.chat-msg.assistant .chat-bubble { background: var(--card); color: var(--text); border-bottom-left-radius: 6px; box-shadow: 0 0 0 1px var(--hairline-soft); }
:root[data-theme="dark"] .chat-msg.assistant .chat-bubble { background: var(--fill-2); box-shadow: none; }
.chat-msg.user .chat-bubble { background: var(--primary-bg); color: var(--primary-fg); border-bottom-right-radius: 6px; white-space: pre-wrap; }
.chat-bubble p { color: inherit; }
.chat-bubble p + p, .chat-bubble p + ul, .chat-bubble p + ol, .chat-bubble ul + p, .chat-bubble ol + p { margin-top: .55rem; }
.chat-bubble ul, .chat-bubble ol { margin: 0; padding-left: 1.15rem; display: grid; gap: .2rem; }
.chat-bubble strong { font-weight: 600; }
.chat-bubble a { color: var(--accent); }
.chat-msg.user .chat-bubble a { color: inherit; text-decoration: underline; }

.chat-typing { display: inline-flex; gap: 4px; padding: .8rem .9rem; border-radius: 18px; border-bottom-left-radius: 6px; background: var(--card); box-shadow: 0 0 0 1px var(--hairline-soft); }
:root[data-theme="dark"] .chat-typing { background: var(--fill-2); box-shadow: none; }
.chat-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: typing 1.2s ease-in-out infinite; }
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.chat-starters { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .2rem; }
.chat-starters button { padding: .45rem .85rem; border: 0; border-radius: var(--r-pill); background: transparent; box-shadow: inset 0 0 0 1px var(--hairline); color: var(--text); font-size: var(--t-foot); font-weight: 500; cursor: pointer; transition: background-color var(--t-fast); }
.chat-starters button:hover { background: var(--fill); }

.chat-notice { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; align-self: center; max-width: 92%; padding: .5rem .85rem; border-radius: 14px; font-size: var(--t-foot); color: var(--text-2); background: var(--fill); }
.chat-notice.error { background: color-mix(in srgb, var(--danger) 10%, var(--card)); color: var(--text); }
.chat-notice.sent { background: color-mix(in srgb, var(--ok) 12%, var(--card)); color: var(--text); font-weight: 500; }
.chat-notice button { padding: 0; border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; }
.chat-check { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; }
.chat-check svg { width: 13px; height: 13px; }

.chat-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .5rem; padding: .7rem .7rem .4rem 1rem; border-top: 1px solid var(--hairline-soft); }
.chat-compose textarea { min-height: 40px; max-height: 140px; padding: .55rem .85rem; border-radius: 20px; resize: none; font-size: var(--t-callout); line-height: 1.4; }
.chat-send { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; transition: opacity var(--t-fast), transform var(--t-fast); }
.chat-send svg { width: 18px; height: 18px; }
.chat-send:disabled { opacity: .35; cursor: default; }
.chat-send:not(:disabled):active { transform: scale(.94); }
.chat-note { padding: 0 1rem .7rem; font-size: 11px; line-height: 1.4; color: var(--text-3); }
.chat-note a { color: var(--text-2); text-decoration: underline; }

@media (max-width: 760px) {
  .chat-launcher { bottom: calc(68px + env(safe-area-inset-bottom)); right: 1rem; height: 44px; padding: 0 1rem 0 .85rem; }
  .chat-panel { inset: 0; width: auto; height: auto; border-radius: 0; border: 0; background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); transform-origin: bottom center; }
}
@media print { .chat-launcher, .chat-panel { display: none !important; } }
@media (pointer: coarse) {   /* after the chat's own rules, so these win on touch screens */
  .chat-compose textarea { font-size: 16px; min-height: 44px; }
  .chat-send { width: 44px; height: 44px; }
}

/* ---------- 12. Reduced motion: everything still works, nothing moves on its own ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .reveals [data-reveal] { opacity: 1 !important; translate: none !important; filter: none !important; }
  .reveals .film[data-reveal] video { scale: none !important; }
  .bars i { transform: none !important; }
  .draw { stroke-dashoffset: 0 !important; stroke-dasharray: none !important; }
}
