/* loadout web pages: one stylesheet, every color a token. Light values on
   :root, dark ones for prefers-color-scheme, and data-theme on <html>
   (from the account page) overrides either way. */

:root {
  color-scheme: light dark;
  --ground: #f5f5f7;
  --panel: #ffffff;
  --panel-alt: #fafafc;
  --sidebar: #ececf0;
  --sidebar-line: #dcdce1;
  --sidebar-hover: #e8e8ed;
  --sidebar-current: #dcdce1;
  --line: #e5e5ea;
  --line-soft: #efeff4;
  --field-line: #d2d2d7;
  --input-line: #8a8a8e;
  --hover: #f2f2f5;
  --text: #1d1d1f;
  --text-2: #515154;
  --muted: #6e6e73;
  --muted-2: #5b5b60;
  --faint: #aeaeb2;
  --link: #0066cc;
  --accent: #0066cc;
  --on-accent: #ffffff;
  --focus-ring: rgba(0, 102, 204, 0.25);
  --segment: #e3e3e8;
  --segment-on: #ffffff;
  --code-bg: #f5f5f7;
  /* The same in both themes: see .diagram-canvas. */
  --diagram-canvas: #ffffff;
  --own-bg: #e8f0fb;
  --own-text: #004f9e;
  --pill-bg: #efeff4;
  --pill-text: #515154;
  --warn-bg: #fff4e0;
  --warn-text: #8a4600;
  --ok-bg: #e6f4ea;
  --ok-text: #1d7a3a;
  --ok-strong: #145c2c;
  --bad-bg: #fdecea;
  --bad-text: #b3261e;
  --bad-strong: #8c1d18;
  --cand-bg: #f1f6fd;
  --cand-line: #e1ebf8;
  --cand-text: #004f9e;
  --av0-bg: #dbe8fb; --av0: #004f9e;
  --av1-bg: #e7e2f7; --av1: #4a3a8c;
  --av2-bg: #e1f1e6; --av2: #145c2c;
  --av3-bg: #f1f1f4; --av3: #515154;
  --av4-bg: #fff4e0; --av4: #8a4600;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  --pop-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #111113;
    --panel: #1c1c1e;
    --panel-alt: #202023;
    --sidebar: #19191b;
    --sidebar-line: #2e2e32;
    --sidebar-hover: #2a2a2e;
    --sidebar-current: #2e2e32;
    --line: #2f2f33;
    --line-soft: #2a2a2d;
    --field-line: #46464b;
    --input-line: #707075;
    --hover: #2a2a2e;
    --text: #f5f5f7;
    --text-2: #c7c7cc;
    --muted: #a1a1a6;
    --muted-2: #a1a1a6;
    --faint: #636366;
    --link: #4aa3ff;
    --accent: #0071e3;
    --focus-ring: rgba(74, 163, 255, 0.35);
    --segment: #2a2a2d;
    --segment-on: #4a4a4f;
    --code-bg: #111113;
    --own-bg: #1a2e47;
    --own-text: #8cc4ff;
    --pill-bg: #2a2a2d;
    --pill-text: #c7c7cc;
    --warn-bg: #3a2a12;
    --warn-text: #ffb35c;
    --ok-bg: #15301f;
    --ok-text: #4cd07d;
    --ok-strong: #7fe0a0;
    --bad-bg: #3b1a19;
    --bad-text: #ff6b61;
    --bad-strong: #ff9a92;
    --cand-bg: #132338;
    --cand-line: #1f3550;
    --cand-text: #8cc4ff;
    --av0-bg: #1a2e47; --av0: #8cc4ff;
    --av1-bg: #2b2544; --av1: #c3b5ff;
    --av2-bg: #15301f; --av2: #7fe0a0;
    --av3-bg: #2a2a2d; --av3: #c7c7cc;
    --av4-bg: #3a2a12; --av4: #ffb35c;
    --pop-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="light"] { color-scheme: light; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #111113;
  --panel: #1c1c1e;
  --panel-alt: #202023;
  --sidebar: #19191b;
  --sidebar-line: #2e2e32;
  --sidebar-hover: #2a2a2e;
  --sidebar-current: #2e2e32;
  --line: #2f2f33;
  --line-soft: #2a2a2d;
  --field-line: #46464b;
  --input-line: #707075;
  --hover: #2a2a2e;
  --text: #f5f5f7;
  --text-2: #c7c7cc;
  --muted: #a1a1a6;
  --muted-2: #a1a1a6;
  --faint: #636366;
  --link: #4aa3ff;
  --accent: #0071e3;
  --focus-ring: rgba(74, 163, 255, 0.35);
  --segment: #2a2a2d;
  --segment-on: #4a4a4f;
  --code-bg: #111113;
  --own-bg: #1a2e47;
  --own-text: #8cc4ff;
  --pill-bg: #2a2a2d;
  --pill-text: #c7c7cc;
  --warn-bg: #3a2a12;
  --warn-text: #ffb35c;
  --ok-bg: #15301f;
  --ok-text: #4cd07d;
  --ok-strong: #7fe0a0;
  --bad-bg: #3b1a19;
  --bad-text: #ff6b61;
  --bad-strong: #ff9a92;
  --cand-bg: #132338;
  --cand-line: #1f3550;
  --cand-text: #8cc4ff;
  --av0-bg: #1a2e47; --av0: #8cc4ff;
  --av1-bg: #2b2544; --av1: #c3b5ff;
  --av2-bg: #15301f; --av2: #7fe0a0;
  --av3-bg: #2a2a2d; --av3: #c7c7cc;
  --av4-bg: #3a2a12; --av4: #ffb35c;
  --pop-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Base */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 0.875rem/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 0.8125rem; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
[hidden] { display: none !important; }
.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 12px; top: -48px; z-index: 10; padding: 8px 12px; border-radius: 8px; background: var(--panel); }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.secondary { color: var(--text-2); }
.num { font-variant-numeric: tabular-nums; }

/* Controls */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 0 14px;
  font: inherit; font-size: 0.8125rem; line-height: 1.2; color: var(--text);
  background: var(--panel); border: 1px solid var(--field-line); border-radius: 8px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:active:not([disabled]), .icon-btn:active { filter: brightness(0.9); }
.btn-lg { min-height: 36px; padding: 0 16px; font-size: 0.875rem; font-weight: 500; border-radius: 9px; }
.btn-primary { color: var(--on-accent); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-danger { color: var(--bad-text); }
.btn-plain { border-color: transparent; background: transparent; }
.btn-plain:hover { background: var(--hover); }
.btn[disabled], .btn[aria-disabled="true"] { color: var(--muted); background: var(--segment); border-color: var(--segment); cursor: not-allowed; filter: none; }
.icon-btn { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--text); }

.field, .sel, textarea.field {
  min-height: 34px; padding: 0 12px;
  font: inherit; font-size: 0.875rem; color: var(--text);
  background: var(--panel); border: 1px solid var(--input-line); border-radius: 8px;
}
.sel { min-height: 30px; padding: 0 8px; font-size: 0.8125rem; border-radius: 7px; }
textarea.field { height: auto; min-height: 76px; padding: 8px 12px; resize: vertical; width: 100%; line-height: 1.4; }
.field:focus, .sel:focus, textarea.field:focus { outline: 2px solid transparent; border-color: var(--link); box-shadow: 0 0 0 3px var(--focus-ring); }
.field[aria-invalid="true"], .sel[aria-invalid="true"] { border-color: var(--bad-text); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
label.check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }

/* Script-only controls: hidden until ui.js runs; .js-hide goes away then. */
.js-only { display: none !important; }
.js .js-only { display: inline-flex !important; }
.js .js-hide { display: none !important; }

/* App shell */

