/* AgentLobe cloud app and sign-in. Design: DESIGN.md (Apple-calm, ember means alive). Strict CSP: no inline styles. */
@font-face { font-family: "Outfit"; src: url("/fonts/outfit-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ember: #FF5B2E; --amber: #FFB020; --ember-ink: #C43C16; --ember-btn: #D24016; --ember-btn-hover: #BA3711;
  --ember-wash: rgba(255, 91, 46, .10); --ember-ring: rgba(255, 91, 46, .32);
  --bg: #F5F5F7; --panel: #FFFFFF; --raised: #FFFFFF; --sunken: #EFEFF2; --side: rgba(236, 236, 240, .72);
  --ink: #1D1D1F; --ink-2: #48484C; --ink-3: #6E6E73; --ink-4: #8E8E93;
  --line: rgba(0, 0, 0, .08); --line-2: rgba(0, 0, 0, .14); --hover: rgba(0, 0, 0, .045); --active: rgba(0, 0, 0, .075);
  --ready: #0A66D8; --ready-wash: rgba(10, 102, 216, .10);
  --doing: #C43C16; --doing-wash: rgba(255, 91, 46, .12);
  --blocked: #D1242F; --blocked-wash: rgba(209, 36, 47, .10);
  --done: #1A7F45; --done-wash: rgba(26, 127, 69, .10);
  --stalled: #B35C00; --stalled-wash: rgba(240, 140, 0, .13);
  --muted-wash: rgba(0, 0, 0, .05);
  --shadow-1: 0 1px 1px rgba(0, 0, 0, .03), 0 2px 6px rgba(0, 0, 0, .04);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .07);
  --shadow-3: 0 2px 6px rgba(0, 0, 0, .06), 0 24px 60px rgba(0, 0, 0, .16);
  --display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Cascadia Mono", Consolas, monospace;
  --r-panel: 18px; --r-ctl: 12px; --r-sm: 8px;
  --ease: cubic-bezier(.2, .8, .2, 1); --out-expo: cubic-bezier(.16, 1, .3, 1);
  --side-w: 264px;
  color-scheme: light;
}
:root[data-theme="dark"] {
    --ember-ink: #FF8A63; --ember-btn: #E64A1C; --ember-btn-hover: #F05A2C; --ember-wash: rgba(255, 91, 46, .16);
    --bg: #0B0B0D; --panel: #161618; --raised: #1D1D20; --sunken: #111113; --side: rgba(24, 24, 27, .72);
    --ink: #F5F5F7; --ink-2: #D2D2D7; --ink-3: #A1A1A6; --ink-4: #8A8A90;
    --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .15); --hover: rgba(255, 255, 255, .06); --active: rgba(255, 255, 255, .1);
    --ready: #5AA2FF; --ready-wash: rgba(90, 162, 255, .14); --doing: #FF8A63; --doing-wash: rgba(255, 91, 46, .16);
    --blocked: #FF6B72; --blocked-wash: rgba(255, 107, 114, .14); --done: #4CC38A; --done-wash: rgba(76, 195, 138, .14);
    --stalled: #F5A623; --stalled-wash: rgba(245, 166, 35, .15); --muted-wash: rgba(255, 255, 255, .07);
    --shadow-1: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 2px 6px rgba(0, 0, 0, .3);
    --shadow-2: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 12px 32px rgba(0, 0, 0, .45);
    --shadow-3: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 30px 70px rgba(0, 0, 0, .6);
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ember-ink: #FF8A63; --ember-btn: #E64A1C; --ember-btn-hover: #F05A2C; --ember-wash: rgba(255, 91, 46, .16);
    --bg: #0B0B0D; --panel: #161618; --raised: #1D1D20; --sunken: #111113; --side: rgba(24, 24, 27, .72);
    --ink: #F5F5F7; --ink-2: #D2D2D7; --ink-3: #A1A1A6; --ink-4: #8A8A90;
    --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .15); --hover: rgba(255, 255, 255, .06); --active: rgba(255, 255, 255, .1);
    --ready: #5AA2FF; --ready-wash: rgba(90, 162, 255, .14); --doing: #FF8A63; --doing-wash: rgba(255, 91, 46, .16);
    --blocked: #FF6B72; --blocked-wash: rgba(255, 107, 114, .14); --done: #4CC38A; --done-wash: rgba(76, 195, 138, .14);
    --stalled: #F5A623; --stalled-wash: rgba(245, 166, 35, .15); --muted-wash: rgba(255, 255, 255, .07);
    --shadow-1: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 2px 6px rgba(0, 0, 0, .3);
    --shadow-2: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 12px 32px rgba(0, 0, 0, .45);
    --shadow-3: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 30px 70px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "kern"; }
