
:root {
  color-scheme: light;
  --page: #efefed;
  --pane: #f9f9f8;
  --pane-2: #f0f0ee;
  --line: #e4e4e0;
  --line-strong: #d0d0cb;
  --ink: #19191b;
  --ink-2: #4d4d55;
  --muted: #6a6a72;
  --accent: #2456e6;
  --accent-ink: #ffffff;
  --accent-wash: #e9eefd;
  --brand: #f26a1b;
  --primary: #242427;
  --primary-ink: #ffffff;
  --needs: #c8246f;
  --needs-wash: #f9e4ee;
  --note-wash: #fdf1e3;
  --note-line: #f3d6b3;
  --hover: rgb(0 0 0 / 0.04);
  --shadow: 0 1px 1px rgb(20 20 30 / 0.02);
  --gridline: #e8e8e5;
  --axis: #c9c9c3;
  --good: #0ca30c; --good-ink: #0a6b0a; --good-wash: #e5f5e5;
  --warning: #fab219; --warning-ink: #8a5a00; --warning-wash: #fdf3dc;
  --serious: #ec835a; --serious-ink: #9c3f17; --serious-wash: #fcebe3;
  --critical: #d03b3b; --critical-ink: #a32626; --critical-wash: #fbe6e6;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-7: #4a3aa7; --series-8: #e34948;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-card: 18px;
  --r-ctl: 12px;
  --gap: 14px;
}
/* Light is the default for everyone. Dark is an explicit opt-in (toggle, cookie). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #121214;
  --pane: #19191c;
  --pane-2: #222226;
  --line: #2e2e33;
  --line-strong: #44444b;
  --ink: #ededee;
  --ink-2: #b6b6bd;
  --muted: #8e8e97;
  --accent: #7393f6;
  --accent-ink: #0d1430;
  --accent-wash: #1e284a;
  --primary: #ededee;
  --primary-ink: #131315;
  --needs: #f06aa6;
  --needs-wash: #3a1a2a;
  --note-wash: #33271a;
  --note-line: #5a4026;
  --hover: rgb(255 255 255 / 0.05);
  --shadow: none;
  --gridline: #2a2a2f;
  --axis: #45454c;
  --good-ink: #3ccf3c; --good-wash: #16301a;
  --warning-ink: #fab219; --warning-wash: #33290f;
  --serious-ink: #ef9a78; --serious-wash: #3a2219;
  --critical-ink: #ee7272; --critical-wash: #3a1b1b;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 14px/1.5 var(--font);
  font-feature-settings: "kern"; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font); line-height: 1.2; margin: 0; letter-spacing: -0.01em; font-weight: 500; }
h1 { font-size: 2.375rem; font-weight: 400; letter-spacing: -0.03em; line-height: 1.1; }
h2 { font-size: 1rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
code, pre { font-family: ui-monospace, "Geist Mono", Menlo, monospace; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; }
.brand .mark { width: 26px; height: 26px; flex: none; }

/* ---------- App shell: sidebar + content ---------- */
body.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.nav-open { position: absolute; opacity: 0; pointer-events: none; }
.mobile-bar, .scrim { display: none; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px; padding: 20px 14px 14px;
}
.sidebar > .brand { padding: 0 8px; }
.nav-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 10px; min-height: 36px; border-radius: 11px;
  color: var(--ink); text-decoration: none; font: inherit; font-size: 0.875rem;
  background: none; border: 0; cursor: pointer; text-align: left;
}
.nav-item:hover { background: var(--hover); color: var(--ink); }
.nav-item .ico { color: var(--ink-2); }
.nav-item[aria-current="page"] { background: var(--primary); color: var(--primary-ink); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }
.nav-item[aria-current="page"] .ico { color: inherit; }
.nav-item[aria-current="page"] .nav-dot { box-shadow: 0 0 0 2px var(--primary); }
.nav-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-group { margin-top: 16px; }
.nav-search { display: flex; align-items: center; gap: 8px; padding: 0 10px; min-height: 36px; border: 1px solid var(--line); border-radius: 11px; background: var(--pane); color: var(--muted); }
.nav-search[hidden] { display: none; }
.nav-search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 0.875rem; color: var(--ink); padding: 0; outline: none; }
.nav-search:focus-within { border-color: var(--line-strong); outline: 3px solid var(--accent-wash); }
.nav-search .ico { width: 16px; height: 16px; }
.nav-group ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.nav-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 0.75rem; font-weight: 400; color: var(--muted); padding: 0 6px 4px 10px; letter-spacing: 0; }
.nav-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-label-link { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: var(--muted); }
.nav-label-link .ico { width: 15px; height: 15px; }
.nav-label-link:hover, .nav-label-link[aria-current="page"] { background: var(--hover); color: var(--ink); }
.nav-empty { font-size: 0.875rem; color: var(--muted); padding: 2px 10px; }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.dot-ok, .dot-done { background: var(--good); }
.dot-in_progress { background: var(--accent); }
.dot-attention { background: var(--serious); }
.dot-blocked { background: var(--critical); }
.count-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 0.75rem; font-weight: 600; display: inline-grid; place-items: center; flex: none; margin-left: auto; }
.nav-foot { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.nav-foot form { margin: 0; }
.nav-user { display: flex; align-items: center; gap: 10px; padding: 12px 4px 0 6px; margin-top: 8px; border-top: 1px solid var(--line); }
.nav-user-email { flex: 1; min-width: 0; font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--pane); border: 1px solid var(--line); font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.avatar .ico { width: 16px; height: 16px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }

.content { padding: 30px 32px 72px 14px; min-width: 0; max-width: 1320px; container: content / inline-size; }

@media (max-width: 900px) {
  body.shell { display: block; }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; position: sticky; top: 0; z-index: 5; background: var(--page); }
  .sidebar {
    position: fixed; z-index: 20; inset: 0 auto 0 0; width: min(300px, 86vw); background: var(--page);
    transform: translateX(-100%); transition: transform 200ms ease, visibility 200ms; visibility: hidden;
  }
  .nav-open:checked ~ .sidebar { transform: none; visibility: visible; box-shadow: 0 0 40px rgb(0 0 0 / 0.18); }
  .nav-open:checked ~ .scrim { display: block; position: fixed; inset: 0; z-index: 15; background: rgb(0 0 0 / 0.3); }
  .content { padding: 4px 16px 64px; }
  h1 { font-size: 1.75rem; }
}

