/* ai-collab. Design rules live in SPEC.md section 9. */

:root {
  --c-teal: #0CA678;
  --c-violet: #7048E8;
  --c-orange: #F76707;
  --c-pink: #D6336C;
  --bg: #F7F7F5;
  --surface: #FFFFFF;
  --surface-2: #F1F1EE;
  --border: #E6E5E1;
  --text: #1C1C1A;
  --text-2: #5F5E5A;
  --text-3: #8D8C87;
  --accent: #3B5BDB;
  --accent-ink: #FFFFFF;
  --accent-soft: #EDF1FD;
  --accent-line: #C9D3F6;
  --danger: #C92A2A;
  --scrim: rgba(20, 20, 18, 0.42);
  --shadow-sm: 0 1px 2px rgba(20, 20, 18, 0.05);
  --shadow: 0 1px 2px rgba(20, 20, 18, 0.04), 0 4px 16px rgba(20, 20, 18, 0.06);
  --shadow-lg: 0 8px 32px rgba(20, 20, 18, 0.16);
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 160ms;
  --slow: 200ms;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-teal: #38D9A9;
    --c-violet: #9775FA;
    --c-orange: #FFA94D;
    --c-pink: #F06595;
    --bg: #141413;
    --surface: #1D1D1B;
    --surface-2: #262624;
    --border: #33332F;
    --text: #EDEDEA;
    --text-2: #A9A8A2;
    --text-3: #7A7974;
    --accent: #8EA2F5;
    --accent-ink: #10142B;
    --accent-soft: #1F2540;
    --accent-line: #34407A;
    --danger: #FF8787;
    --scrim: rgba(0, 0, 0, 0.6);
    --shadow-sm: none;
    --shadow: 0 0 0 1px var(--border);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
svg.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */

.shell { min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 12px) 20px 12px;
  background: var(--bg);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.topbar .project { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.topbar .eyebrow { font-size: 12px; font-weight: 500; color: var(--text-3); letter-spacing: 0.01em; }
.topbar h1 { font-size: 20px; font-weight: 650; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.6s var(--ease) infinite; }

main.view {
  flex: 1;
  padding: 8px 20px calc(var(--nav-h) + var(--safe-b) + 28px);
  animation: view-in var(--slow) var(--ease);
}
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }

.section-title { font-size: 13px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin: 24px 4px 10px; }
.section-title:first-child { margin-top: 8px; }

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

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: center;
  padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--border);
}
.nav-inner { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; max-width: 560px; }
.nav button {
  position: relative;
  height: var(--nav-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; background: none; color: var(--text-3);
  font-size: 11.5px; font-weight: 500;
  transition: color var(--fast) var(--ease);
}
.nav button svg.icon { transition: transform var(--fast) var(--ease); }
.nav button:active svg.icon { transform: scale(0.9); }
.nav button[aria-current="page"] { color: var(--accent); }
.nav button[aria-current="page"] svg.icon { stroke-width: 2.1; }
.badge {
  position: absolute; top: 8px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
  animation: pop 260ms var(--ease);
}
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none;
  transition: transform var(--fast) var(--ease), background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), opacity var(--fast) var(--ease);
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn.ghost { background: none; color: var(--text-2); }
.btn.danger { background: none; color: var(--danger); }
.btn.block { width: 100%; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 10px; }
.btn svg.icon { width: 20px; height: 20px; }
.link-btn { border: 0; background: none; color: var(--text-2); font-weight: 500; padding: 12px; min-height: 48px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Cards and lists ---------- */

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; }
.row + .row { border-top: 1px solid var(--border); }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 500; }
.row .sub { font-size: 14px; color: var(--text-2); }
.row .sub.mono { font-family: var(--mono); font-size: 12.5px; }

.avatar {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 600; font-size: 15px;
  background: var(--surface-2); color: var(--text-2);
}
.avatar.me { background: var(--accent-soft); color: var(--accent); }
button.avatar { border: 0; padding: 0; }
.avatar.agent { border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.avatar.agent svg.icon { width: 20px; height: 20px; }
.avatar.lg { width: 44px; height: 44px; font-size: 17px; }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); margin-right: 6px; vertical-align: 1px; }
.status-dot.on { background: var(--accent); }

