/* The staff console's stylesheet (#978). Replaces the inline _style.html.

   Built on the app's own tokens (static/css/base.css): the brand constants
   are restated here because the console does not load base.css (its bare
   tag selectors would restyle Django admin's markup), and a test pins them
   equal (apps/console/tests/test_console_look.py). Django admin's colour
   variables are pointed at the console's role tokens, so the admin
   changelists the console still uses follow the same light and dark theme.
   data-theme on <html> is set before paint by console/_head.html. */

/* Self-hosted brand faces, as base.css. */
@font-face {
  font-family: 'Montserrat Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/montserrat-latin-ext-wght-normal.d16dfe26bcd7.woff2") format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/montserrat-latin-wght-normal.311d352d9323.woff2") format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Karla Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/karla-latin-ext-wght-normal.b8948c38fcee.woff2") format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Karla Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/karla-latin-wght-normal.3006def87dd6.woff2") format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ── Tokens ─────────────────────────────────────────────────────────────
   The light block also answers to data-theme="light", which outranks admin
   base.css's own `html[data-theme="light"], :root` block. */
:root,
:root[data-theme="light"] {
  /* Brand constants: the same values as static/css/base.css. */
  --ink: #1d2238;
  --ink-raised: #252b45;
  --paper: #eff1f5;
  --green: #00fda7;
  --grey: #5e616d;
  --on-ink: #c9cdda;
  --on-ink-soft: #a7acbe;
  /* The console's own marker: the staff strip, in both themes. */
  --amber: #ffb020;

  /* Roles, light: as base.css. */
  --fg: var(--ink);
  --fg-soft: #3a3f55;
  --muted: var(--grey);
  --line: #dcdfe8;
  --line-strong: #c5cad8;
  --field-border: #8a90a6;
  --bg: var(--paper);
  --card: #ffffff;
  --raised: var(--paper);
  --accent: var(--ink);
  --on-accent: var(--green);
  --accent-hover: var(--ink-raised);
  --ok-fg: var(--ink);
  --select-wash: color-mix(in srgb, var(--green) 22%, transparent);
  --info-fg: #0068a7;
  --danger-fg: #c90040;
  --danger-accent: #ff286c;
  --warn-fg: var(--danger-fg);
  --warn-bg: var(--card);
  --info-bg: color-mix(in srgb, var(--info-fg) 12%, transparent);
  --danger-bg: color-mix(in srgb, var(--danger-fg) 8%, transparent);
  --bar: var(--ink);
  --bar-hover: #454c74;
  /* The sidebar is ink in both themes, as the app's shell. */
  --shell-bg: var(--ink);
  --shell-fg: var(--on-ink);
  --shell-fg-soft: var(--on-ink-soft);
  --shell-line: #363c5e;
  --shell-hover: rgb(255 255 255 / 0.07);
  /* The focus ring: ink on the light content area (green on paper is
     about 1.2:1), green on ink surfaces. */
  --focus: var(--ink);
  /* The amber strip's height, so the sidebar fits under it. */
  --strip-h: 24px;
  --radius-btn: 4px;
  --radius-card: 8px;
  --font-body: 'Karla Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-head: 'Montserrat Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Django admin's variables, pointed at the tokens above. */
  --primary: var(--accent);
  --secondary: var(--accent);
  --primary-fg: var(--on-accent);
  --body-fg: var(--fg);
  --body-bg: var(--card);
  --body-quiet-color: var(--muted);
  --body-medium-color: var(--fg-soft);
  --body-loud-color: var(--fg);
  --header-color: var(--shell-fg);
  --header-branding-color: var(--shell-fg);
  --header-bg: var(--shell-bg);
  --header-link-color: var(--shell-fg);
  --breadcrumbs-fg: var(--muted);
  --breadcrumbs-link-fg: var(--fg);
  --breadcrumbs-bg: var(--raised);
  --link-fg: var(--fg);
  --link-hover-color: var(--fg);
  --link-selected-fg: var(--fg);
  --hairline-color: var(--line);
  --border-color: var(--field-border);
  --error-fg: var(--danger-fg);
  --message-success-bg: var(--select-wash);
  --message-warning-bg: var(--info-bg);
  --message-error-bg: var(--danger-bg);
  --darkened-bg: var(--raised);
  --selected-bg: var(--select-wash);
  --selected-row: var(--select-wash);
  --button-fg: var(--on-accent);
  --button-bg: var(--accent);
  --button-hover-bg: var(--accent-hover);
  --default-button-bg: var(--accent);
  --default-button-hover-bg: var(--accent-hover);
  --close-button-bg: var(--muted);
  --close-button-hover-bg: var(--fg);
  --delete-button-bg: var(--danger-fg);
  --delete-button-hover-bg: var(--danger-fg);
  --object-tools-fg: var(--on-accent);
  --object-tools-bg: var(--accent);
  --object-tools-hover-bg: var(--accent-hover);
  --font-family-primary: var(--font-body);
  color-scheme: light;
}

/* Dark: the content area moves to ink, as the app's dark block (Navy). */
:root[data-theme="dark"] {
  --fg: var(--on-ink);
  --fg-soft: var(--on-ink);
  --muted: var(--on-ink-soft);
  --line: #363c5e;
  --line-strong: #454c74;
  --field-border: #737ba3;
  --bg: var(--ink);
  --card: var(--ink-raised);
  --raised: #2f3556;
  --accent: var(--green);
  --on-accent: var(--ink);
  --accent-hover: #5dffc6;
  --ok-fg: var(--green);
  --select-wash: color-mix(in srgb, var(--green) 14%, transparent);
  --info-fg: #009fff;
  --danger-fg: #ff5288;
  --bar: var(--green);
  --bar-hover: #5dffc6;
  --shell-bg: #161a2c;
  --focus: var(--green);
  color-scheme: dark;
}

/* ── Base ───────────────────────────────────────────────────────────── */
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-weight: 500; font-size: 0.875rem; line-height: 1.5; }
h1, h2, h3, #content h1 { font-family: var(--font-head); color: var(--fg); }
#content h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 8px; }
#content h2 { font-size: 1rem; font-weight: 600; }
code { font-family: var(--font-family-monospace); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.console-sidebar :focus-visible, .console-anon-header :focus-visible, .console-strip :focus-visible { outline-color: var(--green); }

/* ── Shell: amber strip, ink sidebar, content beside it ─────────────── */
.console-strip { display: flex; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; background: var(--amber); color: var(--ink); font-weight: 700; font-size: 0.6875rem; letter-spacing: 0.08em; padding: 0 16px; min-height: var(--strip-h); align-items: center; box-sizing: border-box; }
.console-strip span:last-child { font-weight: 600; letter-spacing: 0.02em; }
/* Admin's base.css pins both to the window; the page must grow instead. */
html, body { height: auto; min-height: 100%; }
#container { display: grid; grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: auto 1fr auto; min-width: 0; height: auto; min-height: 100vh; }
.console-strip { grid-column: 1 / -1; }
/* The aside paints the whole ink column, however long the page; what is
   inside it is one screen tall and sticks, so the foot (Log out) is always
   in view. */
.console-sidebar { grid-column: 1; grid-row: 2 / span 2; align-self: stretch; position: static; height: auto; overflow: visible; box-sizing: border-box; background: var(--shell-bg); color: var(--shell-fg); border-right: 1px solid var(--shell-line); }
.console-sidebar-sticky { position: sticky; top: 0; height: calc(100vh - var(--strip-h)); box-sizing: border-box; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 16px 12px; }
#container > .main { grid-column: 2; min-width: 0; }
#footer { grid-column: 2; }
.main > .content { max-width: 1280px; min-width: 0; }
#content { padding: 24px 32px 48px; }

.console-brand { display: flex; flex-direction: column; gap: 4px; padding: 4px 8px 16px; text-decoration: none; color: var(--shell-fg); }
.console-brand img { display: block; width: 147px; height: auto; }
.console-brand small { font-size: 0.6875rem; color: var(--shell-fg-soft); letter-spacing: 0.04em; }

.console-nav ul { list-style: none; margin: 0; padding: 0; }
.console-nav li { list-style: none; padding: 0; margin: 0 0 2px; }
.console-nav a:link, .console-nav a:visited { display: block; padding: 7px 10px; border-radius: var(--radius-btn); color: var(--shell-fg); text-decoration: none; }
.console-nav a:hover, .console-nav a:focus-visible { background: var(--shell-hover); color: var(--shell-fg); }
.console-nav a.current:link, .console-nav a.current:visited { background: var(--green); color: var(--ink); font-weight: 700; }
.console-nav-group { margin: 0; padding: 14px 10px 4px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--shell-fg-soft); }

