/* Aiman Support console (plan §4.1): the brand's tokens on the Tailscale shell. Hand-written; no build step.
   Light/dark follows the OS (prefers-color-scheme); the sidebar is always Obsidian. Mobile: the sidebar becomes a top
   bar with a menu link and tables become cards. Nothing animates (the goggle poses are static), so reduced motion
   renders identically. Font references are rewritten to content-hashed names at start (src/static.mjs). */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/static/inter-latin-wght-normal.3100e775e861.woff2) format('woff2'); }
@font-face { font-family: 'PT Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/pt-mono-latin-400-normal.b4e2aee32a61.woff2) format('woff2'); }

:root {
  /* §4.1 tokens */
  --obsidian: #0B0F1A;
  --slate: #1F2937;
  --steel: #475569;
  --blue: #2563FF;
  --blue-light: #4F86FF;
  --ice: #EBEEF7;
  --white: #FFFFFF;
  --mist: #9AA4B8;
  --tint-done-fg: #14632F;
  --tint-done-bg: #E7F6EC;
  --tint-working-fg: #1D4ED8;
  --tint-working-bg: #F2F6FF;
  --tint-needs-you-fg: #8A3D06;
  --tint-needs-you-bg: #FDF1DE;
  --tint-problem-fg: #A61B1B;
  --tint-problem-bg: #FDE8E8;
  /* light theme */
  --page: var(--white);
  --panel: var(--ice);
  --raised: var(--white);
  --text: var(--obsidian);
  --text-2: var(--steel);
  --line: #D3D9E6;
  --link: var(--blue);
  --danger: #A61B1B;
  --green-dot: #1F9D55;
  --grey-dot: #8792A6;
  --mono: 'PT Mono', ui-monospace, Menlo, monospace;
  --sans: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: var(--obsidian);
    --panel: var(--slate);
    --raised: #151B28;
    --text: var(--white);
    --text-2: var(--mist);
    --line: #2C3648;
    --link: var(--blue-light);
    --danger: #FCA5A5;
    --grey-dot: #6B7487;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--page); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
code, kbd, .mono { font-family: var(--mono); font-size: 13px; }
h1 { font-size: 40px; font-weight: 700; line-height: 1.15; margin: 0 0 6px; letter-spacing: -0.01em; }
h2 { font-size: 22px; font-weight: 600; margin: 36px 0 4px; }
h3 { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin: 18px 0 6px; }
p { margin: 0 0 8px; }
svg { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.topbar svg { width: 24px; height: 24px; color: var(--white); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- shell */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--obsidian); color: var(--white); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 10px; }
.brand { display: flex; align-items: center; gap: 8px; padding: 4px 8px 16px; flex-wrap: wrap; }
.brand img { width: 24px; height: 24px; }
.brand-name { font-weight: 600; font-size: 15px; }
.env-pill { border: 1px solid var(--steel); color: var(--mist); border-radius: 999px; padding: 0 8px; font-size: 11px; line-height: 18px; }
/* The organisation switcher (multi-tenant plan §1): the current organisation, its menu a <details>. */
.switcher { margin: 0 0 10px; border: 1px solid var(--slate); border-radius: 6px; }
.switcher > summary { list-style: none; cursor: pointer; display: grid; padding: 6px 10px; }
.switcher > summary::-webkit-details-marker { display: none; }
.switcher-label { color: var(--mist); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.switcher-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher-name::after { content: ' ⌄'; color: var(--mist); }
.sidebar .switcher-list { padding: 0 4px 6px; }
.switcher-list a { display: inline-block; color: var(--white); padding: 5px 6px; border-radius: 6px; font-size: 13px; }
.switcher-list a:hover { background: var(--slate); text-decoration: none; }
.switcher-list a[aria-current="true"] { font-weight: 600; }
.switcher-note { color: var(--mist); font-size: 12px; }
.sidebar nav { flex: 1; }
.sidebar details.nav { margin-bottom: 6px; }
.nav-group { list-style: none; cursor: pointer; color: var(--mist); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 10px 4px; }
.nav-group::-webkit-details-marker { display: none; }
.nav-group::after { content: '⌄'; margin-left: 6px; }
details.nav:not([open]) > .nav-group::after { content: '›'; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; color: var(--white); padding: 7px 10px; border-radius: 6px; border-left: 2px solid transparent; }
.sidebar nav a:hover { background: var(--slate); text-decoration: none; }
.sidebar nav a[aria-current="page"] { background: var(--slate); border-left-color: var(--blue); }
.sidebar svg { width: 18px; height: 18px; flex: none; color: var(--blue-light); }
.sidebar-foot { border-top: 1px solid var(--slate); padding-top: 10px; display: grid; gap: 2px; }
.foot-item { display: flex; align-items: center; gap: 10px; color: var(--white); padding: 6px 10px; border-radius: 6px; font-size: 13px; }
.foot-item:hover { background: var(--slate); text-decoration: none; }
details.foot > summary { list-style: none; cursor: pointer; }
details.foot > summary::-webkit-details-marker { display: none; }
.foot-note { color: var(--mist); font-size: 12px; padding: 2px 10px 8px 38px; }
.foot-note code { color: var(--white); font-size: 12px; }
.user { display: grid; grid-template-columns: 28px 1fr; gap: 0 10px; align-items: center; padding: 10px; }
.avatar { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--slate); color: var(--white); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.user-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 12px; color: var(--mist); }
/* Settings › Members: avatar, name over work e-mail (§4.8). */
.member { display: inline-grid; grid-template-columns: 28px auto; gap: 0 10px; align-items: center; vertical-align: middle; }
.member-name { font-weight: 500; }
.member-email { font-size: 13px; color: var(--text-2); }
.signout { padding: 0 10px 4px; }
.btn-link { background: none; border: 0; color: var(--blue-light); font: inherit; font-size: 13px; padding: 0; cursor: pointer; }
.topbar { display: none; }

.content { min-width: 0; }
.column { max-width: 1120px; margin: 0 auto; padding: 40px 32px 32px; }
.title-line { display: flex; align-items: center; gap: 12px; }
.title-line h1 { margin: 0; }
form.inline { display: inline; margin: 0; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-desc { color: var(--text-2); font-size: 15px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.page-footer { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 13px; }
.breadcrumb { color: var(--text-2); font-size: 13px; margin-bottom: 14px; }
.breadcrumb span { color: var(--text); }

/* ---- banners */
.banner { border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; border: 1px solid transparent; }
.banner-problem { background: var(--tint-problem-bg); color: var(--tint-problem-fg); border-color: #F3B8B8; }
.banner-needs-you { background: var(--tint-needs-you-bg); color: var(--tint-needs-you-fg); border-color: #F2CF9B; }
.banner-plain { background: var(--panel); color: var(--text); border-color: var(--line); }

/* ---- buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--raised); color: var(--text); border-radius: 6px; padding: 6px 12px; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; list-style: none; }
.btn::-webkit-details-marker { display: none; }
.btn:hover { text-decoration: none; border-color: var(--text-2); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn-primary:hover { background: #1D4ED8; border-color: #1D4ED8; }
.btn-danger { background: var(--tint-problem-fg); border-color: var(--tint-problem-fg); color: var(--white); }
.btn-small { padding: 3px 10px; font-size: 13px; }
.btn[disabled], .btn:disabled { opacity: 0.55; cursor: not-allowed; }
.copy { border: 1px solid var(--line); background: var(--raised); color: var(--text); border-radius: 4px; font: inherit; font-size: 12px; padding: 1px 8px; cursor: pointer; margin-left: 6px; }

/* ---- chips, pills, dots, icons */
.chip { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 500; line-height: 18px; border: 1px solid transparent; white-space: nowrap; }
.chip-problem { color: var(--tint-problem-fg); background: var(--tint-problem-bg); }
.chip-needs-you { color: var(--tint-needs-you-fg); background: var(--tint-needs-you-bg); }
.chip-working { color: var(--tint-working-fg); background: var(--tint-working-bg); }
.chip-done { color: var(--tint-done-fg); background: var(--tint-done-bg); }
.chip-plain { color: var(--text-2); background: transparent; border-color: var(--line); }
.pill { display: inline-block; border-radius: 4px; padding: 0 6px; font-size: 11px; font-weight: 500; line-height: 18px; margin: 2px 4px 0 0; }
.pill-filled { color: var(--tint-working-fg); background: var(--tint-working-bg); }
.pill-outline { color: var(--text-2); border: 1px solid var(--line); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot-green { background: var(--green-dot); }
.dot-grey { background: var(--grey-dot); }
.update-icon { display: inline-flex; vertical-align: -3px; margin-right: 4px; }
.update-icon svg { width: 16px; height: 16px; }
.update-red { color: var(--tint-problem-fg); }
.update-grey { color: var(--text-2); }
@media (prefers-color-scheme: dark) { .update-red { color: #FCA5A5; } }
.pose { border-radius: 6px; vertical-align: middle; flex: none; }
.pose-dim { opacity: 0.45; filter: grayscale(1); }
@media (prefers-color-scheme: dark) { .pose { box-shadow: 0 0 0 1px var(--line); } }
.meta-note { color: var(--text-2); font-size: 12px; }
.truncate { display: inline-block; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* ---- toolbar, filters, counts */
.toolbar { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; flex-wrap: wrap; }
.search { flex: 1; min-width: 220px; position: relative; }
.search svg { position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; color: var(--text-2); }
.search input { width: 100%; padding: 7px 10px 7px 34px; border: 1px solid var(--line); border-radius: 6px; background: var(--raised); color: var(--text); font: inherit; }
details.filters { position: relative; }
.filters-panel { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; width: 280px; background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 12px; box-shadow: 0 8px 24px rgba(11, 15, 26, 0.18); display: grid; gap: 8px; }
.filters-panel label { display: grid; gap: 2px; font-size: 12px; color: var(--text-2); font-weight: 500; }
.filters-panel select, .field input, .field select { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: var(--raised); color: var(--text); font: inherit; }
.applied { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.filter-chip { display: inline-flex; gap: 6px; align-items: center; background: var(--panel); color: var(--text); border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.filter-chip:hover { text-decoration: none; outline: 1px solid var(--line); }
.count-strip { display: flex; gap: 10px; align-items: center; color: var(--text-2); font-size: 13px; margin: 6px 0 14px; flex-wrap: wrap; }
.count { background: var(--panel); color: var(--text); border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 500; }

/* ---- list tables (Tailscale: uppercase heads, thin dividers, no zebra) */
/* Board (kanban plan §7.5): one section per worker, its counts strip and its open requests as a compact list. */
.board-box { margin-top: 28px; }
.board-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.board-head h2 { margin: 0; font-size: 18px; }
.board-reported { color: var(--text-2); font-size: 13px; }
.board-late { font-style: italic; }
details.board-old > summary { cursor: pointer; color: var(--text-2); font-size: 13px; margin: 6px 0 10px; }
.board-partial, .board-none { color: var(--text-2); font-size: 13px; }
.board-none { margin-top: 28px; }
em.untitled { color: var(--text-2); }
table.list td[data-label="Time"] { white-space: nowrap; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.list td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr.group th { background: var(--panel); text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); }
table.list tr.track-row { background: color-mix(in srgb, var(--panel) 55%, transparent); }
.cell-main { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.cell-sub { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.cell-actions { white-space: nowrap; text-align: right; width: 1%; }
.cell-actions .meta-note { display: block; white-space: normal; max-width: 16ch; margin: 4px 0 0 auto; text-align: right; }
table.list td[data-label="Machine"] > div:first-child, table.list td[data-label="Version"] > div:first-child, table.list td[data-label="Last seen"] { white-space: nowrap; }
.state-line { display: flex; align-items: center; gap: 6px; }
.row-details { visibility: hidden; margin-right: 6px; font-size: 13px; }
table.list tr:hover .row-details, table.list tr:focus-within .row-details { visibility: visible; }
details.fleet > summary { cursor: pointer; color: var(--link); }
details.fleet ul { margin: 4px 0 0; padding-left: 16px; }

/* ---- "…" menus (keyboard-reachable without script: <details>) */
details.menu { position: relative; display: inline-block; }
details.menu > summary { list-style: none; cursor: pointer; border-radius: 6px; padding: 2px 8px; font-weight: 700; letter-spacing: 1px; color: var(--text-2); }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary:hover { background: var(--panel); }
details.menu-primary > summary.btn { color: var(--white); letter-spacing: 0; padding: 6px 12px; }
details.menu-primary > summary.btn:hover { background: #1D4ED8; }
.menu-list { position: absolute; z-index: 10; right: 0; top: calc(100% + 4px); min-width: 240px; background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 6px; box-shadow: 0 8px 24px rgba(11, 15, 26, 0.18); text-align: left; display: grid; gap: 2px; }
.menu-list form { margin: 0; }
.menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); font: inherit; padding: 6px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.menu-item:hover { background: var(--panel); text-decoration: none; }
.menu-item.danger { color: var(--danger); }
.menu-item:disabled { opacity: 0.5; cursor: not-allowed; }
.menu-value { padding: 4px 10px 6px; font-size: 12px; color: var(--text-2); white-space: normal; word-break: break-all; }
.menu-value code { color: var(--text); font-size: 12px; }
.menu-sep { border-top: 1px solid var(--line); margin: 4px 0; }

/* ---- empty states, panels, sections, meta row */
.empty { border: 1px solid var(--line); border-radius: 10px; padding: 36px 20px; text-align: center; color: var(--text-2); }
.empty p { margin: 0; }
.box { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.section-desc { color: var(--text-2); margin-bottom: 10px; }
.meta-row { display: flex; gap: 32px; flex-wrap: wrap; margin: 4px 0 20px; }
.meta { display: grid; gap: 4px; }
.meta-label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.panel { border: 1px solid var(--line); border-radius: 10px; }
.panel-two { display: grid; grid-template-columns: 1fr 1fr; }
.panel-two > div { padding: 6px 18px 14px; min-width: 0; }
.panel-two > div + div { border-left: 1px solid var(--line); }
dl.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 6px 12px; margin: 8px 0; }
dl.kv dt { color: var(--text-2); }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.panel-note { color: var(--text-2); text-align: center; padding: 28px 8px; }
.card { background: var(--panel); border-radius: 10px; padding: 14px 16px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.command { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---- onboarding card */
details.onboarding { margin-top: 24px; background: var(--panel); border-radius: 10px; padding: 14px 18px; }
details.onboarding > summary { cursor: pointer; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.tile { background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.tile strong { display: block; margin-bottom: 2px; }

/* ---- forms and dialogs */
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--raised); color: var(--text); width: min(520px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(11, 15, 26, 0.55); }
.dialog-card { border: 1px solid var(--line); border-radius: 12px; background: var(--raised); max-width: 560px; }
.dialog-body { padding: 20px 22px; }
.dialog-body h1, .dialog-body h2 { font-size: 22px; margin: 0 0 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--line); }
.field { display: grid; gap: 4px; margin-bottom: 14px; }
.field label { font-weight: 500; }
.field-hint { color: var(--text-2); font-size: 12px; }
.field-error { color: var(--danger); font-size: 13px; margin: 0; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
input[role="switch"] { appearance: none; width: 30px; height: 16px; border-radius: 999px; background: var(--line); position: relative; vertical-align: -3px; margin: 0 4px 0 0; }
input[role="switch"]::after { content: ''; position: absolute; width: 12px; height: 12px; top: 2px; left: 2px; border-radius: 50%; background: var(--white); }
input[role="switch"]:checked { background: var(--blue); }
input[role="switch"]:checked::after { left: 16px; }
.secret { display: block; background: var(--panel); padding: 10px 12px; border-radius: 6px; font-size: 14px; word-break: break-all; margin: 8px 0; }

/* ---- audit log */
.audit { border: 1px solid var(--line); border-radius: 10px; }
.audit-head, details.audit-row > summary { display: grid; grid-template-columns: 24px 1.4fr 1fr 1fr 1fr; gap: 10px; padding: 10px 12px; align-items: baseline; }
.audit-head { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); border-bottom: 1px solid var(--line); }
.audit-list { list-style: none; margin: 0; padding: 0; }
.audit-list li + li { border-top: 1px solid var(--line); }
details.audit-row > summary { list-style: none; cursor: pointer; }
details.audit-row > summary::-webkit-details-marker { display: none; }
details.audit-row > summary::before { content: '›'; color: var(--text-2); }
details.audit-row[open] > summary::before { content: '⌄'; }
.audit-meta { padding: 0 12px 12px 46px; }
.audit-action { font-weight: 500; }
.pager { margin-top: 12px; }

/* ---- settings rows */
.settings { border: 1px solid var(--line); border-radius: 10px; }
.setting { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 14px 18px; align-items: center; }
.setting + .setting { border-top: 1px solid var(--line); }
.setting-desc { color: var(--text-2); font-size: 13px; }
.setting-value { text-align: right; }
.settings dl.kv { margin: 0; padding: 14px 18px; }

/* ---- sign-in */
body.signin { background: var(--obsidian); color: var(--white); min-height: 100vh; display: grid; place-items: center; }
.signin-card { text-align: center; max-width: 420px; padding: 32px; }
.signin-card img { width: 48px; height: 48px; }
.signin-card h1 { margin: 16px 0 24px; }
.signin-card p { color: var(--mist); margin-top: 18px; }
.signin-card .error { color: #FCA5A5; }
/* The switcher's page (/orgs) and the way out of a page in the sign-in frame. */
.org-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; text-align: left; }
.org-list a { display: block; border: 1px solid var(--steel); border-radius: 8px; padding: 10px 14px; color: var(--white); font-weight: 500; }
.org-list a:hover { background: var(--slate); text-decoration: none; }
.org-note { display: block; color: var(--mist); font-size: 12px; font-weight: 400; }
.signin-card .signout { padding: 0; margin-top: 18px; }
/* The release publishing page (the platform's, in the sign-in frame): its form reads left to right. */
.signin-card form.publish { text-align: left; margin-top: 18px; }
.signin-card form.publish input[type="file"] { color: var(--white); max-width: 100%; }
.signin-card p code { overflow-wrap: anywhere; }
/* The public privacy policy and terms (src/legal.mjs): the sign-in frame, wider and left-aligned for reading; and the links
   to both in the sign-in page's footer. */
body.legal { place-items: start center; }
.legal-card { width: 100%; max-width: 720px; padding: 40px 24px 56px; line-height: 1.6; }
.legal-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); font-weight: 600; }
.legal-brand:hover { text-decoration: none; }
.legal-text h1 { margin: 28px 0 8px; }
.legal-text h2 { font-size: 18px; margin: 28px 0 4px; }
.legal-text p, .legal-text li { color: var(--ice); margin: 10px 0; }
.legal-text ul { padding-left: 20px; }
.legal-text a, .legal-links a { color: var(--blue-light); }
.legal-links { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--steel); color: var(--mist); font-size: 13px; }
.signin-card .legal-links { margin-top: 24px; padding-top: 0; border-top: 0; }

/* ---- mobile: top bar + menu link, tables collapse to cards */
@media (max-width: 760px) {
  .shell { display: block; }
  .topbar { display: flex; align-items: center; justify-content: space-between; background: var(--obsidian); color: var(--white); padding: 10px 14px; position: sticky; top: 0; z-index: 20; }
  .topbar a { color: var(--white); }
  .sidebar { display: none; position: fixed; inset: 0; height: auto; z-index: 30; }
  .sidebar:target { display: flex; }
  .sidebar .menu-close { display: block; }
  .column { padding: 24px 16px; }
  h1 { font-size: 30px; }
  .page-header { flex-direction: column; }
  .panel-two, .cards, .tiles { grid-template-columns: 1fr; }
  .panel-two > div + div { border-left: 0; border-top: 1px solid var(--line); }
  table.list thead { display: none; }
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 6px 4px; }
  table.list td { border: 0; padding: 6px 10px; }
  table.list tr.group { border: 0; padding: 0; margin: 14px 0 6px; }
  table.list tr.group th { display: block; background: none; padding: 0; }
  table.list td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
  .cell-actions { text-align: left; }
  .row-details { visibility: visible; }
  .audit-head { display: none; }
  details.audit-row > summary { grid-template-columns: 16px 1fr; }
  .setting { grid-template-columns: 1fr; }
  .setting-value { text-align: left; }
}
.menu-close { display: none; color: var(--mist); padding: 4px 10px; }

/* ---- the credential pool as a matrix (credpool matrix plan §7): rows are boxes, columns accounts, a cell one box's token.
   The table scrolls sideways inside its wrapper; a cell's "…" menu opens in place (inside a scrolling box an absolute
   menu would be clipped). The active cell (a box using that token now) is highlighted by .cell-active, never a style. */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table.matrix { border-collapse: collapse; min-width: 100%; }
table.matrix th, table.matrix td { border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); padding: 10px 12px; vertical-align: top; text-align: left; min-width: 150px; }
table.matrix th:first-child { border-left: 0; }
table.matrix thead th { font-weight: 500; background: var(--panel); }
table.matrix tbody tr:last-child > * { border-bottom: 0; }
table.matrix .matrix-corner { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); vertical-align: bottom; min-width: 200px; }
table.matrix .matrix-row { font-weight: 500; min-width: 200px; }
.head-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
table.matrix .chip { margin: 4px 0 2px; }
table.matrix details.menu { display: block; }
table.matrix .head-line details.menu { display: inline-block; }
table.matrix .menu-list { position: static; min-width: 0; box-shadow: none; margin-top: 4px; }
td.cell-active { background: var(--tint-working-bg); box-shadow: inset 3px 0 0 var(--tint-working-fg); }
td.cell-active .chip { background: var(--raised); border-color: var(--tint-working-fg); }
/* Fill this column: one bordered group per box. */
.fill-row { border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px 2px; margin: 0 0 12px; }
.fill-row legend { font-weight: 600; padding: 0 4px; }
.cell-none { color: var(--text-2); font-size: 13px; }
td.cell-gone, td.cell-note { color: var(--text-2); }
tr.row-removed > * { color: var(--text-2); }
tr.row-removed a { color: var(--text-2); }

/* ---- usage visibility (usage-visibility plan v2 §3.5, §4.4): inline SVG charts and usage bars, drawn by class. A gap in a
   line is a missing point; the peak series sits faint behind the average. */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 24px; margin-bottom: 12px; }
figure.chart { margin: 0; }
figure.chart figcaption { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
svg.chart-svg { display: block; width: 100%; height: 96px; background: var(--raised); border: 1px solid var(--line); border-radius: 6px; }
.chart-grid { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-avg { fill: none; stroke: var(--blue); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-peak { fill: none; stroke: var(--mist); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-bar { fill: var(--blue); }
.usage-shared { color: var(--text-2); font-size: 13px; }
.usage-window { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.usage-label { min-width: 6.5em; color: var(--text-2); }
.usage-reset { margin: 0 0 6px; }
svg.meter { width: 80px; height: 6px; }
.meter-track { fill: var(--line); }
.meter-fill { fill: var(--blue); }
.meter-needs-you .meter-fill { fill: var(--tint-needs-you-fg); }
.meter-problem .meter-fill { fill: var(--tint-problem-fg); }
@media (prefers-color-scheme: dark) {
  .meter-needs-you .meter-fill { fill: #F5A524; }
  .meter-problem .meter-fill { fill: var(--danger); }
}
tr.usage-agent td:first-child { padding-left: 24px; }
.column-usage { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); font-weight: 400; }
.column-usage .usage-label { min-width: 4em; }
.usage-pills { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
