/* salesshuru agent — control plane.
   Concept: every project is a line. Up next -> agent working -> your review -> live.
   Colour carries state: amber = agent working, violet = your turn (the merge gate),
   green = live, red = failed. Nothing else gets colour. */

:root {
  --paper: #f2f4f7;
  --surface: #ffffff;
  --sunk: #e9ecf1;
  --ink: #1b1f2e;
  --muted: #5e6577;
  --rule: #d9dde5;
  --rule-strong: #b9bfcc;
  --gate: #5b3fd6;
  --gate-soft: #ece8fc;
  --gate-ink: #ffffff;
  --live: #0f7b53;
  --live-soft: #e2f3ea;
  --work: #a86a05;
  --work-soft: #fbf0d9;
  --fail: #b42318;
  --fail-soft: #fdebe9;

  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --shadow: 0 1px 0 rgba(27, 31, 46, 0.04), 0 1px 3px rgba(27, 31, 46, 0.06);
  --wrap: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10131c;
    --surface: #171b26;
    --sunk: #1d2230;
    --ink: #e8eaf0;
    --muted: #9aa1b2;
    --rule: #2a3040;
    --rule-strong: #3a4256;
    --gate: #9b87ff;
    --gate-soft: #251f45;
    --gate-ink: #120c2e;
    --live: #3cc48a;
    --live-soft: #12301f;
    --work: #e3a63b;
    --work-soft: #33270f;
    --fail: #f0716a;
    --fail-soft: #3a1714;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; }
h2 { font-size: 1.125rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--gate); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------------ chrome */

.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.top-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px; height: 60px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; white-space: nowrap; }
.brand-mark { width: 22px; height: 22px; flex: none; }
.brand-sub { font-weight: 500; color: var(--muted); }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.top nav a.navlink { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.top nav a.navlink:hover, .top nav a.navlink[aria-current="page"] { color: var(--ink); }
.who { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none; object-fit: cover;
  display: inline-grid; place-items: center; background: var(--sunk); color: var(--ink);
  font-weight: 700; font-size: 0.8rem; border: 1px solid var(--rule);
}
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 0.9rem; cursor: pointer; white-space: nowrap; }
button.link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

main { max-width: var(--wrap); margin: 0 auto; padding: 40px 24px 96px; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: var(--ink); color: var(--paper);
  font: 600 0.95rem/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(1.15); }
.btn-quiet { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); }
.btn-quiet:hover { filter: none; border-color: var(--ink); }
.btn-gate { background: var(--gate); color: var(--gate-ink); }
.btn-danger { background: transparent; color: var(--fail); border-color: color-mix(in srgb, var(--fail) 50%, transparent); }
.btn-danger:hover { filter: none; background: var(--fail-soft); }
.btn-big { min-height: 48px; padding: 0 22px; font-size: 1rem; border-radius: var(--r-md); }
.btn-small { min-height: 32px; padding: 0 12px; font-size: 0.875rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ------------------------------------------------------------------ status pill */

.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 8px;
  border-radius: 999px; font-size: 0.8rem; font-weight: 600; line-height: 1.4;
  background: var(--sunk); color: var(--muted); white-space: nowrap; vertical-align: middle;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-live { background: var(--live-soft); color: var(--live); }
.pill-failed { background: var(--fail-soft); color: var(--fail); }
.pill-working { background: var(--work-soft); color: var(--work); }
.pill-deleted, .pill-deleting { background: var(--sunk); color: var(--muted); }

/* ------------------------------------------------------------------ sign in */

.signin { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: center; padding-top: 32px; }
.signin h1 { font-size: clamp(2.25rem, 4.6vw, 3.25rem); line-height: 1.05; letter-spacing: -0.03em; max-width: 16ch; }
.typed {
  display: block; margin-top: 18px; font: 500 clamp(1.15rem, 2.4vw, 1.6rem)/1.2 var(--mono);
  letter-spacing: -0.01em; color: var(--muted); white-space: nowrap;
}
.typed b { color: var(--ink); font-weight: 600; }
.typed .caret { display: inline-block; width: 0.55ch; height: 1.05em; margin-left: 1px; vertical-align: -0.15em; background: var(--gate); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.signin .lead { margin-top: 24px; font-size: 1.125rem; color: var(--muted); max-width: 46ch; }
.signin .actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.fine { margin-top: 20px; font-size: 0.875rem; color: var(--muted); max-width: 52ch; }
.notice { margin-top: 24px; padding: 12px 14px; border-radius: var(--r-md); background: var(--work-soft); color: var(--ink); }

.steps-inline { margin: 40px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; counter-reset: s; max-width: 48ch; }
.steps-inline li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; color: var(--muted); }
.steps-inline li::before {
  content: counter(s); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--rule-strong); font-size: 0.8rem; font-weight: 700; color: var(--ink); background: var(--surface);
}
.steps-inline strong { color: var(--ink); font-weight: 600; }

