/* Sphere HQ. Layout: a quiet left column of sections, one scrolling page column.
   The brand kit's monotone: four values, light the only variable; marks for state, never words. */
:root {
  --bg: #f2f2f2;
  --fg: #2b2b2b;
  --muted: #5c5c5c;
  --label: #767676;
  --dim: #b3b3b3;
  --card: #ffffff;
  --hairline: rgb(0 0 0 / 0.08);
  --hairline-strong: rgb(0 0 0 / 0.14);
  --panel: rgb(0 0 0 / 0.022);
  --fill: rgb(0 0 0 / 0.04);
  --fill-strong: rgb(0 0 0 / 0.07);
  --fill-stronger: rgb(0 0 0 / 0.11);
  --primary: #2b2b2b;
  --primary-ink: #ffffff;
  --negative: #c2506f;
  --ring: rgb(0 0 0 / 0.26);
  /* state colours (his call, 4 Nov 2026): green for yes, live and ready; amber for partly and in
     progress; red for no; a calm blue ring for upcoming, never red */
  --mk-ok: #2f8f5b;
  --mk-warn: #e9a23b;
  --mk-no: #d93f45;
  --mk-soon: #2e9be6;
  /* a fourth tone for pills only: heavy use, UAT */
  --mk-deep: #8a5cd6;
  /* the Sphere mark: a dark dome on a light surface, a pale one on dark (the dashboard's tones) */
  --mark-top: oklch(0.30 0 0);
  --mark-fade: oklch(0.45 0 0);
  --mark-face: oklch(0.32 0 0);
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius-tile: 3px;
  --radius-card: 4px;
  --radius-panel: 6px;
  --side: 15.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060606;
    --fg: #f2f2f2;
    --muted: #a6a6a6;
    --label: #8f8f8f;
    --dim: #5a5a5a;
    --card: #0b0b0b;
    --hairline: rgb(255 255 255 / 0.07);
    --hairline-strong: rgb(255 255 255 / 0.14);
    --panel: rgb(255 255 255 / 0.022);
    --fill: rgb(255 255 255 / 0.04);
    --fill-strong: rgb(255 255 255 / 0.07);
    --fill-stronger: rgb(255 255 255 / 0.11);
    --primary: #f2f2f2;
    --primary-ink: #0b0b0b;
    --negative: #f2a0b4;
    --ring: rgb(255 255 255 / 0.3);
    --mk-ok: #4dae7a;
    --mk-warn: #f0b54f;
    --mk-no: #f0646a;
    --mk-soon: #5bb8f5;
    --mark-top: #ffffff;
    --mark-fade: #999999;
    --mark-face: #ffffff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #060606;
  --fg: #f2f2f2;
  --muted: #a6a6a6;
  --label: #8f8f8f;
  --dim: #5a5a5a;
  --card: #0b0b0b;
  --hairline: rgb(255 255 255 / 0.07);
  --hairline-strong: rgb(255 255 255 / 0.14);
  --panel: rgb(255 255 255 / 0.022);
  --fill: rgb(255 255 255 / 0.04);
  --fill-strong: rgb(255 255 255 / 0.07);
  --fill-stronger: rgb(255 255 255 / 0.11);
  --primary: #f2f2f2;
  --primary-ink: #0b0b0b;
  --negative: #f2a0b4;
  --ring: rgb(255 255 255 / 0.3);
  --mk-ok: #4dae7a;
  --mk-warn: #f0b54f;
  --mk-no: #f0646a;
  --mk-soon: #5bb8f5;
  --mark-top: #ffffff;
  --mark-fade: #999999;
  --mark-face: #ffffff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* hidden means hidden, whatever display a rule gives the element: the page cannot rely on its host to say so */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--radius-tile); }
::selection { background: var(--fill-stronger); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- shell ---------- */
.shell { display: flex; height: 100%; min-height: 0; }
.side {
  width: var(--side);
  flex: 0 0 var(--side);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--hairline);
  background: var(--panel);
  padding: 14px 12px 12px;
  gap: 0;
  overflow-y: auto;
  min-height: 0;
}
/* One grid for the whole column: every icon, the mark and the avatar centre on x = 30px;
   every label, the wordmark, the name and the sub-items start at x = 48px; separators span the rows' inset. */
.brand-row { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 12px 4px; }
.brand { display: flex; align-items: center; gap: 4px; padding: 2px 0; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.brand .tag { margin-left: 6px; }
.side-toggle { width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--radius-card); color: var(--label); transition: background 200ms var(--ease), color 200ms var(--ease); }
.side-toggle:hover { background: var(--fill); color: var(--fg); }
.side-toggle .a-open { display: none; }
/* Closed, the menu becomes a rail: icons only, on the same 30px centre line, the mark's place holding the expand control. */
@media (min-width: 52.01rem) {
  .shell.collapsed .side { width: 60px; flex-basis: 60px; }
  .shell.collapsed .brand-row { justify-content: center; padding: 0 0 12px 4px; }
  .shell.collapsed .brand { display: none; }
  .shell.collapsed .side-toggle .a-close { display: none; }
  .shell.collapsed .side-toggle .a-open { display: block; }
  .shell.collapsed .nav a, .shell.collapsed .nav button.row { gap: 0; }
  .shell.collapsed .nav .lbl, .shell.collapsed .nav .count, .shell.collapsed .nav .chev { display: none; }
  .shell.collapsed .nav .sub { display: none; }
  .shell.collapsed .nav .sep { margin: 10px 10px; }
  .shell.collapsed .me-text, .shell.collapsed .me-chev { display: none; }
}
.brand .tag { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; color: var(--label); margin-top: 2px; }
/* the mark's ink sits high in its square box; the dashboard nudges it down by 15% so the lockup lines up with the wordmark */
.brand svg.sphere-mark { width: 28px; height: 28px; flex: 0 0 28px; transform: translateY(15%); }
.mark-eye { transform-origin: center; transform-box: fill-box; will-change: transform; }
.mark-wink { animation: mark-wink 260ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes mark-wink {
  0% { transform: scaleY(1); }
  45% { transform: scaleY(0.08); }
  60% { transform: scaleY(0.08); }
  100% { transform: scaleY(1); }
}
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a, .nav button.row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--radius-card);
  color: var(--muted); font-size: 14.5px; line-height: 20px; text-align: left; width: 100%;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.nav a:hover, .nav button.row:hover { background: var(--fill); color: var(--fg); }
.nav a.on { background: var(--fill-strong); color: var(--fg); }
.nav a .count { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--label); }
.nav a svg, .nav button.row svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--label); }
.nav a.on svg, .nav .group-head.on svg { color: var(--fg); }
.nav .sep { border: 0; border-top: 1px solid var(--hairline); margin: 10px 10px; width: auto; }
.nav .group-head.on { color: var(--fg); }
.nav .group-head .chev { margin-left: auto; display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; color: var(--label); transition: transform 240ms var(--ease); }
.nav .group-head .chev svg { width: 13px; height: 13px; flex-basis: 13px; }
.nav .group.open .group-head .chev { transform: rotate(90deg); }
/* a dropdown's rows: a grid row that grows from nothing to its content, so open and close glide */
.nav .sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 360ms var(--ease); }
.nav .group.open .sub { grid-template-rows: 1fr; }
.nav .sub-in { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 1px; visibility: hidden; transition: visibility 0s linear 360ms; }
.nav .group.open .sub-in { visibility: visible; transition-delay: 0s; }
.nav .sub-in > a:first-child { margin-top: 1px; }
.nav .sub-in > a:last-child { margin-bottom: 4px; }
.nav .sub a { padding: 5px 10px 5px 36px; font-size: 13.25px; line-height: 18px; }
.me { border-top: 1px solid var(--hairline); margin: 8px 10px 0; padding: 12px 0 0 0; display: flex; align-items: center; gap: 4px; min-height: 2.6rem; }
.me > img, .me > .avatar { margin-left: -6px; }
.me img, .me .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--fill-stronger); display: grid; place-items: center; font-size: 10px; font-family: var(--font-mono); color: var(--label); flex: 0 0 28px; }
.me .name { font-size: 13.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 100%; text-align: left; border-radius: var(--radius-tile); }
.me button.name:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hairline-strong); }
.me input.field { padding: 0.2rem 0.45rem; font-size: 13.5px; }
.me .role { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.me .inbox { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.3rem; font-size: 12.5px; color: var(--muted); }
.me .inbox:hover { color: var(--fg); }
.me .inbox svg { width: 13px; height: 13px; }
.me .inbox .count { font-family: var(--font-mono); font-size: 11px; color: var(--fg); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.topbar { display: none; align-items: center; gap: 0.7rem; height: 3rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--hairline); flex: 0 0 auto; }
.topbar button { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: var(--radius-card); color: var(--muted); }
.topbar button:hover { background: var(--fill); color: var(--fg); }
.topbar .title { font-size: 13.5px; color: var(--muted); }
.view { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.column {
  max-width: 64rem; margin: 0 auto; width: 100%;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 1.75rem 5rem;
}
.column.wide { max-width: 80rem; }
@media (min-width: 40rem) { .column { padding-left: max(2rem, env(safe-area-inset-left, 0px)); padding-right: max(2rem, env(safe-area-inset-right, 0px)); padding-block: 2.2rem 6rem; } }
.scrim { display: none; }
@media (max-width: 52rem) {
  .side { position: fixed; inset: 0 auto 0 0; z-index: 30; transform: translateX(-105%); transition: transform 320ms var(--ease); background: var(--bg); width: min(var(--side), 86vw); box-shadow: 0 18px 48px -20px rgb(0 0 0 / 0.5); padding-top: max(14px, env(safe-area-inset-top, 0px)); padding-left: max(12px, env(safe-area-inset-left, 0px)); }
  .side.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgb(0 0 0 / 0.35); opacity: 0; pointer-events: none; transition: opacity 300ms var(--ease); }
  .scrim.on { opacity: 1; pointer-events: auto; }
  .topbar { display: flex; }
}

/* ---------- type ---------- */
.eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--label); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; }
.page-head h1 { font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; margin-top: 0.5rem; }
@media (min-width: 48rem) { .page-head h1 { font-size: 30px; } }
.lede { margin-top: 0.7rem; max-width: 62ch; color: var(--muted); font-size: 15px; line-height: 1.6; }
.section { margin-top: 3.25rem; }
.section > .eyebrow { margin-bottom: 0.4rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.section-head h2 { font-size: 20px; letter-spacing: -0.015em; }
.section-head .note { color: var(--muted); font-size: 13.5px; max-width: 60ch; margin-top: 0.35rem; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.label { color: var(--label); }
.small { font-size: 12.5px; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- surfaces and controls ---------- */
.panel { background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius-panel); }
.card { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-panel); padding: 1.1rem 1.2rem; min-width: 0; }
.btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.42rem 0.85rem; border-radius: 999px; border: 1px solid var(--hairline-strong); font-size: 13px; color: var(--fg); background: transparent; transition: background 200ms var(--ease), border-color 200ms var(--ease), transform 300ms var(--ease); white-space: nowrap; }
.btn:hover { background: var(--fill); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.btn.primary:hover { transform: translateY(-1px); }
.btn.quiet { border-color: transparent; color: var(--muted); padding-inline: 0.55rem; }
.btn.quiet:hover { color: var(--fg); background: var(--fill); }
/* a quiet button whose label lines up with the fields above it */
.btn.quiet.flush { margin-left: -0.55rem; }
.btn.danger:hover { color: var(--negative); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.7rem; border-radius: 999px; border: 1px solid var(--hairline-strong); font-size: 12.5px; color: var(--muted); transition: color 200ms var(--ease), border-color 200ms var(--ease); }
.pill:hover { color: var(--fg); }
.pill.on { border-color: var(--fg); color: var(--fg); }
.pills { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.field { width: 100%; background: var(--card); border: 1px solid var(--hairline-strong); border-radius: var(--radius-card); padding: 0.55rem 0.7rem; font-size: 14px; line-height: 1.5; }
.field:focus { outline: none; border-color: var(--ring); }
textarea.field { min-height: 7rem; resize: vertical; }
textarea.field.code { font-family: var(--font-mono); font-size: 12.5px; min-height: 18rem; }
.row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 0.6rem; }
.grid { display: grid; gap: 0.9rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.hair { border: 0; border-top: 1px solid var(--hairline); margin: 1.25rem 0; }
.empty { color: var(--muted); font-size: 14px; padding: 1.5rem 0; }
.toast { position: fixed; left: 50%; bottom: max(1.25rem, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--primary); color: var(--primary-ink); padding: 0.55rem 0.95rem; border-radius: 999px; font-size: 13px; z-index: 50; opacity: 0; transition: opacity 250ms var(--ease); pointer-events: none; }
.toast.on { opacity: 1; }
.notice { font-size: 13px; color: var(--muted); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 0.6rem 0.8rem; background: var(--panel); }

/* marks: solid is ready or done, half is partial or in progress, hollow is upcoming or waiting */
.mark { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--mk-soon); vertical-align: middle; flex: 0 0 9px; }
.mark.ready, .mark.done, .mark.shipped, .mark.live, .mark.resolved { background: var(--mk-ok); border-color: var(--mk-ok); }
.mark.partial, .mark.in_progress { background: var(--mk-warn); border-color: var(--mk-warn); }
.mark.upcoming, .mark.todo, .mark.planned, .mark.backlog, .mark.open { background: transparent; border-color: var(--mk-soon); }
.mark.dim { opacity: 0.45; }
.state { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin-inline: -0.2rem; padding-inline: 0.2rem; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); font-weight: 400; padding: 0.45rem 0.6rem; white-space: nowrap; }
.tbl td { padding: 0.55rem 0.6rem; vertical-align: top; color: var(--muted); }
.tbl td.main { color: var(--fg); }
.tbl tbody tr:nth-child(odd) td { background: var(--panel); }
.tbl td:first-child, .tbl th:first-child { border-radius: var(--radius-tile) 0 0 var(--radius-tile); }
.tbl td:last-child, .tbl th:last-child { border-radius: 0 var(--radius-tile) var(--radius-tile) 0; }
.tbl .sub { display: block; font-size: 12px; color: var(--label); margin-top: 0.15rem; }
.tbl td.editable { cursor: pointer; }
.tbl td.editable:hover, .tbl td.editable:focus-visible, .tbl td.editable[aria-expanded="true"] { outline: 1px dashed var(--hairline-strong); outline-offset: -2px; }
.tbl td.editable:focus-visible { outline-color: var(--ring); }
.tbl input.cell, .tbl select.cell { width: 100%; min-width: 6rem; background: var(--card); border: 1px solid var(--ring); border-radius: var(--radius-tile); padding: 0.25rem 0.4rem; font-size: 13px; }
/* a cell's editor lies over the cell, its right edge on the cell's, so the table never moves */
.tbl td.editing { position: relative; }
.tbl td.editing > input.cell { position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%); z-index: 3; width: auto; box-shadow: 0 14px 36px -14px rgb(0 0 0 / 0.35); }
.tbl td.editing > input.cell[type="number"] { width: 5.5rem; min-width: 0; }
.tbl td.editing > input.cell[type="date"] { width: 9.5rem; min-width: 0; font-family: var(--font-mono); font-size: 12px; color: var(--fg); }
/* a cell whose change waits for the sheet: dotted under its text */
.tbl td.waits { text-decoration: underline dotted var(--label); text-decoration-thickness: 1px; text-underline-offset: 4px; }
/* the dots do not reach into a cell's own boxes: a status and an owner take the underline themselves, a tag a dotted outline */
.tbl td.waits .state, .tbl td.waits .owner-cell > span:last-child { text-decoration: underline dotted var(--label); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.tbl td.waits .tag-chip { border-style: dotted; border-color: var(--label); }

/* ---------- prose (knowledge pages) ----------
   One scale for every page: a numbered section (H2), a subheading or dropdown (H3), a small
   subheading (H4), a label (H5). Text keeps a reading width; tables take the whole column. */
.prose { font-size: 15px; line-height: 1.65; color: var(--fg); }
.prose > * + *, .psec > * + *, .acc-pad > * + * { margin-top: 0.9em; }
.prose :is(p, ul, ol, blockquote, pre, h2, h3, h4, h5) { max-width: 72ch; }
.prose h1 { font-size: 24px; letter-spacing: -0.02em; margin-top: 2em; }
.prose h2 { font-size: 22px; line-height: 1.25; letter-spacing: -0.018em; margin-top: 2.6rem; }
.prose .psec { margin-top: 3.5rem; }
.prose > .psec:first-child { margin-top: 1rem; }
.prose .psec > .eyebrow + h2, .prose .psec > h2:first-child { margin-top: 0.4rem; }
.prose .psec > .eyebrow { margin: 0; }
.prose h3 { font-size: 17px; line-height: 1.3; letter-spacing: -0.01em; margin-top: 2.2rem; }
.prose h4 { font-size: 14.5px; font-weight: 600; margin-top: 1.8rem; color: var(--fg); }
.prose h5 { font-family: var(--font-mono); font-size: 10.5px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); margin-top: 1.6rem; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--fg); font-weight: 600; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hairline-strong); }
.prose a:hover { text-decoration-color: var(--fg); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.3em; }
.prose blockquote { border-left: 2px solid var(--hairline-strong); margin: 0; padding-left: 1rem; color: var(--muted); }
.prose code { font-family: var(--font-mono); font-size: 0.86em; background: var(--fill); border-radius: var(--radius-tile); padding: 0.1em 0.35em; }
.prose pre { background: var(--fill); border-radius: var(--radius-card); padding: 0.9rem 1rem; overflow-x: auto; font-size: 12.5px; }
.prose pre code { background: none; padding: 0; }
.prose img { border-radius: var(--radius-card); border: 1px solid var(--hairline); }
/* a wide figure (a flowchart, a diagram) spans the whole column, not the reading width */
.prose p.fig.wide { max-width: none; }
.prose hr { border: 0; border-top: 1px solid var(--hairline); }

