/* Hivemill web UI (G-019 B2). Tokens v2 copied verbatim from docs/design/g-019/mock.css (T-0429 note 2). Local CSS only; Inter is self-hosted (T-0711); JetBrains Mono applies once vendored, else the system fonts. */
/* == fonts == */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/Inter-Bold.woff2") format("woff2"); }
/* == tokens v2 == */
:root {
  --surface-0: #F2F2F7;
  --surface-1: #FFFFFF;
  --surface-2: #FFFFFF;
  --fill: #EDEDF0;
  --text-1: #1D1D1F;
  --text-2: #48484D;
  --text-3: #636368;
  --hairline: #E0E0E5;
  --border: #7C7C82;
  --accent: #0066CC;
  --accent-solid: #0071E3;
  --track: #F0F0F3;
  --data-1: #0071E3;
  --data-2: #7C7C82;
  --neutral-fg: #55555A;
  --neutral-bg: #EDEDF0;
  --neutral-solid: #7C7C82;
  --info-fg: #0058B0;
  --info-bg: #E5F0FC;
  --info-solid: #0071E3;
  --success-fg: #1A7034;
  --success-bg: #E5F4E9;
  --success-solid: #1F9446;
  --warning-fg: #8A5300;
  --warning-bg: #FCF1DC;
  --warning-solid: #C27C00;
  --danger-fg: #B42318;
  --danger-bg: #FDECEA;
  --danger-solid: #D92D20;
  --review-fg: #6B3FC4;
  --review-bg: #F1ECFB;
  --review-solid: #8250DF;
  --org-claude-fg: #A3401A;
  --org-claude-bg: #FBEDE5;
  --org-claude-solid: #C9562A;
  --org-cursor-fg: #0B6670;
  --org-cursor-bg: #E2F3F4;
  --org-cursor-solid: #138C99;
  --e1: 0 1px 2px rgba(0, 0, 0, .05);
  --e2: 0 4px 16px rgba(0, 0, 0, .08), 0 0 0 1px var(--hairline);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --surface-0: #000000;
    --surface-1: #1C1C1E;
    --surface-2: #2C2C2E;
    --fill: #2C2C2E;
    --text-1: #F5F5F7;
    --text-2: #C7C7CC;
    --text-3: #A1A1A6;
    --hairline: #38383A;
    --border: #7C7C80;
    --accent: #4DA3FF;
    --accent-solid: #0A84FF;
    --track: #333336;
    --data-1: #0A84FF;
    --data-2: #8E8E93;
    --neutral-fg: #C7C7CC;
    --neutral-bg: #2C2C2E;
    --neutral-solid: #8E8E93;
    --info-fg: #6CB4FF;
    --info-bg: #0A2540;
    --info-solid: #0A84FF;
    --success-fg: #5FD38A;
    --success-bg: #0F2E1B;
    --success-solid: #30B35A;
    --warning-fg: #FFC65C;
    --warning-bg: #3A2700;
    --warning-solid: #E0A100;
    --danger-fg: #FF8A80;
    --danger-bg: #3D1411;
    --danger-solid: #FF5A4F;
    --review-fg: #C4A7FF;
    --review-bg: #2A1F45;
    --review-solid: #A57DFF;
    --org-claude-fg: #FFA27D;
    --org-claude-bg: #3A1C10;
    --org-claude-solid: #E0784D;
    --org-cursor-fg: #5CD0DB;
    --org-cursor-bg: #0A2D31;
    --org-cursor-solid: #2BB3C0;
    --e1: 0 0 0 1px var(--hairline);
    --e2: 0 0 0 1px var(--hairline);
    color-scheme: dark;
  }
}

:root[data-theme=dark] {
  --surface-0: #000000;
  --surface-1: #1C1C1E;
  --surface-2: #2C2C2E;
  --fill: #2C2C2E;
  --text-1: #F5F5F7;
  --text-2: #C7C7CC;
  --text-3: #A1A1A6;
  --hairline: #38383A;
  --border: #7C7C80;
  --accent: #4DA3FF;
  --accent-solid: #0A84FF;
  --track: #333336;
  --data-1: #0A84FF;
  --data-2: #8E8E93;
  --neutral-fg: #C7C7CC;
  --neutral-bg: #2C2C2E;
  --neutral-solid: #8E8E93;
  --info-fg: #6CB4FF;
  --info-bg: #0A2540;
  --info-solid: #0A84FF;
  --success-fg: #5FD38A;
  --success-bg: #0F2E1B;
  --success-solid: #30B35A;
  --warning-fg: #FFC65C;
  --warning-bg: #3A2700;
  --warning-solid: #E0A100;
  --danger-fg: #FF8A80;
  --danger-bg: #3D1411;
  --danger-solid: #FF5A4F;
  --review-fg: #C4A7FF;
  --review-bg: #2A1F45;
  --review-solid: #A57DFF;
  --org-claude-fg: #FFA27D;
  --org-claude-bg: #3A1C10;
  --org-claude-solid: #E0784D;
  --org-cursor-fg: #5CD0DB;
  --org-cursor-bg: #0A2D31;
  --org-cursor-solid: #2BB3C0;
  --e1: 0 0 0 1px var(--hairline);
  --e2: 0 0 0 1px var(--hairline);
  color-scheme: dark;
}