/* Admin's #user-tools floats right, uppercases and tracks; not here. */
#user-tools.console-me { float: none; margin: auto 0 0; padding: 12px 10px 0; text-align: left; text-transform: none; letter-spacing: normal; line-height: 1.4; }
#user-tools #logout-form button { text-transform: none; letter-spacing: normal; }
.console-me { margin-top: auto; border-top: 1px solid var(--shell-line); padding: 12px 10px 0; font-size: 0.75rem; color: var(--shell-fg-soft); display: flex; flex-direction: column; gap: 2px; }
.console-me-name { color: var(--shell-fg); font-weight: 600; overflow-wrap: anywhere; }
.console-roles { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 0; padding: 0; }
.console-roles li { list-style: none; margin: 0; border: 1px solid var(--shell-line); border-radius: 999px; padding: 0 7px; font-size: 0.65rem; }
.console-me-actions { display: flex; gap: 8px; margin-top: 10px; }
#logout-form { display: flex; flex: 1; margin: 0; }
.console-theme-toggle, #logout-form button { flex: 1; font: inherit; font-size: 0.75rem; cursor: pointer; padding: 6px; border-radius: var(--radius-btn); border: 1px solid var(--shell-line); background: transparent; color: var(--shell-fg); text-decoration: none; }
.console-theme-toggle:hover, #logout-form button:hover { background: var(--shell-hover); }