/* tables: the whole column, scrolling sideways inside their own box when they must */
.prose .table-wrap { overflow-x: auto; margin-top: 1.1em; }
.prose table { border-collapse: collapse; font-size: 13.5px; width: 100%; }
.prose th { text-align: left; vertical-align: bottom; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); font-weight: 400; padding: 0.45rem 0.7rem; border-bottom: 1px solid var(--hairline); }
.prose td { padding: 0.6rem 0.7rem; vertical-align: top; color: var(--muted); }
.prose td:first-child { color: var(--fg); }
.prose tbody tr:nth-child(odd):not(.group-row) td { background: var(--panel); }
.prose td.dim { color: var(--dim); }
.prose tr.group-row td.group { background: transparent; padding-top: 1.3rem; font-weight: 600; color: var(--fg); font-size: 13px; border-bottom: 1px solid var(--hairline); }

/* marks inside tables: a green tick for yes, an amber warning for partly, a red cross for no (the
   source tables' own marks, drawn the same on every screen); a dash stays "not known". A status
   word (Live, In Progress, Backlog) gets a dot in the same colours, upcoming as a blue ring. */
.mk { display: inline-flex; width: 15px; height: 15px; vertical-align: -3px; flex: 0 0 15px; }
.mk svg { width: 100%; height: 100%; display: block; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; vertical-align: 0; }
.dot-yes { background: var(--mk-ok); }
.dot-partly { background: var(--mk-warn); }
.dot-no { background: var(--mk-no); }
.dot-todo { border: 1.5px solid var(--mk-soon); }
.mk-t { margin-left: 8px; }
.prose td.has-mk { white-space: nowrap; color: var(--fg); }
.mk-legend { display: flex; flex-wrap: wrap; gap: 1.1rem; align-items: center; font-size: 12.5px; color: var(--label); }
.mk-key { display: inline-flex; align-items: center; gap: 0.45rem; }

