/* ArgonHub's one stylesheet (argonhub#18).
 *
 * Two looks, as OxygenHub has them, each light or dark:
 *   - Default (data-look="github"): GitHub's Primer colours, rounded boxes,
 *     pill labels; light unless the system or the reader says dark.
 *   - Classic (data-look="classic"): OxygenHub's RetroPlay look, deep navy
 *     with cyan light and square corners.
 * early.js sets data-look and data-theme from the reader's cookies before
 * the first paint; without script the page is the default look following
 * the system. Colour lives in the tokens below, never in components. */

:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --soft: #f6f8fa;
  --sunk: #eff2f5;
  --ink: #1f2328;
  --mute: #59636e;
  --line: #d1d9e0;
  --line-soft: #e4e8ec;
  --acc: #0969da;
  --acc-ink: #ffffff;
  --acc-soft: rgba(9, 105, 218, .1);
  --ok: #1a7f37;
  --bad: #d1242f;
  --warn: #9a6700;
  --need: #bc4c00;
  --tab: #fd8c73;
  --brand-1: #00c6e0;
  --brand-2: #0072ff;
  --radius: 6px;
  --radius-lg: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --shadow: 0 1px 0 rgba(31, 35, 40, .04);
  --hover: rgba(31, 35, 40, .04);
  --field: #ffffff;
  --rail-w: 64px;
  --side-w: 264px;
  /* The cloud chamber (argonhub#25): its ground, its droplets, and the
   * saturation and lightness its tracks' hues are drawn at. */
  --chamber-w: 330px;
  --chamber-bg: #eef2f7;
  --chamber-drop: rgba(31, 35, 40, .55);
  --chamber-sat: 70%;
  --chamber-light: 42%;
  --chamber-ink: #59636e;
  /* The thread panel (argonhub#32), over the chamber's column. */
  --thread-w: 420px;
  color-scheme: light;
}

