/* RapidInference — landing page
   Type: Cal Sans (display), Doto (dot-matrix readouts), the system face for reading.
   Colors: the Conscious Engines studio palette outside the phone, iOS system colors inside it. */

@font-face {
  font-family: "Cal Sans";
  src: url("fonts/CalSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Doto";
  src: url("fonts/Doto-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #151515;
  --bg-2: #1b1b1b;
  --bg-3: #232323;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --rule: rgba(255, 255, 255, 0.055);

  --ink: #fff;
  --ink-2: #b3b3b3;
  --ink-3: #868686;
  --ink-4: #5c5c5c;

  /* studio palette, each with the deep tone used for text on it */
  --orange: #f5560c;  --orange-deep: #57230a;
  --red: #f5560c;     --red-deep: #57230a;
  --yellow: #f4e838;  --yellow-deep: #3f3b02;
  --green: #42e53a;   --green-deep: #0f3d0c;
  --aqua: #38e5ce;    --aqua-deep: #0a4038;
  --blue: #2196f9;    --blue-deep: #053258;
  --mauve: #f1afff;   --mauve-deep: #581166;
  --violet: #9e7dff;  /* the app's overall-score color, dark mode */

  /* iOS, dark appearance */
  --ios-blue: #0a84ff;
  --ios-green: #30d158;
  --ios-red: #ff453a;
  --ios-yellow: #ffd60a;
  --ios-2: rgba(235, 235, 245, 0.6);

  --f-display: "Cal Sans", ui-sans-serif, system-ui, sans-serif;
  --f-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --f-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --f-dot: "Doto", ui-monospace, monospace;

  --maxw: 1160px;
  --gutter: max(clamp(16px, 4.5vw, 48px), env(safe-area-inset-left), env(safe-area-inset-right));
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  overflow-x: clip;
}

/* No browser scrollbar: the ruler on the right edge, and its orange mark, show where you are.
   The standard property for Firefox, Chrome and Safari 18.2+; the pseudo-element for older WebKit. */
html, body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 17px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  overflow-x: clip;
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.015em;
}

p { margin: 0; }
a { color: inherit; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
::selection { background: var(--yellow); color: #111; }

:focus-visible {
  outline: 2px solid var(--ios-blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(100% - var(--gutter) * 2, var(--maxw));
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: fixed;
  left: 12px; top: -80px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff; color: #111;
  font-weight: 600; font-size: 14px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.tnum { font-variant-numeric: tabular-nums; }
.doto { font-family: var(--f-dot); }
/* Doto's own period is a four-dot cluster that reads as "+"; decimals get one dot instead. */
.pt {
  display: inline-block;
  width: 0.11em;
  height: 0.11em;
  margin: 0 0.1em 0 0.06em;
  border-radius: 0.02em;
  background: currentColor;
  vertical-align: baseline;
}

/* ---------------------------------------------------------------- drafting frame */

.rules {
  position: fixed;
  top: 0; bottom: 0; left: 0; right: 0;
  z-index: 0;
  width: min(100% - var(--gutter), var(--maxw) + var(--gutter));
  margin-inline: auto;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  pointer-events: none;
}
.rules i {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--rule) 0 5px, transparent 5px 11px);
}
.rules i:nth-child(1) { left: 25%; }
.rules i:nth-child(2) { left: 50%; }
.rules i:nth-child(3) { left: 75%; }

.ruler {
  position: fixed;
  top: 0; bottom: 0;
  z-index: 60; /* over the frosted nav, so the scale runs the full height */
  width: 12px;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.26) 0 1px, transparent 1px 64px) 0 0 / 11px 100% no-repeat,
    repeating-linear-gradient(to bottom, rgba(255,255,255,.12) 0 1px, transparent 1px 8px) 0 0 / 5px 100% no-repeat;
}
.ruler--l { left: 0; }
.ruler--r {
  right: 0;
  background-position: right 0 top 0, right 0 top 0;
}
.ruler-mark {
  position: absolute;
  right: 0;
  top: calc(var(--p, 0) * (100% - 2px));
  width: 18px; height: 2px;
  background: var(--orange);
}

main, .footer, .nav { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- chips & decoration */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px 5px;
  border-radius: 2px;
  font: italic 750 11.5px/1 var(--f-dot);
  font-synthesis: style;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip--sm { padding: 5px 7px 4px; font-size: 10.5px; }
.chip--yellow { background: var(--yellow); color: var(--yellow-deep); }
.chip--green  { background: var(--green);  color: var(--green-deep); }
.chip--aqua   { background: var(--aqua);   color: var(--aqua-deep); }
.chip--blue   { background: var(--blue);   color: #021a30; }
.chip--mauve  { background: var(--mauve);  color: var(--mauve-deep); }
.chip--orange { background: var(--orange); color: #2a0e02; }
.chip--grey   { background: #bdbdbd;       color: #202020; }

.dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; }

.bg-yellow { background: var(--yellow); color: #1c1a00; }
.bg-green  { background: var(--green);  color: #062b04; }
.bg-blue   { background: var(--blue);   color: #fff; }
.bg-red    { background: var(--red);    color: #fff; }
.bg-violet { background: var(--violet); }

.deco { position: absolute; display: block; pointer-events: none; }
.deco--stripes { width: 74px; height: 16px; background: repeating-linear-gradient(90deg, var(--yellow) 0 3px, transparent 3px 7px); }
.deco--segments { width: 78px; height: 12px; background: repeating-linear-gradient(90deg, var(--blue) 0 8px, transparent 8px 12px); }
.deco--hatch { width: 84px; height: 12px; background: repeating-linear-gradient(135deg, var(--orange) 0 4px, transparent 4px 8px); box-shadow: inset 0 0 0 1px var(--orange); }
.deco--dots { width: 64px; height: 18px; background: radial-gradient(circle at center, var(--aqua) 0 4px, transparent 4.5px) 0 0 / 16px 18px, var(--aqua-deep); }

/* ---------------------------------------------------------------- buttons */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font: 600 16px/1 var(--f-body);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s var(--ease), background-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn--sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn--light { background: #fff; color: #111; }
.btn--light:hover { background: #e8e8e8; }
.btn--blue {
  background: var(--ios-blue);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 10px 26px -12px rgba(10,132,255,.8);
}
.btn--blue:hover { background: #2a93ff; }
.btn--ghost {
  background: rgba(255,255,255,.05);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn--ghost:hover { background: rgba(255,255,255,.09); }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: 14px;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.3);
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--ink); text-decoration-color: currentColor; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.text-link svg { transition: transform 0.2s var(--ease); }
.text-link:hover svg { transform: translateX(3px); }

/* ---------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.nav.is-stuck {
  background: rgba(21, 21, 21, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font: 400 18px/1 var(--f-display);
  letter-spacing: -0.005em;
  text-decoration: none;
}
.brand img { border-radius: 7px; box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  color: rgba(255,255,255,.58);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.is-active { color: #fff; }

.thermal {
  --t: var(--green); --t-ink: var(--green-deep);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 5px;
  border-radius: 2px;
  background: var(--t);
  color: var(--t-ink);
  font: italic 750 10.5px/1 var(--f-dot);
  font-synthesis: style;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: default;
  transition: background-color 0.5s, color 0.5s;
}
.thermal i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: pulse 1.8s ease-in-out infinite; }
.thermal[data-state="fair"]     { --t: var(--yellow); --t-ink: var(--yellow-deep); }
.thermal[data-state="serious"]  { --t: var(--orange); --t-ink: #2a0e02; }
.thermal[data-state="critical"] { --t: var(--ios-red); --t-ink: #3d0602; }
.thermal[data-state="critical"] i { animation-duration: 0.7s; }

@keyframes pulse { 50% { opacity: 0.25; } }

/* ---------------------------------------------------------------- hero */

.hero { position: relative; padding: clamp(28px, 5vw, 64px) 0 clamp(80px, 10vw, 128px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}

.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 28px; }
.kicker-meta { color: var(--ink-3); font-size: 14px; }

.hero h1 {
  font-size: clamp(46px, 5.6vw, 78px);
  line-height: 1;
  letter-spacing: -0.012em;
  margin-bottom: 28px;
  text-wrap: balance;
}

.sweat { position: relative; display: inline-block; white-space: nowrap; }
.scribble {
  position: absolute;
  left: -3%;
  bottom: -0.1em;
  width: 106%;
  height: 0.24em;
  overflow: visible;
  pointer-events: none;
}
.scribble path {
  fill: none;
  stroke: var(--orange);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.js .scribble path { stroke-dashoffset: 1; animation: draw 0.9s 1s cubic-bezier(0.6, 0.1, 0.2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.drops {
  position: absolute;
  top: 0.02em;
  right: -0.74em;
  width: 0.46em;
  height: 0.46em;
  overflow: visible;
  pointer-events: none;
}
.drop { fill: var(--aqua); transform-box: fill-box; transform-origin: center; }
.drop--1 { rotate: -20deg; }
.drop--2 { rotate: 18deg; }
.js .drop { opacity: 0; animation: flick 0.7s var(--ease) forwards; }
.js .drop--1 { animation-delay: 1.75s; }
.js .drop--2 { animation-delay: 1.9s; }
@keyframes flick {
  from { opacity: 0; transform: translate(-40%, 40%) scale(0.4); }
  to   { opacity: 1; transform: none; }
}

.lede {
  max-width: 33em;
  margin-bottom: 34px;
  color: var(--ink-2);
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.55;
  text-wrap: pretty;
}

.js .enter { animation: enter 0.9s var(--ease) both; animation-delay: calc(var(--d, 0) * 90ms + 60ms); }
@keyframes enter { from { opacity: 0; transform: translateY(16px); } }

/* ---------------------------------------------------------------- signup */

.signup { position: relative; max-width: 520px; }

.signup-field {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: box-shadow 0.2s, background-color 0.2s;
}
.signup-field:focus-within {
  background: rgba(255,255,255,.075);
  box-shadow: inset 0 0 0 1px rgba(10,132,255,.75), 0 0 0 4px rgba(10,132,255,.16);
}
.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 8px 0 18px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 400 17px var(--f-body);
  -webkit-appearance: none;
  appearance: none;
}
.signup input::placeholder { color: rgba(255,255,255,.34); }
.signup input:-webkit-autofill,
.signup input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  transition: background-color 600000s 0s, color 600000s 0s;
}
.signup .btn { height: 48px; flex: none; }

.btn-spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  opacity: 0;
  animation: spin 0.7s linear infinite;
  transition: opacity 0.15s;
}
.is-sending .btn-label { opacity: 0; }
.is-sending .btn-spinner { opacity: 1; }
.is-sending .btn { pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.signup-note {
  margin: 12px 0 0 20px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.45;
  min-height: 1.45em;
}
.signup.is-invalid .signup-field {
  box-shadow: inset 0 0 0 1px rgba(255,107,61,.85), 0 0 0 4px rgba(245,86,12,.16);
  animation: nudge 0.32s ease-in-out;
}
.signup.is-invalid .signup-note, .signup.is-error .signup-note { color: #ff8a62; }
.signup-note .link-btn { color: var(--ink); font-size: inherit; }
@keyframes nudge { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.signup-done {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(66,229,58,.07);
  box-shadow: inset 0 0 0 1px rgba(66,229,58,.26);
  text-align: left;
  animation: enter 0.5s var(--ease) both;
}
.signup-done[hidden] { display: none; }
.done-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--green);
  color: #062b04;
}
.done-title { margin-bottom: 4px; color: var(--ink); font: 400 20px/1.2 var(--f-display); }
.done-body { margin-bottom: 8px; font-size: 15px; line-height: 1.5; }
.done-body b { color: var(--ink); font-weight: 600; word-break: break-all; }
.signup.is-done .signup-field, .signup.is-done .signup-note { display: none; }

/* ---------------------------------------------------------------- hero visual & phone */

.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 0;
}
.hero-visual > .chip, .hero-visual > .deco { position: absolute; z-index: 2; }
.hero-visual .chip { box-shadow: 0 8px 20px -8px rgba(0,0,0,.6); }
.f1 { top: -1%; left: -9%;  rotate: -4deg; }
.f2 { top: 32%; right: -2%; rotate: 3deg; }
.f3 { top: 58%; left: -7%;  rotate: 2deg; }
.f4 { top: 93%; right: 1%;  rotate: -3deg; }
.d1 { top: 22%; left: 4%; }
.d2 { top: 11%; right: -3%; }
.d3 { top: 66%; right: -7%; }
.d4 { top: 90%; left: 10%; }
.js .float { animation: bob 6s ease-in-out infinite; }
.js .f2 { animation-delay: -1.5s; animation-duration: 7s; }
.js .f3 { animation-delay: -3s; animation-duration: 6.5s; }
.js .f4 { animation-delay: -4.5s; animation-duration: 7.5s; }
@keyframes bob { 50% { transform: translateY(-6px); } }

.phone {
  --s: 10px;
  position: relative;
  z-index: 1;
  flex: none;
  width: 30em;
  height: 63em;
  padding: 0.42em;
  border-radius: 5.4em;
  font-size: var(--s);
  background: linear-gradient(150deg, #56565a 0%, #262628 20%, #19191a 55%, #3c3c40 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08),
    0 4em 7em -2em rgba(0,0,0,.75),
    0 1.5em 3em rgba(0,0,0,.35);
}
/* side buttons: action, volume up, volume down / side, camera control */
.phone::before, .phone::after {
  content: "";
  position: absolute;
  width: 0.34em;
  border-radius: 0.2em;
}
.phone::before {
  left: -0.26em;
  top: 11em;
  height: 17.5em;
  background: linear-gradient(to bottom,
    #2e2e31 0 3em, transparent 3em 5em,
    #2e2e31 5em 10.6em, transparent 10.6em 12em,
    #2e2e31 12em 17.5em);
}
.phone::after {
  right: -0.26em;
  top: 16.5em;
  height: 23em;
  background: linear-gradient(to bottom,
    #2e2e31 0 8.5em, transparent 8.5em 17.6em,
    #2e2e31 17.6em 23em);
}

.phone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 0.55em solid #050505;
  border-radius: 5em;
  background: #000;
  color: #fff;
  font-family: var(--f-body);
  -webkit-user-select: none;
  user-select: none;
}

.ph-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5em;
  padding: 0.35em 2.3em 0 3em;
}
.ph-time { font-size: 1.5em; font-weight: 600; letter-spacing: -0.01em; }
.ph-island {
  position: absolute;
  top: 1.05em;
  left: 50%;
  width: 9.4em;
  height: 2.75em;
  translate: -50% 0;
  border-radius: 2em;
  background: radial-gradient(circle at 81% 50%, #1a2233 0 0.42em, #0b0f18 0.5em, transparent 0.62em), #000;
  box-shadow: 0 0 0 0.08em #0e0e0e;
}
.ph-sys { display: flex; align-items: center; gap: 0.45em; fill: #fff; color: #fff; }
.ph-sys svg:nth-child(1) { width: 1.7em; height: 1.1em; }
.ph-sys svg:nth-child(2) { width: 1.55em; height: 1.1em; }
.ph-sys svg:nth-child(3) { width: 2.5em; height: 1.2em; }

.ph-header {
  display: grid;
  gap: 0.65em;
  margin: 0 1.15em;
  padding: 1.05em 1.25em;
  border-radius: 1.9em;
  background: #1c1c1e;
}
.ph-row { display: flex; align-items: center; gap: 0.55em; font-size: 1.2em; white-space: nowrap; }
.ph-row b { font-weight: 600; }
.ph-flag { width: 1.1em; height: 1.1em; color: var(--ios-blue); }
.ph-dot { width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--ios-blue); }
.is-running .ph-dot { animation: pulse 1s ease-in-out infinite; }
.is-stopped .ph-dot { background: var(--ios-red); }
.ph-muted { color: var(--ios-2); }
.ph-state { font-size: 0.92em; overflow: hidden; text-overflow: ellipsis; }
.ph-emoji { font-size: 0.95em; }
.ph-mem {
  margin-left: auto;
  padding: 0.28em 0.6em;
  border-radius: 1em;
  background: rgba(255,255,255,.1);
  color: rgba(235,235,245,.75);
  font-size: 0.78em;
  font-weight: 600;
}

.ph-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.9em 1.2em 0.6em;
  text-align: center;
}
.ph-score {
  color: var(--violet);
  font: 800 4.9em/1 var(--f-round);
  letter-spacing: -0.01em;
}
.ph-caption { margin-top: 0.15em; font-size: 1.1em; font-weight: 500; }
.ph-titles { min-height: 4.4em; margin-top: 1.25em; }
.ph-title { font-size: 1.25em; font-weight: 600; }
.ph-sub { max-width: 21em; margin: 0.25em auto 0; font-size: 1.02em; line-height: 1.35; }
.ph-share {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  margin-top: 0.7em;
  padding: 0.5em 1.05em;
  border-radius: 2em;
  background: rgba(10,132,255,.14);
  color: var(--ios-blue);
  font-size: 1.05em;
  font-weight: 600;
  transition: opacity 0.3s;
}
.ph-share svg { width: 1.1em; height: 1.1em; }
.is-running .ph-share, .is-stopped .ph-share { opacity: 0; }
.ph-scores {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  margin-top: 1.35em;
}
.ph-scores div { display: flex; flex-direction: column; align-items: center; gap: 0.1em; }
.ph-scores b { font: 700 1.45em var(--f-round); }
.ph-scores span { color: var(--ios-2); font-size: 0.95em; }

.phone .c-green  { color: var(--ios-green); }
.phone .c-blue   { color: var(--ios-blue); }
.phone .c-red    { color: var(--ios-red); }
.phone .c-yellow { color: var(--ios-yellow); }
.phone .bg-green  { background: linear-gradient(to bottom, #5ade7b, var(--ios-green)); color: #fff; }
.phone .bg-blue   { background: linear-gradient(to bottom, #3b9dff, var(--ios-blue)); color: #fff; }
.phone .bg-red    { background: linear-gradient(to bottom, #ff6f67, var(--ios-red)); color: #fff; }
.phone .bg-yellow { background: linear-gradient(to bottom, #ffe14a, var(--ios-yellow)); color: #000; }

.ph-stages { display: grid; gap: 1.05em; padding: 0.8em 1.6em 0; }
.ph-stages-title { font-size: 1.25em; font-weight: 600; }
.ph-stage { display: flex; align-items: center; gap: 1em; }
.ph-icon { flex: none; display: grid; place-items: center; width: 2.9em; height: 2.9em; border-radius: 0.75em; }
.ph-icon svg { width: 1.45em; height: 1.45em; }
.ph-stage-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.ph-stage-text b { font-size: 1.15em; font-weight: 600; }
.ph-stage-text small {
  overflow: hidden;
  color: var(--ios-2);
  font-size: 0.95em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ph-stage-status { display: flex; flex: none; justify-content: flex-end; min-width: 4.6em; }
.ph-pill {
  padding: 0.3em 0.8em;
  border-radius: 1em;
  background: color-mix(in srgb, currentColor 16%, transparent);
  font: 700 1.05em var(--f-round);
  font-variant-numeric: tabular-nums;
}
.ph-pill.pop { animation: pop 0.45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(0.6); } }
.ph-pending {
  width: 1.8em; height: 1.8em;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.15em rgba(235,235,245,.28);
}
.ph-spin { width: 1.9em; height: 1.9em; animation: spokes 0.8s steps(8) infinite; }
@keyframes spokes { to { transform: rotate(360deg); } }

.ph-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: center;
  padding: 3.2em 2.2em 2.5em;
  background: linear-gradient(to top, #000 58%, transparent);
}
.ph-run {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  width: 100%;
  height: 3.5em;
  border: 0;
  border-radius: 2em;
  background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,0) 55%), var(--ios-blue);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 0.8em 1.8em -0.6em rgba(10,132,255,.75);
  color: #fff;
  font: 600 1.3em var(--f-body);
  cursor: pointer;
  transition: transform 0.15s var(--ease), filter 0.2s;
}
.ph-run svg { width: 1.15em; height: 1.15em; }
.ph-run:hover { filter: brightness(1.08); }
.ph-run:active { transform: scale(0.97); }
.ph-home {
  position: absolute;
  bottom: 0.7em;
  left: 50%;
  width: 10.5em;
  height: 0.42em;
  translate: -50% 0;
  border-radius: 1em;
  background: rgba(255,255,255,.85);
}

.phone-caption { margin-top: 26px; color: var(--ink-3); font-size: 13px; text-align: center; }
.phone-caption em { color: var(--ink-2); font-style: normal; }

/* ---------------------------------------------------------------- sections */

.section { position: relative; padding-bottom: clamp(96px, 12vw, 160px); }
.section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 12px);
}
.sheet {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  margin-bottom: clamp(44px, 6vw, 80px);
  color: var(--ink-3);
  font: 500 11.5px/1.4 var(--f-mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.sheet span:last-child { color: var(--ink-4); text-align: right; }
/* registration marks where the section rule meets the frame */
.sheet::before, .sheet::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 11px; height: 11px;
  background:
    linear-gradient(rgba(255,255,255,.4), rgba(255,255,255,.4)) center / 100% 1px no-repeat,
    linear-gradient(rgba(255,255,255,.4), rgba(255,255,255,.4)) center / 1px 100% no-repeat;
}
.sheet::before { left: calc(var(--gutter) / -2 - 5px); }
.sheet::after { right: calc(var(--gutter) / -2 - 5px); }

.section-copy { max-width: 540px; }
.section-copy--wide { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section h2 {
  margin-bottom: 22px;
  font-size: clamp(38px, 5.2vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.section-copy p { margin-bottom: 16px; font-size: 17.5px; line-height: 1.6; text-wrap: pretty; }
.section-copy p:last-child { margin-bottom: 0; }
.footnote { max-width: 70ch; margin-top: 22px; color: var(--ink-3); font-size: 13px; line-height: 1.55; }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- 01 replay */

.replay-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.replay-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }

.seg {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.seg button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 8px 18px 7px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.1;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s;
}
.seg button b { font: 800 15px/1 var(--f-dot); letter-spacing: 0.02em; }
.seg button:hover { color: var(--ink-2); }
.seg button[aria-checked="true"]:first-child { background: var(--green); color: var(--green-deep); }
.seg button[aria-checked="true"]:last-child  { background: var(--orange); color: #2a0e02; }

.transcript {
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -40px rgba(0,0,0,.7);
}
.tr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font: 500 11.5px/1.3 var(--f-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tr-tag { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.tr-body { display: grid; gap: 20px; padding: 22px 20px 10px; }
.tr-q {
  max-width: 90%;
  margin-left: auto;
  padding: 12px 16px;
  border-radius: 18px 18px 6px 18px;
  background: #2b2b2d;
  color: #ececec;
  font-size: 15px;
  line-height: 1.5;
}
.tr-a {
  position: relative;
  color: #e6e6e6;
  font: 13.5px/1.62 var(--f-mono);
}
.tr-ghost, .tr-live { white-space: pre-wrap; overflow-wrap: anywhere; }
.tr-ghost { visibility: hidden; }
.tr-live { position: absolute; inset: 0; }
.caret {
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--caret, var(--green));
}
.caret.is-idle { animation: blink 1.05s steps(1) infinite; }
.caret.is-hidden { visibility: hidden; }
@keyframes blink { 50% { opacity: 0; } }

.tr-trace { display: block; width: calc(100% - 40px); height: 38px; margin: 6px 20px 0; }
.tr-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 14px 0 0;
  border-top: 1px solid var(--line);
}
.tr-stats div { padding: 12px 20px 14px; }
.tr-stats div + div { border-left: 1px solid var(--line); }
.tr-stats dt {
  margin-bottom: 5px;
  color: var(--ink-3);
  font: 500 10.5px/1.2 var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tr-stats dd { margin: 0; color: var(--ink); font: 800 19px/1 var(--f-dot); white-space: nowrap; word-spacing: -0.3em; }

/* ---------------------------------------------------------------- 02 tests */

.tests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.test {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.6vw, 32px);
  border-radius: 24px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.test-head { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.test-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; }
.test-num { color: var(--c); font: 600 13px/1 var(--f-mono); letter-spacing: 0.04em; }
.test-name { color: var(--ink); font-size: 15px; font-weight: 500; }
.test-head .chip { margin-left: auto; }
.test h3 { margin-bottom: 12px; font-size: clamp(24px, 2.3vw, 30px); line-height: 1.1; letter-spacing: -0.005em; text-wrap: balance; }
.test > p { margin-bottom: 24px; font-size: 15.5px; line-height: 1.6; }

.test-viz {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 188px;
  margin: auto 0 22px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255,255,255,.025);
  box-shadow: inset 0 0 0 1px var(--line);
}

.spec { display: grid; margin: 0; border-top: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.spec div:last-child { border-bottom: 0; padding-bottom: 0; }
.spec dt { color: var(--ink-3); font: 500 10.5px/1.9 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.spec dd { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }

/* 01 ANE */
.viz-ane { flex-flow: row wrap; align-items: center; gap: 18px 28px; }
.big-num .doto { display: block; color: var(--yellow); font-size: 68px; font-weight: 800; line-height: 0.9; }
.big-num small { display: block; margin-top: 8px; color: var(--ink-3); font-size: 13px; }
.mini-bars { display: grid; flex: 1; gap: 8px; min-width: 150px; }
.mini-bars span { color: var(--ink-3); font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.mini-bars i {
  display: block;
  width: calc(var(--v) * 100%);
  height: 8px;
  margin-bottom: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--yellow) 32%, transparent);
  transform-origin: left;
}
.mini-bars .on { color: var(--ink-2); }
.mini-bars .on i { background: var(--yellow); }
.viz-ane .text-link { flex-basis: 100%; }

/* 02 Inference */
.tally { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; max-width: 330px; }
.tally i { aspect-ratio: 1; border-radius: 3px; background: var(--green); }
.tally i.miss { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(66,229,58,.45); }
.js .tally i { opacity: 0; transform: scale(0.5); transition: opacity 0.4s, transform 0.4s var(--ease); transition-delay: calc(var(--i, 0) * 35ms + 200ms); }
.js .is-in .tally i { opacity: 1; transform: none; }
.viz-note { margin-top: 14px; color: var(--ink-3); font-size: 14px; line-height: 1.5; }
.viz-note b { color: var(--ink); font-weight: 600; }

/* 03 Training */
.loss { width: 100%; height: auto; overflow: visible; }
.loss-grid { fill: none; stroke: rgba(255,255,255,.08); stroke-dasharray: 3 4; }
.loss-line { fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; }
.js .loss-line { stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s cubic-bezier(0.5, 0, 0.2, 1) 0.3s; }
.js .is-in .loss-line { stroke-dashoffset: 0; }
.loss-dot { fill: var(--bg-2); stroke: var(--blue); stroke-width: 2; }
.loss-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--ink-3);
  font: 500 10.5px/1 var(--f-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sql { display: grid; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.sql p { display: flex; align-items: baseline; gap: 10px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.sql-k { flex: none; width: 10px; color: var(--blue); font: 800 13px var(--f-dot); }
.sql code { color: #cfe6ff; font: 12.5px/1.5 var(--f-mono); overflow-wrap: anywhere; }

/* 04 Image */
.prompts { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.prompts li { color: var(--ink-3); font-size: 14px; line-height: 1.45; transition: color 0.4s; }
.prompts .seed {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-4);
  font: 500 10.5px/1.4 var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.4s;
}
.prompts li.is-on { color: var(--ink); }
.prompts li.is-on .seed { color: var(--red); }
.steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--ink-3);
  font: 500 10.5px/1 var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.steps span { margin-right: 4px; }
.steps i { width: 24px; height: 6px; border-radius: 2px; background: rgba(245,86,12,.2); transition: background-color 0.25s; }
.steps i.is-on { background: var(--red); }

/* ---------------------------------------------------------------- 03 neural engine */

.ane-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-areas: "stage copy" "stage sweep";
  gap: 0 clamp(32px, 5vw, 80px);
}
.ane-stage { grid-area: stage; align-self: center; }
.ane-copy { grid-area: copy; align-self: end; }
.sweep { grid-area: sweep; align-self: start; }

.ane-canvas-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 22px;
  background: #0c0c0c;
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -40px rgba(0,0,0,.7);
}
.ane-canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.ane-hud {
  position: absolute;
  top: 12px; left: 12px; right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.ane-count, .lane {
  padding: 6px 9px 5px;
  border-radius: 3px;
  background: rgba(0,0,0,.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font: 750 12px/1 var(--f-dot);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ane-count b { font-weight: 850; }
.ane-lanes { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.lane { display: inline-flex; align-items: center; gap: 6px; opacity: 0.55; transition: opacity 0.15s; }
.lane i { width: 8px; height: 8px; border-radius: 1px; background: var(--lc); }
.lane.is-busy { opacity: 1; }

.sweep { display: grid; gap: 3px; margin-top: 34px; }
.sweep button {
  display: grid;
  grid-template-columns: 70px 1fr 46px;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-3);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.sweep button:hover { background: rgba(255,255,255,.035); color: var(--ink-2); }
.sweep button[aria-checked="true"] { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); }
.sweep [data-unit="ANE"] { --bar: var(--yellow); }
.sweep [data-unit="GPU"] { --bar: var(--blue); }
.sweep [data-unit="CPU"] { --bar: #bdbdbd; }
.sw-label { font: 500 13px/1 var(--f-mono); }
.sw-bar { height: 10px; overflow: hidden; border-radius: 2px; background: rgba(255,255,255,.04); }
.sw-bar i {
  display: block;
  width: calc(var(--v) * 100%);
  height: 100%;
  border-radius: 2px;
  background: var(--bar);
  opacity: 0.4;
  transform-origin: left;
  transition: opacity 0.2s, transform 0.9s var(--ease);
}
.js .sweep:not(.is-in) .sw-bar i { transform: scaleX(0); }
.sweep button[aria-checked="true"] .sw-bar i { opacity: 1; }
.sw-val { font: 800 18px/1 var(--f-dot); text-align: right; }
.sweep-unit {
  margin: 10px 12px 0;
  color: var(--ink-3);
  font: 500 10.5px/1.4 var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- 04 score */

.score-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.dial {
  padding: clamp(22px, 3vw, 36px);
  border-radius: 24px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.dial-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-3);
  font: 500 11.5px/1.2 var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dial-speed { color: var(--ink); }
.dial-num {
  margin: 16px 0 22px;
  color: var(--violet);
  font: 800 clamp(76px, 10vw, 132px)/0.95 var(--f-dot);
  letter-spacing: -0.01em;
}
.dial-bar { position: relative; height: 14px; margin-bottom: 40px; border-radius: 3px; background: rgba(255,255,255,.06); }
.dial-bar i {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: calc(var(--fill, 0.8) * 100%);
  border-radius: 3px;
  background: var(--violet);
}
.dial-ref { position: absolute; top: -6px; bottom: -6px; left: 80%; width: 2px; background: #fff; }
.dial-ref em {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  translate: -50% 0;
  color: var(--ink-3);
  font: normal 500 10.5px/1 var(--f-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.range {
  --pct: 33.3%;
  display: block;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.range:focus-visible { outline: 0; }
.range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, #fff var(--pct), rgba(255,255,255,.14) var(--pct));
}
.range::-webkit-slider-thumb {
  width: 26px; height: 26px;
  margin-top: -11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.45);
  -webkit-appearance: none;
  appearance: none;
  transition: box-shadow 0.2s;
}
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(10,132,255,.55); }
.range::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); }
.range::-moz-range-progress { height: 4px; border-radius: 2px; background: #fff; }
.range::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.45); }
.range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 5px rgba(10,132,255,.55); }

.dial-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dial-presets button {
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.dial-presets button:hover { background: rgba(255,255,255,.06); }
.dial-presets button.is-on { background: #fff; color: #111; box-shadow: none; }
.dial-foot { margin-top: 20px; color: var(--ink-3); font: 500 11px/1.5 var(--f-mono); letter-spacing: 0.02em; }

.weights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 20px;
  margin-top: clamp(56px, 7vw, 96px);
}
.weight { padding-top: 18px; border-top: 2px solid var(--c); }
.weight h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; font-size: 21px; }
.weight h3 .dot { background: var(--c); }
.weight ul { display: grid; gap: 12px; margin: 0 0 16px; padding: 0; list-style: none; }
.weight li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; color: var(--ink-2); font-size: 14px; line-height: 1.35; }
.weight li b { color: var(--c); font: 800 15px/1 var(--f-dot); }
.weight li::after {
  content: "";
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--c) calc(var(--w) * 1%), rgba(255,255,255,.07) 0);
}
.weight p { color: var(--ink-3); font-size: 13px; line-height: 1.5; }

/* ---------------------------------------------------------------- 05 details */

.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 24px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.tile h3 { margin: auto 0 8px; font-size: 22px; line-height: 1.12; letter-spacing: -0.015em; }
.tile p { color: var(--ink-3); font-size: 14.5px; line-height: 1.55; }
.tile--live { grid-column: span 2; grid-row: span 2; }
.tile--live .la { flex: 1; align-content: center; }
.tile--cool { grid-column: span 2; }

.tile--stat .stat { margin-bottom: auto; color: var(--ink); font: 800 clamp(46px, 4.6vw, 64px)/1 var(--f-dot); letter-spacing: -0.01em; word-spacing: -0.32em; }
.tile--stat p:last-child { margin-top: 24px; }

/* Live Activity on a Lock Screen */
.la {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  margin: 0 0 28px;
  padding: 34px 18px 40px;
  overflow: hidden;
  border-radius: 18px;
  isolation: isolate;
}
.la::before {
  content: "";
  position: absolute;
  inset: -30px;
  z-index: -1;
  background: url("assets/harbor-512.webp") center / cover;
  filter: blur(22px) saturate(1.2) brightness(0.55);
}
.la-island {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 176px;
  height: 36px;
  padding: 0 13px 0 7px;
  border-radius: 20px;
  background: #000;
}
.la-glyph {
  display: grid;
  place-items: center;
  width: 23px; height: 23px;
  border-radius: 50%;
  background: var(--ios-blue);
  color: #fff;
  transition: background-color 0.3s;
}
.la-pct { color: var(--ios-blue); font: 700 15px/1 var(--f-round); transition: color 0.3s; }
.la.is-ready .la-glyph { background: var(--ios-green); }
.la.is-ready .la-pct { color: var(--ios-green); }
.la-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 380px);
  padding: 14px 16px 14px 14px;
  border-radius: 24px;
  background: rgba(30,30,32,.62);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.la-card img { flex: none; border-radius: 8px; }
.la-text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.la-text b { color: #fff; font-size: 14.5px; font-weight: 600; }
.la-text span { color: var(--ios-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.la-text .la-bar { height: 5px; margin-top: 8px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.14); }
.la-bar i { display: block; width: var(--p, 35%); height: 100%; border-radius: 3px; background: var(--ios-blue); transition: width 0.3s var(--ease), background-color 0.3s; }
.la.is-ready .la-bar i { background: var(--ios-green); }
.la-num { flex: none; min-width: 3ch; color: #fff; font: 700 21px/1 var(--f-round); text-align: right; }

/* Cooling down, as the app says it */
.cool-ui {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 28px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #000;
  box-shadow: inset 0 0 0 1px var(--line);
}
.cool-snow { flex: none; margin-top: 1px; color: var(--ios-blue); }
.js .cool-snow { animation: turn 14s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.cool-ui p { flex: 1; color: var(--ios-blue); font-size: 13.5px; line-height: 1.45; }
.cool-skip {
  flex: none;
  padding: 6px 13px;
  border-radius: 20px;
  background: rgba(10,132,255,.16);
  color: var(--ios-blue);
  font-size: 13px;
  font-weight: 600;
}

/* Reports fanned out like the Home tile */
.fan { position: relative; height: 104px; margin: 2px 0 22px; }
.doc {
  position: absolute;
  top: 6px;
  left: calc(var(--k) * 28px + 4px);
  display: grid;
  align-content: start;
  gap: 5px;
  width: 64px;
  height: 84px;
  padding: 9px 8px;
  border-radius: 8px;
  background: #2c2c2e;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 12px 22px -10px rgba(0,0,0,.8);
  transform: rotate(calc(var(--k) * 7deg - 7deg));
  transform-origin: 50% 100%;
  transition: transform 0.4s var(--ease), left 0.4s var(--ease);
}
.doc:nth-child(1) { --k: 0; }
.doc:nth-child(2) { --k: 1; }
.doc:nth-child(3) { --k: 2; }
.doc i { height: 4px; border-radius: 2px; background: rgba(255,255,255,.18); }
.doc i:nth-child(2) { width: 70%; }
.doc--img img { width: 100%; height: 36px; margin-bottom: 2px; border-radius: 4px; object-fit: cover; }
.tile--reports:hover .doc { transform: rotate(calc(var(--k) * 11deg - 11deg)); left: calc(var(--k) * 34px + 4px); }

.boards { display: grid; gap: 6px; margin: 0 0 24px; padding: 0; list-style: none; }
.boards li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  font: 500 12.5px/1.2 var(--f-mono);
}

.share-card {
  display: grid;
  gap: 5px;
  align-self: flex-start;
  margin: 8px 0 26px 6px;
  padding: 13px 16px 15px;
  border-radius: 16px;
  background: linear-gradient(160deg, #2a2342, #16131e);
  box-shadow: inset 0 0 0 1px rgba(158,125,255,.3), 0 18px 30px -14px rgba(0,0,0,.8);
  rotate: -3deg;
  transition: rotate 0.4s var(--ease);
}
.tile--share:hover .share-card { rotate: 1deg; }
.share-app { display: flex; align-items: center; gap: 6px; color: #fff; font-size: 11px; font-weight: 600; }
.share-app img { border-radius: 4px; }
.share-card b { color: var(--violet); font: 800 34px/1 var(--f-round); }
.share-card span:last-child { color: var(--ios-2); font-size: 12px; }

.tile--honest .chip { align-self: flex-start; }

/* ---------------------------------------------------------------- 06 cta */

.cta-inner { display: flex; flex-direction: column; align-items: center; max-width: 760px; margin: 0 auto; text-align: center; }
.cta h2 { font-size: clamp(42px, 6.6vw, 84px); }
.cta-inner > p { max-width: 30em; font-size: 18px; line-height: 1.55; }
.signup--center { width: 100%; max-width: 540px; margin-top: 30px; }
.signup--center .signup-note { margin-left: 0; text-align: center; }
.reqs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-3);
  font: 500 11px/1.4 var(--f-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.reqs li { display: flex; align-items: center; gap: 8px; }
.reqs li::before { content: ""; width: 5px; height: 5px; background: var(--ink-4); }

/* ---------------------------------------------------------------- footer */

.footer { padding-bottom: calc(28px + env(safe-area-inset-bottom)); overflow: hidden; }
.cta { padding-bottom: clamp(40px, 6vw, 72px); }

.wordmark {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(150px, 17vw, 250px);
  overflow: hidden;
}
.wordmark-text {
  position: absolute;
  bottom: -0.23em;
  left: 50%;
  translate: -50% 0;
  color: #1f1f1f;
  font: 400 14.2vw/1 var(--f-display);
  letter-spacing: -0.02em;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
}
.sticker { position: relative; z-index: 1; margin-top: -2%; }
.sticker img {
  width: clamp(104px, 12vw, 164px);
  height: auto;
  border-radius: 22.4%;
  rotate: -7deg;
  box-shadow: 0 0 0 5px #fff, 0 24px 40px -12px rgba(0,0,0,.8);
}
.sticker-chip { position: absolute; top: -10px; right: -74px; rotate: 8deg; box-shadow: 0 8px 18px -8px rgba(0,0,0,.7); }

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 24px;
  padding: 26px 0 18px;
  border-top: 1px solid var(--line);
}
.studio { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 14px; text-decoration: none; }
.studio svg { color: #fff; }
.studio b { color: var(--ink); font-weight: 600; }
.studio:hover b { text-decoration: underline; text-underline-offset: 3px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.footer-links a { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-3); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--ink); }
.credits { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; color: var(--ink-3); font-size: 12.5px; line-height: 1.55; }
.credits p { max-width: 72ch; }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .weights { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--live { grid-row: span 1; }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-copy { max-width: 680px; }
  .hero-visual { width: 100%; max-width: 520px; margin-inline: auto; padding-top: 0; }
  .replay-grid { grid-template-columns: 1fr; }
  .score-grid { grid-template-columns: 1fr; }
  .ane-grid { grid-template-columns: 1fr; grid-template-areas: "copy" "stage" "sweep"; }
  .ane-copy { margin-bottom: 36px; }
  .ane-stage { max-width: 560px; }
  .sweep { max-width: 560px; margin-top: 24px; }
  .rules i:nth-child(1), .rules i:nth-child(3) { display: none; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .thermal { margin-left: auto; }
  .tests { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .ruler { display: none; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav-inner { height: 58px; gap: 12px; }
  .brand { font-size: 17px; }
  .thermal-label { display: none; }
  .sheet span:last-child { display: none; }
  .section-copy p { font-size: 16.5px; }

  .signup-field { flex-direction: column; padding: 6px; border-radius: 22px; }
  .signup input[type="email"] { height: 50px; padding: 0 14px; }
  .signup .btn { width: 100%; height: 50px; }
  .signup-note { margin-left: 4px; }

  .phone { --s: 8.6px; }
  .hero-visual { padding-top: 14px; }
  .f3, .f4, .d2, .d3, .d4 { display: none; }
  .f1 { top: -1%; left: 0; }
  .f2 { top: 40%; right: -1%; }
  .d1 { top: 30%; left: 0; }
  .la { padding: 26px 12px 30px; }
  .la-card { padding: 12px 14px 12px 12px; gap: 10px; }
  .la-text b { font-size: 13.5px; }
  .la-num { font-size: 18px; }
  .tile--honest .chip { margin-bottom: 16px; }

  .tr-body { padding: 18px 16px 8px; }
  .tr-q { max-width: 94%; font-size: 14.5px; }
  .tr-a { font-size: 12.5px; }
  .tr-trace { width: calc(100% - 32px); margin-inline: 16px; }
  .tr-stats { grid-template-columns: repeat(2, 1fr); }
  .tr-stats div { padding: 11px 16px 12px; }
  .tr-stats div:nth-child(3) { border-left: 0; }
  .tr-stats div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .tr-head { padding: 12px 16px; }
  .tr-meta { display: none; }
  .seg button { padding: 8px 14px 7px; }

  .test-viz { min-height: 0; }
  .spec div { grid-template-columns: 76px 1fr; }
  .big-num .doto { font-size: 58px; }

  .sweep button { grid-template-columns: 62px 1fr 40px; gap: 10px; padding: 10px 8px; }

  .weights { grid-template-columns: 1fr; }

  .bento { gap: 12px; }
  .bento > .tile { grid-column: span 2; }
  .bento > .tile--stat { grid-column: span 1; min-height: 0; padding: 20px 18px; }
  .tile--stat p:last-child { font-size: 13.5px; }
  .tile { min-height: 0; padding: 22px 20px; }
  .tile h3 { margin-top: 0; }

  .sticker-chip { right: -56px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 42px; }
  .phone { --s: 8px; }
  .kicker-meta { font-size: 13px; }
  .brand span { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .caret.is-idle { animation: none; }
}