/* == B2 scale and type == */
:root {
  --font: "Inter", system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-full: 999px;
  --t-fast: 120ms; --t-base: 180ms;
  --gutter: 16px; --row: 44px; --tabbar: 56px; --card-pad: 12px; --tap: 44px;
}

/* == base == */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface-0); color: var(--text-1); font: 400 14px/20px var(--font); }
h1, h2, p { margin: 0; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
button { font: inherit; color: inherit; }
h1 { font: 600 22px/28px var(--font); letter-spacing: -.01em; text-wrap: balance; }
.mono { font: 400 12.5px/18px var(--mono); }
.muted, .empty { color: var(--text-2); }
.stale { opacity: .75; font-style: italic; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -100px; z-index: 50; background: var(--surface-2); color: var(--text-1); padding: 8px 12px; border-radius: var(--r-sm); box-shadow: var(--e2); }
.skip:focus { top: 8px; }
summary { cursor: pointer; min-height: var(--tap); display: list-item; list-style-position: inside; }

/* == status tones and glyphs == */
.fg-neutral { color: var(--neutral-fg); } .fg-info { color: var(--info-fg); } .fg-success { color: var(--success-fg); }
.fg-warning { color: var(--warning-fg); } .fg-danger { color: var(--danger-fg); } .fg-review { color: var(--review-fg); }
.gs-neutral { color: var(--neutral-solid); } .gs-info { color: var(--info-solid); } .gs-success { color: var(--success-solid); }
.gs-warning { color: var(--warning-solid); } .gs-danger { color: var(--danger-solid); } .gs-review { color: var(--review-solid); }
.tone-neutral { background: var(--neutral-bg); color: var(--neutral-fg); }
.tone-info { background: var(--info-bg); color: var(--info-fg); }
.tone-success { background: var(--success-bg); color: var(--success-fg); }
.tone-warning { background: var(--warning-bg); color: var(--warning-fg); }
.tone-danger { background: var(--danger-bg); color: var(--danger-fg); }
.tone-review { background: var(--review-bg); color: var(--review-fg); }
.g { flex: none; display: inline-block; vertical-align: -2px; }
.st { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.st--pill { height: 20px; padding: 0 8px; border-radius: var(--r-full); font: 500 12px/16px var(--font); }

/* == app shell == */
.app { min-height: 100vh; }
.sidebar { display: none; }
.topbar { position: sticky; top: 0; z-index: 20; height: 52px; display: flex; align-items: center; justify-content: space-between;
          padding: 0 var(--gutter); background: var(--surface-0); box-shadow: 0 1px 0 var(--hairline); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font: 600 15px/20px var(--font); color: var(--text-1); }
.wordmark:hover { text-decoration: none; }
.wordmark svg { color: var(--accent-solid); }
.main { padding-bottom: calc(var(--tabbar) + 24px); min-width: 0; }
.page { padding: 0 var(--gutter); overflow-wrap: break-word; min-width: 0; }
.shellbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px var(--gutter) 12px; }
.titlebar { min-width: 0; flex: 1; max-width: 100%; }
@media (min-width: 640px) {
  .shellbar--task { flex-wrap: wrap; align-items: flex-end; }
  .shellbar--task .titlebar { flex: 1 1 100%; min-width: 0; }
  .shellbar--task .cluster { flex: 1 1 100%; justify-content: flex-end; }
  .shellbar--task .titlebar h1 { overflow-wrap: anywhere; word-break: normal; }
}
.tblock--wide { max-width: 100%; }
.tblock--wide .crumbs + .metarow { max-width: 100%; }
.only-phone { display: none; }
.hide-phone { display: inline; }
@media (min-width: 640px) {
  .hide-phone.changelog-line-note { display: block; }
}
@media (max-width: 639px) {
  .only-phone { display: block; }
  .hide-phone { display: none; }
}
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; line-height: 18px; color: var(--text-3); margin-bottom: 4px; }
.crumbs a { color: var(--text-3); }
.crumbs [aria-current] { color: var(--text-2); }
.sep { color: var(--text-3); }
.cluster { display: flex; align-items: center; gap: 12px; flex: none; }
.updated { font: 500 12px/16px var(--font); color: var(--text-3); white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-full);
        font: 500 12px/16px var(--font); white-space: nowrap; }