/* ---------- Empty states ---------- */

.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 48px 12px 24px;
}
.empty .art {
  width: 72px; height: 72px; border-radius: 22px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: 20px;
}
.empty .art svg.icon { width: 32px; height: 32px; stroke-width: 1.6; }
.empty h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 8px; }
.empty p { color: var(--text-2); max-width: 320px; margin-bottom: 24px; }
.empty .btn { min-width: 220px; }

/* ---------- Activity ---------- */

.feed { display: flex; flex-direction: column; gap: 2px; }
.event { display: flex; gap: 12px; padding: 12px 4px; align-items: flex-start; }
.event + .event { border-top: 1px solid var(--border); }
.event .avatar { margin-top: 1px; }
.event .line { color: var(--text); }
.event .line b { font-weight: 600; }
.event .meta { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.event .post-body { margin-top: 8px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--border); color: var(--text); font-size: 15px; }
.event.enter { animation: slide-in 320ms var(--ease); }
.event.live .meta::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; animation: pulse 1.6s var(--ease) infinite; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-10px); } }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- Question card ---------- */

.qcard { padding: 18px 16px 8px; animation: view-in var(--slow) var(--ease); }
.qcard + .qcard { margin-top: 12px; }
.q-who { display: flex; align-items: center; gap: 12px; }
.q-who .name { font-weight: 600; }
.q-who .where { font-size: 13.5px; color: var(--text-3); }
.q-working {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 0; padding: 8px 12px; border-radius: 10px;
  background: var(--surface-2); color: var(--text-2); font-size: 14px;
}
.q-working svg.icon { width: 16px; height: 16px; color: var(--text-3); }
.q-text { font-size: 20px; line-height: 1.4; font-weight: 600; letter-spacing: -0.01em; margin: 16px 0 6px; }
.q-context summary { list-style: none; cursor: pointer; color: var(--accent); font-weight: 500; font-size: 15px; padding: 8px 0; min-height: 40px; display: flex; align-items: center; gap: 6px; }
.q-context summary::-webkit-details-marker { display: none; }
.q-context summary svg.icon { width: 16px; height: 16px; transition: transform var(--fast) var(--ease); }
.q-context[open] summary svg.icon { transform: rotate(90deg); }
.q-context .body { color: var(--text-2); font-size: 15px; padding: 2px 0 8px; }
.q-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.choice {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 16px; border-radius: 12px; text-align: left;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 500;
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.choice:active { transform: scale(0.98); }
.choice:hover { border-color: var(--accent-line); }
.choice .key { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 600; flex: none; }
.choice.own { color: var(--text-2); border-style: dashed; }
.choice.picked { border-color: var(--accent); background: var(--accent-soft); }
.compose { display: none; flex-direction: column; gap: 10px; }
.compose.open { display: flex; animation: view-in var(--slow) var(--ease); }
textarea, input.text {
  width: 100%; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface);
  padding: 12px 14px; font-size: 16px; line-height: 1.45; resize: none;
  transition: border-color var(--fast) var(--ease);
}
textarea:focus, input.text:focus { outline: none; border-color: var(--accent); }
textarea { min-height: 96px; }
.q-footer { display: flex; justify-content: center; }

