/* TheCloudFixies Hub — matches thecloudfixies.com: neo-brutalist cards, ink borders, blue primary, lime "done".
   Tokens from the site's theme.css. Light on :root; dark via data-theme or the OS preference. */
:root {
  --topbar-h: 58px; --rail-w: 64px; --side-w: 248px;
  --bg: #F4F4F8; --bg-2: #FFFFFF; --bg-3: #EDEDF3;
  --ink: #08080D; --ink-2: #3D3D4A; --ink-3: #666675; --line: #E4E4EB;
  --acc-blue: #0033FF; --acc-blue-hi: #3355FF; --acc-mag: #C2410C; --acc-mag-hi: #E85D2C;
  --acc-amber: #FFB020; --acc-lime: #C6FF3E; --acc-coral: #FF5B41;
  --shadow-brut: 6px 6px 0 #08080D; --shadow-brut-lg: 9px 9px 0 #08080D; --shadow-brut-sm: 3px 3px 0 #08080D;
  --focus: #0033FF; --link: #0033FF;
  --f-display: "Bricolage Grotesque", "Space Grotesk", system-ui, sans-serif;
  --f-sans: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  /* status colours used by dots and charts */
  --s-none: var(--ink-3); --s-partly: var(--acc-amber); --s-prog: var(--acc-blue); --s-rft: var(--acc-blue);
  --s-testing: var(--acc-blue-hi); --s-failed: var(--acc-mag); --s-passed: var(--acc-lime); --s-prod: var(--acc-lime);
  --danger: var(--acc-mag);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #08080D; --bg-2: #12121C; --bg-3: #1B1B28;
  --ink: #F4F4F8; --ink-2: #B5B5C4; --ink-3: #8B8B9A; --line: #2A2A38;
  --shadow-brut: 6px 6px 0 rgba(255,46,128,0.9); --shadow-brut-lg: 9px 9px 0 rgba(255,46,128,0.9); --shadow-brut-sm: 3px 3px 0 rgba(255,46,128,0.9);
  --focus: #5C7CFF; --danger: #FF7A45; --link: #8FA5FF;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08080D; --bg-2: #12121C; --bg-3: #1B1B28;
    --ink: #F4F4F8; --ink-2: #B5B5C4; --ink-3: #8B8B9A; --line: #2A2A38;
    --shadow-brut: 6px 6px 0 rgba(255,46,128,0.9); --shadow-brut-lg: 9px 9px 0 rgba(255,46,128,0.9); --shadow-brut-sm: 3px 3px 0 rgba(255,46,128,0.9);
    --focus: #5C7CFF; --danger: #FF7A45; --link: #8FA5FF;
    color-scheme: dark;
  }
}

* { box-sizing: border-box }
[hidden] { display: none !important }
html { background: var(--bg) }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-sans); font-size: 14px; line-height: 1.5 }
a { color: var(--link) }
h1, h2, h3 { margin: 0 }
h1 { font-family: var(--f-display); font-weight: 800; font-size: 34px; letter-spacing: -0.045em; line-height: 0.95 }
h1 em, .accent { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em }
h2 { font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: -0.03em; line-height: 1.05 }
.eyebrow, .lbl, .mono-lbl { font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3) }
.mono { font-family: var(--f-mono); font-size: 12px; word-break: break-all }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px }
.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); max-width: 1500px; margin-inline: auto }
.skip { position: absolute; left: -9999px; top: 0; background: var(--acc-blue); color: #fff; padding: 8px 12px; z-index: 50 }
.skip:focus { left: 8px; top: 8px }
.note { font-size: 13px; color: var(--ink-2); margin: 0 }
.spacer { flex: 1 }

/* ---------- header ---------- */
.shell-head { background: var(--bg-2); border-bottom: 1.5px solid var(--ink); position: sticky; top: 0; z-index: 30 }
.topbar { display: flex; align-items: center; gap: 10px 14px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); min-height: var(--topbar-h) }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; white-space: nowrap }
.logo img { width: 38px; height: 37px; display: block }
.logo .word { font-family: var(--f-display); font-weight: 800; font-size: 20px; letter-spacing: -0.045em; color: var(--ink) }
.logo .word b { color: var(--link); font-weight: 800 }
.logo .hubtag { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.24em; font-weight: 500; border: 1.5px solid var(--ink); border-radius: 4px; padding: 1px 5px; color: var(--ink) }
.userbox { display: flex; align-items: center; gap: 8px; white-space: nowrap }
.chip { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 10px; color: var(--ink); background: var(--bg-2); max-width: 220px; overflow: hidden; text-overflow: ellipsis }
.chip.role { background: var(--bg-3); text-transform: uppercase; letter-spacing: 0.2em }