/* the heat map: each cell shaded by how strong the channel is */
.prose .heat-wrap { margin-inline: -2px; }
.prose table.heat { border-collapse: separate; border-spacing: 3px; min-width: 56rem; table-layout: fixed; }
.prose table.heat th:first-child, .prose table.heat td:first-child { width: 9rem; position: sticky; left: 0; z-index: 1; background: var(--bg); }
.prose table.heat th { border-bottom: 0; }
.prose table.heat tbody tr td { background: transparent; border-radius: var(--radius-tile); padding: 0.5rem 0.55rem; }
.prose table.heat tbody td.h-strong { background: var(--fill-stronger); }
.prose table.heat tbody td.h-some { background: var(--fill); }
.prose table.heat tbody td.h-past { background: repeating-linear-gradient(135deg, var(--fill) 0 4px, transparent 4px 8px); }
.heat .lvl { display: block; font-size: 12.5px; font-weight: 600; color: var(--fg); }
.heat .h-some .lvl, .heat .h-past .lvl { font-weight: 500; }
.heat .h-none .lvl { color: var(--dim); font-weight: 400; }
.heat .det { display: block; font-size: 12px; line-height: 1.4; color: var(--muted); margin-top: 2px; }

/* a very wide table, one card per row */
.cards { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); margin-top: 1.1em; }
.ccard { border: 1px solid var(--hairline); border-radius: var(--radius-panel); background: var(--panel); padding: 1rem 1.1rem 1.1rem; min-width: 0; }
.prose .ccard h4 { margin: 0 0 0.5rem; font-size: 15.5px; }
.prose .ccard-lead { margin: 0 0 0.9rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--hairline); font-size: 13.5px; line-height: 1.5; color: var(--fg); }
.prose .ccard-lead strong { font-weight: 500; color: var(--label); }
.ccard dl { display: grid; grid-template-columns: 7.2rem 1fr; gap: 0.45rem 0.8rem; margin: 0; }
.ccard dt { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--label); padding-top: 3px; line-height: 1.4; }
.ccard dd { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }

/* dropdowns: one open at a time, gliding open and shut */
.acc { margin-top: 1.2rem; border-bottom: 1px solid var(--hairline); }
.acc-item { border-top: 1px solid var(--hairline); }
.acc-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 4px; text-align: left; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; color: var(--fg); transition: color 200ms var(--ease); }
.acc-head:hover { color: var(--fg); }
.acc-head .acc-title { flex: 1; min-width: 0; }
/* A dropdown's status and a table's Status column share one fixed column, measured from the right:
   the chevron's room (14px plus the 1rem gap), then the status. The marks line up down the page. */
:root { --status-w: 7rem; --chev-room: calc(1rem + 14px); --status-col: calc(var(--status-w) + 0.7rem + var(--chev-room)); }
.acc-status { display: inline-flex; align-items: center; gap: 0.5rem; flex: 0 0 var(--status-w); font-size: 12.5px; font-weight: 400; letter-spacing: 0; color: var(--muted); white-space: nowrap; }
.prose table.status-last th:last-child, .prose table.status-last td:last-child { width: var(--status-col); padding-right: var(--chev-room); }
.acc-head .chev { display: inline-flex; color: var(--label); transition: transform 320ms var(--ease); }
.acc-item.open > .acc-head .chev { transform: rotate(90deg); }
.acc-item:not(.open) > .acc-head { color: var(--muted); }
.acc-item:not(.open) > .acc-head:hover { color: var(--fg); }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 380ms var(--ease); }
.acc-item.open > .acc-body { grid-template-rows: 1fr; }
.acc-in { min-height: 0; overflow: hidden; }
.acc-pad { padding: 2px 4px 26px; }
.acc-pad > :first-child { margin-top: 0; }
.foot-btn { display: block; margin-top: 3rem; font-size: 10px; color: var(--label); text-align: left; }
.foot-btn:hover { color: var(--fg); }