.qcard.sent { padding-bottom: 18px; }
.sent-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 8px 6px; animation: view-in var(--slow) var(--ease); }
.sent-state .check { width: 64px; height: 64px; margin-bottom: 14px; }
.sent-state .check circle { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 190; stroke-dashoffset: 190; animation: draw 420ms var(--ease) forwards; }
.sent-state .check path { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 260ms 300ms var(--ease) forwards; }
.sent-state h3 { font-size: 18px; font-weight: 650; }
.sent-state p { color: var(--text-2); margin-top: 4px; font-size: 15px; }
.sent-state .answer { margin-top: 12px; padding: 8px 14px; border-radius: 10px; background: var(--surface-2); font-weight: 500; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.qcard.sent .sent-state { animation: confirm 420ms var(--ease); }
@keyframes confirm { 0% { transform: scale(0.96); opacity: 0; } 60% { transform: scale(1.015); opacity: 1; } 100% { transform: scale(1); } }

/* ---------- Toast (simulated notification) ---------- */

.toast {
  position: fixed; left: 12px; right: 12px; top: calc(var(--safe-t) + 10px); z-index: 75;
  max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  border: 0; text-align: left; width: auto;
  transform: translateY(calc(-100% - 40px)); transition: transform 360ms var(--ease);
}
.toast.show { transform: none; }
.toast .t1 { font-weight: 600; font-size: 15px; }
.toast .t2 { font-size: 14px; color: var(--text-2); }

/* ---------- Sheet ---------- */

.sheet-scrim { position: fixed; inset: 0; z-index: 80; background: var(--scrim); opacity: 0; transition: opacity var(--slow) var(--ease); }
.sheet-scrim.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 81;
  max-width: 560px; margin: 0 auto;
  background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 10px 20px calc(var(--safe-b) + 20px);
  transform: translateY(100%); transition: transform 240ms var(--ease);
  box-shadow: var(--shadow-lg);
}
.sheet.show { transform: none; }
.sheet .grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 0 auto 16px; }
.sheet h2 { font-size: 20px; font-weight: 650; margin-bottom: 6px; }
.sheet p { color: var(--text-2); margin-bottom: 18px; }
.sheet .actions { display: flex; flex-direction: column; gap: 8px; }

.copybox {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.5;
  background: var(--surface-2); border-radius: 10px; padding: 12px;
  max-height: 140px; overflow: auto; white-space: pre-wrap; word-break: break-all;
  user-select: all; -webkit-user-select: all; margin-bottom: 12px;
}

/* ---------- Auth screens ---------- */

.auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; max-width: 440px; margin: 0 auto; padding: calc(var(--safe-t) + 32px) 24px calc(var(--safe-b) + 32px); animation: view-in var(--slow) var(--ease); }
.auth .logo { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 24px; box-shadow: var(--shadow); }
.auth h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 10px; }
.auth .lead { color: var(--text-2); font-size: 17px; margin-bottom: 28px; }
.auth form { display: flex; flex-direction: column; gap: 12px; }
.auth .paste-row { display: flex; gap: 8px; }
.auth .paste-row input { flex: 1; }
.auth .error { color: var(--danger); font-size: 15px; min-height: 22px; }
.auth .alt { margin-top: 20px; text-align: center; }
.steps { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-direction: column; gap: 12px; counter-reset: step; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.steps li .n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.steps li .i { display: inline-flex; vertical-align: -5px; color: var(--accent); }
.steps li .i svg.icon { width: 20px; height: 20px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Tour (after Plinth's tutorial) ---------- */

.tour { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.tour-block { position: fixed; pointer-events: auto; background: transparent; }
.tour-spot {
  position: fixed; border-radius: 16px; pointer-events: none;
  box-shadow: 0 0 0 9999px var(--scrim), 0 0 0 2px var(--accent);
  transition: all 260ms var(--ease);
}
.tour-spot.none { box-shadow: 0 0 0 9999px var(--scrim); width: 0 !important; height: 0 !important; left: 50% !important; top: 50% !important; }
.tour-card {
  position: fixed; left: 16px; top: 0;
  width: min(380px, calc(100vw - 32px));
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg);
  padding: 18px 18px 14px; pointer-events: auto;
  transition: transform 260ms var(--ease), opacity var(--slow) var(--ease);
}
.tour-card.hidden { opacity: 0; }
.tour-step { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.tour-card h2 { margin: 4px 0 6px; font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.tour-card p { color: var(--text-2); font-size: 15.5px; }
.tour-card .hint { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; font-weight: 500; color: var(--accent); }
.tour-card .hint::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.2s var(--ease) infinite; }
.tour-actions { display: flex; align-items: center; gap: 4px; margin-top: 14px; }
.tour-dots { display: flex; gap: 6px; flex: 1; }
.tour-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); transition: background-color var(--fast) var(--ease), width var(--fast) var(--ease); }
.tour-dots span.done { background: var(--accent-line); }
.tour-dots span.on { background: var(--accent); width: 18px; border-radius: 4px; }
.tour-actions .btn { min-height: 44px; padding: 0 14px; font-size: 15px; }
.tour-card.center { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(400px, calc(100vw - 32px)); padding: 24px 22px 16px; }
.tour-card.center h2 { font-size: 22px; }
.tour-card .welcome-art { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 14px; }
.tour-card.dock { padding: 12px 16px 14px; }
body.tour-dock main.view { padding-bottom: 260px; }
.tour-card.dock h2 { font-size: 17px; margin: 2px 0 2px; }
.tour-card.dock p { font-size: 14.5px; }
.dock-head { display: flex; align-items: center; justify-content: space-between; }
.link-skip { border: 0; background: none; color: var(--text-2); font-weight: 500; font-size: 14px; padding: 8px 0 8px 12px; min-height: 36px; }
.tour-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.tour-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.tour-row .grow { flex: 1; min-width: 0; }
.tour-row .title { font-weight: 600; font-size: 15.5px; }
.tour-row .sub { font-size: 13.5px; color: var(--text-2); }
.tour-row .avatar { background: var(--surface); }

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

/* ---------- Member colors (identity only, SPEC.md 4.1) ---------- */

.avatar.member { background: color-mix(in srgb, var(--m) 16%, var(--surface)); color: var(--m); }
.avatar.member.agent { background: color-mix(in srgb, var(--m) 14%, var(--surface)); }
.dot-m { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--m); flex: none; }

/* ---------- Lanes ---------- */

.lanes { display: flex; flex-direction: column; gap: 12px; }
.lane {
  position: relative; overflow: hidden;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px 6px 18px;
  transition: box-shadow var(--slow) var(--ease);
}
.lane::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--m); }
.lane.ping::before { animation: edge-ping 700ms var(--ease); }
@keyframes edge-ping { 30% { width: 10px; filter: brightness(1.15); } }
.lane.blocked { animation: breathe 2s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--m) 55%, transparent), 0 0 10px 0 color-mix(in srgb, var(--m) 25%, transparent); }
  50% { box-shadow: 0 0 0 2px var(--m), 0 0 28px 4px color-mix(in srgb, var(--m) 45%, transparent); }
}
.lane-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.lane-name { font-weight: 650; font-size: 16px; }
.lane-name .you { font-weight: 500; color: var(--text-3); }
.needed {
  margin-left: auto; height: 26px; padding: 0 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  background: color-mix(in srgb, var(--m) 16%, var(--surface)); color: var(--m);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.01em;
}
.lane-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; min-height: 52px; width: 100%;
  border: 0; background: none; text-align: left;
}
.lane-row + .lane-row { border-top: 1px solid var(--border); }
.lane-row.mine { cursor: pointer; border-radius: 10px; transition: background-color var(--fast) var(--ease); }
.lane-row.mine:active { background: var(--surface-2); }
.row-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); margin-top: 1px; }
.row-icon svg.icon { width: 17px; height: 17px; }
.row-icon.agent { background: color-mix(in srgb, var(--m) 14%, var(--surface)); color: var(--m); }
.row-who { font-size: 12.5px; font-weight: 600; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.row-who .state { display: inline-flex; align-items: center; gap: 5px; }
.row-who .state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.row-who .state.working::before { background: var(--m); animation: pulse 1.6s var(--ease) infinite; }
.row-who .state.blocked { color: var(--m); }
.row-who .state.blocked::before { background: var(--m); }
.row-who .state.focus::before { background: var(--text-3); }
.row-plain { font-size: 16px; color: var(--text); line-height: 1.4; margin-top: 1px; }
.lane-row.focus .row-plain, .lane-row.away .row-plain, .lane-row.stale .row-plain { color: var(--text-3); }
.row-wait { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--m); }
.row-time { font-size: 12.5px; color: var(--text-3); white-space: nowrap; margin-top: 2px; }
.row-edit { color: var(--text-3); margin-top: 6px; }
.row-edit svg.icon { width: 18px; height: 18px; }
.lane-row.cta { color: var(--accent); font-weight: 600; align-items: center; }
.lane-row.cta .row-icon { background: var(--accent-soft); color: var(--accent); }
.lane-row.none .row-plain { color: var(--text-3); font-size: 15px; }
details.more { margin-top: 6px; }
details.more summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--text-3); min-height: 28px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary svg.icon { width: 14px; height: 14px; transition: transform var(--fast) var(--ease); }
details.more[open] summary svg.icon { transform: rotate(90deg); }
details.more .detail { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; word-break: break-word; margin-top: 4px; }