/* Signed out: strip, a brand bar, then one centred card. */
.console-anon #container { display: block; }
.console-anon-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; background: var(--shell-bg); color: var(--shell-fg); }
.console-anon-header .console-brand { padding: 0; }
.console-anon-header > .console-theme-toggle { flex: none; padding: 6px 12px; }
.console-anon-header .console-me { margin: 0; padding: 0; border: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
.console-anon-header .console-me-actions { margin: 0; }
.console-anon .main > .content { max-width: 600px; margin: 32px auto; flex: none; width: calc(100% - 32px); }
.console-anon #content { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 24px 28px; }
.console-anon .form-row { padding: 8px 0; border: 0; }
.console-anon .form-row label { display: block; font-weight: 600; margin-bottom: 4px; }
.console-anon .form-row input:not([type=submit]) { width: 100%; box-sizing: border-box; }
.console-anon #content-main { float: none; }

/* ── Links: ink text, green underline (the app's link pattern) ──────── */
#content a:link, #content a:visited { color: var(--fg); text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 3px; }
#content a:hover { text-decoration-thickness: 4px; }
#content thead a:link, #content thead a:visited,
#content a.button:link, #content a.button:visited,
#content .object-tools a:link, #content .object-tools a:visited { text-decoration: none; }
#content .object-tools a:link, #content .object-tools a:visited, #content .object-tools a:hover { color: var(--on-accent); }

/* ── Cards, tiles, facts ────────────────────────────────────────────── */
.panel, .tile, #changelist-filter { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); }
.panel { padding: 14px 16px; margin-bottom: 16px; min-width: 0; }
#content .panel h2 { margin: 0 0 10px; font-size: 0.95rem; background: none; color: var(--fg); padding: 0; text-transform: none; letter-spacing: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { padding: 12px 14px; }
.tile .label { color: var(--muted); font-size: 0.75rem; }
.tile .figure { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; margin: 2px 0; font-variant-numeric: tabular-nums; color: var(--fg); }
dl.facts { display: grid; grid-template-columns: 220px 1fr; gap: 7px 12px; margin: 0; }
dl.facts dt, dl.facts dd { margin: 0; padding: 0; font-size: 0.875rem; line-height: 1.5; }
dl.facts dt { color: var(--muted); font-weight: 500; }
.muted, .console-help { color: var(--muted); }
.console-help { font-size: 0.75rem; margin: 4px 0 0; }
.reason { width: 100%; max-width: 640px; }
.vTextField { max-width: 100%; box-sizing: border-box; }
.results { overflow-x: auto; }
.stripe-link::after { content: " \2197"; }
.ext-links a { margin-right: 16px; }

/* ── Status pills: the app's pattern, always with their text ────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; line-height: 1.5; white-space: nowrap; vertical-align: baseline; color: var(--pill-fg, var(--fg)); background: var(--pill-bg, var(--raised)); box-shadow: var(--pill-line, none); }
.pill::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--pill-dot, currentColor); }
.pill-ok { --pill-fg: var(--ok-fg); --pill-bg: var(--select-wash); }
.pill-info { --pill-fg: var(--fg); --pill-dot: var(--info-fg); --pill-bg: var(--info-bg); }
.pill-warn { --pill-fg: var(--warn-fg); --pill-bg: var(--warn-bg); --pill-line: inset 0 0 0 1px var(--warn-fg); }
.pill-neutral { --pill-fg: var(--fg-soft); --pill-dot: var(--muted); --pill-bg: var(--raised); }
@media (forced-colors: active) { .pill { border: 1px solid CanvasText; } }

/* ── Notices: copy in --fg, the colour is the stripe ────────────────── */
.flag, .notice { display: block; padding: 10px 14px; border-radius: var(--radius-card); margin: 0 0 16px; color: var(--fg); border-left: 4px solid; }
.flag { background: var(--danger-bg); border-left-color: var(--danger-accent); }
.notice { background: var(--info-bg); border-left-color: var(--info-fg); }
.errornote { color: var(--fg); background: var(--danger-bg); border: 0; border-left: 4px solid var(--danger-accent); border-radius: var(--radius-btn); }
ul.errorlist, ul.errorlist li { color: var(--danger-fg); background: transparent; border: 0; }
ul.messagelist li { color: var(--fg); border-radius: var(--radius-btn); }

/* ── Charts ─────────────────────────────────────────────────────────── */
.chart { width: 100%; max-width: 640px; height: auto; display: block; margin-top: 12px; }
.chart .bar { fill: var(--bar); }
.chart .bar:hover { fill: var(--bar-hover); }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .line { fill: none; stroke: var(--bar); stroke-width: 2; stroke-linejoin: round; }

/* ── Forms and buttons, console and admin alike ─────────────────────── */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=search], select, textarea { background: var(--card); color: var(--fg); border: 1px solid var(--field-border); border-radius: var(--radius-btn); padding: 6px 8px; font: inherit; }
input[type=submit], input[type=button], .button, a.button, button.button, .submit-row input { background: var(--accent); color: var(--on-accent); border: 0; border-radius: var(--radius-btn); padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer; height: auto; }
input[type=submit]:hover, input[type=button]:hover, .button:hover, a.button:hover, button.button:hover, .submit-row input:hover,
input[type=submit].default:hover, .submit-row input.default:hover { background: var(--accent-hover); color: var(--on-accent); }
input[type=submit].default, .submit-row input.default { background: var(--accent); color: var(--on-accent); }
#content a.button:link, #content a.button:visited { color: var(--on-accent); }
.submit-row { background: transparent; border: 0; padding: 12px 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-start; }
fieldset.module { background: transparent; border: 0; }
.aligned label, .form-row label { color: var(--fg); }
.form-row .console-help, .aligned .console-help { margin: 0; }