/* Default look, dark: Primer's dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117;
    --panel: #0d1117;
    --soft: #151b23;
    --sunk: #010409;
    --ink: #f0f6fc;
    --mute: #9198a1;
    --line: #3d444d;
    --line-soft: #262c36;
    --acc: #4493f8;
    --acc-ink: #ffffff;
    --acc-soft: rgba(68, 147, 248, .15);
    --ok: #3fb950;
    --bad: #f85149;
    --warn: #d29922;
    --need: #f0883e;
    --shadow: none;
    --hover: rgba(240, 246, 252, .04);
    --field: #010409;
    --chamber-bg: #0a0e14;
    --chamber-drop: rgba(223, 227, 255, .8);
    --chamber-sat: 80%;
    --chamber-light: 68%;
    --chamber-ink: #9198a1;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1117;
  --panel: #0d1117;
  --soft: #151b23;
  --sunk: #010409;
  --ink: #f0f6fc;
  --mute: #9198a1;
  --line: #3d444d;
  --line-soft: #262c36;
  --acc: #4493f8;
  --acc-ink: #ffffff;
  --acc-soft: rgba(68, 147, 248, .15);
  --ok: #3fb950;
  --bad: #f85149;
  --warn: #d29922;
  --need: #f0883e;
  --shadow: none;
  --hover: rgba(240, 246, 252, .04);
  --field: #010409;
  --chamber-bg: #0a0e14;
  --chamber-drop: rgba(223, 227, 255, .8);
  --chamber-sat: 80%;
  --chamber-light: 68%;
  --chamber-ink: #9198a1;
  color-scheme: dark;
}

/* Classic look, dark (its own default under auto in a dark system). */
:root[data-look="classic"] {
  --bg: #070c18;
  --panel: #0e1526;
  --soft: #141d33;
  --sunk: #050913;
  --ink: #e6ecf7;
  --mute: #8592ad;
  --line: #1f2b47;
  --line-soft: #18223b;
  --acc: #00e0f0;
  --acc-ink: #04121a;
  --acc-soft: rgba(0, 224, 240, .12);
  --ok: #5fe3a1;
  --bad: #ff5e7a;
  --warn: #b48cff;
  --need: #ffb35c;
  --tab: #00e0f0;
  --brand-1: #00f0ff;
  --brand-2: #0072ff;
  --radius: 0;
  --radius-lg: 0;
  --shadow: none;
  --hover: rgba(0, 224, 240, .05);
  --field: #050913;
  --chamber-bg: #050913;
  --chamber-drop: rgba(160, 240, 255, .8);
  --chamber-sat: 90%;
  --chamber-light: 64%;
  --chamber-ink: #8592ad;
  color-scheme: dark;
}
/* Classic look, light. */
:root[data-look="classic"][data-theme="light"] {
  --bg: #f2f5fb;
  --panel: #ffffff;
  --soft: #e8eef8;
  --sunk: #dde5f2;
  --ink: #0b1630;
  --mute: #4a5a7a;
  --line: #c4d0e6;
  --line-soft: #d8e0ee;
  --acc: #0062db;
  --acc-ink: #ffffff;
  --acc-soft: rgba(0, 98, 219, .1);
  --ok: #12805c;
  --bad: #c8243f;
  --warn: #7a4fd0;
  --need: #b45309;
  --tab: #0062db;
  --hover: rgba(0, 98, 219, .05);
  --field: #ffffff;
  --chamber-bg: #e3e9f4;
  --chamber-drop: rgba(11, 22, 48, .5);
  --chamber-sat: 75%;
  --chamber-light: 40%;
  --chamber-ink: #4a5a7a;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root[data-look="classic"]:not([data-theme="dark"]) {
    --bg: #f2f5fb;
    --panel: #ffffff;
    --soft: #e8eef8;
    --sunk: #dde5f2;
    --ink: #0b1630;
    --mute: #4a5a7a;
    --line: #c4d0e6;
    --line-soft: #d8e0ee;
    --acc: #0062db;
    --acc-ink: #ffffff;
    --acc-soft: rgba(0, 98, 219, .1);
    --ok: #12805c;
    --bad: #c8243f;
    --warn: #7a4fd0;
    --need: #b45309;
    --tab: #0062db;
    --hover: rgba(0, 98, 219, .05);
    --field: #ffffff;
    --chamber-bg: #e3e9f4;
    --chamber-drop: rgba(11, 22, 48, .5);
    --chamber-sat: 75%;
    --chamber-light: 40%;
    --chamber-ink: #4a5a7a;
    color-scheme: light;
  }
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font: 14px/1.5 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; font-weight: 600; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; font-weight: 600; margin: 1.2em 0 .5em; }
h3 { font-size: .95rem; font-weight: 600; margin: 1em 0 .3em; }
code, pre { font-family: var(--mono); font-size: .88em; }
code { overflow-wrap: anywhere; padding: .1em .35em; border-radius: var(--radius); background: var(--soft); }
pre code { padding: 0; background: none; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.meta { color: var(--mute); font-size: .9em; }
.ok { color: var(--ok); }
.warn, .refused { color: var(--warn); }
.bad { color: var(--bad); }
.who { font-weight: 600; color: var(--ink); }
.summary { display: block; overflow-wrap: anywhere; color: var(--mute); }
.empty { padding: 22px; text-align: center; color: var(--mute); border: 1px dashed var(--line); border-radius: var(--radius); background: var(--panel); }

/* Classic's wordmark. */
:root[data-look="classic"] h1 { letter-spacing: .02em; }
:root[data-look="classic"] .brand span { text-transform: uppercase; letter-spacing: .12em; font-size: .9rem; }

/* ---- The header (argonhub#24), as OxygenHub's: the brand, search, the
 * theme and the profile menu; then the menu row ---- */
.top {
  position: relative;
  z-index: 4;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 8px 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1.05rem; color: var(--ink); flex: none; }
.brand:hover { text-decoration: none; }
.brand .logo { display: block; width: 28px; height: 28px; }
.search { position: relative; flex: 1; max-width: 34rem; margin: 0 0 0 8px; }
.search-icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--mute); pointer-events: none; }
.search input, .search-page input {
  width: 100%; font: inherit; padding: 5px 10px 5px 32px; color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.search input::placeholder, .search-page input::placeholder { color: var(--mute); }
.search input:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.account { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.theme-toggle {
  display: inline-flex; align-items: center; padding: 6px 8px; margin: 0;
  color: var(--mute); border-radius: var(--radius); font: inherit; background: none; border: 0; cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); background: var(--acc-soft); filter: none; }
.theme-toggle[hidden] { display: none; }
.profile { position: relative; }
.profile > summary {
  list-style: none; display: flex; align-items: center; gap: 4px; padding: 2px; cursor: pointer;
  color: var(--mute); border-radius: 999px;
}
.profile > summary::-webkit-details-marker { display: none; }
.profile > summary:hover, .profile[open] > summary { color: var(--ink); }
.avatar.me { width: 30px; height: 30px; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); color: #fff; }
.profile-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 12rem; padding: 6px 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.profile-menu form { margin: 0; }
.profile-menu a, .profile-menu .menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 14px; margin: 0;
  color: var(--ink); font: inherit; font-weight: 400; text-align: left; background: none; border: 0; border-radius: 0; cursor: pointer;
}
.profile-menu .menu-item { border-top: 1px solid var(--line-soft); margin-top: 4px; padding-top: 8px; }
.profile-menu a:hover, .profile-menu .menu-item:hover { background: var(--acc-soft); text-decoration: none; filter: none; }
.profile-menu svg { color: var(--mute); }

