/* The few rules the daemon's pages add to site.css: forms, logs, small states. Tokens only. */

/* ---------- semantic tokens: what a colour is for, on the design tokens ----------
   The console's rules use these; each is a design token of site.css, so both themes follow.
   Text: primary for content, secondary for small text (12px and under: labels, table headers,
   badges, footers), muted only for text of 13px and over. Every pair is WCAG AA in both themes;
   the check is crates/ui/src/a11y_tests.rs. */
:root {
  --text-primary: var(--ink);
  --text-secondary: var(--ink-2);
  --text-muted: var(--ink-3);
  --surface: var(--paper);
  --surface-raised: var(--sheet);
  --surface-sunk: var(--sunk);
  --border: var(--rule);
  --border-strong: var(--rule-2);
  --border-control: var(--control);
  --status-ok: var(--green);
  --status-ok-bg: var(--green-bg);
  --status-fail: var(--red);
  --status-fail-bg: var(--red-bg);
  --status-wait: var(--amber);
  --status-wait-bg: var(--amber-bg);
  --status-run: var(--ink-2);
  --status-test: var(--blue);
  --status-test-bg: var(--blue-bg);
  --status-merge: var(--violet);
  --status-merge-bg: var(--violet-bg);
  --focus-ring: var(--copper);
  --focus-halo: var(--paper);
}

.ok { color: var(--status-ok); }
.err { color: var(--status-fail); }
.dim { color: var(--text-muted); }
.signin { max-width: 460px; margin: var(--s8) auto; padding: 0 var(--gutter); display: grid; gap: var(--s4); }
.signin h1 { font-size: var(--t-2xl); }
.form { display: grid; gap: var(--s3); }
.form label { display: grid; gap: var(--s1); font: 600 var(--t-xs)/1.3 var(--sans); color: var(--text-secondary); }
.form fieldset.events { border: 1px solid var(--border-strong); border-radius: 4px; padding: var(--s2) var(--s3); display: grid; gap: var(--s1); }
.form fieldset.events legend { font: 600 var(--t-xs)/1.3 var(--sans); color: var(--text-secondary); padding: 0 var(--s1); }
.form label.check { display: flex; gap: var(--s2); align-items: baseline; font: 400 var(--t-sm)/1.4 var(--sans); color: var(--text-primary); }
/* ---------- controls (components.rs): the UI font, one height, one radius, a focus ring ----------
   Monospace is for code, SHAs and branch names; a label, a field and a button are UI. */
input, select, textarea {
  font: 400 var(--t-sm)/1.4 var(--sans); color: var(--text-primary); background: var(--surface-raised);
  border: 1px solid var(--border-control); border-radius: var(--control-radius); padding: 0 var(--control-px); max-width: 100%;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select { height: var(--control-h); }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 1; }
select {
  appearance: none; padding-right: 30px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%), linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: var(--focus-ring); border-radius: var(--control-radius); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--copper); flex: none; cursor: pointer; }
textarea { width: 100%; padding: 9px 10px; font: 400 13px/1.55 var(--mono); }
button.btn, .btn { min-height: var(--control-h); }
button.btn { cursor: pointer; font-family: var(--sans); }
.stage { display: grid; gap: var(--s4); margin-top: var(--s5); }
.stage > .ledger, .stage > .file { margin: 0; }
.file pre.log { max-height: 560px; overflow: auto; white-space: pre; }
.file .failed { padding: 10px 16px; border-bottom: 1px solid var(--border); color: var(--status-fail); font: 400 var(--t-sm)/1.4 var(--mono); }
.ledger .empty { padding: 16px; color: var(--text-secondary); font-size: var(--t-sm); }
.lt td.wrap-ok { white-space: normal; }
.lt td .why { max-width: 70ch; }
.refresh { font: 400 var(--t-xs)/1 var(--mono); color: var(--text-secondary); }
.cars { display: flex; gap: var(--s2); flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: center; font: 400 var(--t-xs)/1.2 var(--sans); }
.car { border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); padding: 6px 12px; display: inline-flex; gap: 6px; align-items: center; color: var(--text-primary); text-decoration: none; font-weight: 600; }
a.car:hover { background: var(--surface-sunk); }
a.car[aria-current], .car.front { background: var(--text-primary); border-color: var(--text-primary); color: var(--surface); }
.car b { color: var(--text-primary); }
a.car[aria-current] b, .car.front b, a.car[aria-current] .dim, .car.front .dim { color: inherit; }
.spacer { height: var(--s5); }
.car.this { background: var(--surface-sunk); }
/* The operator's console: the Developer | Operator switch, the tenant picker, "View as". */
.modes { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 4px; overflow: hidden; font: 700 var(--t-xs)/1 var(--mono); margin-left: var(--s3); }
.modes a { padding: 6px 10px; color: var(--text-secondary); text-decoration: none; }
.modes a[aria-current] { background: var(--text-primary); color: var(--surface); }
.picker { position: relative; }
.picker summary { cursor: pointer; list-style: none; }
.picker .menu { position: absolute; z-index: 10; display: grid; min-width: 14em; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; padding: 4px 0; }
.picker .menu a { padding: 6px 12px; }
.viewas { margin: 0; padding: 8px var(--gutter); background: var(--surface-sunk); border-bottom: 1px solid var(--border); font-size: var(--t-sm); }
/* A ledger never clips. The reason column takes the spare width and wraps (the one cell that may);
   a table still wider than the page scrolls inside its sheet. */