/* ── Tables: the console's own and admin's changelists ──────────────── */
#result_list { width: 100%; border-collapse: collapse; background: var(--card); }
#result_list thead th { background: var(--raised); color: var(--muted); font-size: 0.7rem; letter-spacing: 0.04em; border-bottom: 1px solid var(--line-strong); }
#result_list thead th a:link, #result_list thead th a:visited { color: var(--muted); }
#result_list td, #result_list th { border-bottom: 1px solid var(--line); color: var(--fg); vertical-align: middle; }
#result_list tbody tr:hover td, #result_list tbody tr:hover th { background: var(--select-wash); }
#result_list td.num, #result_list th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
#result_list tr.group td { background: var(--raised); color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
#result_list tr.group td span { text-transform: none; font-weight: normal; }
#result_list td.step-indent { padding-left: 24px; }
#result_list td.nowrap { white-space: nowrap; }
.results, #changelist .results { border: 1px solid var(--line); border-radius: var(--radius-card); overflow: auto; background: var(--card); }
#changelist .paginator, .paginator { background: transparent; color: var(--muted); border: 0; }
#changelist-filter { padding-bottom: 8px; }
#changelist-filter h2 { background: none; color: var(--fg); font-family: var(--font-head); text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--line); }
#changelist-filter h3, #changelist-filter details summary { color: var(--muted); }
#changelist-filter a:link, #changelist-filter a:visited { color: var(--fg); text-decoration: none; }
#changelist-filter li.selected a:link, #changelist-filter li.selected a:visited { color: var(--fg); font-weight: 700; }
#changelist-filter li.selected { border-left-color: var(--green); }
.object-tools a:link, .object-tools a:visited { background: var(--accent); color: var(--on-accent); border-radius: var(--radius-btn); }
.object-tools a:hover { background: var(--accent-hover); }
.module h2, .module caption, .inline-group h2 { background: var(--raised); color: var(--fg); }
#changelist.module, #changelist .changelist-form-container { background: transparent; }
.change-list .filtered { min-height: 0; }

