/* Quiet Lanes (HOG-30). Tokens per theme; html[data-theme] is light, dark or system, from the hog_theme cookie. */
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/static/vendor/fonts/manrope-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/static/vendor/fonts/manrope-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/static/vendor/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/static/vendor/fonts/jetbrains-mono-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --bg: #F5F7FB; --side: #FFFFFF; --side-border: #E5E9F2; --lane: #ECEFF4; --card: #FFFFFF; --panel: #FFFFFF;
  --text: #111827; --subtle: #334155; --muted: #5E6D83;
  --chip: #F1F5F9; --chip-soft: #F8FAFC; --border: #E2E8F0; --input-bg: #FFFFFF; --empty-border: #CBD5E1;
  --nav-active-bg: #EEF2FF; --nav-active-text: #1E1B4B;
  --pill-on-bg: #EEF2FF; --pill-on-border: #C7D2FE; --pill-on-text: #3730A3;
  --claim-bg: #EEF2FF; --claim-text: #1E3A8A; --claim-ring: #C7D2FE;
  --ok: #16A34A; --ok-text: #166534; --q-bg: #FEF3C7; --q-text: #92400E;
  --mention-bg: #EEF2FF; --mention-text: #1E3A8A;
  --accent: #2563EB; --on-accent: #FFFFFF; --agent-tile: #111827; --agent-text: #FBBF24; --logo-tile: #111827;
  --thumb: #C3CBD9; --track: #E2E8F0; --user-box: #F8FAFC;
  --danger: #B42318; --danger-bg: #FDE8E8; --add: #E6F4EA; --del: #FDE8E8;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 16px rgba(15, 23, 42, .05);
  --peek-shadow: -16px 0 40px rgba(15, 23, 42, .12);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E131B; --side: #141A24; --side-border: #222B39; --lane: #171E29; --card: #1F2733; --panel: #1A212D;
  --text: #E6EAF2; --subtle: #C3CBD9; --muted: #97A3B6;
  --chip: #283141; --chip-soft: #212937; --border: #2A3443; --input-bg: #161D28; --empty-border: #334055;
  --nav-active-bg: #1E2A44; --nav-active-text: #DCE6FF;
  --pill-on-bg: #1E2A44; --pill-on-border: #34508A; --pill-on-text: #C9D8FF;
  --claim-bg: #1C2740; --claim-text: #BFD0F8; --claim-ring: #2C3F6B;
  --ok: #22C55E; --ok-text: #4ADE80; --q-bg: #3A2A0C; --q-text: #FCD34D;
  --mention-bg: #1E2A44; --mention-text: #BFD0F8;
  --accent: #7AA2F7; --on-accent: #0B1020; --agent-tile: #FBBF24; --agent-text: #111827; --logo-tile: #222B39;
  --thumb: #3A4558; --track: #283141; --user-box: #1A212D;
  --danger: #F97066; --danger-bg: #3A1717; --add: #12301C; --del: #3A1717;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --peek-shadow: -16px 0 40px rgba(0, 0, 0, .45);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #0E131B; --side: #141A24; --side-border: #222B39; --lane: #171E29; --card: #1F2733; --panel: #1A212D;
    --text: #E6EAF2; --subtle: #C3CBD9; --muted: #97A3B6;
    --chip: #283141; --chip-soft: #212937; --border: #2A3443; --input-bg: #161D28; --empty-border: #334055;
    --nav-active-bg: #1E2A44; --nav-active-text: #DCE6FF;
    --pill-on-bg: #1E2A44; --pill-on-border: #34508A; --pill-on-text: #C9D8FF;
    --claim-bg: #1C2740; --claim-text: #BFD0F8; --claim-ring: #2C3F6B;
    --ok: #22C55E; --ok-text: #4ADE80; --q-bg: #3A2A0C; --q-text: #FCD34D;
    --mention-bg: #1E2A44; --mention-text: #BFD0F8;
    --accent: #7AA2F7; --on-accent: #0B1020; --agent-tile: #FBBF24; --agent-text: #111827; --logo-tile: #222B39;
    --thumb: #3A4558; --track: #283141; --user-box: #1A212D;
    --danger: #F97066; --danger-bg: #3A1717; --add: #12301C; --del: #3A1717;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35);
    --peek-shadow: -16px 0 40px rgba(0, 0, 0, .45);
  }
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { scrollbar-color: var(--thumb) var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 500 14px/1.5 "Manrope", system-ui, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd, pre, .mono, .ref-chip, .count-pill, .session { font-family: "JetBrains Mono", ui-monospace, monospace; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.6px; line-height: 1.2; }
h2 { font-size: 15px; font-weight: 800; margin: 0; }
h3 { margin: 0; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  background: var(--input-bg); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; width: 100%;
}
textarea { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; line-height: 1.6; resize: vertical; }
label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--subtle); }
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 10px; border: 0; background: var(--accent); color: var(--on-accent); font-weight: 700;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn.secondary, button.secondary {
  background: var(--input-bg); color: var(--subtle); border: 1px solid var(--border); font-weight: 600;
}
.btn.big, button.big { height: 44px; border-radius: 12px; padding: 0 18px; }
button.link, .link-btn {
  background: none; color: var(--accent); padding: 0; height: auto; font-weight: 600; border: 0;
}
button.danger, .danger { color: var(--danger); }
button.danger:not(.link):not(.link-btn) { background: var(--danger); color: #FFFFFF; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  width: 40px; height: 40px; padding: 0; border-radius: 10px; border: 1px solid var(--border);
  background: transparent; color: var(--muted);
}
svg { flex: none; }
.done-disc { fill: var(--ok); } .done-tick { stroke: var(--card); }
.muted { color: var(--muted); } .subtle { color: var(--subtle); } .small { font-size: 12px; font-weight: 600; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.error { background: var(--danger-bg); border: 1px solid var(--danger); padding: 8px 12px; border-radius: 10px; }
.note { background: var(--q-bg); color: var(--q-text); padding: 8px 12px; border-radius: 10px; font-weight: 600; }
.inline { display: inline; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.inline-form input, .inline-form select { width: auto; }
.inline-form label { display: inline-flex; gap: 6px; align-items: center; }
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); align-items: end; }
.card, .panel-card {
  background: var(--card); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); margin: 0 0 16px;
}
.narrow { max-width: 24rem; margin: 10vh auto; display: grid; gap: 12px; }
.list { width: 100%; border-collapse: collapse; }
.list td, .list th { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.token { word-break: break-all; }

/* chips, pills, badges */
.chip, .label, .label-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--subtle);
  background: var(--chip); border-radius: 999px; padding: 3px 9px; text-decoration: none;
}
.chip.warn, .label.warn, .tag-question { background: var(--q-bg); color: var(--q-text); font-weight: 700; }
.ref-chip {
  font-size: 12px; font-weight: 500; color: var(--subtle); background: var(--chip); border-radius: 6px; padding: 2px 7px;
}
.count-pill {
  font-size: 12px; font-weight: 500; color: var(--subtle); background: var(--card); border-radius: 999px; padding: 1px 8px;
}
.badge {
  font-size: 11px; font-weight: 700; color: var(--muted); background: var(--chip); border-radius: 6px; padding: 1px 6px;
}
.badge.admin { color: var(--q-text); background: var(--q-bg); }
.flag-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--subtle);
  background: var(--card); border-radius: 999px; padding: 3px 8px;
}
.dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; flex: none; background: #94A3B8; }
.dot.small-dot { width: 7px; height: 7px; }
.dot-draft { background: #94A3B8; } .dot-ready { background: #3B82F6; } .dot-progress { background: #8B5CF6; }
.dot-review { background: #F59E0B; } .dot-done { background: #22C55E; }
/* Label dots: fixed colours for known labels, otherwise a stable pick from the name (label_dot filter). */
.ld-0 { background: #94A3B8; } .ld-1 { background: #F59E0B; } .ld-2 { background: #22C55E; }
.ld-3 { background: #3B82F6; } .ld-4 { background: #0EA5E9; } .ld-5 { background: #F97316; }
.ld-6 { background: #8B5CF6; } .ld-7 { background: #14B8A6; } .ld-8 { background: #EC4899; } .ld-9 { background: #EAB308; }
.tile {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px;
  border-radius: 8px; font-size: 11px; font-weight: 800; background: var(--agent-tile); color: var(--agent-text);
}
.tile.human { border-radius: 999px; background: #FBBF24; color: #111827; }
.tile.empty { background: transparent; border: 1.5px dashed var(--empty-border); }
.tile.big { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }
.tile.big.human { border-radius: 999px; }
.actor { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.mention { color: var(--mention-text); background: var(--mention-bg); border-radius: 5px; padding: 0 4px; font-weight: 700; }

/* ---------------------------------------------------------------- shell */
.shell { display: flex; min-height: 100vh; }
.side { flex: 0 0 236px; width: 236px; background: var(--side); border-right: 1px solid var(--side-border); }
.side-inner {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; padding: 18px 12px; display: flex;
  flex-direction: column; gap: 22px; scrollbar-color: var(--thumb) var(--side);
}
.side-head { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 17px; }
.logo:hover { text-decoration: none; }
.logo-tile {
  width: 36px; height: 36px; border-radius: 10px; background: var(--logo-tile); display: flex;
  align-items: center; justify-content: center;
}
.menu-toggle { margin-left: auto; width: 36px; height: 36px; }
.menu-toggle .chev-out { display: none; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--muted); padding: 0 10px 6px; }
.side-label + .side-label, .side-nav .gap { padding-top: 18px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px;
  color: var(--subtle); font-weight: 600; min-height: 44px;
}
.nav-item:hover { background: var(--chip-soft); text-decoration: none; }
.nav-item.active { background: var(--nav-active-bg); color: var(--nav-active-text); font-weight: 700; }
.key-chip {
  font-family: "JetBrains Mono", monospace; font-size: 11px; background: var(--accent); color: var(--on-accent);
  border-radius: 6px; padding: 2px 6px;
}
.nav-item:not(.active) .key-chip { background: var(--chip); color: var(--subtle); }
.wait-badge {
  margin-left: auto; background: #F59E0B; color: #111827; font-size: 12px; font-weight: 800;
  border-radius: 999px; padding: 1px 8px;
}
.side-foot { margin-top: auto; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
html[data-menu="collapsed"] .side-foot { align-items: center; }
@media (max-width: 1499px) { html[data-menu="auto"] .side-foot { align-items: center; } }
.theme-switch { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--chip-soft); }
.theme-switch button {
  flex: 1; height: 32px; padding: 0 6px; border-radius: 8px; background: transparent; color: var(--muted);
  font-size: 12px; font-weight: 700;
}
.theme-switch button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.theme-cycle { display: none; }
.user-menu { position: relative; }
.user-menu > summary {
  list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px;
  background: var(--user-box); cursor: pointer; min-height: 44px;
}
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu .who { display: flex; flex-direction: column; min-width: 0; }
.user-menu .who span:first-child { font-weight: 700; }
.user-menu[open] > .pop {
  position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 40; min-width: 200px; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; display: grid; gap: 8px;
}
.user-menu .pop form button { width: 100%; }
.content { flex: 999 1 560px; min-width: 0; padding: 18px 28px 28px; display: flex; flex-direction: column; gap: 14px; }
.content.solo { padding: 16px; }

/* The collapsed rail: the menu hides its words and keeps icons, chips and the Waiting count. */
html[data-menu="collapsed"] .side { flex-basis: 72px; width: 72px; }
html[data-menu="collapsed"] .side-inner { align-items: center; padding: 18px 10px; overflow: visible; }
html[data-menu="collapsed"] .side .wide { display: none; }
html[data-menu="collapsed"] .side-head { flex-direction: column; padding: 0; }
html[data-menu="collapsed"] .menu-toggle { margin: 0; width: 44px; height: 32px; }
html[data-menu="collapsed"] .menu-toggle .chev-in { display: none; }
html[data-menu="collapsed"] .menu-toggle .chev-out { display: block; }
html[data-menu="collapsed"] .logo-tile { width: 44px; height: 44px; border-radius: 12px; }
html[data-menu="collapsed"] .nav-item { width: 44px; height: 44px; padding: 0; justify-content: center; }
html[data-menu="collapsed"] .key-chip { font-size: 10px; padding: 3px 5px; }
html[data-menu="collapsed"] .wait-badge {
  position: absolute; top: 4px; right: 0; margin: 0; font-size: 10px; padding: 0 5px; line-height: 16px;
}
html[data-menu="collapsed"] .theme-switch { display: none; }
html[data-menu="collapsed"] .theme-cycle { display: inline-flex; }
html[data-menu="collapsed"] .user-menu > summary { padding: 0; width: 44px; height: 44px; justify-content: center; background: transparent; }
@media (max-width: 1499px) {
  html[data-menu="auto"] .side { flex-basis: 72px; width: 72px; }
  html[data-menu="auto"] .side-inner { align-items: center; padding: 18px 10px; overflow: visible; }
  html[data-menu="auto"] .side .wide { display: none; }
  html[data-menu="auto"] .side-head { flex-direction: column; padding: 0; }
  html[data-menu="auto"] .menu-toggle { margin: 0; width: 44px; height: 32px; }
  html[data-menu="auto"] .menu-toggle .chev-in { display: none; }
  html[data-menu="auto"] .menu-toggle .chev-out { display: block; }
  html[data-menu="auto"] .logo-tile { width: 44px; height: 44px; border-radius: 12px; }
  html[data-menu="auto"] .nav-item { width: 44px; height: 44px; padding: 0; justify-content: center; }
  html[data-menu="auto"] .key-chip { font-size: 10px; padding: 3px 5px; }
  html[data-menu="auto"] .wait-badge {
    position: absolute; top: 4px; right: 0; margin: 0; font-size: 10px; padding: 0 5px; line-height: 16px;
  }
  html[data-menu="auto"] .theme-switch { display: none; }
  html[data-menu="auto"] .theme-cycle { display: inline-flex; }
  html[data-menu="auto"] .user-menu > summary {
    padding: 0; width: 44px; height: 44px; justify-content: center; background: transparent;
  }
}

/* Phones: the menu becomes a bar above the content, whatever the collapse state. */
@media (max-width: 720px) {
  .shell { flex-direction: column; }
  html[data-menu] .side { width: 100%; flex: none; border-right: 0; border-bottom: 1px solid var(--side-border); }
  html[data-menu] .side-inner {
    position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px;
  }
  html[data-menu] .side .wide { display: none; }
  html[data-menu] .side-head { flex-direction: row; }
  html[data-menu] .menu-toggle { display: none; }
  html[data-menu] .side-nav { flex-direction: row; flex-wrap: wrap; align-items: center; }
  html[data-menu] .side-label { display: none; }
  html[data-menu] .nav-item { width: 44px; height: 44px; padding: 0; justify-content: center; }
  html[data-menu] .wait-badge {
    position: absolute; top: 4px; right: 0; margin: 0; font-size: 10px; padding: 0 5px; line-height: 16px;
  }
  html[data-menu] .side-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  html[data-menu] .theme-switch { display: none; }
  html[data-menu] .theme-cycle { display: inline-flex; }
  html[data-menu] .user-menu > summary { padding: 0; width: 44px; height: 44px; justify-content: center; background: transparent; }
  html[data-menu] .user-menu[open] > .pop { left: auto; right: 0; bottom: auto; top: calc(100% + 6px); }
  .content { padding: 16px; }
  h1 { font-size: 24px; }
}

/* ---------------------------------------------------------------- page headers, tabs, filters */
.project-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.project-head .key-chip { font-size: 11px; padding: 3px 6px; }
.project-head .head-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.project-head h1 { font-size: 20px; letter-spacing: -.3px; }
.project-head .head-actions { gap: 8px; }
.segmented { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--chip); }
.segmented a { padding: 5px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; }
.segmented a:hover { text-decoration: none; color: var(--text); }
.segmented a[aria-current] { background: var(--card); color: var(--text); font-weight: 700; box-shadow: var(--shadow); }
.btn.small-btn, button.small-btn { height: 36px; border-radius: 10px; padding: 0 14px; font-size: 13px; }
.divider { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.title-block { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.crumb { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crumb a { color: var(--subtle); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.head-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tabs a { padding: 0 2px 12px; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; }
.tabs a[aria-current] { color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filters .search { flex: 0 1 260px; height: 36px; border-radius: 10px; padding: 0 12px; font-size: 13px; }
.filters .pill { height: 32px; padding: 0 12px; font-size: 13px; }
.filters .pill-split { padding: 0; }
.filters .progress { font-size: 12px; gap: 8px; }
.filters progress { width: 96px; height: 6px; }
.search {
  display: flex; flex-direction: row; align-items: center; gap: 8px; flex: 1 1 240px; max-width: 360px; height: 44px;
  padding: 0 14px; background: var(--input-bg); border: 1px solid var(--border); border-radius: 12px; color: var(--muted);
}
.search input { border: 0; background: transparent; padding: 0; outline: none; color: var(--text); }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--input-bg); color: var(--subtle); font-weight: 600;
}
.pill:hover { text-decoration: none; border-color: var(--pill-on-border); }
.pill[aria-current="true"] {
  border-color: var(--pill-on-border); background: var(--pill-on-bg); color: var(--pill-on-text); font-weight: 700;
}
.filter-menu { position: relative; }
.filter-menu .menu {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 25; min-width: 180px; margin: 0; padding: 6px;
  list-style: none; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.filter-menu .menu a {
  display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); font-weight: 600;
}
.filter-menu .menu a:hover, .filter-menu .menu a:focus-visible { background: var(--chip-soft); text-decoration: none; }
.filter-menu .menu a[aria-checked="true"] { color: var(--pill-on-text); background: var(--pill-on-bg); }
.pill-split { padding: 0; gap: 0; }
.pill-split .pill-main, .pill-split .pill-clear {
  height: 100%; background: transparent; color: inherit; font-weight: 700; border: 0; border-radius: 999px;
  display: inline-flex; align-items: center;
}
.pill-split .pill-main { padding: 0 6px 0 14px; }
.pill-split .pill-clear { padding: 0 14px 0 6px; }
.pill-split .pill-clear:hover { text-decoration: none; }
.progress { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
progress {
  appearance: none; width: 120px; height: 8px; border: 0; border-radius: 999px; background: var(--track); overflow: hidden;
}
progress::-webkit-progress-bar { background: var(--track); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--ok); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--ok); border-radius: 999px; }
.menu-pop { position: relative; }
.menu-pop > summary { list-style: none; }
.menu-pop > summary::-webkit-details-marker { display: none; }
.menu-pop[open] > .pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 260px; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; display: grid; gap: 8px;
}

/* ---------------------------------------------------------------- board */
/* position: relative so the visually hidden text inside cards is clipped too, not widening the page. */
.board-scroll { position: relative; overflow-x: auto; scrollbar-color: var(--thumb) transparent; padding-bottom: 8px; }
#board-area { display: flex; flex-direction: column; gap: 14px; }
.lane-body { display: flex; flex-direction: column; gap: 10px; }
/* Above 760px the strip fills the window, so its scrollbar sits on the bottom edge. Lanes end at their
   content and scroll inside once they reach the strip's height; while a card is dragged they all go full
   height, so the whole lane is a drop target. */
@media (min-width: 760px) {
  .content.board-layout { height: 100vh; overflow: hidden; }
  .board-layout #board-area { flex: 1; min-height: 0; }
  .board-layout .board-scroll { flex: 1; min-height: 0; overflow-y: hidden; padding-bottom: 0; }
  .board-layout .board { height: 100%; }
  .board-layout .lane { min-height: 0; max-height: 100%; overflow: hidden; }
  .board-layout .lane-head, .board-layout .add-task { flex: none; }
  .board-layout .lane-body {
    flex: 0 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--thumb) transparent;
    margin: 0 -6px; padding: 0 6px 2px;
  }
  .board-layout .is-dragging .board { align-items: stretch; }
  .board-layout .is-dragging .lane-body { flex: 1; }
  .board-layout .is-dragging .cards { flex: 1 0 auto; }
}
.board {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 14px; align-items: start;
}
.lane {
  background: var(--lane); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.lane-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 0; flex-wrap: wrap; container-type: inline-size; }
/* A narrow lane with both flags shows them as icons; the tooltip and the hidden text keep their meaning. */
@container (max-width: 300px) {
  .flags:has(.flag-chip + .flag-chip) .flag-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}
.lane-head .flags { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-height: 44px; }
.cards:not(:has(> li))::before {
  content: attr(data-empty); display: block; padding: 22px 12px; text-align: center; font-size: 13px; line-height: 1.5;
  color: var(--muted); border: 1.5px dashed var(--empty-border); border-radius: 12px;
}
.task-card {
  background: var(--card); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow); cursor: grab;
}
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-top .comments { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.card-title { font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.card-labels { display: flex; flex-wrap: wrap; gap: 6px; }
.dep-line { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; flex-wrap: wrap; }
.dep-line.ok { color: var(--ok-text); }
.dep-line.open { color: var(--q-text); }
.dep-line.review { color: var(--claim-text); }
.claim-pill {
  display: flex; align-items: center; gap: 8px; background: var(--claim-bg); border-radius: 10px; padding: 7px 10px;
  font-size: 12px; color: var(--claim-text); font-weight: 600; flex-wrap: wrap;
}
.claim-pill .claim-head { display: inline-flex; align-items: center; gap: 8px; }
.claim-pill .session { overflow-wrap: anywhere; }
.claim-pill .pulse { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 3px var(--claim-ring); }
.card-who { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.card-who .unassigned { color: var(--muted); }
.task-card.compact {
  flex-direction: row; align-items: flex-start; gap: 8px; padding: 10px; border-radius: 12px; box-shadow: none;
}
.task-card.compact .compact-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.task-card.compact .ref-chip { background: none; padding: 0; font-size: 11px; color: var(--muted); }
.task-card a.ref-chip:hover { text-decoration: underline; background: var(--border); }
.task-card.compact a.ref-chip:hover { background: none; }
.task-card.compact .card-title { font-size: 13px; font-weight: 600; line-height: 1.35; }
.lane:not(.show-all) .task-card.extra { display: none; }
.lane-more {
  height: 40px; border-radius: 12px; border: 0; background: var(--card); color: var(--subtle); font-size: 13px; font-weight: 700;
}
/* Only the first lane has it. Its fade covers cards scrolling under it when the lane overflows. */
.add-task { position: relative; box-shadow: 0 -10px 12px var(--lane); border-radius: 12px; }
.add-tile {
  height: 40px; border-radius: 12px; border: 1.5px dashed var(--empty-border); background: var(--lane); color: var(--subtle);
  font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; list-style: none;
}
.add-tile::-webkit-details-marker { display: none; }
.add-task[open] > .add-tile { display: none; }
.add-form {
  display: grid; gap: 8px; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 10px;
}
.add-actions { display: flex; align-items: center; gap: 12px; }
.add-actions > button:first-child { height: 32px; padding: 0 14px; font-size: 13px; }
.add-form .error { margin: 0; }
.hidden-summary { display: none; }
.sortable-ghost { opacity: .4; }
/* ---------------------------------------------------------------- task panel (HOG-35) */
.panel:empty { display: none; }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 520px; max-width: 100%; z-index: 30; display: flex;
  background: var(--panel); border-left: 1px solid var(--border); box-shadow: var(--peek-shadow);
}
@media (max-width: 599px) { .panel { width: 100%; } }
/* While the panel is open the strip can scroll its last lanes clear of it, and the open card is scrolled into view. */
@media (min-width: 600px) {
  .board-scroll { transition: padding-right .2s ease; }
  .panel-open .board-scroll { padding-right: 520px; scroll-padding-right: 520px; transition: none; }
  .panel-open .board { width: fit-content; min-width: 100%; }  /* so the padding comes after the lanes */
}
.peek { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.peek-head {
  display: flex; align-items: center; gap: 8px; padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--border);
}
.peek-head .status-pill { font-size: 12px; padding: 2px 10px; background: transparent; color: var(--subtle); }
.peek-actions { margin-left: auto; display: flex; gap: 6px; }
.icon-btn.small-icon { width: 32px; height: 32px; border-radius: 9px; color: var(--subtle); }
.icon-btn.small-icon:hover { text-decoration: none; background: var(--chip-soft); }
/* The panel's only scroll area, between the fixed header row and the reply box; everything in it takes its
   natural height. Scrolling past its ends doesn't carry on to the board. */
.peek-body {
  flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 0; display: flex; flex-direction: column; gap: 18px;
  scrollbar-width: thin; scrollbar-color: var(--thumb) transparent; overscroll-behavior: contain;
  overflow-anchor: none;  /* app.js keeps the position when older comments are prepended */
}
.peek-top { flex: none; display: flex; flex-direction: column; gap: 18px; }
.conv-scroll { display: flex; flex-direction: column; gap: 12px; padding-bottom: 14px; }
/* A full-width panel (phones) locks the page behind it; the board keeps its scroll position. */
@media (max-width: 599px) { body.panel-open { overflow: hidden; } }
.conv-scroll .earlier { align-self: center; }
/* Pinned at the bottom of the scrolling body, just above the reply box; the negative margin keeps it out of the flow. */
.new-pill {
  position: sticky; bottom: 8px; align-self: center; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px;
  box-shadow: 0 0 0 4px var(--panel), var(--shadow); flex: none; margin-top: -46px; z-index: 1;
}
.new-pill[hidden] { display: none; }
.peek-title { font-size: 20px; font-weight: 800; line-height: 1.3; letter-spacing: -.2px; margin: 0; }
.peek-title:focus { outline: none; }
.peek-facts { margin: 0; display: grid; grid-template-columns: 96px 1fr; gap: 10px 12px; font-size: 13px; align-items: center; }
.peek-facts dt { color: var(--muted); font-weight: 600; }
.peek-facts dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.peek-facts dd.deps { column-gap: 12px; }
.claim-line { color: var(--claim-text); font-weight: 600; }
.claim-line .pulse { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 3px var(--claim-ring); }
.claim-line .session { font-size: 12px; }
.ok-text { color: var(--ok-text); font-weight: 600; }
.peek-section { display: flex; flex-direction: column; gap: 8px; }
.peek-section .section-label { font-size: 12px; }
.peek-section .by { font-weight: 600; letter-spacing: 0; text-transform: none; }
.peek-box { background: var(--chip-soft); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.peek-box .md { font-size: 14px; line-height: 1.6; }
.peek-box > p:first-child, .peek-box .md > :first-child { margin-top: 0; }
.resolution-box { border-top: 3px solid var(--ok); font-size: 13px; }
.peek-fields { margin: 0; display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; line-height: 1.5; }
.peek-fields dt { font-weight: 800; }
.peek-fields dd { margin: 0; min-width: 0; }
.peek-fields .md, .peek-fields .md p { margin: 0; font-size: 13px; }
.peek-fields .outcome { display: flex; gap: 5px; align-items: flex-start; }
.peek-fields .outcome svg { margin-top: 4px; }
/* Shortened blocks: a fixed number of lines, whatever block elements the Markdown makes. app.js adds the
   "Show more" toggle and the fade only when one is actually cut off; a click on the text toggles it too. */
.clamp, .cut { overflow: hidden; }
.clamp.is-clamped { mask-image: linear-gradient(to bottom, #000 calc(100% - 1.6em), transparent); cursor: pointer; }
.clamp-3 { max-height: calc(1.5em * 3); } .clamp-4 { max-height: calc(1.6em * 4); } .clamp-6 { max-height: calc(1.6em * 6); }
.clamp-half { max-height: 50vh; }
.clamp.is-expanded, .clamp.is-expanded .clamp-3 { max-height: none; }
.clamp.is-expanded[data-toggle] { cursor: pointer; }
.clamp:not(.is-expanded) .res-extra { display: none; }
.expand-toggle { align-self: flex-start; font-size: 12px; font-weight: 700; }
.more-link { font-size: 13px; font-weight: 700; }
/* No separator: a gap alone reads fine and leaves nothing dangling when the row wraps. */
.more-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.more-row .expand-toggle { font-size: 13px; }
.peek-comment { display: flex; gap: 10px; }
.peek-comment .tile { width: 26px; height: 26px; }
.peek-comment .body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.peek-comment .text { color: var(--text); }
.peek-comment .md { font-size: 13px; line-height: 1.5; }
.peek-comment .md p { margin: 0 0 4px; }
.peek-foot { border-top: 1px solid var(--border); padding: 12px 16px 14px 22px; display: flex; flex-direction: column; gap: 8px; }
.peek-comment-form { display: flex; flex-direction: column; gap: 8px; }
/* Starts at one line and grows to about 8 (app.js sets the height), then scrolls. */
.peek-comment-form textarea {
  font-family: inherit; font-size: 13px; line-height: 1.5; resize: none; overflow-y: auto; padding: 8px 12px;
  min-height: calc(1.5em + 18px); max-height: calc(1.5em * 8 + 18px);
}
.reply-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
/* Rings drawn inside the card, so the lane's scrolling card list can't clip them at its edges. */
.task-card.is-open { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); }
.task-card:focus-visible { outline-offset: -2px; }
.card-msg { margin: 0; font-size: 12px; font-weight: 700; color: var(--q-text); background: var(--q-bg); border-radius: 8px; padding: 4px 8px; }

/* ---------------------------------------------------------------- assignee menu (HOG-35) */
.assignee-trigger {
  height: auto; padding: 4px 6px; margin: -4px -6px; border-radius: 8px; background: transparent; color: var(--text);
  font-weight: 600; font-size: 13px; gap: 8px; justify-content: flex-start;
}
.assignee-trigger .unassigned { color: var(--muted); }
.assignee-trigger .chev { opacity: 0; color: var(--muted); }
.assignee-trigger:hover, .assignee-trigger:focus-visible, .assignee-trigger[aria-expanded="true"] { background: var(--chip); }
.assignee-trigger:hover .chev, .assignee-trigger:focus-visible .chev, .assignee-trigger[aria-expanded="true"] .chev { opacity: 1; }
/* Positioned by app.js with position: fixed, so lane scrollers don't clip it. */
.assignee-menu {
  position: fixed; z-index: 50; width: 220px; margin: 0; padding: 6px; list-style: none; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.assignee-menu button {
  width: 100%; height: 36px; padding: 0 8px; border-radius: 8px; background: transparent; color: var(--text);
  justify-content: flex-start; gap: 8px; font-weight: 600; font-size: 13px;
}
.assignee-menu button:hover, .assignee-menu button:focus-visible { background: var(--chip-soft); outline: none; }
.assignee-menu .who { flex: 1; text-align: left; }
.assignee-menu .check { color: var(--accent); font-weight: 800; width: 12px; }
.menu-divider { height: 1px; background: var(--border); margin: 4px 2px; }

/* ---------------------------------------------------------------- task page */
.task-head { display: flex; flex-direction: column; gap: 12px; }
.task-head .row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.task-head h1 { font-size: 28px; letter-spacing: -.5px; line-height: 1.25; overflow-wrap: anywhere; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; background: var(--card);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px;
}
.task-cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.task-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.task-side { flex: 1 1 300px; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1100px) { .task-side { max-width: none; } }
.panel-card { margin: 0; background: var(--panel); }
.panel-card.resolution { border-top: 3px solid var(--ok); }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.panel-head .end { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.section-label { font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.md { font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.md h1, .md h2, .md h3 { font-size: 16px; font-weight: 800; margin: 16px 0 4px; letter-spacing: 0; }
.md p { margin: 0 0 10px; }
.md code { font-size: 13px; background: var(--chip); border-radius: 5px; padding: 1px 5px; }
.md pre code { background: none; padding: 0; }
.md img { max-width: 100%; height: auto; }
.md pre, pre.diff, pre.content {
  overflow-x: auto; background: var(--chip-soft); border: 1px solid var(--border); padding: 10px; border-radius: 10px;
}
.diff .add { background: var(--add); display: block; } .diff .del { background: var(--del); display: block; }
.resolution .md { font-size: 14.5px; }
dl.fields {
  margin: 0; display: grid; grid-template-columns: minmax(110px, max-content) 1fr; column-gap: 20px; row-gap: 12px;
  font-size: 14.5px; line-height: 1.6;
}
dl.fields dt { font-weight: 800; }
dl.fields dd { margin: 0; min-width: 0; }
dl.fields dd .md, dl.fields dd .md p:last-child { margin: 0; font-size: 14.5px; }
@media (max-width: 720px) { dl.fields { grid-template-columns: 1fr; row-gap: 4px; } dl.fields dd { margin-bottom: 8px; } }
.thread { display: flex; flex-direction: column; gap: 14px; }
.comment {
  background: var(--panel); border-radius: 16px; padding: 16px 20px; box-shadow: var(--shadow); display: flex; gap: 14px;
}
.comment .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.comment header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.comment header .tags { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.answered { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ok-text); }
.comment .md { font-size: 14.5px; line-height: 1.6; }
.comment-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.compose { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); padding: 0; }
.compose .editor-tabs { padding: 8px 10px 0; border-bottom: 1px solid var(--border); margin: 0; }
.compose textarea, .compose .preview { border: 0; border-radius: 0; background: transparent; padding: 12px 16px; min-height: 96px; }
.compose-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; }
.compose-actions .end { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.editor-tabs { display: flex; gap: 4px; align-items: center; margin-bottom: 6px; }
.editor-tabs .tab {
  height: 34px; padding: 0 12px; border-radius: 8px 8px 0 0; background: transparent; color: var(--muted); font-weight: 700;
  border-bottom: 2px solid transparent;
}
.editor-tabs .tab[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--accent); }
.attach {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); color: var(--subtle); cursor: pointer;
}
.attach:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.preview { min-height: 6rem; background: var(--input-bg); border: 1px dashed var(--border); padding: 10px; border-radius: 10px; }
dl.facts { margin: 0; display: grid; grid-template-columns: 96px 1fr; row-gap: 12px; column-gap: 12px; align-items: center; font-size: 13.5px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.dep-row {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--chip-soft);
  color: var(--text);
}
.dep-row:hover { text-decoration: none; outline: 1px solid var(--border); }
.dep-row .txt { display: flex; flex-direction: column; min-width: 0; }
.dep-row .ref-line { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); }
.dep-row .title { font-size: 13px; font-weight: 600; }
.side-sub { font-size: 12px; font-weight: 700; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.attachments { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.attachments li { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.attachments img { max-height: 7rem; max-width: 100%; display: block; border-radius: 10px; }
.attachments .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.drop-zone {
  min-height: 72px; border-radius: 12px; border: 1.5px dashed var(--empty-border); color: var(--muted); font-size: 13px;
  font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
  text-align: center; padding: 10px;
}
.drop-zone.over { border-color: var(--accent); color: var(--accent); }
.drop-zone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 13px; line-height: 1.45; }
.timeline li { display: flex; gap: 10px; }
.timeline .dot { margin-top: 5px; width: 8px; height: 8px; }
.timeline time { display: block; color: var(--muted); font-size: 12px; }

/* ---------------------------------------------------------------- other pages */
.project-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.project-card { background: var(--card); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); display: grid; gap: 6px; color: var(--text); }
.project-card:hover { text-decoration: none; outline: 1px solid var(--border); }
.status { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 16px; }
.status dt { color: var(--muted); }