/* ---------- overview ---------- */
.stage { position: relative; display: grid; gap: 0; }
.stage .track { display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.stage .track::before { content: ""; position: absolute; left: 7px; right: 7px; top: 7px; border-top: 1.5px solid var(--hairline-strong); }
.stage .step { position: relative; padding-right: 0.8rem; min-width: 0; }
.stage .step .dot { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--dim); background: var(--bg); position: relative; }
.stage .step.done .dot { background: var(--fg); border-color: var(--fg); }
.stage .step.now .dot { border-color: var(--fg); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4.5px var(--fg); }
.stage .step .name { margin-top: 0.7rem; font-size: 13.5px; color: var(--dim); line-height: 1.25; }
.stage .step.done .name, .stage .step.now .name { color: var(--fg); }
.stage .step .win { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--label); margin-top: 0.25rem; }
.stage .jobs { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin-top: 1.6rem; }
@media (max-width: 44rem) {
  .stage .track { grid-template-columns: 1fr; gap: 0.9rem; }
  .stage .track::before { left: 7px; right: auto; top: 7px; bottom: 7px; border-top: 0; border-left: 1.5px solid var(--hairline-strong); }
  .stage .step { display: grid; grid-template-columns: 15px 1fr; gap: 0.8rem; align-items: start; }
  .stage .step .name { margin-top: -2px; }
  .stage .step .win { grid-column: 2; }
}
.channels { display: grid; gap: 0.75rem; padding: 0.9rem 1.1rem 1rem; }
.channels .ch-list { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; }
.channels span.ch { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 14px; color: var(--fg); }
/* a chat app's own tile: its colour, its mark, rounded the way the app's icon is */
.app-tile { display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 26%; overflow: hidden; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3), 0 0 0 0.5px rgb(0 0 0 / 0.08), 0 1px 2px rgb(0 0 0 / 0.14); }
.app-tile svg { display: block; width: 100%; height: 100%; }
/* a provider's mark before its name */
.vendor { white-space: nowrap; }
.vendor-mark { display: inline-block; width: 15px; height: 15px; margin-right: 0.32em; vertical-align: -0.17em; }
.vendor-mark svg { display: block; width: 100%; height: 100%; }
.stem { width: 1.5px; height: 1.3rem; background: var(--hairline-strong); margin: 0 auto; }
.core { padding: 1rem 1.2rem; display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.core h3 { font-size: 16px; }
/* the pillar cards share one grid: each card spans its five rows (head, Today, Pick, Unlocks, use
   cases), so the hairlines and labels line up across a row of cards (his call, 4 Nov 2026: a
   hairline separates Today, Pick and Unlocks inside a card) */
.pillars { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr)); }
.pillar { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; padding: 1.05rem 1.15rem 0.55rem; }
.pillar .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem; padding-bottom: 0.9rem; }
.pillar h3 { font-size: 16px; letter-spacing: -0.01em; }
.pillar .kv { display: grid; align-content: start; gap: 0.35rem; padding: 0.8rem 0; border-top: 1px solid var(--hairline); }
.pillar .kv p { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.pillar .kv p.strong { color: var(--fg); }
.pillar .use { font-size: 12.5px; color: var(--label); padding: 0 0 0.45rem; }
.pillar .use:empty { padding: 0; }
.pillar .use a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hairline-strong); }
.week { display: grid; gap: 1.5rem; grid-template-columns: minmax(10rem, 14rem) 1fr; align-items: start; }
@media (max-width: 44rem) { .week { grid-template-columns: 1fr; } }
.week .big { font-size: 56px; line-height: 1; letter-spacing: -0.04em; font-weight: 500; }
.week .split { margin-top: 0.4rem; color: var(--muted); font-size: 13.5px; }
.week .cols { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.week .cols h4 { font-size: 13px; color: var(--label); font-family: var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 400; margin-bottom: 0.5rem; }
.week .line { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.3rem 0; font-size: 14px; }
.week .line .mark { margin-top: 2px; align-self: flex-start; position: relative; top: 4px; }
.links { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.links a { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.75rem 0.9rem; border: 1px solid var(--hairline); border-radius: var(--radius-card); transition: background 200ms var(--ease); }
.links a:hover { background: var(--fill); }
.links a .url { font-family: var(--font-mono); font-size: 11px; color: var(--label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links a .note { font-size: 12.5px; color: var(--muted); }
.unlocks { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.unlocks .col h4 { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); font-weight: 400; margin-bottom: 0.6rem; }
.unlock { padding: 0.65rem 0; border-top: 1px solid var(--hairline); display: grid; grid-template-columns: 10px 1fr; gap: 0.6rem; }
.unlock .mark { margin-top: 6px; }
.unlock .t { font-size: 14px; }
.unlock .n { font-size: 12.5px; color: var(--muted); margin-top: 0.15rem; }
.unlock .p { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--label); margin-top: 0.2rem; }

/* ---------- work ---------- */
.tabs { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tabs a { padding: 0.35rem 0.8rem; border-radius: 999px; font-size: 13.5px; color: var(--muted); }
.tabs a:hover { background: var(--fill); color: var(--fg); }
.tabs a.on { background: var(--fill-strong); color: var(--fg); }
.fresh { font-size: 12.5px; color: var(--label); display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
/* weeks: one week at a time, by person */
.weeks { display: grid; gap: 1.3rem; container-type: inline-size; }
.wk-nav { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.wk-step { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--hairline-strong); color: var(--muted); transition: background 200ms var(--ease), color 200ms var(--ease); }
.wk-step:hover:not(:disabled) { background: var(--fill); color: var(--fg); }
.wk-step:disabled { opacity: 0.35; cursor: default; }
.wk-step svg { width: 16px; height: 16px; }
.wk-label { display: flex; align-items: baseline; gap: 0.55rem; padding: 0 0.45rem; min-width: 0; flex-wrap: wrap; }
.wk-key { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--label); }
.wk-dates { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; color: var(--fg); }
.wk-now { align-self: center; font-size: 11.5px; color: var(--fg); background: var(--fill-strong); border-radius: 999px; padding: 0.1rem 0.55rem; }
.wk-sum { margin-left: auto; font-size: 12.5px; color: var(--label); font-variant-numeric: tabular-nums; }
.wk-people { column-gap: 2.6rem; }
@container (min-width: 46rem) { .wk-people { columns: 2; } }
.wk-person { break-inside: avoid; padding-bottom: 1.5rem; }
.wk-head { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.25rem; }
.wk-name { font-size: 14.5px; font-weight: 500; color: var(--fg); min-width: 0; }
.wk-count { margin-left: auto; font-size: 12px; color: var(--label); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wk-tasks { list-style: none; margin: 0; padding: 0; }
.wk-task { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.42rem 0 0.42rem 10.5px; }
.wk-task > .mark { margin-top: 0.32rem; }
.wk-t { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.35; color: var(--fg); }
.wk-t small { margin-top: 1px; font-size: 11.5px; color: var(--label); }
.wk-task.done .wk-t { color: var(--muted); }
.wk-task > .faces { margin-top: 0.1rem; }
.wk-task > .tag-chip { margin-top: 0.14rem; }

/* the roadmap: milestones as phases on a calendar, the tasks that unlock each one under it */
:root { --rm-title: 22rem; --rm-dur: 5.5rem; --rm-pct: 6.5rem; --rm-weekend: rgb(0 0 0 / 0.025); }
:root[data-theme="dark"] { --rm-weekend: rgb(255 255 255 / 0.03); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rm-weekend: rgb(255 255 255 / 0.03); } }
.ms-0 { --mc: #3d8a63; } .ms-1 { --mc: #c0573f; } .ms-2 { --mc: #4c79b5; } .ms-3 { --mc: #c08a1c; }
.ms-4 { --mc: #8a5fae; } .ms-5 { --mc: #2f8a85; } .ms-6 { --mc: #b8577f; } .ms-7 { --mc: #6b7a8f; }
.rm { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--radius-panel); background: var(--bg); }
.rm-in { min-width: max-content; }
.rm-row { display: grid; }
.rm-c { position: sticky; z-index: 2; background: var(--bg); display: flex; align-items: center; gap: 0.45rem; padding: 0 0.7rem; border-bottom: 1px solid var(--hairline); font-size: 12.5px; color: var(--muted); white-space: nowrap; min-width: 0; }
.rm-c.rm-title { left: 0; white-space: normal; }
.rm-c.rm-dur { left: var(--rm-title); font-variant-numeric: tabular-nums; }
.rm-c.rm-pct { left: calc(var(--rm-title) + var(--rm-dur)); border-right: 1px solid var(--hairline); font-variant-numeric: tabular-nums; }
.rm-tl { position: relative; min-height: 46px; border-bottom: 1px solid var(--hairline); }
.rm-head .rm-c { align-items: flex-end; padding-bottom: 0.6rem; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--label); }
.rm-cal { height: 56px; }
.rm-month { position: absolute; top: 7px; padding-left: 6px; border-left: 1px solid var(--hairline-strong); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--label); white-space: nowrap; overflow: hidden; }
.rm-day { position: absolute; top: 25px; width: var(--day, 26px); display: grid; justify-items: center; gap: 1px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rm-day b { font-family: var(--font-mono); font-size: 9px; font-weight: 400; color: var(--label); }
.rm-day i { font-style: normal; min-width: 18px; text-align: center; border-radius: 999px; line-height: 16px; }
.rm-day.we { color: var(--label); }
.rm-day.today i { background: var(--fg); color: var(--bg); }
/* a calendar fitted into a narrow frame: one date per week, on its Monday; today is the line */
.rm.weeks .rm-month:not(.keep) .yr { display: none; }
.rm.weeks .rm-day { visibility: hidden; justify-items: start; }
.rm.weeks .rm-day.mon { visibility: visible; }
.rm.weeks .rm-day b { visibility: hidden; }
.rm.weeks .rm-day i { min-width: 0; padding-left: 3px; border-left: 1px solid var(--hairline-strong); border-radius: 0; text-align: left; white-space: nowrap; }
.rm.weeks .rm-day.mon.today i { background: transparent; color: var(--fg); font-weight: 600; }
.rm-now { position: absolute; top: 0; bottom: -1px; border-left: 1.5px solid var(--fg); opacity: 0.28; z-index: 1; pointer-events: none; }
.rm-name { display: flex; align-items: center; gap: 0.55rem; width: 100%; padding: 0.6rem 0; text-align: left; color: var(--fg); }
.rm-name .chev { display: inline-flex; color: var(--label); transition: transform 240ms var(--ease); }
.rm-ms.open .rm-name .chev { transform: rotate(90deg); }
.rm-sw { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 3px; background: var(--mc); }
.rm-t { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; line-height: 1.3; }
.rm-t small { margin-top: 2px; font-size: 11.5px; color: var(--label); }
.rm-c.rm-title > .faces, .rm-name > .faces { margin-left: auto; }
/* the pencil an admin edits a milestone or the targets with */
.rm-edit { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 999px; color: var(--label); transition: background 160ms var(--ease), color 160ms var(--ease); }
.rm-edit:hover, .rm-edit:focus-visible { background: var(--fill); color: var(--fg); }
.rm-edit svg { width: 15px; height: 15px; }
.rm-c.rm-title > .rm-name { min-width: 0; }
.rm-c .faces > .face { box-shadow: 0 0 0 2px var(--bg); }
.rm-ms .rm-t { font-weight: 500; }
.rm-ms .rm-c.rm-pct { color: var(--fg); }
.rm-task .rm-c.rm-title { padding-left: 2.75rem; }
.rm-task .rm-t { font-size: 13px; color: var(--muted); padding: 0.5rem 0; }
.rm-task .rm-tl { min-height: 40px; }
.rm-bar { position: absolute; top: 50%; transform: translateY(-50%); border-radius: 999px; }
.rm-bar.ms { height: 20px; padding: 0; overflow: hidden; cursor: pointer; background: color-mix(in srgb, var(--mc) 22%, transparent); transition: filter 200ms var(--ease); }
.rm-bar.ms:hover { filter: brightness(1.04) saturate(1.1); }
.rm-fill { display: block; height: 100%; border-radius: 999px; background: var(--mc); }
.rm-bar.task { height: 10px; background: var(--mc); }
.rm-bar.task.in_progress { background: repeating-linear-gradient(135deg, var(--mc) 0 4px, color-mix(in srgb, var(--mc) 35%, transparent) 4px 8px); }
.rm-bar.task.todo { background: transparent; border: 1.5px solid var(--mc); }
.ring { display: inline-flex; width: 16px; height: 16px; flex: 0 0 16px; }
.ring svg { width: 100%; height: 100%; }
.rm-loose { margin-top: 0.7rem; font-size: 12.5px; color: var(--label); }
@media (max-width: 44rem) { :root { --rm-title: 13rem; --rm-dur: 4.5rem; --rm-pct: 5rem; } }

/* logs: a dated list, the date on the left, what changed on the right */
.logs { margin-top: 0.4rem; }
.log { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1.2rem; padding: 1.2rem 0; border-top: 1px solid var(--hairline); }
.log:first-child { border-top: 0; }
.log-when { display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; padding-top: 0.25rem; }
.log-by { font-size: 12.5px; color: var(--muted); max-width: 100%; }
.log-ver { font-family: var(--font-mono); font-size: 11px; color: var(--fg); background: var(--fill-strong); border-radius: 999px; padding: 0.1rem 0.55rem; }
.log h3 { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; color: var(--fg); line-height: 1.35; }
.log ul { margin: 0.55rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: 14px; line-height: 1.6; }
.log li + li { margin-top: 0.15rem; }
.log-links { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.65rem; font-size: 12.5px; }
.log-links a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hairline-strong); }
@media (max-width: 44rem) { .log { grid-template-columns: 1fr; gap: 0.4rem; } }

/* the profile row: one button; it opens the profile menu above it */
.me-btn { display: flex; align-items: center; gap: 10px; width: calc(100% + 12px); margin-left: -6px; padding: 5px 6px; border-radius: var(--radius-card); text-align: left; transition: background 200ms var(--ease); }
.me-btn:hover, .me-btn.on { background: var(--fill); }
.me-pic { position: relative; display: inline-flex; flex: 0 0 28px; }
.me-dot { position: absolute; top: -1px; right: -1px; width: 8px; height: 8px; border-radius: 50%; background: var(--mk-warn); box-shadow: 0 0 0 2px var(--bg); }
.me-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.me-chev { display: inline-flex; color: var(--label); }
.me-chev svg { width: 14px; height: 14px; }
.me-menu { position: fixed; z-index: 50; padding: 6px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-panel); background: var(--card); box-shadow: 0 14px 36px -14px rgb(0 0 0 / 0.35); animation: me-menu-in 160ms var(--ease) both; }
@keyframes me-menu-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.me-menu .mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--radius-card); font-size: 14px; color: var(--fg); text-align: left; transition: background 160ms var(--ease); }
.me-menu .mi:hover, .me-menu .mi:focus-visible, .me-menu .mi.on { background: var(--fill); outline: none; }
.me-menu .mi svg { width: 17px; height: 17px; flex: 0 0 17px; color: var(--muted); }
.me-menu .mi .lbl { flex: 1; }
.me-menu .mi .count { font-family: var(--font-mono); font-size: 11px; color: var(--primary-ink); background: var(--primary); border-radius: 999px; min-width: 18px; padding: 1px 6px; text-align: center; }
.me-menu .sep { border: 0; border-top: 1px solid var(--hairline); margin: 6px 4px; }
/* the appearance row: the row itself is not a choice, the two marks at its right are */
.me-menu .mi.theme-row { cursor: default; }
.me-menu .mi.theme-row:hover { background: transparent; }
.me-menu .seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--hairline-strong); border-radius: 999px; }
.me-menu .seg button { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; color: var(--muted); transition: background 160ms var(--ease), color 160ms var(--ease); }
.me-menu .seg button svg { width: 14px; height: 14px; flex: 0 0 14px; }
.me-menu .seg button:hover { background: var(--fill); }
.me-menu .seg button:focus-visible { outline: 1px solid var(--ring); outline-offset: 1px; }
.me-menu .seg button.on { background: var(--fill-strong); color: var(--fg); }
.me-menu .seg button.on svg { color: var(--fg); }