/* Feed pulse: new items wash in with the actor's color. */
.event { position: relative; border-radius: 12px; }
.event.pulse { animation: slide-in 320ms var(--ease); }
.event.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 12px; pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--m) 30%, transparent), transparent 70%);
  animation: wash 900ms var(--ease) forwards;
}
@keyframes wash { 0% { opacity: 0; transform: scaleX(0.2); transform-origin: left; } 25% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; } }
.event .line b { color: var(--text); }
.event .post-link { display: inline-block; margin-top: 6px; font-size: 14px; font-weight: 600; text-decoration: none; }
.feed-empty { color: var(--text-3); font-size: 15px; padding: 8px 4px 0; }

/* ---------- Status sheet ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 500; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chip .dot-m { width: 10px; height: 10px; }
.field-label { display: block; font-size: 14px; font-weight: 600; color: var(--text-2); margin: 16px 0 8px; }
.sheet .stack { display: flex; flex-direction: column; }
.sheet .hint-text { font-size: 14px; color: var(--text-3); margin-top: 8px; }
.sheet { max-height: 92dvh; overflow-y: auto; }
.sheet .actions { margin-top: 20px; }

/* ---------- Decisions ---------- */

.day { font-size: 13px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin: 20px 4px 8px; }
.day:first-child { margin-top: 8px; }
.decision { display: flex; gap: 12px; padding: 14px 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.decision + .decision { margin-top: 10px; }
.decision.enter { animation: slide-in 320ms var(--ease); }
.decision .bar { width: 4px; border-radius: 2px; background: var(--m); flex: none; }
.decision .d-title { font-weight: 650; font-size: 16.5px; line-height: 1.35; }
.decision .d-reason { color: var(--text-2); margin-top: 4px; font-size: 15px; }
.decision .d-meta { font-size: 13px; color: var(--text-3); margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- Add why ---------- */

.why { display: flex; gap: 8px; margin-top: 14px; width: 100%; }
.why input { flex: 1; min-width: 0; }
.why-saved { margin-top: 12px; color: var(--text-2); font-size: 15px; }

/* Raise the nav above the tour scrim when a step asks you to tap it. */
body.tour-nav-up .nav { z-index: 72; }

/* ---------- Questions, step 3 ---------- */

.urgent-pill { margin-left: auto; align-self: flex-start; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; }
.q-footer { gap: 8px; }
.card.asked { padding: 14px 16px; position: relative; overflow: hidden; }
.card.asked + .card.asked { margin-top: 10px; }
.card.asked::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--m); }
.asked-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-3); }
.asked-q { font-weight: 600; font-size: 16px; margin-top: 6px; line-height: 1.4; }
.asked-a { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-weight: 600; display: inline-block; }
.asked-why { margin-top: 6px; color: var(--text-2); font-size: 15px; }
.asked-actions { margin-top: 4px; }
.asked-actions .link-btn { padding-left: 0; }
.option-row { display: flex; gap: 8px; margin-bottom: 8px; }
.option-row input { flex: 1; min-width: 0; }
.toggles { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.toggle { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.toggle input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.toggle small { color: var(--text-2); font-size: 13.5px; }
select.text { appearance: none; -webkit-appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238D8C87' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px; padding-right: 40px; width: 100%; }
.lane-ask { margin-left: auto; min-height: 36px; padding: 0 12px; color: var(--accent); }
.row-answer { min-height: 32px; padding: 0 12px; margin-left: 8px; font-size: 14px; vertical-align: middle; }
.row-wait { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

/* ---------- Decisions, step 3 ---------- */

.chips.filters { margin: 14px 0 4px; }
.chips.filters .chip { min-height: 36px; font-size: 14px; }
.decision .d-question { font-size: 13.5px; color: var(--text-3); margin-bottom: 4px; line-height: 1.35; }
.decision.replaced .d-title { text-decoration: line-through; color: var(--text-3); }
.decision .d-replaced { margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
