/* Build Companion — styles. Reuses the swipvox landing-page design system verbatim (same tokens,
   fonts, palette) so it reads as the same product in the marketing video. */

:root {
  --bg: #0B0A0E; --bg-2: #100E14; --surface: #17151C; --surface-2: #201D28;
  --line: #29262F; --line-2: #3A3648;
  --text: #F1EEF5; --dim: #A6A1B4; --mute: #6E6980;
  --ember: #FF6A45; --ember-2: #FF8A6B; --wave: #35E0C4; --gated: #6FA8FF; --amber: #F5B845;
  --maxw: 1180px;
  --f-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* status semantics — done=wave/mint · doing=ember · needs-you=amber · upcoming=muted · skipped=dim */
  --st-done: var(--wave); --st-doing: var(--ember); --st-need: var(--amber); --st-todo: var(--mute);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--f-body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; padding-bottom: 64px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
a { color: var(--dim); text-underline-offset: 3px; }
a:hover { color: var(--text); }
button { font-family: var(--f-body); cursor: pointer; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 6px; }
.eyebrow { font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); }
.mono { font-family: var(--f-mono); }
.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; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── top bar: brand + local-only note ─────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(16px); background: rgba(11,10,14,0.8); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 14px; padding: 12px 24px; max-width: var(--maxw); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; letter-spacing: -0.03em; font-size: 18px; }
.brand__mark { width: 20px; height: 20px; border-radius: 6px; background: conic-gradient(from 210deg, var(--ember), var(--amber), var(--wave), var(--ember)); box-shadow: 0 0 18px rgba(255,106,69,0.5); }
.brand__sub { color: var(--mute); font-weight: 500; font-size: 13px; font-family: var(--f-body); letter-spacing: 0; }
.top__spacer { flex: 1; }
.localchip { font-family: var(--f-mono); font-size: 11px; color: var(--mute); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; }
.localchip b { color: var(--dim); font-weight: 500; }

/* connection chip — fail loud when the fetch dies */
.conn { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: 11px; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; }
.conn__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--st-done); }
.conn--ok { color: var(--mute); }
.conn--down { color: #1B0A05; background: var(--amber); border-color: var(--amber); font-weight: 600; }
.conn--down .conn__dot { background: #1B0A05; }

/* demo chip — honest, not hidden */
.demochip { font-family: var(--f-mono); font-size: 11px; color: #1B0A05; background: var(--wave); border-radius: 999px; padding: 4px 11px; font-weight: 600; }

.main { max-width: var(--maxw); margin: 0 auto; padding: 28px 24px 0; }

/* ── notify bar ───────────────────────────────────────────────────────────── */
.notify { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 18px 20px; margin-bottom: 24px; }
.notify--urgent { border-color: rgba(245,184,69,0.5); background: linear-gradient(180deg, rgba(245,184,69,0.07), var(--surface)); }
.notify__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.notify__title { font-family: var(--f-display); font-weight: 700; font-size: 16px; }
.notify__hint { color: var(--mute); font-size: 13px; }
.notify__grid { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.input { background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; color: var(--text); font-family: var(--f-body); font-size: 15px; padding: 10px 13px; min-width: 240px; }
.input:disabled { opacity: 0.5; cursor: not-allowed; }
.toggles { display: flex; gap: 18px; flex-wrap: wrap; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dim); }
.toggle input { accent-color: var(--ember); width: 16px; height: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 14.5px; padding: 10px 18px; border-radius: 11px; border: 1px solid transparent; transition: transform .12s ease, background .16s ease, border-color .16s ease; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ember); color: #1B0A05; }
.btn--primary:hover { background: var(--ember-2); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--ember); background: var(--surface-2); }
.saved { font-size: 13px; color: var(--st-done); font-family: var(--f-mono); opacity: 0; transition: opacity .2s ease; }
.saved.show { opacity: 1; }

/* ── the "you are here" band ──────────────────────────────────────────────── */
.band { border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, var(--bg-2), var(--surface)); padding: 26px 24px; margin-bottom: 22px; }
.band__top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.band__pct { font-family: var(--f-display); font-weight: 800; font-size: clamp(40px, 7vw, 62px); letter-spacing: -0.03em; line-height: 1; }
.band__pct small { font-size: 0.4em; color: var(--mute); font-weight: 600; margin-left: 4px; }
.band__est { text-align: right; }
.band__est .k { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.band__est .v { font-size: 15px; color: var(--dim); margin-top: 3px; }

.track { margin-top: 22px; }
.track__bar { position: relative; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.track__fill { position: absolute; inset: 0 auto 0 0; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--wave), var(--ember)); width: 0; transition: width .5s cubic-bezier(.2,.7,.2,1); }
.track__phases { display: flex; justify-content: space-between; margin-top: 16px; gap: 4px; }
.pin { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.pin__dot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--bg); display: grid; place-items: center; flex: 0 0 auto; }
.pin__dot svg { width: 9px; height: 9px; }
.pin--done .pin__dot { background: var(--st-done); border-color: var(--st-done); color: #04140F; }
.pin--current .pin__dot { border-color: var(--ember); background: var(--ember); box-shadow: 0 0 0 5px rgba(255,106,69,0.16); animation: pulse 2.4s ease-in-out infinite; }
.pin--need .pin__dot { border-color: var(--amber); background: var(--amber); }
.pin__label { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.02em; color: var(--mute); line-height: 1.25; }
.pin--current .pin__label { color: var(--text); }
.pin--done .pin__label { color: var(--dim); }
.pin__here { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ember); }
.pin__ship { color: var(--wave); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 5px rgba(255,106,69,0.16); } 50% { box-shadow: 0 0 0 9px rgba(255,106,69,0.05); } }