::selection { background: rgba(255, 91, 46, .24); color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 6px; }
input, textarea, select, button { font: inherit; color: inherit; caret-color: var(--ember); }
a { color: var(--ember-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
code, pre, .mono, kbd { font-family: var(--mono); font-size: .88em; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
img, svg { display: block; }
[hidden] { display: none !important; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--panel); padding: 8px 14px; border-radius: 999px; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 15px; height: 15px; } .ico.lg { width: 22px; height: 22px; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px 12px; background: var(--side); border-right: 1px solid var(--line);
  backdrop-filter: saturate(1.6) blur(24px); -webkit-backdrop-filter: saturate(1.6) blur(24px); z-index: 30; }
.side-top { position: relative; }
.ws-switch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: transparent; border-radius: 12px; cursor: pointer; text-align: left; transition: background .15s var(--ease); }
.ws-switch:hover, .ws-switch[aria-expanded="true"] { background: var(--hover); }
.ws-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--panel); box-shadow: var(--shadow-1); flex: none; position: relative; }
.ws-mark img { width: 24px; height: 24px; }
.ws-mark.alive::after { content: ""; position: absolute; inset: -3px; border-radius: 12px; box-shadow: 0 0 0 1.5px var(--ember); opacity: 0; animation: breathe 2.8s var(--ease) infinite; }
.ws-text { display: grid; min-width: 0; flex: 1; }
.ws-name { font: 600 15px/1.2 var(--display); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-role { font-size: 12px; color: var(--ink-3); }
.ws-chev, .me [data-icon] { color: var(--ink-4); }
.side-nav { display: grid; gap: 2px; margin-top: 8px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14.5px; transition: background .15s var(--ease), color .15s var(--ease); }
.side-nav a:hover { background: var(--hover); color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-1); }
.side-nav a[aria-current="page"] .ico { color: var(--ember); }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ember-btn); color: #fff; font: 600 11.5px/20px var(--text); text-align: center; font-variant-numeric: tabular-nums; }
.nav-live { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 3px var(--ember-wash); animation: pulse 2s var(--ease) infinite; }
.side-projects { flex: 1; min-height: 0; overflow: auto; margin-top: 14px; }
.side-label { padding: 0 10px 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.side-projects ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.side-projects a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.side-projects a:hover { background: var(--hover); color: var(--ink); }
.side-projects a[aria-current="page"] { background: var(--active); color: var(--ink); font-weight: 600; }
.side-projects .pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-projects .pmeta { font-size: 12px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.side-empty { padding: 4px 10px; font-size: 13px; color: var(--ink-3); }
.side-foot { position: relative; border-top: 1px solid var(--line); padding-top: 8px; }
.me { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: transparent; border-radius: 12px; cursor: pointer; text-align: left; }
.me:hover, .me[aria-expanded="true"] { background: var(--hover); }
.me-text { display: grid; flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.me-text > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-sub { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 600 12.5px/1 var(--display); color: #fff; background: linear-gradient(140deg, var(--amber), var(--ember)); }

.menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; padding: 6px; border-radius: 14px; background: var(--raised); box-shadow: var(--shadow-3); border: 1px solid var(--line);
  transform-origin: top center; animation: pop .16s var(--ease); }
.menu.up { top: auto; bottom: calc(100% + 6px); transform-origin: bottom center; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; text-align: left; color: var(--ink); text-decoration: none; font-size: 14px; }
.menu button:hover, .menu a:hover, .menu button:focus-visible { background: var(--hover); outline: 0; }
.menu .check { margin-left: auto; color: var(--ember); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu .menu-label { padding: 6px 10px 4px; font-size: 12px; color: var(--ink-3); font-weight: 600; }

.topbar { display: none; }
.main { min-width: 0; padding: 36px clamp(20px, 4vw, 56px) 80px; outline: 0; }
.page { max-width: 1240px; margin: 0 auto; animation: enter .28s var(--ease); }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head h1 { font-size: 34px; line-height: 1.1; letter-spacing: -.03em; }
.page-head .sub { margin-top: 8px; color: var(--ink-3); font-size: 15.5px; max-width: 64ch; }
.page-head .sub.live { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent; background: var(--muted-wash);
  color: var(--ink); font: 600 14px/1 var(--text); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease); }
.btn:hover { background: var(--active); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ember-btn); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 4px 12px rgba(0, 0, 0, .08); }
.btn.primary:hover { background: var(--ember-btn-hover); }
.btn.ghost { background: transparent; color: var(--ink-2); } .btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.danger { background: transparent; border-color: var(--blocked-wash); color: var(--blocked); } .btn.danger:hover { background: var(--blocked-wash); }
.btn.danger.solid { background: var(--blocked); color: #fff; border-color: transparent; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; } .btn.lg { height: 44px; padding: 0 22px; font-size: 15px; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .5; cursor: default; pointer-events: none; }
.btn[aria-busy="true"]::after { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { font-size: 12.5px; color: var(--ink-3); }
.input, .textarea, .select { width: 100%; min-height: 40px; padding: 9px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--panel); color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%238E8E93' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:focus, .textarea:focus, .select:focus { outline: 0; border-color: var(--ember); box-shadow: 0 0 0 4px var(--ember-ring); }
.input.mono { font-family: var(--mono); font-size: 13.5px; }
.form-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.form-row .field { flex: 1 1 220px; }
.form { display: grid; gap: 14px; }
.form-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; flex: none; margin: 0; transition: background .2s var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--out-expo); }
.switch:checked { background: var(--ember-btn); } .switch:checked::after { transform: translateX(18px); }
.switch:disabled { opacity: .45; cursor: default; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--sunken); gap: 2px; border: 1px solid var(--line); }
.seg button, .seg a { border: 0; background: transparent; padding: 6px 14px; border-radius: 9px; font: 500 13.5px/1.2 var(--text); color: var(--ink-3); cursor: pointer; text-decoration: none; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.seg button:hover, .seg a:hover { color: var(--ink); }
.seg [aria-selected="true"], .seg [aria-current="page"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-1); font-weight: 600; }
.seg .count { font-size: 12px; color: var(--ink-4); font-variant-numeric: tabular-nums; }

/* ---------- surfaces ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow-1); }
.panel-pad { padding: 22px 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.panel-head h2 { font-size: 17px; letter-spacing: -.01em; }
.panel-head .hint { font-size: 13px; color: var(--ink-3); }
.panel-body { padding: 14px 22px 20px; }
.section { margin-top: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 20px; letter-spacing: -.02em; }
.section-head .hint { font-size: 13.5px; color: var(--ink-3); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.stack { display: grid; gap: 14px; }
.muted { color: var(--ink-3); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--ink-3); }
.meta > span { display: inline-flex; align-items: center; gap: 6px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* ---------- status vocabulary ---------- */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; display: inline-block; }
.dot.live { background: var(--ember); box-shadow: 0 0 0 3px var(--ember-wash); animation: pulse 2s var(--ease) infinite; }
.dot.ready { background: var(--ready); } .dot.doing { background: var(--ember); } .dot.blocked { background: var(--blocked); } .dot.done { background: var(--done); } .dot.stalled { background: var(--stalled); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font: 600 12px/1 var(--text); background: var(--muted-wash); color: var(--ink-2); white-space: nowrap; }
.badge .ico { width: 13px; height: 13px; stroke-width: 2; }
.badge.ready { background: var(--ready-wash); color: var(--ready); } .badge.doing { background: var(--doing-wash); color: var(--doing); }
.badge.blocked, .badge.failed, .badge.rejected { background: var(--blocked-wash); color: var(--blocked); }
.badge.done, .badge.verified, .badge.accepted, .badge.live { background: var(--done-wash); color: var(--done); }
.badge.stalled, .badge.proposed, .badge.paused, .badge.local-only, .badge.verified-other-revision { background: var(--stalled-wash); color: var(--stalled); }
.badge.cited, .badge.reported { background: var(--ready-wash); color: var(--ready); }
.badge.superseded, .badge.revoked, .badge.expired, .badge.dropped { background: var(--muted-wash); color: var(--ink-3); }
.pill-mono { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 8px; background: var(--sunken); border: 1px solid var(--line); font: 12.5px/1 var(--mono); color: var(--ink-2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ref { font: 600 12.5px/1 var(--mono); color: var(--ink-3); }

/* client glyphs: initials on a tint picked from the client name (no third-party logos) */
.glyph { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; flex: none; font: 650 11px/1 var(--display); letter-spacing: .01em; color: #fff; position: relative; }
.glyph.sm { width: 20px; height: 20px; border-radius: 6px; font-size: 9.5px; }
.glyph.lg { width: 40px; height: 40px; border-radius: 12px; font-size: 15px; }
.glyph.t0 { background: #CC785C; } .glyph.t1 { background: #2F2F33; } .glyph.t2 { background: #3B6FD8; } .glyph.t3 { background: #1F8A70; } .glyph.t4 { background: #8A5CD1; } .glyph.t5 { background: #B5832B; } .glyph.person { background: var(--sunken); color: var(--ink-2); border: 1px solid var(--line-2); }
.glyph.live::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--ember); border: 2px solid var(--panel); animation: pulse 2s var(--ease) infinite; }

/* ---------- Now ---------- */
.live-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.agent-chip { scroll-snap-align: start; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-1); min-width: 240px; text-decoration: none; color: inherit; }
.agent-chip.live { border-color: rgba(255, 91, 46, .35); box-shadow: 0 0 0 4px var(--ember-wash), var(--shadow-1); }
.agent-chip .who { font-weight: 600; font-size: 14px; } .agent-chip .what { font-size: 12.5px; color: var(--ink-3); }
.attention { list-style: none; margin: 0; padding: 0; }
.attention li + li { border-top: 1px solid var(--line); }
.attn { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 22px; }
.attn-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; }
.attn-ico.proposal { background: var(--stalled-wash); color: var(--stalled); } .attn-ico.blocked { background: var(--blocked-wash); color: var(--blocked); } .attn-ico.stalled { background: var(--stalled-wash); color: var(--stalled); }
.attn-title { font-weight: 600; } .attn-sub { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attn-actions { display: flex; gap: 6px; }
.all-clear { display: flex; gap: 14px; align-items: center; padding: 18px 22px; color: var(--ink-2); }
.all-clear .ico { color: var(--done); }

.relay-list { display: grid; gap: 14px; }
.relay { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; padding: 22px 24px; text-decoration: none; color: inherit; transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease); }
.relay:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); transform: translateY(-1px); }
.relay h3 { font-size: 20px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.relay .next { margin-top: 10px; font: 500 17px/1.35 var(--display); letter-spacing: -.01em; color: var(--ink); max-width: 70ch; }
.relay .next .lead { color: var(--ember-ink); font-weight: 600; margin-right: 6px; }
.relay .summary { margin-top: 6px; color: var(--ink-3); font-size: 14px; max-width: 80ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.relay-side { display: grid; gap: 14px; justify-items: end; align-content: start; }
.baton { display: flex; align-items: center; gap: 4px; }
.baton .hop { display: flex; align-items: center; gap: 4px; }
.baton .arrow { width: 14px; height: 1.5px; background: var(--line-2); border-radius: 2px; }
.baton .v { font: 600 11px/1 var(--mono); color: var(--ink-4); margin-left: 2px; }
.mix { display: flex; height: 6px; width: 180px; border-radius: 6px; overflow: hidden; background: var(--sunken); gap: 2px; }
.mix span { display: block; height: 100%; min-width: 3px; }
.mix .ready { background: var(--ready); } .mix .doing { background: var(--ember); } .mix .blocked { background: var(--blocked); } .mix .done { background: var(--done); }
.mix-legend { display: flex; gap: 12px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mix-legend span { display: inline-flex; align-items: center; gap: 5px; }

.feed { list-style: none; margin: 0; padding: 6px 0; }
.feed li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 10px 18px; }
.feed .line { font-size: 13.5px; line-height: 1.4; } .feed .line b { font-weight: 600; }
.feed .when { font-size: 12px; color: var(--ink-4); margin-top: 2px; }
.feed-more { margin: 4px 18px 14px; }
.feed-day { padding: 12px 18px 4px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.rail { position: sticky; top: 24px; max-height: calc(100dvh - 48px); overflow: auto; }

/* ---------- project ---------- */
.proj-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 22px; }
.proj-head h1 { font-size: 34px; letter-spacing: -.03em; line-height: 1.1; }
.proj-head .goal { margin-top: 8px; color: var(--ink-3); font-size: 15.5px; max-width: 70ch; }
.proj-head .repos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.branch-pick { display: flex; align-items: center; gap: 8px; }
.tabs-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 22px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; padding: 10px 0; background: linear-gradient(var(--bg) 70%, transparent); }

.handoff { position: relative; overflow: hidden; }
.handoff::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 176, 32, .16), rgba(255, 91, 46, .07) 55%, transparent 72%); pointer-events: none; }
.handoff-inner { position: relative; padding: 26px 28px 24px; }
.handoff .eyebrowless { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.next-big { margin-top: 14px; font: 600 clamp(22px, 2.4vw, 30px)/1.2 var(--display); letter-spacing: -.025em; max-width: 40ch; }
.next-big .arrow-lead { display: inline-block; color: var(--ember); margin-right: 8px; transform: translateY(-1px); }
.handoff .summary { margin-top: 12px; font-size: 15.5px; color: var(--ink-2); max-width: 72ch; }
.handoff-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 22px; border-radius: 14px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.handoff-grid > div { background: var(--panel); padding: 14px 16px; }
.handoff-grid .k { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-bottom: 6px; }
.handoff-grid .v { font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; margin-top: 14px; font-size: 14px; align-items: flex-start; }
.callout.warn { background: var(--stalled-wash); color: var(--ink); } .callout.warn .ico { color: var(--stalled); }
.callout.block { background: var(--blocked-wash); } .callout.block .ico { color: var(--blocked); }
.callout.info { background: var(--sunken); } .callout .ico { margin-top: 1px; }
.artifacts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.artifacts li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--ink-2); flex-wrap: wrap; }
.handoff-actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.editor { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); animation: enter .2s var(--ease); }