/* ---------- Page head ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 4px 0 20px; }
.page-head-main { min-width: 0; }
.crumbs { font-size: 0.8125rem; color: var(--muted); margin-bottom: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.page-sub { color: var(--muted); margin-top: 8px; max-width: 70ch; }
.page-meta { font-size: 0.8125rem; color: var(--muted); }

/* ---------- Cards & grid ---------- */
.card, .widget {
  background: var(--pane); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 18px 20px 20px; box-shadow: var(--shadow); min-width: 0;
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card-sub { font-size: 0.8125rem; color: var(--muted); margin-top: 2px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: var(--gap); }

/* The board: main column + rail of stacked cards. Nothing leaves a hole. */
.board { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: var(--gap); align-items: start; }
.board.no-rail { grid-template-columns: minmax(0, 1fr); }
.board-main, .board-rail { display: grid; gap: var(--gap); min-width: 0; align-content: start; }
.board-flat { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: var(--gap); align-items: start; }
@container content (max-width: 880px) {
  .board { grid-template-columns: minmax(0, 1fr); }
  /* One column: the open ask first, then the headline, then everything in reading order. */
  .board-main, .board-rail { display: contents; }
  .board > * > .hero { order: -2; }
  .board > * > .strip-widget { order: -1; }
}
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); grid-auto-flow: row dense; }
.span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
@container content (max-width: 960px) { .span-4 { grid-column: span 6; } .span-8 { grid-column: span 12; } }
@container content (max-width: 620px) { .span-4, .span-6, .span-8 { grid-column: span 12; } }
/* Board stacks ignore the 12-column spans used by the single-widget view. */
.board-main > .widget, .board-rail > .widget, .board-flat > .widget { grid-column: auto; }
.board-flat > .strip-widget { grid-column: 1 / -1; }
/* Tabs: only when an agent files widgets under two or more. Scrolls sideways on phones. */
.board + .tabs, .board-flat + .tabs { margin-top: 22px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: var(--gap); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; margin-bottom: -1px; border-bottom: 2px solid transparent;
  color: var(--muted); text-decoration: none; font-size: 0.9375rem; font-weight: 500; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.tab-count { font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tab-heading { font-size: 1rem; font-weight: 600; margin: 26px 0 12px; }
.more { margin-top: 18px; }
.more summary { cursor: pointer; color: var(--ink-2); font-size: 0.9375rem; min-height: 32px; display: inline-flex; align-items: center; }

.notice { background: var(--accent-wash); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); padding: 14px 16px; border-radius: 16px; margin: 0 0 16px; }
.notice.warn { background: var(--note-wash); border-color: var(--note-line); }
.notice h2 { font-size: 1rem; margin-bottom: 4px; }
.notice > * + * { margin-top: 8px; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 500; font-size: 0.875rem;
  padding: 8px 15px; min-height: 40px; border-radius: var(--r-ctl); border: 1px solid transparent;
  background: var(--primary); color: var(--primary-ink); cursor: pointer; text-decoration: none;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.1);
}
.btn.quiet { background: var(--pane); color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.quiet:hover { border-color: var(--line-strong); }
.btn.danger { background: var(--pane); color: var(--critical-ink); border-color: var(--line); box-shadow: none; }
.btn.small { min-height: 34px; padding: 5px 12px; font-size: 0.875rem; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; font-size: 0.9375rem; }
input[type="email"], input[type="text"], select {
  font: inherit; padding: 10px 12px; min-height: 42px; border-radius: var(--r-ctl);
  border: 1px solid var(--line-strong); background: var(--pane); color: var(--ink); width: 100%;
}
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.inline-form .field { flex: 1 1 220px; }

/* ---------- Pills ---------- */
.state-pill, .needs-pill, .pill, .delta-pill, .kind-pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 0.8125rem; font-weight: 500; line-height: 1; padding: 6px 10px; border-radius: 999px;
}
.state-pill { background: var(--pane-2); color: var(--ink-2); }
.state-pill span { font-size: 0.75rem; }
.state-ok, .state-done { background: var(--good-wash); color: var(--good-ink); }
.state-in_progress { background: var(--accent-wash); color: var(--accent); }
.state-attention { background: var(--serious-wash); color: var(--serious-ink); }
.state-blocked { background: var(--critical-wash); color: var(--critical-ink); }
.state-idle { color: var(--muted); }
.needs-pill { background: var(--needs-wash); color: var(--needs); }
.delta-pill { background: var(--pane); border: 1px solid var(--line); color: var(--ink); padding: 4px 8px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); font-variant-numeric: tabular-nums; }
.delta-arrow { font-size: 0.625rem; color: var(--muted); }
.pill { border: 1px solid var(--line-strong); color: var(--ink-2); padding: 4px 9px; }
.pill.pending { border-color: var(--serious); color: var(--serious-ink); }
.pill.revoked { color: var(--muted); }

/* ---------- Overview ---------- */
.needs-card .card-head { margin-bottom: 6px; }
.action-list { list-style: none; margin: 0; padding: 0; }
.action-list li + li { border-top: 1px solid var(--line); }
.action-list a { display: flex; align-items: center; gap: 12px; padding: 11px 2px; color: var(--ink); text-decoration: none; border-radius: 10px; }
.action-list a:hover .action-title { text-decoration: underline; }
.action-list a > .ico { color: var(--muted); }
.action-icon { width: 32px; height: 32px; font-size: 0.875rem; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; background: var(--needs-wash); color: var(--needs); }
.action-icon.urgency-low { background: var(--pane-2); color: var(--ink-2); }
.action-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.action-title { font-weight: 500; line-height: 1.35; }
.action-sub { font-size: 0.75rem; color: var(--muted); }