/* The menu row: the instance's pages, and Admin at the far right. */
.menu {
  display: flex; gap: 4px; padding: 0 16px; overflow-x: auto; scrollbar-width: none;
}
.menu::-webkit-scrollbar { display: none; }
.menu a {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 6px;
  color: var(--mute); border-bottom: 2px solid transparent; white-space: nowrap;
}
.menu a svg { color: var(--mute); }
.menu a:hover { color: var(--ink); text-decoration: none; border-bottom-color: var(--line); }
.menu a.here { color: var(--ink); font-weight: 600; border-bottom-color: var(--acc); }
.menu a.here svg { color: var(--ink); }
.menu .menu-end { margin-left: auto; }

/* ---- The frame: rail, sidebar, pane ---- */
.app {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
}
.app.with-side { grid-template-columns: var(--rail-w) var(--side-w) minmax(0, 1fr); }
.app.with-chamber { grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--chamber-w); }
.app.with-side.with-chamber { grid-template-columns: var(--rail-w) var(--side-w) minmax(0, 1fr) var(--chamber-w); }

/* The cloud chamber (argonhub#25): a column beside the chat, never over
 * it, its full height, fading out towards the chat on its left and with a
 * hard edge on the right. Only on a wide screen, and off in Settings. */
.chamber {
  position: relative; min-width: 0; overflow: hidden; background: var(--chamber-bg);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 38%);
  mask-image: linear-gradient(to right, transparent 0, #000 38%);
}
.chamber canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
@media (max-width: 1099px) {
  :root { --chamber-w: 0px; }
  .chamber { display: none; }
}
:root[data-backdrop="off"] { --chamber-w: 0px; }
:root[data-backdrop="off"] .chamber { display: none; }
main.solo { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 46rem; margin: 0 auto; padding: 32px 16px; }

.rail {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 0; background: var(--sunk); border-right: 1px solid var(--line);
}
.rail-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--mute); }
.rail-item:hover { text-decoration: none; color: var(--ink); }
.rail-mark {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; background: var(--panel); border: 1px solid var(--line);
  color: var(--ink); font-weight: 700; font-size: 1rem;
  transition: border-radius .2s ease, background .2s ease, color .2s ease;
}
.rail-mark.small { display: inline-grid; width: 26px; height: 26px; border-radius: 8px; font-size: .8rem; margin-right: 8px; vertical-align: middle; }
.rail-item:hover .rail-mark { border-radius: 10px; border-color: var(--acc); }
.rail-item.here .rail-mark {
  border-radius: 10px; color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}
.rail-item.here::before {
  content: ""; position: absolute; left: -12px; top: 8px; width: 4px; height: 24px;
  border-radius: 0 4px 4px 0; background: var(--ink);
}
.rail-name { font-size: .68rem; max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--need); color: #fff; font-size: .7rem; font-weight: 700; line-height: 1;
}
.rail-item .badge { position: absolute; top: -4px; right: -6px; border: 2px solid var(--sunk); }
:root[data-look="classic"] .rail-mark, :root[data-look="classic"] .badge { border-radius: 0; }

.side { background: var(--soft); border-right: 1px solid var(--line); overflow-y: auto; }
.side > summary.side-toggle { display: none; }
.side-body { padding: 12px 8px 24px; }
.side details.folder { margin: 2px 0 8px; }
.side summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  padding: 4px 8px; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--mute);
}
.side summary::-webkit-details-marker { display: none; }
.side details.folder > summary::before {
  content: ""; width: 0; height: 0; border-left: 4px solid currentColor;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .15s ease;
}
.side details.folder[open] > summary::before { transform: rotate(90deg); }
.count { margin-left: auto; font-weight: 500; color: var(--mute); font-size: .75rem; text-transform: none; letter-spacing: 0; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side-channels a, .side-agents li {
  display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: var(--radius); color: var(--ink);
}
.side-channels a:hover { background: var(--acc-soft); text-decoration: none; }
.side-channels a.here { background: var(--acc-soft); color: var(--acc); font-weight: 600; box-shadow: inset 3px 0 0 var(--acc); }
.side .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .when { color: var(--mute); font-size: .75rem; white-space: nowrap; }
.side-agents .when { max-width: 45%; overflow: hidden; text-overflow: ellipsis; }

.needs {
  margin: 0 4px 14px; padding: 8px; border: 1px solid var(--need);
  border-radius: var(--radius); background: color-mix(in srgb, var(--need) 8%, var(--panel));
}
.needs h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: .8rem; color: var(--need); text-transform: uppercase; letter-spacing: .04em; }
.needs h3 .count { color: var(--need); }
.needs li a { display: block; padding: 5px 6px; border-radius: var(--radius); color: var(--ink); }
.needs li a:hover { background: var(--panel); text-decoration: none; }
.needs .summary { font-size: .85em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.needs .when { float: right; color: var(--mute); font-size: .75rem; }
.needs .more { display: block; padding: 4px 6px; font-size: .85em; }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--line); box-shadow: 0 0 0 2px var(--soft); }
.dot.online, .dot.busy { background: var(--ok); }
.dot.blocked { background: var(--bad); }
.dot.paused, .dot.idle { background: var(--warn); }
.dot.offline, .dot.disabled { background: transparent; border: 1.5px solid var(--mute); }
.dot.online, .dot.busy { animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); } }