/* settings: one box per setting, the team code's look */
.settings { display: grid; gap: 0.8rem; max-width: 26rem; }
.codebox .name-value { font-size: 14px; line-height: 18px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.codebox .name-input { letter-spacing: 0; text-transform: none; font-family: var(--font-sans); }

/* the cards under the Work tabs: a new backlog item, a milestone, the V1 targets */
.item-form { margin-bottom: 1.5rem; display: grid; gap: 0.9rem; }
.item-form .row .grow { flex: 1; }
.item-form > .fl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
/* a cross that takes a task out of a milestone, or a target out of the list */
.x { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border-radius: 999px; color: var(--label); transition: background 160ms var(--ease), color 160ms var(--ease); }
.x:hover, .x:focus-visible { background: var(--fill); color: var(--fg); }
.x svg { width: 14px; height: 14px; }
/* a milestone's card: its name and dates on one line, then its tasks and the search that adds them */
.ms-form { gap: 1.35rem; container-type: inline-size; }
.ms-top { display: grid; grid-template-columns: minmax(0, 1fr) 12rem 12rem 9.5rem; gap: 0.75rem 0.8rem; align-items: end; }
.ms-top .ff { display: grid; gap: 0.35rem; min-width: 0; }
.ms-form .fl { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.ms-form .fl .rm-sw { width: 9px; height: 9px; flex: 0 0 9px; }
.ms-name { font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em; padding: 0.5rem 0.75rem; min-height: 2.6rem; }
@container (max-width: 56rem) { .ms-top { grid-template-columns: 1fr 1fr; } .ms-top .ms-ff-name { grid-column: 1 / -1; } }
.ms-tasks { display: grid; gap: 0.4rem; }
.ms-tasks-head { display: flex; align-items: baseline; gap: 0.55rem; }
.ms-count { font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ms-share { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--label); font-variant-numeric: tabular-nums; }
.ms-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; max-height: 21rem; overflow-y: auto; }
.ms-list:empty { display: none; }
.ms-list li { display: grid; grid-template-columns: 9px minmax(0, 1fr) 3rem 4.4rem 26px; gap: 0.75rem; align-items: center; min-height: 40px; padding: 0.2rem 0.3rem 0.2rem 0.65rem; border-radius: var(--radius-card); font-size: 13.5px; color: var(--fg); transition: background 160ms var(--ease); }
.ms-list li:hover { background: var(--fill); }
.ms-list .t { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.ms-list .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-list .t small { font-size: 11.5px; color: var(--label); }
.ms-list li.gone .tt { color: var(--muted); }
.ms-list .wk { font-family: var(--font-mono); font-size: 11.5px; color: var(--label); }
.ms-list .fc { display: flex; justify-content: flex-end; }
.ms-list li .x { opacity: 0; transition: opacity 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease); }
.ms-list li:hover .x, .ms-list li .x:focus-visible { opacity: 1; }
@media (hover: none) { .ms-list li .x { opacity: 1; } }
@container (max-width: 34rem) { .ms-list li { grid-template-columns: 9px minmax(0, 1fr) auto 26px; } .ms-list .wk { display: none; } }

/* the V1 targets as a small table of fields that grow with their text */
.kpi-edit { display: grid; gap: 0.5rem; container-type: inline-size; }
.kpi-head, .kpi-row { display: grid; grid-template-columns: minmax(8rem, 0.85fr) minmax(10rem, 1.3fr) minmax(12rem, 1.85fr) 26px; gap: 0.6rem; align-items: start; }
.kpi-head span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); padding-left: 0.1rem; }
.kpi-row textarea.field { min-height: 0; resize: none; overflow: hidden; padding: 0.45rem 0.6rem; font-size: 13.5px; line-height: 1.45; }
.kpi-row .x { margin-top: 0.35rem; }
@container (max-width: 40rem) { .kpi-head { display: none; } .kpi-row { grid-template-columns: 1fr 26px; } .kpi-row .x { grid-row: 1; grid-column: 2; margin-top: 0.35rem; } .kpi-row .field { grid-column: 1; } .kpi-row + .kpi-row { margin-top: 0.7rem; } }

/* while a card is open, the page's own primary steps aside: one primary on screen */
.column.carding .page-head .btn.primary { display: none; }

/* ---------- a page edited in place ----------
   Every block shows as it reads; a soft fill under the pointer says it opens. A table is a grid
   whose cells take typing, its people and status cells open their menus, and its rows lose a
   cross on hover. */
