/* ============================================================
   AI.com vNext — demo prototype design system
   ============================================================ */

:root {
  --bg: #ffffff;
  --panel: #fafafa;
  --panel2: #f4f4f5;
  --border: #e9e9eb;
  --border2: #dddde1;
  --ink: #18181b;
  --ink2: #52525b;
  --ink3: #9d9da6;
  --accent: #e5484d;
  --accent-ink: #c93a3f;
  --accent-soft: #fdedee;
  --blue: #3b62e0;
  --blue-soft: #edf1fd;
  --green: #2f9e63;
  --green-soft: #e8f6ee;
  --amber: #d97a06;
  --amber-soft: #fdf3e2;
  --violet: #6e56cf;
  --violet-soft: #f1eefb;
  --dark: #18181b;
  --r: 10px;
  --r-lg: 14px;
  --shadow: 0 1px 2px rgba(24,24,27,.04), 0 4px 16px rgba(24,24,27,.05);
  --shadow-lg: 0 2px 6px rgba(24,24,27,.07), 0 16px 48px rgba(24,24,27,.12);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app { display: flex; flex-direction: column; height: 100vh; }

/* ---------- top bar ---------- */
#topbar {
  height: 50px; flex: 0 0 50px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; border-bottom: 1px solid var(--border);
  background: var(--bg); z-index: 20;
}
.tb-left, .tb-right { display: flex; align-items: center; gap: 14px; }
.logo { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.logo-dot { color: var(--accent); }
.crumb { color: var(--ink3); font-size: 13px; }
.clockchip {
  font-family: var(--mono); font-size: 12px; color: var(--ink2);
  background: var(--panel2); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 999px;
}
.persona-pill {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px 3px 4px;
  background: var(--bg); transition: box-shadow .3s;
}
.pp-text { display: flex; flex-direction: column; line-height: 1.15; }
.pp-name { font-size: 12px; font-weight: 600; }
.pp-role { font-size: 10.5px; color: var(--ink3); }

/* ---------- shell ---------- */
#shell { flex: 1; display: flex; min-height: 0; }

#sidebar {
  width: 216px; flex: 0 0 216px;
  border-right: 1px solid var(--border);
  background: var(--panel);
  padding: 14px 10px 10px;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.nav-section { margin-bottom: 18px; }
.nav-head {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink3); padding: 0 8px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 8px;
  color: var(--ink2); font-size: 13px; cursor: pointer; user-select: none;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--panel2); }
.nav-item.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(24,24,27,.06); border: 1px solid var(--border); }
.nav-item.disabled { opacity: .45; cursor: default; }
.nav-item.disabled:hover { background: none; }
.ni-icon { width: 16px; text-align: center; color: var(--ink3); font-size: 12px; }
.nav-item.active .ni-icon { color: var(--accent); }
.nav-spacer { flex: 1; }
.persona-card {
  display: flex; gap: 9px; align-items: center;
  border-top: 1px solid var(--border); padding: 12px 6px 4px;
}
.sc-name { font-size: 12.5px; font-weight: 600; }
.sc-twin { font-size: 11px; color: var(--accent-ink); margin-top: 1px; }

/* ---------- stage ---------- */
#stage {
  flex: 1; min-width: 0; overflow-y: auto; position: relative;
  background: var(--bg);
  padding: 28px 34px 60px;
}