/* ── open questions (amber, impossible to miss) ───────────────────────────── */
.asks { display: grid; gap: 14px; margin-bottom: 22px; }
.ask { border: 1px solid rgba(245,184,69,0.5); border-left: 4px solid var(--amber); border-radius: 14px; background: linear-gradient(180deg, rgba(245,184,69,0.08), var(--surface)); padding: 18px 20px; }
.ask__k { display: flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); }
.ask__k svg { width: 14px; height: 14px; flex: 0 0 auto; }
.ask__q { font-family: var(--f-display); font-weight: 700; font-size: 19px; margin-top: 8px; line-height: 1.2; }
.ask__why { color: var(--dim); font-size: 14px; margin-top: 6px; }
.ask__meta { color: var(--mute); font-size: 12.5px; font-family: var(--f-mono); margin-top: 6px; }
.ask__form { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.ask__form .input { flex: 1; min-width: 220px; }

/* ── roadmap accordion ────────────────────────────────────────────────────── */
.road { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.phases { display: grid; gap: 12px; }
.phase { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.phase--current { border-color: rgba(255,106,69,0.45); }
.phase__head { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: transparent; border: none; color: var(--text); padding: 16px 18px; }
.phase__ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; background: var(--surface-2); color: var(--mute); }
.phase__ic svg { width: 15px; height: 15px; }
.phase--done .phase__ic { background: rgba(53,224,196,0.15); color: var(--st-done); }
.phase--current .phase__ic { background: rgba(255,106,69,0.16); color: var(--ember); }
.phase--need .phase__ic { background: rgba(245,184,69,0.16); color: var(--amber); }
.phase__t { flex: 1; min-width: 0; }
.phase__title { font-family: var(--f-display); font-weight: 700; font-size: 16.5px; }
.phase__sum { color: var(--mute); font-size: 13px; margin-top: 2px; }
.phase__pct { font-family: var(--f-mono); font-size: 12px; color: var(--dim); flex: 0 0 auto; }
.phase__chev { color: var(--mute); transition: transform .2s ease; flex: 0 0 auto; }
.phase__chev svg { width: 16px; height: 16px; display: block; }
.phase[aria-expanded-body="true"] .phase__chev { transform: rotate(90deg); }
.phase__body { padding: 0 18px 8px; }
.phase__blurb { color: var(--dim); font-size: 14px; padding: 4px 0 12px; border-top: 1px solid var(--line); margin-top: 2px; padding-top: 12px; }
.phase__gate { display: flex; gap: 8px; align-items: flex-start; color: var(--mute); font-size: 13px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.phase__gate svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; color: var(--amber); }

.tasks { display: grid; gap: 2px; }
.task { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: start; padding: 10px 8px; border-radius: 10px; }
.task:hover { background: var(--bg-2); }
.task.flash { animation: flash 1.4s ease; }
@keyframes flash { 0% { background: rgba(53,224,196,0.14); } 100% { background: transparent; } }
.task__ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; border: 1.5px solid var(--line-2); color: var(--mute); }
.task__ic svg { width: 12px; height: 12px; }
.task--done .task__ic { background: var(--st-done); border-color: var(--st-done); color: #04140F; }
.task--doing .task__ic { border-color: var(--ember); color: var(--ember); }
.task--blocked .task__ic { border-color: var(--amber); background: var(--amber); color: #1B0A05; }
.task--skipped .task__ic { border-style: dashed; }
.task__body { min-width: 0; }
.task__title { font-size: 14.5px; }
.task--done .task__title { color: var(--dim); }
.task--skipped .task__title { color: var(--mute); text-decoration: line-through; }
.task__note { color: var(--dim); font-size: 13px; margin-top: 3px; }
.task--blocked .task__note { color: var(--amber); }
.task__meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.who { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--mute); }
.who--you { color: var(--gated); border-color: rgba(111,168,255,0.4); }
.who--agent { color: var(--dim); }
.task__time { font-family: var(--f-mono); font-size: 11px; color: var(--mute); }
.task__est { font-family: var(--f-mono); font-size: 11px; color: var(--mute); flex: 0 0 auto; }

/* ── activity feed (right rail) ───────────────────────────────────────────── */
.feed { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); position: sticky; top: 78px; }
.feed__head { padding: 15px 18px; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.feed__list { list-style: none; padding: 8px; display: grid; gap: 2px; max-height: 62vh; overflow-y: auto; }
.ev { display: grid; grid-template-columns: 16px 1fr; gap: 10px; padding: 9px 10px; border-radius: 9px; }
.ev__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); margin-top: 6px; }
.ev--task_done .ev__dot, .ev--phase_done .ev__dot { background: var(--st-done); }
.ev--question .ev__dot, .ev--blocked .ev__dot { background: var(--amber); }
.ev--answered .ev__dot { background: var(--gated); }
.ev--task_start .ev__dot { background: var(--ember); }
.ev__text { font-size: 13px; color: var(--dim); }
.ev__time { font-family: var(--f-mono); font-size: 10.5px; color: var(--mute); margin-top: 2px; }
.feed__mobile-toggle { display: none; }