.app { display: flex; min-height: 100vh; }
.side {
  width: 240px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 20px 12px; display: flex; flex-direction: column; gap: 2px;
  background: var(--sidebar); border-right: 1px solid var(--sidebar-line);
}
.brand { display: flex; flex-direction: column; gap: 1px; padding: 0 10px 18px; color: var(--text); }
.brand-name { display: flex; align-items: center; gap: 8px; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.2px; }
/* The motto lines up with the name, past the 22px logo and its gap. */
.brand-motto { padding-left: 30px; color: var(--muted); font-size: 0.6875rem; font-weight: 400; }
.brand:hover { text-decoration: none; }
.side-label { padding: 8px 10px 4px; font-size: 0.6875rem; font-weight: 600; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.4px; }
.side-label + .side-label, .side a + .side-label { padding-top: 14px; }
.side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.side-item {
  display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 10px;
  border-radius: 8px; color: var(--text); font-size: 0.875rem;
}
.side-item svg { color: var(--muted-2); }
.side-item:hover { background: var(--sidebar-hover); text-decoration: none; }
.side-item[aria-current="page"] { background: var(--sidebar-current); font-weight: 600; }
.side-item[aria-current="page"] svg { color: var(--link); }
.side-row { position: relative; }
.side-row .side-item { padding-right: 34px; }
.side-toggle {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; align-items: center; justify-content: center;
  border: 0; border-radius: 6px; background: transparent; color: var(--muted-2); cursor: pointer;
}
.side-toggle:hover { background: var(--sidebar-hover); color: var(--text); }
.side-toggle:focus-visible { outline-offset: 0; }
.side-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.side-sub { padding: 2px 0 4px 16px; }
/* A folded project hides its teams only when the arrow can open them again:
   without script every team stays in the list. */
.js .side-sub[data-folded] { display: none; }
.level { margin-left: auto; font-size: 0.75rem; font-weight: 400; color: var(--muted-2); }
.side-fill { flex-grow: 1; }
.side-user { overflow: hidden; }
/* Docs and What's new: the two help links, quieter than the places above. */
.side-docs, .side-news { color: var(--muted-2); }
.side-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { flex-grow: 1; min-width: 0; padding: 28px 36px 48px; display: flex; flex-direction: column; gap: 20px; max-width: 1240px; }
/* List pages grow with a large display: the fixed columns keep their width
   and the first one (names, descriptions) takes the rest. The cap keeps rows
   scannable on a 5K or 6K screen. Reading pages keep 1240 px. */
.main-wide { max-width: 1800px; }
/* The proposal pages have no sidebar: they center, and the cap keeps each
   answer column near a readable width. */
.bare .main { width: 100%; max-width: 1800px; margin: 0 auto; padding-top: 24px; gap: 18px; }

.head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.head-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.crumbs { font-size: 0.8125rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--link); }
.title { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.4px; line-height: 1.15; overflow-wrap: anywhere; }
.via { font-size: 0.8125rem; color: var(--muted); }
.tabs { display: flex; gap: 2px; margin-left: 24px; padding: 2px; background: var(--segment); border-radius: 9px; }
.tabs a {
  display: flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 14px;
  border-radius: 7px; font-size: 0.8125rem; color: var(--text);
}
.tabs a:hover { text-decoration: none; background: var(--sidebar-hover); }
.tabs a[aria-current="page"] { background: var(--segment-on); font-weight: 600; box-shadow: var(--shadow); }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar .grow { flex-grow: 1; }
.filters { display: flex; gap: 2px; padding: 2px; background: var(--segment); border-radius: 9px; overflow-x: auto; }
.filters a { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 7px; color: var(--text); font-size: 0.8125rem; white-space: nowrap; }
.filters a:hover { text-decoration: none; background: var(--sidebar-hover); }
.filters a[aria-current="true"] { background: var(--segment-on); font-weight: 600; box-shadow: var(--shadow); }
.filters .muted { color: var(--text-2); font-weight: 400; }
.sortform { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--muted); }
.count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; min-height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 0.6875rem; font-weight: 600;
}
.head-fill { flex-grow: 1; }
.search {
  display: flex; align-items: center; gap: 8px; width: 240px; min-height: 34px; padding: 0 12px;
  background: var(--panel); border: 1px solid var(--input-line); border-radius: 9px; color: var(--muted);
}
.search:focus-within { border-color: var(--link); box-shadow: 0 0 0 3px var(--focus-ring); }
.search input { flex-grow: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 0.875rem; color: var(--text); }
.search input::-webkit-search-cancel-button { cursor: pointer; }

/* Panels, lists, pills */

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.panel-pad { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; }
.panel-head h2 { font-size: 0.9375rem; font-weight: 600; }
.panel-head + .markdown { padding: 0 20px 16px; }
.panel-head p { font-size: 0.8125rem; color: var(--muted); }
.panel-head .grow { flex-grow: 1; }

table.list { width: 100%; border-collapse: collapse; table-layout: fixed; }
.list th {
  height: 40px; padding: 0 20px; text-align: left;
  font-size: 0.75rem; font-weight: 600; color: var(--muted);
}
.list td { height: 60px; padding: 8px 20px; border-top: 1px solid var(--line); font-size: 0.875rem; vertical-align: middle; }
.list td.stack > * { display: block; }
.list .name { font-weight: 600; overflow-wrap: anywhere; }
.list .desc { font-size: 0.8125rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .end { text-align: right; }
.list tr.row-link:hover td { background: var(--panel-alt); }
.pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 11px; font-size: 0.75rem; font-weight: 500; white-space: nowrap; background: var(--pill-bg); color: var(--pill-text); }
.pill-own { background: var(--own-bg); color: var(--own-text); }
.pill-warn { background: var(--warn-bg); color: var(--warn-text); font-weight: 600; }
.pill-ok { background: var(--ok-bg); color: var(--ok-strong); font-weight: 600; }
.pill-bad { background: var(--bad-bg); color: var(--bad-strong); font-weight: 600; }
.pill-kind { background: transparent; box-shadow: inset 0 0 0 1px var(--field-line); color: var(--text-2); vertical-align: 2px; }
.list.files td { height: 48px; }
/* Lists whose first column takes the room: the other columns shrink to their
   content, so every gap between them is the same cell padding. Long values
   in them truncate instead of widening the table. */
