/* Pollen Code: hive inspection record. White ground, propolis-brown shell, honey for what
   needs a human and for finished work, queen-cell red only for blocked. A topic is a hive
   body: one frame per task, filled by state. One heavy rule per table; every other rule is a
   hairline. Ids, scopes, times and commands are set in tabular mono. */
:root {
  --paper: #FFFFFF; --ink: #2A1B0E; --muted: #6B5A44; --line: #E4DACB; --sunk: #FAF7F0; --raised: #FFFFFF;
  --honey: #F2A900; --on-honey: #2A1B0E; --wax: #F6E7B4; --wash-honey: #FFF3CC;
  --queen: #C8321E; --on-queen: #FFFFFF; --shell: #2A1B0E; --on-shell: #FFFFFF; --shell-muted: #E4D8C4;
  --code: #2A1B0E; --on-code: #FFFFFF; --ease: cubic-bezier(.16, 1, .3, 1);
  --sans: 'Schibsted Grotesk', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17110A; --ink: #F4ECDD; --muted: #BBAA92; --line: #3A2D1D; --sunk: #211910; --raised: #1D150D;
    --wax: #5A4A1E; --wash-honey: #33270A; --queen: #FF8A73; --on-queen: #1A0905;
    --shell: #0F0A05; --code: #0B0703; --on-code: #F4ECDD;
  }
}
* { box-sizing: border-box; }
html { background: var(--paper); scrollbar-color: var(--muted) transparent; scrollbar-width: thin; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; accent-color: var(--ink); }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
::selection { background: var(--honey); color: var(--on-honey); }
.d { font-family: var(--sans); font-weight: 800; letter-spacing: -0.02em; }
.m { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lbl { font: 700 12px/16px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.fine { font-size: 13px; line-height: 19px; }
.sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 10; background: var(--honey); color: var(--on-honey); padding: 10px 16px; font-weight: 700; border: 2px solid var(--ink); }
.skip:focus { top: 8px; }
.sheet { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { max-width: 1320px; width: 100%; margin: 0 auto; padding: 0 48px; }

/* shell bar */
header.top { background: var(--shell); color: var(--on-shell); }
header.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 36px; min-height: 56px; }
.logo { display: flex; align-items: center; min-height: 44px; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.01em; color: var(--on-shell); text-decoration: none; }
nav.main { display: flex; gap: 20px; flex: 1; }
nav.main a { display: flex; align-items: center; white-space: nowrap; color: var(--shell-muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 0 2px; height: 56px; border-bottom: 3px solid transparent; }
nav.main a:hover { color: var(--on-shell); }
nav.main a.on, nav.main a[aria-current] { color: var(--on-shell); border-bottom-color: var(--honey); }
.user { font-weight: 600; font-size: 14px; color: var(--shell-muted); }
header.top .btn { background: transparent; color: var(--on-shell); border-color: var(--shell-muted); }
header.top .btn:hover { background: var(--on-shell); color: var(--shell); opacity: 1; }
header.top :focus-visible { outline-color: var(--honey); }

/* buttons: ink = primary, outlined = secondary, honey = needs you */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; gap: 8px;
  font: 700 14px var(--sans); color: var(--paper); background: var(--ink); border: 2px solid var(--ink); border-radius: 3px; cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: var(--raised); color: var(--ink); }
.btn.signal { background: var(--honey); color: var(--on-honey); border-color: var(--ink); }
.btn.small { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn.danger { background: var(--raised); color: var(--queen); border-color: var(--queen); }
.btn.big { min-height: 48px; padding: 0 24px; font-size: 16px; }

main.wrap { flex: 1; padding-top: 32px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 36px; }
.pagehead { padding-bottom: 24px; display: flex; flex-direction: column; gap: 6px; }
.crumb { color: var(--muted); font-size: 13px; }
h1.page { margin: 0; font-size: 34px; line-height: 1.12; letter-spacing: -.02em; font-weight: 800; text-wrap: balance; }
.goal { margin: 0; font-size: 16px; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); font-size: 13px; margin: 0; }
.facts b { color: var(--ink); font-weight: 700; }
.sec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; border-top: 1px solid var(--ink); padding-top: 10px; margin: 0 0 14px; }
.sec h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 800; letter-spacing: -.01em; flex: 1; }
.sec h2.lbl { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .06em; }