.pill:hover, .badge:hover { text-decoration: none; }
.pill-dot { padding: 0; width: 24px; justify-content: center; }
.cluster .hide-phone { display: none; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
         border-radius: var(--r-full); font: 500 12px/16px var(--font); background: var(--fill); color: var(--text-2); }
.count--bad { background: var(--danger-bg); color: var(--danger-fg); }
.navgroup h2 { font: 500 12px/16px var(--font); color: var(--text-3); padding: 0 12px; margin: 16px 0 4px; }
.navgroup ul, .more ul { list-style: none; margin: 0; padding: 0; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: var(--r-sm);
            font: 400 13px/18px var(--font); color: var(--text-2); transition: background-color var(--t-fast); }
.nav-item:hover { background: var(--fill); text-decoration: none; }
.nav-item--active, .nav-item--active:hover { background: var(--info-bg); color: var(--info-fg); }
.nav-item .count { margin-left: auto; }
.themebox { padding: 12px 8px 16px; margin-top: auto; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 2px; gap: 2px; background: var(--surface-0); }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex: 1; min-height: 28px; padding: 0 4px;
              background: transparent; border: 0; border-radius: 4px; color: var(--text-2); font: 400 13px/18px var(--font);
              cursor: pointer; transition: background-color var(--t-fast), color var(--t-fast); touch-action: manipulation; }
.seg button[aria-pressed=true] { background: var(--surface-1); color: var(--text-1); box-shadow: var(--e1); }
.seg-fill { display: flex; width: 100%; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
          height: var(--tabbar); padding-bottom: env(safe-area-inset-bottom); background: var(--surface-2); box-shadow: var(--e2); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-2);
       font: 500 11px/14px var(--font); min-height: 44px; position: relative; }
.tab:hover { text-decoration: none; }
.tab.is-current { color: var(--info-fg); }
.tab .count { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; font-size: 11px; }
.more { display: none; padding: 24px var(--gutter) 0; }
.more:target { display: block; }
.more h2 { font: 500 12px/16px var(--font); color: var(--text-3); margin: 16px 0 8px; }
.more ul { background: var(--surface-1); border-radius: var(--r-md); box-shadow: var(--e1); }
.more li { position: relative; }
.more li + li::before { content: ""; position: absolute; top: 0; left: 12px; right: 0; height: 1px; background: var(--hairline); }
.more a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; color: var(--text-1); }
.more a.is-current { color: var(--info-fg); }
.more .seg span { display: none; }

/* == shared content components (legacy markup restyled with tokens v2) == */
.card { background: var(--surface-1); border-radius: var(--r-md); box-shadow: var(--e1); padding: var(--card-pad);
        margin: var(--s4) 0; overflow-x: auto; max-width: 100%; }