/* ---------- buttons, inputs ---------- */
.btn { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 5px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px }
.btn:hover { background: var(--ink); color: var(--bg) }
.btn.primary { background: var(--acc-blue); color: #fff; box-shadow: var(--shadow-brut) }
.btn.primary:hover { background: var(--acc-blue-hi); color: #fff }
.btn[disabled] { opacity: .5; cursor: not-allowed }
@media (prefers-reduced-motion: no-preference) {
  .btn.primary { transition: transform .12s ease, box-shadow .12s ease }
  .btn.primary:hover:not([disabled]) { transform: translate(-3px, -3px); box-shadow: var(--shadow-brut-lg) }
  .btn.primary:active:not([disabled]) { transform: translate(2px, 2px); box-shadow: var(--shadow-brut-sm) }
  .card { transition: box-shadow .12s ease, transform .12s ease }
}
.btn.block { width: 100%; padding: 10px 14px }
.icon-btn { font: inherit; font-size: 15px; line-height: 1; width: 32px; height: 32px; border: 1.5px solid var(--ink); border-radius: 5px; background: transparent; color: var(--ink); cursor: pointer }
.icon-btn:hover { background: var(--ink); color: var(--bg) }
input, select, textarea { font: inherit; font-size: 13px; color: var(--ink); background: var(--bg-2); border: 1.5px solid var(--ink); border-radius: 5px; padding: 7px 9px; min-width: 0 }
input[type=checkbox] { accent-color: var(--link); width: 16px; height: 16px; padding: 0 }
textarea { min-height: 70px; resize: vertical }
input:disabled, select:disabled, textarea:disabled { opacity: .65; background: var(--bg-3) }

/* ---------- page ---------- */
main.wrap { padding-bottom: 48px }
.page-head { display: grid; gap: 10px; padding-block: 26px 14px }
.page-head p { color: var(--ink-2); font-size: 14px; max-width: 80ch; margin: 0 }
.panel { background: var(--bg-2); border: 1.5px solid var(--ink); border-radius: 6px; padding: 16px 18px; display: grid; gap: 12px; align-content: start; min-width: 0 }
.panel + .panel { margin-top: 14px }
.panel > *, .cards-grid > *, .grid-2 > * { min-width: 0 }
.state { padding: 48px 0; text-align: center; color: var(--ink-2) }
.state h2 { color: var(--ink); margin-bottom: 6px }

/* status dots and pills */
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; border: 1px solid var(--ink) }
.st { display: inline-flex; align-items: center; font-family: var(--f-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  border: 1.5px solid var(--ink); border-radius: 4px; padding: 2px 6px; white-space: nowrap; color: var(--ink); background: var(--bg-2) }
.st-not-started { background: var(--bg-3) }
.st-partly-built { background: var(--acc-amber); color: #08080D }
.st-in-progress { background: var(--acc-blue); color: #fff }
.st-ready-for-test, .st-testing { border-color: var(--link); color: var(--link); background: var(--bg-2) }
:root[data-theme="dark"] .st-ready-for-test, :root[data-theme="dark"] .st-testing { border-color: #5C7CFF; color: #8FA5FF }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .st-ready-for-test, :root:not([data-theme="light"]) .st-testing { border-color: #5C7CFF; color: #8FA5FF } }
.st-failed { background: var(--acc-mag); color: #fff }
.st-passed, .st-on-production { background: var(--acc-lime); color: #08080D }
.st-not-applicable { border-style: dashed; color: var(--ink-3); background: transparent }
.tag { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); background: var(--bg-3); color: var(--ink-2); white-space: nowrap }
.tag.p { background: var(--ink); color: var(--bg); border-color: var(--ink) }
.tag.hi, .tag.p1 { background: var(--acc-mag); color: #fff; border-color: var(--acc-mag) }
.tag.lime { background: var(--acc-lime); color: #08080D; border-color: var(--ink) }

/* ---------- board band ---------- */
.band { background: var(--bg-2); border: 1.5px solid var(--ink); border-radius: 6px; box-shadow: var(--shadow-brut); margin: 22px 6px 6px 0; padding: 18px 20px; display: grid; gap: 16px }
.band .brand { display: grid; gap: 6px }
.band .sub { margin: 0; color: var(--ink-2); font-size: 13px; max-width: 80ch }
.top { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: stretch }
.big { display: grid; gap: 6px; align-content: start }
.big .num, .stat .num { font-family: var(--f-display); font-weight: 800; font-size: 56px; letter-spacing: -0.045em; line-height: 0.95; font-variant-numeric: tabular-nums }
.delta { font-size: 12px; color: var(--ink-2) }
.delta.up { color: var(--link); font-weight: 600 }
.counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; align-content: start }
.count { background: var(--bg-3); border: 1.5px solid var(--ink); border-radius: 5px; padding: 6px 9px; display: grid; gap: 2px }
.count b { font-family: var(--f-display); font-size: 22px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums }
.count span { font-size: 11px; color: var(--ink-2); display: flex; align-items: center; gap: 6px }
.trend { background: var(--bg-3); border: 1.5px solid var(--ink); border-radius: 5px; padding: 8px 10px; min-width: 0; display: grid; gap: 4px; color: var(--ink-2) }
.trend svg { width: 100%; height: auto; display: block }
.plats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 18px }
.plat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; font-size: 13px; cursor: pointer; background: none; border: 1.5px solid transparent; border-radius: 5px; color: inherit; text-align: left; padding: 5px 6px; font-family: inherit }
.plat:hover { border-color: var(--ink) }
.plat .bar { grid-column: 1 / -1; height: 8px; background: var(--bg-3); border: 1px solid var(--ink); border-radius: 3px; overflow: hidden }
.plat .bar i { display: block; height: 100%; background: var(--acc-blue) }
.plat .pct { font-family: var(--f-mono); font-size: 12px; color: var(--ink-2) }
.plat .pct em { font-style: normal; color: var(--link); margin-left: 4px; font-weight: 600 }
.plat[aria-pressed="true"] { border-color: var(--ink); background: var(--bg-3) }
.plat[aria-pressed="true"] .name { font-weight: 700 }

/* ---------- tools ---------- */
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-block: 18px 12px }
.tools input[type=search] { flex: 1 1 200px; max-width: 340px }
.tools label.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2) }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 5px; overflow: hidden }
.seg button { font: inherit; font-size: 13px; font-weight: 600; border: 0; background: var(--bg-2); color: var(--ink-2); padding: 6px 12px; cursor: pointer }
.seg button + button { border-left: 1.5px solid var(--ink) }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg) }