.lt td.grow, .lt th.grow { white-space: normal; width: 100%; min-width: 24ch; overflow-wrap: anywhere; }
.ledger { overflow-x: auto; }
.lt td.grow .lead { font-family: var(--sans); color: var(--text-primary); }
.lt td.grow details { margin-top: 4px; }
.lt td.grow summary { cursor: pointer; color: var(--text-secondary); font: 400 var(--t-xs)/1.4 var(--mono); }
.lt td.grow details p { margin: 4px 0 0; color: var(--text-secondary); font: 400 13px/1.45 var(--sans); }
.lt td .sub { display: block; color: var(--text-secondary); font-size: var(--t-xs); }
details.folded > summary { cursor: pointer; padding: 12px 16px; font: 700 var(--t-sm)/1.2 var(--mono); color: var(--text-secondary); }
/* The bar's mark (crates/ui/src/brand.rs): the kit's primary drawing, a dark tile, on a light page;
   its light variant, a paper tile, on a dark one. Follows the OS, or data-theme when one is pinned. */
.wm .mark-on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wm .mark-on-light { display: none; }
  :root:not([data-theme="light"]) .wm .mark-on-dark { display: block; }
}
:root[data-theme="dark"] .wm .mark-on-light { display: none; }
:root[data-theme="dark"] .wm .mark-on-dark { display: block; }

/* ---------- contrast: small text is never muted (ADDENDUM-2 §3) ----------
   site.css draws these in --ink-3 at 11-12px (4.9:1 on a well in light); the console draws them in
   the secondary colour (6.1:1 and over), and table headers at 12px, not 11px. */
.tag { color: var(--text-secondary); }
.label { color: var(--text-secondary); }
.lt th { font-size: var(--t-xs); color: var(--text-secondary); }
.lt .dim, .lt .pr { color: var(--text-secondary); }
.ledger-foot { color: var(--text-secondary); }
.wi-id { color: var(--text-secondary); }
.kpi .delta { color: var(--text-secondary); }
.alarm .when { color: var(--text-secondary); }
@media (max-width: 760px) {
  .lt.stack td[data-k]::before { font-size: var(--t-xs); color: var(--text-secondary); }
}

/* ---------- keyboard focus: a copper ring on a halo of the page colour ----------
   The halo fills the ring's offset, so the ring is always copper on the page colour (5.5:1 light,
   7.6:1 dark) whatever the focused thing is drawn in (an ink button, a tinted chip). */
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus-halo); }
.rail a[aria-current="page"]:focus-visible { box-shadow: inset 2px 0 0 var(--focus-ring), 0 0 0 1px var(--border-strong), 0 0 0 2px var(--focus-halo); }

/* ---------- motion: none when the reader asks for none ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- touch: 44px targets on a touch screen or a narrow one ---------- */
@media (pointer: coarse), (max-width: 960px) {
  .rail a, button, .btn, .switch { min-height: 44px; }
}

/* ---------- narrow screens: nothing widens the page at 320px ----------
   A ledger scrolls inside itself (it is a labelled region, so a keyboard can scroll it too); the
   one-column app cannot grow past the screen; the bar drops the version and the avatar, and the
   role badge and the daemon switch give way before anything overflows. */