.card-title { font: 600 15px/20px var(--font); margin: 0 0 var(--s2); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin: var(--s3) 0; }
.grid a { text-decoration: none; color: inherit; display: block; border-radius: var(--r-md); }
.grid a:hover .kpi { background: var(--fill); }
.kpi { background: var(--surface-1); border-radius: var(--r-md); box-shadow: var(--e1); padding: var(--card-pad); min-width: 0; height: 100%; }
.kpi-label { color: var(--text-3); font: 500 12px/16px var(--font); }
.kpi-note { color: var(--text-2); font-size: 13px; line-height: 18px; margin: var(--s2) 0 0; overflow-wrap: anywhere; }
.kpi-value { font: 600 20px/26px var(--font); font-variant-numeric: tabular-nums; }
.table { border-collapse: collapse; width: 100%; font-size: 14px; }
.table th, .table td { text-align: left; padding: var(--s2) var(--s3); height: var(--row); border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.table th { color: var(--text-3); font: 500 12px/16px var(--font); white-space: nowrap; }
.table tbody tr:hover { background: var(--fill); }
.table--compact th, .table--compact td { padding: var(--s1) var(--s2); height: auto; }
.badge { display: inline-block; padding: 0 var(--s2); border-radius: var(--r-full); font: 500 12px/20px var(--font); white-space: nowrap; }
.badge--ok { color: var(--success-fg); background: var(--success-bg); }
.badge--warn { color: var(--warning-fg); background: var(--warning-bg); }
.badge--bad { color: var(--danger-fg); background: var(--danger-bg); }
.badge--info { color: var(--info-fg); background: var(--info-bg); }
.badge--muted { color: var(--neutral-fg); background: var(--neutral-bg); }
.status--todo, .status--cancelled, .status--exited, .status--stopped, .status--proposed { color: var(--neutral-fg); background: var(--neutral-bg); }
.status--in_progress, .status--planning, .status--active { color: var(--info-fg); background: var(--info-bg); }
.status--in_review { color: var(--review-fg); background: var(--review-bg); }
.status--done, .status--live { color: var(--success-fg); background: var(--success-bg); }
.status--queued { color: var(--warning-fg); background: var(--warning-bg); }
.status--blocked, .status--lost { color: var(--danger-fg); background: var(--danger-bg); }
.bar { height: 1.4em; min-width: 80px; border: 1px solid var(--border); border-radius: 4px; position: relative; overflow: hidden;
       background: linear-gradient(90deg, var(--info-bg) var(--v, 0%), var(--track) var(--v, 0%)); }
.bar--0 { --v:0%; }
.bar--5 { --v:5%; }
.bar--10 { --v:10%; }
.bar--15 { --v:15%; }
.bar--20 { --v:20%; }
.bar--25 { --v:25%; }
.bar--30 { --v:30%; }
.bar--35 { --v:35%; }
.bar--40 { --v:40%; }
.bar--45 { --v:45%; }
.bar--50 { --v:50%; }
.bar--55 { --v:55%; }
.bar--60 { --v:60%; }
.bar--65 { --v:65%; }
.bar--70 { --v:70%; }
.bar--75 { --v:75%; }
.bar--80 { --v:80%; }
.bar--85 { --v:85%; }
.bar--90 { --v:90%; }
.bar--95 { --v:95%; }
.bar--100 { --v:100%; }
.bar span { position: relative; padding-left: var(--s2); font: 500 12px/18px var(--mono); color: var(--text-1); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 var(--s3); border-left: 1px solid var(--hairline); }
.timeline-item { padding: var(--s1) 0 var(--s1) var(--s2); }

@media (pointer: coarse) {
  .table a, .timeline a { display: inline-flex; align-items: center; min-height: var(--tap); }
}

/* == >= 640: large phone, sidebar becomes a strip under the top bar == */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .cluster .hide-phone { display: inline-flex; }
  .topbar-right .badge { display: none; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .sidebar { display: flex; flex-wrap: wrap; gap: 0 16px; padding: 4px var(--gutter); background: var(--surface-0); box-shadow: 0 1px 0 var(--hairline); }
  .sidebar .wordmark, .sidebar .navgroup h2, .sidebar .themebox { display: none; }
  .sidebar .navgroup ul { display: flex; gap: 4px; }
  .tabbar, .more, .more:target { display: none; }
  .main { padding-bottom: 32px; }
}

/* == >= 1024: sidebar. Desktop air: row 36 -> 40 px, card padding 12 -> 16 px (owner M7206 #3) == */
@media (min-width: 1024px) {
  :root { --gutter: 24px; --row: 40px; --card-pad: 16px; --tap: 36px; }
  .app { display: grid; grid-template-columns: 232px minmax(0, 1fr); }
  .sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 16px 8px 0;
             background: var(--surface-0); box-shadow: 1px 0 0 var(--hairline); overflow-y: auto; }
  .sidebar .wordmark { padding: 0 12px; height: 36px; }
  .topbar, .tabbar, .more, .more:target { display: none; }
  .main { padding-bottom: 32px; }
  .shellbar { position: sticky; top: 0; z-index: 20; background: var(--surface-0); min-height: 56px; }
  h1 { font-size: 28px; line-height: 34px; }
}
@media (min-width: 1440px) {
  .page, .shellbar { max-width: 1240px; margin-left: auto; margin-right: auto; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* == B3 lists == */
.sect { margin: var(--s4) 0; }
.sect > h2 { font: 600 15px/20px var(--font); margin: 0 0 var(--s2); }
.sect-n, .grp-n, .disc-n, .chip-n { color: var(--text-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.sect-box { background: var(--surface-1); border-radius: var(--r-md); box-shadow: var(--e1); padding: var(--card-pad); overflow-x: auto; max-width: 100%; }
.summary-line { color: var(--text-2); margin: var(--s2) 0; }
.summary-line--warn { color: var(--warning-fg); }
.summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2); }
.disc--i { display: inline-block; }
.disc--i > summary { min-height: 0; }
.emptybox { padding: var(--s3) 0; }

/* filter chips and segmented links */
.facet { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s3); margin: var(--s2) 0; }
.facet-label { color: var(--text-3); font: 500 12px/16px var(--font); min-width: 48px; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 var(--s3); border: 1px solid var(--border);
        border-radius: var(--r-sm); color: var(--text-1); font: 400 13px/18px var(--font); }
.chip:hover { background: var(--fill); text-decoration: none; }
.chip--zero { color: var(--text-3); }
.chip[aria-current=true] { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-solid); }
.chip[aria-current=true] .chip-n { color: var(--info-fg); }
.seg-links { max-width: 100%; overflow-x: auto; }
.seg-links a { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; flex: 1; min-height: var(--tap); padding: 0 var(--s3);
               border-radius: 4px; color: var(--text-2); font: 400 13px/18px var(--font); }