/* ---------- board ---------- */
.board-scroll { overflow-x: auto; padding: 0 6px 16px 0; overscroll-behavior-x: contain; max-width: 100% }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 12px }
.col { background: var(--bg-3); border: 1.5px solid var(--ink); border-radius: 6px; display: flex; flex-direction: column; min-height: 200px; max-height: 78vh }
.col.drop { outline: 2px dashed var(--acc-blue); outline-offset: 2px }
.col h2 { font-family: var(--f-sans); font-size: 13px; letter-spacing: 0; padding: 10px 10px 8px; display: flex; align-items: center; gap: 8px; border-bottom: 1.5px solid var(--ink) }
.col h2 .n { margin-left: auto; font-family: var(--f-mono); font-size: 12px; color: var(--ink-2) }
.cards { padding: 8px; display: grid; gap: 8px; overflow-y: auto; align-content: start }
.card { background: var(--bg-2); border: 1.5px solid var(--ink); border-radius: 5px; padding: 9px 10px; display: grid; gap: 6px; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100% }
.card:hover { box-shadow: var(--shadow-brut-sm) }
.card .meta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 11px; color: var(--ink-2) }
.card .title { font-weight: 600; font-size: 13px; line-height: 1.3 }
.card .now { font-size: 12px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.card .foot { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-2) }
.due.late { color: var(--danger); font-weight: 700 }
.empty-col { font-size: 12px; color: var(--ink-3); padding: 8px 4px }
.agent { color: var(--link); font-weight: 600 }