.ledger { overflow-x: auto; }
.rail a { position: relative; } /* holds its badge's screen-reader word inside the scrolling rail */
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  /* the rail is one scrolling row: the fleet's links join it, nothing stretches it tall */
  .rail { align-items: center; }
  .fleet-rail { display: contents; }
}
@media (max-width: 600px) {
  .bar-in { gap: var(--s3); }
  .bar-end { min-width: 0; flex: 1 1 auto; justify-content: flex-end; }
  .nav.ctx { min-width: 0; flex: 0 1 auto; }
  .nav.ctx .switch { min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; }
  .nav.ctx .switch::after { display: none; }
  .tag.role { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .signout button { white-space: nowrap; }
  /* a form laid out in one row (inline style) stacks its fields */
  .form { grid-auto-flow: row !important; }
}
@media (max-width: 420px) {
  /* a phone keeps the mark, the context and Sign out: the role badge goes (Settings on the rail
     says a maintainer), and in the fleet shell the wordmark's name gives the daemon switch room */
  .tag.role { display: none; }
  .bar-in:has(.ctx a) .wm-name { display: none; }
}
/* The sign-in (crates/ui/src/signin.rs), one page for the hub and every daemon: the product on the
   left as the site introduces it, the card on the right; one column on a small screen. */
.auth { padding: var(--s8) var(--gutter); }
.auth-in { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s7); align-items: center; }
.auth-brand { display: grid; gap: var(--s4); align-content: center; }
.wm.auth-wm .mark { width: 56px; height: 56px; }
.wm.auth-wm .wm-name { font-size: var(--t-xl); }
.auth-h { font: 700 clamp(40px, 5vw, 72px)/0.95 var(--sans); letter-spacing: -0.035em; }
.auth-brand .hero-line { margin-top: 0; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); color: var(--ink-2); max-width: 46ch; }
.auth-points li { position: relative; padding-left: var(--s5); }
.auth-points li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 12px; border-top: 1.5px solid var(--copper); }
.auth-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); padding: var(--s6); }
.auth-card .cmd { white-space: normal; overflow-wrap: anywhere; align-items: baseline; }
.auth-card h1 { font-size: var(--t-2xl); }
.auth-card .err { color: var(--red); font-weight: 700; }
.auth-card code { overflow-wrap: anywhere; }
.auth-card h2 { margin-top: var(--s2); }
.auth-card .form .btn, .auth-via .btn { justify-content: center; }
.auth-via { display: grid; gap: var(--s2); }
.auth-alt summary { cursor: pointer; font: 700 var(--t-sm)/1.4 var(--sans); color: var(--ink-2); }
.auth-alt[open] summary { margin-bottom: var(--s3); }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s4); font-size: var(--t-sm); border-top: 1px solid var(--rule); padding-top: var(--s4); }
.auth-links .auth-help { margin-left: auto; }
@media (max-width: 860px) {
  .auth { padding-top: var(--s6); padding-bottom: var(--s6); }
  .auth-in { grid-template-columns: 1fr; gap: var(--s5); }
  .auth-h { font-size: var(--t-3xl); }
  .auth-brand .hero-line, .auth-points { display: none; }
  .auth-card { padding: var(--s5); }
}
/* The merge queue: a PR's state, each its own colour and shape beside its word (queuepage). */
.q-testing { color: var(--status-test); background: var(--status-test-bg); }
.q-testing::before { border-radius: 50%; background: conic-gradient(var(--status-test) 0 50%, transparent 0); border: 1.5px solid var(--status-test); }
@media (prefers-reduced-motion: no-preference) { .q-testing::before { animation: spin 1.6s linear infinite; } }
.q-queued { color: var(--ink-2); background: var(--sunk); }
.q-queued::before { border-radius: 50%; border: 2px solid var(--ink-2); }
.q-passed { color: var(--green); background: var(--green-bg); }
.q-passed::before { border-radius: 50%; border: 2px solid var(--green); background: var(--green-bg); box-shadow: inset 0 0 0 1.5px var(--green); }
.q-failing { color: var(--red); background: var(--red-bg); }
.q-failing::before { background: var(--red); transform: rotate(45deg) scale(0.85); }
.q-merging { color: var(--status-merge); background: var(--status-merge-bg); }
.q-merging::before { border-radius: 50%; background: var(--status-merge); }
.q-stalled { color: var(--amber); background: var(--amber-bg); }
.q-stalled::before { width: 3px; border-left: 3px solid var(--amber); border-right: 3px solid var(--amber); box-sizing: content-box; }
.q-moving { font-family: var(--mono); }
.q-moving.yes { color: var(--green); }
.q-moving.no { color: var(--red); }
.q-moving.slow { color: var(--amber); }
.q-line { font-family: var(--mono); }
.q-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--rule-2); margin-bottom: var(--s4); }
.q-tabs a { padding: 8px 12px; font: 400 var(--t-sm)/1.2 var(--mono); color: var(--ink-2); text-decoration: none; border: 1px solid transparent; border-bottom: 0; border-radius: 4px 4px 0 0; }
.q-tabs a[aria-current] { color: var(--ink); background: var(--sheet); border-color: var(--rule-2); font-weight: 700; margin-bottom: -1px; }
.q-tabs .n { color: var(--ink-3); }
/* Live pages (live.js): the indicator, and a brief flash on what an update changed. */
html.live .refresh { display: none; }
/* The live indicator (live.js): a quiet dot whose tooltip says how fresh the page is; words only
   when it is stale (amber) or the stream is down (red). */