.be { display: grid; gap: 0.2rem; }
.be-text { border-radius: var(--radius-card); padding: 0.3rem 0.55rem; margin: 0 -0.55rem; cursor: text; transition: background 160ms var(--ease); }
.be-text:hover { background: var(--fill); }
.be-text:focus-visible { outline: 1px dashed var(--ring); outline-offset: 0; }
.be-text .be-shown > :first-child { margin-top: 0; }
.be-text .be-shown > :last-child { margin-bottom: 0; }
.be-text .be-shown h2 { margin-top: 1.6rem; }
.be-source { display: block; min-height: 0; resize: none; overflow: hidden; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; padding: 0.55rem 0.7rem; }
.be-empty { font-size: 13.5px; margin: 0; }
.be-table { display: grid; justify-items: start; gap: 0.35rem; margin: 0.5rem 0 1.1rem; }
.be-table .table-wrap { width: 100%; }
.tbl.be-grid thead td { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); padding: 0.45rem 0.6rem; background: transparent; }
.tbl.be-grid td.be-cell, .tbl.be-grid td.be-pick { color: var(--fg); outline: none; transition: box-shadow 160ms var(--ease), background 160ms var(--ease); }
.tbl.be-grid td.be-cell { cursor: text; }
.tbl.be-grid td.be-pick { cursor: pointer; }
.tbl.be-grid td.be-cell:hover, .tbl.be-grid td.be-pick:hover, .tbl.be-grid td.be-pick[aria-expanded="true"] { box-shadow: inset 0 0 0 1px var(--hairline-strong); }
.tbl.be-grid td.be-cell:focus, .tbl.be-grid td.be-pick:focus-visible { box-shadow: inset 0 0 0 1.5px var(--ring); background: var(--card); }
.tbl.be-grid td.be-x { width: 34px; padding: 0.3rem 0.2rem; vertical-align: middle; }
.tbl.be-grid tbody tr .be-x .x { opacity: 0; transition: opacity 160ms var(--ease); }
.tbl.be-grid tbody tr:hover .be-x .x, .tbl.be-grid .be-x .x:focus-visible { opacity: 1; }
@media (hover: none) { .tbl.be-grid tbody tr .be-x .x { opacity: 1; } }
.be-people { display: inline-flex; flex-wrap: wrap; gap: 0.3rem 0.85rem; }
.be-add { margin-top: 1.2rem; }