/* ---------- tables ---------- */
.list-scroll, .tbl-wrap { overflow-x: auto; max-width: 100% }
table { width: 100%; border-collapse: collapse; background: var(--bg-2); border: 1.5px solid var(--ink); font-size: 13px }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top }
th { font-family: var(--f-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; background: var(--bg-3); border-bottom: 1.5px solid var(--ink) }
.list-scroll tbody tr { cursor: pointer }
.list-scroll tbody tr:hover td { background: var(--bg-3) }
table.plain tbody tr { cursor: default }
.pill { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px }

/* ---------- feed / scale ---------- */
.below { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; padding-block: 12px 32px }
.below .panel + .panel { margin-top: 0 }
.feed { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; max-height: 360px; overflow-y: auto }
.feed li { font-size: 13px; display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; align-items: start }
.feed time, .hist time { color: var(--ink-3); display: block; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase }
.scale { display: grid; gap: 5px; font-size: 13px; color: var(--ink-2) }
.scale div { display: flex; align-items: center; gap: 8px }
.scale b { margin-left: auto; font-family: var(--f-mono); font-weight: 500; color: var(--ink) }

/* ---------- dialog ---------- */
dialog { border: 1.5px solid var(--ink); border-radius: 6px; padding: 0; background: var(--bg-2); color: var(--ink); width: min(660px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-shadow: var(--shadow-brut) }
dialog::backdrop { background: rgba(8, 8, 13, .55) }
.dlg { display: grid; gap: 12px; padding: 18px 20px 20px }
.dlg header { display: grid; gap: 6px }
.dlg header .meta { font-size: 12px; color: var(--ink-2); display: flex; gap: 6px; flex-wrap: wrap; align-items: center }
.dlg h3 { font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: -0.035em; line-height: 1.05 }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px }
.dlg .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px }
.fld { display: grid; gap: 5px; min-width: 0 }
.fld > span { font-family: var(--f-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2) }
.fld input:not([type=checkbox]), .fld select, .fld textarea { width: 100% }
.ro { font-size: 13px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px; margin: 0 }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 12px; color: var(--ink-2); max-height: 160px; overflow-y: auto }
.hist li b { color: var(--ink); font-weight: 600 }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center }
.actions .msg { margin-right: auto; font-size: 12px; color: var(--danger); font-weight: 600 }
.toast { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); border: 1.5px solid var(--ink); padding: 8px 14px; border-radius: 5px; font-size: 13px; font-weight: 600; z-index: 30; box-shadow: var(--shadow-brut-sm) }