/* ── empty / error states ─────────────────────────────────────────────────── */
.state { border: 1px dashed var(--line-2); border-radius: 14px; padding: 40px 24px; text-align: center; color: var(--mute); }
.state h3 { color: var(--text); font-size: 18px; margin-bottom: 8px; }
.state code { font-family: var(--f-mono); color: var(--ember); background: var(--bg-2); padding: 2px 6px; border-radius: 5px; font-size: 13px; }

.footnote { color: var(--mute); font-size: 12.5px; text-align: center; padding: 28px 24px; max-width: 620px; margin: 8px auto 0; line-height: 1.6; }

/* ── responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .road { grid-template-columns: 1fr; }
  .feed { position: static; }
  .feed__list { max-height: none; }
  /* phase track goes vertical on mobile */
  .track__phases { flex-direction: column; align-items: stretch; gap: 10px; }
  .pin { flex-direction: row; justify-content: flex-start; text-align: left; gap: 12px; }
  .band__est { text-align: left; }
  .band__top { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 640px) {
  /* the "local only · localhost:4321" chip won't fit beside the brand + connection chip on a phone;
     the same "local only" reminder lives in the footnote (§8), so drop the chip here. */
  .localchip { display: none; }
}
@media (max-width: 520px) {
  .main { padding: 18px 16px 0; }
  .top__in { padding: 10px 16px; }
  .input { min-width: 0; width: 100%; }
  .field { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .pin--current .pin__dot { box-shadow: 0 0 0 5px rgba(255,106,69,0.16); }
}