/* ---------- director ---------- */
#director {
  flex: 0 0 56px; height: 56px;
  background: var(--dark); color: #e7e7ea;
  display: flex; align-items: center; gap: 18px;
  padding: 0 18px; z-index: 30;
}
.d-left { flex: 0 0 170px; }
.d-act { font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.d-beat { font-size: 11px; color: #9d9da6; margin-top: 1px; }
.d-note {
  flex: 1; font-size: 12.5px; color: #c9c9cf; font-style: italic;
  line-height: 1.35; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
#director.notes-hidden .d-note { visibility: hidden; }
.d-controls { display: flex; align-items: center; gap: 12px; }
.dots { display: flex; gap: 5px; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3f3f46; cursor: pointer; transition: background .2s, transform .2s;
}
.dot.on { background: var(--accent); transform: scale(1.25); }
.btn-ghost {
  background: #27272a; color: #e7e7ea; border: 1px solid #3f3f46;
  width: 30px; height: 30px; border-radius: 8px; font-size: 16px;
  cursor: pointer; line-height: 1;
}
.btn-ghost:hover { background: #3f3f46; }
.d-hint {
  position: fixed; right: 14px; bottom: 62px;
  font-size: 10.5px; color: var(--ink3); background: rgba(255,255,255,.85);
  padding: 3px 8px; border-radius: 6px; z-index: 25; pointer-events: none;
}

/* ---------- shared components ---------- */
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; background: var(--violet);
  flex: 0 0 auto;
}
.avatar.sm { width: 24px; height: 24px; font-size: 9.5px; }
.avatar.agent { background: var(--accent); border-radius: 8px; }

.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.card-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.section-h {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink3); margin: 0 0 10px;
}
.muted { color: var(--ink2); }
.faint { color: var(--ink3); }
.small { font-size: 12px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 2.5px 9px; border-radius: 999px;
  background: var(--panel2); color: var(--ink2); border: 1px solid var(--border);
  white-space: nowrap;
}
.chip.coral { background: var(--accent-soft); color: var(--accent-ink); border-color: #f6cdce; }
.chip.green { background: var(--green-soft); color: var(--green); border-color: #c8e9d6; }
.chip.amber { background: var(--amber-soft); color: var(--amber); border-color: #f3ddb5; }
.chip.blue  { background: var(--blue-soft); color: var(--blue); border-color: #ccd8f7; }
.chip.violet{ background: var(--violet-soft); color: var(--violet); border-color: #ded5f5; }
.chip.strike { text-decoration: line-through; opacity: .6; }

.trace {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--ink3); font-weight: 500;
}
.trace b { color: var(--ink2); font-weight: 600; }

.btn {
  font: inherit; font-size: 12.5px; font-weight: 600;
  border-radius: 8px; padding: 7px 14px; cursor: pointer;
  border: 1px solid var(--border2); background: var(--bg); color: var(--ink);
  transition: all .15s;
}
.btn:hover { border-color: var(--ink3); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #000; }
.btn.coral { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.pressed { transform: scale(.96); }

.divider { height: 1px; background: var(--border); margin: 14px 0; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-anim *, .no-anim { transition: none !important; animation: none !important; }

/* typing caret */
.typing::after {
  content: ""; display: inline-block; width: 2px; height: 1em;
  background: var(--accent); margin-left: 2px; vertical-align: -2px;
  animation: blink .8s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* messages */
.msg { display: flex; gap: 10px; margin-bottom: 14px; max-width: 680px; }
.msg .m-body { flex: 1; min-width: 0; }
.m-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.m-from { font-size: 12.5px; font-weight: 700; }
.m-from.agent { color: var(--accent-ink); }
.m-time { font-size: 10.5px; color: var(--ink3); }
.m-text { font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.m-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg.event {
  margin: 10px 0 14px; padding: 9px 14px; max-width: 680px;
  background: var(--green-soft); border: 1px solid #c8e9d6; border-radius: 10px;
  font-size: 12.5px; color: var(--green); font-weight: 600;
}

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; text-align: center; }
.kpi-num { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.kpi-num.coral { color: var(--accent-ink); }
.kpi-label { font-size: 11.5px; color: var(--ink2); margin-top: 4px; line-height: 1.35; }

/* caption strip */
.caption-strip {
  margin-top: 22px; padding: 14px 18px; border-radius: var(--r-lg);
  background: var(--dark); color: #fff; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 12px;
}
.caption-strip .cs-spark { color: var(--accent); font-size: 16px; }

/* ============ overlays (title / close / persona toast) ============ */
.overlay {
  position: absolute; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 500px at 70% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, var(--blue-soft), transparent 55%),
    var(--bg);
}
.ov-inner { max-width: 760px; text-align: center; padding: 40px; }
.t-logo { font-size: 22px; font-weight: 800; margin-bottom: 34px; }
.t-kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 18px; }
.t-head { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 20px; }
.t-sub { font-size: 16.5px; color: var(--ink2); line-height: 1.6; max-width: 620px; margin: 0 auto 30px; }
.t-meta { display: flex; gap: 10px; justify-content: center; margin-bottom: 34px; flex-wrap: wrap; }
.t-hint { font-size: 12.5px; color: var(--ink3); }
.t-hint kbd {
  font-family: var(--mono); font-size: 11px; background: var(--panel2);
  border: 1px solid var(--border2); border-bottom-width: 2px;
  padding: 1px 6px; border-radius: 5px; margin: 0 2px;
}
.t-pillars { display: flex; gap: 14px; justify-content: center; margin-bottom: 30px; text-align: left; }
.t-pillar { flex: 1; max-width: 220px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow); }
.t-pillar b { display: block; font-size: 13px; margin-bottom: 4px; }
.t-pillar span { font-size: 12px; color: var(--ink2); line-height: 1.45; }

.persona-toast {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
  background: var(--dark); color: #fff; font-size: 13px; font-weight: 600;
  padding: 10px 18px; border-radius: 999px; z-index: 50;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
  transition: opacity .4s, transform .4s;
}
.persona-toast.hidden { opacity: 0; transform: translateX(-50%) translateY(-8px); pointer-events: none; }

/* ============ ACT 1 — onboarding ============ */
.onb-grid { display: grid; grid-template-columns: minmax(420px, 1.1fr) minmax(380px, 1fr); gap: 26px; max-width: 1180px; }
.twin-stream { min-width: 0; }
.map-panel { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.timerchip {
  position: absolute; top: 18px; right: 34px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 600;
  background: var(--dark); color: #fff; padding: 6px 13px; border-radius: 999px;
  display: flex; gap: 8px; align-items: center; z-index: 5;
}
.timerchip .tc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse-dot 1.2s infinite; }
.timerchip.stopped .tc-dot { background: var(--green); animation: none; }
@keyframes pulse-dot { 50% { opacity: .35; } }

.team-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.person-tile {
  display: flex; gap: 9px; align-items: center;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px 8px 8px;
  background: var(--bg); flex: 1 1 45%; min-width: 170px;
}
.pt-name { font-size: 12.5px; font-weight: 600; }
.pt-role { font-size: 11px; color: var(--ink3); }

.goalline { display: flex; flex-direction: column-reverse; gap: 0; padding: 4px 0; }
.gl-node {
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 13px;
  background: var(--bg); position: relative; display: flex; align-items: center; gap: 9px;
}
.gl-node.top { border-color: var(--accent); background: var(--accent-soft); }
.gl-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink3); width: 86px; flex: 0 0 86px; }
.gl-title { font-size: 12.5px; font-weight: 600; }
.gl-sub { font-size: 11px; color: var(--ink3); margin-left: auto; padding-left: 8px; white-space: nowrap; }
.gl-link { width: 2px; height: 18px; background: var(--border2); margin-left: 50%; position: relative; }
.gl-link.lit { background: var(--accent); }

.keyppl { display: flex; flex-direction: column; gap: 9px; }
.kp-row { display: flex; gap: 10px; align-items: center; }
.kp-why { font-size: 11.5px; color: var(--ink2); }

.decision-trail { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.dt-row { display: flex; gap: 9px; align-items: baseline; font-size: 12.5px; }
.dt-id { font-family: var(--mono); font-size: 10.5px; color: var(--accent-ink); background: var(--accent-soft); padding: 1px 6px; border-radius: 5px; flex: 0 0 auto; }
.dt-date { color: var(--ink3); font-size: 11px; margin-left: auto; white-space: nowrap; padding-left: 8px; }

.slotrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* ============ ACT 2 — brief ============ */
.brief-wrap { max-width: 880px; }
.brief-head { margin-bottom: 22px; }
.brief-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.brief-sub { font-size: 12.5px; color: var(--ink3); margin-top: 5px; }
.brief-section { margin-bottom: 22px; }
.top3 { display: flex; flex-direction: column; gap: 10px; }
.prio-card {
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: 13px 16px;
  background: var(--bg); box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px;
}
.prio-rank { font-size: 15px; font-weight: 800; color: var(--ink3); width: 20px; }
.prio-main { flex: 1; min-width: 0; }
.prio-title { font-size: 13.5px; font-weight: 650; }
.prio-trace { margin-top: 4px; }
.ask-card { border: 1px solid #f6cdce; background: linear-gradient(180deg, #fffdfd, var(--bg)); }
.ask-id { font-family: var(--mono); font-size: 11px; color: var(--accent-ink); }
.ask-actions { display: flex; gap: 9px; margin-top: 12px; align-items: center; }
.ask-sent { font-size: 12px; font-weight: 700; color: var(--green); }

.cal-strip { display: flex; gap: 6px; align-items: stretch; height: 64px; margin-top: 6px; }
.cal-block {
  flex: 1; border-radius: 9px; border: 1px solid var(--border);
  background: var(--panel); font-size: 10.5px; color: var(--ink2);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px;
  padding: 4px; text-align: center; position: relative; line-height: 1.25;
}
.cal-block b { font-size: 10.5px; }
.cal-block.deep { background: var(--accent-soft); border-color: #f0b9bb; color: var(--accent-ink); flex: 2.4; }
.cal-block.meet { background: var(--blue-soft); border-color: #ccd8f7; color: var(--blue); }
.cal-block.declined { opacity: .55; }
.cal-block.declined b { text-decoration: line-through; }
.cal-tag {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  font-size: 9px; font-weight: 700; background: var(--dark); color: #fff;
  padding: 1px 7px; border-radius: 999px; white-space: nowrap;
}
.stats-row { display: flex; gap: 22px; flex-wrap: wrap; }
.stat { font-size: 13px; }
.stat b { font-size: 17px; font-weight: 800; margin-right: 5px; }

/* ============ ACT 3 — cascade ============ */
.cascade-layout { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 22px; max-width: 1280px; }
.composer {
  border: 1.5px solid var(--border2); border-radius: var(--r-lg); padding: 13px 16px;
  background: var(--bg); box-shadow: var(--shadow); margin-bottom: 14px;
  display: flex; gap: 11px; align-items: flex-start;
}
.composer.focus { border-color: var(--ink); }
.composer-text { flex: 1; font-size: 14px; line-height: 1.5; min-height: 22px; }
.composer-hint { font-size: 11px; color: var(--ink3); }

.vp-row { display: flex; gap: 9px; margin-bottom: 12px; flex-wrap: wrap; min-height: 30px; }
.vp-chip {
  display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px 4px 5px;
  background: var(--bg); color: var(--ink2); transition: all .3s;
}
.vp-chip .vp-state { font-size: 10.5px; color: var(--ink3); }
.vp-chip.ok { border-color: #c8e9d6; background: var(--green-soft); }
.vp-chip.ok .vp-state { color: var(--green); font-weight: 700; }

.graph-wrap { border: 1px solid var(--border); border-radius: var(--r-lg); background:
  radial-gradient(700px 300px at 80% 0%, #fdf7f7, transparent 60%), var(--panel);
  padding: 10px; position: relative; }
.graph-wrap svg { width: 100%; height: auto; display: block; }

.planner { display: flex; flex-direction: column; gap: 10px; }
.planner-stream { display: flex; flex-direction: column; gap: 7px; }
.planner-line { font-size: 12px; color: var(--ink2); display: flex; gap: 8px; align-items: baseline; }
.planner-line .pl-tick { color: var(--green); font-weight: 700; }
.conflict-card { border: 1px solid #f3ddb5; background: var(--amber-soft); border-radius: 10px; padding: 10px 12px; }
.conflict-title { font-size: 12px; font-weight: 700; color: var(--amber); display: flex; gap: 7px; }
.conflict-fix { font-size: 11.5px; color: var(--ink2); margin-top: 4px; line-height: 1.45; }
.conflict-fix b { color: var(--ink); }

.cascade-cta { margin-top: 14px; display: flex; align-items: center; gap: 14px; }
.banner {
  margin-top: 14px; border-radius: var(--r-lg); padding: 14px 18px;
  background: var(--dark); color: #fff; font-size: 13.5px; line-height: 1.5;
}
.banner b { color: #ffd2d3; }

/* SVG nodes */
.node rect { fill: #fff; stroke: var(--border2); stroke-width: 1.2; transition: all .4s; }
.node .n-title { font-size: 11.5px; font-weight: 650; fill: var(--ink); }
.node .n-sub { font-size: 9.5px; fill: var(--ink3); }
.node .status-dot { transition: fill .4s; }
.node.green .status-dot { fill: var(--green); }
.node.amber .status-dot { fill: var(--amber); }
.node.red .status-dot { fill: var(--accent); }
.node.goal rect { stroke-width: 1.6; }
.node.proposed rect { stroke: var(--accent); stroke-dasharray: 5 4; stroke-width: 1.6; fill: #fffafa; }
.node.settled rect { stroke: var(--green); stroke-dasharray: none; fill: #fbfffc; }
.node .delta { font-size: 9.5px; font-weight: 700; fill: var(--accent-ink); }
.node .delta.ok { fill: var(--green); }
.edge { stroke: var(--border2); stroke-width: 1.4; fill: none; transition: stroke .4s; }
.edge.lit { stroke: #f0b9bb; stroke-width: 1.8; }
.badge-conflict circle { fill: var(--amber); }
.badge-conflict text { fill: #fff; font-size: 10px; font-weight: 800; }
.node.flash rect { animation: nodeflash .9s ease; }
@keyframes nodeflash {
  0% { fill: #fff; }
  35% { fill: #fde7e8; stroke: var(--accent); }
  100% { fill: #fbfffc; }
}
.node.pulse rect { animation: nodepulse 1.6s ease infinite; }
@keyframes nodepulse {
  0%, 100% { stroke: var(--accent); stroke-width: 1.6; }
  50% { stroke: #f6a6a9; stroke-width: 3; }
}

/* ============ ACT 4 — room ============ */
.room-wrap { max-width: 780px; }
.room-head {
  display: flex; align-items: center; gap: 12px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap;
}
.room-name { font-size: 18px; font-weight: 800; }
.room-bind { font-size: 12px; color: var(--ink3); }
.ask-pin { border: 1px solid var(--border2); border-left: 3px solid var(--accent); margin-bottom: 18px; }
.statebar { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.state-chip {
  font-size: 10.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--panel2); color: var(--ink3); border: 1px solid var(--border);
  transition: all .35s;
}
.state-chip.done { background: var(--green-soft); color: var(--green); border-color: #c8e9d6; }
.state-chip.now { background: var(--dark); color: #fff; border-color: var(--dark); }
.receipt-strip {
  display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; margin-top: 20px;
}
.receipt-half { flex: 1; padding: 14px 18px; }
.receipt-half.old { background: var(--panel2); color: var(--ink3); }
.receipt-half.new { background: var(--dark); color: #fff; }
.receipt-half .rh-label { font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 5px; opacity: .75; }
.receipt-half .rh-line { font-size: 13.5px; font-weight: 650; }

/* ============ ACT 5 — console ============ */
.console-wrap { max-width: 980px; }
.goals-table { display: flex; flex-direction: column; gap: 10px; }
.goal-row {
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg);
  box-shadow: var(--shadow); overflow: hidden; transition: border-color .3s;
}
.goal-row.open { border-color: var(--ink3); }
.gr-main { display: flex; align-items: center; gap: 16px; padding: 14px 18px; cursor: pointer; }
.gr-title { font-size: 14.5px; font-weight: 700; flex: 0 0 240px; }
.health-bar { flex: 1; height: 7px; border-radius: 99px; background: var(--panel2); overflow: hidden; }
.health-fill { height: 100%; border-radius: 99px; width: 0%; transition: width 1s ease; }
.health-fill.green { background: var(--green); }
.health-fill.amber { background: var(--amber); }
.gr-meta { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.receipts { max-height: 0; overflow: hidden; transition: max-height .6s ease; background: var(--panel); border-top: 0 solid var(--border); }
.goal-row.open .receipts { max-height: 220px; border-top: 1px solid var(--border); }
.receipts-inner { padding: 14px 18px; }
.receipt-line { display: flex; gap: 9px; font-size: 12.5px; color: var(--ink2); padding: 3.5px 0; align-items: baseline; }
.receipt-line .rl-src { font-family: var(--mono); font-size: 10.5px; color: var(--ink3); margin-left: auto; white-space: nowrap; padding-left: 10px; }

.drift-card { border: 1px solid #f3ddb5; background: linear-gradient(180deg, #fffdf8, var(--bg)); margin-top: 18px; }
.drift-opts { display: flex; gap: 9px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.drift-done { font-size: 12.5px; color: var(--green); font-weight: 700; }

.covenant-note {
  margin-top: 16px; font-size: 12px; color: var(--ink3);
  display: flex; align-items: center; gap: 8px;
}

/* ============ explore-only surfaces ============ */
.surface-wrap { max-width: 940px; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.privacy-banner {
  border: 1px solid #c8e9d6; background: var(--green-soft); border-radius: var(--r-lg);
  padding: 13px 17px; font-size: 13px; color: var(--green); font-weight: 600;
  display: flex; gap: 10px; align-items: center; margin-bottom: 18px;
}
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.skill-name { font-family: var(--mono); font-size: 12.5px; font-weight: 700; }

/* scrollbar cosmetics */
#stage::-webkit-scrollbar { width: 10px; }
#stage::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; border: 3px solid var(--bg); }