.seg-links--scroll { flex-wrap: nowrap; justify-content: flex-start; }
.seg-links--scroll a { flex: 0 0 auto; }
.seg-links a:hover { text-decoration: none; }
.seg-links a:focus-visible { outline-offset: -2px; }
.seg-links a[aria-current=true] { background: var(--surface-1); color: var(--text-1); box-shadow: var(--e1); }
.changelog-meta { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); max-width: 100%; }

/* disclosure: the native marker stays (design guard); the count sits beside the label */
.disc > summary { font: 600 14px/20px var(--font); }
.disc-n { margin-left: var(--s2); }
.disc > summary .gm, .disc > summary .tm, .disc > summary .tscope { font-weight: 400; }

/* data table: rows keep the --row height (40 px on desktop), phone rows stack */
.dt-wrap { margin: var(--s2) 0; }
.dt { border-collapse: collapse; width: 100%; table-layout: auto; font-size: 14px; }
.dt th, .dt td { text-align: left; padding: 0 var(--s2); min-height: var(--row); border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.dt td { height: var(--row); padding-top: var(--s1); padding-bottom: var(--s1); overflow-wrap: anywhere; }
.dt thead th { color: var(--text-3); font: 500 12px/16px var(--font); white-space: nowrap; padding-top: var(--s2); padding-bottom: var(--s2); }
.dt tbody tr:hover { background: var(--fill); }
.dt .grp, .dt .grp:hover { background: transparent; }
.cl { display: none; }
.dt .grp th { color: var(--text-1); font: 600 13px/18px var(--font); padding-top: var(--s4); border-bottom: 1px solid var(--hairline); }
.dt .num, .dt th.num { text-align: right; }
.dt .ins-wide { }
/* marker: wide breakdown numerics (tokens); phone card layout uses .cl labels instead of hiding columns */
.c-st { width: 24px; }
.c-id { white-space: nowrap; color: var(--text-3); }
.c-title a { color: var(--text-1); }
.c-title a:hover { text-decoration: underline; }
.c-who { color: var(--text-2); }
.c-age { color: var(--text-3); white-space: nowrap; }
.sortlink { color: inherit; }
.sortlink:hover { color: var(--text-1); text-decoration: none; }
th[aria-sort] .sortlink { color: var(--text-1); }
th[aria-sort=ascending] .sortlink::after { content: " \2191"; }
th[aria-sort=descending] .sortlink::after { content: " \2193"; }
.agent-who { overflow-wrap: anywhere; }
.agent-role, .agent-task { color: var(--text-3); }
.agent-task { margin-left: var(--s1); }

/* list rows and feed */
.lrow, .feed-row { display: flex; align-items: center; gap: var(--s3); min-height: var(--row); padding: var(--s1) 0; border-bottom: 1px solid var(--hairline); }
.feed, .lrow-list { list-style: none; margin: 0; padding: 0; }
.lrow-meta { margin-left: auto; display: flex; gap: var(--s3); color: var(--text-2); }
.lrow-id, .feed-sha, .feed-goal { color: var(--text-3); }
.feed-title { flex: 1; min-width: 0; color: var(--text-1); }
.feed-when { color: var(--text-3); white-space: nowrap; }

@media (min-width: 1024px) {
  .dt thead th { position: sticky; top: 4rem; z-index: 5; background: var(--surface-0); }
  .sect-box .dt thead th { position: static; background: transparent; }   /* the box scrolls sideways, so sticky cannot work inside it */
}

@media (max-width: 639px) {
  .dt, .dt tbody { display: block; }
  .dt thead { display: none; }
  .dt tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--hairline); }
  .dt-wrap--cards .dt tbody tr:not(.grp) { gap: var(--s1) var(--s3); padding: var(--s2) var(--s3); margin: 0 0 var(--s2); border-bottom: 0; background: var(--surface-1); border-radius: var(--r-md); }
  .sect-box .dt-wrap--cards .dt tbody tr:not(.grp) { background: var(--surface-0); }
  .cl { display: inline; color: var(--text-3); font-size: 12px; margin-right: var(--s1); }
  .dt td { border: 0; padding: 0; height: auto; }
  .dt .grp { display: block; }
  .dt .grp th { display: block; border: 0; padding: var(--s3) 0 var(--s1); }
  .dt td:empty { display: none; }
  .dt .c-st { width: auto; }
  .dt .c-title { flex: 1 1 calc(100% - 32px); }
  .dt .c-id { order: 1; }
  .dt .c-who, .dt .c-age { order: 2; font-size: 13px; }
  .dt .num { text-align: left; }
  .lrow, .feed-row { flex-wrap: wrap; gap: var(--s1) var(--s3); }
  .feed-title { flex: 1 1 calc(100% - 32px); }
}