/* pollen field behind the page header: a faint neutral wash, and a canvas of grey pollen
   grains drawn by pollen.js (depth, drift, a gentle response to the cursor). Decorative only. */
.sheet { overflow-x: clip; }
.pagehead, .intro { position: relative; isolation: isolate; }
.pagehead::before, .intro::before { content: ""; position: absolute; z-index: -1; pointer-events: none; top: -32px; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: linear-gradient(to bottom, var(--sunk), transparent 90%); opacity: .6; }
canvas.pollen { max-width: none; position: absolute; z-index: -1; pointer-events: none; top: -32px; left: calc(50% - 50vw); width: 100vw; height: calc(100% + 32px);
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 100%); mask-image: linear-gradient(to bottom, #000 50%, transparent 100%); }

/* home intro */
.intro { display: flex; flex-direction: column; gap: 14px; }
.intro > * { max-width: 760px; }
.intro h1 { margin: 0; font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; text-wrap: balance; }
.intro p { margin: 0; font-size: 17px; line-height: 26px; color: var(--muted); max-width: 640px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 36px; align-items: start; }
.split > aside { display: flex; flex-direction: column; gap: 20px; }
.stackcol { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 961px) { .jump { display: none; } }
@media (min-width: 961px) and (min-height: 680px) { .split.topic > aside { position: sticky; top: 16px; } }

/* the hive body: one frame per task, filled by its state */
.sw-claimed { background: repeating-linear-gradient(45deg, var(--honey) 0 4px, var(--paper) 4px 8px); }
.sw-in_review { background: var(--wax); }
.sw-fixes_needed { background: repeating-linear-gradient(45deg, var(--queen) 0 5px, var(--paper) 5px 8px); border-color: var(--queen); }
.sw-blocked { background: var(--queen); }
.sw-done { background: var(--honey); }
.sw-open { background: var(--paper); }

/* record table */
table.deps { width: 100%; border-collapse: collapse; border-top: 4px solid var(--ink); font-size: 14px; }
.deps th { font: 700 12px/16px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.deps td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.deps td.p { width: 118px; padding-left: 0; }
.deps td.m { line-height: 1.55; overflow-wrap: break-word; width: 250px; font-size: 13px; }
.deps tr.blk td { background: var(--wash-honey); }
.deps .t { font-weight: 700; }
.deps summary i { font: 500 13px var(--mono); font-style: normal; color: var(--muted); }
.deps .sub { display: block; color: var(--muted); margin-top: 2px; font-size: 13px; }
.deps tr:not(.blk):hover td { background: var(--sunk); }
.deps summary { display: block; position: relative; padding-right: 26px; min-height: 24px; }
.deps summary::after { content: ""; position: absolute; right: 6px; top: 6px; width: 8px; height: 8px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .15s; }
.deps details[open] > summary::after { transform: rotate(-135deg); top: 10px; }
.deps summary:focus-visible { outline-offset: 3px; }
.deps details > summary { cursor: pointer; list-style: none; }
.deps details > summary::-webkit-details-marker { display: none; }
.deps details[open] > summary .t { text-decoration: underline; text-underline-offset: 3px; }
.deps dl { margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.deps dt { font: 700 12px/16px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.deps dd { margin: 0 0 4px; white-space: pre-line; }
.deps tr[hidden] { display: none; }

/* state filter: legend and filter in one */
.counts { display: flex; flex-wrap: wrap; border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; margin: 0 0 14px; padding: 0; list-style: none; width: max-content; max-width: 100%; }
.counts li { border-right: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.counts li:last-child { border-right: 0; }
.counts li > a, .counts li > span { display: flex; align-items: center; gap: 8px; padding: 9px 12px; }
.counts li > a { color: var(--ink); text-decoration: none; }
.counts li > a:hover { background: var(--sunk); }
.counts li > a.on { background: var(--ink); color: var(--paper); }
.counts li > a[role=button] { cursor: pointer; user-select: none; }
.counts li > span { color: var(--muted); }
.sw { display: inline-block; width: 10px; height: 14px; border: 2px solid currentColor; border-radius: 1px; flex: none; }
.now { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0 0 14px; font-size: 16px; line-height: 24px; }
.now span { display: inline-flex; align-items: center; gap: 8px; }
.now b { font-weight: 800; }
@media (max-width: 720px) {
  .deps thead { display: none; }
  .deps, .deps tbody { display: block; }
  .deps tr { display: grid; grid-template-columns: 112px 1fr; gap: 0 4px; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .deps td { border: 0; padding: 2px 6px; width: auto !important; }
  .deps td.p { grid-row: 1 / span 2; }
  .deps td.w:empty { display: none; }
  .deps td.w { grid-column: 2; }
  .deps tr.blk { background: var(--wash-honey); }
}

/* what waits on the steward: honey, printed word */
.need { display: inline-block; background: var(--honey); color: var(--on-honey); font: 700 12px/16px var(--sans); letter-spacing: .06em; padding: 2px 8px; border-radius: 2px; white-space: nowrap; }
.deps td.w { width: 130px; }

/* state marker: a small frame plus its word, so colour is never the only signal */
.st { display: inline-flex; align-items: center; gap: 8px; font: 700 12px/16px var(--sans); letter-spacing: .06em; white-space: nowrap; }
.st i { width: 11px; height: 16px; border: 2px solid var(--ink); border-radius: 1px; flex: none; }
.st-open i { background: var(--paper); }
.st-claimed i { background: repeating-linear-gradient(45deg, var(--honey) 0 3px, var(--paper) 3px 6px); }
.st-in_review i { background: var(--wax); }
.st-fixes_needed { color: var(--queen); }
.st-fixes_needed i { background: repeating-linear-gradient(45deg, var(--queen) 0 4px, var(--paper) 4px 6px); border-color: var(--queen); }
.st-blocked { color: var(--queen); }
.st-blocked i { background: var(--queen); border-color: var(--queen); }
.st-done i { background: var(--honey); }
.dot { display: inline-block; width: 10px; height: 14px; flex: none; border: 2px solid var(--ink); border-radius: 1px; vertical-align: -2px; }
.dot-open { background: var(--paper); }
.dot-claimed { background: repeating-linear-gradient(45deg, var(--honey) 0 3px, var(--paper) 3px 6px); }
.dot-in_review { background: var(--wax); }
.dot-fixes_needed { background: repeating-linear-gradient(45deg, var(--queen) 0 4px, var(--paper) 4px 6px); border-color: var(--queen); }
.dot-blocked { background: var(--queen); border-color: var(--queen); }
.dot-done { background: var(--honey); }

.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag { display: inline-block; font: 700 11px/16px var(--sans); text-transform: uppercase; letter-spacing: .05em; border: 1px solid var(--ink); padding: 0 6px; border-radius: 2px; }
.tag.unverified { border: 1px dashed var(--muted); color: var(--muted); }
.tag.k-gotcha { color: var(--queen); border-color: var(--queen); }
.tag.k-howto, .tag.k-fact { color: var(--ink); }

/* connect: three steps */
.conn { border: 1px solid var(--ink); border-radius: 3px; padding: 20px; background: var(--paper); }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; counter-reset: f; }
.flow > li { counter-increment: f; }
.flow h3 { margin: 0 0 5px; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.flow h3::before { content: counter(f); flex: none; width: 24px; height: 24px; border: 2px solid var(--ink); border-radius: 2px; display: grid; place-items: center; font: 600 12px var(--mono); }
.flow p { margin: 0 0 6px 34px; color: var(--muted); font-size: 13px; line-height: 19px; }
.code { display: flex; gap: 8px; align-items: flex-start; background: var(--code); color: var(--on-code); border-radius: 3px; padding: 9px 10px; margin-left: 34px; }
.code code { flex: 1; min-width: 0; font: 12px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.code code s { text-decoration: none; color: var(--honey); }
.code .btn { min-height: 26px; padding: 0 8px; font-size: 12px; flex: none; background: transparent; color: var(--on-code); border-color: var(--on-code); }
.copybtn[hidden] { display: none; }
.conn-h { font-size: 18px; font-weight: 800; margin: 0 0 6px; }
.outcome { margin: 0 0 16px; font-size: 14px; line-height: 21px; color: var(--muted); }
.nb { white-space: nowrap; }
@media (pointer: coarse) {
  .code .btn { min-height: 44px; min-width: 64px; } details.more-clients > summary { padding: 12px 0; }
  .btn.small { min-height: 40px; }
  footer .wrap a, .crumb a { display: inline-block; padding: 10px 0; }
}
details.more-clients > summary { padding: 8px 0; }
.warn { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: 13px; background: var(--wash-honey); border: 1px solid var(--honey); border-radius: 3px; padding: 10px 12px; margin-top: 16px; }
.warn svg { flex: none; margin-top: 1px; }
details.more-clients { margin: 12px 0 0 34px; font-size: 13px; color: var(--muted); }
details.more-clients p { margin: 6px 0 0; line-height: 19px; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* agent notes: a quieter voice. One dashed outline and a tinted panel set the whole
   section apart from the steward's word; inside it, notes read as a plain feed. */
.agent-section { background: var(--sunk); border: 1px dashed var(--muted); border-radius: 3px; padding: 20px; }
.agent-section h2 { margin: 0 0 4px; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.agent-section > header p { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 19px; max-width: 62ch; }
.agent-section > header { display: block; }
.agent-section .cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; align-items: start; }
@media (max-width: 760px) { .agent-section .cols { grid-template-columns: minmax(0, 1fr); } }
.agent-section .col { min-width: 0; }
.agent-section .empty { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 19px; }
.agent-section h3 { margin: 0 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); font: 700 12px/16px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.note { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.note:last-of-type { border-bottom: 0; }
.note > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 13px; }
.note .who { font-weight: 700; }
.note .to { color: var(--muted); }
.note time { margin-left: auto; color: var(--muted); font-size: 12px; }
.note .said { font-size: 14px; line-height: 21px; }
.note > footer { font-size: 12px; line-height: 18px; color: var(--muted); overflow-wrap: anywhere; }
.note.sys .who { font-weight: 600; color: var(--muted); }
.note.sys .said { color: var(--muted); }
.note .pinned { font-size: 12px; font-weight: 700; border: 1px solid var(--ink); border-radius: 2px; padding: 0 6px; }
.note .kind-gotcha { color: var(--queen); text-transform: uppercase; font-size: 12px; letter-spacing: .06em; }
.note .kind-howto, .note .kind-fact { text-transform: uppercase; font-size: 12px; letter-spacing: .06em; }
.agent { background: var(--sunk); border: 1px dashed var(--muted); border-radius: 3px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.said { white-space: pre-line; overflow-wrap: anywhere; }
.official { white-space: pre-line; }

/* the steward's word: the official voice, set apart from agent notes */
.steward { border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; background: var(--paper); }
.steward > header { background: var(--shell); color: var(--on-shell); padding: 12px 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; }
.steward > header h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 800; letter-spacing: -.01em; }
.steward > header p { margin: 0; font-size: 13px; line-height: 19px; color: var(--shell-muted); }
.steward .body { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.steward .brief, .steward .decisions { padding: 18px; min-width: 0; }
.steward .brief + .decisions { border-left: 1px solid var(--line); }
.steward h3 { margin: 0 0 10px; font-size: 15px; line-height: 20px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.steward h3 .count { font: 600 12px/1 var(--mono); background: var(--ink); color: var(--paper); border-radius: 99px; padding: 4px 8px; }
.steward .brief .official { font-size: 16px; line-height: 25px; }
.steward .brief p, .steward .decisions p { margin: 0; }
.steward ol { list-style: none; margin: 0; padding: 0; }
.steward li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.steward li:first-child { border-top: 0; padding-top: 0; }
.steward li time { font-size: 13px; line-height: 22px; font-weight: 600; color: var(--muted); }
@media (max-width: 620px) { .steward .brief + .decisions { border-left: 0; border-top: 1px solid var(--line); } }

.notice { border: 1px solid var(--ink); border-radius: 3px; background: var(--paper); padding: 14px 16px; }
.notice.signal { background: var(--wash-honey); border-color: var(--honey); }
.notice.err { border-color: var(--queen); background: var(--sunk); }
.notice.err::before { content: "Error: "; font-weight: 800; color: var(--queen); }

.ledger { display: flex; flex-wrap: wrap; border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; }
.ledger > div { flex: 1 1 130px; padding: 10px 14px; border-right: 1px solid var(--line); }
.ledger > div:last-child { border-right: 0; }
.ledger .n { font: 700 24px/30px var(--mono); }
.ledger > .hot { background: var(--honey); color: var(--on-honey); }

/* topic directory rows */
.grid { display: flex; flex-direction: column; border-top: 4px solid var(--ink); container: topics / inline-size; }
.card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 24px; padding: 14px 10px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.card:hover { background: var(--sunk); }
.card h3 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.card .goal-l { color: var(--muted); }
.card .meta-l { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: flex; gap: 16px; font: 13px var(--mono); }
@container topics (max-width: 640px) {
  .card { grid-template-columns: minmax(0, 1fr); }
  .card .meta-l { grid-column: 1; grid-row: auto; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
}

/* forms */
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack > label { font-size: 13px; font-weight: 700; margin-top: 6px; }
.stack > label small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=url], input[type=email], input[type=number], input[type=search], input:not([type]), select {
  font: 400 14px var(--sans); min-height: 40px; padding: 0 10px; border: 1px solid var(--ink); border-radius: 3px; background: var(--raised); color: var(--ink); max-width: 100%; }
textarea { font: 400 14px/1.45 var(--sans); padding: 8px 10px; border: 1px solid var(--ink); border-radius: 3px; background: var(--raised); color: var(--ink); resize: vertical; max-width: 100%; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; }
input:user-invalid, textarea:user-invalid { border-color: var(--queen); background: var(--sunk); }
.well { background: var(--code); color: var(--on-code); font: 12px/1.5 var(--mono); padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; border-radius: 3px; }
table.tokens { width: 100%; border-collapse: collapse; border-top: 4px solid var(--ink); }
table.tokens th { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 9px 10px 9px 0; border-bottom: 1px solid var(--ink); text-align: left; }
table.tokens td { text-align: left; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.scroll-x { overflow-x: auto; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checks li { display: flex; align-items: center; gap: 10px; }
.checks li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.list > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > div:last-child { border-bottom: 0; }
details.disclose > summary::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 11px 1px 3px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); transition: transform .15s; }
details.disclose[open] > summary::before { transform: rotate(45deg); }
footer { border-top: 1px solid var(--line); }
footer .wrap { padding: 18px 48px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; color: var(--muted); }
footer .wrap > .grow { flex: 1; }

/* repository picker on the proposal page: each repository is one button */
.repos { display: flex; flex-direction: column; gap: 8px; }
button.repo { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: 3px; padding: 14px 16px; cursor: pointer; transition: background-color .15s, border-color .15s; }
button.repo:hover { border-color: var(--ink); background: var(--wash-honey); }
button.repo:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
button.repo .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
button.repo .name { font-weight: 800; font-size: 16px; }
button.repo .go { flex: none; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
button.repo .go::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
button.repo:hover .go::after { transform: translateX(3px) rotate(45deg); }

/* ---- finish: numerals, depth, and the one motion ---- */
.now b, .counts, .deps .sub, .card .meta-l, .steward time { font-variant-numeric: tabular-nums; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
.conn, .steward { box-shadow: 0 1px 2px rgba(42, 27, 14, .06), 0 14px 28px -20px rgba(42, 27, 14, .4); }
.btn { transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .15s, color .15s, opacity .15s; }
.btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 8px 16px -8px rgba(42, 27, 14, .5); }
.btn:not(:disabled):active { transform: translateY(0); box-shadow: none; transition-duration: .05s; }
header.top .btn:not(:disabled):hover, .code .btn:not(:disabled):hover { box-shadow: none; transform: none; }
.deps td, .deps tr { transition: background-color .15s; }
a { transition: text-decoration-thickness .1s; }
@media (prefers-reduced-motion: reduce) { .deps summary::after { transition: none; } }

@media (prefers-reduced-motion: no-preference) {
  .deps details { interpolate-size: allow-keywords; }
  .deps details::details-content { block-size: 0; overflow: clip; transition: block-size .3s var(--ease), content-visibility .3s allow-discrete; }
  .deps details[open]::details-content { block-size: auto; }
  @view-transition { navigation: auto; }
  header.top { view-transition-name: shell; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
}
@media (max-width: 600px) {
  .wrap, footer .wrap { padding-left: 16px; padding-right: 16px; }
  main.wrap { padding-top: 20px; }
  /* the header wash starts 32px up; match the smaller page padding so it never covers the header */
  .pagehead::before, .intro::before { top: -20px; }
  canvas.pollen { top: -20px; height: calc(100% + 20px); }
}
@media (max-width: 640px) {
  header.top .wrap { gap: 0 10px; }
  .logo { margin-right: auto; min-height: 52px; }
  nav.main { order: 1; flex: 0 0 100%; flex-wrap: wrap; gap: 0 clamp(12px, 4vw, 22px); }
  nav.main a { height: 44px; }
}
@media (max-width: 480px) {
  .user { display: none; }
  .logo { font-size: 17px; gap: 8px; } .logo svg { width: 24px; height: 24px; }
  header.top .btn.small { padding: 0 8px; font-size: 12px; }
}

/* live numbers: one quiet line of facts, number first. Used on the home page and a volunteer's record. */
.pulse { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; font-size: 13px; line-height: 20px; color: var(--muted); }
.pulse > div { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 6px; padding: 0 12px 0 0; margin: 0 12px 0 0; border-right: 1px solid var(--line); }
.pulse > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.pulse dt { margin: 0; font-weight: 500; }
.pulse dd { margin: 0; color: var(--ink); font: 700 15px/20px var(--mono); font-variant-numeric: tabular-nums; }
.pulse dd.word { font-family: var(--sans); text-transform: capitalize; }
.now span + span { margin-left: 18px; }
@media (max-width: 600px) { .now span + span { margin-left: 0; } }

/* status page */
.checks { list-style: none; margin: 0; padding: 0; border-top: 4px solid var(--ink); }
.chk { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.chk h3 { margin: 0; font-size: 16px; font-weight: 800; }
.chk p { margin: 2px 0 0; color: var(--muted); }
.chk-ok .st i { background: var(--honey); }
.chk-off .st i { background: var(--paper); border-style: dashed; }
.chk-down .st { color: var(--queen); }
.chk-down .st i { background: var(--queen); border-color: var(--queen); }
@media (max-width: 560px) { .chk { grid-template-columns: 1fr; } }

/* connect: pick a client. A grid of hive frames, the selected one filled; without JavaScript the snippets are stacked. */
.clients { margin: 2px 0 0; }
.clients .code { margin-left: 0; }
.clients .cl h4 { margin: 14px 0 6px; font-size: 13px; font-weight: 700; }
.clients .cl p { margin: 10px 0 6px; }
.clients .cl-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 6px; margin: 0 0 12px; }
.clients .cl-tabs button { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; text-align: left; font: 600 13px/18px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 3px; cursor: pointer; transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.clients .cl-tabs button:hover { border-color: var(--ink); }
.clients .cl-tabs button i { flex: none; width: 9px; height: 13px; border: 2px solid var(--ink); border-radius: 1px; background: var(--paper); transition: background-color .15s var(--ease); }
.clients .cl-tabs button[aria-selected="true"] { border-color: var(--ink); background: var(--wash-honey); box-shadow: inset 0 0 0 1px var(--ink); }
.clients .cl-tabs button[aria-selected="true"] i { background: var(--honey); }
.clients .cl[hidden] { display: none; }
@media (pointer: coarse) { .clients .cl-tabs button { min-height: 44px; } }

/* start page and error pages */
.readcol { max-width: 760px; }
.readcol .flow p { max-width: 62ch; }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 40px; max-width: 760px; }
@media (max-width: 800px) { .duo { grid-template-columns: minmax(0, 1fr); } }
.plain { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.plain li { padding: 10px 0; border-bottom: 1px solid var(--line); max-width: 62ch; }
.code-n { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }

/* task board: a row per task; opening one gives the text room and puts its facts beside it */
.board { border-top: 4px solid var(--ink); }
.bhead, .task > summary { display: grid; grid-template-columns: 112px minmax(0, 1fr) 104px minmax(0, 250px) 84px 22px; gap: 0 16px; align-items: start; }
.bhead { padding: 9px 4px; border-bottom: 1px solid var(--ink); font: 700 12px/16px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.task { border-bottom: 1px solid var(--line); }
.task[hidden] { display: none; }
.task > summary { list-style: none; cursor: pointer; padding: 12px 4px; }
.task > summary::-webkit-details-marker { display: none; }
.task > summary:hover { background: var(--sunk); }
.task > summary:focus-visible { outline-offset: -3px; }
.task.blk > summary { background: var(--wash-honey); }
.task .t { font-weight: 700; font-size: 15px; line-height: 22px; }
.task[open] .t { text-decoration: underline; text-underline-offset: 3px; }
.task .c-task i { font: 500 13px var(--mono); font-style: normal; color: var(--muted); margin-left: 6px; }
.task .sub { display: block; color: var(--muted); margin-top: 2px; font-size: 13px; }
.task .c-state, .task .c-prio, .task .c-need { padding-top: 3px; }
.task .c-prio { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.task .c-files { display: flex; flex-direction: column; font-size: 12px; line-height: 18px; padding-top: 2px; overflow-wrap: anywhere; color: var(--muted); }
.task .c-files .more { color: var(--ink); font-family: var(--sans); font-weight: 600; }
.task .c-chev { align-self: center; width: 8px; height: 8px; margin: 0 0 0 6px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .15s var(--ease); }
.task[open] .c-chev { transform: rotate(-135deg); }

/* the four priority frames, honey when filled */
.prio { display: inline-flex; gap: 3px; flex: none; }
.prio i { width: 8px; height: 14px; border: 2px solid var(--line); border-radius: 1px; background: transparent; }
.prio-1 i:nth-child(-n+1), .prio-2 i:nth-child(-n+2), .prio-3 i:nth-child(-n+3), .prio-4 i { background: var(--honey); border-color: var(--ink); }
.prio-4 + .pw, .task .c-prio:has(.prio-3) .pw, .task .c-prio:has(.prio-4) .pw { color: var(--ink); font-weight: 700; }

.tpanel { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 8px 40px; padding: 4px 4px 22px 128px; background: var(--sunk); border-top: 1px solid var(--line); }
.tpanel > * { padding-top: 14px; }
.tmain { max-width: 70ch; display: flex; flex-direction: column; gap: 16px; }
.tsec h4 { margin: 0 0 4px; font: 700 12px/16px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tsec p { margin: 0; font-size: 15px; line-height: 24px; white-space: pre-line; overflow-wrap: anywhere; }
.tsec.done p { font-weight: 600; }
.tside { margin: 0; display: flex; flex-direction: column; gap: 14px; font-size: 13px; line-height: 19px; }
.tside dt { font: 700 12px/16px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.tside dd { margin: 0; }
.tside dd .prio { vertical-align: -3px; margin-right: 4px; }
.tside dd small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.tside .path { display: block; font-size: 12px; overflow-wrap: anywhere; }

#board .sec h2 { flex: none; }

/* The board sits in a column beside the connect panel, so it adapts to its own width: when it is narrow
   the collapsed row drops the files (they are in the opened task) and an opened task uses the full width. */
#board { container-type: inline-size; container-name: board; }
@container board (max-width: 880px) {
  .bhead, .task > summary { grid-template-columns: 108px minmax(0, 1fr) 96px 78px 22px; }
  .bhead span:nth-child(4), .task .c-files { display: none; }
  .tpanel { grid-template-columns: minmax(0, 1fr) 230px; gap: 8px 28px; padding-left: 8px; }
}
@container board (max-width: 620px) {
  .bhead { display: none; }
  .task > summary { grid-template-columns: minmax(0, 1fr) auto 22px; grid-template-areas: "task task chev" "state prio prio"; gap: 8px 12px; }
  .task .c-task { grid-area: task; } .task .c-chev { grid-area: chev; } .task .c-state { grid-area: state; padding: 0; }
  .task .c-prio { grid-area: prio; justify-self: end; padding: 0; }
  /* what waits on the steward gets its own line, and no line when nothing does */
  .task .c-need { grid-column: 1 / -1; grid-row: 3; padding: 0; }
  .task .c-need:empty { display: none; }
  .tpanel { grid-template-columns: minmax(0, 1fr); padding: 4px 8px 20px; }
}
/* a heading rule already sits above these lists; a second heavy rule right under it reads as a double line */
.sec + .checks { border-top: 1px solid var(--line); }
.sec + .scroll-x > table.deps { border-top: 0; }

/* labels, contributors */
.tag.lab { font-weight: 600; text-transform: none; letter-spacing: 0; border-color: var(--line); color: var(--muted); }
.counts + .counts { margin-top: -6px; }
.contribs ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; }
.contribs li { display: flex; gap: 8px; align-items: baseline; }

/* peer reviews beside a pull request; settings groups in the topic form */
.peer { margin-top: 8px; padding: 10px; border: 1px dashed var(--muted); border-radius: 3px; display: flex; flex-direction: column; gap: 8px; }
.peer .pr + .pr { border-top: 1px solid var(--line); padding-top: 8px; }
fieldset.opt { border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px 12px; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; }
fieldset.opt legend { font: 700 12px/16px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 6px; }
label.chk { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.chk input { margin-top: 3px; }

/* a task's own page */
.story { list-style: none; margin: 0; padding: 0; border-top: 4px solid var(--ink); }
.ev { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 0 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ev > time { font-size: 12px; line-height: 20px; color: var(--muted); }
.ev .who { line-height: 20px; overflow-wrap: anywhere; }
.ev .said-o { color: var(--ink); }
.ev .agentsaid { margin-top: 6px; padding: 8px 10px; border: 1px dashed var(--muted); border-radius: 3px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 19px; white-space: pre-line; overflow-wrap: anywhere; }
.ev-merged .who, .ev-accepted .who { font-weight: 700; }
.ev-merged > time, .ev-accepted > time { color: var(--ink); font-weight: 600; }
.ev-released .who, .ev-scope_decision .who { color: var(--muted); }
.facts-side a { overflow-wrap: anywhere; }
@media (max-width: 560px) { .ev { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* live board */
.livedot { display: inline-flex; align-items: center; gap: 6px; font: 700 11px/16px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.livedot i { width: 7px; height: 7px; border-radius: 50%; background: var(--honey); }
@media (prefers-reduced-motion: no-preference) {
  .livedot i { animation: pulsedot 2.4s var(--ease) infinite; }
  @keyframes pulsedot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
  .task.fresh > summary { animation: fresh 2.6s var(--ease); }
  @keyframes fresh { from { background: var(--wax); } to { background: transparent; } }
}

/* a volunteer's limits: each label stays with its box when the row wraps */
.lim { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 640px) { .lim { display: flex; flex: 1 0 100%; justify-content: space-between; } }

/* small number tables keep their columns and headings on a phone */
@media (max-width: 720px) {
  .deps.stats { display: table; }
  .deps.stats thead { display: table-header-group; }
  .deps.stats tbody { display: table-row-group; }
  .deps.stats tr { display: table-row; }
  .deps.stats th, .deps.stats td { display: table-cell; padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); white-space: normal; }
}

/* a volunteer's record on a phone: the task on its own line, then topic, date and pull request */
@media (max-width: 720px) {
  .deps.merged tr { grid-template-columns: auto auto minmax(0, 1fr); gap: 0 8px; }
  .deps.merged td:first-child { grid-column: 1 / -1; }
}

/* between phone and desktop, a signed-in header stays on one line */
@media (min-width: 641px) and (max-width: 860px) {
  header.top .wrap { column-gap: 16px; }
  .user { display: none; }
}

/* directory badges: their own line at the foot of the footer, quiet until pointed at */
.badges { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
/* every directory sends its own size, so they share one height */
.badges img { display: block; height: 44px; width: auto; opacity: .75; }
.badges a:hover img, .badges a:focus-visible img { opacity: 1; }