.since { list-style: none; margin: 0; padding: 4px 0; }
.since li { display: flex; gap: 12px; padding: 10px 22px; font-size: 14px; align-items: baseline; }
.since li + li { border-top: 1px solid var(--line); }
.since .kind { flex: none; width: 92px; font-size: 12px; font-weight: 600; color: var(--ink-3); }

.decision { padding: 16px 22px; display: grid; gap: 6px; }
.decision + .decision { border-top: 1px solid var(--line); }
.decision .row1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.decision .title { font-weight: 600; font-size: 15.5px; }
.decision .abstract { color: var(--ink-2); }
.decision .why { font-size: 14px; color: var(--ink-2); } .decision .why b { color: var(--ink); font-weight: 600; }
.decision .tools { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.decision.retired { opacity: .72; }
.decision .decide { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; align-items: center; flex-basis: 100%; }
.decision .decide .input { width: auto; flex: 0 1 360px; min-height: 34px; padding: 6px 12px; }
.history { margin-top: 8px; border-left: 2px solid var(--line-2); padding-left: 14px; display: grid; gap: 8px; }
.history .h { font-size: 13px; color: var(--ink-2); } .history .h b { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin-right: 6px; }

/* board */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; align-items: start; }
.col { background: var(--sunken); border: 1px solid var(--line); border-radius: 16px; padding: 10px; min-height: 140px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 600; font-size: 14px; }
.col-head .n { margin-left: auto; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tiles { display: grid; gap: 8px; }
.tile { display: grid; gap: 8px; padding: 12px 13px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-1); text-align: left; cursor: pointer; width: 100%; transition: box-shadow .15s var(--ease), transform .15s var(--ease); }
.tile:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.tile.doing { border-color: rgba(255, 91, 46, .3); }
.tile .t-title { font-weight: 600; font-size: 14px; line-height: 1.35; color: var(--ink); }
.tile .t-foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tile .t-note { font-size: 12.5px; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.col-empty { padding: 18px 8px; text-align: center; font-size: 13px; color: var(--ink-4); }
.col-more { width: 100%; margin-top: 8px; }

/* memory */
.search { position: relative; max-width: 360px; flex: 1; }
.search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-4); }
.search .input { padding-left: 38px; min-height: 36px; border-radius: 999px; }
.records { display: grid; gap: 10px; }
.record { padding: 16px 20px; }
.record summary { list-style: none; cursor: pointer; display: grid; gap: 4px; }
.record summary::-webkit-details-marker { display: none; }
.record .r1 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.record .r-title { font-weight: 600; } .record .r-abs { color: var(--ink-2); font-size: 14px; }
.record .body { margin-top: 12px; padding: 14px 16px; border-radius: 12px; background: var(--sunken); white-space: pre-wrap; font-size: 14px; color: var(--ink-2); }