.pane { min-width: 0; width: 100%; padding: 0 24px 0; display: flex; flex-direction: column; }
.pane > .foot.in-pane { margin: auto -24px 0; }
.pane > * { flex-shrink: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 18px 0 14px; }
.page-head .meta { margin: 0; }

/* Underline sub-navigation, for Admin's and Settings' pages. */
.tabs {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -24px; padding: 8px 24px 0;
  border-bottom: 1px solid var(--line-soft);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  color: var(--mute); border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); text-decoration: none; border-bottom-color: var(--line); }
.tabs a.here { color: var(--ink); font-weight: 600; border-bottom-color: var(--acc); }

/* ---- Boxes: panels, rows, cards, pills ---- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 0 18px; }
.panel-head { margin: 0; padding: 10px 14px; font-size: .9rem; font-weight: 600; background: var(--soft); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { padding: 10px 14px; border-top: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.rows > li:first-child { border-top: 0; }
.rows > li:has(> .row-link) { padding: 0; }
.row-link { display: block; padding: 10px 14px; color: inherit; }
.row-link:hover { background: var(--soft); text-decoration: none; }
.row-link .channel { color: var(--acc); font-weight: 600; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 14px; margin-bottom: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; box-shadow: var(--shadow); overflow-wrap: anywhere; }
.card h2 { margin: 0 0 10px; display: flex; align-items: center; }
.card .last { margin: 10px 0 0; }
.card.signin { max-width: 28rem; margin: 40px auto; text-align: center; padding: 28px; }
.card.signin h1 { margin-bottom: 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pill, .kind {
  display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--mute); font-size: .78rem; font-weight: 500; background: var(--panel);
}
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.pill.need { color: #fff; background: var(--need); border-color: var(--need); }
.kind { padding: 0 7px; font-size: .72rem; }
.kind.request { color: var(--need); border-color: color-mix(in srgb, var(--need) 50%, transparent); }
.kind.answer, .kind.decision { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.kind.handoff, .kind.status { color: var(--acc); border-color: color-mix(in srgb, var(--acc) 45%, transparent); }
:root[data-look="classic"] .pill, :root[data-look="classic"] .kind { border-radius: 0; }

/* ---- A channel (argonhub#24): messages flow as Slack's do, no boxes;
 * a thread folds into one line that opens the panel beside it. In time
 * order (argonhub#32): oldest at the top, the newest just above the
 * compose box, which stays at the foot of the column as the list scrolls
 * above it; a short channel's few messages sit down by the box. ---- */