.project-card { display: flex; flex-direction: column; gap: 8px; color: var(--ink); text-decoration: none; transition: border-color 120ms; }
.project-card:hover { border-color: var(--line-strong); }
.project-card:hover h3 { text-decoration: underline; }
.project-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.kind-tile { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--pane-2); color: var(--ink-2); }
.project-card h3 { font-size: 1.0625rem; }
.project-card .card-sub { margin-top: -4px; }
.project-card-summary { color: var(--ink-2); font-size: 0.875rem; flex: 1; }
.project-card-foot { font-size: 0.75rem; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; }

.list-rows { list-style: none; margin: 0; padding: 0; }
.list-rows li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.row-title { font-weight: 500; }
.row-meta { font-size: 0.875rem; color: var(--muted); }

/* ---------- Widgets ---------- */
.widget { display: flex; flex-direction: column; gap: 14px; }
.widget-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.widget-head-main { min-width: 0; }
.widget-title a { color: var(--ink); text-decoration: none; }
.widget-title a:hover { text-decoration: underline; }
.widget-body { flex: 1; min-width: 0; }
.widget-head-main { flex: 1; }
.provenance { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.provenance.stale { color: var(--serious-ink); }
.stale-flag { font-weight: 600; }
.widget-menu { position: relative; flex: none; }
.widget-menu summary {
  list-style: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--ink-2); cursor: pointer;
}
.widget-menu summary::-webkit-details-marker { display: none; }
.widget-menu summary:hover, .widget-menu[open] summary { border-color: var(--line-strong); color: var(--ink); background: var(--pane); }
.menu-pop {
  position: absolute; right: 0; top: 38px; z-index: 10; min-width: 176px; padding: 6px;
  background: var(--pane); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgb(0 0 0 / 0.12);
  display: grid;
}
.menu-pop form { display: grid; margin: 0; }
.menu-pop a, .menu-pop button {
  display: block; text-align: left; font: inherit; font-size: 0.8125rem; color: var(--ink); text-decoration: none;
  padding: 8px 10px; border: 0; border-radius: 9px; background: none; cursor: pointer;
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--hover); }
.menu-pop button[aria-pressed="true"] { color: var(--accent); }