.example { position: relative; }
.example-tag { font-size: 0.8rem; color: var(--muted); margin: 0 0 10px 4px; }

/* ------------------------------------------------------------------ page heading */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 28px; }
.page-head p { margin-top: 6px; color: var(--muted); }

/* ------------------------------------------------------------------ dashboard */

.plist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.plist > li + li { border-top: 1px solid var(--rule); }
.prow {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) auto; gap: 24px; align-items: center;
  padding: 20px 24px; text-decoration: none; position: relative;
}
.prow:hover { background: color-mix(in srgb, var(--sunk) 55%, transparent); }
.prow-name { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.prow-name a { text-decoration: none; }
.prow-name a::after { content: ""; position: absolute; inset: 0; } /* whole row is the link */
.prow-domain { display: block; margin-top: 2px; font: 400 0.85rem var(--mono); color: var(--muted); position: relative; z-index: 1; text-decoration: none; width: fit-content; }
.prow-domain:hover { color: var(--ink); text-decoration: underline; }
.prow-detail { font-size: 0.9rem; color: var(--muted); min-width: 0; }
.prow-detail .err { color: var(--fail); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prow-status { justify-self: end; }

.mini { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.mini li { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.mini li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--rule-strong); }
.mini .m-work::before { background: var(--work); }
.mini .m-gate { color: var(--gate); font-weight: 600; }
.mini .m-gate::before { background: var(--gate); }
.mini .m-next::before { background: var(--muted); }

.progress { display: flex; align-items: center; gap: 12px; }
.bar { flex: 1; max-width: 220px; height: 6px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--work); border-radius: inherit; }

.empty {
  text-align: left; padding: 40px; border: 1px dashed var(--rule-strong); border-radius: var(--r-lg);
  display: grid; gap: 16px; justify-items: start; background: var(--surface);
}
.empty h2 { font-size: 1.35rem; }
.empty p { color: var(--muted); max-width: 52ch; }

/* ------------------------------------------------------------------ panels */

.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 24px; }
.panel > h2 { margin-bottom: 16px; }
.panel + .panel { margin-top: 20px; }

/* ------------------------------------------------------------------ project header */