/* ---------- sign-in pages ---------- */
.auth { max-width: 440px; margin: 40px auto; display: grid; gap: 16px }
.auth-brand { display: flex; align-items: center; gap: 12px }
.auth-brand img { width: 64px; height: 62px }
.auth-brand > div { display: grid; gap: 6px }
.auth .panel { padding: 24px; gap: 14px; box-shadow: var(--shadow-brut); margin-right: 6px }
.auth h1 { font-size: 30px }
.err { color: var(--danger); font-size: 13px; font-weight: 600; margin: 0; min-height: 1em }
.ok { font-size: 13px; margin: 0; font-weight: 600 }
.qr { display: grid; justify-items: center; gap: 8px }
.qr img { width: 200px; height: 200px; background: #fff; padding: 6px; border: 1.5px solid var(--ink); border-radius: 5px }
.secretbox { display: flex; gap: 8px; align-items: center; background: var(--bg-3); border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px }
.secretbox .mono { flex: 1; min-width: 0 }

/* ---------- overview / investor / roadmap / team ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; padding: 6px 6px 14px 0 }
.stat { background: var(--bg-2); border: 1.5px solid var(--ink); border-radius: 6px; padding: 16px; display: grid; gap: 10px; text-decoration: none; color: inherit; align-content: start }
a.stat:hover { box-shadow: var(--shadow-brut) }
.stat .num { font-size: 48px }
.meter { display: block; height: 10px; background: var(--bg-3); border: 1px solid var(--ink); border-radius: 3px; overflow: hidden }
.meter i { display: block; height: 100%; background: var(--acc-blue) }
.mini-counts { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--ink-2) }
.mini-counts span { display: inline-flex; align-items: center; gap: 4px }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-block: 8px }
.grid-2 .panel + .panel { margin-top: 0 }
.ms-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px }
.ms-list li { display: grid; gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 9px }
.ms-list li:last-child { border-bottom: 0 }
.ms-list .when { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--ink-3); text-transform: uppercase }
.ms-list .gate { font-size: 12px; color: var(--ink-2) }
.spill { display: inline-flex; align-items: center; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; border: 1.5px solid var(--ink); background: var(--bg-3); color: var(--ink); white-space: nowrap }
.spill.on_track { background: var(--acc-blue); color: #fff }
.spill.at_risk { background: var(--acc-amber); color: #08080D }
.spill.done { background: var(--acc-lime); color: #08080D }
.spill.missed { background: var(--acc-mag); color: #fff }
.timeline-scroll { overflow-x: auto; padding-bottom: 8px; max-width: 100% }
.timeline { display: grid; grid-template-columns: 140px repeat(6, minmax(180px, 1fr)); gap: 8px; min-width: 1200px }
.timeline .qh { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); padding: 6px 4px; border-bottom: 1.5px solid var(--ink) }
.timeline .qh.now { color: var(--link); border-bottom: 3px solid var(--acc-blue); font-weight: 700 }
.timeline .ph { font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: -0.03em; padding: 8px 4px; align-self: start }
.timeline .cell { display: grid; gap: 6px; align-content: start; min-height: 40px; background: var(--bg-3); border-radius: 5px; padding: 6px }
.mcard { background: var(--bg-2); border: 1.5px solid var(--ink); border-left-width: 5px; border-left-color: var(--link); border-radius: 5px; padding: 7px 8px; display: grid; gap: 5px; font-size: 12px }
.mcard.funding { border-left-color: var(--acc-lime) }
.mcard .t { font-weight: 600 }
.mcard .row { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; color: var(--ink-2); font-size: 11px }
.mcard select { font-size: 11px; padding: 1px 4px }
.num-cell { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap }
table.plain td input[type=number] { width: 100px }
.badge-internal { font-family: var(--f-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .16em; color: var(--ink-2); border: 1px dashed var(--ink-3); border-radius: 4px; padding: 0 4px; margin-left: 4px }
.team-card h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.team-card h3 { margin-top: 4px }

/* ---------- people ---------- */
.form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end }
.form-row .fld { flex: 1 1 180px }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px }
.checks label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap }
.people-table td select { font-size: 12px; padding: 3px 6px }
.status-tag { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; border: 1.5px solid var(--ink); background: var(--bg-3) }
.status-tag.active { background: var(--acc-lime); color: #08080D }
.status-tag.disabled, .status-tag.revoked { background: var(--acc-mag); color: #fff }
.once { border: 1.5px solid var(--ink); background: var(--bg-3); border-radius: 6px; padding: 12px; display: grid; gap: 8px; box-shadow: var(--shadow-brut-sm) }
.once p { margin: 0; font-size: 12px }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px }
.row-actions .btn { padding: 4px 8px; font-size: 12px }

@media (max-width: 980px) {
  .top { grid-template-columns: minmax(0, 1fr) }
  .below, .grid-2 { grid-template-columns: minmax(0, 1fr) }
}
@media (max-width: 560px) {
  h1 { font-size: 28px }
  .counts { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .grid2, .dlg .grid3 { grid-template-columns: minmax(0, 1fr) }
  .band { padding: 14px 12px }
  .big .num { font-size: 46px }
  .tools input[type=search] { max-width: none }
  .topbar { gap: 6px 10px }
  .chip { max-width: 140px }
  .logo .word { font-size: 18px }
}

/* ---------- documents ---------- */
.docs-layout { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 14px; align-items: start; padding-block: 6px }
.docs-layout .panel + .panel, .docs-col .panel + .panel { margin-top: 14px }
.docs-col { min-width: 0 }
.folder-list { display: grid; gap: 4px }
.folder-list button { font: inherit; font-size: 13px; display: flex; justify-content: space-between; gap: 8px; text-align: left; padding: 7px 9px; border: 1.5px solid transparent; border-radius: 5px; background: none; color: var(--ink); cursor: pointer }
.folder-list button:hover { border-color: var(--ink) }
.folder-list button[aria-pressed="true"] { background: var(--acc-blue); color: #fff; border-color: var(--ink); font-weight: 600 }
.folder-list .n { font-family: var(--f-mono); font-size: 11px; opacity: .8 }
.docs-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between }
.chk-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px }
.upload-form { display: grid; gap: 8px; background: var(--bg-3); border: 1.5px solid var(--ink); border-radius: 6px; padding: 10px 12px }
.upload-form input[type=file] { max-width: 100%; background: var(--bg-2) }
@media (max-width: 760px) { .docs-layout { grid-template-columns: minmax(0, 1fr) } }

/* ---------- reviews / settings ---------- */
.btn.mini { padding: 1px 7px; font-size: 11px; font-weight: 600; vertical-align: middle }
.review-list { display: grid; gap: 12px }
.review-list .panel + .panel { margin-top: 0 }
.review-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center }
.review .about, .review .body, .review .reply { margin: 0; font-size: 13px }
.review .body { white-space: pre-wrap }
.review .reply { background: var(--bg-3); border-left: 4px solid var(--acc-blue); padding: 6px 10px; border-radius: 4px; white-space: pre-wrap }
.review.closed { opacity: .75 }
.slots { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2) }
.reply-form { display: grid; gap: 8px; border-top: 1px dashed var(--line); padding-top: 10px }
.status-tag.rv-open { background: var(--acc-amber); color: #08080D }
.status-tag.rv-answered { background: var(--acc-blue); color: #fff }
.settings-list { display: grid; gap: 8px }

/* ---------- investor: summary, scorecard, charts ---------- */
.draft-banner { margin: 0; background: var(--acc-amber); color: #08080D; border: 1.5px solid var(--ink); border-radius: 5px; padding: 8px 12px; font-weight: 700; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px }
.kv-grid > div { display: grid; gap: 4px; background: var(--bg-3); border: 1.5px solid var(--ink); border-radius: 5px; padding: 10px 12px }
.big-figure { font-family: var(--f-display); font-weight: 800; font-size: 26px; letter-spacing: -0.03em; line-height: 1.05 }
tr.total td { font-weight: 700; border-top: 1.5px solid var(--ink) }
.score-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px }
.score { display: grid; gap: 3px; border: 1.5px solid var(--ink); border-radius: 5px; padding: 8px 10px; background: var(--bg-2) }
.score b { font-family: var(--f-display); font-size: 22px; font-weight: 700; letter-spacing: -0.03em }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px }
.chart-grid figure { margin: 0; display: grid; gap: 4px; background: var(--bg-3); border: 1.5px solid var(--ink); border-radius: 5px; padding: 8px 10px; color: var(--ink-2) }
svg.chart { width: 100%; height: auto; display: block }
svg.spark { width: 110px; height: 28px; display: block }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--ink-2) }
.legend span { display: inline-flex; align-items: center; gap: 5px }
.legend .sw { display: inline-block; width: 16px; height: 0; border-top: 2.5px solid }
.legend .sw.dashed { border-top-style: dashed }
details.owner-edit > summary { cursor: pointer; font-weight: 700; font-family: var(--f-display); font-size: 16px }
.score-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px }