/* activity */
.timeline { list-style: none; margin: 0; padding: 8px 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; padding: 10px 22px; align-items: start; }
.timeline .line { font-size: 14px; } .timeline .detail { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.timeline .when { font-size: 12.5px; color: var(--ink-4); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* tables (agents) */
.agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.agent-card { padding: 18px 20px; display: grid; gap: 14px; }
.agent-card .a1 { display: flex; gap: 12px; align-items: center; }
.agent-card .a-name { font: 600 16px/1.2 var(--display); letter-spacing: -.01em; }
.agent-card .a-sub { font-size: 12.5px; color: var(--ink-3); }
.agent-card .a-state { margin-left: auto; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.agent-card .a-actions { display: flex; gap: 6px; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 12px; }
.confirm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13.5px; animation: enter .18s var(--ease); }

/* connect flow */
.connect { padding: 26px 28px; display: grid; gap: 22px; }
.steps { display: grid; gap: 22px; counter-reset: step; }
.step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 16px; }
.step-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 600 15px/1 var(--display); background: var(--sunken); color: var(--ink-3); border: 1px solid var(--line); }
.step.done .step-n { background: var(--done-wash); color: var(--done); border-color: transparent; }
.step.current .step-n { background: var(--ember-btn); color: #fff; border-color: transparent; box-shadow: 0 0 0 5px var(--ember-wash); }
.step h3 { font-size: 16px; letter-spacing: -.01em; margin: 6px 0 4px; } .step p { color: var(--ink-3); font-size: 14px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 12px; }
.choice { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--panel); cursor: pointer; text-align: left; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.choice:hover { border-color: var(--ink-4); }
.choice[aria-pressed="true"] { border-color: var(--ember); box-shadow: 0 0 0 4px var(--ember-wash); }
.choice .c-name { font-weight: 600; } .choice .c-sub { font-size: 12.5px; color: var(--ink-3); }
.cmd { position: relative; margin-top: 10px; }
.cmd pre { margin: 0; padding: 14px 52px 14px 16px; border-radius: 12px; background: #141416; color: #F5F5F7; font: 13px/1.55 var(--mono); white-space: pre-wrap; word-break: break-all; border: 1px solid rgba(255, 255, 255, .06); }
.cmd .copy { position: absolute; top: 8px; right: 8px; color: #D2D2D7; } .cmd .copy:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.secret-note { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.waiting { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; background: var(--sunken); border: 1px dashed var(--line-2); }
.waiting.ok { background: var(--done-wash); border: 1px solid transparent; }
.waiting .ring { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--ember-wash); border-top-color: var(--ember); animation: spin 1s linear infinite; flex: none; }
.waiting.ok .ring { animation: none; border-color: var(--done); background: var(--done); display: grid; place-items: center; color: #fff; }

/* settings */
.group { margin-top: 28px; }
.group > h2 { font-size: 15px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; font-family: var(--text); margin: 0 0 10px 4px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; align-items: center; gap: 16px; padding: 16px 22px; min-height: 64px; }
.rows > li + li { border-top: 1px solid var(--line); }
.rows .r-main { flex: 1; min-width: 0; }
.rows .r-title { font-weight: 600; font-size: 14.5px; }
.rows .r-sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; max-width: 70ch; }
.rows .r-side { display: flex; gap: 8px; align-items: center; flex: none; }
.rows .r-form { flex-direction: column; align-items: stretch; }
.reveal { margin-top: 12px; display: grid; gap: 10px; animation: enter .2s var(--ease); }

/* empty and loading */
.empty { padding: 48px 28px; text-align: center; display: grid; justify-items: center; gap: 12px; }
.empty .art { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--sunken); color: var(--ink-3); }
.empty h2 { font-size: 20px; } .empty p { color: var(--ink-3); max-width: 52ch; }
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--sunken) 25%, var(--hover) 50%, var(--sunken) 75%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
.skel.h { height: 34px; width: 280px; } .skel.l { height: 14px; width: 60%; margin-top: 10px; } .skel.b { height: 160px; margin-top: 24px; border-radius: var(--r-panel); }
.error-state { padding: 28px; display: grid; gap: 10px; justify-items: start; }