.proj-head { display: grid; gap: 18px; margin-bottom: 32px; }
.proj-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.proj-title h1 { letter-spacing: -0.025em; }
.proj-url { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.url-big {
  font: 500 clamp(1.05rem, 2.2vw, 1.35rem)/1.3 var(--mono); letter-spacing: -0.01em; text-decoration: none;
  overflow-wrap: anywhere;
}
a.url-big:hover { text-decoration: underline; }
.url-big.offline { color: var(--muted); }
.proj-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.copy[data-copied="1"] { border-color: var(--live); color: var(--live); }

.alert {
  display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; align-items: start;
  padding: 18px 20px; border-radius: var(--r-lg); margin-bottom: 24px;
  background: var(--fail-soft); border: 1px solid color-mix(in srgb, var(--fail) 35%, transparent);
}
.alert h2 { color: var(--fail); font-size: 1.05rem; }
.alert pre { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 0.85rem/1.5 var(--mono); color: var(--ink); }

/* ------------------------------------------------------------------ the line */

.line-wrap { margin-bottom: 28px; }
.line-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.line-head p { color: var(--muted); font-size: 0.925rem; }
.line {
  list-style: none; margin: 0; padding: 0; position: relative;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.stop { position: relative; padding: 22px 22px 24px; min-height: 176px; display: flex; flex-direction: column; gap: 10px; }
.stop + .stop { border-left: 1px solid var(--rule); }
/* the rail: a chevron joint between stops */
.stop + .stop::before {
  content: ""; position: absolute; left: -7px; top: 30px; width: 12px; height: 12px;
  background: var(--surface); border-top: 1px solid var(--rule); border-right: 1px solid var(--rule);
  transform: rotate(45deg);
}
.stop-label { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.stop-label .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rule-strong); flex: none; }
.stop-body { display: grid; gap: 8px; align-content: start; flex: 1; }
.stop-empty { color: var(--muted); font-size: 0.9rem; }
.stop .ref { font-weight: 600; text-decoration: none; }
.stop .ref:hover { text-decoration: underline; }
.issue-title { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.issue-title a { text-decoration: none; }
.issue-title a:hover { text-decoration: underline; }
.issue-num { color: var(--muted); font-weight: 500; }
.stop .meta { font-size: 0.85rem; color: var(--muted); }
.stop .meta code { color: var(--ink); }

.next-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.925rem; }
.next-list li { display: flex; gap: 8px; min-width: 0; }
.next-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-list a { text-decoration: none; }
.next-list a:hover { text-decoration: underline; }

.stop-work.active .dot { background: var(--work); box-shadow: 0 0 0 0 color-mix(in srgb, var(--work) 50%, transparent); animation: pulse 1.8s ease-out infinite; }
.stop-work.active .stop-label { color: var(--work); }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.stop-gate.active { background: var(--gate-soft); }
.stop-gate.active .dot { background: var(--gate); }
.stop-gate.active .stop-label { color: var(--gate); }
.stop-gate.active .btn { align-self: flex-start; margin-top: 4px; }

.stop-live.active .dot { background: var(--live); }
.stop-live.active .stop-label { color: var(--live); }
.stop-next.active .dot { background: var(--ink); }

.feed .when, .progress span { font-variant-numeric: tabular-nums; }

/* stacked variant (sign-in example, narrow columns) */
.line-vertical { grid-template-columns: 1fr; }
.line-vertical .stop { min-height: 0; padding: 18px 20px; }
.line-vertical .stop + .stop { border-left: 0; border-top: 1px solid var(--rule); }
.line-vertical .stop + .stop::before { left: 26px; top: -7px; transform: rotate(135deg); }
.line-vertical .stop:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.line-vertical .stop:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.line .stop:first-child { border-top-left-radius: var(--r-lg); border-bottom-left-radius: var(--r-lg); }
.line .stop:last-child { border-top-right-radius: var(--r-lg); border-bottom-right-radius: var(--r-lg); }

/* ------------------------------------------------------------------ project body */

.proj-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.side { display: grid; gap: 20px; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; padding: 10px 0; align-items: baseline; font-size: 0.95rem; }
.feed li + li { border-top: 1px solid var(--rule); }
.feed .ic { width: 8px; height: 8px; border-radius: 50%; background: var(--rule-strong); margin-top: 7px; justify-self: center; align-self: start; }
.feed .ic-live { background: var(--live); }
.feed .ic-work { background: var(--work); }
.feed .ic-gate { background: var(--gate); }
.feed .ic-fail { background: var(--fail); }
.feed .when { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.feed .why { display: block; color: var(--muted); font-size: 0.875rem; margin-top: 2px; overflow-wrap: anywhere; }
.feed code { font-size: 0.82em; }

.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 0.925rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.about { color: var(--muted); font-size: 0.95rem; white-space: pre-line; margin-bottom: 16px; }

.stepper { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.stepper li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; position: relative; font-size: 0.95rem; }
.stepper li::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rule-strong); background: var(--surface); justify-self: center; z-index: 1;
}
.stepper li:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 28px; bottom: -10px; width: 2px; background: var(--rule); }
.stepper .s-done::before { background: var(--live); border-color: var(--live); }
.stepper .s-done:not(:last-child)::after { background: color-mix(in srgb, var(--live) 45%, var(--rule)); }
.stepper .s-current::before { border-color: var(--work); background: var(--work-soft); box-shadow: 0 0 0 4px var(--work-soft); }
.stepper .s-current { font-weight: 600; }
.stepper .s-failed::before { background: var(--fail); border-color: var(--fail); }
.stepper .s-failed { color: var(--fail); font-weight: 600; }
.stepper .s-pending { color: var(--muted); }
.stepper .s-note { font-size: 0.8rem; color: var(--muted); font-weight: 400; }
.setup-lead { color: var(--muted); margin: -6px 0 16px; max-width: 60ch; }