/* == B4 overview == */
.ov { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--s4); align-items: start; }
.ov-sect { margin: 0 0 var(--s4); min-width: 0; }
.sect-head { display: flex; align-items: baseline; gap: var(--s2); margin: 0 0 var(--s2); }
.sect-head h2 { font: 600 15px/20px var(--font); }
.sect-link { margin-left: auto; font-size: 13px; }
.more-link { display: block; padding: var(--s2) 0 0; font-size: 13px; }
.ov .sect-box { padding-top: var(--s2); padding-bottom: var(--s2); }
.ov .lrow-list > li { border-bottom: 1px solid var(--hairline); }
.ov .lrow-list > li:last-child { border-bottom: 0; }

/* needs-you rows */
.needs { display: flex; align-items: center; gap: var(--s3); min-height: var(--row); padding: var(--s1) 0; }
.nkind { font: 500 12px/16px var(--font); white-space: nowrap; }
.nsub { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nid { color: var(--text-2); white-space: nowrap; }
.nage { color: var(--text-3); font-size: 12px; white-space: nowrap; }

/* goals */
.goalrow, .gsum { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); padding: var(--s2) 0; }
.gtitle { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gtitle a { color: var(--text-1); }
.chip-p { margin-left: var(--s2); padding: 0 6px; border-radius: var(--r-full); background: var(--fill); color: var(--text-2); font: 500 11px/16px var(--font); }
.gm { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); padding-left: var(--s5); color: var(--text-2); font-size: 13px; }
.gprs, .gact, .gneeds { white-space: nowrap; }
.gneeds { font-weight: 600; }

/* overview tree (F-27): goal > team > task, each level a <details>; one column on a phone */
#needs-you, #goals { grid-column: 1 / -1; }
.goalrow--tree { display: block; padding: 0; }
.gnode > summary { padding: var(--s2) 0; }
.gnode > summary > .gsum, .team > details > summary > .tsum { display: inline-flex; align-items: center; vertical-align: middle; width: calc(100% - 24px); }   /* inline-flex keeps the native marker on the first line */
.teams, .tk { list-style: none; margin: 0; padding: 0 0 var(--s2) var(--s5); }
.team { border-top: 1px solid var(--hairline); }
.team > details > summary, .tsum { padding: var(--s2) 0; }
.tsum { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); }
.team > details > summary .tsum { padding: 0; }
.tscope { flex: 1 1 0; min-width: 12ch; color: var(--text-1); overflow-wrap: anywhere; }
.tm { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); color: var(--text-2); font-size: 13px; }
.tkrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); padding: var(--s1) 0; font-size: 13px; }
.tkrow .gtitle { white-space: normal; flex: 1 1 12ch; }
.tkmeta { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); color: var(--text-2); }
.gact { color: var(--text-3); }