.live-ind { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font: 600 var(--t-xs)/1 var(--sans); color: var(--text-secondary); cursor: default; }
.live-ind::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.live-ind.stale { color: var(--amber); }
.live-ind.stale::before { background: var(--amber); }
.live-ind.down { color: var(--red); }
.live-ind.down::before { background: var(--red); }
@keyframes live-flash { from { background-color: var(--amber-bg); } to { background-color: transparent; } }
.live-flash { animation: live-flash 1.2s ease-out; }
@media (prefers-reduced-motion: reduce) { .live-flash { animation: none; } }

/* rating a verdict, a job or a placement: one quiet line */
.rate { display: flex; align-items: center; gap: 8px; margin-top: var(--s5); font-size: var(--t-xs); }
.rate .rate-b { padding: 4px 8px; line-height: 1; background: transparent; }
.rate-note textarea { width: min(480px, 100%); }

/* ---------- the filter bar (components::filter_bar): one row of controls on one baseline ---------- */
.f-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); padding: 12px 16px; }
.f-field { display: grid; gap: var(--s1); min-width: 0; }
.f-field.f-inline { display: inline-flex; align-items: center; gap: var(--s2); }
.f-label { font: 600 var(--t-xs)/1.3 var(--sans); color: var(--text-secondary); white-space: nowrap; }
.f-grow { flex: 1 1 240px; }
.f-grow .f-control { width: 100%; min-width: 0; }
.f-select { min-width: 9em; }
.f-check { display: inline-flex; align-items: center; gap: var(--s2); font: 400 var(--t-sm)/1.4 var(--sans); color: var(--text-primary); cursor: pointer; }
.f-bar .f-button { margin-left: auto; }

/* ---------- labels in the UI font: table headers and section titles ---------- */
.lt th { font: 600 var(--t-xs)/1.2 var(--sans); letter-spacing: 0.01em; }
.ledger-title { font: 700 var(--t-sm)/1.2 var(--sans); }