details.danger { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); }
details.danger summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--muted); list-style: none; display: flex; justify-content: space-between; }
details.danger summary::-webkit-details-marker { display: none; }
details.danger summary::after { content: "+"; font-weight: 400; }
details.danger[open] summary::after { content: "–"; }
details.danger[open] summary { color: var(--fail); }
.danger-body { padding: 0 20px 20px; display: grid; gap: 12px; font-size: 0.925rem; color: var(--muted); }
.danger-row { display: flex; gap: 10px; flex-wrap: wrap; }
.danger-row input { flex: 1; min-width: 160px; }

/* ------------------------------------------------------------------ forms */

.new-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr); gap: 32px; align-items: start; }
.form { display: grid; gap: 8px; }
.form label { font-weight: 600; margin-top: 14px; }
.form label:first-of-type { margin-top: 0; }
input[type="text"], input:not([type]), textarea {
  width: 100%; font: 400 1rem/1.5 var(--sans); color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r-sm);
  padding: 10px 12px;
}
input:focus, textarea:focus { outline: none; border-color: var(--gate); box-shadow: 0 0 0 3px var(--gate-soft); }
textarea { resize: vertical; min-height: 200px; }
.domain-input { display: flex; align-items: stretch; border: 1px solid var(--rule-strong); border-radius: var(--r-sm); background: var(--surface); overflow: hidden; }
.domain-input:focus-within { border-color: var(--gate); box-shadow: 0 0 0 3px var(--gate-soft); }
.domain-input input { border: 0; border-radius: 0; font-family: var(--mono); box-shadow: none !important; min-width: 0; }
.domain-input .suffix { display: flex; align-items: center; padding: 0 12px; background: var(--sunk); color: var(--muted); font: 0.95rem var(--mono); border-left: 1px solid var(--rule); white-space: nowrap; }
.hint { font-size: 0.85rem; color: var(--muted); }
.field-error { font-size: 0.875rem; color: var(--fail); font-weight: 500; }
[aria-invalid="true"], .domain-input:has([aria-invalid="true"]) { border-color: var(--fail); }
.form .btn { justify-self: start; margin-top: 18px; }
.ideas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.idea { border: 1px solid var(--rule); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 5px 12px; font: 500 0.85rem var(--sans); cursor: pointer; }
.idea:hover { color: var(--ink); border-color: var(--rule-strong); }

.whatnext h2 { margin-bottom: 4px; }
.whatnext .preview { font: 500 1.05rem/1.3 var(--mono); overflow-wrap: anywhere; margin: 10px 0 18px; padding: 12px 14px; border-radius: var(--r-md); background: var(--sunk); }
.whatnext .preview span { color: var(--muted); }


/* ------------------------------------------------------------------ project tabs */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-top: 6px; overflow-x: auto; }
.tabs a {
  padding: 10px 14px; margin-bottom: -1px; text-decoration: none; font-weight: 600; font-size: 0.95rem;
  color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.proj-head { margin-bottom: 28px; }

.flash { padding: 12px 16px; border-radius: var(--r-md); background: var(--live-soft); color: var(--ink); margin: 0 0 20px; border: 1px solid color-mix(in srgb, var(--live) 30%, transparent); }
.flash-error { background: var(--fail-soft); border-color: color-mix(in srgb, var(--fail) 35%, transparent); }

/* ------------------------------------------------------------------ tasks board */

.board-wrap { margin-bottom: 40px; }
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.col { padding: 18px 20px 20px; min-width: 0; }
.col + .col { border-left: 1px solid var(--rule); }
.col h3 { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); margin-bottom: 12px; }
.col h3::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--rule-strong); }
.col-progress h3::before { background: var(--work); }
.col-done h3::before { background: var(--live); }
.col-attention h3::before { background: var(--fail); }
.count { font-weight: 500; font-variant-numeric: tabular-nums; }
.col ul, .col ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.col li { display: grid; gap: 2px; font-size: 0.925rem; line-height: 1.35; }
.col li a { text-decoration: none; }
.col li a:hover { text-decoration: underline; }
.col-empty { color: var(--muted); font-size: 0.875rem; }
.stage { font-size: 0.78rem; color: var(--muted); }
.stage-waiting-for-your-review { color: var(--gate); font-weight: 600; }
.stage-agent-working { color: var(--work); font-weight: 600; }
.stage-live { color: var(--live); }
.stage-deploy-failed, .stage-agent-couldnt-finish { color: var(--fail); }