/* Admin-style forms on console pages that do not load admin's forms.css:
   label above field, help under it. */
fieldset.module.aligned { margin: 0 0 8px; padding: 0; }
.aligned .form-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 0; border-bottom: 0; }
.aligned .form-row > label { font-weight: 600; }
.aligned .form-row input[type=text], .aligned .form-row input[type=email], .aligned .form-row select { min-width: min(100%, 360px); }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row label { font-weight: 600; }

/* ── Sign-up pages (app#659) ────────────────────────────────────────── */
.subtabs, .page-links { margin: -4px 0 16px; font-size: 0.85rem; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.filters label { display: inline; }
.radio-row { margin-top: 10px; font-size: 0.85rem; }
.radio-row label { margin-right: 12px; white-space: nowrap; }
.radio-row input { margin: 0 4px 0 0; vertical-align: middle; }
ol.timeline { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
ol.timeline li { display: grid; grid-template-columns: 220px 1fr; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); list-style: none; }
ol.timeline li > span:last-child { color: var(--muted); }
.contact-form textarea { width: 100%; max-width: 640px; box-sizing: border-box; }

/* ── Operator views: the counsellor list and the activity feed (app#978) ── */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lede { margin: 0 0 16px; }
.roster-filters, .feed-filters { margin: 0 0 12px; gap: 8px; }
.roster-filters input[type=search] { width: 280px; max-width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li { list-style: none; margin: 0; padding: 0; }
#content a.chip:link, #content a.chip:visited { display: inline-block; font-size: 0.8rem; line-height: 1.4; padding: 4px 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); color: var(--fg); text-decoration: none; }
#content a.chip:hover { border-color: var(--fg); }
#content a.chip.on:link, #content a.chip.on:visited { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.filters .count { margin-left: auto; color: var(--muted); font-size: 0.8rem; }
#result_list.roster thead th a.sorted::after { content: " \2193"; }
#result_list.roster td { padding-top: 9px; padding-bottom: 9px; }
#result_list.roster td.who { min-width: 180px; }
#result_list.roster .nm { display: block; font-weight: 700; color: var(--fg); }
#result_list.roster .em { display: block; color: var(--muted); font-size: 0.75rem; overflow-wrap: anywhere; }
#result_list.roster td .pill + .pill { margin-left: 4px; }
.acct { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
/* The whole row opens the summary: the name's link is stretched over it. */
#result_list.roster tr.linked { position: relative; }
#result_list.roster tr.linked td { cursor: pointer; }
#content #result_list.roster a.row-link:link, #content #result_list.roster a.row-link:visited { color: var(--fg); text-decoration: none; }
#result_list.roster a.row-link::after { content: ""; position: absolute; inset: 0; }
#result_list.roster a.row-link:focus-visible { outline: none; }
#result_list.roster tr.linked:focus-within td { box-shadow: inset 0 2px 0 var(--focus), inset 0 -2px 0 var(--focus); }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin: 12px 0; color: var(--muted); font-size: 0.85rem; }
.pager > span:last-child { text-align: right; }
.feed-panel { padding-top: 4px; }
.results + .console-help, .pager + .console-help { margin-top: 12px; }
#content .feed-panel h2.day { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0; padding: 14px 0 6px; border-bottom: 1px solid var(--line-strong); }
ul.feed { list-style: none; margin: 0; padding: 0; }
ul.feed li { list-style: none; display: grid; grid-template-columns: 48px 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; }
ul.feed li:last-child { border-bottom: 0; }
ul.feed .t { color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
ul.feed .ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; background: var(--raised); color: var(--fg); }
ul.feed .feed-warn .ic { background: var(--danger-bg); color: var(--danger-fg); }
ul.feed .who { font-weight: 700; }
#content ul.feed a.who:link, #content ul.feed a.who:visited { color: var(--fg); text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 3px; }
ul.feed .what .acct { margin-left: 4px; }
ul.feed .meta { color: var(--muted); font-size: 0.8rem; text-align: right; }
ul.feed li.feed-empty { display: block; padding: 14px 0; }

/* ── The Overview and the summary (app#978 part 4) ──────────────────── */
/* Finance's tile: dashed, like the mock, because only Finance sees it. */
.tile.tile-fin { border-style: dashed; border-color: var(--line-strong); }
#content .panel h2.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
#content .panel h2.panel-head a { font-size: 0.8rem; font-weight: 500; }
#content .panel h2.panel-gap { margin-top: 18px; }
#content .panel h3.day { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: none; margin: 0; padding: 10px 0 4px; border-bottom: 1px solid var(--line-strong); }
#content .panel h3.day:first-of-type { padding-top: 0; }
.funnel { display: grid; gap: 8px; margin: 4px 0 10px; }
.funnel-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 76px; align-items: center; gap: 10px; font-size: 0.85rem; }
.funnel .track { height: 14px; background: var(--raised); border-radius: 4px; overflow: hidden; }
.funnel .fill { display: block; height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; }
.funnel .v { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.funnel .v b { color: var(--fg); margin-right: 4px; }
.grid2.grid-top { align-items: start; }
.stack { min-width: 0; }
.audit-foot { margin: 4px 0 16px; color: var(--muted); font-size: 0.8rem; }

/* ── Narrow screens ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  #container { grid-template-columns: minmax(0, 1fr); }
  .console-sidebar { grid-column: 1; grid-row: auto; }
  .console-sidebar-sticky { position: static; height: auto; overflow: visible; }
  #container > .main, #footer { grid-column: 1; }
  .console-nav ul { display: flex; flex-wrap: wrap; gap: 2px; }
  #content { padding: 16px; }
}
@media (max-width: 767px) {
  dl.facts { grid-template-columns: 120px 1fr; }
  dl.facts dd { overflow-wrap: anywhere; }
  ol.timeline li { grid-template-columns: 150px 1fr; }
  ul.feed li { grid-template-columns: 44px 24px minmax(0, 1fr); }
  ul.feed .meta { grid-column: 3; text-align: left; }
}