table.list.fit { table-layout: auto; }
.list.fit :is(th, td) { width: 1%; white-space: nowrap; }
.list.fit :is(th, td):first-child { width: 100%; max-width: 0; white-space: normal; }
.list.fit td.clip > * { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.pill-clip { display: inline-block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; line-height: 22px; vertical-align: middle; }
.list.files code { font-family: var(--mono); font-size: 0.8125rem; }

.empty { padding: 36px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty :is(h2, h3) { font-size: 1rem; font-weight: 600; }
.empty p { color: var(--muted); max-width: 460px; }

.notice, .alert { padding: 10px 14px; border-radius: 10px; font-size: 0.875rem; }
.notice { background: var(--ok-bg); color: var(--ok-strong); }
.alert { background: var(--bad-bg); color: var(--bad-strong); }

.cmdcard { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.list + .cmdcard, .facts + .cmdcard { border-top: 1px solid var(--line); }
.cmdcard .text { display: flex; flex-direction: column; gap: 2px; flex-grow: 1; min-width: 0; }
.cmdcard strong { font-size: 0.875rem; font-weight: 600; }
.cmdcard .text span { font-size: 0.8125rem; color: var(--muted); }
.cmd {
  display: block; padding: 8px 12px; border-radius: 8px; background: var(--code-bg);
  font-family: var(--mono); font-size: 0.8125rem; line-height: 1.45; user-select: all; overflow-wrap: anywhere;
}
.cmdcard .cmd { max-width: 440px; }
.copyrow { display: flex; align-items: center; gap: 8px; }
.copyrow .cmd { flex-grow: 1; min-width: 0; }

/* Popover forms (details/summary: work without script) */

.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 320px;
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--pop-shadow);
}
.pop label { font-size: 0.8125rem; font-weight: 600; }
.pop p { font-size: 0.75rem; color: var(--muted); }
.pop p.warn { color: var(--warn-text); }
.pop .row { display: flex; gap: 8px; justify-content: flex-end; }

/* Proposal */

.back { display: flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--muted); }
.back a { display: inline-flex; align-items: center; gap: 4px; }
.prop-head { display: flex; align-items: flex-start; gap: 24px; }
.prop-head .grow { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.prop-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prop-title h1 { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.4px; overflow-wrap: anywhere; }
.arrow { font-size: 1.25rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.byline { font-size: 0.875rem; color: var(--text-2); }
.byline strong { color: var(--text); font-weight: 600; }
.byline .note { white-space: pre-line; }
/* A proposal a newer release came out after: what approving it drops,
   above the actions it explains. */
.behind-note { max-width: 760px; margin-top: 6px; padding: 12px 16px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-text); font-size: 0.875rem; line-height: 1.45; overflow-wrap: anywhere; }
.behind-note h2 { font-size: 0.9375rem; font-weight: 600; }
.behind-note p { margin-top: 6px; }
.behind-note strong { font-weight: 600; }
.behind-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.behind-links a, .pop-link a { display: inline-flex; align-items: center; font-weight: 600; }
.behind-cmd { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.behind-cmd .copyrow { margin-top: 6px; }
.behind-cmd .cmd { background: var(--panel); color: var(--text); }
/* A proposal its author replaced: where the review goes on. */
.replaced-note { max-width: 760px; margin-top: 6px; padding: 10px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 0.875rem; color: var(--text-2); overflow-wrap: anywhere; }
.list .behind-pill { display: flex; width: fit-content; margin-top: 4px; }
.diff-head { flex-direction: column; align-items: flex-start; gap: 4px; }
.actions { display: flex; gap: 10px; flex-shrink: 0; align-items: flex-start; }
.act-col { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; max-width: 360px; }
.act-why { font-size: 0.8125rem; line-height: 1.45; color: var(--text-2); text-align: right; }
.prop-body { display: flex; gap: 20px; align-items: flex-start; }
.prop-main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.compare { min-width: 0; display: flex; flex-direction: column; }
.compare-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.compare-bar label { font-size: 0.8125rem; font-weight: 600; }
.compare-bar .sel { max-width: min(380px, 100%); min-width: 0; }
.compare-bar .grow { flex-grow: 1; }
.compare-bar .meta { font-size: 0.8125rem; color: var(--muted); }
/* What a report says about its runs: notes from the tool (warn), and the
   team packages that sat beside both sides, folded. */
.report-notes { padding: 10px 18px; background: var(--warn-bg); color: var(--warn-text); font-size: 0.8125rem; line-height: 1.45; border-bottom: 1px solid var(--line-soft); }
.report-notes p + p { margin-top: 4px; }
.report-context { padding: 8px 18px; border-bottom: 1px solid var(--line-soft); font-size: 0.8125rem; color: var(--muted); }
details.report-context > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; list-style: none; cursor: pointer; color: var(--text-2); }
details.report-context > summary::-webkit-details-marker { display: none; }
details.report-context > summary svg { color: var(--muted); }
details.report-context[open] > summary svg { transform: rotate(90deg); }
.report-context ul { list-style: none; margin: 4px 0 6px; padding: 0 0 0 20px; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--text-2); }
.report-context li { display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.prompt-text { padding: 12px 18px; border-bottom: 1px solid var(--line-soft); font-size: 0.8125rem; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 420px; }
.sides.one { grid-template-columns: minmax(0, 1fr); }
.side-col { display: flex; flex-direction: column; min-width: 0; }
.side-col + .side-col { border-left: 1px solid var(--line); }
.col-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: var(--panel-alt); border-bottom: 1px solid var(--line-soft); }
.col-head h2 { font-size: 0.8125rem; font-weight: 600; }
.col-head .grow { flex-grow: 1; }
.col-head .stats { font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.col-head.cand { background: var(--cand-bg); border-bottom-color: var(--cand-line); }
.col-head.cand h2 { color: var(--cand-text); }
.answer { padding: 16px 18px; font-size: 0.875rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer.failed { color: var(--bad-strong); }
.answer.md { white-space: normal; }
/* A cut answer ends with how much it leaves out; one bar under both
   columns switches both between their start and the whole answer. */
.answer-more { margin-top: -4px; padding: 0 18px 16px; font-size: 0.8125rem; color: var(--muted); }
.sides:focus { outline: none; }
.answer-bar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 14px; padding: 12px 18px; border-top: 1px solid var(--line-soft); background: var(--panel-alt); }
.answer-bar p { font-size: 0.8125rem; color: var(--muted); }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md pre, .md table, .md blockquote { margin: 0 0 12px; }
.md h1, .md h2, .md h3, .md h4 { margin: 18px 0 8px; font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
.md h1 { font-size: 1.0625rem; }
.md ul, .md ol { padding-left: 22px; }
.md li + li { margin-top: 4px; }
.md li > ul, .md li > ol { margin: 4px 0 0; }
.md code { font-family: var(--mono); font-size: 0.8125rem; padding: 1px 5px; border-radius: 4px; background: var(--code-bg); }
.md pre { padding: 10px 12px; border-radius: 8px; background: var(--code-bg); overflow-x: auto; }
.md pre code { padding: 0; background: none; font-size: 0.7812rem; white-space: pre; }
.md blockquote { padding: 2px 0 2px 12px; border-left: 3px solid var(--line); color: var(--text-2); }
.md table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 0.8125rem; overflow-wrap: normal; }
.md th, .md td { padding: 6px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.md th { background: var(--panel-alt); font-weight: 600; }
.md hr { margin: 16px 0; border: 0; border-top: 1px solid var(--line); }
.md a { color: var(--link); }
/* Prose keeps a readable measure (about 80 characters) however wide its
   column; code blocks and tables may use the whole column. */
.md > :is(p, ul, ol, blockquote, h1, h2, h3, h4) { max-width: 72ch; }
.markdown { margin: 0; padding: 16px 18px; font-family: var(--mono); font-size: 0.7812rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.aside { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.aside h2 { font-size: 0.875rem; font-weight: 600; }
.aside .panel-head { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.aside p { font-size: 0.8125rem; line-height: 1.45; color: var(--text-2); }
.diff { padding: 10px 0; font-family: var(--mono); font-size: 0.7812rem; line-height: 1.6; overflow-x: auto; }
.diff div, .diff .file { padding: 0 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff .file { margin: 0; padding-top: 4px; padding-bottom: 2px; font-size: inherit; font-weight: 600; color: var(--text); }
.diff .file .change { font-weight: 400; color: var(--muted); }
.diff > * + .file { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.diff.wide > * { padding-left: 20px; padding-right: 20px; }
.diff .add { background: var(--ok-bg); color: var(--ok-strong); }
.diff .del { background: var(--bad-bg); color: var(--bad-strong); }
.diff .hunk { color: var(--muted); }
.events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.events li { display: flex; gap: 10px; font-size: 0.8125rem; line-height: 1.4; overflow-wrap: anywhere; }
.dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 4px; flex-shrink: 0; background: var(--faint); }
.dot-accent { background: var(--link); }
.dot-ok { background: var(--ok-text); }
.dot-bad { background: var(--bad-text); }
.dot-warn { background: var(--warn-text); }
.events .quote { color: var(--text-2); }

/* Prompts of a proposal: untrusted text, shown with its line breaks. Edit
   opens in place below its row; Remove asks first in a popover. */
.prompts-panel:focus { outline: none; }
.prompts-panel .panel-head { border-bottom: 1px solid var(--line-soft); }
.panel-head .meta { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.prompt-notice { margin: 12px 20px 0; }
.prompts-intro { padding: 12px 20px 0; font-size: 0.8125rem; line-height: 1.45; color: var(--muted); }
.prompt-list { margin: 0; padding: 4px 20px 6px 42px; }
.prompt-list > li { padding: 12px 0; }
.prompt-list > li + li { border-top: 1px solid var(--line-soft); }
.prompt-list > li::marker { color: var(--muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.prompt-body { font-size: 0.875rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; font-size: 0.8125rem; color: var(--muted); }
.prompt-meta strong { color: var(--text-2); font-weight: 600; }
.prompt-meta .grow { flex-grow: 1; }
.prompt-edit > summary { list-style: none; }
.prompt-edit > summary::-webkit-details-marker { display: none; }
.prompt-edit[open] { flex-basis: 100%; order: 1; }
.prompt-edit[open] ~ * { display: none; }
.prompt-edit form, .prompt-add { display: flex; flex-direction: column; gap: 8px; }
.prompt-edit form { margin-top: 8px; }
.prompt-edit .row, .prompt-add .row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.prompt-add { padding: 14px 20px 16px; border-top: 1px solid var(--line); }
.prompt-add label { font-size: 0.875rem; font-weight: 600; }
.prompt-add .row p { flex-grow: 1; font-size: 0.75rem; color: var(--muted); }
.prompt-hint { margin-top: 6px; font-size: 0.75rem; line-height: 1.45; color: var(--muted); }
.prompt-hint.pad-x { padding-top: 12px; border-top: 1px solid var(--line); }

/* Members, the first panel of Settings: the heading, then the add form,
   the list or a line saying why there is none. */

.members > * + * { border-top: 1px solid var(--line-soft); }
.members .addform { padding: 14px 20px; }
.members .hint { padding: 0 20px 14px; }
.addform { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.addform label { font-size: 0.875rem; font-weight: 600; margin-right: 4px; }
.addform .field { flex-grow: 1; min-width: 0; max-width: 560px; }
.addform .sel { min-height: 34px; }
.hint { padding: 0 16px 14px; margin-top: -6px; font-size: 0.75rem; color: var(--muted); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.who .email { font-size: 0.8125rem; color: var(--muted); overflow-wrap: anywhere; }
.who .pending { font-size: 0.8125rem; color: var(--warn-text); }
.av { width: 30px; height: 30px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; flex-shrink: 0; }
.av0 { background: var(--av0-bg); color: var(--av0); }
.av1 { background: var(--av1-bg); color: var(--av1); }
.av2 { background: var(--av2-bg); color: var(--av2); }
.av3 { background: var(--av3-bg); color: var(--av3); }
.av4 { background: var(--av4-bg); color: var(--av4); }
.inline { display: flex; align-items: center; gap: 6px; }
.secret { display: flex; flex-direction: column; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--ok-bg); }
.secret p { font-size: 0.8125rem; color: var(--ok-strong); }
/* Invite someone, on a project: email and project role, then the teams,
   each a checkbox with its own role picker. */
.invite-fold > summary { display: flex; align-items: center; gap: 12px; padding: 16px 20px; list-style: none; cursor: pointer; }
.invite-fold > summary::-webkit-details-marker { display: none; }
.invite-fold > summary .grow { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.invite-fold > summary svg { flex-shrink: 0; color: var(--muted); }
.invite-fold[open] > summary svg { transform: rotate(90deg); }
.invite-fold[open] > summary { border-bottom: 1px solid var(--line-soft); }
.invite-title { font-size: 0.9375rem; font-weight: 600; }
.invite { display: flex; flex-direction: column; gap: 16px; padding: 16px 20px 18px; }
.invite h2 { font-size: 0.9375rem; font-weight: 600; }
.invite-intro { margin-top: 2px; font-size: 0.8125rem; color: var(--muted); }
.invite-who { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; max-width: 560px; }
.invite-who .grow { flex: 1 1 260px; min-width: 0; }
.invite .sel { min-height: 34px; }
.invite .hint { padding: 0; margin: 0; }
.invite-teams { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-width: 560px; }
.invite-teams legend { padding: 0; margin-bottom: 2px; font-size: 0.875rem; font-weight: 600; }
.invite-teams ul { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.invite-teams li { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 6px 4px 12px; }
.invite-teams li + li { border-top: 1px solid var(--line-soft); }
.invite-teams label.check { flex-grow: 1; align-self: stretch; }
.invite-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.invite-foot p { flex-grow: 1; font-size: 0.75rem; color: var(--muted); }
.panel > .invite-foot { padding: 14px 20px 16px; border-top: 1px solid var(--line); }
.invite-link { display: flex; flex-direction: column; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.invite-link p { font-size: 0.8125rem; color: var(--text-2); }
.setting { display: flex; align-items: center; gap: 12px; padding: 14px 20px; }
.setting .grow { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }
.setting h2, .setting h3 { font-size: 0.9375rem; font-weight: 600; }
.setting + .setting, .panel-head + .setting { border-top: 1px solid var(--line-soft); }
.setting p { font-size: 0.8125rem; color: var(--muted); }
/* The course picker: a long select, so the row wraps before it squeezes
   the text. */
.course-setting { flex-wrap: wrap; }
.course-setting .grow { flex: 1 1 320px; }
.course-setting .sel { max-width: 100%; min-width: 0; }

/* Model tiers: one panel per AI tool; the form spans them, so it leaves
   the layout to the page. */

.tiers-form { display: contents; }
.tiers tbody th { height: 60px; padding: 8px 20px; border-top: 1px solid var(--line); vertical-align: middle; font-size: 0.875rem; font-weight: 400; color: var(--text); }
.tiers tbody th > * { display: block; }
.tiers .desc { white-space: normal; }
/* The column heads name the fields on wide screens; stacked on a phone,
   each field shows its own label. */
.tier-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tiers .field, .tiers .sel { width: 100%; min-height: 34px; }
.tier-notes { margin: 0; padding: 12px 20px 14px 38px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 6px; font-size: 0.8125rem; line-height: 1.45; color: var(--text-2); }
.setting > p.grow { font-size: 0.8125rem; color: var(--muted); }

/* New project or team */

.form { display: flex; flex-direction: column; gap: 18px; padding: 20px; max-width: 560px; }
.form .hint { padding: 0; margin: 0; }
.fieldrow { display: flex; flex-direction: column; gap: 6px; }
.fieldrow label, .choice legend { font-size: 0.875rem; font-weight: 600; }
.fieldrow .field, .fieldrow .sel { width: 100%; }
.choice { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.choice legend { padding: 0; margin-bottom: 8px; }
.choice label.check { align-items: flex-start; }
.choice label.check > span { display: flex; flex-direction: column; gap: 2px; }
.form .buttons > * { flex: 0 0 auto; }
.form:has(input[name="kind"][value="project"]:checked) .parent-row { display: none; }
.head .btn svg { margin-right: 4px; vertical-align: -3px; }

/* Account */

.page-head h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.4px; }
dl.facts { margin: 0; padding: 14px 20px; display: grid; grid-template-columns: 140px minmax(0, 1fr); row-gap: 10px; font-size: 0.875rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
dl.facts ul.plain { margin: 6px 0 0; padding: 0; list-style: none; }
.themes { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 14px 20px; border: 0; margin: 0; }
.themes legend { float: left; margin-right: 8px; font-size: 0.875rem; font-weight: 600; }

/* Server page (admins): numbers use tabular figures so they line up. */

.lead-sm { margin-top: 4px; font-size: 0.875rem; color: var(--text-2); }
.tiles { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.tile dt { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.tile dd { margin: 0; overflow-wrap: anywhere; }
.tile .value { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.3px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.tile .note { font-size: 0.8125rem; color: var(--text-2); }
.tile-warn .value { color: var(--warn-text); }
.tile-bad .value { color: var(--bad-text); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid2 > .stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.grid2 .panel { min-width: 0; }
dl.facts.stats { padding-top: 0; grid-template-columns: 130px minmax(0, 1fr); font-variant-numeric: tabular-nums; }
dl.facts.stats dd { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
dl.facts.stats .note { font-size: 0.8125rem; color: var(--muted); }
.panel-note { padding: 0 20px 16px; font-size: 0.875rem; line-height: 1.45; color: var(--text-2); }
.panel-note strong { color: var(--text); font-weight: 600; }
.panel-note code, .panel-foot code { overflow-wrap: anywhere; }
.panel-foot { padding: 12px 20px 14px; border-top: 1px solid var(--line-soft); font-size: 0.75rem; line-height: 1.45; color: var(--muted); }
table.cost { width: 100%; border-collapse: collapse; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.cost th, .cost td { padding: 9px 20px; border-top: 1px solid var(--line-soft); text-align: left; font-weight: 400; vertical-align: top; }
.cost thead th { padding-top: 0; border-top: 0; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.cost .amount { text-align: right; white-space: nowrap; }
.cost .desc { display: block; font-size: 0.8125rem; color: var(--muted); overflow-wrap: anywhere; }
.cost tfoot th, .cost tfoot td { border-top: 1px solid var(--line); font-weight: 600; }
.diskbar { padding: 0 20px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.meter { display: block; width: 100%; height: 8px; border: 0; border-radius: 4px; background: var(--segment); -webkit-appearance: none; appearance: none; }
.meter::-webkit-meter-bar { height: 8px; border: 0; border-radius: 4px; background: var(--segment); }
.meter::-webkit-meter-optimum-value { border-radius: 4px; background: var(--link); }
.meter::-webkit-meter-suboptimum-value { border-radius: 4px; background: var(--warn-text); }
.meter::-webkit-meter-even-less-good-value { border-radius: 4px; background: var(--bad-text); }
.meter::-moz-meter-bar { border-radius: 4px; background: var(--link); }
.meter:-moz-meter-sub-optimum::-moz-meter-bar { background: var(--warn-text); }
.meter:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: var(--bad-text); }
.setting .btn svg { margin-left: 2px; }
@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}

/* Start here (/skills) and loadout's own skills: the sidebar entry sits
   above the projects, and the pages read for anyone, signed in or not. */

.side-builtin + .side-label { padding-top: 14px; }
.page-head .lead { margin-top: 6px; max-width: 72ch; }
.rule-note { padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 0.875rem; line-height: 1.45; color: var(--text-2); }
.rule-note strong { color: var(--text); font-weight: 600; }
.start-sec { display: flex; flex-direction: column; gap: 10px; }
.start-sec > h2 { font-size: 1.0625rem; font-weight: 600; }
.start-sec > .lead-sm { margin-top: -4px; }
.words { margin: 0; }
.word { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 12px 20px; }
.word + .word { border-top: 1px solid var(--line-soft); }
.word dt { font-size: 0.9375rem; font-weight: 600; }
.word dd { margin: 0; display: flex; flex-direction: column; gap: 2px; max-width: 72ch; font-size: 0.875rem; line-height: 1.45; color: var(--text-2); }
.word .word-like { font-size: 0.8125rem; color: var(--muted); }
.start-signin { border-bottom: 1px solid var(--line-soft); }
.start-signin > p.grow { font-size: 0.875rem; color: var(--text-2); }
.start-signin strong { color: var(--text); font-weight: 600; }
/* Numbered steps: the number is the list's own counter, so it is read
   once, as the list item's number. */
.start-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.start-step { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: 4px; padding: 14px 20px 14px 58px; }
.start-step + .start-step { border-top: 1px solid var(--line-soft); }
.start-step::before { content: counter(step); position: absolute; left: 20px; top: 13px; width: 24px; height: 24px; border-radius: 12px; background: var(--pill-bg); color: var(--text); font-size: 0.8125rem; font-weight: 600; line-height: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.start-step h3 { font-size: 0.9375rem; font-weight: 600; line-height: 24px; }
.start-step p { font-size: 0.875rem; line-height: 1.45; color: var(--text-2); }
.start-step .copyrow { margin-top: 6px; max-width: 620px; }
/* Things to type to an AI tool, shaped like the messages they become. */
.asks { display: flex; flex-direction: column; gap: 6px; }
.skill-card .asks-h, .asks-h { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.asks ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.asks li { padding: 5px 11px; border-radius: 12px 12px 12px 4px; background: var(--pill-bg); color: var(--text); font-size: 0.8125rem; line-height: 1.4; overflow-wrap: anywhere; }
.skill-card .skill-name, .skill-name { font-size: 0.75rem; color: var(--muted); }
.skill-card .skill-name { margin-top: auto; padding-top: 4px; }
.skill-name code { font-family: var(--mono); }
.page-head .skill-name { margin-top: 2px; }
.page-head .asks { margin-top: 10px; }
/* On the page background a bubble needs its own edge. */
.page-head .asks li { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.flow { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.flow-step { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.flow-step h3 { font-size: 0.9375rem; font-weight: 600; }
.flow-step p { font-size: 0.8125rem; line-height: 1.45; color: var(--text-2); }
/* A chevron in the gap before each step after the first. */
.flow-step + .flow-step::before { content: ""; position: absolute; left: -19px; top: 50%; width: 8px; height: 8px; border-top: 2px solid var(--muted-2); border-right: 2px solid var(--muted-2); transform: translateY(-50%) rotate(45deg); }
.flow-layers { display: flex; flex-direction: column; gap: 4px; }
.flow-layer { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 5px 10px; border-radius: 8px; background: var(--pill-bg); font-size: 0.8125rem; font-weight: 600; overflow-wrap: anywhere; }
.flow-layer span { font-size: 0.75rem; font-weight: 400; color: var(--muted); text-align: right; }
.flow-layer.flow-team { margin-left: 16px; background: var(--own-bg); }
.flow-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.flow-note { font-size: 0.8125rem; color: var(--muted); }
.home-sec { display: flex; flex-direction: column; gap: 10px; }
.home-sec-head { display: flex; align-items: baseline; gap: 12px; }
.home-sec-head h2 { font-size: 1.0625rem; font-weight: 600; }
.home-sec-head a { margin-left: auto; font-size: 0.875rem; }
.skill-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.skill-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.skill-card:hover { border-color: var(--field-line); }
.skill-card :is(h2, h3) { font-size: 1rem; font-weight: 600; }
.skill-card :is(h2, h3) a { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.skill-card :is(h2, h3) a svg { color: var(--link); }
/* The whole card opens the skill; the name stays the one link. */
.skill-card :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.skill-card p { font-size: 0.875rem; line-height: 1.45; color: var(--text-2); }
.skill-card .skill-when, .page-head .skill-when { font-size: 0.8125rem; line-height: 1.45; color: var(--muted); }
.page-head .skill-when { margin-top: 4px; }
.page-head h1 .pill { vertical-align: 6px; }
.skill-md { padding: 0 20px 18px; font-size: 0.875rem; line-height: 1.55; overflow-wrap: anywhere; }
.panel[tabindex="-1"]:focus { outline: none; }
/* A short command stays on one line instead of breaking inside a flag. */
.cmdcard .cmd.cmd-short { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 760px) {
  .skill-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .flow-steps { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .flow-step + .flow-step::before { left: 50%; top: -17px; transform: translateX(-50%) rotate(135deg); }
  .skill-md { padding-left: 16px; padding-right: 16px; }
  .word { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 16px; }
  .start-step { padding-right: 16px; padding-left: 52px; }
  .start-step::before { left: 16px; }
  .start-signin { flex-wrap: wrap; }
}

/* Downloads and older versions on the package page. */
.version-note { padding: 12px 20px; font-size: 0.875rem; color: var(--text-2); }
.releases a[aria-current="page"] { color: var(--text); }
.list a.name { display: block; }
.list a.name code { font-weight: 600; }

/* The preview page of one file: its path as the title, the preview in one
   panel, and the release's other files one step away. */
.file-head h1 { font-size: 1.375rem; overflow-wrap: anywhere; }
.file-head h1 code { font-size: inherit; font-weight: 600; }
.file-bar { flex-wrap: wrap; border-bottom: 1px solid var(--line-soft); }
.file-bar .grow { flex-grow: 1; }
.file-note { padding: 10px 20px; background: var(--warn-bg); color: var(--warn-text); font-size: 0.8125rem; border-bottom: 1px solid var(--line-soft); }
.doc-md { padding: 18px 20px 20px; font-size: 0.875rem; line-height: 1.6; overflow-wrap: anywhere; max-width: 820px; }
.file-text { overflow-x: auto; }
.file-bar + .file-text { padding-top: 16px; }
.file-nav { display: flex; gap: 12px; justify-content: space-between; }
.file-step {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 48%; padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; color: var(--text);
}
.file-step:hover { border-color: var(--field-line); text-decoration: none; }
.file-step code { color: var(--link); overflow-wrap: anywhere; }
.file-step-label { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--muted); }
.file-next { margin-left: auto; text-align: right; align-items: flex-end; }

/* Diagrams: a sandboxed frame draws each one (its height comes from the
   frame), with the source folded below. Without script the source shows,
   with a caption saying why. */
.diagram { margin: 0 0 12px; }
.diagram-file { margin: 0; padding: 16px 20px 18px; }
/* content-box: the frame reports its content height, borders come on top. */
.diagram-frame { display: block; box-sizing: content-box; width: calc(100% - 2px); border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.diagram-source { margin-top: 8px; }
.diagram-source > summary { display: inline-flex; align-items: center; min-height: 28px; cursor: pointer; font-size: 0.8125rem; color: var(--link); }
.diagram-source[open] > summary { margin-bottom: 6px; }
.diagram-src { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--code-bg); overflow-x: auto; font-family: var(--mono); font-size: 0.7812rem; line-height: 1.55; }
.diagram-src code { background: none; padding: 0; font-size: inherit; white-space: pre; }
.diagram-note { margin-top: 6px; font-size: 0.75rem; color: var(--muted); }
/* draw.io diagrams keep their author's colors, so their canvas stays
   light in both themes, with the page's hairline around it. */
.diagram-canvas .diagram-frame { background: var(--diagram-canvas); }
.page-tabs { display: flex; flex-wrap: wrap; gap: 2px; margin: 16px 20px 0; padding: 2px; background: var(--segment); border-radius: 9px; width: fit-content; max-width: calc(100% - 40px); }
.page-tabs a { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 7px; color: var(--text); font-size: 0.8125rem; }
.page-tabs a:hover { text-decoration: none; background: var(--sidebar-hover); }
/* The diff's views: one row of equal segments. */
.diff-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.diff-tabs a { justify-content: center; text-align: center; }
.page-tabs a[aria-current="page"] { background: var(--segment-on); font-weight: 600; box-shadow: var(--shadow); }

/* The wiki: one page per namespace. The reading page reuses the file
   preview's bar and measure; the edit form is one panel with a segmented
   Write and Preview (submit buttons, so they work without script). */
.panel-head .wiki-meta { font-size: 0.8125rem; color: var(--text-2); }
.wiki-meta a { font-weight: 600; }
.wiki-meta a[aria-current="page"] { color: var(--text); }
.wiki-old { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.wiki-old p { flex-grow: 1; }
.wiki-parent { font-size: 0.8125rem; color: var(--text-2); }
.wiki-cmd { border-top: 1px solid var(--line); }
/* A wiki page is read top to bottom, so its headings step down in size;
   package documents keep the compact headings of .md. */
.wiki-md h1 { margin: 28px 0 10px; font-size: 1.375rem; font-weight: 700; letter-spacing: -0.3px; line-height: 1.25; }
.wiki-md h2 { margin: 24px 0 8px; font-size: 1.125rem; line-height: 1.3; }
.wiki-md h3 { font-size: 1rem; }
/* Every ## section of a wiki page folds (wikiSections in wiki_render.go):
   a native details whose summary holds the h2, closed on the page so it
   opens as a list of its sections. The chevron points to the text while
   closed and down while open, like details.report-context. */
.wiki-section { border-bottom: 1px solid var(--line); }
.wiki-md > .wiki-section:first-child, .wiki-md > :not(.wiki-section) + .wiki-section { margin-top: 20px; border-top: 1px solid var(--line); }
.wiki-section > summary { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 0; list-style: none; cursor: pointer; }
.wiki-section > summary::-webkit-details-marker { display: none; }
.wiki-section > summary::before {
  content: ""; flex: none; width: 7px; height: 7px; margin: 0 2px 0 3px;
  border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(-45deg);
}
.wiki-section[open] > summary::before { transform: translateY(-2px) rotate(45deg); }
.wiki-section > summary:hover::before { border-color: var(--text); }
.wiki-md .wiki-section > summary h2 { margin: 0; }
.wiki-section-body { padding: 0 0 16px; }
.wiki-section-body > :first-child { margin-top: 4px; }
.wiki-section-body > :last-child { margin-bottom: 0; }
.wiki-section-body > :is(p, ul, ol, blockquote, h3, h4) { max-width: 72ch; }
.wiki-md [id] { scroll-margin-top: 16px; }
/* Open all / Close all (ui.js) sits just above the first section. */
.wiki-md .wiki-fold-all { display: flex; min-height: 32px; margin: 12px 0 0 auto; padding: 0 10px; color: var(--link); font-size: 0.8125rem; }
.wiki-md .wiki-fold-all + .wiki-section { margin-top: 4px; }
@media (pointer: coarse) { .wiki-md .wiki-fold-all { min-height: 44px; } }
/* A quiz fence (quiz.go): the question, then each answer as its own
   disclosure, so a reader can open several and compare. The verdict is a
   word first ("Right.", "Wrong."); the tint only repeats it. */
.md .quiz { max-width: 72ch; margin: 0 0 16px; padding: 12px 16px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-alt); }
.md .quiz-label { margin: 0 0 2px; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.quiz-q > :last-child { margin-bottom: 0; }
.md .quiz-answers { margin: 8px 0 0; padding: 0; list-style: none; }
.md .quiz-answers > li { margin: 0; border-top: 1px solid var(--line-soft); }
.quiz-answer > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 0; list-style: none; cursor: pointer; }
.quiz-answer > summary::-webkit-details-marker { display: none; }
.quiz-answer > summary::after {
  content: ""; flex: none; width: 7px; height: 7px; margin: 0 4px 0 auto;
  border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(-45deg);
}
.quiz-answer[open] > summary::after { transform: translateY(-2px) rotate(45deg); }
.quiz-answer > summary:hover::after { border-color: var(--text); }
.quiz-letter {
  flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--segment); color: var(--text-2); font-size: 0.75rem; font-weight: 600;
}
.quiz-text { min-width: 0; }
.quiz-why { margin: 0 0 10px 34px; padding: 8px 12px; border-radius: 8px; }
.quiz-why > :last-child { margin-bottom: 0; }
.quiz-right { background: var(--ok-bg); }
.quiz-right > p:first-child > strong:first-child { color: var(--ok-text); }
.quiz-wrong { background: var(--bad-bg); }
.quiz-wrong > p:first-child > strong:first-child { color: var(--bad-text); }
.md .quiz-error { padding: 8px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-text); font-size: 0.8125rem; }
/* The Course box at the end of a wiki page (ui_course.go): the lessons
   as a grouped list of 44 px rows, or one lesson open below the list,
   folded. Part of the page's flow: nothing sticky, no script. */
.course { scroll-margin-top: 16px; }
.course-head { border-bottom: 1px solid var(--line-soft); }
.course-head h2 { font-size: 1.0625rem; }
.panel-head .course-meta { margin-top: 2px; color: var(--text-2); overflow-wrap: anywhere; }
.course-meta a { font-weight: 600; }
.course-desc { max-width: 72ch; padding: 12px 20px 0; font-size: 0.875rem; color: var(--text-2); overflow-wrap: anywhere; }
.course-gone, .course-more { margin: 12px 20px 0; font-size: 0.8125rem; color: var(--text-2); }
.course-gone { padding: 8px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-text); }
.course-missing { padding: 14px 20px; font-size: 0.875rem; color: var(--text-2); overflow-wrap: anywhere; }
.lessons { margin: 12px 20px 16px; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lessons > li + li { border-top: 1px solid var(--line-soft); }
.lessons a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 14px; color: var(--text); font-size: 0.875rem; }
.lessons a:hover { background: var(--hover); text-decoration: none; }
.lessons a[aria-current="page"] { background: var(--own-bg); color: var(--own-text); font-weight: 600; }
.lesson-n {
  flex: none; display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  background: var(--segment); color: var(--text-2); font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.lesson-title { min-width: 0; overflow-wrap: anywhere; }
.course-all { margin: 12px 20px 0; }
.course-all > summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--link); font-size: 0.875rem; cursor: pointer; list-style: none; }
.course-all > summary::-webkit-details-marker { display: none; }
.course-all > summary::before {
  content: ""; flex: none; width: 6px; height: 6px; margin: 0 2px;
  border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg);
}
.course-all[open] > summary::before { transform: translateY(-2px) rotate(45deg); }
.course-all .lessons { margin: 4px 0 8px; }
.course-lesson { border-top: 1px solid var(--line); margin-top: 12px; }
.lesson-of { padding: 16px 20px 0; font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.course-lesson h3#lesson-h { padding: 2px 20px 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.2px; line-height: 1.3; overflow-wrap: anywhere; scroll-margin-top: 16px; }
.course-lesson .file-note { margin-top: 12px; }
.lesson-nav { display: flex; gap: 12px; justify-content: space-between; padding: 0 20px; }
.lesson-step-title { color: var(--link); overflow-wrap: anywhere; }
.lesson-close { padding: 12px 20px 18px; font-size: 0.875rem; }
.lesson-close a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 760px) {
  .course-desc, .lesson-of, .course-lesson h3#lesson-h, .lesson-nav, .lesson-close, .course-missing { padding-left: 16px; padding-right: 16px; }
  .lessons, .course-all, .course-gone, .course-more { margin-left: 16px; margin-right: 16px; }
  .course-all .lessons { margin-left: 0; margin-right: 0; }
  .quiz-why { margin-left: 0; }
}
.segmented { display: inline-flex; gap: 2px; padding: 2px; background: var(--segment); border-radius: 9px; }
.segmented button {
  min-height: 30px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent;
  font: inherit; font-size: 0.8125rem; color: var(--text); cursor: pointer;
}
.segmented button:hover { background: var(--sidebar-hover); }
.segmented button[aria-pressed="true"] { background: var(--segment-on); font-weight: 600; box-shadow: var(--shadow); }
.wiki-edit-head { border-bottom: 1px solid var(--line-soft); }
.wiki-write { padding: 16px 20px 0; }
textarea.wiki-text { min-height: 420px; font-family: var(--mono); font-size: 0.8125rem; line-height: 1.55; }
.wiki-hint { padding: 8px 0 0; margin: 0; }
.wiki-foot { display: flex; align-items: flex-end; gap: 12px; padding: 14px 20px 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.wiki-note { flex-grow: 1; max-width: 560px; }
.wiki-note label { font-size: 0.875rem; font-weight: 600; }
.wiki-note .muted { font-weight: 400; }
.wiki-note .field { width: 100%; }
.wiki-buttons { display: flex; gap: 8px; margin-left: auto; }
.wiki-history .note-cell { overflow-wrap: anywhere; }
.wiki-history .clip-cell { overflow-wrap: anywhere; }

/* Sign-in pages */

.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-col { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; }
.auth-col.wide { max-width: 440px; }
.auth-top { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.auth-top svg { color: var(--text); }
.auth-top svg.accent { color: var(--link); }
.auth-top h1 { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.4px; line-height: 1.2; }
.lead { font-size: 0.9375rem; line-height: 1.45; color: var(--text-2); }
.lead strong { color: var(--text); font-weight: 600; }
.card { display: flex; flex-direction: column; gap: 14px; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.card form { display: flex; flex-direction: column; gap: 12px; }
.pair { display: flex; flex-direction: column; gap: 6px; }
.pair label, .pair .labelrow { font-size: 0.8125rem; font-weight: 600; }
.field-lg { width: 100%; min-height: 44px; padding: 0 14px; font: inherit; font-size: 1rem; color: var(--text); background: var(--panel); border: 1px solid var(--input-line); border-radius: 10px; }
.field-lg:focus { outline: 2px solid transparent; border-color: var(--link); box-shadow: 0 0 0 3px var(--focus-ring); }
.btn-block { width: 100%; min-height: 44px; font-size: 0.9375rem; border-radius: 10px; }
.btn-block.btn-primary { margin-top: 4px; }
.small { font-size: 0.75rem; line-height: 1.45; color: var(--muted); text-align: center; }
.or { display: flex; align-items: center; gap: 12px; font-size: 0.8125rem; color: var(--muted); }
.or::before, .or::after { content: ""; flex-grow: 1; height: 1px; background: var(--line); }
.auth-foot { font-size: 0.875rem; color: var(--text-2); text-align: center; }
.codefield { min-height: 58px; font-size: 1.625rem; font-weight: 600; text-align: center; letter-spacing: 0.35em; font-variant-numeric: tabular-nums; border-radius: 12px; }
.usercode { align-self: center; padding: 12px 22px; background: var(--code-bg); border-radius: 12px; font-family: var(--mono); font-size: 1.875rem; font-weight: 600; letter-spacing: 4px; }
dl.facts.tight { padding: 0; grid-template-columns: 110px minmax(0, 1fr); }
.buttons { display: flex; gap: 10px; }
.buttons > * { flex: 1 1 0; }

/* The packages list has six columns. Below 1100 px it drops Releases (the
   package page lists them); below 1000 px its rows stack as on phones, so
   the package names keep room to read. */
@media (min-width: 1001px) and (max-width: 1100px) {
  .pkgs .opt { display: none; }
  .pkgs .pill-clip { max-width: 96px; }
}
/* Narrow answer columns: the title stays whole and the time, tokens and
   words wrap under it. */
@media (max-width: 1100px) {
  .col-head { flex-wrap: wrap; row-gap: 2px; }
  .col-head h2 { white-space: nowrap; }
}
@media (min-width: 761px) and (max-width: 1000px) {
  .pkgs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pkgs, .pkgs tbody, .pkgs tr, .pkgs td { display: block; width: auto; }
  .pkgs tr { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .pkgs tr:first-child { border-top: 0; }
  .pkgs td { height: auto; padding: 0; border: 0; }
  .pkgs td.stack { flex-basis: 100%; }
  .pkgs.fit td, .pkgs.fit td:first-child { width: auto; max-width: none; }
  .pkgs .desc { white-space: normal; }
}

/* Narrow screens: the sidebar becomes a top bar, lists stack. */

@media (max-width: 760px) {
  .app { flex-direction: column; }
  .side {
    width: auto; height: auto; position: sticky; top: 0; z-index: 4; overflow: visible;
    flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px;
    padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--sidebar-line);
  }
  .brand { padding: 0 8px 0 0; }
  .brand-motto { display: none; }
  .side-label, .side-fill, .level { display: none; }
  .side-nav { order: 3; flex-basis: 100%; display: flex; gap: 4px; overflow-x: auto; }
  .side-list, .side-sub, .js .side-sub[data-folded] { display: flex; flex-direction: row; gap: 4px; padding: 0; }
  .side-group, .side-row { display: contents; }
  .side-row .side-item { padding-right: 10px; }
  /* .js .js-only would show the fold arrow again, at the bar's right edge. */
  .side-toggle, .js .side-toggle { display: none !important; }
  .side-item { min-height: 30px; white-space: nowrap; }
  /* Docs, What's new and the account sit together on the right of the brand. */
  .side-user, .side-docs { margin-left: auto; }
  .side-docs + .side-news, .side-news + .side-user { margin-left: 0; }
  /* The two help links become icons; their word stays the accessible name. */
  .side-docs-label, .side-news-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .side-docs, .side-news { justify-content: center; }
  /* The account takes the room the row has left, up to its own width, so
     the row never wraps and a long name loses only the letters that do not
     fit. */
  .side-user { flex: 1 1 0; min-width: 0; max-width: fit-content; }
  .side-user span { max-width: 140px; }
  .main { padding: 20px 16px 40px; gap: 16px; }
  .tabs { margin-left: 0; order: 3; }
  .head-fill { display: none; }
  .search { width: 100%; order: 4; }
  .list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .list, .list tbody, .list tr, .list td { display: block; width: auto; }
  .list tr { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .list tr:first-child { border-top: 0; }
  .list td, .list.files td { height: auto; padding: 0; border: 0; }
  .list td.stack, .list td.wide { flex-basis: 100%; }
  .list.fit td, .list.fit td:first-child { width: auto; max-width: none; }
  .list .desc { white-space: normal; }
  .list .end { text-align: left; }
  .cmdcard { flex-wrap: wrap; }
  .doc-md, .file-note { padding-left: 16px; padding-right: 16px; }
  .wiki-write { padding: 14px 16px 0; }
  textarea.wiki-text { min-height: 320px; }
  .wiki-foot { flex-wrap: wrap; padding: 14px 16px 16px; }
  .wiki-note { flex-basis: 100%; max-width: none; }
  .file-bar, .diagram-file { padding-left: 16px; padding-right: 16px; }
  .page-tabs { margin-left: 16px; margin-right: 16px; max-width: calc(100% - 32px); }
  /* One row across the panel; a long label wraps inside its segment. */
  .diff-tabs { width: auto; }
  .diff-tabs a { padding: 4px 8px; }
  /* The package's name and description get the line; Download wraps
     below. A release row keeps version, date, digest and its zip link. */
  .pkg-head { flex-wrap: wrap; }
  .pkg-head .grow { flex-basis: 100%; }
  .releases .opt-phone { display: none; }
  .releases td.end { margin-left: auto; }
  .file-nav { flex-direction: column; }
  .file-step { max-width: none; align-self: stretch; }
  .file-next { margin-left: 0; }
  .cmdcard .cmd { max-width: none; flex-basis: 100%; }
  .prop-head { flex-direction: column; gap: 12px; }
  .prop-body { flex-direction: column; }
  /* Stacked, the answers take the screen's width, not their content's:
     long code and the prompt picker scroll or shrink inside it. */
  .prop-main { align-self: stretch; }
  .aside { width: 100%; }
  .sides { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .side-col + .side-col { border-left: 0; border-top: 1px solid var(--line); }
  .answer-bar { justify-content: flex-start; }
  .tiers tbody th { display: block; flex-basis: 100%; height: auto; padding: 0; border: 0; }
  .tiers td { flex-basis: 100%; }
  .tier-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-size: 0.75rem; color: var(--text-2); }
  label.tier-label { display: block; margin: 4px 0; font-weight: 600; }
  .tiers-save { flex-wrap: wrap; }
  .addform { flex-wrap: wrap; }
  .addform .field { flex-basis: 100%; }
  .invite { padding: 16px; }
  .invite-foot { flex-wrap: wrap; }
  .panel > .invite-foot { padding: 14px 16px 16px; }
  .invite-link { padding: 14px 16px; }
  .pop { width: min(320px, calc(100vw - 32px)); }
  .prompt-list { padding-left: 34px; padding-right: 16px; }
  .prompt-add, .prompts-intro { padding-left: 16px; padding-right: 16px; }
  .prompt-add .row { flex-wrap: wrap; }
  /* The buttons sit on the left here: open their forms from the row's
     left edge, so they stay on screen whichever button opened them. */
  .actions { position: relative; }
  .act-col { align-items: flex-start; max-width: none; }
  .act-why { text-align: left; }
  .actions .menu { position: static; }
  .actions .pop { left: 0; right: auto; }
  dl.facts { grid-template-columns: 110px minmax(0, 1fr); }
  dl.facts.stats { grid-template-columns: 110px minmax(0, 1fr); }
  .grid2, .grid2 > .stack { gap: 16px; }
  .tiles { gap: 10px; }
  .tile { padding: 12px 14px; }
  .tile .value { font-size: 1.1875rem; }
  .cost th, .cost td, .panel-note, .panel-foot, .diskbar { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .side-item, .tabs a, .filters a, .icon-btn, .segmented button { transition: background-color 0.12s ease; }
  .side-toggle svg, details.report-context > summary svg, .invite-fold > summary svg, .wiki-section > summary::before, .quiz-answer > summary::after, .course-all > summary::before { transition: transform 0.15s ease; }
}

/* Column widths (no inline styles: the CSP allows only this file). */
.w110 { width: 110px; } .w120 { width: 120px; } .w130 { width: 130px; }
.w140 { width: 140px; } .w160 { width: 160px; } .w190 { width: 190px; } .w60 { width: 60px; }
.pad-x { padding: 0 20px 16px; }
.diff .mark { display: inline-block; width: 1.4em; }

/* Increased contrast: stronger secondary text and separators. */
@media (prefers-contrast: more) {
  :root { --muted: #515154; --muted-2: #3a3a3c; --line: #aeaeb2; --line-soft: #c7c7cc; --field-line: #8a8a8e; --input-line: #515154; }
  :root[data-theme="dark"] { --muted: #d1d1d6; --muted-2: #d1d1d6; --line: #636366; --line-soft: #48484a; --field-line: #8e8e93; --input-line: #aeaeb2; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --muted: #d1d1d6; --muted-2: #d1d1d6; --line: #636366; --line-soft: #48484a; --field-line: #8e8e93; --input-line: #aeaeb2; }
}

/* Touch screens: controls at least 44 px tall. */
@media (pointer: coarse) {
  .btn, .sel, .field, .side-item, .tabs a, .filters a, .search, details.report-context > summary, .diagram-source > summary, .page-tabs a, .segmented button, .behind-links a, .pop-link a { min-height: 44px; }
  .icon-btn, .side-toggle { width: 44px; height: 44px; }
}
@media (pointer: coarse) and (min-width: 761px) {
  .side-row .side-item { padding-right: 50px; }
}
/* The phone top bar: Docs and What's new side by side are 44 px wide on
   touch; the account name gives up the room. */
@media (pointer: coarse) and (max-width: 760px) {
  .side-docs, .side-news { min-width: 44px; }
}

/* A printed wiki page shows its closed sections; browsers without
   ::details-content drop the rule and print them as they are. */
@media print {
  .wiki-section::details-content { content-visibility: visible; display: block; }
}
@media print {
  .wiki-section > summary::before { display: none; }
}

/* An open popover form must not be clipped by its rounded panel. */
.panel:has(details.menu[open]) { overflow: visible; }
.list details.menu { display: inline-block; text-align: left; }