/* ------------------------------------------------------------------ planning */

.plan { scroll-margin-top: 80px; }
.plan-intro { margin-bottom: 14px; }
.plan-intro h2 { margin-bottom: 4px; }
.plan-intro p { max-width: 70ch; }
.plan-form { display: grid; gap: 8px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.plan-form label { font-weight: 600; font-size: 0.95rem; }
.plan-row { display: flex; gap: 10px; flex-wrap: wrap; }
.plan-row input { flex: 1 1 280px; }
.plan-row .btn { min-height: 44px; }
.btn[disabled] { opacity: 0.55; cursor: progress; filter: none; }
.plan-empty { margin-top: 16px; }

.sugg { list-style: none; margin: 20px 0 0; padding: 0; counter-reset: sg;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.sg { counter-increment: sg; display: grid; grid-template-columns: 22px 28px minmax(0, 1fr) auto; gap: 4px 12px; padding: 16px 20px; align-items: start; scroll-margin-top: 80px; }
.sg + .sg { border-top: 1px solid var(--rule); }
.sg::before { content: counter(sg); grid-column: 2; grid-row: 1; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; text-align: right; }
.sg-check { grid-column: 1; grid-row: 1; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--gate); cursor: pointer; }
.sg-main { grid-column: 3; min-width: 0; display: grid; gap: 4px; }
.sg-side { grid-column: 4; display: grid; justify-items: end; gap: 8px; }
.sg-title { font-weight: 600; font-size: 1rem; line-height: 1.35; }
.sg-why { color: var(--muted); font-size: 0.925rem; }
.sg-goal { font-size: 0.825rem; color: var(--ink); display: flex; gap: 6px; align-items: baseline; }
.sg-goal::before { content: "Goal"; font-size: 0.75rem; font-weight: 600; color: var(--gate); background: var(--gate-soft); padding: 1px 7px; border-radius: 999px; flex: none; }
.sg:has(.sg-check:not(:checked)) .sg-main { opacity: 0.55; }
.tag { font-size: 0.72rem; font-weight: 600; color: var(--muted); border: 1px solid var(--rule-strong); border-radius: 999px; padding: 0 7px; vertical-align: 2px; }
.size { font-size: 0.75rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.size-medium { background: var(--work-soft); color: var(--work); }
.sg-more summary, .dismiss summary { cursor: pointer; font-size: 0.85rem; color: var(--muted); list-style: none; width: fit-content; }
.sg-more summary::-webkit-details-marker, .dismiss summary::-webkit-details-marker { display: none; }
.sg-more summary:hover, .dismiss summary:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.sg-more[open] summary { color: var(--ink); margin-bottom: 8px; }
.sg-edit { display: grid; gap: 6px; padding: 14px; background: var(--sunk); border-radius: var(--r-md); }
.sg-edit label { font-size: 0.85rem; font-weight: 600; }
.sg-edit textarea { min-height: 160px; font-size: 0.9rem; }
.sg-edit .btn { justify-self: start; margin-top: 4px; }
.dismiss { margin: 0; position: relative; }
.dismiss-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: grid; gap: 2px; min-width: 170px;
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r-md); padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.dismiss-menu .link { text-align: left; padding: 7px 10px; border-radius: var(--r-sm); color: var(--ink); }
.dismiss-menu .link:hover { background: var(--sunk); text-decoration: none; }

.pushbar {
  position: sticky; bottom: 16px; margin-top: 16px; z-index: 4;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 14px 18px; border-radius: var(--r-lg); background: var(--ink); color: var(--paper);
  box-shadow: 0 10px 30px rgba(15, 18, 30, 0.25);
}
.pushbar p { font-size: 0.925rem; max-width: 62ch; }
.pushbar .btn-gate { min-height: 44px; }

.sg-part { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.prow-status { display: grid; justify-items: end; gap: 6px; }
.prow-cost { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cost-parts { margin-top: 6px; font-size: 0.85rem; }
.cost-parts summary { cursor: pointer; color: var(--muted); width: fit-content; }
.cost-parts ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.cost-parts li { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.brief-head { margin-bottom: 18px; max-width: 75ch; }
.scope { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 20px; }
.scope-sec { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px; display: grid; gap: 10px; align-content: start; scroll-margin-top: 80px; }
.scope-sec h2 { font-size: 1.05rem; }
.scope-not h2 { color: var(--fail); }
.scope-hint { font-size: 0.85rem; color: var(--muted); }
.scope-text { font-size: 0.95rem; white-space: pre-line; }
.scope-empty { font-size: 0.9rem; color: var(--muted); }
.scope-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.scope-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--sunk); font-size: 0.95rem; }
.scope-list form { margin: 0; flex: none; }
.scope-x { border: 0; background: none; color: var(--muted); font-size: 1.15rem; line-height: 1; width: 28px; height: 28px; border-radius: var(--r-sm); cursor: pointer; }
.scope-x:hover { color: var(--fail); background: var(--fail-soft); }
.scope-add { display: flex; gap: 8px; margin-top: 4px; }
.scope-add input { flex: 1; min-width: 0; padding: 8px 10px; font-size: 0.95rem; }
.raw-brief summary { cursor: pointer; font-weight: 600; }
.raw-brief[open] summary { margin-bottom: 14px; }
.empty-brief { display: grid; gap: 12px; justify-items: start; max-width: 70ch; }
.brief-text { font-size: 0.95rem; line-height: 1.6; min-height: 480px; }
.redraft { margin-top: 14px; }

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

@media (max-width: 960px) {
  .line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stop:nth-child(3) { border-left: 0; border-top: 1px solid var(--rule); }
  .stop:nth-child(4) { border-top: 1px solid var(--rule); }
  .stop:nth-child(3)::before { display: none; }
  .proj-grid, .new-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .signin { grid-template-columns: 1fr; gap: 40px; padding-top: 8px; }
  .prow { grid-template-columns: 1fr auto; gap: 10px 16px; padding: 18px 16px; }
  .prow-detail { grid-column: 1 / -1; grid-row: 2; }
  .prow-status { grid-column: 2; grid-row: 1; align-self: start; max-width: 46vw; }
  .prow-status .pill { white-space: normal; text-align: left; }
}
@media (max-width: 600px) {
  .col + .col { border-left: 0; border-top: 1px solid var(--rule); }
  .sg { grid-template-columns: 22px minmax(0, 1fr) auto; padding: 16px; }
  .sg::before { display: none; }
  .sg-main { grid-column: 2; }
  .sg-side { grid-column: 3; }
  .pushbar { bottom: 8px; }
  .top-inner { padding: 0 16px; gap: 12px; }
  .top nav { gap: 12px; }
  .who .uname, .top nav a.navlink { display: none; }
  .proj-url .copy { order: 1; }
  main { padding: 24px 16px 72px; }
  .line { grid-template-columns: 1fr; }
  .stop { min-height: 0; }
  .stop + .stop { border-left: 0; border-top: 1px solid var(--rule); }
  .stop + .stop::before { left: 28px; top: -7px; transform: rotate(135deg); }
  .stop:nth-child(3)::before { display: block; }
  .panel { padding: 18px 16px; }
  .alert { grid-template-columns: 1fr; }
  .proj-actions { margin-left: 0; }
  .empty { padding: 28px 20px; }
  .typed { white-space: normal; overflow-wrap: anywhere; }
}

@media (max-width: 400px) {
  .brand-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