/* ---------- classes in place of inline styles (the pages carry none) ---------- */
a.plain, a.car { text-decoration: none; }
.ledger.bare, .cars.bare { border: 0; padding: 0; }
.ledger.pad { padding: 16px; }
.form.row { grid-auto-flow: column; align-items: end; justify-content: start; }
.form.row.mid { align-items: center; }
.form.row.mt { margin-top: var(--s4); }
.form.row.flush { margin: 0; }
@media (max-width: 720px) { .form.row { grid-auto-flow: row; } }
.form.inline { display: inline; }
.form.inline-block { display: inline-block; margin: 0; }
form.signout { margin: 0; }
form.signout button { cursor: pointer; background: none; }
summary.fold { padding: 12px 0; cursor: pointer; }
summary.pointer { cursor: pointer; }
.mt4 { margin-top: var(--s4); }
.wrap-normal { white-space: normal; }
.q.env { border-left-color: var(--ink-3); }
svg.flip { transform: rotate(180deg); }
main.standalone { max-width: 1100px; margin: 0 auto; padding: var(--s5) var(--gutter); }
label.token-box { display: block; padding: 12px; }
label.radio-row { display: block; margin: 6px 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bar-meter i.p0 { width: 0%; }
.bar-meter i.p5 { width: 5%; }
.bar-meter i.p10 { width: 10%; }
.bar-meter i.p15 { width: 15%; }
.bar-meter i.p20 { width: 20%; }
.bar-meter i.p25 { width: 25%; }
.bar-meter i.p30 { width: 30%; }
.bar-meter i.p35 { width: 35%; }
.bar-meter i.p40 { width: 40%; }
.bar-meter i.p45 { width: 45%; }
.bar-meter i.p50 { width: 50%; }
.bar-meter i.p55 { width: 55%; }
.bar-meter i.p60 { width: 60%; }
.bar-meter i.p65 { width: 65%; }
.bar-meter i.p70 { width: 70%; }
.bar-meter i.p75 { width: 75%; }
.bar-meter i.p80 { width: 80%; }
.bar-meter i.p85 { width: 85%; }
.bar-meter i.p90 { width: 90%; }
.bar-meter i.p95 { width: 95%; }
.bar-meter i.p100 { width: 100%; }
/* Charts (cost/spark.rs): a series' colour is a class. */
.c0 { --c: var(--copper); } .c1 { --c: var(--red); } .c2 { --c: var(--amber); }
.c3 { --c: var(--green); } .c4 { --c: var(--ink-3); } .c5 { --c: var(--rule-2); } .c-ink { --c: var(--ink-2); }
svg .line { stroke: var(--c); }
svg .area { fill: var(--c); stroke: none; }
svg .axis { stroke: var(--rule); }
.spark.narrow { width: 120px; }
.chart-box { padding: 12px 16px; }
.chart-top { font-size: 12px; }
svg.chart { display: block; width: 100%; height: 160px; }
.chart-foot { display: flex; justify-content: space-between; font-size: 12px; }
.legend-item { display: inline-flex; gap: 6px; align-items: center; }
i.swatch-dot { display: inline-block; width: 10px; height: 10px; background: var(--c); }

/* ---------- icon toggles, counts, disclosures (components.rs) ---------- */
.f-toggles { display: inline-flex; gap: 6px; align-items: flex-start; }
.f-toggles form { margin: 0; }
.f-toggle {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; min-width: 28px; padding: 0 9px;
  border: 1px solid var(--border-control); border-radius: 999px; background: var(--surface-raised);
  color: var(--text-secondary); font: 600 var(--t-sm)/1 var(--sans); cursor: pointer;
}
.f-toggle:hover { background: var(--surface-sunk); color: var(--text-primary); }
.f-toggle.ok.f-on { background: var(--status-ok); border-color: var(--status-ok); color: var(--surface); }
.f-toggle.no.f-on { background: var(--status-fail); border-color: var(--status-fail); color: var(--surface); }
.f-count { font: 600 var(--t-xs)/1 var(--sans); font-variant-numeric: tabular-nums; }
.f-disclosure > summary { list-style: none; cursor: pointer; }
.f-disclosure > summary::-webkit-details-marker { display: none; }
.f-wrong { display: inline-block; }
.f-wrong[open] > summary .f-toggle { border-color: var(--status-fail); color: var(--status-fail); }
.f-note { display: flex; gap: 6px; margin-top: 6px; }
.f-note .f-control { width: 220px; }
.f-sample > summary { font: 600 var(--t-xs)/1.6 var(--sans); color: var(--text-secondary); margin-top: 4px; }
.f-sample > summary::before { content: "▸ "; }
.f-sample[open] > summary::before { content: "▾ "; }

/* ---------- the project switcher (components::project_switcher) ---------- */
.project-picker > summary.switch { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--control-radius); font: 700 var(--t-sm)/1 var(--sans); color: var(--text-primary); }
.project-picker > summary.switch:hover, .project-picker[open] > summary.switch { background: var(--surface-sunk); }
.project-picker > summary::-webkit-details-marker { display: none; }
.project-picker .chev { font-size: 10px; color: var(--text-secondary); }
.project-picker .menu { top: calc(100% + 4px); left: 0; box-shadow: 0 6px 24px color-mix(in srgb, var(--ink) 8%, transparent); }
.project-picker .menu a { color: var(--text-primary); text-decoration: none; font: 400 var(--t-sm)/1.3 var(--sans); }
.project-picker .menu a:hover { background: var(--surface-sunk); }
.project-picker .menu a[aria-current] { font-weight: 700; }
.project-one { font-family: var(--sans); font-weight: 700; }
.project-picker > summary.switch::after { display: none; }
.project-picker .menu a[aria-current] { box-shadow: none; }

