:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --ink: #1b2430;
  --muted: #667085;
  --line: #e3e7ee;
  --brand: #0f2f4f;
  --brand-2: #163f6a;
  --accent: #1f7a5c;
  --ok: #1a7f4b;
  --ok-bg: #e6f4ec;
  --warn: #9a6400;
  --warn-bg: #fff4d6;
  --err: #b42318;
  --err-bg: #fde8e6;
  --info-bg: #e8f0fb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 14px/1.5 -apple-system, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: var(--brand-2); }
code { font: 12px/1.4 Consolas, "Cascadia Mono", monospace; background: #eef1f5; padding: 1px 5px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h2 { font-size: 15px; }
h3 { font-size: 13px; margin: 14px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
p.lead { font-size: 15px; max-width: 70ch; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.err { color: var(--err); }
.ok { color: var(--ok, #1f8f5a); }
ul.plain { margin: 0; padding-left: 18px; }
ul.plain li { margin: 4px 0; }

/* ---- shell ---- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: var(--brand); color: #dbe6f2; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { padding: 20px 20px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-name { font-weight: 700; font-size: 17px; color: #fff; }
.brand-sub { font-size: 12px; opacity: .7; }
.nav { display: flex; flex-direction: column; padding: 10px; gap: 2px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #dbe6f2; text-decoration: none; font-weight: 500; }
.nav-item:hover { background: rgba(255,255,255,.08); }
.nav-item.active { background: rgba(255,255,255,.16); color: #fff; }
.nav-icon { width: 18px; text-align: center; opacity: .9; }
.nav-group { margin-top: 6px; }
.nav-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(219,230,242,.7); border-radius: 8px; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::before { content: "▸"; font-size: 10px; opacity: .7; }
.nav-group[open] summary::before { content: "▾"; }
.nav-group summary:hover { background: rgba(255,255,255,.06); }
.nav-count { margin-left: auto; font-size: 10px; opacity: .6; }
.nav-group .nav-item { padding-left: 24px; }
.more { position: relative; display: inline-block; }
.more > summary { list-style: none; cursor: pointer; }
.more > summary::-webkit-details-marker { display: none; }
.more-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; display: flex; flex-direction: column; gap: 4px; min-width: 140px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.more-menu .btn { justify-content: flex-start; width: 100%; }
.ready-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 10px; }
.acct-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 4px; } .acct-bar-fill { display: block; height: 100%; } .acct-ok { background: var(--up, #1a7f4b); } .acct-warn { background: var(--warn, #b8860b); } .acct-err { background: var(--err, #c0392b); }
.sidebar-foot { margin-top: auto; padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.budget-pill { display: inline-block; background: rgba(255,255,255,.12); padding: 3px 9px; border-radius: 99px; margin-bottom: 6px; color: #fff; }
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 28px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.page-title { font-size: 20px; }
.topbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.agent-status { font-size: 13px; color: var(--muted); }
.agent-controls { display: flex; gap: 8px; }
.content { padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 20px; }

/* ---- agent badge ---- */
.agent-badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-weight: 700; font-size: 12px; letter-spacing: .03em; }
.agent-badge.running { background: var(--ok-bg); color: var(--ok); }
.agent-badge.paused { background: var(--warn-bg); color: var(--warn); }
.agent-badge.stopped { background: var(--err-bg); color: var(--err); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #f6f8fb; }
.btn-primary { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn-primary:hover { background: var(--brand); }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-pause { background: var(--warn-bg); border-color: #f0d48a; color: var(--warn); }
.btn-resume { background: var(--ok-bg); border-color: #b7dfc7; color: var(--ok); }
.btn-stop { background: var(--err); border-color: var(--err); color: #fff; }
.btn-stop:hover { background: #8f1c13; }
.btn-warn { background: var(--warn-bg); border-color: #f0d48a; color: var(--warn); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---- cards & stats ---- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-body { padding: 16px 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); border-left: 4px solid var(--brand-2); }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1.2; word-break: break-word; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .04em; }
.stat-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.stat-ok { border-left-color: var(--ok); }
.stat-warn { border-left-color: var(--warn); }
.stat-error { border-left-color: var(--err); }
.stat-muted { border-left-color: #cfd5de; }
.stat-muted .stat-value { color: var(--muted); }

/* ---- badges ---- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .03em; background: #eef1f5; color: var(--muted); white-space: nowrap; }
.badge-ok, .badge-completed, .badge-running, .badge-approved { background: var(--ok-bg); color: var(--ok); }
.badge-queued, .badge-pending, .badge-waiting-for-approval, .badge-paused, .badge-blocked, .badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-failed, .badge-rejected, .badge-error { background: var(--err-bg); color: var(--err); }
.badge-planned { background: var(--info-bg); color: var(--brand-2); }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tbody tr:hover { background: #fafbfd; }
.edit-table input, .edit-table select { width: 100%; }
.empty { padding: 28px; text-align: center; border: 1px dashed var(--line); border-radius: 8px; }
.empty-title { font-weight: 600; margin-bottom: 4px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); padding: 6px 10px; border-radius: 8px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input, .filters select { padding: 6px 8px; }

/* ---- knowledge ---- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; font-size: 12px; }
.chip.active { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.chip strong { font-weight: 700; }
ul.hits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
ul.hits li { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
mark { background: #fff1a8; padding: 0 2px; border-radius: 3px; }

/* ---- CEO mode & goals ---- */
.ceo-headline { font-size: 17px; font-weight: 600; padding: 12px 14px; background: var(--info-bg); border-left: 4px solid var(--brand-2); border-radius: 8px; margin-bottom: 14px; }
.ceo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.ceo-bucket { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; border-top: 4px solid var(--line); }
.ceo-bucket h3 { margin-top: 0; }
.ceo-bucket.now { border-top-color: var(--ok); }
.ceo-bucket.soon { border-top-color: var(--brand-2); }
.ceo-bucket.long { border-top-color: #7c6ad6; }
.ceo-bucket.low { border-top-color: #cfd5de; }
ol.ceo-list { margin: 0; padding-left: 20px; }
ol.ceo-list li { margin: 8px 0; }
details.facts { margin-top: 14px; }
details.facts summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.goal-form select { padding: 4px 8px; }

/* ---- tasks, approvals, calendar ---- */
.approval { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.approval-actions { display: flex; gap: 6px; flex-wrap: wrap; }
form.inline { display: inline-flex; gap: 4px; align-items: center; margin: 0; }
form.inline input { padding: 4px 6px; font-size: 12px; }
.step-result { margin-top: 4px; padding: 6px 8px; background: #f6f8fb; border-left: 3px solid var(--line); border-radius: 4px; white-space: pre-wrap; }
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cal-day { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.cal-day.today { border-color: var(--brand-2); box-shadow: 0 0 0 2px var(--info-bg); }
.cal-day.overdue { border-color: #f0d48a; }
.cal-day h3 { margin: 0 0 8px; }
.cal-list li { margin: 6px 0; }
.cal-time { display: inline-block; min-width: 44px; font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---- browser recorder ---- */
ol.recorder { list-style: none; margin: 0; padding: 0; font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; }
ol.recorder li { padding: 4px 0; border-bottom: 1px dashed var(--line); word-break: break-all; }
.rec-time { color: var(--muted); }
.rec-target { color: var(--brand-2); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.shots img { width: 100%; border: 1px solid var(--line); border-radius: 6px; }
.shots a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }

/* ---- content & social ---- */
a.legend-item { text-decoration: none; color: inherit; }
a.legend-item.active { border-color: var(--brand-2); }
blockquote.quote { margin: 8px 0; padding: 10px 12px; background: #f6f8fb; border-left: 3px solid var(--brand-2); border-radius: 6px; white-space: pre-wrap; }
.post-text { white-space: pre-wrap; max-width: 60ch; }

/* ---- images ---- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.thumb { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: inherit; }
.thumb img { border: 1px solid var(--line); border-radius: 8px; background: #fff; object-fit: contain; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px; }
.check.small { padding: 6px 8px; }

/* ---- forms ---- */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field > span { font-weight: 600; font-size: 13px; }
input, textarea, select { font: inherit; padding: 8px 10px; border: 1px solid #cfd5de; border-radius: 7px; background: #fff; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 2px solid #9cc0ea; border-color: var(--brand-2); }
textarea { resize: vertical; }
fieldset.field { border: 0; padding: 0; margin: 0 0 12px; }
.radios { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.radio, .check { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--brand-2); background: var(--info-bg); }
.settings-form { display: flex; flex-direction: column; gap: 20px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.kv dt { color: var(--muted); font-weight: 600; }
dl.kv dd { margin: 0; }
.ai-test { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
pre.out { white-space: pre-wrap; background: #f6f8fb; border: 1px solid var(--line); padding: 12px; border-radius: 8px; margin-top: 10px; font-size: 13px; }

/* ---- flash / banners ---- */
.flash { padding: 10px 14px; border-radius: 8px; font-weight: 500; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-warn { background: var(--warn-bg); color: var(--warn); }
.flash-error { background: var(--err-bg); color: var(--err); }
.module-banner { display: flex; align-items: center; gap: 12px; }

/* ---- bare pages (setup, errors) ---- */
body.bare { padding: 32px 16px; }
.setup-wrap { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.setup-head h1 { font-size: 24px; }
.error-card { max-width: 480px; margin: 60px auto; padding: 28px; text-align: center; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
}

/* ---- Phase 10: money pages ---- */
.chart { display: block; max-width: 100%; height: auto; }
.chart-label { font-size: 11px; fill: var(--muted); }
.chart-value { font-size: 11px; fill: var(--text, #1b2733); font-weight: 600; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; margin-bottom: 6px; align-items: center; }
.chart-legend .swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.highlight { background: var(--warn-bg); padding: 2px 6px; border-radius: 4px; }
.analyst-answer { border-left: 4px solid var(--brand-2); padding: 8px 12px; margin-top: 10px; background: var(--info-bg); border-radius: 6px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumbs img { border-radius: 6px; border: 1px solid var(--line); }
.radar-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.radar-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; border-left: 4px solid var(--brand-2); background: var(--panel); }
.radar-item.urg-HIGH { border-left-color: var(--err); }
.radar-item.urg-MEDIUM { border-left-color: var(--warn); }
.radar-item.urg-LOW { border-left-color: var(--ok); }
.radar-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 4px; }
.ws-switch { display: inline-flex; gap: 6px; align-items: center; }
.ws-switch select { font-size: 12px; padding: 2px 4px; }
.section-title { margin: 18px 0 10px; font-size: 16px; }
.approval-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; background: var(--panel); }
.approval-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.proposed { white-space: pre-wrap; max-height: 320px; overflow: auto; }
.approval-edit textarea { width: 100%; }
.conv-list li { border-bottom: 1px solid var(--line); padding: 6px 0; } .conv-list li.active { background: var(--info-bg); border-radius: 6px; padding: 6px; } .conv-list a { text-decoration: none; color: inherit; display: block; }
.chat-thread { max-height: 62vh; min-height: 240px; } .chat-grid { grid-template-columns: 2fr 1fr; } @media (max-width: 900px) { .chat-grid { grid-template-columns: 1fr; } }
/* Team org chart: nested lists drawn as a tree (owner at the top) */
.org-root { font-size: 15px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; display: inline-block; margin-bottom: 6px; background: var(--info-bg); }
ul.org-tree { list-style: none; margin: 0; padding-left: 22px; border-left: 2px solid var(--line); }
ul.org-tree > li { position: relative; padding: 4px 0 4px 12px; }
ul.org-tree > li::before { content: ""; position: absolute; left: 0; top: 16px; width: 10px; border-top: 2px solid var(--line); }
.org-node { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }

/* voice input (chat) */
.mic-btn { white-space: nowrap; }
.mic-btn.mic-on { background: #fde8e8; border-color: #e07a7a; color: #8a1f1f; animation: micpulse 1.2s ease-in-out infinite; }
@keyframes micpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(224, 122, 122, .5); } 50% { box-shadow: 0 0 0 6px rgba(224, 122, 122, 0); } }
@media (prefers-reduced-motion: reduce) { .mic-btn.mic-on { animation: none; } }

/* ==== 2026-09 theme: youth & money — one navy, electric green for in/up, coral for out/down, gold for money; numbers in mono ==== */
:root {
  --bg: #f2f4f7; --panel: #ffffff; --ink: #0f172a; --muted: #5b6b7a; --line: #e3e8ef;
  --brand: #0b1220; --brand-2: #1d4ed8; --accent: #12855f;
  --up: #12855f; --up-bg: #dcf5ea; --down: #d63b2f; --down-bg: #fde5e2; --gold: #b7791f; --gold-bg: #fff3d6; --neon: #19e28b;
  --ok: #12855f; --ok-bg: #dcf5ea; --warn: #b7791f; --warn-bg: #fff3d6; --err: #d63b2f; --err-bg: #fde5e2; --info-bg: #e6eefc;
  --radius: 14px; --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .06);
  --mono: "Cascadia Mono", "SF Mono", Consolas, ui-monospace, monospace;
}
body { font-size: 14.5px; }
.sidebar { background: linear-gradient(180deg, #0b1220 0%, #0f1a2e 100%); }
.brand-name { font-size: 18px; letter-spacing: -.01em; }
.nav-item.active { background: rgba(25, 226, 139, .16); color: #fff; box-shadow: inset 3px 0 0 var(--neon); }
.nav-item:hover { background: rgba(255,255,255,.07); }
.budget-pill { background: rgba(25, 226, 139, .18); color: #c9ffe6; font-weight: 600; }
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.stat { border-left: 0; border-top: 4px solid var(--brand-2); }
.stat-ok { border-top-color: var(--up); } .stat-warn { border-top-color: var(--warn); } .stat-error { border-top-color: var(--down); } .stat-muted { border-top-color: #cfd5de; }
.stat-value { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 28px; letter-spacing: -.02em; }
.stat-value .cur, .cur { font-weight: 700; } .cur-in { color: var(--up); } .cur-out { color: var(--down); }
.badge { border-radius: 8px; font-size: 11px; padding: 3px 8px; }
.badge-info { background: var(--info-bg); color: var(--brand-2); } .badge-muted { background: #eef1f5; color: var(--muted); }
table td, table th { font-variant-numeric: tabular-nums; }
.btn-primary { background: var(--brand-2); border-color: var(--brand-2); }
.btn-resume { background: var(--up); border-color: var(--up); color: #fff; }
.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--muted); } .warn { color: var(--warn); }
.trend { display: inline-block; font: 600 12px/1 var(--mono); padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.trend-up { background: var(--up-bg); color: var(--up); } .trend-down { background: var(--down-bg); color: var(--down); } .trend-flat { background: #eef1f5; color: var(--muted); } .trend-warn { background: var(--warn-bg); color: var(--warn); }
.money { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.chart-grid { stroke: #e3e8ef; stroke-width: 1; } .chart-label { font: 11px system-ui, sans-serif; fill: #5b6b7a; } .chart-value { font: 11px system-ui, sans-serif; fill: #0f172a; }
.spark { vertical-align: middle; }
.gauge { margin: 6px 0 10px; } .gauge-bar { height: 10px; border-radius: 999px; background: #eef1f5; overflow: hidden; } .gauge-bar span { display: block; height: 100%; border-radius: 999px; background: var(--up); transition: width .4s; }
.gauge-warn .gauge-bar span { background: var(--warn); } .gauge-error .gauge-bar span { background: var(--down); } .gauge-muted .gauge-bar span { background: #cfd5de; }
.gauge-text { font-size: 12px; color: var(--muted); margin-top: 4px; } .gauge-text strong { color: var(--ink); font-family: var(--mono); }

/* ---- What's happening ---- */
.live-hero { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: var(--radius); color: #fff; background: linear-gradient(120deg, #0b1220, #14532d 140%); box-shadow: var(--shadow); }
.live-hero.live-warn { background: linear-gradient(120deg, #0b1220, #7c4a03 140%); } .live-hero.live-error { background: linear-gradient(120deg, #0b1220, #7f1d1d 140%); }
.live-hero .muted { color: rgba(255,255,255,.7); }
.live-line { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.live-pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 0 0 rgba(25,226,139,.6); animation: pulse 1.8s infinite; flex: none; }
.live-warn .live-pulse { background: #f5c344; animation: none; } .live-error .live-pulse { background: #ff6b6b; animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(25,226,139,.6); } 70% { box-shadow: 0 0 0 12px rgba(25,226,139,0); } 100% { box-shadow: 0 0 0 0 rgba(25,226,139,0); } }
@media (prefers-reduced-motion: reduce) { .live-pulse { animation: none; } }
.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.live-log { font: 12.5px/1.5 var(--mono); background: #0b1220; color: #d7e3f0; border-radius: 10px; padding: 12px 14px; max-height: 260px; overflow-y: auto; }
.log-line { display: flex; gap: 10px; } .log-ts { color: #6b7f95; flex: none; } .log-warn { color: #f5c344; } .log-error { color: #ff6b6b; }
.live-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); } .live-row:last-child { border-bottom: 0; }
.live-need:hover { background: #f7f9fc; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 5px; background: var(--muted); } .dot-high { background: var(--down); } .dot-medium { background: var(--warn); } .dot-low { background: var(--brand-2); }
.live-counts { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 6px; } .live-counts strong { font-family: var(--mono); font-size: 18px; color: var(--ink); margin-right: 4px; }
.timeline { display: flex; flex-direction: column; } .tl-row { display: grid; grid-template-columns: 78px 110px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; } .tl-row:last-child { border-bottom: 0; }
.tl-ts { font-family: var(--mono); color: var(--muted); } .tl-who { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tl-did { overflow: hidden; text-overflow: ellipsis; }
.tl-error .tl-did { color: var(--down); }
@media (max-width: 700px) { .tl-row { grid-template-columns: 70px 1fr auto; } .tl-who { display: none; } }

/* ---- calendar: a real month ---- */
.cal-head { display: flex; align-items: center; gap: 12px; } .cal-head h2 { font-size: 20px; margin: 0 6px; flex-grow: 1; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-cell { display: block; min-height: 96px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-decoration: none; color: var(--ink); overflow: hidden; }
.cal-cell:hover { border-color: var(--brand-2); box-shadow: var(--shadow); }
.cal-empty { background: transparent; border-color: transparent; }
.cal-past { background: #f8f9fb; } .cal-past .cal-num { color: var(--muted); }
.cal-today { border-color: var(--up); box-shadow: inset 0 0 0 2px var(--up-bg); }
.cal-num { font-family: var(--mono); font-weight: 600; font-size: 14px; margin-bottom: 6px; } .cal-today-tag { font: 600 10px/1 system-ui, sans-serif; color: var(--up); text-transform: uppercase; letter-spacing: .06em; margin-left: 4px; }
.cal-chips { display: flex; flex-direction: column; gap: 3px; }
.cal-chip { display: inline-block; font: 600 11px/1.3 system-ui, sans-serif; padding: 3px 7px; border-radius: 6px; background: #eef1f5; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-appt { background: var(--up-bg); color: var(--up); } .cal-follow { background: var(--warn-bg); color: var(--warn); } .cal-task { background: var(--info-bg); color: var(--brand-2); } .cal-done { background: #e7e9ee; color: #334155; } .cal-routine { background: #f2f4f7; color: #8a96a3; }
.cal-legend { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 2px; align-items: center; }
.cal-bang { display: inline-block; min-width: 16px; padding: 0 5px; border-radius: 999px; background: #e5484d; color: #fff; font: 800 12px/16px system-ui, sans-serif; text-align: center; vertical-align: middle; }
.cal-has-human { border-color: #e5484d; }
.cal-human { background: var(--up-bg); color: var(--up); } .cal-human.cal-event { background: #fde8e8; color: #b42318; } .cal-human.cal-followup { background: var(--warn-bg); color: var(--warn); } .cal-human.cal-techjob { background: var(--info-bg); color: var(--info); }
.cal-ai { background: #eef0f3; color: var(--muted); }
.cal-add { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; } .cal-add input[name="title"] { flex: 1 1 220px; } .cal-add input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.cal-day-title { font-size: 22px; margin: 4px 0 14px; }
@media (max-width: 800px) { .cal-cell { min-height: 60px; padding: 5px; } .cal-chip { font-size: 10px; padding: 2px 5px; } }
/* ---- plain-words task pages ---- */
.task-plain { font-size: 15px; margin: 0 0 10px; }
details.tech { margin-top: 8px; } details.tech > summary { cursor: pointer; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
/* ---- one-line page banners: the rest opens on click ---- */
.module-banner { align-items: flex-start; }
.module-banner .muted { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.module-banner .muted.open { -webkit-line-clamp: unset; display: block; }

/* the hidden attribute wins over every display rule (typing bubble, stop row, live sections) */
[hidden] { display: none !important; }