.conv { flex: 1 0 auto; display: flex; flex-direction: column; }
.conv-main { flex: 1 0 auto; display: flex; flex-direction: column; }
.log { margin-top: auto; padding-bottom: 8px; }
.conv-main > .compose, .conv-main > .compose-off {
  position: sticky; bottom: 0; z-index: 25; margin: 0 -24px; padding: 10px 24px 14px;
  background: var(--bg); border-top: 1px solid var(--line-soft);
}
.app.chat .pane > .foot.in-pane { display: none; }
.thread-list, .replies { list-style: none; margin: 0 -24px; padding: 0; }
.replies { margin: 0; }
.thread { margin: 0; }
.day-line { display: flex; align-items: center; gap: 12px; margin: 14px 24px 6px; color: var(--mute); font-size: .78rem; font-weight: 600; }
.day-line::before, .day-line::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.post { display: flex; gap: 10px; padding: 6px 24px; overflow-wrap: anywhere; }
.post:hover { background: var(--hover); }
.post:target { background: var(--acc-soft); box-shadow: inset 3px 0 0 var(--acc); }
.avatar {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; margin-top: 2px;
  background: var(--acc-soft); color: var(--acc); font-weight: 700; font-size: .9rem;
}
:root[data-look="classic"] .avatar { border-radius: 0; }
.avatar.me { border-radius: 50%; }
.post.k-request .avatar { background: color-mix(in srgb, var(--need) 15%, transparent); color: var(--need); }
.post-main { min-width: 0; flex: 1; }
.post .byline { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; line-height: 1.35; }
.post .byline .who { font-weight: 700; }
.post .byline .meta { font-size: .78rem; }
.post .body { margin-top: 1px; }
.post .body > :first-child { margin-top: 0; }
.post .body > :last-child { margin-bottom: 0; }
.post .body p { margin: .2em 0; }
.post .body pre { overflow-x: auto; padding: 10px; background: var(--soft); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.post .body table { border-collapse: collapse; display: block; overflow-x: auto; }
.post .body td, .post .body th { border: 1px solid var(--line); padding: 3px 8px; }
.post .body ul, .post .body ol { padding-left: 1.4em; margin: .3em 0; }
.post.redacted .body { color: var(--mute); font-style: italic; }
.guest { font-size: .75rem; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); border-radius: 999px; padding: 0 7px; }
.files { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.files img { max-width: min(100%, 360px); max-height: 240px; border-radius: var(--radius); border: 1px solid var(--line); }
.file { padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--radius); }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0 0; }
/* A reaction or the seen count: emoji and number; who, in a bubble on hover or focus. */
.chip { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 999px; background: var(--soft); color: var(--mute); font-size: .78rem; line-height: 1.6; border: 1px solid var(--line-soft); cursor: default; }
.chip:hover, .chip:focus-visible { border-color: var(--line); color: var(--ink); }
.chip.can { cursor: pointer; }
.chip.can:hover { border-color: var(--acc); background: var(--acc-soft); }
/* Not laid out until shown: a hidden bubble still widened a phone's page. */
.chip::after { content: attr(data-who); position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 30; display: none; white-space: nowrap; max-width: min(60ch, 80vw); overflow: hidden; text-overflow: ellipsis; padding: 4px 9px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: .76rem; box-shadow: 0 4px 14px rgba(0,0,0,.25); pointer-events: none; }
.chip:hover::after, .chip:focus-visible::after { display: block; }
.thread-sum {
  display: inline-flex; align-items: center; gap: 8px; margin: 3px 0 0 -6px; padding: 3px 10px 3px 6px;
  border: 1px solid transparent; border-radius: var(--radius); font-size: .84rem;
}
.thread-sum:hover { text-decoration: none; background: var(--panel); border-color: var(--line); }
.thread-sum .n { font-weight: 600; }
.thread-sum .meta { font-size: .78rem; }
.repliers { display: inline-flex; gap: 3px; }
.avatar.mini { width: 20px; height: 20px; margin: 0; border-radius: 5px; font-size: .62rem; }
/* A picture (argonhub#29) in the letter's place: the same box, filled. */
img.avatar { object-fit: cover; padding: 0; background: var(--soft); }
.avatar.tiny { display: inline-block; width: 18px; height: 18px; margin: 0; border-radius: 5px; vertical-align: -4px; }
.needs .avatar.tiny { margin-right: 6px; }
/* argonhub#48: dismiss, Clear all, and the empty box. */
.needs li { position: relative; }
.needs li a { padding-right: 26px; }
.needs .dismiss { position: absolute; top: 4px; right: 2px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: var(--radius); background: none; color: var(--mute); cursor: pointer; font-size: .8rem; line-height: 22px; opacity: .55; }
.needs li:hover .dismiss, .needs .dismiss:focus-visible { opacity: 1; }
.needs .dismiss:hover { background: var(--panel); color: var(--ink); }
.needs .dismiss.refused { color: var(--need); opacity: 1; }
.needs li.sending { opacity: .5; }
.needs .when { margin-right: 4px; }
.needs h3 .clear-all { margin-left: auto; padding: 1px 6px; border: 1px solid var(--line); border-radius: var(--radius); background: none; color: var(--mute); font: inherit; font-size: .7rem; text-transform: none; letter-spacing: 0; cursor: pointer; }
.needs h3 .clear-all:hover { color: var(--ink); }
.needs.none { border-color: var(--line); background: var(--panel); }
.needs.none h3 { color: var(--mute); }
.needs.none h3 .count { color: var(--mute); }
.needs .nothing { display: flex; align-items: center; gap: 6px; margin: 0; padding: 8px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--mute); font-size: .85em; }
.older { text-align: center; margin: 12px 0 4px; }

/* The thread panel (argonhub#32): on a wide screen it takes the chamber's
 * column, top to bottom, over the chamber, and the messages keep their
 * width; narrower, it is a drawer over the right of the page; on a phone,
 * the whole screen. Its head stays at the top, its reply box at the
 * bottom, and the thread scrolls between them. */
