/* Device Proshop: an instruction booklet for HyperBEAM devices.
   AO's system: DM Sans, #F7F7F8 ground, white surfaces, hairlines, black text, one green. */

:root {
  color-scheme: only light; /* the site is light by design; tells auto dark modes to leave it alone */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --line: #e6e6e6;
  --line-2: #d6d6d6;
  --ink: #000000;
  --ink-2: #333333;
  --ink-3: #6e6e6e;
  --ink-4: #767676; /* lightest grey that still reads on white (4.5:1) */
  --green: #279200;
  --green-dark: #105a00;
  --green-text: #1f7a00; /* the accent green, a step darker, so small text and white-on-green pass contrast */
  --fill: #ebebe8;
  --fill-on: #d4ecc9;

  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Roboto Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 4vw, 48px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Icons: black line, neutral fill at rest. The fill turns green only for the device being placed,
   or the one under your cursor. Green otherwise belongs to the connector alone. */
.char { width: 100%; height: 100%; display: block; color: var(--ink); }
.char .ink { filter: url(#thin); }
.char .tint { fill: var(--fill); opacity: 1; transition: fill 0.25s var(--ease-out); }
.part.current .char .tint, .part-btn:hover .char .tint, .row:hover .char .tint, .sheet-glyph .char .tint, .snap:hover .char .tint { fill: var(--fill-on); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  /* Section links land below the fixed header, not under it. */
  scroll-padding-top: calc(72px + env(safe-area-inset-top, 0px)); }
/* While a dialog is open the page behind it stays put on phones. */
html:has(dialog[open]) { overflow: hidden; }
dialog { overscroll-behavior: contain; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 6px; }
h1, h2, h3 { font-weight: 500; line-height: 1.04; margin: 0; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: clamp(46px, 8vw, 112px); letter-spacing: -0.035em; }
h2 { font-size: clamp(34px, 5vw, 64px); }
h3 { font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.02em; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.85em; }

/* ---------- Header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter); padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: rgba(255, 255, 255, 0.72); background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(230, 230, 230, 0.7); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; text-decoration: none; letter-spacing: -0.01em; }
.logo { position: relative; width: 26px; height: 26px; display: block; color: var(--ink); }
.logo-glyph { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transform: scale(0.85); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), color 0.6s ease; }
.logo-glyph.on { opacity: 1; transform: scale(1); }
.top nav { display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 500; color: var(--ink-3); line-height: 1; }
.top nav a { text-decoration: none; padding: 12px 0; margin: -12px 0; }
.brand, .top nav a { white-space: nowrap; }
.top { gap: 12px; }
/* Small phones: Pick three is the next thing on the page anyway. Up to 430px, so the touch-size Sound button fits. */
@media (max-width: 430px) { .top nav a[href="#pick"] { display: none; } }
@media (max-width: 350px) { .brand { gap: 8px; } header.top nav { gap: 12px; font-size: 13px; } .top nav a[href="#agents"] { display: none; } }
.top nav a:hover { color: var(--ink); }
.sound { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 11px 6px 9px; line-height: 1; margin-left: 4px; border-radius: 36px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-3); font-size: 13px; font-weight: 500; cursor: pointer; }
.sound svg { width: 14px; height: 14px; }
.sound .wave { opacity: 0.25; }
.sound[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.sound[aria-pressed="true"] .wave { opacity: 1; stroke: var(--green); }

/* ---------- Cover ---------- */
.cover {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: calc(120px + env(safe-area-inset-top, 0px)) var(--gutter) clamp(40px, 7vh, 80px);
}
.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; }
/* The film sits on the page with no frame. Controls are two quiet words that show on hover. */
.film-wrap { position: relative; width: min(100%, 1120px); }
.film { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--bg); cursor: pointer; }
/* Controls sit under the film, never on it, and only while the pointer is over it. */
.film-ctl { display: flex; justify-content: center; gap: 8px; height: 34px; margin-top: 10px; opacity: 0; transition: opacity 0.25s var(--ease-out); pointer-events: none; }
.film-wrap:hover .film-ctl, .film-wrap:focus-within .film-ctl { opacity: 1; pointer-events: auto; }
.film-btn { font: 500 13px/1 var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; transition: border-color 0.2s; }
.film-btn:hover { border-color: var(--ink); }

/* ---------- Pick three ---------- */
.pick { padding: 0 var(--gutter) clamp(64px, 10vh, 120px); max-width: 1000px; margin: 0 auto; text-align: center; }
.pick-head p { color: var(--ink-3); margin-top: 12px; font-size: clamp(17px, 1.8vw, 22px); min-height: 1.4em; }
.pick-head { opacity: 0.35; transform: translateY(14px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.pick-head.in { opacity: 1; transform: none; }
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: clamp(32px, 5vh, 56px); transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out); }
.pick-grid[hidden], .pick-result[hidden] { display: none; }
.pick-grid.done { opacity: 0; transform: scale(0.98); }
.pick-tile {
  display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; gap: 2px 16px; align-items: center; text-align: left;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; font: inherit; color: var(--ink);
  transition: border-color 0.2s, transform 0.2s var(--ease-out);
}
.pick-tile .glyph { grid-row: 1 / 3; width: 52px; --size: 52px; }
.pick-name { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.pick-short { font-size: 14px; color: var(--ink-3); }
.pick-tile:hover { border-color: var(--line-2); }
.pick-tile:hover .char .tint { fill: var(--fill-on); }
.pick-tile[aria-pressed="true"] { border-color: var(--ink); }
.pick-tile[aria-pressed="true"] .char .tint { fill: var(--fill-on); }
.pick-tile:active { transform: scale(0.98); }
.pick-result { margin-top: clamp(32px, 5vh, 56px); display: flex; flex-direction: column; align-items: center; }
.pick-chain { display: flex; justify-content: center; width: 100%; }
.pick-says { font-size: clamp(22px, 2.6vw, 32px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; max-width: 52ch; margin-top: clamp(40px, 6vh, 64px); text-wrap: balance; }
.pick-ao { color: var(--ink-3); font-size: clamp(16px, 1.6vw, 19px); margin-top: 14px; }
.pick-says, .pick-ao, .pick-actions { opacity: 0; transform: translateY(8px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.pick-result.show .pick-says, .pick-result.show .pick-ao, .pick-result.show .pick-actions { opacity: 1; transform: none; }
.pick-result.show .pick-ao { transition-delay: 0.25s; }
.pick-result.show .pick-actions { transition-delay: 0.45s; }
.pick-actions { display: flex; gap: 10px; justify-content: center; margin-top: 28px; }
.pick-actions .btn.small { margin-top: 0; }
.btn.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.solid:hover { background: var(--ink-2); border-color: var(--ink-2); }
@media (max-width: 720px) {
  .pick-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pick-tile { grid-template-columns: 1fr; padding: 14px; gap: 6px; }
  .pick-tile .glyph { grid-row: auto; width: 40px; --size: 40px; }
}

/* ---------- Chain: characters that click together ---------- */
.chain { display: flex; justify-content: center; align-items: flex-start; flex-wrap: wrap; row-gap: 32px; --peg: 48px; --gap: 16px; }
.chain.lg { --size: clamp(84px, 10vw, 150px); }
.chain.md { --size: clamp(84px, 10.5vw, 160px); }
.part { position: relative; display: flex; flex-direction: column; align-items: center; padding-inline: calc(var(--gap) / 2 + var(--peg) / 2); }
.part .part-btn { transition: opacity 0.5s var(--ease-out); }
.part.placed:not(.current) .part-btn { opacity: 0.5; }
.chain.complete .part .part-btn { opacity: 1; }
.part-btn { position: relative; background: none; border: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.glyph { width: var(--size, 120px); aspect-ratio: 1; display: grid; place-items: center; transition: transform 0.35s var(--ease-out); }
.part-btn:hover .glyph { transform: translateY(-3px); }
.part-name { position: relative; display: grid; font-size: clamp(13px, 1.25vw, 16px); font-weight: 500; line-height: 1.2; text-align: center; letter-spacing: -0.01em; white-space: nowrap; }
.part-name .alt { display: none; }
.tip {
  position: absolute; top: calc(100% + 8px); left: 50%; --tx: -50%; transform: translate(var(--tx), 3px); z-index: 3;
  width: max-content; max-width: 200px; white-space: normal; text-wrap: balance; padding: 0;
  font-size: 13px; font-weight: 400; line-height: 1.4; color: var(--ink-3); text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out);
}
.part.edge-l .tip { left: 0; --tx: 0; text-align: left; }
.part.edge-r .tip { left: auto; right: 0; --tx: 0; text-align: right; }
.part.edge-l.edge-r .tip { left: 50%; right: auto; --tx: -50%; text-align: center; }
.part-btn:hover .tip, .part-btn:focus-visible .tip { opacity: 1; transform: translate(var(--tx), 0); transition-delay: 0.12s; }
.chain.settling .tip { opacity: 0 !important; }
/* The connector: one thin line from the edge of this glyph to the edge of the next, behind both.
   Every so often a soft chroma sweep travels down the whole chain (see chroma() in app.js). */
.peg {
  position: absolute; top: calc(var(--size, 120px) / 2); z-index: 0;
  right: calc(-50% + var(--size, 120px) * 0.44);
  width: calc(100% - var(--size, 120px) * 0.88); height: 1px; margin-top: -0.5px;
  background: var(--line-2); overflow: hidden;
  transform: scaleX(0); transform-origin: left center; transition: transform 0.32s var(--ease-out);
}
.part-btn { z-index: 1; }
.peg::after {
  content: ""; position: absolute; top: -1px; bottom: -1px; left: 0; width: 55%; opacity: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, #7cc4ff 25%, #c9a6ff 45%, #ffb2d1 60%, #ffd28a 75%, transparent);
}
.part.linked .peg { transform: scaleX(1); }
.part.row-end .peg, .part:last-child .peg { display: none; }
.peg.pulse::after { animation: chroma 0.9s cubic-bezier(0.35, 0, 0.25, 1) 1; }
@keyframes chroma { 0% { transform: translateX(-100%); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(280%); opacity: 0; } }

/* ---------- The chef: fixed on the right. Every 20 seconds it flips through glyphs, lands on one, and shimmers. ---------- */
.chef-dock { position: fixed; right: clamp(16px, 3vw, 48px); top: 50%; transform: translateY(-50%); z-index: 15; --glyph: var(--ink); }
.chef {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; border: none; background: none; cursor: pointer; color: var(--ink);
  transition: transform 0.25s var(--ease-out), opacity 0.3s var(--ease-out);
}
.chef:hover { transform: scale(1.04); }
/* On hover the glyph takes the color of whatever it landed on. */
.chef-glyph { transition: color 0.35s var(--ease-out); }
.chef-dock:hover .chef-glyph, .chef:focus-visible .chef-glyph { color: var(--glyph); }
.chef-x {
  position: absolute; top: 0; right: 0; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-3); font-size: 11px; line-height: 1; cursor: pointer; opacity: 0; transform: scale(0.8); transition: opacity 0.2s, transform 0.2s var(--ease-out), color 0.2s, border-color 0.2s;
}
.chef-dock:hover .chef-x, .chef-x:focus-visible { opacity: 1; transform: none; }
.chef-x:hover { color: var(--ink); border-color: var(--ink); }
/* Tucked away: just a dot on the right edge. Click it to bring the chef back. */
.chef-dot {
  position: absolute; top: 50%; right: calc(-1 * clamp(16px, 3vw, 48px) + 10px); width: 28px; height: 28px; margin-top: -14px; padding: 0;
  border: none; background: none; cursor: pointer; display: none;
}
.chef-dot::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--ink); transition: background 0.25s, transform 0.25s var(--ease-out); }
.chef-dot:hover::after, .chef-dot:focus-visible::after { background: var(--glyph); transform: scale(1.35); }
.chef-dock.tucked .chef, .chef-dock.tucked .chef-x { display: none; }
.chef-dock.tucked .chef-dot { display: block; }
@media (hover: none) { .chef-x { opacity: 1; transform: none; } }
.chef-stage { position: relative; width: clamp(52px, 5vw, 76px); aspect-ratio: 1; display: block; }
.chef-glyph { width: 100%; height: 100%; display: block; }
.chef.landed .chef-glyph { animation: land 0.5s var(--ease-out); }
@keyframes land { 0% { transform: scale(0.9); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.chef-say { font-size: 13.5px; font-weight: 500; color: var(--ink); background: var(--surface); padding: 5px 11px; border-radius: 36px; border: 1px solid var(--line); white-space: nowrap; }
.chef-say.sheen {
  background-image: linear-gradient(100deg, var(--ink) 40%, #c4c4c4 50%, var(--ink) 60%), linear-gradient(var(--surface), var(--surface));
  background-size: 300% 100%, auto;
  -webkit-background-clip: text, padding-box; background-clip: text, padding-box; -webkit-text-fill-color: transparent;
  animation: say-sheen 1.6s cubic-bezier(0.4, 0, 0.2, 1) 0.15s both;
}
@keyframes say-sheen { from { background-position: 100% 0, 0 0; } to { background-position: 0 0, 0 0; } }

/* Big and centered under Pick three. Once you scroll past, it flies to the side. */
/* The big chef gets a section of its own: a full screen tall, with the chef in the middle. */
.chef-slot { min-height: 100vh; min-height: 100svh; display: flex; justify-content: center; align-items: center; }
/* Below wide screens the middle of the right edge is content, so the chef waits in the corner. */
@media (max-width: 1679px) { .chef-dock:not(.big) { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: none; } }
.chef-dock.big { position: relative; right: auto; top: auto; transform: none; }
.chef-dock.big .chef { gap: 28px; }
.chef-dock.big .chef-stage { width: clamp(260px, 30vw, 440px); }
.chef-dock.big .chef-say { font-size: clamp(19px, 2vw, 28px); padding: 11px 24px; }
.chef-dock.big .chef-x, .chef-dock.big .chef-dot { display: none; }
.chef-dock.big.tucked .chef { display: flex; }

/* ---------- The cooking dialog ---------- */
dialog.cook { border: 1px solid var(--line); padding: 0; border-radius: 22px; background: var(--surface); color: var(--ink); width: min(920px, calc(100% - 32px)); max-height: calc(100% - 32px); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12); }
dialog.cook::backdrop { background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cook-inner { position: relative; padding: clamp(36px, 6vh, 60px) clamp(20px, 4vw, 56px); }
.ask { max-width: 880px; margin: 0 auto; padding: clamp(24px, 5vh, 56px) var(--gutter) clamp(56px, 10vh, 120px); }
.ask-label { display: block; font-size: clamp(22px, 2.6vw, 32px); font-weight: 500; line-height: 1.1; letter-spacing: -0.025em; margin-bottom: 22px; text-align: center; }
.ask-bar { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 14px 24px; border: 1px solid var(--line-2); border-radius: 22px; background: var(--surface); transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out); }
.ask-bar:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04); }
.ask-bar textarea { flex: 1; resize: none; border: none; outline: none; background: none; font: inherit; font-size: clamp(17px, 1.7vw, 21px); line-height: 1.45; padding: 8px 0; color: var(--ink); min-height: 5.8em; max-height: 13em; overflow-y: auto; }
.ask-bar textarea::placeholder { color: var(--ink-4); }
.ask-go { display: flex; align-items: center; justify-content: center; gap: 10px; width: min(100%, 420px); margin: 18px auto 0; padding: 17px 28px; border-radius: 999px; border: none; background: var(--ink); color: #fff; font-weight: 500; font-size: 17px; cursor: pointer; white-space: nowrap; }
.ask-go:disabled { opacity: 0.5; cursor: default; }
.ask-go svg { width: 18px; height: 18px; }
.ask-form.busy .ask-go span::after { content: "…"; }
.ask-hint { margin-top: 14px; text-align: center; color: var(--ink-4); font-size: 14px; }
.ask-privacy { margin: 10px 0 0; text-align: center; color: var(--ink-4); font-size: 13px; }
.ask-privacy a { color: var(--ink-3); }

.plan { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 24px; scroll-margin-top: 24px; }
.plan-title { font-size: 13px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-4); margin-bottom: -12px; }
.plan-summary { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.5; letter-spacing: -0.005em; max-width: 68ch; }
.plan-chain { display: flex; justify-content: center; }
.plan-chain .chain.sm { --size: clamp(48px, 6vw, 72px); --peg: 26px; --gap: 8px; }
.plan-chain .part-name { font-size: 12.5px; }
.plan-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 4px 32px; }
.plan-steps li { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; }
.plan-step { display: inline-flex; align-items: baseline; gap: 10px; background: none; border: none; padding: 0; cursor: pointer; text-align: left; }
.plan-step .glyph.xs { align-self: center; }
.plan-term { font-weight: 500; font-size: 16px; }
.plan-alt { font-size: 13px; color: var(--ink-4); }
.plan-why { color: var(--ink-3); font-size: 15px; line-height: 1.4; }
.plan-ok, .plan-next { color: var(--ink-2); font-size: 15px; line-height: 1.5; }

.missing { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.missing h3 { text-align: center; font-size: clamp(20px, 2.2vw, 26px); }
.gap { border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; background: var(--surface-2); display: flex; flex-direction: column; gap: 12px; }
.gap-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.gap-name { font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.gap-plain { font-size: 14px; color: var(--ink-3); }
.gap-job { font-size: clamp(18px, 1.8vw, 21px); font-weight: 500; letter-spacing: -0.01em; }
.gap-why { color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.gap-io { margin: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 8px 24px; }
.gap-io div { display: grid; grid-template-columns: 34px 1fr; gap: 8px; font-size: 14px; }
.gap-io dt { color: var(--ink-4); }
.gap-io dd { margin: 0; color: var(--ink-2); }
.gap-closest .label { display: block; font-size: 12.5px; color: var(--ink-4); margin-bottom: 8px; }
.gap-make { align-self: flex-start; margin-top: 6px; }
.gap-form { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); margin-top: 6px; }
.gap-form[hidden] { display: none; }
.gap-form label { display: grid; gap: 6px; min-width: 0; font-size: 13.5px; color: var(--ink-3); }
.gap-form select, .gap-form input { width: 100%; max-width: 100%; min-width: 0; font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
.gap-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.gap-actions .btn { flex: none; white-space: nowrap; }
.gap-status { flex: 1 1 260px; min-width: 0; font-size: 14px; line-height: 1.45; color: var(--ink-3); }
.gap-status:empty { display: none; }
.checks { display: grid; gap: 10px; max-width: 380px; }
.check-list { position: relative; display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
/* The thread joining the three marks */
.check-list::before { content: ""; position: absolute; left: 9.5px; top: 14px; bottom: 14px; width: 1px; background: var(--line-2); }
.check-list li { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 12px; color: var(--ink-4); }
.check-text { display: grid; gap: 1px; min-width: 0; }
.check-name { font-size: 14px; font-weight: 500; color: inherit; line-height: 1.3; }
.check-sub { font-size: 12.5px; color: var(--ink-4); line-height: 1.35; }
.check-state { font-size: 12px; font-weight: 500; letter-spacing: 0.01em; color: var(--ink-4); }
.check-list li.now .check-name { color: var(--ink); }
.check-list li.now .check-state { color: var(--ink); }
.check-list li.done .check-name, .check-list li.done .check-state { color: var(--green-text); }
.check-mark { position: relative; z-index: 1; width: 20px; height: 20px; overflow: visible; background: var(--surface, #fff); border-radius: 50%; }
.check-mark circle, .check-mark path { fill: none; vector-effect: non-scaling-stroke; }
.cm-ring { stroke: var(--line-2); stroke-width: 1.5; }
.cm-arc { stroke: var(--green); stroke-width: 1.75; stroke-linecap: round; stroke-dasharray: 26 74; opacity: 0; transform-origin: 10px 10px; }
.cm-fill { fill: var(--green) !important; transform: scale(0.4); transform-origin: 10px 10px; opacity: 0; transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.3), opacity 0.2s; }
.cm-tick { stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.32s ease-out 0.14s; }
.check-list li.now .cm-arc { opacity: 1; animation: check-spin 0.9s linear infinite; }
.check-list li.done .cm-ring { stroke: var(--green); }
.check-list li.done .cm-fill { transform: scale(1); opacity: 1; }
.check-list li.done .cm-tick { stroke-dashoffset: 0; }
.check-note { font-size: 13px; color: var(--ink-4); }
@keyframes check-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .check-list li.now .cm-arc { animation: none; stroke-dasharray: none; }
  .cm-fill, .cm-tick { transition: none; }
}
.gap-done { font-size: 15px; }
.gap-done a { color: var(--ink); text-underline-offset: 4px; }

/* ---------- Builds: one after another, everything on. Hover a device to read its line. ---------- */
.build { padding: clamp(160px, 26vh, 320px) var(--gutter); }
.build, .parts-head { opacity: 0.35; transform: translateY(14px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.build.in, .parts-head.in { opacity: 1; transform: none; }
.rail { display: flex; flex-direction: column; align-items: center; gap: clamp(28px, 5vh, 48px); text-align: center; max-width: 1240px; margin: 0 auto; }
.caption { max-width: min(100%, 70ch); min-height: 7.6em; display: flex; flex-direction: column; justify-content: flex-end; }
.cap-name { font-size: clamp(30px, 3.6vw, 50px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.04; }
.cap-alt { font-size: clamp(14px, 1.4vw, 17px); color: var(--ink-3); margin-top: 6px; min-height: 1.4em; }
.cap-line { font-size: clamp(17px, 1.8vw, 22px); color: var(--ink-2); margin-top: 14px; line-height: 1.45; text-wrap: balance; }
@media (min-width: 900px) { .cap-name, .cap-line { white-space: nowrap; } }
.rail .chain.md { --size: clamp(52px, 7.5vw, 116px); --peg: 34px; --gap: 10px; flex-wrap: nowrap; justify-content: center; }
.rail .chain.md .part-name { font-size: 13px; }
.rail .tip { display: none; }
.build-idea { max-width: 54ch; margin: clamp(8px, 2vh, 20px) 0 0; font-size: clamp(17px, 1.8vw, 21px); line-height: 1.5; color: var(--ink-3); text-wrap: pretty; }
.rail .part .part-btn { transition: none; }
.rail .part .peg { transition: none; transform-origin: left center; }
.rail .part-btn:hover { opacity: 1 !important; }

/* ---------- Just published ---------- */
.fresh { padding: clamp(160px, 26vh, 320px) var(--gutter) 0; max-width: 1240px; margin: 0 auto; }
.fresh-head { max-width: 60ch; }
.fresh-head p { color: var(--ink-3); margin-top: 14px; font-size: clamp(16px, 1.6vw, 20px); }
.fresh-list { list-style: none; margin: clamp(40px, 6vh, 72px) 0 0; padding: 0; border-top: 1px solid var(--line); }
.fresh-list:empty { border-top: 0; }
.fresh-row { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 8px 40px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.fresh-row.arrived { animation: arrive 2.4s var(--ease-out); }
@keyframes arrive { from { background: var(--fill-on); } to { background: transparent; } }
.fresh-key { display: flex; align-items: center; gap: 14px; min-width: 0; }
.fresh-name { font-family: var(--mono); font-size: 14px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.fresh-name:hover { text-decoration: underline; text-underline-offset: 4px; }
.fresh-name.linkish { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.fresh-what { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fresh-job { color: var(--ink-2); font-size: 15px; line-height: 1.55; margin: 0; }
.fresh-job:empty { display: none; }
.fresh-meta { color: var(--ink-4); font-size: 13px; margin: 0; }
.fresh-meta a { color: var(--ink-3); font-size: 12.5px; }
.fresh-row.pending .fresh-meta { color: var(--ink); }
.fresh-more { margin-top: 24px; }
.fresh-head, .fresh-list { opacity: 0.35; transform: translateY(14px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.fresh-head.in, .fresh-list.in { opacity: 1; transform: none; }
@media (max-width: 720px) { .fresh-row { grid-template-columns: 1fr; } }

/* ---------- In the works ---------- */
.works { padding: clamp(160px, 26vh, 320px) var(--gutter) 0; max-width: 1240px; margin: 0 auto; }
.works-head { max-width: 60ch; }
.works-head p { color: var(--ink-3); margin-top: 14px; font-size: clamp(16px, 1.6vw, 20px); }
.works-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); margin-top: clamp(40px, 6vh, 72px); }
.works-col h3 { font-size: 13px; font-weight: 500; color: var(--ink-4); letter-spacing: 0.01em; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.works-list, .wanted-list { list-style: none; margin: 0; padding: 0; }
.work { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 60px 1fr; gap: 0 22px; align-items: start; }
.work-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.work-glyph { position: relative; width: 60px; height: 60px; margin-top: 2px; }
.work-glyph .char { width: 60px; height: 60px; display: block; }
.work.building .work-glyph .char .tint { fill: #fbeeb8; }
.work.wanted .work-glyph .char .tint { fill: #ffffff; }
.work-glyph .star { position: absolute; width: 11px; height: 11px; transform: scale(var(--k, 1)); color: var(--ink-2); pointer-events: none; }
.work-glyph .star svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.work-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.work-name { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.work-status { font-size: 12.5px; color: var(--ink-4); }
.work-plain { font-size: 18px; font-weight: 500; letter-spacing: -0.015em; }
.work-job { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.work-link { font-size: 13.5px; color: var(--ink-3); text-underline-offset: 4px; margin-top: 4px; align-self: flex-start; }
.work-quote { margin: 6px 0 0; padding-left: 14px; border-left: 2px solid var(--line-2); color: var(--ink-3); font-size: 14px; line-height: 1.5; font-style: italic; }
.work-quote cite { display: block; font-style: normal; font-size: 12.5px; margin-top: 4px; color: var(--ink-4); }
.work-quote cite a { color: var(--ink-3); }
.btn { font: 500 15px/1 var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 12px 20px; cursor: pointer; transition: border-color 0.2s; }
.btn:hover { border-color: var(--ink); }
.btn.small { padding: 9px 16px; font-size: 14px; align-self: flex-start; margin-top: 8px; }
.works-head, .works-col { opacity: 0.35; transform: translateY(14px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.works-head.in, .works-col.in { opacity: 1; transform: none; }

/* ---------- Parts list ---------- */

/* Agents */
.agents { padding: clamp(160px, 26vh, 320px) var(--gutter) 160px; max-width: 1240px; margin: 0 auto; }
.agents-head { max-width: 60ch; }
.agents-head p { color: var(--ink-3); margin-top: 14px; font-size: clamp(16px, 1.6vw, 20px); }
.agent-list { list-style: none; margin: clamp(40px, 6vh, 72px) 0 0; padding: 0; border-top: 1px solid var(--line); }
.agent-row { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 12px 40px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.agent-key { display: flex; align-items: center; gap: 14px; }
.agent-key .mono, .agent-what .mono { font-family: var(--mono); font-size: 14px; color: var(--ink); }
.agent-key a { text-decoration: none; }
.agent-key a:hover { text-decoration: underline; text-underline-offset: 4px; }
.agent-what { color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.copy { white-space: nowrap; flex-shrink: 0; font: 500 12px/1 var(--sans); color: var(--ink-3); background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 10px; cursor: pointer; transition: color 0.2s, border-color 0.2s; }
.copy:hover { color: var(--ink); border-color: var(--ink); }
.copy.done { color: var(--green-text); border-color: var(--green); }
.agent-snippet { margin: clamp(28px, 4vh, 44px) 0 0; padding: 18px 22px; background: var(--surface-2); border-radius: 10px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.agent-note { margin-top: 16px; font-size: 13.5px; color: var(--ink-4); }
.agents-head, .agent-list, .agent-snippet { opacity: 0.35; transform: translateY(14px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.agents-head.in, .agent-list.in, .agent-snippet.in { opacity: 1; transform: none; }

.parts { padding: clamp(160px, 26vh, 320px) var(--gutter) 0; max-width: 1240px; margin: 0 auto; }
.parts-head { max-width: 60ch; }
.parts-head p { color: var(--ink-3); margin-top: 14px; font-size: clamp(16px, 1.6vw, 20px); }
.parts-head input {
  -webkit-appearance: none; appearance: none;
  margin-top: 26px; font: inherit; font-size: 16px; width: min(100%, 340px); padding: 11px 16px; border-radius: 36px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink);
}
.parts-head input:focus { outline: none; border-color: var(--ink); }
.family { margin-top: clamp(72px, 10vh, 120px); }
.family-head { display: flex; align-items: baseline; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.family-head p { color: var(--ink-4); font-size: 15px; flex: 1; }
.family-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 28px; }
.row {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: center; text-align: left;
  padding: 16px 0; border: none; border-bottom: 1px solid var(--line); background: none; cursor: pointer; min-width: 0;
}
.row .glyph { width: 44px; --size: 44px; }
.row-text { min-width: 0; display: grid; }
.row-name { font-weight: 500; font-size: 16px; letter-spacing: -0.01em; display: flex; gap: 8px; align-items: baseline; }
.row-kind { font-size: 12px; font-weight: 500; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.06em; }
.row-alt { color: var(--ink-3); font-size: 14px; }
.row-dev, .row-job { grid-area: 3 / 1; font-size: 12.5px; transition: opacity 0.18s var(--ease-out); }
.row-dev { font-family: var(--mono); color: var(--ink-4); }
.row-job { color: var(--ink-2); opacity: 0; }
.row:hover .row-dev, .row:focus-within .row-dev { opacity: 0; }
.row:hover .row-job, .row:focus-within .row-job { opacity: 1; }
/* No hover on touch screens, so the plain words show from the start. */
@media (hover: none) { .row-dev, .row-job { grid-area: auto; opacity: 1; } }
.row:hover .glyph { transform: translateY(-2px); }
.row[hidden], .family[hidden] { display: none; }
.empty { color: var(--ink-4); padding-block: 40px; }

/* ---------- Sheet: one device, explained simply ---------- */
dialog.sheet {
  border: 1px solid var(--line); padding: 0; border-radius: 16px; background: var(--surface); color: var(--ink);
  width: min(640px, calc(100% - 32px)); max-height: calc(100% - 32px); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.10);
}
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.32); }
.sheet-inner { position: relative; padding: 32px 36px 28px; display: flex; flex-direction: column; gap: 18px; }
.sheet-head { display: grid; grid-template-columns: 96px 1fr; gap: 22px; align-items: center; padding-right: 32px; }
.sheet-glyph { width: 96px; aspect-ratio: 1; }
.sheet-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sheet-titles .nick { font-size: clamp(26px, 3vw, 32px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; }
.sheet-titles .alt { font-size: 15px; color: var(--ink-3); overflow-wrap: anywhere; }
.sheet-titles .job { font-size: 17px; font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; margin-top: 8px; }
.sheet .explainer { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.sheet .example { color: var(--ink-3); font-size: 15px; line-height: 1.55; }
.sheet .example .eg { color: var(--ink); font-weight: 500; }
.sheet .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.sheet .label { font-size: 12.5px; font-weight: 500; color: var(--ink-4); margin-bottom: 10px; letter-spacing: 0.01em; }
.snaps { display: flex; flex-wrap: wrap; gap: 6px; }
.snap { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 5px; border-radius: 36px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13.5px; font-weight: 500; }
.snap:hover { border-color: var(--ink); }
.glyph.xs { width: 22px; --size: 22px; }
.appears { display: flex; flex-direction: column; gap: 8px; }
.appears a { display: flex; flex-direction: column; font-size: 14.5px; line-height: 1.3; color: var(--ink-2); text-decoration: none; }
.appears a .bnum { font-family: var(--mono); font-size: 11.5px; color: var(--ink-4); }
.appears a:hover { color: var(--ink); }
pre.install { margin: 0; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); font-family: var(--mono); font-size: 12.5px; line-height: 1.55; overflow-x: auto; }
.facts { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-3); }
.facts .mono { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.facts a { color: var(--ink); text-underline-offset: 4px; margin-left: auto; }
.close { position: sticky; float: right; top: 14px; margin: -4px -4px 0 12px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; font-size: 12px; color: var(--ink-3); }
.close:hover { border-color: var(--ink); color: var(--ink); }
@media (max-width: 560px) {
  .sheet-inner { padding: 24px 20px 22px; }
  .sheet-head { grid-template-columns: 72px 1fr; gap: 16px; }
  .sheet-glyph { width: 72px; }
  .sheet .cols { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 28px var(--gutter) calc(48px + env(safe-area-inset-bottom, 0px)); color: var(--ink-4); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer a { color: var(--ink-3); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .agent-row { grid-template-columns: 1fr; gap: 8px; }
  .work { grid-template-columns: 48px 1fr; gap: 0 14px; }
  .work-glyph, .work-glyph .char { width: 48px; height: 48px; }
  .top nav { gap: 14px; font-size: 14px; }
  .chef-dock { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); transform: none; }
  .chef { padding: 6px; }
  .chef:hover { transform: none; }
  .chef-x { width: 28px; height: 28px; }
  .chef-dot { top: auto; bottom: 8px; margin-top: 0; right: -4px; }
  .chef-stage { width: 44px; }
  .chef-say { font-size: 12px; padding: 4px 9px; }
  .chef-slot { min-height: 80vh; min-height: 80svh; }
  .chef-dock.big .chef-stage { width: min(240px, 62vw); }
  .chef-dock.big .chef-say { font-size: 18px; padding: 9px 18px; }
  .cook-inner { padding: 24px 16px 28px; }
  .ask-label { padding-top: 36px; } /* clears the close button */
  .ask-bar { flex-direction: column; align-items: stretch; padding: 12px 14px; }
  .ask-go { justify-content: center; }
  .gap { padding: 20px 18px; }
  .sound span { display: none; }
  .sound { padding: 6px; }
  /* Chains stand up: one device per line, peg pointing down to the next. */
  .chain { flex-direction: column; align-items: stretch; flex-wrap: nowrap; row-gap: 0; --peg: 18px; --gap: 14px; width: min(100%, 360px); margin: 0 auto; }
  .chain.lg, .chain.md { --size: 60px; }
  .part { padding: 0 0 calc(var(--gap) + var(--peg) - 8px); align-items: stretch; }
  .part:last-child { padding-bottom: 0; }
  .part-btn { flex-direction: row; gap: 16px; text-align: left; width: 100%; }
  .part-name { text-align: left; max-width: none; font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
  .part-name .alt { display: block; color: var(--ink-3); font-weight: 400; font-size: 13px; }
  .tip { display: none; }
  .chain { --peg: 26px; --gap: 12px; }
  .peg { top: auto; right: auto; bottom: calc(-1 * var(--size) * 0.06); left: calc(var(--size) / 2 - 0.5px); width: 1px; height: calc(var(--gap) + var(--peg) + var(--size) * 0.12 - 8px); margin: 0; transform: scaleY(0); transform-origin: top center; }
  .peg::after { left: -1px; right: -1px; width: auto; top: 0; bottom: auto; height: 55%; transform: translateY(-100%); background: linear-gradient(180deg, transparent, #7cc4ff 25%, #c9a6ff 45%, #ffb2d1 60%, #ffd28a 75%, transparent); }
  .peg.pulse::after { animation-name: chromaY; }
  @keyframes chromaY { 0% { transform: translateY(-100%); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(280%); opacity: 0; } }
  .part.linked .peg { transform: scaleY(1); }
  .build { padding: 96px var(--gutter); }
  .rail { gap: 20px; }
  .caption { min-height: 0; }
  .cap-name { font-size: 28px; }
  .cap-line { font-size: 16px; margin-top: 8px; }
  .rail .chain.md { --size: 46px; }
  .rail .chain.md .part { padding-bottom: 12px; }
  .rail .chain.md .part-name { font-size: 13px; }
  .rail .chain.md .part-name .alt { display: none; }
  .step { height: 50vh; }
  .cover { padding-top: calc(80px + env(safe-area-inset-top, 0px)); }
  .works-cols { grid-template-columns: 1fr; }
  .family-head { flex-wrap: wrap; }
  .family-grid { grid-template-columns: 1fr; }
  }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .part, .glyph, .peg, .tip, .pick-grid, .pick-says, .pick-ao, .pick-actions, .film-ctl, .build, .parts-head, .works-head, .works-col { transition: none !important; }
  .pick-head, .build, .parts-head, .fresh-head, .fresh-list, .works-head, .works-col { opacity: 1; transform: none; }
  .fresh-row.arrived { animation: none; }
  .peg.pulse::after { animation: none !important; }
  }

/* Brewing: a button cycles the chef's glyphs while something slow runs. */
.brewing { opacity: 1 !important; }
/* While any AI wait runs, the pointer cycles the same glyphs, each in a soft shifting color. */
html.ai-working, html.ai-working * { cursor: var(--brew-cursor, progress) !important; }
.brewing .brew-glyph { width: 18px; height: 18px; flex: none; }
.ask-form.busy .ask-go.brewing span::after { content: none; }
.btn.brewing { display: inline-flex; align-items: center; gap: 8px; }

/* A missing device: request it (maybe on Proshop credits) or build it yourself. */
.gap-choices { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.gap-choices .gap-make { margin-top: 0; }
.btn.ghost { background: transparent; }
.gap-credits { grid-template-columns: 20px 1fr !important; align-items: start; color: var(--ink-2) !important; line-height: 1.5; }
.gap-credits input { margin-top: 3px; accent-color: var(--green, #279200); }
.gap-credits b { color: var(--ink); font-weight: 500; }
.gap-self { display: grid; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); margin-top: 6px; }
.gap-self[hidden] { display: none; }
.self-label { display: block; font-size: 13.5px; color: var(--ink-3); margin-bottom: 6px; }
.self-code { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.self-code code { flex: 1; font-size: 13px; white-space: pre-wrap; word-break: break-word; max-height: 9.5em; overflow: auto; }
.self-note { font-size: 13.5px; color: var(--ink-3); }
.self-note a { color: var(--ink); text-underline-offset: 3px; }

/* One plain line under the headline: what AO is and what a device is. */
.cover-sub { text-wrap: balance; max-width: 780px; margin: 20px auto 0; font-size: clamp(18px, 2vw, 23px); line-height: 1.45; color: var(--ink-2); }
.agent-what b, .fresh-head b { color: var(--ink); font-weight: 500; }

/* Due diligence shows: real gaps say why they passed, app logic is listed as the part you write. */
.gap-checked { font-size: 14px; line-height: 1.5; color: var(--ink-2); padding-left: 12px; border-left: 2px solid var(--green); }
.gap-checked b { color: var(--ink); font-weight: 500; }
.yours { margin-top: 12px; padding: clamp(28px, 4vw, 44px) 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); display: grid; gap: 14px; justify-items: center; text-align: center; }
.yours h3 { font-size: clamp(24px, 3vw, 34px); font-weight: 500; letter-spacing: -0.025em; text-wrap: balance; }
.yours-lede { color: var(--ink-3); font-size: 16px; line-height: 1.5; max-width: 52ch; text-wrap: balance; }
.yours-list { justify-self: center; text-align: left; max-width: 52ch; padding: 16px 20px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.yours-list h4 { font-size: 13px; font-weight: 500; color: var(--ink-3); margin: 0 0 8px; }
.yours-list ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; line-height: 1.45; }
.yours-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; }
.yours-go { font-size: 17px; padding: 16px 28px; }
.yours-peek { background: none; border: none; padding: 4px; font: inherit; font-size: 14px; color: var(--ink-3); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.yours-peek:hover { color: var(--ink); }
.yours-prompt { justify-self: stretch; text-align: left; margin: 0; max-height: 360px; overflow: auto; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.yours-prompt[hidden] { display: none; }
/* The hint only shows when there is something to say (an error or planner status). */
.ask-hint:empty { display: none; }
/* The plan's top line only shows once there is a plan. */
.plan[hidden] { display: none; }
.plan-step { flex: none; min-width: 120px; }

/* Discovery: a verified new device lands like a find, not a form. */
.gap.discovery { position: relative; overflow: hidden; background: var(--surface); border-color: rgba(39, 146, 0, 0.35); box-shadow: 0 18px 50px -24px rgba(39, 146, 0, 0.35); animation: disc-in 0.7s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)) both; }
.gap.discovery::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 220px; background: radial-gradient(60% 100% at 50% 0%, rgba(39, 146, 0, 0.10), transparent 70%); pointer-events: none; }
@keyframes disc-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
.disc-hero { position: relative; display: grid; justify-items: center; text-align: center; gap: 6px; padding: 6px 0 14px; }
.disc { position: relative; width: 112px; height: 112px; perspective: 600px; margin-bottom: 8px; }
.disc-coin { width: 100%; height: 100%; transform-style: preserve-3d; filter: drop-shadow(0 10px 18px rgba(39, 146, 0, 0.28)); animation: disc-land 1.6s cubic-bezier(0.16, 1, 0.3, 1) both, disc-turn 7s linear 1.6s infinite; }
.disc-coin svg { width: 100%; height: 100%; display: block; }
@keyframes disc-land { from { transform: rotateY(-1080deg) scale(0.4); opacity: 0; } 30% { opacity: 1; } to { transform: rotateY(0deg) scale(1); } }
@keyframes disc-turn { 0%, 70% { transform: rotateY(0deg); } 100% { transform: rotateY(360deg); } }
.disc-shine { animation: disc-shine 3.5s ease-in-out 1.2s infinite; }
@keyframes disc-shine { 0% { transform: translateX(0); } 40%, 100% { transform: translateX(120px); } }
.disc-spark { position: absolute; width: 16px; height: 16px; fill: var(--green); opacity: 0; animation: disc-spark 2.4s ease-in-out infinite; }
.disc-spark.s0 { top: 4px; left: -10px; animation-delay: 1.4s; }
.disc-spark.s1 { top: 18px; right: -14px; width: 11px; height: 11px; animation-delay: 2s; }
.disc-spark.s2 { bottom: 0; right: -4px; width: 9px; height: 9px; animation-delay: 2.6s; }
@keyframes disc-spark { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); } 40% { opacity: 1; transform: scale(1) rotate(45deg); } 70% { opacity: 0; transform: scale(0.6) rotate(90deg); } }
.disc-kicker { font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-text); }
.disc-title { font-size: clamp(24px, 3vw, 34px); font-weight: 500; letter-spacing: -0.025em; }
.disc-sub { color: var(--ink-3); font-size: 16px; }
.btn.go { background: var(--green-text); border-color: var(--green-text); color: #fff; }
.btn.go:hover { background: var(--green-dark); border-color: var(--green-dark); }
@media (prefers-reduced-motion: reduce) { .gap.discovery, .disc-coin, .disc-shine, .disc-spark { animation: none; } .disc-spark { opacity: 0.8; } }

/* The 3D top replaces the coin when it loads. */
.disc.is-3d { width: 230px; height: 230px; margin-bottom: 22px; }
.disc.is-3d .disc-coin, .disc.is-3d .disc-spark { display: none; }
.disc3d { position: absolute; inset: -70px; }
.disc3d canvas { width: 100% !important; height: 100% !important; display: block; -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%); mask-image: radial-gradient(closest-side, #000 62%, transparent 100%); }
.gap-done { display: grid; gap: 4px; color: var(--ink-2); font-size: 15px; }
.gap-done-head { font-size: 18px; font-weight: 500; color: var(--ink); }
.disc-hint { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); font-size: 14px; font-weight: 600; color: var(--green-text); white-space: nowrap; transition: opacity 0.6s, transform 0.6s; pointer-events: none; z-index: 2; }
.disc-hint.wait { opacity: 0; transform: translate(-50%, 6px); }
.disc-hint.gone { opacity: 0; }
/* Once it has settled: a soft ring breathes under it and the hint nods, so it is obvious you can spin it. */
.disc.your-turn .disc-hint { animation: hint-nod 2.4s ease-in-out 0.6s infinite; }
.disc.your-turn::after { content: ""; position: absolute; left: 50%; top: 58%; width: 150px; height: 46px; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid rgba(39, 146, 0, 0.35); animation: ring-breathe 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes hint-nod { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -4px); } }
@keyframes ring-breathe { 0%, 100% { opacity: 0.15; transform: translate(-50%, -50%) scale(0.92); } 50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .disc.your-turn .disc-hint, .disc.your-turn::after { animation: none; } }

/* While the AI works, a faint line runs around the modal's edge. */
@property --edge { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
dialog.cook.working {
  border-color: transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--edge), var(--line) 0deg, rgba(39, 146, 0, 0.6) 30deg, var(--line) 80deg, var(--line) 360deg) border-box;
  animation: edge-run 3.2s linear infinite;
}
@keyframes edge-run { to { --edge: 360deg; } }
@media (prefers-reduced-motion: reduce) { dialog.cook.working { animation: none; } }

/* In a plan, hover text lives on one caption line under the devices, so it never covers anything. */
.plan-chain .tip { display: none; }
.plan-caption { min-height: 1.5em; margin-top: -8px; text-align: center; font-size: 14.5px; color: var(--ink-3); transition: opacity 0.15s; }
.plan-caption b { color: var(--ink); font-weight: 500; }
.plan-caption:empty { opacity: 0; }

.plan-ok { text-align: center; }

.gap-note { display: block; font-size: 13px; line-height: 1.45; color: var(--ink-3); margin-top: 6px; font-weight: 400; }
/* The 3D canvas reaches past its spot so the glow can fade; the words under it stay on top and clickable. */
.disc-hero > :not(.disc) { position: relative; z-index: 1; }

/* A discovery our AI cannot build alone says so up front. */
.gap-human { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; line-height: 1.5; color: var(--ink-2); }

/* After a request is sent, the buttons become where it stands. */
.gap-state { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; margin-top: 6px; padding: 12px 22px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 17px; font-weight: 500; color: var(--ink); }
.gap-state.live { border-color: var(--green); color: var(--green-text); }
.gap-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.gap-state.live .gap-dot { animation: gap-pulse 1.4s ease-in-out infinite; }
@keyframes gap-pulse { 50% { opacity: 0.25; transform: scale(0.7); } }
@media (prefers-reduced-motion: reduce) { .gap-state.live .gap-dot { animation: none; } }

/* Work on what exists: PRs, our devices, catalog devices. */
.improve { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.improve h3 { text-align: center; font-size: clamp(20px, 2.2vw, 26px); }
.improve-label { font-size: 13px; font-weight: 500; color: var(--green-text); text-transform: uppercase; letter-spacing: 0.08em; }
.improve-card .gap-head { flex-wrap: wrap; }
.improve-card .gap-name { overflow-wrap: anywhere; }

/* The live list's sheet: links sit together at the right, and the copy button is a real button. */
.sheet-links { margin-left: auto; display: flex; gap: 14px; }
.facts .sheet-links a { margin-left: 0; }
.copy.solid-copy { font-size: 14px; padding: 10px 16px; color: var(--ink); border-color: var(--ink); }

/* ---------- Every device ---------- */
/* Fingers need bigger targets than a mouse. */
/* Room under the footer so the corner chef never covers its links. */
@media (max-width: 1679px) { footer { padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px)); } }
@media (pointer: coarse) {
  .copy, .sound, .close, .film-btn { min-width: 44px; min-height: 44px; }
  /* Small text links keep their look but get a taller invisible tap area. */
  .fresh-name, .fresh-name.linkish, .work-link, .fresh-row a.mono, footer a, .agent-key a, .agent-what a { padding-block: 12px; margin-block: -12px; }
  .yours-peek, .snap, .btn.small, #fresh-more { min-height: 44px; }
  .chef-dot { width: 44px; height: 44px; margin-top: -22px; }
  /* The planner's close button is bigger here, so the heading starts below it. */
  .ask-label { padding-top: 52px; }
}
/* Short screens, like a phone on its side: the corner chef gets small so it covers less. */
@media (max-height: 500px) { .chef-dock:not(.big) .chef-stage { width: 48px; } .chef-dock:not(.big) .chef-say { display: none; } }
/* Landscape phones: keep things clear of the notch. */
footer { padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
@media (min-width: 721px) { .chef-dock { right: max(clamp(16px, 3vw, 48px), env(safe-area-inset-right, 0px)); } }

/* ---------- After sending: the status link to keep ---------- */
.status-link { margin: 10px 0 6px; display: grid; gap: 8px; }
.status-link p { margin: 0; }
.status-link .self-code { align-items: center; }
.status-link .self-code a { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; color: var(--ink); }
.reach { display: grid; gap: 6px; margin: 4px 0 10px; font-size: 13.5px; color: var(--ink-3); }
.reach[hidden] { display: none; }
.reach input { width: 100%; font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }

/* Skip link: hidden until a keyboard user tabs to it. */
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 500; }
.skip:focus { top: 12px; }
.plan-title:focus { outline: none; }