/* ---------- the bar: the mark, the project switcher, then (right) the live dot and the avatar ---------- */
.bar .bar-in { gap: var(--s4); }
.bar .nav.ctx { display: flex; align-items: center; min-width: 0; }
.bar .bar-end { margin-left: auto; gap: var(--s4); }
.bar .wm-name { font-family: var(--sans); }
.avatar-btn { list-style: none; cursor: pointer; display: inline-flex; border-radius: 999px; }
.avatar-btn::-webkit-details-marker { display: none; }
.avatar-btn:hover .avatar, .account[open] .avatar { box-shadow: 0 0 0 3px var(--surface-sunk); }
.account .menu { right: 0; left: auto; top: calc(100% + 8px); min-width: 16em; padding: 6px 0; box-shadow: 0 8px 28px color-mix(in srgb, var(--ink) 10%, transparent); font: 400 var(--t-sm)/1.35 var(--sans); }
.acct-who { display: grid; gap: 2px; padding: 8px 14px 10px; border-bottom: 1px solid var(--border); }
.acct-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: 7px 14px; }
.acct-link { color: var(--text-primary); text-decoration: none; font-weight: 600; }
.acct-link:hover { background: var(--surface-sunk); }
.account .theme-form { margin: 0; }
.account .theme-btn { border: 0; background: none; padding: 0; font: 600 var(--t-sm)/1 var(--sans); color: var(--text-primary); cursor: pointer; }
.acct-out { display: block; width: 100%; text-align: left; margin-top: 4px; padding: 9px 14px; border: 0; border-top: 1px solid var(--border); background: none; font: 600 var(--t-sm)/1.3 var(--sans); color: var(--text-primary); cursor: pointer; }
.acct-out:hover, .account .theme-btn:hover { background: var(--surface-sunk); }
.bar-ver { font: 400 var(--t-xs)/1 var(--sans); color: var(--text-secondary); }
.bar .theme-btn { font-family: var(--sans); }
@media (max-width: 600px) {
  .bar .nav.ctx { flex: 0 1 auto; }
  .project-picker .project-name { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
}
/* The switcher sits right after the mark, unboxed, at every width (site.css's marketing bar centres
   and hides its context links on a narrow screen). */
.bar .nav.ctx { margin-left: 0; margin-right: auto; }
.bar .nav.ctx .project-picker > summary.switch:first-child { display: inline-flex; border: 0; min-height: 0; }
.bar .avatar { font-family: var(--sans); font-weight: 700; }
/* The Developer | Operator switch sits on the right, before the avatar, in the UI font. */
.bar .modes { margin-left: auto; font-family: var(--sans); }
.bar .modes + .bar-end { margin-left: 0; }

/* A row's project on a page that shows several (All projects). */
.pchip { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--surface-sunk); color: var(--text-secondary); font: 600 var(--t-xs)/1.5 var(--sans); vertical-align: 1px; }

/* A PR's approval (issue 1181): who it waits on, the guarded files' diff, Approve and Reject. */
.approval { margin: var(--s6) 0; padding: var(--s4) var(--s5); border: 1px solid var(--rule-2); border-radius: 8px; }
.approval h2 { font-size: var(--t-lg); margin: 0 0 var(--s2); }
.approval .acts { display: flex; gap: var(--s3); margin-top: var(--s3); }
.approval textarea { width: 100%; }
.approval .reject { margin-top: var(--s3); }
.diff-file { margin: var(--s3) 0; border: 1px solid var(--rule); border-radius: 6px; }
.diff-file > summary { padding: var(--s2) var(--s3); cursor: pointer; }
pre.diff { margin: 0; padding: var(--s2) 0; overflow-x: auto; font-size: var(--t-sm); line-height: 1.5; }
pre.diff span { display: block; padding: 0 var(--s3); white-space: pre; }
pre.diff .d-add { color: var(--green); background: var(--green-bg); }
pre.diff .d-del { color: var(--red); background: var(--red-bg); }
pre.diff .d-hunk { color: var(--ink-3); }
.note.ok { color: var(--green); }
.note.err { color: var(--red); }

/* ---------- fluid at every width (issue 1275) ----------
   The header and the content use the window's whole width: no page is fixed to a column with an
   empty half beside it on a wide screen. Only prose keeps a reading width; a table scrolls inside
   its own box; on a narrow screen the rail is one scrolling row above the page. */
.app .main { max-width: none; width: 100%; }
.main-head p, .main > p, .main .dim:where(p), .main .panel-h + p { max-width: 80ch; }
.menu .manage { border-top: 1px solid var(--rule); margin-top: 4px; padding-top: 8px; color: var(--text-secondary); }