/* drawer, scrim, toast */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .28); z-index: 50; animation: fade .2s var(--ease); }
.drawer { position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(520px, calc(100vw - 20px)); z-index: 60; border-radius: 22px; background: color-mix(in srgb, var(--panel) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(30px); -webkit-backdrop-filter: saturate(1.6) blur(30px); border: 1px solid var(--line); box-shadow: var(--shadow-3); overflow: auto; animation: slide-in .38s var(--out-expo); }
.drawer-head { position: sticky; top: 0; display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; background: inherit; z-index: 1; }
.drawer-head h2 { font-size: 21px; letter-spacing: -.02em; flex: 1; }
.drawer-body { padding: 0 22px 28px; display: grid; gap: 18px; }
.drawer .block h3 { font-size: 13px; font-weight: 600; color: var(--ink-3); font-family: var(--text); letter-spacing: 0; margin-bottom: 8px; }
.evidence { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.evidence li { padding: 12px 14px; border-radius: 12px; background: var(--sunken); display: grid; gap: 6px; }
.evidence .e1 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.evidence .e2 { font-size: 13px; color: var(--ink-3); }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: #1D1D1F; color: #F5F5F7; font-size: 14px; box-shadow: var(--shadow-3); animation: toast-in .32s var(--out-expo); }
.toast .ico { color: var(--amber); }
.toast.err .ico { color: #FF6B72; }
.form-msg { font-size: 13.5px; } .form-msg.err { color: var(--blocked); } .form-msg.ok { color: var(--done); }

/* ---------- sign-in (index.html) ---------- */
.signin { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); min-height: 100dvh; }
.stage { position: relative; background: #000; color: #F5F5F7; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 36px 44px 40px; isolation: isolate; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.stage::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .1) 46%, transparent 60%), radial-gradient(120% 70% at 100% 0%, transparent 60%, rgba(0, 0, 0, .35)); pointer-events: none; }
.stage .logo img { height: 30px; width: auto; }
.stage .poster { position: absolute; inset: 0; z-index: -2; background: radial-gradient(40% 36% at 55% 38%, rgba(255, 91, 46, .28), transparent 70%), #000; }
.stage .poster img { position: absolute; left: 50%; top: 38%; width: min(42vw, 420px); transform: translate(-50%, -50%); opacity: .9; }
.has-lobe .stage .poster { display: none; }
.claim { font: 600 clamp(38px, 4.6vw, 66px)/1.02 var(--display); letter-spacing: -.045em; max-width: 12ch; }
.claim span { color: #8E8E93; }
.facts { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; max-width: 46ch; color: #D2D2D7; font-size: 15px; }
.facts li { display: flex; gap: 12px; } .facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); margin-top: 8px; flex: none; }
.stage .fine { margin-top: 22px; font-size: 13px; color: #8E8E93; }
.stage canvas { cursor: grab; touch-action: pan-y; } .stage canvas:active { cursor: grabbing; }
.agent-tags { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.agent-tag { position: absolute; left: 0; top: 0; margin: -30px 0 0 12px; padding: 4px 10px; border-radius: 999px; background: rgba(28, 28, 30, .6); border: 1px solid rgba(255, 255, 255, .1); font: 500 11.5px/1.3 var(--text); color: #F5F5F7; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); white-space: nowrap; will-change: transform; }
.door { display: grid; place-items: center; padding: 40px 28px; background: var(--bg); }
.door-card { width: min(420px, 100%); padding: 36px 34px 30px; }
.door-card h1 { font-size: 34px; letter-spacing: -.03em; }
.door-card .lede { margin-top: 8px; color: var(--ink-3); }
.gh { display: flex; width: 100%; height: 52px; margin-top: 28px; gap: 12px; font-size: 16px; background: #1D1D1F; color: #fff; box-shadow: var(--shadow-2); }
.gh:hover { background: #000; }
:root[data-theme="dark"] .gh { background: #F5F5F7; color: #1D1D1F; } :root[data-theme="dark"] .gh:hover { background: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gh { background: #F5F5F7; color: #1D1D1F; } :root:not([data-theme="light"]) .gh:hover { background: #fff; } }
.gh svg { width: 20px; height: 20px; fill: currentColor; }
.soon { margin-top: 18px; display: grid; gap: 8px; }
.soon .s { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-3); font-weight: 600; font-size: 14px; }
.soon .s small { font-weight: 500; font-size: 12px; color: var(--ink-4); }
.door-steps { margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); list-style: none; display: grid; gap: 12px; counter-reset: s; }
.door-steps li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; font-size: 14px; color: var(--ink-2); counter-increment: s; }
.door-steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); font: 600 12px/1 var(--display); color: var(--ink-3); }
.door .fine { margin-top: 22px; font-size: 12.5px; color: var(--ink-3); text-align: center; }

/* ---------- motion ---------- */
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(40px) scale(.98); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px var(--ember-wash); } 50% { box-shadow: 0 0 0 6px rgba(255, 91, 46, 0); } }
@keyframes breathe { 0%, 100% { opacity: 0; transform: scale(.96); } 50% { opacity: .9; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) { .handoff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols { grid-template-columns: minmax(0, 1fr); } .rail { position: static; max-height: none; } .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-105%); transition: transform .3s var(--out-expo); box-shadow: var(--shadow-3); background: color-mix(in srgb, var(--bg) 92%, transparent); }
  .side.open { transform: none; }
  .side { z-index: 55; }   /* above the scrim (50) that dims the page behind it, below the drawer (60) */
  .topbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 20; padding: 10px 14px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--line); }
  .topbar-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font: 600 16px/1 var(--display); }
  .main { padding: 22px 16px 64px; }
  .page-head h1, .proj-head h1 { font-size: 28px; }
  .relay { grid-template-columns: minmax(0, 1fr); } .relay-side { justify-items: start; }
  .tabs-bar { overflow-x: auto; flex-wrap: nowrap; } .seg { flex: none; }
  .signin { grid-template-columns: minmax(0, 1fr); } .stage { min-height: auto; padding: 24px 22px 30px; justify-content: flex-start; } .stage .logo { margin-bottom: min(52vh, 420px); } .agent-tags { display: none; }
  .stage::after { background: linear-gradient(0deg, rgba(0, 0, 0, .86) 0%, rgba(0, 0, 0, .5) 42%, transparent 62%); }
}
@media (max-width: 620px) {
  .board { grid-template-columns: minmax(0, 1fr); }
  .attn { grid-template-columns: 28px minmax(0, 1fr); } .attn-actions { grid-column: 2; }
  .rows > li { flex-wrap: wrap; } .rows .r-side { width: 100%; justify-content: flex-start; }
  .handoff-inner { padding: 20px 18px; } .handoff-grid { grid-template-columns: minmax(0, 1fr); } .panel-head { padding: 16px 18px 0; } .panel-body { padding: 12px 18px 18px; }
  .timeline li { grid-template-columns: 26px minmax(0, 1fr); } .timeline .when { grid-column: 2; }
}