/* ---------- HQ's own controls: a choice, a date, a search over the backlog ---------- */
.field.pick { display: flex; align-items: center; gap: 0.5rem; min-height: 2.4rem; text-align: left; color: var(--fg); cursor: pointer; transition: border-color 160ms var(--ease); }
.field.pick:hover, .field.pick[aria-expanded="true"] { border-color: var(--ring); }
.pick .pv { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .pv.ph { color: var(--label); }
.pick .pc, .pick .pi { display: inline-flex; flex: 0 0 auto; color: var(--label); }
.pick .pc svg, .pick .pi svg { width: 15px; height: 15px; }
.pick-date { position: relative; display: flex; min-width: 0; }
.pick-date .field.pick { width: 100%; padding-right: 2.2rem; }
.pick-clear { position: absolute; right: 0.35rem; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 999px; color: var(--label); transition: background 160ms var(--ease), color 160ms var(--ease); }
.pick-clear:hover, .pick-clear:focus-visible { background: var(--fill); color: var(--fg); }
.pick-clear[hidden] { display: none; }
.pick-clear svg { width: 12px; height: 12px; }
.pick-date-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.pick-search { position: relative; }
.pick-search .si { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); display: inline-flex; color: var(--label); pointer-events: none; }
.pick-search .si svg { width: 15px; height: 15px; }
.pick-search .field { padding-left: 2.2rem; min-height: 2.5rem; font-size: 13.5px; }
.me-menu.pick-panel { overflow-y: auto; overscroll-behavior: contain; }
.pick-head { display: flex; justify-content: space-between; padding: 0.55rem 0.65rem 0.3rem; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.pick-head + .pick-row { margin-top: 1px; }
.me-menu .mi.pick-row { display: grid; grid-template-columns: 9px minmax(0, 1fr) 3rem 4.4rem; gap: 0.75rem; align-items: center; padding: 0.45rem 0.65rem; font-size: 13.5px; }
.pick-row .pt { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.pick-row .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row small { font-size: 11.5px; color: var(--label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row .wk { font-family: var(--font-mono); font-size: 11.5px; color: var(--label); }
.pick-row .fc { display: flex; justify-content: flex-end; }
.pick-note { padding: 0.6rem 0.65rem; font-size: 12.5px; color: var(--label); }

/* the small form under a task cell: the task and its comments */
.me-menu.pop.pop-form { width: min(24rem, calc(100vw - 16px)); max-width: none; display: grid; gap: 0.5rem; padding: 0.7rem; }
.pop-form textarea.field { min-height: 0; resize: vertical; font-size: 13.5px; padding: 0.45rem 0.6rem; }
.pop-form input.field { font-size: 13.5px; padding: 0.4rem 0.6rem; }
.fresh-wait { color: var(--fg); }
.item-grid { display: grid; gap: 0.75rem 0.8rem; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.item-grid .ff { display: grid; gap: 0.3rem; min-width: 0; }
.item-grid .ff.wide { grid-column: 1 / -1; }
.item-grid .fl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.item-grid .field { padding: 0.45rem 0.6rem; font-size: 13.5px; }
.item-form .err { color: var(--negative); font-size: 13px; min-height: 0; }
.item-form .err:empty { display: none; }

/* ---------- faces ----------
   A person's photo in a circle, or their initials when HQ has no photo of them. The photos are
   cropped alike (scripts/team-photo.swift), so a face fills the same share of every circle. */
.face, .prose img.face { display: inline-block; border-radius: 50%; border: 0; object-fit: cover; background: var(--fill-stronger); vertical-align: middle; }
.face.none { display: inline-grid; place-items: center; font-family: var(--font-mono); font-weight: 500; line-height: 1; color: var(--label); }
.faces { display: inline-flex; align-items: center; flex: 0 0 auto; }
.faces > .face { box-shadow: 0 0 0 2px var(--bg); }
.faces > .face + .face { margin-left: -6px; }
.tbl tbody tr:nth-child(odd) .faces > .face { box-shadow: 0 0 0 2px var(--panel); }
.who-chip { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; }
.who-chip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-cell { display: inline-flex; align-items: center; gap: 0.55rem; }
.people { display: inline-flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; }
.team-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 1.2rem 0.8rem; margin: 1.6rem 0 2.6rem; }
.team-strip .tm { display: flex; flex-direction: column; align-items: center; gap: 0.55rem; text-align: center; font-size: 13px; line-height: 1.3; color: var(--fg); }
.team-strip .face.none { font-size: 20px; }

/* ---------- table filters: a funnel in the column head ---------- */
.th-filter { display: inline-flex; align-items: center; gap: 0.3rem; margin: -0.2rem -0.35rem; padding: 0.2rem 0.35rem; border-radius: 7px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; transition: background 160ms var(--ease), color 160ms var(--ease); }
.th-filter:hover, .th-filter[aria-expanded="true"] { background: var(--fill); color: var(--fg); }
.th-filter .fi { display: inline-flex; width: 12px; height: 12px; opacity: 0.5; }
.th-filter .fi svg { width: 100%; height: 100%; }
.th-filter.on { color: var(--fg); }
.th-filter.on .fi { opacity: 1; }
.th-filter.on .fi svg path { fill: currentColor; }
.filter-note { display: flex; align-items: center; gap: 0.5rem; font-size: 12.5px; color: var(--label); }
/* the line above a table: how many rows the filters show, and the table's own switch on the right */
.table-bar { display: flex; align-items: center; gap: 0.75rem; min-height: 2rem; margin-bottom: 0.6rem; }
.table-bar[hidden] { display: none; }
.table-bar > .btn { margin-left: auto; }
/* a switch: its label and a small knob that slides when it is on */
.btn.toggle { gap: 0.55rem; }
.btn.toggle .knob { position: relative; width: 26px; height: 15px; flex: 0 0 26px; border-radius: 999px; background: var(--fill-stronger); transition: background 200ms var(--ease); }
.btn.toggle .knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); transition: transform 200ms var(--ease); }
.btn.toggle[aria-pressed="true"] { color: var(--fg); }
.btn.toggle[aria-pressed="true"] .knob { background: var(--fg); }
.btn.toggle[aria-pressed="true"] .knob::after { transform: translateX(11px); }
/* the Backlog by milestone: a header row per milestone, as on the roadmap */
.tbl tr.grp td { background: transparent !important; padding: 1.1rem 0 0.35rem; }
.tbl tr.grp:first-child td { padding-top: 0.2rem; }
/* the header keeps to the left edge of the table's frame while a wide table scrolls sideways */
.grp-btn { position: sticky; left: 0; display: inline-flex; align-items: center; gap: 0.6rem; max-width: 100%; padding: 0.3rem 0.6rem; border-radius: var(--radius-card); text-align: left; color: var(--fg); transition: background 160ms var(--ease); }
.grp-btn:hover { background: var(--fill); }
.grp-btn .chev { display: inline-flex; color: var(--label); transform: rotate(90deg); transition: transform 240ms var(--ease); }
.tbl tr.grp.shut .grp-btn .chev { transform: none; }
.grp-btn .gname { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
.grp-btn .gmeta { font-size: 12px; color: var(--label); }
/* the Launch checklist by milestone: the sheet's number, a ring of its share done, and its line under */
.grp-btn:has(.gsub) { flex-wrap: wrap; }
.grp-btn .gnum { font-family: var(--font-mono); font-size: 12px; color: var(--label); }
.grp-btn .ring { --mc: var(--mk-ok); }
.grp-btn .gsub { flex-basis: 100%; font-size: 12.5px; font-weight: 400; color: var(--muted); margin-top: -0.1rem; }
/* a tag: what a task or a milestone is linked to (Launch, Release, UAT). The label voice in a hairline pill, no colour */
.tag-chip { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 0.05rem 0.45rem; border: 1px solid var(--hairline-strong); border-radius: 999px; font-family: var(--font-mono); font-size: 10px; font-weight: 400; letter-spacing: 0.1em; line-height: 1.6; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
/* on the roadmap a tag sits at the right of its row, before the faces */
.rm-name > .tag-chip, .rm-c.rm-title > .tag-chip { margin-left: auto; }
.rm-name > .tag-chip + .faces, .rm-c.rm-title > .tag-chip + .faces { margin-left: 0; }
/* the Roadmap's tag filter: a column head's funnel, on the line above the calendar */
.table-bar > .bar-filter { margin: 0 0 0 auto; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
/* the checklist's item and comment cells keep room to read; a narrow frame scrolls the table sideways instead */
.tbl td.ck-item { min-width: 22rem; }
.tbl td.ck-note { min-width: 14rem; }
/* the Milestone column: its colour and name, cut short with the full name on hover */
.tbl td.ms-cell { white-space: nowrap; }
.ms-tag { display: inline-flex; align-items: center; gap: 0.45rem; max-width: 12rem; }
.ms-tag .rm-sw { width: 9px; height: 9px; flex: 0 0 9px; }
.ms-tag .nm { overflow: hidden; text-overflow: ellipsis; }
.owner-cell .more, .pick .more { color: var(--label); }
.dim { color: var(--label); }
/* a new row: the task typed in place, the defaults quiet beside it */
.tbl tr.draft td { background: var(--fill) !important; }
.tbl input.cell-new { width: 100%; min-width: 12rem; background: var(--card); border: 1px solid var(--ring); border-radius: var(--radius-tile); padding: 0.3rem 0.5rem; font-size: 13.5px; color: var(--fg); }
.tbl input.cell-new:disabled { opacity: 0.6; }
.tbl td.nowrap { white-space: nowrap; }
.tbl td.none { color: var(--label); padding: 1rem 0.6rem; }

/* the small menus under a button: a thread's status and actions, the table filters */
.me-menu.pop { min-width: 12.5rem; max-width: min(20rem, calc(100vw - 16px)); max-height: min(24rem, calc(100vh - 16px)); overflow-y: auto; }
.pop .mi { font-size: 13.5px; padding: 7px 10px; }
.pop .mi .tick { display: inline-flex; margin-left: auto; }
.pop .mi .tick svg, .pop .mi .mi-i svg { color: var(--fg); }
.pop .mi .mi-i { display: inline-flex; }
.pop .mi.danger, .pop .mi.danger .mi-i svg { color: var(--mk-no); }
.filter-menu .mi .box { display: inline-grid; place-items: center; width: 16px; height: 16px; flex: 0 0 16px; border-radius: 5px; border: 1.5px solid var(--hairline-strong); }
.filter-menu .mi.on { background: transparent; }
.filter-menu .mi:hover, .filter-menu .mi:focus-visible { background: var(--fill); }
.filter-menu .mi.on .box { background: var(--fg); border-color: var(--fg); }
.filter-menu .mi .box svg { width: 12px; height: 12px; flex: 0 0 12px; color: var(--bg); }
.filter-menu .mi .n { font-family: var(--font-mono); font-size: 11px; color: var(--label); }

/* ---------- threads ---------- */
.composer { border: 1px solid var(--hairline); border-radius: var(--radius-panel); background: var(--panel); padding: 0.75rem 0.9rem; margin-bottom: 1.5rem; }
.composer .open { width: 100%; text-align: left; color: var(--label); font-size: 14px; padding: 0.2rem 0; }
/* a thread: its kind's icon, the title and a quiet line under it, the thumbs on the right */
.post { display: flex; align-items: flex-start; gap: 0.9rem; padding: 0.95rem 0; border-top: 1px solid var(--hairline); }
.post:first-of-type { border-top: 0; }
.post.one { border-top: 0; padding-top: 0; }
.post .main, .comment .main { flex: 1; min-width: 0; }
.post .title { font-size: 15.5px; color: var(--fg); }
.post .title:hover { text-decoration: underline; text-underline-offset: 3px; }
.post .meta { font-size: 12.5px; color: var(--label); display: flex; align-items: center; gap: 0.35rem 0.6rem; flex-wrap: wrap; margin-top: 0.3rem; }
.post .meta .who-chip { color: var(--muted); }
.post-side { display: flex; align-items: center; gap: 0.1rem; flex: 0 0 auto; margin-left: auto; align-self: flex-start; }
.post-side .thumbs { margin-left: 0; }
.st-btn { display: inline-flex; align-items: center; gap: 0.4rem; margin: -0.15rem -0.1rem; padding: 0.15rem 0.35rem 0.15rem 0.5rem; border-radius: 999px; font-size: 12.5px; color: var(--muted); transition: background 200ms var(--ease), color 200ms var(--ease); }
.st-btn:hover, .st-btn[aria-expanded="true"] { background: var(--fill); color: var(--fg); }
.st-btn .chev { display: inline-flex; width: 14px; height: 14px; color: var(--label); }
.st-btn .chev svg { width: 100%; height: 100%; }
.mark.st-open { background: transparent; border-color: var(--label); }
.mark.st-closed { background: var(--label); border-color: var(--label); }
/* a backlog task paused (a grey ring) or blocked (a grey dot): red stays for "no" alone */
.mark.paused { background: transparent; border-color: var(--label); }
.mark.blocked { background: var(--label); border-color: var(--label); }
.pinned { display: inline-flex; align-items: center; gap: 0.25rem; }
.pinned .pi { display: inline-flex; width: 13px; height: 13px; }
.pinned .pi svg { width: 100%; height: 100%; }
.more-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; color: var(--label); transition: background 200ms var(--ease), color 200ms var(--ease); }
.more-btn:hover, .more-btn[aria-expanded="true"] { background: var(--fill); color: var(--fg); }
.more-btn svg { width: 18px; height: 18px; }
.post .meta .type { color: var(--k); font-weight: 500; }
.post .body { margin-top: 0.4rem; color: var(--muted); font-size: 14px; }
/* the kinds' colours: warm and quiet, one each, light and dark */
.kind-feature { --k: #3d8a63; --k-bg: rgb(61 138 99 / 0.12); }
.kind-issue { --k: #c0573f; --k-bg: rgb(192 87 63 / 0.12); }
.kind-question { --k: #4c79b5; --k-bg: rgb(76 121 181 / 0.12); }
.kind-idea { --k: #b07d16; --k-bg: rgb(214 160 40 / 0.16); }
.kind-announcement { --k: #8a5fae; --k-bg: rgb(138 95 174 / 0.12); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kind-feature { --k: #6fc497; }
  :root:not([data-theme="light"]) .kind-issue { --k: #ec8b74; }
  :root:not([data-theme="light"]) .kind-question { --k: #86aee6; }
  :root:not([data-theme="light"]) .kind-idea { --k: #e7bb5a; }
  :root:not([data-theme="light"]) .kind-announcement { --k: #bd97e0; }
}
:root[data-theme="dark"] .kind-feature { --k: #6fc497; }
:root[data-theme="dark"] .kind-issue { --k: #ec8b74; }
:root[data-theme="dark"] .kind-question { --k: #86aee6; }
:root[data-theme="dark"] .kind-idea { --k: #e7bb5a; }
:root[data-theme="dark"] .kind-announcement { --k: #bd97e0; }
.kind { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--k); background: var(--k-bg); }
.kind svg { width: 18px; height: 18px; }
.pill .kdot { width: 7px; height: 7px; border-radius: 50%; background: var(--k); flex: 0 0 7px; }
.post.one .kind { margin-top: 2px; }
/* thumbs up and down, each with its count, on the right */
.thumbs { display: flex; gap: 0.25rem; flex: 0 0 auto; margin-left: auto; align-self: center; }
.post.one .thumbs, .comment .thumbs { align-self: flex-start; }
.thumb { display: inline-flex; align-items: center; gap: 0.35rem; height: 30px; padding: 0 0.6rem; border-radius: 999px; color: var(--label); font-size: 12.5px; font-variant-numeric: tabular-nums; transition: background 200ms var(--ease), color 200ms var(--ease); }
.thumb:hover { background: var(--fill); color: var(--fg); }
.thumb.on { background: var(--fill-strong); color: var(--fg); }
.thumb .ti { display: inline-flex; width: 16px; height: 16px; flex: 0 0 16px; }
.thumb .ti svg { width: 100%; height: 100%; }
.thumb .ti.down { transform: scaleY(-1); }
.comment .thumb { height: 26px; padding: 0 0.5rem; font-size: 12px; }
.comment .thumb .ti { width: 14px; height: 14px; flex-basis: 14px; }
.comment { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.7rem 0; }
.comment.deep { margin-left: 2.2rem; border-left: 1px solid var(--hairline); padding-left: 0.9rem; }
.comment .meta { display: flex; align-items: center; gap: 0.5rem; font-size: 12px; color: var(--label); }
.comment .meta .c-name { color: var(--fg); font-weight: 500; }
.comment > .c-face { margin-top: 1px; }
.comment .body { font-size: 14px; color: var(--fg); margin-top: 0.15rem; }
.comment .acts { display: flex; gap: 0.5rem; margin-top: 0.25rem; }
.comment .acts button { font-size: 12px; color: var(--label); }
.comment .acts button:hover { color: var(--fg); }

/* ---------- ask ---------- */
.chat { display: flex; flex-direction: column; gap: 1rem; max-width: 62rem; }
.turn { display: grid; grid-template-columns: 2rem 1fr; gap: 0.8rem; }
.turn .who { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--label); padding-top: 0.3rem; }
.turn .bubble { font-size: 14.5px; line-height: 1.6; }
.turn.me .bubble { color: var(--fg); }
.turn.ai .bubble { color: var(--muted); }
.turn .bubble.prose p { color: var(--muted); }
.askbox { position: sticky; bottom: 0; background: var(--bg); padding-top: 0.8rem; padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px)); }
.askbox .field { padding: 0.7rem 0.9rem; }
.thinking { color: var(--label); font-size: 13px; }


/* ---------- the gate: one page that asks for the team code ---------- */
.gate { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: var(--bg); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 2rem; }
.gate .card { width: 100%; max-width: 22rem; padding: 1.6rem 1.5rem 1.4rem; }
.gate .mark-row { display: flex; align-items: center; gap: 6px; margin-bottom: 1.4rem; font-size: 16px; font-weight: 500; }
.gate .mark-row svg { width: 28px; height: 28px; transform: translateY(15%); }
.gate h1 { font-size: 20px; letter-spacing: -0.015em; }
.gate p { color: var(--muted); font-size: 13.5px; margin-top: 0.4rem; }
.gate form { display: grid; gap: 0.6rem; margin-top: 1.1rem; }
.gate input.field { font-size: 14.5px; padding: 0.62rem 0.8rem; }
.gate input.field.code { font-family: var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase; }
.gate form .btn { justify-content: center; padding-block: 0.55rem; margin-top: 0.2rem; }
.gate .err { color: var(--negative); font-size: 13px; min-height: 1.2em; }
/* the team code: a field at the foot of the menu, above the profile's separator (owner only).
   Editing keeps the same box: the value becomes the input, the pencil becomes save and cancel. */
.codebox { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 9px 6px 9px 12px; min-height: 58px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-panel); background: var(--card); transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease); }
.codebox.editing { border-color: var(--ring); box-shadow: 0 0 0 3px var(--fill); }
.codebox-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.codebox .eyebrow { font-size: 9.5px; line-height: 1; }
.codebox .code-value, .codebox .code-input { font-family: var(--font-mono); font-size: 14px; line-height: 18px; letter-spacing: 0.16em; color: var(--fg); }
.codebox .code-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.codebox .code-value.dim { color: var(--label); letter-spacing: 0.04em; font-size: 13px; }
.codebox .code-input { width: 100%; min-width: 0; border: 0; padding: 0; background: transparent; outline: none; text-transform: uppercase; }
.codebox .code-input::placeholder { color: var(--dim); text-transform: none; letter-spacing: 0.02em; font-family: var(--font-sans); font-size: 13px; }
.codebox .code-actions { display: flex; gap: 2px; }
.codebox .side-toggle svg { width: 15px; height: 15px; }
.btn.small { padding: 0.28rem 0.65rem; font-size: 12.5px; }
.me .gate-row { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.3rem; font-size: 12px; color: var(--muted); white-space: nowrap; text-align: left; }
.me .gate-row svg { width: 12px; height: 12px; flex: 0 0 12px; }
.me .gate-row:hover { color: var(--fg); }
.me > div { flex: 1; min-width: 0; }
.me .gate-form { display: grid; gap: 0.4rem; margin-top: 0.4rem; }
.me .gate-form .row { gap: 0.4rem; }

/* ---------- the box for a comment on selected text, and the owner's list ---------- */
.note-pop { position: fixed; z-index: 46; width: min(23rem, calc(100vw - 16px)); display: grid; gap: 10px; padding: 12px 12px 12px 14px; background: var(--card); border: 1px solid var(--hairline-strong); border-radius: 10px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 24px 60px -24px rgb(0 0 0 / 0.55); animation: pop-in 220ms var(--ease) both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(4px) scale(0.985); } to { opacity: 1; transform: none; } }
.note-head { display: flex; align-items: center; justify-content: space-between; margin: -2px -4px -4px 0; }
.note-pop blockquote, .note-card blockquote { margin: 0; padding: 2px 0 2px 10px; border-left: 2px solid var(--hairline-strong); color: var(--muted); font-size: 13px; line-height: 1.5; }
.note-field { width: 100%; resize: none; min-height: 5.5rem; padding: 10px 11px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-card); background: var(--bg); color: var(--fg); font: inherit; font-size: 13.5px; line-height: 1.5; transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease); }
.note-field:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px var(--fill); }
.note-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.note-sign { font-size: 11.5px; color: var(--label); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-foot .row { flex-wrap: nowrap; gap: 4px; }
/* the comments icon at the right of the profile row, owner only */
.me-icon { position: relative; width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--radius-card); color: var(--label); margin-left: auto; transition: background 200ms var(--ease), color 200ms var(--ease); }
.me-icon:hover, .me-icon.on { background: var(--fill); color: var(--fg); }
.me-icon + .me-icon { margin-left: 0; }
.me-icon svg { width: 17px; height: 17px; }
.me-icon .badge { position: absolute; top: 1px; right: 0; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-family: var(--font-mono); font-size: 9.5px; line-height: 15px; text-align: center; }
.note-card { display: grid; gap: 0.55rem; padding: 0.95rem 0; border-top: 1px solid var(--hairline); }
.note-card .meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; font-size: 12.5px; color: var(--label); }
.note-card .meta .who { color: var(--fg); font-weight: 500; font-size: 13.5px; }
.note-card .body { font-size: 14.5px; color: var(--fg); white-space: pre-wrap; }
.note-card.done { opacity: 0.55; }
.gate label { font-size: 12px; color: var(--label); }

/* ---------- the comment control that follows a text selection ---------- */
.comment-fab { position: fixed; z-index: 45; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.38rem 0.75rem; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-size: 12.5px; box-shadow: 0 8px 24px -10px rgb(0 0 0 / 0.45); transition: transform 200ms var(--ease); }
.comment-fab:hover { transform: translateY(-1px); }
.comment-fab svg { width: 14px; height: 14px; }

/* ---------- misc ---------- */
.kit-frame { display: block; width: 100%; border: 0; min-height: 50vh; overflow: hidden; }
.diff { font-family: var(--font-mono); font-size: 12px; white-space: pre-wrap; background: var(--fill); border-radius: var(--radius-card); padding: 0.8rem; max-height: 24rem; overflow: auto; }
.versions { display: grid; gap: 0.3rem; }
.versions .v { display: flex; justify-content: space-between; gap: 1rem; font-size: 13px; padding: 0.45rem 0; border-top: 1px solid var(--hairline); color: var(--muted); }
.kbd { font-family: var(--font-mono); font-size: 11px; color: var(--label); }

/* a value from a small fixed set, as a tinted pill: user weight, readiness, priority, tag (his call,
   11 Nov 2026). The tint is the state colour at low strength; the text keeps the ink colour */
.val-pill { display: inline-flex; align-items: center; padding: 0.08rem 0.55rem; border-radius: 999px; font-size: 12px; line-height: 1.5; white-space: nowrap; color: var(--fg); background: color-mix(in srgb, var(--tone, var(--fg)) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tone, var(--fg)) 30%, transparent); }
.val-pill[data-tone="ok"], .tag-chip[data-tone="ok"] { --tone: var(--mk-ok); }
.val-pill[data-tone="warn"], .tag-chip[data-tone="warn"] { --tone: var(--mk-warn); }
.val-pill[data-tone="no"], .tag-chip[data-tone="no"] { --tone: var(--mk-no); }
.val-pill[data-tone="soon"], .tag-chip[data-tone="soon"] { --tone: var(--mk-soon); }
.val-pill[data-tone="deep"], .tag-chip[data-tone="deep"] { --tone: var(--mk-deep); }
.val-pill[data-tone="plain"] { --tone: var(--muted); }
.tag-chip[data-tone]:not([data-tone=""]) { color: var(--fg); background: color-mix(in srgb, var(--tone) 12%, transparent); border-color: color-mix(in srgb, var(--tone) 35%, transparent); }
/* Connected docs: one tab read again from its row */
.tbl td.read-now { width: 1%; padding-top: 0.35rem; padding-bottom: 0.35rem; }
.side-toggle.reading svg { animation: read-spin 900ms linear infinite; }
@keyframes read-spin { to { transform: rotate(360deg); } }
