/* ==========================================================================
   Model Nano — a HummingRelay page.

   PART 1 mirrors src/app/globals.css of the HummingRelay site (same tokens,
   same class names, same proportions). When this page moves into the Next app
   as a route, PART 1 is dropped and globals.css takes over.
   PART 2 is what only Model Nano needs: the on-device console.

   Fonts are local files (SIL OFL 1.1, see fonts/OFL-*.txt). The page makes no
   request outside its own origin.
   ========================================================================== */

/* Same unicode-range as the Google "latin" subset the main site ships: arrows and other
   symbols fall through to the system font, exactly as they do on hmbrd.dev. */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Martian Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("fonts/martian-mono-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* next/font gives the mono face a size-adjusted Arial fallback on the main site; arrows (→ ↗)
   are drawn from it. The same fallback here keeps them the same size and shape. */
@font-face { font-family: "Martian Mono Fallback"; src: local("Arial"); size-adjust: 132%; }

/* ==========================================================================
   PART 1 — HummingRelay design language (from globals.css)
   Near-black field, paper-white blades, one red signal (the eye).
   ========================================================================== */
:root {
  --bg: #060606;
  --bg-raise: #0d0d0d;
  --bg-card: #101010;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --ink: #f1f0ec;
  --ink-2: #b9b8b2;
  --ink-3: #7c7b76;
  --ink-4: #4a4a47;
  --signal: #ff2b2b;
  --signal-soft: rgba(255, 43, 43, 0.14);
  --ok: #d9d8d2;

  --radius: 2px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;

  /* next/font sets these three in the Next app; here they point at the local files */
  --font-display: "Archivo";
  --font-body: "Instrument Sans";
  --font-mono: "Martian Mono";
  --f-display: var(--font-display), "Arial Narrow", sans-serif;
  --f-body: var(--font-body), system-ui, sans-serif;
  --f-mono: var(--font-mono), "Martian Mono Fallback", ui-monospace, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* film grain over everything, very faint */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--signal); color: #fff; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus-visible {
  position: fixed; top: 12px; left: 12px; z-index: 200; width: auto; height: auto; margin: 0;
  padding: 10px 14px; clip: auto; overflow: visible; background: var(--ink); color: #050505;
  font-family: var(--f-mono); font-size: 0.72rem; text-transform: uppercase;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- buttons ---------- */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; gap: 12px; height: var(--h); padding: 0 22px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent; color: var(--ink);
  font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.btn:hover { border-color: var(--ink); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--primary {
  background: var(--ink); border-color: var(--ink); color: #050505;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}
.btn--primary:hover { background: #fff; }
/* the corner cut clips an outside outline, so the focus ring is drawn inside */
.btn--primary:focus-visible { outline-offset: -5px; }
.btn--sm { --h: 40px; padding: 0 16px; font-size: 0.68rem; }
.btn[disabled] { opacity: 0.55; cursor: progress; }

/* ---------- status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 9px;
  border: 1px solid var(--line-strong); border-radius: 99px;
  font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2); white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.pill--signal::before { background: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); animation: blink 2.4s infinite; }
.pill--beta::before { background: var(--ink); }
.pill--roadmap { border-style: dashed; color: var(--ink-3); }
.pill--roadmap::before { background: transparent; border: 1px solid var(--ink-3); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- announcement bar + navigation ---------- */
.topbar {
  border-bottom: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
}
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 9px; padding-bottom: 9px; }
.topbar a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--signal); white-space: nowrap; flex-shrink: 0; }
.topbar .wrap > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--signal);
  margin-right: 10px; vertical-align: 1px; animation: blink 2.4s infinite;
}

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 6, 6, 0.72);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; height: 68px; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand__mark { width: 40px; height: 32px; object-fit: contain; mix-blend-mode: screen; }
.brand__word { font-family: var(--f-display); font-weight: 800; font-stretch: 125%; font-size: 0.95rem; letter-spacing: 0.02em; text-transform: uppercase; }
.nav__links { display: flex; gap: 4px; margin: 0 auto; padding: 0; list-style: none; }
.nav__links a {
  position: relative; display: block; padding: 8px 12px;
  font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3); text-decoration: none; white-space: nowrap; transition: color 0.2s;
}
.nav__links a:hover,
.nav__links a[aria-current="true"] { color: var(--ink); }
.nav__links a[aria-current="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1px; background: var(--signal); }
.nav__toggle {
  display: none; margin-left: auto; width: 44px; height: 44px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink); border-radius: var(--radius); cursor: pointer;
}
.nav__toggle span { display: block; width: 18px; height: 1px; margin: 5px auto; background: currentColor; transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav__signin {
  font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3); text-decoration: none; white-space: nowrap;
}
.nav__signin:hover { color: var(--ink); }
@media (max-width: 980px) {
  .nav__toggle { display: block; }
  .nav__cta, .nav__signin { display: none; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0;
    padding: 8px var(--gutter) 24px; background: var(--bg); /* opaque: globals.css uses 0.97 and the hero shows through */ border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0s 0.25s;
  }
  .nav__links.is-open { transform: none; opacity: 1; visibility: visible; transition: opacity 0.25s, transform 0.25s var(--ease); }
  .nav__links a { padding: 14px 0; font-size: 0.78rem; border-bottom: 1px solid var(--line); }
  .nav__links a[aria-current="true"]::after { display: none; }
  .nav__links .nav__mobile-cta { padding-top: 16px; }
  .nav__links .nav__mobile-cta .btn { border-bottom: 0; padding: 0 22px; display: inline-flex; color: #050505; font-size: 0.74rem; }
}
@media (min-width: 981px) { .nav__mobile-cta, .nav__mobile-only { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(48px, 8vw, 110px) 0 0; overflow: hidden; isolation: isolate; }
/* blade-like diagonal hatching echoing the wing feathers */
.hero::before {
  content: ""; position: absolute; inset: -20% -10% 0 35%; z-index: -2;
  background: repeating-linear-gradient(-32deg, transparent 0 46px, rgba(255, 255, 255, 0.028) 46px 47px);
  mask-image: radial-gradient(60% 60% at 60% 40%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(60% 60% at 60% 40%, #000, transparent 75%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 24px; }
.hero__copy { position: relative; z-index: 2; }
.hero__eyebrow { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.hero h1 {
  margin: 0; font-family: var(--f-display); font-weight: 800; font-stretch: 118%;
  font-size: clamp(2.6rem, 6.2vw, 5.9rem); line-height: 0.94; letter-spacing: -0.035em;
}
.hero h1 .cut { display: block; color: transparent; -webkit-text-stroke: 1px rgba(241, 240, 236, 0.55); }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: inline-block; animation: rise 1s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
.hero__lead { max-width: 34rem; margin: 30px 0 36px; font-size: clamp(1.02rem, 1.3vw, 1.18rem); color: var(--ink-2); animation: fade 1s var(--ease) 0.5s both; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; animation: fade 1s var(--ease) 0.65s both; }
.hero__note { max-width: 36rem; margin: 22px 0 0; color: var(--ink-3); font-size: 0.86rem; animation: fade 1s var(--ease) 0.8s both; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.hero__art { position: relative; aspect-ratio: 1000 / 784; margin-right: calc(var(--gutter) * -1.2); animation: arrive 1.6s var(--ease) 0.1s both; }
@keyframes arrive { from { opacity: 0; transform: translate(-6%, 4%) scale(0.96); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.hero__bird { position: absolute; inset: 0; animation: hover 5.5s ease-in-out infinite; }
.hero__bird img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: screen; }
@keyframes hover { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(-0.6%, -2.2%) rotate(-0.8deg); } }
/* the eye: a red point that breathes */
.hero__eye {
  position: absolute; left: 67.6%; top: 40.2%; width: 7%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 43, 43, 0.55), rgba(255, 43, 43, 0) 70%);
  mix-blend-mode: screen; animation: breathe 3.2s ease-in-out infinite; pointer-events: none;
}
@keyframes breathe { 0%, 100% { opacity: 0.35; transform: translate(-50%, -50%) scale(0.8); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); } }
/* a leader drops from the beak tip to the label under it */
.hero__leader {
  position: absolute; left: 93.2%; top: 48%; height: 29%; width: 1px;
  background: linear-gradient(180deg, var(--line-strong), rgba(255, 255, 255, 0.28));
  overflow: hidden; transform-origin: top; animation: draw 0.9s var(--ease) 1.1s both;
}
.hero__leader::before {
  content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 40%; transform: translateY(-100%);
  background: linear-gradient(180deg, transparent, var(--signal), transparent); animation: packet-v 2.4s linear 2s infinite;
}
@keyframes draw { from { transform: scaleY(0); } to { transform: none; } }
.hero__endpoint {
  position: absolute; right: 3%; top: 77%; display: grid; gap: 4px; padding: 9px 12px 10px;
  border: 1px solid var(--line-strong); background: rgba(6, 6, 6, 0.85); backdrop-filter: blur(6px);
  font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.03em; color: var(--ink-2); white-space: nowrap;
  animation: fade 1s var(--ease) 1.6s both;
}
.hero__endpoint-head { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.hero__endpoint-status { padding: 1px 5px; border: 1px solid rgba(255, 43, 43, 0.45); color: var(--signal); }
.hero__endpoint b { color: var(--ink-3); font-weight: 400; }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__art { order: -1; width: min(92%, 520px); margin: -10px auto -20px; }
  .hero__endpoint, .hero__leader { display: none; }
}

/* ---------- relay schematic ---------- */
.relay {
  position: relative; margin-top: clamp(48px, 7vw, 96px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent);
}
.relay__grid { display: grid; grid-template-columns: 1fr 64px 1.1fr 64px 1fr; align-items: center; padding-top: 28px; padding-bottom: 28px; }
.relay__node { padding: 16px 18px; border: 1px solid var(--line-strong); background: var(--bg); min-width: 0; }
.relay__node .mono { color: var(--ink-3); font-size: 0.6rem; }
.relay__node code { display: block; margin-top: 6px; font-family: var(--f-mono); font-size: 0.72rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relay__node--core { position: relative; border-color: var(--ink); display: flex; align-items: center; gap: 14px; }
.relay__node--core::after { content: ""; position: absolute; inset: 4px; border: 1px solid var(--line); pointer-events: none; }
.relay__node--core img { width: 46px; height: 36px; object-fit: contain; mix-blend-mode: screen; }
.relay__node--core strong { display: block; font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 0.9rem; text-transform: uppercase; }
.relay__stack { display: grid; gap: 6px; }
.relay__stack .relay__node { padding: 9px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.relay__stack .relay__node code { margin: 0; font-size: 0.66rem; }
.relay__stack .relay__node:not(:first-child) { border-style: dashed; border-color: var(--line-strong); }
.relay__stack .relay__node:not(:first-child) code { color: var(--ink-3); }
.relay__wire { position: relative; height: 1px; background: var(--line-strong); overflow: hidden; }
.relay__wire::after {
  content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 1px; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--signal), transparent);
  animation: packet 2.2s linear infinite; animation-delay: var(--d, 0s);
}
/* globals.css moves the packet with left/top; here it is a transform, so the animation stays
   on the compositor and the main thread idles (this page shares the machine with a model) */
@keyframes packet { to { transform: translateX(250%); } }
@keyframes packet-v { to { transform: translateY(250%); } }
.relay__caption { margin: 0; padding-bottom: 18px; color: var(--ink-3); font-size: 0.8rem; }
@media (max-width: 860px) {
  .relay__grid { grid-template-columns: 1fr; grid-template-rows: auto 36px auto 36px auto; }
  .relay__wire { width: 1px; height: 100%; margin: 0 auto; }
  .relay__wire::after { width: 1px; height: 40%; transform: translateY(-100%); background: linear-gradient(180deg, transparent, var(--signal), transparent); animation-name: packet-v; }
}

/* ---------- sections — shared ---------- */
.section { position: relative; padding: clamp(80px, 11vw, 150px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section__head { display: grid; grid-template-columns: minmax(180px, 0.32fr) 1fr; gap: 24px 48px; margin-bottom: clamp(40px, 6vw, 72px); }
.section__index { display: flex; align-items: flex-start; gap: 10px; padding-top: 10px; color: var(--ink-3); }
.section__index::before { content: ""; flex-shrink: 0; width: 10px; height: 10px; margin-top: 1px; background: var(--signal); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.section__title {
  margin: 0; font-family: var(--f-display); font-weight: 800; font-stretch: 112%;
  font-size: clamp(2rem, 4.4vw, 3.8rem); line-height: 1; letter-spacing: -0.03em; max-width: 18ch;
}
.section__title em { font-style: normal; color: var(--ink-3); }
.section__intro { grid-column: 2; max-width: 40rem; margin: 0; color: var(--ink-2); font-size: 1.05rem; }
@media (max-width: 760px) {
  .section__head { grid-template-columns: 1fr; }
  .section__intro { grid-column: 1; }
  .section__index { padding-top: 0; }
}

/* ---------- models ---------- */
.models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); }
.model { position: relative; display: flex; flex-direction: column; padding: 28px 28px 24px; min-width: 0; transition: background 0.35s; }
.model + .model { border-left: 1px solid var(--line); }
.model:hover { background: var(--bg-raise); }
.model::before { content: ""; position: absolute; top: -1px; left: -1px; width: 0; height: 2px; background: var(--ink); transition: width 0.5s var(--ease); }
.model:hover::before { width: calc(100% + 2px); }
.model__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 40px; }
.model__family { color: var(--ink-3); }
.model h3 { margin: 0 0 10px; font-family: var(--f-display); font-weight: 800; font-stretch: 125%; font-size: clamp(1.5rem, 2.2vw, 2rem); letter-spacing: -0.02em; line-height: 1; }
.model__id { display: inline-block; margin-bottom: 18px; font-family: var(--f-mono); font-size: 0.68rem; color: var(--ink-3); }
.model__summary { margin: 0 0 20px; color: var(--ink-2); min-height: 3.1em; }
.model__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 28px; padding: 0; list-style: none; }
.model__tags li { padding: 4px 8px; border: 1px solid var(--line); font-size: 0.78rem; color: var(--ink-2); }
.specs { margin: auto 0 0; border-top: 1px solid var(--line); }
.spec { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.spec dt { font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.spec dd { margin: 0; font-family: var(--f-mono); font-size: 0.72rem; text-align: right; }
.spec dd.is-pending { color: var(--ink-4); }
.models__note { display: flex; gap: 14px; align-items: flex-start; margin: 20px 0 0; color: var(--ink-3); font-size: 0.86rem; max-width: 52rem; }
.models__note::before {
  content: "i"; flex-shrink: 0; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 2px;
  border: 1px solid var(--ink-4); border-radius: 50%; font-family: var(--f-mono); font-size: 0.6rem;
}
@media (max-width: 960px) {
  .models { grid-template-columns: 1fr; }
  .model + .model { border-left: 0; border-top: 1px solid var(--line); }
  .model__top { margin-bottom: 24px; }
  .model__summary { min-height: 0; }
}

/* ---------- developers: steps + terminal ---------- */
.dev { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 0 0 30px 56px; counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 2px; font-family: var(--f-mono); font-size: 0.7rem; color: var(--ink-3); }
.steps li::after { content: ""; position: absolute; left: 9px; top: 26px; bottom: 6px; width: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h3 { margin: 0 0 6px; font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: 1.15rem; }
.steps p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.steps code,
.inline-code { font-family: var(--f-mono); font-size: 0.8em; padding: 1px 6px; border: 1px solid var(--line); background: var(--bg-raise); color: var(--ink); }

.terminal { position: relative; border: 1px solid var(--line-strong); background: #0a0a0a; min-width: 0; }
.terminal::before {
  /* corner cut, like the logo's blade tips */
  content: ""; position: absolute; top: -1px; right: -1px; width: 22px; height: 22px; z-index: 2;
  background: linear-gradient(225deg, var(--bg) 50%, var(--line-strong) 50%, var(--line-strong) calc(50% + 1px), transparent calc(50% + 1px));
}
.terminal__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 28px 0 0; border-bottom: 1px solid var(--line); }
.tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
.tabs button {
  position: relative; height: 44px; padding: 0 18px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink-3);
  font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; white-space: nowrap;
}
.tabs button[aria-selected="true"] { color: var(--ink); background: var(--bg-raise); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--signal); }
.tabs button:focus-visible { outline-offset: -3px; }
.copy-btn {
  height: 30px; padding: 0 12px; border: 1px solid var(--line); background: transparent; color: var(--ink-3);
  font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; flex-shrink: 0;
}
.copy-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.code { margin: 0; padding: 22px 22px 26px; overflow-x: auto; font-family: var(--f-mono); font-size: 0.74rem; line-height: 1.85; color: var(--ink-2); tab-size: 2; }
.code code { font: inherit; }
.code .t-k { color: #f1f0ec; font-weight: 600; }
.code .t-s { color: #ff8a80; }
.code .t-c { color: var(--ink-3); font-style: italic; }
.code .t-n { color: #e8c37a; }
.code .t-f { color: #f1f0ec; }
.code .t-hl { color: #fff; background: var(--signal-soft); box-shadow: inset 0 -1px 0 var(--signal); }
.terminal__response { border-top: 1px solid var(--line); }
.terminal__response summary { display: flex; justify-content: space-between; align-items: center; padding: 12px 22px; cursor: pointer; list-style: none; color: var(--ink-3); }
.terminal__response summary::-webkit-details-marker { display: none; }
.terminal__response summary::after { content: "+"; font-family: var(--f-mono); }
.terminal__response[open] summary::after { content: "−"; }
.terminal__response .code { padding-top: 4px; font-size: 0.7rem; }
.dev__foot { margin: 14px 0 0; color: var(--ink-3); font-size: 0.82rem; }
@media (max-width: 960px) { .dev { grid-template-columns: minmax(0, 1fr); } }

/* ---------- platform: two columns of capabilities ---------- */
.platform { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); }
.platform__col { padding: clamp(24px, 3vw, 40px); min-width: 0; }
.platform__col + .platform__col { border-left: 1px solid var(--line); background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(255, 255, 255, 0.012) 10px 11px); }
.platform__col-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.platform__col-head h3 { margin: 0; font-family: var(--f-display); font-stretch: 118%; font-weight: 800; font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.01em; }
.caps { margin: 0; padding: 0; list-style: none; }
.cap { padding: 22px 0; border-bottom: 1px dashed var(--line); }
.cap:last-child { border-bottom: 0; padding-bottom: 0; }
.cap h4 { margin: 0 0 6px; font-size: 1.04rem; font-weight: 600; }
.platform__col + .platform__col .cap h4 { color: var(--ink-2); }
.cap p { margin: 0; color: var(--ink-3); font-size: 0.93rem; }
@media (max-width: 860px) {
  .platform { grid-template-columns: 1fr; }
  .platform__col + .platform__col { border-left: 0; border-top: 1px solid var(--line); }
}
.policy {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px 32px; margin-top: 24px;
  padding: 28px clamp(20px, 3vw, 36px); border: 1px solid var(--line-strong); border-left: 2px solid var(--signal); background: var(--bg-raise);
}
.policy__label { color: var(--signal); }
.policy h3 { margin: 0 0 6px; font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: 1.25rem; }
.policy p { margin: 0; color: var(--ink-2); font-size: 0.95rem; max-width: 50rem; }
@media (max-width: 860px) { .policy { grid-template-columns: 1fr; } }

/* ---------- pricing card (used for the session read-out) ---------- */
.plan { position: relative; display: flex; flex-direction: column; padding: 30px 28px 28px; border: 1px solid var(--line); background: var(--bg); min-width: 0; }
.plan--hl { border-color: var(--ink-3); background: linear-gradient(180deg, var(--bg-raise), var(--bg)); }
.plan--hl::before { content: ""; position: absolute; top: -1px; left: 28px; width: 48px; height: 2px; background: var(--signal); }
.plan__name { margin: 0 0 6px; font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 1.5rem; text-transform: uppercase; }
.plan__aud { margin: 0 0 26px; color: var(--ink-3); font-size: 0.92rem; }
.plan__price { display: flex; align-items: baseline; gap: 10px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 0 22px; }
.plan__price strong { font-family: var(--f-display); font-weight: 800; font-stretch: 112%; font-size: 2.2rem; line-height: 1; }
.plan__price strong.is-pending { color: var(--ink-4); }
.plan__price span { color: var(--ink-3); }
.plan .btn { margin-top: auto; justify-content: space-between; }

/* ---------- form controls ---------- */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; min-width: 0; }
.field > label,
.field > .label { font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 0.98rem; line-height: 1.5; resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.textarea::placeholder { color: var(--ink-3); }
.textarea:hover { border-color: var(--ink-3); }
.textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06); }
.field__hint { margin: 0; font-size: 0.8rem; color: var(--ink-3); }
.notice { margin-top: 20px; padding: 18px 20px; border: 1px solid var(--line-strong); font-size: 0.92rem; color: var(--ink-2); }
.notice strong { display: block; margin-bottom: 4px; color: var(--ink); }
.notice--error { border-left: 2px solid var(--signal); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: grid; grid-template-columns: 56px 1fr 28px; align-items: center; gap: 12px; padding: 24px 0; cursor: pointer; list-style: none;
  font-family: var(--f-display); font-stretch: 108%; font-weight: 600; font-size: clamp(1.05rem, 1.6vw, 1.3rem); transition: color 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: #fff; }
.faq summary .mono { color: var(--ink-3); font-stretch: 100%; }
.faq summary i { position: relative; width: 14px; height: 14px; justify-self: end; }
.faq summary i::before,
.faq summary i::after { content: ""; position: absolute; top: 50%; left: 0; width: 14px; height: 1px; background: var(--ink-2); transition: transform 0.3s var(--ease); }
.faq summary i::after { transform: rotate(90deg); }
.faq details[open] summary i::after { transform: rotate(0deg); }
.faq details[open] summary .mono { color: var(--signal); }
.faq__a { padding: 0 40px 28px 68px; color: var(--ink-2); max-width: 54rem; }
.faq__a p { margin: 0 0 12px; }
.faq__a p:last-child { margin: 0; }
@media (max-width: 600px) {
  .faq summary { grid-template-columns: 36px 1fr 20px; }
  .faq__a { padding: 0 0 24px 48px; }
}

/* ---------- final CTA + footer ---------- */
.final { position: relative; padding: clamp(80px, 12vw, 160px) 0; border-top: 1px solid var(--line); overflow: hidden; text-align: center; }
.final__bird { position: absolute; left: 50%; top: 50%; width: min(900px, 120vw); max-width: none; transform: translate(-50%, -50%); opacity: 0.09; mix-blend-mode: screen; pointer-events: none; }
.final h2 {
  position: relative; margin: 0 auto 28px; font-family: var(--f-display); font-weight: 800; font-stretch: 118%;
  font-size: clamp(2.2rem, 5.4vw, 4.8rem); line-height: 0.98; letter-spacing: -0.035em; max-width: 16ch;
}
.final p { position: relative; margin: 0 auto 36px; max-width: 34rem; color: var(--ink-2); }
.final .hero__ctas { justify-content: center; position: relative; animation: none; }

.footer { border-top: 1px solid var(--line); padding: 56px 0 32px; }
.footer__top { display: grid; grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr)); gap: 40px; padding-bottom: 48px; }
.footer__brand p { margin: 14px 0 0; color: var(--ink-3); font-size: 0.9rem; max-width: 24rem; }
.footer h4 { margin: 0 0 16px; font-family: var(--f-mono); font-weight: 400; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.footer li a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); text-decoration: none; font-size: 0.94rem; }
.footer li a:hover { color: var(--ink); }
.footer__word {
  font-family: var(--f-display); font-weight: 900; font-stretch: 125%; font-size: clamp(1.6rem, 7.6vw, 7.3rem); line-height: 0.8; letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.12); white-space: nowrap; overflow: hidden; user-select: none;
}
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 0.82rem; }
.footer__bottom strong { color: var(--ink); font-weight: 600; }
.footer__bottom a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom a:hover { color: var(--ink); }
@media (max-width: 760px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

/* ==========================================================================
   PART 2 — Model Nano only
   ========================================================================== */

/* ---------- which view is on screen ---------- */
body[data-view="app"] { height: 100dvh; overflow: hidden; }
body[data-view="app"] .topbar,
body[data-view="app"] .landing,
body[data-view="app"] .nav__links,
body[data-view="app"] .nav__toggle,
body[data-view="app"] .nav__signin,
body[data-view="app"] .nav__cta,
body[data-view="landing"] .nav__about { display: none; }
body[data-view="app"] .nav { border-bottom-color: var(--line); }
body[data-view="app"] .nav .wrap { max-width: none; gap: 16px; }
body[data-view="app"] .nav__about { margin-left: auto; gap: 0; }

/* the product name next to the HummingRelay brand */
.brand__sub {
  padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--line-strong);
  font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap;
}
.nav__flag { flex-shrink: 0; }
body[data-view="landing"] .nav__flag { margin-left: -16px; }
.nav__links a[target="_blank"]::after { content: " ↗"; color: var(--ink-3); }
@media (max-width: 1280px) { body[data-view="landing"] .brand__sub { display: none; } }
@media (max-width: 560px) {
  .nav .wrap { gap: 12px; }
  body[data-view="landing"] .nav__flag { margin-left: 0; }
  body[data-view="app"] .brand__word { display: none; }
  body[data-view="app"] .brand__sub { border-left: 0; padding-left: 0; }
  body[data-view="app"] .nav__about { padding: 0 12px; }
  .nav__about span { display: none; }
}

/* ---------- hero: this device ---------- */
.hero__device {
  display: flex; align-items: baseline; gap: 10px; max-width: 36rem; margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 0.66rem; line-height: 1.6; letter-spacing: 0.03em; color: var(--ink-2);
  animation: fade 1s var(--ease) 0.95s both;
}
.hero__device dt { flex-shrink: 0; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.hero__device dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.hero__device dd::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--ink-3); vertical-align: 1px; }
.hero__device.is-ok dd::before { background: var(--ok); }
.hero__device.is-bad dd::before { background: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
@media (max-width: 560px) {
  .hero__device { flex-direction: column; gap: 4px; }
  .hero__ctas .btn { flex: 1 1 100%; justify-content: space-between; }
}

/* ---------- model card: one model, two panes ---------- */
.models--solo { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.models--solo .model__summary { min-height: 0; }
.models--solo .specs { margin-top: 0; }
.models__note a, .dev__foot a, .faq__a a, .section__intro a { color: var(--ink-2); text-decoration-color: var(--signal); text-underline-offset: 3px; }
.models__note a:hover, .dev__foot a:hover, .faq__a a:hover { color: var(--ink); }
@media (max-width: 960px) { .models--solo { grid-template-columns: 1fr; } }

/* ---------- speed ---------- */
.speed { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: stretch; }
.bench { padding: clamp(22px, 3vw, 36px); border: 1px solid var(--line); min-width: 0; }
.bench__wait { margin: 0; color: var(--ink-3); font-family: var(--f-mono); font-size: 0.7rem; }
.bench--pending { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; min-height: 240px; border-style: dashed; border-color: var(--line-strong); }
.bench__state { margin: 0; font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.1; }
.bench__text { margin: 0; max-width: 40rem; color: var(--ink-2); font-size: 0.95rem; }
.bench__why { margin: 0; font-family: var(--f-mono); font-size: 0.66rem; line-height: 1.6; color: var(--ink-3); overflow-wrap: anywhere; }
.bench__hw { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 26px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: 0.7rem; line-height: 1.6; overflow-wrap: anywhere; }
.bench__hw span { color: var(--ink-3); font-size: 0.62rem; letter-spacing: 0.05em; text-transform: uppercase; }
.bars { display: grid; gap: 24px; margin: 0; padding: 0; list-style: none; }
.bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 10px; }
.bar-name { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.bar-val { font-family: var(--f-mono); font-size: 0.86rem; white-space: nowrap; }
.bar-val small { font-size: 0.62rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.bar-track { height: 8px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--ink-3); transform-origin: left; animation: grow 0.9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.bar-own .bar-track i { background: var(--ink); }
.bar-own .bar-name::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; background: var(--signal); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.bar-own .bar-name::after { content: "this page"; margin-left: 10px; font-family: var(--f-mono); font-weight: 400; font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.bar-none .bar-val { font-size: 0.7rem; color: var(--ink-3); }
.bar-none .bar-track { background: repeating-linear-gradient(-45deg, var(--line) 0 1px, transparent 1px 7px); }
.bar-note { margin: 8px 0 0; color: var(--ink-3); font-size: 0.86rem; }
.session .plan__price strong { font-size: clamp(2.6rem, 4vw, 3.4rem); font-variant-numeric: tabular-nums; }
.session .plan__price strong.is-pending { font-family: var(--f-mono); font-weight: 300; font-size: 1.6rem; }
.session .plan__aud { margin-bottom: 22px; }
@media (max-width: 960px) { .speed { grid-template-columns: 1fr; } }

/* ==========================================================================
   The console: loading stage, chat, session panel
   ========================================================================== */
.app { height: calc(100dvh - 69px); display: flex; flex-direction: column; }

/* ---------- stage: loading, no WebGPU, error ---------- */
.stage { flex: 1; overflow: auto; display: grid; place-items: center; padding: clamp(20px, 5vw, 56px) var(--gutter); }
.stage__card { position: relative; width: min(100%, 680px); padding: clamp(22px, 3.2vw, 40px); border: 1px solid var(--line-strong); background: var(--bg-raise); }
.stage__card::before {
  content: ""; position: absolute; top: -1px; right: -1px; width: 22px; height: 22px;
  background: linear-gradient(225deg, var(--bg) 50%, var(--line-strong) 50%, var(--line-strong) calc(50% + 1px), transparent calc(50% + 1px));
}
.stage__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 22px; }
.stage__clock { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.04em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.stage__title { margin: 0; font-family: var(--f-display); font-weight: 800; font-stretch: 118%; font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1; letter-spacing: -0.03em; text-wrap: balance; }
.stage__text { margin: 16px 0 0; color: var(--ink-2); }
.stage__reason { margin: 18px 0 0; padding: 14px 16px; border: 1px solid var(--line-strong); border-left: 2px solid var(--signal); font-family: var(--f-mono); font-size: 0.72rem; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.stage__reason:empty { display: none; }
.stage__list { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.stage__list li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: 0.94rem; }
.stage__list a, .stage__text a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.stage__list a:hover, .stage__text a:hover { text-decoration-color: var(--signal); }
.stage__list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 10px; height: 1px; background: var(--ink-3); }
.stage__error { margin: 18px 0 0; padding: 14px 16px; max-height: 240px; overflow: auto; border: 1px solid var(--line-strong); border-left: 2px solid var(--signal); background: #0a0a0a; font-family: var(--f-mono); font-size: 0.72rem; line-height: 1.7; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.stage__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.stage__note { margin: 20px 0 0; color: var(--ink-3); font-size: 0.86rem; }

.phases { margin: 26px 0 0; padding: 0; list-style: none; }
.phase { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: baseline; padding: 18px 0 0; }
.phase-no { font-family: var(--f-mono); font-size: 0.66rem; color: var(--ink-3); }
.phase-name { font-weight: 600; color: var(--ink-3); }
.phase-val { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.02em; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.phase-bar { grid-column: 1 / -1; height: 2px; background: var(--line); overflow: hidden; }
.phase-bar i { display: block; width: 0; height: 100%; background: var(--ink-2); }
.phase[data-state="run"] .phase-name, .phase[data-state="run"] .phase-val, .phase[data-state="run"] .phase-no { color: var(--ink); }
.phase[data-state="run"] .phase-bar i { background: var(--signal); }
.phase[data-state="done"] .phase-name { color: var(--ink-2); }
.phase.indet[data-state="run"] .phase-bar i { width: 35%; animation: slide 1.1s ease-in-out infinite alternate; }
@keyframes slide { from { transform: translateX(-20%); } to { transform: translateX(205%); } }

/* ---------- chat ---------- */
.chat { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.chat__main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.chat__bar { flex: none; display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 var(--gutter); border-bottom: 1px solid var(--line); }
.chat__status { flex-shrink: 0; }
.chat__bar-actions { display: flex; gap: 8px; margin-left: auto; }
.chat__bar .btn { --h: 34px; padding: 0 12px; font-size: 0.62rem; gap: 8px; }
.strip { display: none; }
.only-narrow { display: none; }

.thread { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-color: var(--ink-4) transparent; }
.thread__inner { display: flex; flex-direction: column; max-width: 920px; min-height: 100%; margin: 0 auto; padding: 12px var(--gutter) 24px; }

.empty { margin: auto 0; padding: 24px 0 32px; }
.empty__eyebrow { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.empty h2 { margin: 0 0 14px; font-family: var(--f-display); font-weight: 800; font-stretch: 118%; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 0.98; letter-spacing: -0.035em; }
.empty__text { max-width: 34rem; margin: 0; color: var(--ink-2); }
.starters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 32px; border: 1px solid var(--line); }
.starter { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 18px 18px 20px; border: 0; background: transparent; text-align: left; transition: background 0.35s; }
.starter + .starter { border-left: 1px solid var(--line); }
.starter:hover { background: var(--bg-raise); }
.starter::before { content: ""; position: absolute; top: -1px; left: -1px; width: 0; height: 2px; background: var(--ink); transition: width 0.5s var(--ease); }
.starter:hover::before { width: calc(100% + 2px); }
.starter:focus-visible { outline-offset: -3px; }
.starter b { font-family: var(--f-mono); font-weight: 400; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.starter span { color: var(--ink-2); font-size: 0.94rem; line-height: 1.4; }

/* a message is a row of the log: mono role label, then the text */
.msg { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 0 24px; min-width: 0; padding: 22px 0; border-bottom: 1px solid var(--line); }
.msg > * { grid-column: 2; min-width: 0; }
.msg-role { grid-column: 1; grid-row: 1 / span 4; display: flex; align-items: flex-start; gap: 8px; margin: 0; padding-top: 5px; font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.msg-bot .msg-role { color: var(--ink-2); }
.msg-bot .msg-role::before { content: ""; flex-shrink: 0; width: 8px; height: 8px; margin-top: 2px; background: var(--ink-3); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.msg-bot.live .msg-role::before { background: var(--signal); }
.msg-user .msg-body { color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-bot .msg-body { min-height: 1.55em; overflow-wrap: anywhere; }
.msg-bot.live .msg-body > :last-child::after,
.msg-bot.live .msg-body:empty::after { content: ""; display: inline-block; width: 0.5em; height: 1.05em; margin-left: 3px; background: var(--signal); vertical-align: -0.18em; animation: caret 0.9s steps(1) infinite; }
.msg-bot.live .msg-body > figure:last-child::after,
.msg-bot.live .msg-body > ul:last-child::after,
.msg-bot.live .msg-body > ol:last-child::after { display: none; }
@keyframes caret { 50% { opacity: 0; } }
.msg-foot { margin: 14px 0 0; font-family: var(--f-mono); font-size: 0.62rem; line-height: 1.6; letter-spacing: 0.03em; color: var(--ink-3); }
.msg[data-finish="abort"] .msg-foot,
.msg[data-finish="length"] .msg-foot { color: var(--ink-2); }
.msg-void { margin: 0; color: var(--ink-3); }
.msg-error { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line-strong); border-left: 2px solid var(--signal); font-size: 0.92rem; }
.msg-error pre { margin: 8px 0 0; font-family: var(--f-mono); font-size: 0.72rem; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }

.think { margin-bottom: 16px; border: 1px dashed var(--line-strong); }
.think summary { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none; font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.think summary::-webkit-details-marker { display: none; }
.think summary::before { content: "+"; width: 8px; }
.think[open] summary::before { content: "−"; }
.think summary:hover { color: var(--ink-2); }
.think summary:focus-visible { outline-offset: -3px; }
.think summary i { margin-left: auto; font-style: normal; text-transform: none; letter-spacing: 0.02em; }
.think.running summary span::after { content: " · live"; color: var(--signal); }
.think-body { padding: 2px 14px 14px 32px; font-size: 0.9rem; line-height: 1.6; color: var(--ink-3); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Markdown from the model */
.md > * { margin: 0; }
.md > :not(:first-child) { margin-top: 0.85em; }
.md h3, .md h4, .md h5, .md h6 { font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: 1.2rem; line-height: 1.2; }
.md h4 { font-size: 1.08rem; }
.md h5, .md h6 { font-size: 1rem; }
.md > :is(h3, h4, h5, h6):not(:first-child) { margin-top: 1.4em; }
.md ul, .md ol { display: grid; gap: 0.4em; padding-left: 1.6em; }
.md ul { list-style: none; }
.md ul > li { position: relative; }
.md ul > li::before { content: ""; position: absolute; left: -1.3em; top: 0.72em; width: 10px; height: 1px; background: var(--ink-3); }
.md ol > li::marker { font-family: var(--f-mono); font-size: 0.72em; color: var(--ink-3); }
.md li > ul, .md li > ol { margin-top: 0.4em; }
.md a { color: var(--ink); text-decoration-color: var(--signal); text-underline-offset: 3px; }
.md a:hover { color: #fff; }
.md blockquote { margin-left: 0; margin-right: 0; padding: 2px 0 2px 16px; border-left: 2px solid var(--signal); color: var(--ink-2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.3em 0; }
.md strong { font-weight: 600; color: #fff; }
.md code, .think-body code, .stage__list code, .stage__text code { font-family: var(--f-mono); font-size: 0.8em; padding: 1px 6px; border: 1px solid var(--line); background: var(--bg-raise); color: var(--ink); overflow-wrap: anywhere; }

/* a fenced block from the model — the terminal of the landing, without tabs */
.codeblock { position: relative; margin: 0; border: 1px solid var(--line-strong); background: #0a0a0a; min-width: 0; }
.codeblock__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 40px; padding: 0 6px 0 16px; border-bottom: 1px solid var(--line); }
.codeblock__lang { font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.codeblock .copy-btn { height: 28px; }
.copy-btn.ok { color: var(--ink); border-color: var(--ink-3); }
.codeblock pre { margin: 0; padding: 16px 18px 18px; overflow-x: auto; font-family: var(--f-mono); font-size: 0.74rem; line-height: 1.75; color: var(--ink-2); tab-size: 2; scrollbar-color: var(--ink-4) transparent; }
.codeblock pre code { padding: 0; border: 0; background: none; font-size: inherit; color: inherit; white-space: pre; overflow-wrap: normal; }

/* ---------- composer ---------- */
.composer { flex: none; padding: 12px var(--gutter) 16px; border-top: 1px solid var(--line); }
.composer__box { display: flex; align-items: flex-end; gap: 10px; max-width: calc(920px - var(--gutter) * 2); margin: 0 auto; padding: 8px 8px 8px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-raise); transition: border-color 0.2s, box-shadow 0.2s; }
.composer__box:hover { border-color: var(--ink-3); }
.composer__box:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06); }
.composer__prompt { align-self: flex-start; padding-top: 11px; font-family: var(--f-mono); font-size: 0.8rem; color: var(--ink-3); user-select: none; }
.composer textarea { flex: 1; min-width: 0; max-height: 200px; padding: 9px 0; border: 0; outline: 0; background: none; resize: none; font-size: 1rem; line-height: 1.45; }
.composer textarea::placeholder { color: var(--ink-3); }
.send {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; min-width: 42px; padding: 0 12px;
  border: 1px solid var(--ink); border-radius: var(--radius); background: var(--ink); color: #050505;
  font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.send:hover { background: #fff; }
.send:focus-visible { outline-offset: -5px; }
.send__go { font-size: 1rem; line-height: 1; }
.send__stop { display: none; }
.send__stop::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--signal); }
body.generating .send { clip-path: none; background: transparent; border-color: var(--line-strong); color: var(--ink); padding: 0 14px; }
body.generating .send:hover { border-color: var(--ink); }
body.generating .send:focus-visible { outline-offset: 3px; }
body.generating .send__go { display: none; }
body.generating .send__stop { display: inline-flex; align-items: center; }
.composer__hint { max-width: calc(920px - var(--gutter) * 2); margin: 10px auto 0; font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
kbd { padding: 1px 5px; border: 1px solid var(--line-strong); font-family: var(--f-mono); font-size: 1em; color: var(--ink-2); }

/* ---------- session panel ---------- */
.rail { min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-left: 1px solid var(--line); background: var(--bg); scrollbar-color: var(--ink-4) transparent; }
.rail__head { align-items: center; justify-content: space-between; height: 68px; padding: 0 12px 0 24px; border-bottom: 1px solid var(--line); }
.rail__head h2 { margin: 0; font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 0.95rem; letter-spacing: 0.02em; text-transform: uppercase; }
.rail__close { position: relative; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent; }
.rail__close::before, .rail__close::after { content: ""; position: absolute; top: 50%; left: 50%; width: 18px; height: 1px; margin-left: -9px; background: var(--ink); transform: rotate(45deg); }
.rail__close::after { transform: rotate(-45deg); }
.panel { padding: 26px 28px 28px; }
.panel + .panel { border-top: 1px solid var(--line); }
.panel__title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 20px; font-family: var(--f-mono); font-weight: 400; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.panel__title span { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); }
.panel__title span::before { content: ""; width: 8px; height: 8px; background: var(--signal); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.panel__title i { font-style: normal; text-transform: none; letter-spacing: 0.02em; }
.link-btn { padding: 0; border: 0; border-bottom: 1px solid var(--signal); background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink-2); }
.link-btn:hover { color: var(--ink); }
.tps { display: flex; align-items: baseline; gap: 12px; margin: 0 0 20px; font-family: var(--f-display); font-weight: 800; font-stretch: 112%; font-size: 3.4rem; line-height: 0.95; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tps small { font-family: var(--f-mono); font-weight: 400; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.tps .is-pending { font-family: var(--f-mono); font-weight: 300; font-size: 1.6rem; letter-spacing: 0; color: var(--ink-4); }
.rail .specs { margin: 0; }
.rail .spec dd { min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.rail .spec dt { flex-shrink: 0; }

.rail .field { margin-bottom: 22px; }
.rail .field > label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field output { font-size: 0.72rem; letter-spacing: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 24px; margin: 0; background: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--ink) var(--f, 50%), var(--line-strong) var(--f, 50%)); }
input[type="range"]::-moz-range-track { height: 2px; background: linear-gradient(90deg, var(--ink) var(--f, 50%), var(--line-strong) var(--f, 50%)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 18px; margin-top: -8px; border: 0; border-radius: var(--radius); background: var(--ink); }
input[type="range"]::-moz-range-thumb { width: 10px; height: 18px; border: 0; border-radius: var(--radius); background: var(--ink); }
input[type="range"]:hover::-webkit-slider-thumb { background: #fff; }
.rail .textarea { min-height: 84px; font-size: 0.92rem; }
.switch { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding: 14px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch__track { position: relative; flex: none; width: 40px; height: 22px; border: 1px solid var(--line-strong); border-radius: var(--radius); transition: border-color 0.2s, background 0.2s; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: var(--ink-3); transition: transform 0.2s var(--ease), background 0.2s; }
.switch input:checked + .switch__track { border-color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.switch input:checked + .switch__track::after { transform: translateX(18px); background: var(--ink); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--signal); outline-offset: 3px; }
.switch__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.switch__text b { font-family: var(--f-mono); font-weight: 400; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.switch__text small { font-size: 0.8rem; line-height: 1.4; color: var(--ink-3); }
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.6); }

@media (max-width: 900px) {
  .chat { grid-template-columns: minmax(0, 1fr); }
  .only-narrow { display: inline-flex; }
  .rail__head.only-narrow { display: flex; }
  .rail { position: fixed; z-index: 70; top: 0; right: 0; bottom: 0; width: min(100vw, 420px); border-left: 1px solid var(--line-strong); transform: translateX(102%); visibility: hidden; transition: transform 0.25s var(--ease), visibility 0s 0.25s; }
  .rail.open { transform: none; visibility: visible; transition: transform 0.25s var(--ease); }
  .strip { display: inline-flex; gap: 14px; min-width: 0; overflow: hidden; padding: 8px 0; border: 0; background: none; font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
  .strip b { font-weight: 400; color: var(--ink); }
}
@media (min-width: 901px) { .scrim { display: none !important; } }
@media (max-width: 440px) { .strip span + span { display: none; } }
@media (max-width: 700px) {
  .msg { grid-template-columns: minmax(0, 1fr); padding: 18px 0; }
  .msg > * { grid-column: 1; }
  .msg-role { grid-row: auto; padding: 0 0 10px; }
  .starters { grid-template-columns: 1fr; }
  .starter + .starter { border-left: 0; border-top: 1px solid var(--line); }
  .starter { padding: 14px 16px; }
  .chat__bar { gap: 10px; }
  .chat__bar .btn { padding: 0 10px; }
  .chat__status-text { display: none; }
  .chat__status { padding: 5px 7px; gap: 0; }
  .composer { padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
  .composer__hint { display: none; }
  .composer__box { padding-left: 12px; }
  .stage__actions .btn { flex: 1 1 100%; justify-content: space-between; }
  .phase { grid-template-columns: 36px 1fr; }
  .phase-val { grid-column: 2; text-align: left; }
  .codeblock pre { padding: 14px; font-size: 0.72rem; }
  .panel { padding: 22px 20px 24px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}

/* several machines in the speed block */
.bars + .bench__hw { margin-top: 44px; }
.bars + .bench__why { margin-top: 28px; }