.thread-panel {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  background: var(--panel); border-left: 1px solid var(--line);
}
.thread-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-bottom: 8px; }
.thread-panel > .compose.in-thread { flex: none; margin: 0; padding: 10px 14px 14px; border-top: 1px solid var(--line-soft); background: var(--panel); }
.thread-panel > .panel-head { flex: none; border-radius: 0; }
.app > .chamber { grid-row: 1; grid-column: -2 / -1; }
@media (min-width: 1100px) {
  .app.with-thread, .app.with-chamber.with-thread { grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--thread-w); }
  .app.with-side.with-thread, .app.with-side.with-chamber.with-thread { grid-template-columns: var(--rail-w) var(--side-w) minmax(0, 1fr) var(--thread-w); }
  .app > .thread-panel { position: relative; z-index: 2; grid-row: 1; grid-column: -2 / -1; }
}
@media (max-width: 1099px) {
  .app > .thread-panel {
    position: absolute; z-index: 30; top: 0; right: 0; bottom: 0; width: min(var(--thread-w), 92%);
    box-shadow: -8px 0 24px rgba(0, 0, 0, .18);
  }
}
.thread-head { display: flex; align-items: center; justify-content: space-between; }
.thread-head h2 { margin: 0; font-size: .95rem; }
.thread-head .close { font-size: 1.3rem; line-height: 1; color: var(--mute); padding: 0 4px; }
.thread-head .close:hover { color: var(--ink); text-decoration: none; }
.thread-count { margin: 0 14px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.thread-panel .post { padding: 6px 14px; }

/* ---- Search (argonhub#24) ---- */
.search-page { display: flex; gap: 8px; align-items: center; max-width: 36rem; }
.search-page input { padding-left: 10px; }
.hits { list-style: none; margin: 0 0 18px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.hits li + li { border-top: 1px solid var(--line-soft); }
.hit { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; color: inherit; overflow-wrap: anywhere; }
.hit:hover { background: var(--hover); text-decoration: none; }
.hit-where { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--mute); }
.hit-where .rail-mark.small { margin-right: 0; }
.hit-where .channel { color: var(--acc); font-weight: 600; }
.hit .byline .meta { font-size: .78rem; }
.hit-text { color: var(--ink); }
mark { background: color-mix(in srgb, var(--warn) 28%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }

/* ---- Agents, briefs, the log and live ---- */
.agents, .lines, .channels, .events, .findings { list-style: none; padding: 0; margin: 0; }
.agents li, .lines li { padding: 10px 14px; border-top: 1px solid var(--line-soft); overflow-wrap: anywhere; background: var(--panel); }
.agents li:first-child, .lines li:first-child { border-top: 0; }
.agents, .lines { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.agents .meta { display: block; }
.agents li.with-avatar { position: relative; padding-left: 64px; min-height: 58px; }
.agents li.with-avatar > .avatar { position: absolute; left: 14px; top: 11px; margin: 0; }
.agents .about { display: block; color: var(--ink); font-size: .9rem; }
.presence { font-size: .75rem; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--mute); }
.presence.online, .presence.busy { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.presence.blocked { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.presence.idle, .presence.paused { color: var(--warn); }
.brief { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 18px 12px; margin-bottom: 18px; }
.brief .part { border-top: 1px solid var(--line-soft); padding-top: 4px; }
.brief .part:first-of-type { border-top: 0; }
.verify { padding: 10px 14px; border: 1px solid currentColor; border-radius: var(--radius); background: var(--panel); }
.events { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); font-size: .92em; }
.events li { padding: 6px 12px; border-top: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.events li:first-child { border-top: 0; }
.events .seq { font-family: var(--mono); color: var(--mute); display: inline-block; min-width: 4em; }
.events li.new { animation: arrive 1.2s ease-out; }
@keyframes arrive { from { background: var(--acc-soft); } }
.findings li { color: var(--bad); }

/* ---- Settings and forms ---- */
.sessions .meta { display: block; }
.sessions li.this { box-shadow: inset 3px 0 0 var(--acc); }
.mark { color: var(--acc); font-size: .85em; }
.qr svg { width: 220px; max-width: 100%; height: auto; background: #fff; padding: 8px; border-radius: var(--radius); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.form-actions form { margin: 0; }
button {
  font: inherit; font-weight: 600; padding: 7px 16px; margin: 4px 0; border-radius: var(--radius); cursor: pointer;
  background: var(--acc); color: var(--acc-ink); border: 1px solid color-mix(in srgb, var(--acc) 80%, #000);
}
button:hover { filter: brightness(1.06); }
button.quiet { background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
fieldset { border: 0; margin: 0; padding: 0; }
legend.panel-head { width: 100%; float: left; }
.form-card { overflow: hidden; }
.form-card .form-actions { padding: 12px 14px; border-top: 1px solid var(--line); background: var(--soft); }
.choices { clear: both; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 10px; padding: 14px; }
.choice {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.choice:has(input:checked) { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); background: var(--acc-soft); }
.choice input { margin-top: 3px; accent-color: var(--acc); }
.choice-text { display: flex; flex-direction: column; }
.swatch { display: inline-flex; flex: none; width: 42px; height: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.swatch span { flex: 1; }
.look-github .swatch span:nth-child(1) { background: #ffffff; }
.look-github .swatch span:nth-child(2) { background: #0d1117; }
.look-github .swatch span:nth-child(3) { background: #0969da; }
.look-classic .swatch span:nth-child(1) { background: #070c18; }
.look-classic .swatch span:nth-child(2) { background: #00e0f0; }
.look-classic .swatch span:nth-child(3) { background: #0072ff; }
.flash { padding: 8px 14px; border: 1px solid currentColor; border-radius: var(--radius); background: var(--panel); }

/* ---- Admin (argonhub#20) ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 12px; margin: 0 0 18px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-n { font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; padding: 12px 14px; }
.facts dt { color: var(--mute); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.pad { padding: 12px 14px; margin: 0; }
code.id { font-size: .78em; }
.panel-head .rail-mark.small { margin-right: 8px; }
.panel-head .meta { font-weight: 400; margin-left: 6px; }
@media (max-width: 760px) { .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; } .facts dd { margin-bottom: 8px; } }

/* ---- The footer ---- */
.foot { position: relative; z-index: 1; padding: 10px 16px; color: var(--mute); font-size: .75rem; text-align: center; border-top: 1px solid var(--line); background: var(--soft); }

/* ---- Phones ---- */
@media (max-width: 760px) {
  :root { --rail-w: 52px; }
  .top-row { gap: 8px; padding: 6px 10px; }
  .brand span { display: none; }
  .search { margin: 0; }
  .menu { padding: 0 6px; }
  .menu a { padding: 8px 8px; }
  .app.with-side, .app.with-side.with-chamber { grid-template-columns: var(--rail-w) minmax(0, 1fr); grid-auto-rows: min-content; }
  .app.with-chamber { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .rail { grid-row: span 2; gap: 8px; padding-top: 10px; }
  .rail-mark { width: 34px; height: 34px; }
  .rail-name { display: none; }
  .side { grid-column: 2; border-right: 0; border-bottom: 1px solid var(--line); }
  .app.with-side .pane { grid-column: 2; }
  .side > summary.side-toggle { display: flex; padding: 10px 12px; font-size: .9rem; text-transform: none; letter-spacing: 0; color: var(--ink); }
  .pane { padding: 0 12px; }
  .pane > .foot.in-pane { margin: auto -12px 0; }
  .thread-list { margin: 0 -12px; }
  .post { padding: 6px 12px; }
  .tabs { margin: 0 -12px; padding: 4px 12px 0; }
  .tabs a { padding: 6px 8px; }
  .conv-main > .compose, .conv-main > .compose-off { margin: 0 -12px; padding: 8px 12px 10px; }
  .app > .thread-panel { position: fixed; z-index: 50; inset: 0; width: auto; border-left: 0; box-shadow: none; }
  .cards { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 761px) {
  /* The frame fills the window and each column scrolls on its own, as a
   * chat app's do. */
  body.framed { height: 100vh; overflow: hidden; }
  body.framed .app { min-height: 0; }
  body.framed .rail, body.framed .side, body.framed .pane { overflow-y: auto; min-height: 0; }
  body.framed .rail { scrollbar-width: none; }
  body.framed .chamber { min-height: 0; }
}

/* ---- Motion: none for those who ask ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Writing (argonhub#28): the compose box, reactions on hover, via ---- */
.compose { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0 0 14px; }
.compose textarea {
  flex: 1 1 18rem; min-height: 2.6em; max-height: 40vh; resize: vertical; font: inherit; padding: 8px 10px;
  color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.compose textarea:focus { outline: 2px solid var(--acc); outline-offset: -1px; }
.compose button { margin: 0; }
.compose .compose-note { flex-basis: 100%; margin: 0; }
.compose.in-thread { margin: 10px 14px 14px; }
.compose-off { margin: 0 0 14px; }
.via { color: var(--mute); font-size: .74rem; font-style: italic; }
/* The reaction bar floats over the message's top-right corner, as Slack's
   does, so showing it never moves the text. */
.post { position: relative; }
.react { position: absolute; top: -14px; right: 20px; z-index: 20; display: flex; gap: 2px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.14); opacity: 0; visibility: hidden; transition: opacity .1s ease; }
.post:hover .react:not([hidden]), .post:focus-within .react:not([hidden]) { opacity: 1; visibility: visible; }
.react button, .react .react-reply { margin: 0; width: 30px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; line-height: 1; background: transparent; color: var(--ink); border: 0; border-radius: 6px; cursor: pointer; text-decoration: none; }
.react button:hover, .react .react-reply:hover { background: var(--hover); }
.react button.sending { opacity: .6; }
.react button.refused { border-color: var(--bad); color: var(--bad); }
.post.sending { opacity: .65; }
.post.sending .sending-mark { font-style: italic; }
.post.refused .sending-mark { color: var(--bad); }
.post .body.plain { white-space: pre-wrap; }
.retry { margin: 0 0 0 6px; padding: 0 8px; font-size: .74rem; }
.panel-body { padding: 4px 14px 12px; }
.passkey-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.passkey-form input { font: inherit; padding: 6px 8px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.passkey-status { font-family: var(--mono, monospace); }
.keys-head { margin: 10px 14px 4px; font-size: .82rem; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; }
.keys-none { margin: 0 14px 8px; }
.keys .rows button { margin: 0 0 0 8px; padding: 2px 10px; font-size: .8rem; }

/* ---- Tab completion of @names and #channels (argonhub#34) ---- */
form.compose { position: relative; }
.complete { position: absolute; left: 0; bottom: calc(100% + 4px); z-index: 40; min-width: 14rem; max-width: 100%; max-height: 13.5rem; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 4px; list-style: none; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.18); font-size: .88rem; }
.complete li { padding: 4px 10px; border-radius: 5px; cursor: pointer; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.complete li.here { background: var(--acc-soft); }
.sessions form.inline { display: inline; margin-left: .5rem; }

/* Briefs as a tree (argonhub#50): the tree on the left, one part on the right. */
.briefs { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 28px; align-items: start; }
.brief-tree { position: sticky; top: 12px; max-height: calc(100vh - 120px); overflow: auto; font-size: .9rem; }
.brief-tree > summary { display: none; }
.brief-tree .tree, .brief-tree ul { list-style: none; margin: 0; padding: 0; }
.brief-tree ul ul { padding-left: 14px; border-left: 1px solid var(--line-soft); margin-left: 6px; }
.brief-tree summary { cursor: pointer; padding: 3px 0; color: var(--mute); }
.brief-tree summary a { color: var(--ink); }
.brief-tree li a { display: inline-block; padding: 3px 6px; border-radius: var(--radius); color: var(--ink); }
.brief-tree li a:hover { background: var(--panel); text-decoration: none; }
.brief-tree a.here { background: var(--acc-soft); color: var(--acc); font-weight: 600; }
.brief-tree .count { color: var(--mute); font-size: .75rem; }
.brief-tree .all { margin: 12px 0 0; font-size: .85em; }
.brief-part { min-width: 0; max-width: 78ch; }
.brief-part h1 { margin: 4px 0 2px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; font-size: .85em; color: var(--mute); }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.outline { float: right; width: 220px; margin: 0 0 12px 20px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); font-size: .85em; }
.outline h2 { margin: 0 0 4px; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mute); }
.outline ul { list-style: none; margin: 0; padding: 0; }
.outline .l3 { padding-left: 10px; } .outline .l4, .outline .l5, .outline .l6 { padding-left: 20px; }
.brief-part .empty { color: var(--mute); }
.brief-part .children ul { padding-left: 18px; }
.pager { clear: both; display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.pager a { display: flex; flex-direction: column; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); max-width: 48%; }
.pager a span { font-size: .75rem; color: var(--mute); }
.pager .next { text-align: right; margin-left: auto; }
@media (max-width: 760px) {
  .briefs { grid-template-columns: 1fr; gap: 12px; }
  .brief-tree { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; }
  .brief-tree > summary { display: block; font-weight: 600; color: var(--ink); }
  .outline { float: none; width: auto; margin: 0 0 12px; }
}

/* The Knowledge Base (argonhub#52), laid out as the briefs are. */
.pill.info { color: var(--acc); border-color: color-mix(in srgb, var(--acc) 45%, transparent); }
.pill.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.pill.mute { color: var(--mute); }
.kb-search input { width: 100%; box-sizing: border-box; padding: 6px 8px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); font: inherit; }
.kb-h { margin: 14px 0 4px; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mute); }
.kb-rows { list-style: none; margin: 12px 0; padding: 0; }
.kb-rows li a { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; color: var(--ink); }
.kb-rows li a:hover { background: var(--panel); text-decoration: none; }
.kb-rows .title { display: block; font-weight: 600; margin-bottom: 4px; }
.kb-rows .line, .kb-entry .line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .85em; }
.kb-rows .when { margin-left: auto; color: var(--mute); }
.families { color: var(--ok); }
.kb-evidence { border-left: 3px solid var(--line); padding: 2px 12px; margin: 10px 0; }
.kb-evidence pre, .kb-checks pre, .kb-error { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--sunk); padding: 8px; border-radius: var(--radius); font-size: .85em; }
.kb-checks { list-style: none; padding: 0; } .kb-checks li { padding: 8px 0; border-top: 1px solid var(--line-soft); }
.kb-savings { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.kb-counts { border-collapse: collapse; font-size: .9em; } .kb-counts th, .kb-counts td { padding: 4px 14px 4px 0; text-align: left; }
.kb-counts td { font-variant-numeric: tabular-nums; }
.kb-entry { max-width: 82ch; }