/* meter, gauge: geometry is SVG attributes, colour is a class */
.track { fill: var(--track); }
.fill-data1 { fill: var(--data-1); }
.fill-success { fill: var(--success-solid); }
.fill-warning { fill: var(--warning-solid); }
.fill-danger { fill: var(--danger-solid); }
.fill-neutral { fill: var(--neutral-solid); }
.meter { display: inline-flex; align-items: center; gap: var(--s2); }
.meter-svg { display: block; width: 96px; height: .375rem; border-radius: 3px; flex: none; }
.lbl { font-variant-numeric: tabular-nums; white-space: nowrap; }
.system { display: grid; grid-template-columns: minmax(0, 1fr); }
.gauge-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(104px, auto); align-items: center; gap: var(--s3); min-height: var(--row); }
.gl { color: var(--text-2); font-size: 13px; }
.gauge { display: block; width: 100%; height: .5rem; border-radius: 4px; overflow: hidden; }
.gauge-stack { display: grid; gap: var(--s1); }
.tick { stroke: var(--text-1); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.gv { display: flex; flex-direction: column; text-align: right; font: 500 13px/16px var(--font); font-variant-numeric: tabular-nums; }
.gv > span { color: var(--text-3); font-weight: 400; font-size: 12px; }
.gz { font-weight: 600; }

/* sparkline and column chart */
.ov-trend { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-bottom: var(--s1); }
.spark-wrap { display: inline-flex; align-items: center; gap: var(--s2); }
.spark { display: block; width: 120px; height: 1.5rem; flex: none; }
.spark polyline { fill: none; stroke: var(--data-1); stroke-width: 1.5px; stroke-linejoin: round; stroke-linecap: round; }
.spark-last { fill: var(--data-1); }
.spark-cap { color: var(--text-3); font-size: 12px; }
.cols-wrap { max-width: 100%; }
.cols { display: block; width: 100%; max-width: 100%; height: auto; }
@media (min-width: 1024px) {
  .cols-wrap { width: 100%; }
}
.per-day-grid th:nth-child(n+2), .per-day-grid td:nth-child(n+2) { text-align: right; }
.table--id-col td:first-child { white-space: nowrap; max-width: 8.5rem; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 639px) {
  .table--id-col td:first-child { max-width: none; }
}
.col { fill: var(--data-1); }
.col--zero { fill: var(--track); }
.col-val, .col-x { fill: var(--text-3); font: 400 10px/12px var(--font); }

/* agents */
.agentrow { display: flex; align-items: center; gap: var(--s3); min-height: var(--row); padding: var(--s1) 0; }
.agentrow .c-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agentrow .c-title { white-space: nowrap; }
.agentrow .c-age { margin-left: auto; }

/* runtime chips (Claude Code vs Cursor Agent) — keep calm; no purple glow */
.rt { display: inline-block; font: 500 11px/16px var(--font); padding: 0 6px; border-radius: 4px;
      border: 1px solid var(--border); color: var(--text-2); vertical-align: middle; text-transform: lowercase; }
.rt-claude { background: var(--fill); }
.rt-cursor { background: var(--fill); border-color: var(--text-3); color: var(--text-1); }

/* orgs (G-028): one colour per org, chip + dot + filter + overview lanes */
.org { display: inline-block; font: 600 11px/16px var(--font); padding: 0 6px; border-radius: 4px; vertical-align: middle;
       white-space: nowrap; border: 1px solid transparent; }
.org-claude { background: var(--org-claude-bg); color: var(--org-claude-fg); border-color: var(--org-claude-solid); }
.org-cursor { background: var(--org-cursor-bg); color: var(--org-cursor-fg); border-color: var(--org-cursor-solid); }
.org-dot { display: inline-block; width: var(--s2); height: var(--s2); border-radius: 50%; background: var(--neutral-solid); flex: none; }
.org-dot-claude { background: var(--org-claude-solid); }
.org-dot-cursor { background: var(--org-cursor-solid); }
.orgseg a { gap: 6px; white-space: nowrap; }
.seg-links.orgseg a.org-claude, .seg-links.orgseg a.org-cursor { background: transparent; color: var(--text-2); border: 0; }
.seg-links.orgseg a.org-claude[aria-current=true] { background: var(--org-claude-bg); color: var(--org-claude-fg); }
.seg-links.orgseg a.org-cursor[aria-current=true] { background: var(--org-cursor-bg); color: var(--org-cursor-fg); }
.org-note { color: var(--text-3); font-size: 12px; }
.orgrow { white-space: nowrap; }
.lanes { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); margin: 0 0 var(--s4); grid-column: 1 / -1; }
.lane { background: var(--surface-1); border-radius: var(--r-md); box-shadow: var(--e1); padding: var(--card-pad); min-width: 0;
        border-top: 3px solid var(--neutral-solid); }
.lane--claude { border-top-color: var(--org-claude-solid); }
.lane--cursor { border-top-color: var(--org-cursor-solid); }
.lane-head { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); }
.lane-title { font: 600 15px/20px var(--font); margin: 0; display: inline-flex; align-items: center; gap: var(--s2); }
.lane-health { margin-left: auto; }
.lane-hq { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin: 0 0 var(--s2); color: var(--text-2); font-size: 13px; }
.lane-hq .st { gap: 4px; }
.lane-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.lane-stat { background: var(--fill); border-radius: var(--r-sm); padding: var(--s2); min-width: 0; color: var(--text-1); }
.lane-stat:hover { text-decoration: none; }
.lane-n { display: block; font: 600 20px/24px var(--font); font-variant-numeric: tabular-nums; }
.lane-l { display: block; color: var(--text-2); font: 500 12px/16px var(--font); }
@media (min-width: 640px) {
  .lanes { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 639px) {
  .shellbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .shellbar .cluster { flex-wrap: wrap; }
  .lane-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* quality tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin: var(--s1) 0 var(--s2); }
.tile { background: var(--fill); border-radius: var(--r-md); padding: var(--s3); min-width: 0; }
.tile-label { color: var(--text-2); font: 500 12px/16px var(--font); }
.tile-label a { color: var(--text-2); }
.tile-label .disc--i { margin-left: var(--s1); vertical-align: middle; }
.tile-label .disc--i > summary { display: list-item; list-style-position: outside; font: 600 11px/16px var(--font); color: var(--text-2);
                                 box-sizing: border-box; width: 16px; aspect-ratio: 1; text-align: center; border: 1px solid var(--border); border-radius: 50%; }
.tile-label .disc--i > summary::marker { content: ""; }                        /* no triangle next to the i; the summary keeps display:list-item (design guard) */
.tile-label .disc--i > summary::-webkit-details-marker { display: none; }
.tile-label .disc--i > summary:hover, .tile-label .disc--i[open] > summary { color: var(--info-fg); border-color: var(--info-fg); }
.tile-def { margin-top: var(--s1); color: var(--text-2); font-weight: 400; }
.metric { font: 600 22px/28px var(--font); font-variant-numeric: tabular-nums; }
.metric--stack { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); }
.metric-val { font: inherit; line-height: 1.15; }
.metric small { color: var(--text-2); font: 500 13px/16px var(--font); }
.tile-unit { display: block; line-height: 1.25; }
.delta { font-size: 12px; line-height: 16px; }
.ov .lrow-id, .ov .lrow-meta span { white-space: nowrap; }
.ov-bounce h3 { font: 600 13px/18px var(--font); margin: var(--s3) 0 var(--s1); }