/* ---------- people: avatars, account, team, support ---------- */
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; } .avatar.xl { width: 72px; height: 72px; font-size: 24px; box-shadow: 0 0 0 4px var(--panel), var(--shadow-2); }
.acct-head { display: flex; gap: 20px; align-items: center; }
.rows-inline { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rows-inline .r-title { font-weight: 600; font-size: 14.5px; } .rows-inline .r-sub { font-size: 13px; color: var(--ink-3); }
.group-note { margin: 8px 4px 0; }
.plan-card { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 24px; padding: 22px 24px; align-items: center; }
.plan-main { display: grid; gap: 6px; justify-items: start; }
.plan-name { font: 600 22px/1.1 var(--display); letter-spacing: -.02em; }
.plan-limits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; border-radius: 12px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.plan-limits > div { background: var(--panel); padding: 12px 14px; } .plan-limits dt { font-size: 12px; color: var(--ink-3); } .plan-limits dd { margin: 4px 0 0; font-size: 20px; }
.device-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--sunken); color: var(--ink-3); flex: none; }
.rows > li.clickable { cursor: pointer; transition: background .15s var(--ease); } .rows > li.clickable:hover { background: var(--hover); }
.select.sm { min-height: 32px; padding: 4px 30px 4px 10px; font-size: 13px; width: auto; border-radius: 10px; }
.mini-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.mini-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.thread { display: grid; gap: 12px; }
.msg { padding: 12px 14px; border-radius: 14px; background: var(--sunken); }
.msg.staff { background: var(--ember-wash); }
.msg-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 13.5px; }
.msg-body { white-space: pre-wrap; font-size: 14.5px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.link-btn:hover { color: var(--ember-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- beta ---------- */
.beta { margin-bottom: 18px; border-color: rgba(255, 176, 32, .35); }
.beta-badge { background: var(--ember-btn); color: #fff; vertical-align: 2px; }
.checklist { list-style: none; margin: 0; padding: 8px 22px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 4px 24px; }
.checklist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; }
.checklist label { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.checklist input { width: 18px; height: 18px; accent-color: var(--ember-btn); }
.checklist input:checked + span { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--ink-4); }

/* ---------- insights ---------- */
.story { font: 500 clamp(19px, 1.9vw, 24px)/1.45 var(--display); letter-spacing: -.015em; color: var(--ink-2); max-width: 64ch; text-wrap: pretty; }
.story b { color: var(--ink); font-weight: 650; } .story .ember, .measure.ember .m-n { color: var(--ember-ink); }
.flow { display: grid; gap: 12px; }
.flow-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 150px; gap: 12px; align-items: center; font-size: 14px; }
.flow-end { display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.flow-row .flow-end:last-child { justify-content: flex-end; flex-direction: row-reverse; }
.flow-track { position: relative; height: 14px; border-radius: 999px; background: var(--sunken); }
.flow-bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, var(--amber), var(--ember)); }
.flow-n { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ink-2); }
.bars { display: grid; grid-template-columns: repeat(28, minmax(0, 1fr)); gap: 4px; height: 150px; align-items: end; }
.bar { height: 100%; display: flex; flex-direction: column-reverse; border-radius: 5px; background: var(--sunken); overflow: hidden; }
.bar span { display: block; width: 100%; }
.seg-handoff { background: var(--ember); } .seg-decision { background: var(--amber); } .seg-task { background: var(--ready); } .seg-record { background: #9AA8FF; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.legend span, .mix-legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.mix.wide { width: 100%; height: 12px; }
.lv-verified { background: var(--done); } .lv-cited { background: var(--ready); } .lv-reported { background: var(--ink-4); } .lv-failed { background: var(--blocked); }
.measures { display: grid; gap: 1px; background: var(--line); margin-top: 14px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-panel) var(--r-panel); overflow: hidden; }
.measure { background: var(--panel); padding: 16px 22px; }
.measure .m-n { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.measure .m-l { font-weight: 600; font-size: 14px; margin-top: 2px; } .measure .m-s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* ---------- map ---------- */
body.wide .page { max-width: none; }
.map-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.map-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.map-chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2); font: 500 13px/1 var(--text); cursor: pointer; }
.map-chip[aria-pressed=false] { opacity: .45; } .map-chip .count { color: var(--ink-4); font-variant-numeric: tabular-nums; }
.map-search { max-width: 320px; min-height: 34px; border-radius: 999px; }
.k-project { background: #FF5B2E; } .k-decision { background: #FFB020; } .k-record { background: #9AA8FF; } .k-task { background: #5AA2FF; } .k-commit { background: #7DD3A8; } .k-agent { background: #F5F5F7; box-shadow: inset 0 0 0 2px #FF5B2E; }
.map-stage { position: relative; height: calc(100dvh - 230px); min-height: 520px; border-radius: 22px; overflow: hidden; background: #050506; border: 1px solid rgba(255, 255, 255, .06); box-shadow: var(--shadow-2); }
.map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.map-canvas:focus-visible { outline: 2px solid var(--ember); outline-offset: -2px; }
.map-info { position: absolute; right: 16px; top: 16px; width: min(340px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; color: #F5F5F7; }
.map-hint, .map-card { padding: 16px 18px; border-radius: 16px; background: rgba(22, 22, 25, .72); border: 1px solid rgba(255, 255, 255, .09); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); display: grid; gap: 8px; font-size: 13.5px; }
.map-hint span { color: #A1A1A6; }
.map-card h3 { font-size: 17px; letter-spacing: -.01em; color: #fff; } .map-card .meta, .map-card .muted, .map-card .ref { color: #A1A1A6; } .map-card .small { color: #D2D2D7; }
.map-edges { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 4px; }
.map-edges .link-btn { color: #E5E5EA; font-size: 13px; } .map-edges .link-btn:hover { color: var(--amber); }
.map-card .btn { justify-self: start; background: rgba(255, 255, 255, .1); color: #fff; } .map-card .btn:hover { background: rgba(255, 255, 255, .18); }
.map-list { position: absolute; inset: 0; overflow: auto; background: var(--panel); }

/* ---------- decision map ---------- */
.lineage-rows { display: grid; gap: 10px; padding: 14px 22px 20px; overflow-x: auto; }
.lineage-row { display: flex; align-items: stretch; gap: 8px; }
.lineage-node { flex: 0 0 auto; width: 230px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); display: grid; gap: 6px; align-content: start; }
.lineage-node.accepted { border-color: rgba(26, 127, 69, .45); box-shadow: 0 0 0 3px var(--done-wash); }
.lineage-node.proposed { border-style: dashed; } .lineage-node.superseded, .lineage-node.rejected { opacity: .62; }
.lineage-node .badge { justify-self: start; }
.ln-title { font-weight: 600; font-size: 14px; } .ln-why { font-size: 12.5px; color: var(--ink-3); }
.lineage-arrow { display: grid; place-items: center; color: var(--ink-4); }

@media (max-width: 900px) {
  .plan-card { grid-template-columns: minmax(0, 1fr); } .plan-limits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-row { grid-template-columns: 96px minmax(0, 1fr) 96px; } .flow-end { font-size: 12.5px; }
  .map-stage { height: 70dvh; } .map-info { left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-height: 45%; }
  .acct-head { flex-direction: column; align-items: flex-start; }
}

/* ---------- Overlord (operator console): same system, a control-room sidebar ---------- */
body.overlord .side { background: #0E0E10; border-right-color: rgba(255, 255, 255, .06); color: #E5E5EA; }
body.overlord .side-nav a { color: #A1A1A6; } body.overlord .side-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
body.overlord .side-nav a[aria-current="page"] { background: rgba(255, 255, 255, .09); color: #fff; box-shadow: none; }
body.overlord .ws-name { color: #fff; } body.overlord .ws-role { color: #8E8E93; } body.overlord .ws-mark { background: #1D1D20; box-shadow: none; }
body.overlord .side-foot { border-top-color: rgba(255, 255, 255, .08); } body.overlord .me { color: #E5E5EA; text-decoration: none; } body.overlord .me:hover { background: rgba(255, 255, 255, .06); } body.overlord .me-sub { color: #8E8E93; }
.ol-brand { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; text-decoration: none; }
.ol-privacy { display: flex; gap: 8px; padding: 12px 10px; margin: 0; font-size: 12.5px; color: #8E8E93; line-height: 1.45; }
.ol-privacy .ico { flex: none; color: var(--amber); margin-top: 1px; }
.ol-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; box-shadow: var(--shadow-1); }
.ol-stats > * { box-shadow: inset -1px -1px 0 var(--line); }
.ol-stat { background: var(--panel); padding: 16px 18px; text-decoration: none; color: var(--ink-3); font-size: 13px; display: grid; gap: 2px; }
.ol-stat .num { font-size: 26px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; }
a.ol-stat:hover { background: var(--hover); }
.bars.thin { grid-template-columns: repeat(30, minmax(0, 1fr)); height: 110px; }
.badge.role-overlord { background: #1D1D1F; color: #FFB020; } .badge.role-service { background: var(--ready-wash); color: var(--ready); } .badge.role-support { background: var(--done-wash); color: var(--done); } .badge.role-beta { background: var(--ember-btn); color: #fff; }
:root[data-theme="dark"] .badge.role-overlord { background: #F5F5F7; color: #C43C16; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.role-overlord { background: #F5F5F7; color: #C43C16; } }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.role-card { display: grid; gap: 12px; align-content: start; }
.role-card .mini-list li { gap: 8px; align-items: flex-start; } .role-card .mini-list .ico { color: var(--done); margin-top: 2px; }
.role-card .meta a { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; color: var(--ink-2); font-size: 13px; }
.access-note { margin-top: 16px; }

.rows > li:has(> div:only-child:empty) { display: none; }

/* ---------- appearance picker ---------- */
.theme-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.theme-opt { display: grid; gap: 10px; padding: 10px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--panel); cursor: pointer; text-align: left; font: 600 14px/1.2 var(--text); color: var(--ink); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.theme-opt:hover { border-color: var(--ink-4); }
.theme-opt[aria-checked="true"] { border-color: var(--ember); box-shadow: 0 0 0 4px var(--ember-wash); }
.theme-opt small { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.theme-swatch { height: 74px; border-radius: 10px; display: grid; grid-template-columns: 30% 1fr; overflow: hidden; border: 1px solid var(--line); }
.theme-swatch i { display: block; }
.sw-light i:first-child { background: #ECECF0; } .sw-light i:last-child { background: #F5F5F7; box-shadow: inset 0 18px 0 -8px #fff; }
.sw-dark i:first-child { background: #18181B; } .sw-dark i:last-child { background: #0B0B0D; box-shadow: inset 0 18px 0 -8px #161618; }
.sw-system { grid-template-columns: 1fr 1fr; } .sw-system i:first-child { background: linear-gradient(90deg, #ECECF0 30%, #F5F5F7 30%); } .sw-system i:last-child { background: linear-gradient(90deg, #18181B 30%, #0B0B0D 30%); }
@media (max-width: 620px) { .theme-pick { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Help and tickets ---------- */
.start-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 8px; }
.start-card { display: flex; gap: 16px; align-items: center; padding: 20px 22px; text-align: left; cursor: pointer; font: inherit; color: var(--ink); transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease); }
.start-card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); border-color: var(--line-2); }
.start-card b { display: block; font: 600 17px/1.2 var(--display); letter-spacing: -.01em; } .start-card small { display: block; color: var(--ink-3); font-size: 13.5px; margin-top: 3px; }
.start-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.start-ico.k-bug { background: var(--blocked-wash); color: var(--blocked); } .start-ico.k-feature { background: var(--stalled-wash); color: var(--stalled); } .start-ico.k-question { background: var(--ready-wash); color: var(--ready); }
.tickets > li.unread .r-title { font-weight: 700; }
.badge.kind .ico { width: 13px; height: 13px; }
.kind-pick { display: flex; flex-wrap: wrap; } .kind-pick button[aria-checked="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-1); font-weight: 600; }
.sev { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.sev-opt { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--panel); text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.sev-opt b { font-size: 13.5px; } .sev-opt small { font-size: 12px; color: var(--ink-3); }
.sev-opt[aria-checked="true"] { border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-wash); }
.sev-opt.sev-urgent[aria-checked="true"] { border-color: var(--blocked); box-shadow: 0 0 0 3px var(--blocked-wash); }
.ticket-title { font-size: 30px; letter-spacing: -.025em; margin-top: 10px; }
.ticket-fields { display: grid; gap: 16px; }
.ticket-fields h3 { font: 600 12.5px/1.2 var(--text); color: var(--ink-3); letter-spacing: 0; margin-bottom: 4px; } .ticket-fields p { white-space: pre-wrap; }
.timeline-t { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; }
.timeline-t li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.timeline-t .msg { background: var(--panel); border: 1px solid var(--line); }
.timeline-t .msg.staff { background: var(--ember-wash); border-color: transparent; }
.msg.internal { background: var(--stalled-wash) !important; border: 1px dashed rgba(240, 140, 0, .5) !important; }
.lifecycle { list-style: none; margin: 0; padding: 12px 22px 18px; display: grid; gap: 10px; }
.lifecycle li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-3); }
.lifecycle li.current { color: var(--ink); font-weight: 600; } .lifecycle li:not(.current) .dot { opacity: .35; }
.ideas { display: grid; gap: 12px; }
.idea { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px; padding: 18px 22px; align-items: start; }
.idea h3 { font-size: 17px; letter-spacing: -.01em; margin: 8px 0 4px; } .idea-main { display: grid; gap: 4px; }
.vote { display: grid; justify-items: center; gap: 2px; padding: 10px 0; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--panel); cursor: pointer; color: var(--ink-2); font: 600 15px/1 var(--display); }
.vote .ico { width: 16px; height: 16px; } .vote:hover { border-color: var(--ink-4); }
.vote[aria-pressed="true"] { border-color: var(--ember); color: var(--ember-ink); background: var(--ember-wash); }
.ticket-filters { display: grid; gap: 10px; margin-bottom: 16px; } .ticket-filters .seg { flex-wrap: wrap; }
.inline-switch { display: inline-flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 500; cursor: pointer; }
@media (max-width: 900px) { .start-grid { grid-template-columns: minmax(0, 1fr); } .idea { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; } }

/* memory */
.mem-search { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.mem-search .search { flex: 1; }
.mem-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.mem-due { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); padding: 0 6px; }
.mem-status { margin: 10px 0 12px; }
.mem-more { display: flex; justify-content: center; margin-top: 14px; }
.mem-facts { display: grid; gap: 6px; margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.mem-fact { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
.mem-fact > span:first-child { color: var(--ink-3); }
.mem-fact ul { margin: 0; padding-left: 18px; overflow-wrap: anywhere; }
.mem-links { display: flex; gap: 10px; flex-wrap: wrap; }
.badge.kind-preference, .badge.kind-procedure { background: var(--ready-wash); color: var(--ready); }
.badge.kind-experience { background: var(--stalled-wash); color: var(--stalled); }
@media (max-width: 640px) { .mem-search { flex-wrap: wrap; } .mem-fact { grid-template-columns: 1fr; gap: 2px; } }

/* overlord usage */
.u-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; padding: 22px 24px; align-items: center; }
.u-k { font-size: 13px; color: var(--ink-3); }
.u-big { font-size: 52px; font-weight: 600; letter-spacing: -.03em; color: var(--ink); line-height: 1.05; font-variant-numeric: tabular-nums; }
.u-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.u-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.u-facts b { color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 4px; }
dl.u-facts { grid-template-columns: max-content 1fr; column-gap: 16px; row-gap: 6px; padding: 22px 24px; }
dl.u-facts dt { color: var(--ink); font-weight: 600; }
dl.u-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { dl.u-facts { grid-template-columns: 1fr; } dl.u-facts dd { margin-bottom: 6px; } }
.u-note { margin: 10px 2px 4px; }
.u-connect ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.u-scroll { overflow-x: auto; }
.u-grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.u-grid th, .u-grid td { padding: 10px 14px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
.u-grid thead th { border-top: 0; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.u-grid tbody th { font-weight: 600; color: var(--ink); white-space: normal; min-width: 170px; }
.u-grid td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.u-src { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.u-meter { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.u-track { flex: 1; height: 6px; border-radius: 999px; background: var(--ready-wash); overflow: hidden; }
.u-fill { height: 100%; border-radius: 999px; background: var(--ready); }
.u-meter.warn .u-track { background: var(--stalled-wash); } .u-meter.warn .u-fill { background: var(--stalled); }
.u-meter.crit .u-track { background: var(--blocked-wash); } .u-meter.crit .u-fill { background: var(--blocked); }
.u-pct { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 40px; justify-content: flex-end; }
.u-meter.warn .u-pct .ico { color: var(--stalled); } .u-meter.crit .u-pct .ico { color: var(--blocked); }
.u-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 26px 32px; }
.page > .panel + .panel, .page > .panel + .u-two, .page > .u-two + .panel { margin-top: 16px; }
.u-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.u-two .form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-items: start; } .u-two .form > h3, .u-two .form > .form-actions, .u-two .form > p { grid-column: 1 / -1; }
@media (max-width: 1000px) { .u-two, .u-two .form { grid-template-columns: 1fr; } .u-charts { grid-template-columns: 1fr; } }
.u-fig { margin: 0; }
.u-fig figcaption { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.u-chart { width: 100%; height: auto; display: block; }
.u-bar { fill: #2a78d6; }
.u-hit { fill: transparent; }
.u-hit:hover + .u-bar, .u-bar:hover { opacity: .8; }
.u-base { stroke: var(--line-2); stroke-width: 1; }
.u-ref { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 4; }
.u-lab { font-size: 11.5px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.u-table summary { font-size: 12.5px; color: var(--ink-3); cursor: pointer; margin-top: 4px; }
.u-table table { font-size: 12.5px; margin-top: 6px; border-collapse: collapse; } .u-table td, .u-table th { padding: 2px 10px 2px 0; text-align: left; }
:root[data-theme="dark"] .u-bar { fill: #3987e5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .u-bar { fill: #3987e5; } }
@media (max-width: 760px) { .u-hero { grid-template-columns: 1fr; } .u-big { font-size: 42px; } }


.signin-form { display: grid; gap: 10px; } .signin-form .ts:empty { display: none; }
.signin-form button[disabled] { opacity: .6; cursor: progress; }

/* Two-step sign-in (Overlord) */
.twostep { max-width: 560px; margin: 8vh auto 0; display: grid; gap: 14px; }
.twostep .steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14.5px; }
.twostep code.secret { font-size: 15px; letter-spacing: .06em; word-spacing: .3em; user-select: all; overflow-wrap: anywhere; }
.twostep .codes { columns: 2; margin: 0; padding-left: 22px; font-size: 15px; line-height: 1.9; }
.twostep .codes code { user-select: all; }
@media (max-width: 520px) { .twostep .codes { columns: 1; } }