/* ---------- growth ---------- */
.growth-table td input[type=number] { width: 90px }
table.plain td input:not([type=checkbox]), table.plain td select { font-size: 12px; padding: 3px 6px }
.cell-stack { display: grid; gap: 3px; min-width: 90px }
.inline-add { align-items: center }
.inline-add input { flex: 1 1 160px }
.notice-line { margin: 0; border: 1.5px dashed var(--ink-3); border-radius: 5px; padding: 8px 12px; color: var(--ink-2); font-size: 13px }
.chart-fig { margin: 0; display: grid; gap: 4px; background: var(--bg-3); border: 1.5px solid var(--ink); border-radius: 5px; padding: 8px 10px; color: var(--ink-2); max-width: 720px }
.st.seo-done { background: var(--acc-lime); color: #08080D }
.st.seo-in-progress { background: var(--acc-blue); color: #fff }
.st.seo-not-working, .st.seo-blocked { background: var(--acc-mag); color: #fff }
.st.seo-not-started { background: var(--bg-3) }

/* ---------- left sidebar (rail + expand on hover/focus, pin; drawer below 900px) ---------- */
.menu-btn { display: none; font-size: 17px }
.sidebar { position: fixed; top: calc(var(--topbar-h) + 1.5px); bottom: 0; left: 0; z-index: 25; width: var(--rail-w); background: var(--bg-2); border-right: 1.5px solid var(--ink);
  display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding-block: 8px }
.sidebar:hover, .sidebar:focus-within, body.nav-pinned .sidebar { width: var(--side-w) }
body.with-sidebar #app { margin-left: var(--rail-w); margin-right: auto }
body.with-sidebar.nav-pinned #app { margin-left: var(--side-w) }
/* An expanded menu pushes the page instead of covering it, on hover and keyboard focus too. */
body.with-sidebar:has(.sidebar:hover) #app, body.with-sidebar:has(.sidebar:focus-within) #app { margin-left: var(--side-w) }
.side-nav { display: grid; gap: 2px; align-content: start }
.side-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px }
.nav-group + .nav-group { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px }
.nav-glabel { display: block; font-family: var(--f-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3); padding: 6px 20px 4px; white-space: nowrap }
.side-nav a, .pin-btn { display: flex; align-items: center; gap: 12px; margin: 0 10px; padding: 8px 10px; border: 1.5px solid transparent; border-radius: 5px; color: var(--ink-2);
  text-decoration: none; font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; background: none; cursor: pointer; text-align: left; min-height: 40px }
.side-nav a svg, .pin-ico { flex: none; width: 20px; height: 20px; display: inline-grid; place-items: center }
.side-nav a:hover, .pin-btn:hover { color: var(--ink); border-color: var(--ink) }
.side-nav a[aria-current="page"] { color: #fff; background: var(--acc-blue); border-color: var(--ink); box-shadow: var(--shadow-brut-sm) }
.nav-text { display: grid; min-width: 0 }
.nav-label { overflow: hidden; text-overflow: ellipsis }
.nav-sub { font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis }
.side-nav a[aria-current="page"] .nav-sub { color: #fff; opacity: .85 }
.pin-btn { margin-top: auto; color: var(--ink-3) }
.pin-btn[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); background: var(--bg-3) }
/* collapsed rail: labels stay in the accessibility tree but are visually hidden */
body:not(.nav-pinned):not(.drawer-open) .sidebar:not(:hover):not(:focus-within) .nav-text,
body:not(.nav-pinned):not(.drawer-open) .sidebar:not(:hover):not(:focus-within) .nav-glabel {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap }
.nav-backdrop { position: fixed; inset: 0; background: rgba(8, 8, 13, .55); z-index: 35 }
@media (prefers-reduced-motion: no-preference) {
  .sidebar { transition: width .18s ease, transform .22s ease, box-shadow .18s ease }
  body.with-sidebar #app { transition: margin-left .18s ease }
}
@media (max-width: 899px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center }
  .sidebar, .sidebar:hover, .sidebar:focus-within, body.nav-pinned .sidebar { top: 0; width: min(300px, 86vw); z-index: 40; transform: translateX(-105%); box-shadow: none; visibility: hidden }
  body.drawer-open .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-brut) }
  body.with-sidebar #app, body.with-sidebar.nav-pinned #app, body.with-sidebar:has(.sidebar:hover) #app, body.with-sidebar:has(.sidebar:focus-within) #app { margin-left: auto }
  .pin-btn { display: none }
}

/* ---------- investor: status by platform; roadmap done ---------- */
.stack { display: flex; height: 14px; min-width: 160px; border: 1.5px solid var(--ink); border-radius: 3px; overflow: hidden; background: var(--bg-3) }
.stack i { display: block; height: 100%; border-right: 1px solid var(--ink) }
.stack i:last-child { border-right: 0 }
.platform-table td { vertical-align: middle }
.done-badge { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; background: var(--acc-lime); color: #08080D; border: 1.5px solid var(--ink); border-radius: 4px; padding: 1px 6px }
.mcard.done { border-left-color: var(--acc-lime) }
.updates-feed { max-height: 420px }
.updates-feed li > span { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center }
.digest-pick { max-width: 420px }
.report-card h2 { font-size: 17px }
.report-card .row-actions .btn { padding: 5px 10px }

.stat .more { margin-top: auto; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3) }
a.stat:hover .more { color: var(--acc-blue) }