@media (min-width: 1024px) {
  .ov { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
@media (max-width: 639px) {
  .system { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); padding: var(--s2) 0; }
  .gauge-row { grid-template-columns: minmax(0, 1fr); gap: var(--s1); min-height: 0; }
  .gv { text-align: left; }
  .needs { flex-wrap: wrap; gap: var(--s1) var(--s3); }
  .nsub { flex: 1 1 100%; order: 3; white-space: normal; }
  .nage { margin-left: auto; }
  .gtitle { white-space: normal; }
  .gm { padding-left: 0; }
  .teams, .tk { padding-left: var(--s3); }
  .agentrow .c-who { white-space: normal; }
  .ov-trend { flex-wrap: wrap; }
}

/* == B5 detail == */
.metarow { color: var(--text-2); margin: 0 0 var(--s3); }
.metarow .st { vertical-align: baseline; }
.gchips { margin: 0 0 var(--s4); }
.gblk { display: inline-flex; gap: var(--s1); }
.gd { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-items: start; }
.gd-main { min-width: 0; }
.gd-main > .meter { margin: 0 0 var(--s3); }
.rail { min-width: 0; color: var(--text-2); }
.rail-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s1) var(--s3); margin: 0; }
.rail-dl dt { color: var(--text-3); }
.rail-dl dd { margin: 0; font-variant-numeric: tabular-nums; }
.crit-text { flex: 1; min-width: 0; }
.crit-tasks { display: inline-flex; gap: var(--s1); }
.intent { max-width: 72ch; margin: 0; color: var(--text-1); white-space: pre-line; }
.attempt { margin: 0 0 var(--s2); }
.attempt > .timeline { margin: var(--s2) 0 var(--s2) var(--s2); }
.timeline-item { list-style: none; }
.page > .crumbs { margin-bottom: var(--s3); }
.tblock { margin: 0 0 var(--s4); }
.tblock > .crumbs, .tblock > .metarow { margin: 0 0 var(--s1); }
.tblock > .muted { margin: 0; }
.sect-box > .teams { padding-left: 0; }
.sect-box > .teams > .team:first-child { border-top: 0; }

@media (min-width: 1280px) {
  .gd { grid-template-columns: minmax(0, 1fr) 16rem; }
}
@media (max-width: 639px) {
  .crit-text { flex: 1 1 100%; order: 3; }
}

/* == B6 insights == */
.tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.disc .tiles { margin-top: var(--s2); }
.ins-list { display: grid; gap: var(--s2); }
.ins-row { display: grid; grid-template-columns: minmax(6rem, 10rem) auto minmax(0, 1fr); align-items: center; gap: var(--s3); }
.ins-name { color: var(--text-2); }
.ins-gauges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s5); }
.ins-check { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s1) var(--s3); min-height: var(--row); list-style: none; }
.ins-check .ins-name { min-width: 9rem; }
.ins-check .gz { margin-left: auto; }
.ins-check--over { background: var(--danger-bg); color: var(--danger-fg); padding: 0 var(--s2); border-radius: var(--r-sm); }
.ins-key { margin-left: var(--s2); color: var(--text-3); font-size: 12px; }
.tiles--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sect:has(.feed--log) { max-width: 48rem; }   /* changelog: a bounded line length, so the meta stays near the title */
.ins-list + .muted { margin: var(--s3) 0 var(--s2); }   /* a footnote between two bar lists is not a bar row */
.disc > .table { display: block; overflow-x: auto; max-width: 100%; }
.sect-box .st--pill { margin-right: var(--s2); }

@media (max-width: 639px) {
  .tiles--4, .tiles--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ins-gauges { grid-template-columns: minmax(0, 1fr); }
  .ins-row { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
  .ins-check .gz { margin-left: 0; }
}