/* Headline strip: one row of real numbers across the top of a project. */
.strip-widget .widget-head { align-items: center; }
.kpis { display: flex; flex-wrap: wrap; row-gap: 18px; }
.kpi { flex: 1 1 0; min-width: 130px; padding: 2px 20px; border-left: 1px solid var(--line); display: grid; align-content: start; gap: 4px; justify-items: start; }
.kpi-lead { flex: 1.6 1 0; min-width: 220px; padding-left: 0; border-left: 0; }
.kpi-label { font-size: 0.8125rem; color: var(--muted); }
.kpi-num { font-size: 3.25rem; font-weight: 300; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-num.sm { font-size: 1.75rem; font-weight: 400; letter-spacing: -0.025em; line-height: 1.15; }
.kpi-sub { font-size: 0.875rem; color: var(--ink-2); }
.kpi-lead .meter { width: 100%; margin-top: 8px; }
.kpi-lead:only-child { max-width: 440px; }
.kpi-lead-text { font-size: 1.375rem; line-height: 1.3; letter-spacing: -0.015em; max-width: 26ch; }
.strip-detail { margin-top: 2px; }
@container content (max-width: 620px) {
  .kpi-lead { flex-basis: 100%; }
  .kpi { padding-left: 0; border-left: 0; min-width: 40%; }
}

.hero-num { font-size: 3.5rem; font-weight: 300; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.hero-num.sm { font-size: 2.5rem; }
.hero-unit { font-size: 0.5em; letter-spacing: -0.01em; color: var(--ink-2); margin-left: 2px; }
.hero-num.sm .hero-unit { font-size: 0.42em; }

/* attention: the hero card. It is why a human opens the app. */
.widget.hero {
  color: #fff; border-color: transparent;
  background:
    radial-gradient(70% 55% at 100% 100%, rgb(247 150 80 / 0.85), transparent 70%),
    radial-gradient(70% 60% at 75% 75%, rgb(160 185 230 / 0.35), transparent 70%),
    linear-gradient(155deg, #141c33 0%, #22335e 60%, #3a5390 100%);
}
.widget.hero .widget-title a, .widget.hero .ask { color: #fff; }
.widget.hero .provenance { color: rgb(255 255 255 / 0.7); }
.widget.hero .widget-menu summary { border-color: rgb(255 255 255 / 0.25); color: #fff; background: rgb(255 255 255 / 0.08); }
.widget.hero .menu-pop a { color: var(--ink); }
.widget.hero .prose { color: rgb(255 255 255 / 0.85); }
.widget.hero .prose code { background: rgb(255 255 255 / 0.15); }
.widget.hero a { color: #fff; }
.hero-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 500; padding: 5px 10px; border-radius: 999px; background: rgb(255 255 255 / 0.14); border: 1px solid rgb(255 255 255 / 0.2); margin-bottom: 12px; }
.w-attention > * + * { margin-top: 12px; }
.w-attention .ask { font-size: 1.4375rem; font-weight: 400; line-height: 1.25; letter-spacing: -0.015em; }
.w-attention.urgency-low .ask { font-size: 1.25rem; }
.hero .w-attention .options .small { color: rgb(255 255 255 / 0.75); }
.w-attention .options ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.w-attention .options li { background: #fff; color: #18181b; border-radius: 12px; padding: 8px 14px; font-size: 0.9375rem; font-weight: 500; box-shadow: 0 2px 8px rgb(0 0 0 / 0.15); }
.hero .w-attention:not(.resolved) > .small { color: rgb(255 255 255 / 0.75); }
/* Further open asks: same words, quieter card. Only one card per page shouts. */
.widget.asking { border-color: color-mix(in srgb, var(--needs) 30%, var(--line)); }
.asking .hero-tag { background: var(--needs-wash); color: var(--needs); border-color: transparent; }
.asking .w-attention .ask { font-size: 1.1875rem; }
.asking .w-attention .options li { background: var(--pane-2); box-shadow: none; border: 1px solid var(--line); color: var(--ink); }
.w-attention.resolved .ask { font-size: 1.125rem; color: var(--ink-2); }

/* prose */
.prose { max-width: 72ch; overflow-wrap: anywhere; color: var(--ink); }
.prose > * + * { margin-top: 0.75em; }
.prose h1, .prose h2 { font-size: 1.1875rem; margin-top: 1.2em; }
.prose h3, .prose h4 { font-size: 1.0625rem; margin-top: 1.1em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.25em; }
.prose code { font-size: 0.875em; background: var(--pane-2); padding: 0.1em 0.35em; border-radius: 5px; }
.prose pre { background: var(--pane-2); padding: 12px 14px; border-radius: var(--r-ctl); overflow-x: auto; font-size: 0.8125rem; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin-left: 0; padding-left: 14px; border-left: 3px solid var(--line-strong); color: var(--ink-2); }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.prose table, .data-table, .as-table table { border-collapse: collapse; font-size: 0.9375rem; width: 100%; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 12px 8px 0; text-align: left; vertical-align: top; }

/* status */
.w-status { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.w-status > .meter, .w-status > .metric-rows, .w-status > .prose { align-self: stretch; }
.status-summary { color: var(--ink-2); font-size: 0.9375rem; }
.status-summary.lead { color: var(--ink); font-size: 1.375rem; font-weight: 400; line-height: 1.3; letter-spacing: -0.01em; }
.meter {
  height: 8px; border-radius: 999px; overflow: hidden;
  /* The unfinished part is hatched, like a plan not yet real. */
  background: repeating-linear-gradient(-45deg, var(--line-strong) 0 1.5px, var(--pane-2) 1.5px 5px);
}
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter.tone-blocked span { background: var(--critical); }
.meter.tone-attention span { background: var(--serious); }
.meter.tone-done span, .meter.tone-ok span { background: var(--good); }
.metric-rows { margin: 4px 0 0; }
.metric-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.metric-row dt { color: var(--ink-2); font-size: 0.9375rem; }
.metric-row dd { margin: 0; display: flex; align-items: center; gap: 8px; }
.metric-val { font-weight: 500; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.metric-unit { color: var(--muted); font-size: 0.875rem; font-weight: 400; }

/* tasks */
.w-tasklist { display: flex; flex-direction: column; gap: 12px; }
.tasks { list-style: none; padding: 0; margin: 4px 0 0; display: grid; }
.task { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.task-icon { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; background: var(--pane-2); color: var(--muted); margin-top: -1px; }
.task-done .task-icon { background: var(--good-wash); color: var(--good-ink); }
.task-done .task-text { color: var(--ink-2); }
.task-in_progress .task-icon { background: var(--accent-wash); color: var(--accent); }
.task-blocked .task-icon { background: var(--critical-wash); color: var(--critical-ink); }
.task-skipped .task-text { text-decoration: line-through; color: var(--muted); }
.task-body { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; min-width: 0; }
.task-flag { font-size: 0.75rem; font-weight: 500; color: var(--critical-ink); background: var(--critical-wash); border-radius: 999px; padding: 1px 8px; }
.task-note { flex-basis: 100%; font-size: 0.8125rem; color: var(--muted); }

/* tables */
.data-table th, .data-table td { padding: 11px 16px 11px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
.data-table td { white-space: normal; min-width: 6ch; }
.data-table thead th { border-bottom: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted); font-weight: 400; padding-top: 0; }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table tbody th { font-weight: 500; position: sticky; left: 0; background: var(--pane); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table caption { text-align: left; color: var(--ink-2); font-size: 0.875rem; padding-bottom: 10px; }
.sort { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
th[aria-sort="ascending"] .sort::after { content: " ▲"; font-size: 0.7em; }
th[aria-sort="descending"] .sort::after { content: " ▼"; font-size: 0.7em; }
.badge { display: inline-block; white-space: nowrap; font-size: 0.8125rem; padding: 2px 9px; border-radius: 999px; background: var(--pane-2); border: 1px solid var(--line); }
.table-count { font-size: 0.8125rem; margin-top: 8px; }

/* charts */
.chart { margin: 0; }
.chart-plot svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-plot .v-narrow { display: none; }
.chart-plot { container-type: inline-size; }
@container (max-width: 480px) { .chart-plot .v-wide { display: none; } .chart-plot .v-narrow { display: block; } }
.chart-caption { color: var(--ink-2); font-size: 0.9375rem; margin-bottom: 8px; }
.chart .gridline { stroke: var(--gridline); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .value-label { fill: var(--ink-2); font-size: 12px; font-weight: 600; }
.chart .donut-total { fill: var(--ink); font-size: 28px; font-weight: 300; letter-spacing: -0.02em; }
.chart .guide { stroke: var(--axis); stroke-width: 1; stroke-dasharray: 3 3; visibility: hidden; }
.chart .hit { fill: transparent; cursor: crosshair; }
.s1 { --c: var(--series-1); } .s2 { --c: var(--series-2); } .s3 { --c: var(--series-3); } .s4 { --c: var(--series-4); }
.s5 { --c: var(--series-5); } .s6 { --c: var(--series-6); } .s7 { --c: var(--series-7); } .s8 { --c: var(--series-8); }
.mk-line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mk-dot { fill: var(--c); stroke: var(--pane); stroke-width: 2; }
.mk-fill { fill: var(--c); }
.mk-slice { stroke: var(--pane); stroke-width: 2; cursor: pointer; }
.legend { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.8125rem; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.key.key-line { height: 3px; width: 14px; border-radius: 2px; }
.chart-pie { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.chart-pie svg { width: min(180px, 60vw); height: auto; }
.legend-pie { display: grid; gap: 8px; font-size: 0.875rem; flex: 1 1 160px; }
.legend-pie li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; }
.legend-val { font-variant-numeric: tabular-nums; color: var(--ink); }
.as-table { margin-top: 10px; font-size: 0.875rem; }
.as-table summary { cursor: pointer; color: var(--muted); min-height: 30px; display: inline-flex; align-items: center; }
.as-table summary:hover { color: var(--ink); }
.as-table th, .as-table td { padding: 5px 12px 5px 0; border-bottom: 1px solid var(--line); text-align: left; }
.as-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tooltip {
  position: fixed; z-index: 30; pointer-events: none; background: var(--pane); color: var(--ink);
  border: 1px solid var(--line); padding: 8px 12px; border-radius: 12px; font-size: 0.8125rem; line-height: 1.45; max-width: 240px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
}
.tooltip b { display: block; margin-bottom: 2px; font-weight: 600; }
.tooltip .row { display: flex; gap: 10px; align-items: center; justify-content: space-between; font-variant-numeric: tabular-nums; }
.tooltip .row span:first-child { display: inline-flex; gap: 6px; align-items: center; color: var(--ink-2); }

/* media */
.w-media { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.media img { width: 100%; height: auto; border-radius: 12px; display: block; background: var(--pane-2); }
.media-caption { font-size: 0.875rem; color: var(--ink-2); margin-top: 6px; }
.external { color: var(--muted); }
.file-link { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); text-decoration: none; color: var(--ink); }
.file-link:hover { border-color: var(--line-strong); }
.file-kind { font-size: 0.75rem; font-weight: 600; color: var(--accent); background: var(--accent-wash); border-radius: 6px; padding: 2px 6px; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* timeline */
.tl, .tl ol { list-style: none; padding: 0; margin: 0; }
.tl-day + .tl-day { margin-top: 14px; }
.tl-day h4 { font-size: 0.8125rem; color: var(--muted); font-weight: 400; margin-bottom: 4px; }
.tl-event { position: relative; display: grid; grid-template-columns: 4.5em 1fr; gap: 10px; padding: 6px 0 6px 20px; }
.tl-event::before { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.tl-event::after { content: ""; position: absolute; left: 0; top: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--pane); border: 2px solid var(--muted); }
.tl-event time { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.tl-success::after { border-color: var(--good); background: var(--good); }
.tl-warning::after { border-color: var(--warning); background: var(--warning); }
.tl-error::after { border-color: var(--critical); background: var(--critical); }
.tl-info::after { border-color: var(--accent); }

/* html escape hatch */
.w-html iframe { width: 100%; border: 1px dashed var(--line-strong); border-radius: 12px; background: #fff; }

/* ---------- Plain lists (agents, outbox) ---------- */
.rows { list-style: none; padding: 0; margin: 0; background: var(--pane); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow); }
.rows > li + li { border-top: 1px solid var(--line); }
.agent-row { padding: 16px 20px; display: grid; gap: 8px; }
.agent-row header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.agent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.key-reveal { font-family: ui-monospace, Menlo, monospace; font-size: 0.875rem; background: var(--pane); padding: 10px 12px; border-radius: var(--r-ctl); overflow-wrap: anywhere; user-select: all; }

/* ---------- Public pages ---------- */
body.public .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; max-width: 1080px; margin: 0 auto; }
.top-right { display: flex; gap: 6px; align-items: center; }
.theme-toggle { margin: 0; }
body.public main { max-width: 920px; margin: 0 auto; padding: 4px 20px 64px; }
body.public main > .page-head { display: block; }
body.public main > .page-head p { color: var(--ink-2); margin-top: 8px; max-width: 62ch; }
body.public .project { margin-top: 28px; }

.landing { max-width: 680px; margin: 0 auto; padding: 16px 20px 72px; }
.lp-agent-hint { font-size: 0.8125rem; color: var(--muted); margin: 0 0 28px; }
.lp-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 44px; }
.lp-compare figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.lp-compare figcaption { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.lp-bubble { background: var(--pane); border: 1px solid var(--line); border-radius: 18px 18px 18px 4px; padding: 14px 16px; font-size: 0.8125rem; line-height: 1.5; color: var(--ink-2); flex: 1; }
.lp-widget { background: radial-gradient(70% 55% at 100% 100%, rgb(247 150 80 / 0.85), transparent 70%), linear-gradient(155deg, #141c33 0%, #22335e 60%, #3a5390 100%); color: #fff; border-radius: var(--r-card); padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.lp-w-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.8125rem; color: rgb(255 255 255 / 0.8); }
.lp-pill { background: rgb(255 255 255 / 0.16); border-radius: 999px; padding: 2px 9px; font-size: 0.6875rem; }
.lp-num { font-size: 2.25rem; font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.lp-bar { height: 7px; border-radius: 999px; background: rgb(255 255 255 / 0.18); overflow: hidden; }
.lp-bar i { display: block; height: 100%; background: #fff; border-radius: 999px; }
.lp-checks { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.75rem; }
.lp-checks li { padding: 3px 9px; border-radius: 999px; border: 1px solid rgb(255 255 255 / 0.25); color: rgb(255 255 255 / 0.7); }
.lp-checks li.done { background: rgb(255 255 255 / 0.9); color: #19191b; border-color: transparent; }
.lp-checks li.half { background: rgb(255 255 255 / 0.3); color: #fff; border-color: transparent; }
.lp-checks li.blocked { border-color: #f79650; color: #ffd2b0; }
.lp-why ol { margin: 12px 0 0; padding-left: 1.25em; display: grid; gap: 10px; color: var(--ink-2); }
.lp-why strong, .lp-points strong { color: var(--ink); font-weight: 500; }
.lp-points { margin: 12px 0 0; padding-left: 1.1em; display: grid; gap: 8px; color: var(--ink-2); }
.agent-block > p { margin-top: 8px; color: var(--ink-2); }
@media (max-width: 560px) { .lp-compare { grid-template-columns: 1fr; } }
.lp-uses, .lp-layouts { margin-top: 44px; }
.lp-sub { color: var(--ink-2); margin: 6px 0 0; }
.lp-use-grid, .lp-layout-grid { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lp-use { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--pane); }
.lp-use strong, .lp-layout strong { font-weight: 500; color: var(--ink); }
.lp-use span, .lp-layout > span:not(.lp-thumb) { font-size: 0.875rem; color: var(--ink-2); }
.lp-use a { font-size: 0.8125rem; margin-top: 4px; }
.lp-layout { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 14px; border: 1px solid var(--line); border-radius: var(--r-card); color: inherit; text-decoration: none; height: 100%; }
.lp-layout:hover { border-color: var(--ink-2); }
/* Wireframe thumbnails: five blocks arranged the way each layout arranges the work. */
.lp-thumb { display: grid; gap: 5px; height: 96px; padding: 8px; margin-bottom: 8px; border-radius: 10px; background: var(--pane); }
.lp-thumb i { display: block; border-radius: 4px; background: var(--line); }
.lp-thumb-board { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
.lp-thumb-board i:nth-child(1) { grid-row: span 3; background: linear-gradient(155deg, #22335e, #3a5390); }
.lp-thumb-board i:nth-child(5) { display: none; }
.lp-thumb-lanes { grid-template-columns: repeat(3, 1fr); grid-template-rows: 2fr 1fr; }
.lp-thumb-lanes i:nth-child(1) { background: var(--needs-wash); outline: 1px solid var(--needs); }
.lp-thumb-lanes i:nth-child(4) { grid-column: span 2; }
.lp-thumb-notebook { grid-template-columns: 1fr 4fr; grid-auto-rows: 1fr; padding-inline: 18%; }
.lp-thumb-notebook i:nth-child(odd) { background: transparent; border-top: 2px solid var(--line); border-radius: 0; }
.lp-thumb-notebook i:nth-child(2) { background: var(--needs-wash); }
.lp-thumb-notebook i:nth-child(5) { grid-column: 2; }
.lp-thumb-briefing { grid-template-rows: 2fr 1.4fr 1fr 1fr; padding-inline: 14%; }
.lp-thumb-briefing i:nth-child(1) { width: 85%; background: var(--ink-2); opacity: 0.35; }
.lp-thumb-briefing i:nth-child(2) { background: var(--needs-wash); outline: 1px solid var(--needs); }
.lp-thumb-briefing i:nth-child(4) { width: 70%; }
.lp-thumb-briefing i:nth-child(5) { display: none; }
@media (max-width: 560px) { .lp-use-grid { grid-template-columns: 1fr; } }
body.public main.example { max-width: 1240px; }
.example-note { font-size: 0.875rem; color: var(--ink-2); background: var(--pane); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 14px; margin: 0 0 20px; }
.example-note strong { color: var(--ink); font-weight: 500; }
.landing h1 { font-size: clamp(2rem, 7vw, 3rem); font-weight: 400; letter-spacing: -0.03em; }
.landing .lede { font-size: 1.125rem; color: var(--ink-2); margin: 14px 0 28px; max-width: 34em; }
.landing section + section { margin-top: 36px; }
.landing code { font-size: 0.875em; }
.landing .agent-block { background: var(--pane); border-radius: var(--r-card); padding: 20px; border: 1px solid var(--line); }
.landing .agent-block pre { white-space: pre-wrap; font-size: 0.8125rem; margin: 10px 0 0; }

.doc { background: var(--pane); padding: 28px; border-radius: var(--r-card); border: 1px solid var(--line); }
.doc .prose { max-width: 78ch; }
.doc pre { white-space: pre-wrap; }

@media (prefers-reduced-motion: no-preference) {
  .widget.focus { animation: settle 900ms ease-out 1; }
  @keyframes settle { from { box-shadow: 0 0 0 5px var(--accent-wash); } to { box-shadow: var(--shadow); } }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
@media (forced-colors: active) {
  .mk-line { stroke: CanvasText; } .mk-fill { fill: CanvasText; } .meter span { background: Highlight; }
  .nav-item[aria-current="page"] { outline: 2px solid Highlight; }
}

/* ======================= Notebook ======================= */
:root:not([data-theme="dark"]) body:has(.ly-notebook) {
  --page: #fdfdfb; --pane: #fdfdfb; --pane-2: #f1f3f7;
  --ink: #1e2a44; --ink-2: #45506a; --muted: #6e7688;
  --line: #e1e5ee; --line-strong: #c9d0de;
  --accent: #2747a8; --accent-wash: #e8ecf8; --primary: #1e2a44;
  --nb-rule: #e6a3a3; --nb-mark: #ffe96b;
}
body:has(.ly-notebook) { --font: "Atkinson Hyperlegible", system-ui, sans-serif; --nb-serif: "Literata", Georgia, serif; }
.ly-notebook { --nb-margin: 128px; max-width: 860px; }
.nb-head { padding: 8px 0 30px calc(var(--nb-margin) + 29px); }
.nb-crumb { font-size: 0.875rem; color: var(--muted); }
.nb-crumb a { color: inherit; }
.nb-head h1 { font-family: var(--nb-serif); font-weight: 600; font-size: clamp(2rem, 4.4vw, 2.75rem); letter-spacing: -0.02em; line-height: 1.1; margin-top: 6px; }
.nb-lede { font-family: var(--nb-serif); font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); margin-top: 10px; max-width: 34em; }
/* The page: a margin rule runs its full height, entries hang off it. */
.nb-page { position: relative; }
.nb-page::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--nb-margin) + 14px); width: 1.5px; background: var(--nb-rule); }
.nb-entry { display: grid; grid-template-columns: var(--nb-margin) minmax(0, 1fr); column-gap: 29px; padding: 26px 0 30px; border-top: 1px solid var(--line); }
.nb-margin { display: grid; align-content: start; gap: 2px; text-align: right; font-size: 0.8125rem; line-height: 1.4; color: var(--muted); padding-top: 4px; }
.nb-body { min-width: 0; font-family: var(--nb-serif); font-size: 1.0625rem; line-height: 1.6; max-width: 40em; }
.nb-entry-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.nb-entry-head h2 { font-family: var(--nb-serif); font-size: 1.3125rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.nb-entry-head h2 a { color: var(--ink); text-decoration: none; }
.nb-entry-head h2 a:hover { text-decoration: underline; }
.nb-body .prose { font-size: 1.0625rem; line-height: 1.65; }
.nb-body .prose h3 { font-family: var(--nb-serif); font-size: 1.125rem; font-weight: 600; }
.nb-body .data-table, .nb-body .w-chart, .nb-body .tl, .nb-body .w-media, .nb-body .table-count, .nb-body .hero-num { font-family: var(--font); }
.nb-body .data-table { font-size: 0.9375rem; }
/* Atkinson slashes its zeros; prices and times read better in the serif's figures. */
.nb-body .num, .nb-body .tl-event time, .nb-metrics dd, .nb-body .legend-val, .nb-body .hero-num { font-family: var(--nb-serif); font-variant-numeric: lining-nums tabular-nums; }
.nb-body .hero-num { font-size: 1rem; font-weight: 700; letter-spacing: 0; margin: 0; }
.nb-body .hero-num .hero-unit { font-size: 1em; color: var(--ink-2); font-weight: 400; }
.nb-body .w-tasklist > .meter { display: none; }
.nb-body .task { border-top: 0; padding: 4px 0; }
.nb-body .task-icon { background: none; border: 1.5px solid var(--line-strong); width: 22px; height: 22px; margin-top: 3px; font-family: var(--font); }
.nb-body .task-done .task-icon { border-color: transparent; background: none; color: var(--good-ink); }
.nb-body .task-note { font-family: var(--font); font-size: 0.875rem; }
.nb-body .task-flag { font-family: var(--font); }
.nb-state { font-family: var(--font); font-size: 0.9375rem; font-weight: 700; color: var(--ink-2); }
.nb-summary { font-size: 1.5rem; line-height: 1.35; letter-spacing: -0.01em; margin: 6px 0 14px; }
.nb-status .meter { max-width: 26em; height: 6px; }
.nb-metrics { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 16px 0 0; font-family: var(--font); }
.nb-metrics dt { font-size: 0.8125rem; color: var(--muted); }
.nb-metrics dd { margin: 0; font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.nb-delta { font-weight: 400; color: var(--muted); font-size: 0.875rem; }
/* The one loud thing: the question for you, marked with a highlighter. */
.nb-needs { font-weight: 700; color: var(--ink); }
.nb-question { font-size: 1.5rem; line-height: 1.45; letter-spacing: -0.01em; margin-bottom: 12px; }
.nb-question mark {
  color: var(--ink); background: linear-gradient(100deg, transparent 0 0.25em, var(--nb-mark) 0.25em calc(100% - 0.2em), transparent calc(100% - 0.2em));
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 0.3em;
}
.nb-options { margin-top: 12px; color: var(--ink-2); }
.nb-options q { color: var(--ink); font-weight: 600; }
.ly-notebook .tabs { margin: 8px 0 0 calc(var(--nb-margin) + 29px); }
.ly-notebook .widget-menu summary { border-color: transparent; }
@container content (max-width: 700px) {
  .ly-notebook { --nb-margin: 0px; }
  .nb-head { padding-left: 18px; }
  .nb-page::before { left: 0; }
  .nb-entry { grid-template-columns: minmax(0, 1fr); column-gap: 0; padding-left: 18px; }
  .nb-margin { text-align: left; grid-auto-flow: column; justify-content: start; gap: 10px; padding: 0 0 6px; }
  .ly-notebook .tabs { margin-left: 18px; }
}

/* ======================= Lanes ======================= */
:root:not([data-theme="dark"]) body:has(.ly-lanes) {
  --page: #e4e7ec; --pane: #ffffff; --pane-2: #eef0f3;
  --ink: #16181d; --ink-2: #3f4450; --muted: #5f6573;
  --line: #d9dde4; --line-strong: #c3c8d1;
  --accent: #2b59d9; --accent-wash: #e6ecfb; --primary: #16181d;
  --ln-needs: #c2410c; --ln-needs-ink: #ffffff;
}
:root[data-theme="dark"] body:has(.ly-lanes) { --ln-needs: #c2410c; --ln-needs-ink: #ffffff; }
body:has(.ly-lanes) { --font: "Schibsted Grotesk", system-ui, sans-serif; font-size: 15px; }
/* Schibsted's tabular figures space out commas and colons; proportional figures read cleaner. */
.ly-lanes .num, .ly-lanes .legend-val, .ly-lanes .tl-event time, .ly-lanes .tick { font-variant-numeric: proportional-nums; }
.ln-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 40px; flex-wrap: wrap; margin: 4px 0 22px; }
.ln-crumb { font-size: 0.875rem; color: var(--muted); }
.ln-head h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1; margin-top: 6px; }
.ln-progress { flex: 0 1 380px; display: grid; gap: 8px; }
.ln-progress p { color: var(--ink-2); }
.ln-progress strong { color: var(--ink); font-weight: 700; margin-right: 4px; font-variant-numeric: tabular-nums; }
.ln-lanes { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 12px; align-items: start; }
.ln-lane { border-radius: 18px; padding: 18px 20px 20px; background: var(--pane); min-width: 0; }
.ln-lane h2 { display: flex; align-items: center; gap: 10px; font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 14px; }
.ln-count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 0.8125rem; font-weight: 700; background: var(--pane-2); font-variant-numeric: tabular-nums; }
/* The one loud thing: the lane of what's waiting on you. */
.ln-needs { background: var(--ln-needs); color: var(--ln-needs-ink); }
.ln-needs .ln-count { background: rgb(255 255 255 / 0.2); color: inherit; }
.ln-needs.is-empty { background: var(--pane); color: var(--ink); }
.ln-needs.is-empty .ln-count { background: var(--pane-2); }
.ln-ask + .ln-ask, .ln-ask + .ln-items { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgb(255 255 255 / 0.25); }
.ln-ask-q { font-size: 1.375rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
.ln-ask .prose { color: inherit; margin-top: 8px; opacity: 0.92; }
.ln-ask .prose code { background: rgb(255 255 255 / 0.18); }
.ln-reply { font-size: 0.8125rem; margin-top: 14px; opacity: 0.85; }
.ln-options { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ln-options li { background: #fff; color: var(--ink); border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 0.9375rem; }
.ln-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ln-items li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; line-height: 1.35; }
.ln-items li + li { border-top: 1px solid var(--line); }
.ln-needs .ln-items li + li { border-top-color: rgb(255 255 255 / 0.25); }
.ln-mark { flex: none; width: 1em; font-size: 0.8125rem; color: var(--muted); }
.ln-needs .ln-mark { color: inherit; }
.ln-moving .ln-mark { color: var(--accent); }
.ln-done { background: transparent; border: 1.5px solid var(--line-strong); }
.ln-done .ln-items li { color: var(--ink-2); }
.ln-done .ln-mark { color: var(--good-ink); }
.ln-more { color: var(--muted); font-size: 0.875rem; }
.ln-empty { color: var(--muted); }
.ln-needs:not(.is-empty) .ln-empty { color: inherit; }
.ly-lanes .tabs { margin-top: 26px; }
.ln-sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); grid-auto-flow: row dense; gap: 12px; margin-top: 26px; align-items: start; }
.ly-lanes .tabs + .ln-sheets { margin-top: 0; }
.ln-sheet { background: var(--pane); border-radius: 6px; padding: 18px 20px 20px; min-width: 0; }
.ln-sheet.is-wide { grid-column: span 2; }
.ln-sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.ln-sheet-head h3 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; }
.ln-sheet-head h3 a { color: var(--ink); text-decoration: none; }
.ln-sheet-head h3 a:hover { text-decoration: underline; }
.ln-when { font-size: 0.8125rem; color: var(--muted); margin-top: 2px; }
@container content (max-width: 860px) {
  .ln-lanes { grid-template-columns: minmax(0, 1fr); }
}
@container content (max-width: 700px) {
  .ln-sheet.is-wide { grid-column: auto; }
}

/* ======================= Briefing ======================= */
:root:not([data-theme="dark"]) body:has(.ly-briefing) {
  --page: #f2f5fa; --pane: #ffffff; --pane-2: #eaeef5;
  --ink: #18223a; --ink-2: #46506a; --muted: #636d82;
  --line: #dce2ec; --line-strong: #c4ccda;
  --accent: #2f6bf2; --accent-wash: #e5edfe; --primary: #18223a;
}
body:has(.ly-briefing) { --font: "Public Sans", system-ui, sans-serif; --br-serif: "Young Serif", Georgia, serif; font-size: 15px; }
.ly-briefing { max-width: 1120px; }
.br-head { max-width: 46rem; padding: 10px 0 34px; }
.br-from { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 0.9375rem; }
.br-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--page); font-weight: 600; flex: none; }
/* The headline is the agent's own one-line summary of where things stand. */
.br-headline { font-family: var(--br-serif); font-weight: 400; font-size: clamp(2.125rem, 5vw, 3.5rem); line-height: 1.08; letter-spacing: -0.02em; margin-top: 18px; max-width: 18ch; text-wrap: balance; }
.br-standing { margin-top: 22px; display: grid; gap: 10px; max-width: 34rem; }
.br-standing > p { font-weight: 500; color: var(--ink-2); }
.br-standing .meter { height: 6px; }
.br-metrics { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 6px 0 0; }
.br-metrics dt { font-size: 0.8125rem; color: var(--muted); }
.br-metrics dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
/* The one loud thing: your answer, shaped like the chat message you'll send. */
.br-ask { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px 40px; align-items: end; background: var(--pane); border-radius: 24px; padding: 28px 30px; margin-bottom: 14px; }
.br-ask-q { font-family: var(--br-serif); font-size: clamp(1.375rem, 2.6vw, 1.75rem); line-height: 1.25; }
.br-ask .prose { margin-top: 12px; color: var(--ink-2); }
.br-replies { display: grid; justify-items: end; gap: 8px; }
.br-replies ul { list-style: none; margin: 0; padding: 0; display: grid; justify-items: end; gap: 6px; }
.br-replies li { background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 20px 20px 6px 20px; font-weight: 500; max-width: 100%; }
.br-replies li + li { border-radius: 20px 6px 6px 20px; }
.br-replies li:last-child:not(:first-child) { border-radius: 20px 6px 20px 20px; }
.br-replies p { font-size: 0.8125rem; color: var(--muted); }
.br-lately { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 4px 20px; padding: 24px 0 8px; }
.br-lately h2 { font-family: var(--br-serif); font-weight: 400; font-size: 1.25rem; }
.br-lately ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.br-ev { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; }
.br-ev time { color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; padding-top: 1px; }
.br-ev-warning span::before, .br-ev-error span::before { content: "▲ "; color: var(--serious-ink); font-size: 0.75em; }
.ly-briefing .tabs { margin-top: 24px; }
.br-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; margin-top: 28px; }
.ly-briefing .tabs + .br-body { margin-top: 8px; }
.br-body.no-side { grid-template-columns: minmax(0, 1fr); }
.br-main { display: grid; gap: 0; min-width: 0; }
.br-section { min-width: 0; }
.br-all { grid-column: 2; font-size: 0.875rem; margin-top: 6px; }
.br-main .br-section { padding: 22px 0 28px; border-top: 1px solid var(--line); }
.br-main .br-section:first-child { border-top: 0; padding-top: 0; }
.br-side { display: grid; gap: 12px; min-width: 0; }
.br-side .br-section { background: var(--pane); border-radius: 16px; padding: 18px 20px 20px; }
.br-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.br-section-head h2 { font-family: var(--br-serif); font-weight: 400; font-size: 1.375rem; letter-spacing: -0.01em; line-height: 1.2; }
.br-side .br-section-head h2 { font-size: 1.125rem; }
.br-section-head h2 a { color: var(--ink); text-decoration: none; }
.br-section-head h2 a:hover { text-decoration: underline; }
.br-when { font-size: 0.8125rem; color: var(--muted); margin-top: 4px; }
.br-main .prose { font-size: 1rem; line-height: 1.65; }
.br-main .data-table tbody th { background: var(--page); }
@container content (max-width: 860px) {
  .br-body { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .br-ask { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; }
  .br-lately { grid-template-columns: minmax(0, 1fr); }
  .br-all { grid-column: auto; }
}
@container content (max-width: 520px) {
  .br-ev { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
