/* Atrium console.
 *
 * Restrained neutrals, deep navy text, one accent used for action and focus only.
 * Borders instead of shadows. Density without noise. No gradients, no emoji.
 */

/* ---------- tokens ---------- */
:root {
  --ink-900:#030f1a; --ink-700:#082e4d; --ink-500:#3d5566;
  --ink-400:#64798a; --ink-300:#9cabb8;
  --line-200:#e6ecf0; --line-100:#eef2f5;
  --surface:#ffffff; --surface-sunken:#f8f9fb; --surface-raised:#fafbfc;

  --accent-600:#0e479d; --accent-500:#27468e; --accent-100:#e9f3ff;

  --ok-600:#00996a;   --ok-100:#e6f5ef;
  --warn-600:#b3690f; --warn-100:#fdf3e5;
  --risk-600:#cc2444; --risk-100:#fdeaee;
  --idle-600:#64798a; --idle-100:#f0f3f5;

  --font-sans:"Sora",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --font-mono:"Courier Prime",ui-monospace,"SF Mono",Menlo,monospace;

  --radius:6px; --radius-lg:10px;
  --border:1px solid var(--line-200);
  --shadow-sm:0 1px 2px rgba(3,15,26,.04);
  --sidebar:240px;
}

:root[data-theme="dark"] {
  --ink-900:#eef2f5; --ink-700:#cfdae2; --ink-500:#a4b4c0;
  --ink-400:#8496a4; --ink-300:#64798a;
  --line-200:#1c2b38; --line-100:#16232e;
  --surface:#0b1520; --surface-sunken:#081019; --surface-raised:#101d29;
  --accent-600:#5b9bff; --accent-500:#4a86e8; --accent-100:#12263f;
  --ok-100:#0d2620; --warn-100:#2a1f0f; --risk-100:#2b1218; --idle-100:#16232e;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink-900:#eef2f5; --ink-700:#cfdae2; --ink-500:#a4b4c0;
    --ink-400:#8496a4; --ink-300:#64798a;
    --line-200:#1c2b38; --line-100:#16232e;
    --surface:#0b1520; --surface-sunken:#081019; --surface-raised:#101d29;
    --accent-600:#5b9bff; --accent-500:#4a86e8; --accent-100:#12263f;
    --ok-100:#0d2620; --warn-100:#2a1f0f; --risk-100:#2b1218; --idle-100:#16232e;
  }
}

/* ---------- base ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;font-family:var(--font-sans);font-size:13px;line-height:1.55;
  color:var(--ink-900);background:var(--surface-sunken);
  -webkit-font-smoothing:antialiased;
}
a{color:var(--accent-600);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3{margin:0;font-weight:600;letter-spacing:-.01em}
h1{font-size:20px}h2{font-size:15px}h3{font-size:13px}
code,.mono{font-family:var(--font-mono);font-size:12px}
:focus-visible{outline:2px solid var(--accent-600);outline-offset:2px;border-radius:3px}

/* Icons are inline glyphs, not images. Without a default they stretch to fill
   whatever flex space they land in, which is how a 16px file icon becomes 200px. */
svg{width:16px;height:16px;flex:none;display:block}

/* ---------- layout ----------
 *
 * Mobile first. The base rules describe a phone: one column, nav in a drawer,
 * comfortable touch targets. Wider viewports ADD structure rather than the page
 * being a desktop design squeezed down — which is how the sidebar used to eat a
 * third of a narrow window and leave content unreadable.
 */
.app{min-height:100vh;display:block}

/* Nav is an off-canvas drawer until there is room for a permanent rail. */
.sidebar{
  position:fixed;inset:0 auto 0 0;width:min(82vw,280px);z-index:60;
  background:var(--surface);border-right:var(--border);
  transform:translateX(-100%);transition:transform .22s cubic-bezier(.2,.8,.3,1);
  overscroll-behavior:contain;
}
.drawer-open .sidebar{transform:none}
.sidebar-inner{height:100vh;overflow-y:auto;display:flex;flex-direction:column}

.drawer-backdrop{
  position:fixed;inset:0;z-index:55;background:rgba(3,15,26,.4);
  opacity:0;pointer-events:none;transition:opacity .2s;
}
.drawer-open .drawer-backdrop{opacity:1;pointer-events:auto}

.brand{padding:18px 20px 14px;border-bottom:var(--border)}
.brand-name{font-size:15px;font-weight:600;letter-spacing:-.02em}
.brand-domain{
  font-size:11px;color:var(--ink-400);font-family:var(--font-mono);margin-top:2px;
  overflow-wrap:anywhere;
}
.nav{padding:12px 10px;flex:1}
.nav-group{margin-bottom:18px}
.nav-label{
  font-size:10px;text-transform:uppercase;letter-spacing:.09em;color:var(--ink-400);
  padding:0 10px;margin-bottom:6px;font-weight:600;
}
.nav-item{
  display:flex;align-items:center;gap:10px;padding:10px;border-radius:var(--radius);
  color:var(--ink-500);font-size:14px;cursor:pointer;min-height:44px;
}
.nav-item:hover{background:var(--surface-sunken);color:var(--ink-900);text-decoration:none}
.nav-item.active{background:var(--accent-100);color:var(--accent-600);font-weight:500}
.nav-item svg{width:16px;height:16px;flex:none;stroke-width:1.6}
.nav-count{
  margin-left:auto;font-size:11px;font-family:var(--font-mono);
  background:var(--line-100);color:var(--ink-500);padding:1px 7px;border-radius:20px;
}
.nav-item.active .nav-count{background:var(--surface);color:var(--accent-600)}

.main{display:flex;flex-direction:column;min-width:0}
.topbar{
  display:flex;align-items:center;gap:10px;padding:0 14px;min-height:56px;
  background:var(--surface);border-bottom:var(--border);position:sticky;top:0;z-index:50;
}
.icon-btn{
  display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;
  border:none;background:none;color:var(--ink-500);border-radius:var(--radius);
  cursor:pointer;flex:none;
}
.icon-btn:hover{background:var(--surface-sunken);color:var(--ink-900)}
.icon-btn svg{width:20px;height:20px}
.crumb{font-size:14px;color:var(--ink-400);min-width:0;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.crumb strong{color:var(--ink-900);font-weight:600}
.topbar-right{margin-left:auto;display:flex;align-items:center;gap:8px;flex:none}
/* The identity chip is a nicety; the sign-out control is not. Drop the chip
   before the button on a narrow screen. */
.topbar-right .chip{display:none}
.content{padding:16px;width:100%;min-width:0}

@media (min-width:900px){
  .app{display:grid;grid-template-columns:var(--sidebar) 1fr}
  .sidebar{position:static;width:auto;transform:none;transition:none;inset:auto}
  .sidebar-inner{position:sticky;top:0}
  .drawer-backdrop,.drawer-trigger{display:none}
  .topbar{padding:0 24px;gap:14px}
  .topbar-right .chip{display:inline-flex}
  .content{padding:24px;max-width:1440px}
  .nav-item{font-size:13px;padding:7px 10px;min-height:0}
  .nav-item svg{width:15px;height:15px}
}

/* ---------- primitives ---------- */
.chip{
  display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:500;
  padding:2px 8px;border-radius:20px;background:var(--idle-100);color:var(--idle-600);
  white-space:nowrap;
}
.chip.ok{background:var(--ok-100);color:var(--ok-600)}
.chip.warn{background:var(--warn-100);color:var(--warn-600)}
.chip.risk{background:var(--risk-100);color:var(--risk-600)}
.chip.info{background:var(--accent-100);color:var(--accent-600)}
.chip .dot{width:5px;height:5px;border-radius:50%;background:currentColor}

.btn{
  display:inline-flex;align-items:center;gap:7px;padding:9px 14px;min-height:40px;
  border-radius:var(--radius);
  border:var(--border);background:var(--surface);color:var(--ink-700);
  font-family:inherit;font-size:12.5px;font-weight:500;cursor:pointer;
}
@media (min-width:640px){.btn{padding:6px 13px;min-height:0}}
.btn:hover{background:var(--surface-sunken);text-decoration:none}
.btn.primary{background:var(--accent-600);border-color:var(--accent-600);color:#fff}
.btn.primary:hover{background:var(--accent-500)}
.btn.danger{color:var(--risk-600);border-color:var(--risk-600)}
.btn.danger:hover{background:var(--risk-100)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn svg{width:14px;height:14px;stroke-width:1.7}

.panel{
  background:var(--surface);border:var(--border);border-radius:var(--radius-lg);
  margin-bottom:20px;overflow:hidden;
}
.panel-head{
  display:flex;align-items:flex-start;gap:12px;padding:14px 16px;
  border-bottom:var(--border);flex-wrap:wrap;
}
@media (min-width:640px){.panel-head{align-items:center;padding:14px 18px}}
.panel-title{font-size:13px;font-weight:600}
.panel-sub{font-size:12px;color:var(--ink-400);margin-top:1px}
.panel-actions{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}
.panel-body{padding:16px}
@media (min-width:640px){.panel-body{padding:18px}}
.panel-body.flush{padding:0}

/* ---------- stats ---------- */
.stats{display:grid;grid-template-columns:1fr;gap:12px;margin-bottom:18px}
@media (min-width:560px){
  .stats{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin-bottom:20px}
}
.stat{background:var(--surface);border:var(--border);border-radius:var(--radius-lg);padding:16px 18px}
.stat-label{font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--ink-400);font-weight:600}
.stat-value{font-size:26px;font-weight:600;letter-spacing:-.03em;margin-top:6px;line-height:1.1}
.stat-note{font-size:12px;color:var(--ink-400);margin-top:4px}

/* ---------- tables ---------- */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
tbody td,thead th{white-space:nowrap}
/* The first column carries the identity of the row, so let it wrap and keep the
   rest scannable. */
tbody td:first-child{white-space:normal}
@media (min-width:640px){tbody td:first-child{min-width:180px}}
table{width:100%;border-collapse:collapse;font-size:13px}
thead th{
  text-align:left;font-size:10.5px;text-transform:uppercase;letter-spacing:.07em;
  color:var(--ink-400);font-weight:600;padding:9px 16px;
  border-bottom:var(--border);white-space:nowrap;background:var(--surface-raised);
}
tbody td{padding:12px 16px;border-bottom:1px solid var(--line-100);vertical-align:middle}
tbody tr:last-child td{border-bottom:none}
tbody tr.clickable{cursor:pointer}
tbody tr.clickable:hover{background:var(--surface-sunken)}
td.num{text-align:right;font-family:var(--font-mono)}
.cell-title{font-weight:500;color:var(--ink-900)}
.cell-meta{font-size:11.5px;color:var(--ink-400);margin-top:1px}

/* A cell that may hold a sentence, in a row of cells that hold a word.
 *
 * `nowrap` on every cell keeps a table scannable, and turns one long value into a
 * row wider than the screen — the reason a run is waiting is a whole sentence, and
 * it pushed "Started" and "Last touched" off the right-hand edge.
 *
 * Bounded in width and unbounded in height. Clamping the height instead was the
 * obvious thing and the wrong thing: it cut a sentence mid-clause, so the reader
 * saw "could not be verified because it was not found on the…" and had to hover
 * to learn the rest. A reason that has to be hovered over is a reason nobody
 * reads. The row grows; the columns after it stay where they are. */
td.cell-why{
  white-space:normal;
  min-width:220px;max-width:44ch;
  overflow-wrap:anywhere;
}
@media (min-width:1200px){td.cell-why{max-width:60ch}}
/* Top-aligned, so a tall reason does not float its own date to the middle of the
   row and leave the short rows above and below looking misaligned. */
tbody td{vertical-align:top}

/* ---------- detail pages ---------- */
.detail-head{margin-bottom:20px}
.back{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:var(--ink-400);margin-bottom:10px}
.detail-title{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.detail-title h1{font-size:18px;overflow-wrap:anywhere}
@media (min-width:640px){.detail-title h1{font-size:20px}}
.detail-meta{font-size:12px;color:var(--ink-400);margin-top:5px}
.detail-actions{display:flex;gap:8px;margin-top:14px;flex-wrap:wrap}
/* Grid and flex children default to min-width:auto, which means they refuse to
   shrink below their content. A wide table or textarea then pushes the whole
   column past the viewport and the inner overflow-x never gets a chance. This
   one line is what keeps the page from scrolling sideways. */
.detail-grid{display:grid;grid-template-columns:1fr;gap:16px;align-items:start}
.detail-grid > *{min-width:0}
.panel,.stat,.timeline,.table-wrap{min-width:0;max-width:100%}
textarea,pre,code{max-width:100%}
@media (min-width:1000px){.detail-grid{grid-template-columns:2fr 1fr;gap:20px}}

.kv{display:grid;grid-template-columns:auto 1fr;gap:8px 14px;font-size:12.5px;min-width:0}
.kv dd{overflow-wrap:anywhere}
.kv dt{color:var(--ink-400)}
.kv dd{margin:0;color:var(--ink-900)}

.resource{
  display:flex;align-items:flex-start;gap:10px;padding:11px 0;
  border-bottom:1px solid var(--line-100);font-size:12.5px;
}
.resource > div{flex:1;min-width:0}
.resource svg{color:var(--ink-300);margin-top:1px}
.resource a{font-weight:500}
.resource:last-child{border-bottom:none}
.resource-provider{font-size:11px;color:var(--ink-400)}
.resource-missing{color:var(--ink-400);font-style:italic}

/* ---------- run timeline ---------- */
.timeline{position:relative;padding-left:20px}
.timeline::before{content:"";position:absolute;left:5px;top:6px;bottom:6px;width:1px;background:var(--line-200)}
.tl-step{position:relative;padding:9px 0}
.tl-step::before{
  content:"";position:absolute;left:-19px;top:14px;width:9px;height:9px;border-radius:50%;
  background:var(--surface);border:2px solid var(--ink-300);
}
.tl-step.done::before{border-color:var(--ok-600)}
.tl-step.wait::before{border-color:var(--warn-600)}
.tl-step.failed::before{border-color:var(--risk-600)}
.tl-name{font-weight:500;font-size:12.5px}
.tl-meta{font-size:11.5px;color:var(--ink-400);margin-top:1px}
.tl-reason{
  font-size:12px;color:var(--ink-500);margin-top:5px;padding:7px 10px;
  background:var(--surface-sunken);border-radius:var(--radius);border-left:2px solid var(--line-200);
}

/* ---------- forms ---------- */
.field{margin-bottom:16px}
.field label{display:block;font-size:12px;font-weight:500;margin-bottom:5px}
.field .hint{font-size:11.5px;color:var(--ink-400);margin-bottom:6px;line-height:1.5}
/* Every text-like input, however it was written.
 *
 * This used to list types — [type=text], [type=email], [type=number] — and a bare
 * <input> matches none of them. It defaults to text and behaves like one, so the
 * markup looked right and only some fields were styled: the number inputs had a
 * border and full width while the addresses beside them were browser-default and
 * half as wide. Selecting by exclusion instead means a field added later is
 * styled without anybody remembering to come back here. */
input:not([type=checkbox]):not([type=radio]):not([type=file]),
select,textarea{
  width:100%;padding:10px;border:var(--border);border-radius:var(--radius);
  background:var(--surface);color:var(--ink-900);font-family:inherit;
  /* 16px stops iOS zooming the viewport when a field takes focus. */
  font-size:16px;
}
input:not([type=checkbox]):not([type=radio]):focus,select:focus,textarea:focus{
  outline:none;border-color:var(--accent-600);
  box-shadow:0 0 0 3px var(--accent-100);
}
@media (min-width:640px){
  input:not([type=checkbox]):not([type=radio]):not([type=file]),
  select{padding:7px 10px;font-size:13px}
}
textarea{min-height:90px;resize:vertical;font-family:var(--font-mono);font-size:12px}
.switch{display:flex;align-items:center;gap:9px;cursor:pointer;font-size:13px}
.switch input{width:16px;height:16px;accent-color:var(--accent-600);margin:0;
  flex:none}
.form-grid{display:grid;grid-template-columns:1fr;gap:0}
@media (min-width:640px){
  .form-grid{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:0 24px}
}

/* ---------- empty / loading ---------- */
.empty{padding:44px 24px;text-align:center;color:var(--ink-400)}
.empty-title{font-size:13px;font-weight:500;color:var(--ink-500);margin-bottom:5px}
.empty-body{font-size:12.5px;max-width:420px;margin:0 auto;line-height:1.6}
.skeleton{height:13px;background:var(--line-100);border-radius:3px;animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.45}}

.banner{
  display:flex;align-items:flex-start;gap:11px;padding:12px 16px;border-radius:var(--radius);
  font-size:12.5px;margin-bottom:18px;border:1px solid transparent;line-height:1.55;
}
.banner.risk{background:var(--risk-100);color:var(--risk-600);border-color:currentColor}
.banner.warn{background:var(--warn-100);color:var(--warn-600)}
.banner.info{background:var(--accent-100);color:var(--accent-600)}
.banner svg{width:16px;height:16px;flex:none;margin-top:1px}

/* ---------- sign-in / onboarding ---------- */
.centred{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:24px}
.card{
  background:var(--surface);border:var(--border);border-radius:var(--radius-lg);
  padding:32px;max-width:440px;width:100%;
}
.card h1{margin-bottom:6px}
.card p{color:var(--ink-500);font-size:13px;margin:0 0 22px;line-height:1.6}

.step{display:flex;gap:14px;padding:16px 0;border-bottom:1px solid var(--line-100)}
.step:last-child{border-bottom:none}
.step-num{
  width:22px;height:22px;border-radius:50%;background:var(--line-100);color:var(--ink-500);
  display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;flex:none;
}
.step.done .step-num{background:var(--ok-100);color:var(--ok-600)}
.step-body{flex:1;min-width:0}
.step-title{font-weight:500;font-size:13px}
.step-desc{font-size:12.5px;color:var(--ink-400);margin-top:3px;line-height:1.55}

.scope-list{font-family:var(--font-mono);font-size:11px;color:var(--ink-500);margin-top:6px}
.scope-list span{display:block;padding:1px 0}

/* A value an administrator must transfer into another system: show it in full,
   and give them a button so it cannot be mistyped. */
.copy-row{
  display:flex;align-items:flex-start;gap:8px;margin-top:8px;padding:9px 10px;
  background:var(--surface-sunken);border:var(--border);border-radius:var(--radius);
  flex-wrap:wrap;
}
@media (min-width:560px){.copy-row{align-items:center;flex-wrap:nowrap;gap:10px;padding:7px 10px}}
.copy-label{
  font-size:10.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-400);
  font-weight:600;white-space:nowrap;min-width:88px;
}
.copy-value{
  flex:1 1 100%;min-width:0;font-family:var(--font-mono);font-size:11.5px;
  color:var(--ink-900);overflow-wrap:anywhere;
}
@media (min-width:560px){
  .copy-value{flex:1 1 auto;white-space:nowrap;overflow-x:auto;overflow-wrap:normal}
}
.btn.copy{padding:3px 9px;font-size:11.5px}


/* ---------- modals ----------
   Destructive actions use progressive disclosure: the page shows a button, and
   the input that makes the action possible appears only inside this dialog. */
.modal-backdrop{
  position:fixed;inset:0;z-index:100;background:rgba(3,15,26,.45);
  display:flex;align-items:flex-end;justify-content:center;padding:0;
  animation:fade .12s ease-out;
}
@media (min-width:560px){.modal-backdrop{align-items:center;padding:24px}}
@keyframes fade{from{opacity:0}to{opacity:1}}
.modal{
  background:var(--surface);border-radius:var(--radius-lg) var(--radius-lg) 0 0;
  border:var(--border);max-width:520px;width:100%;
  box-shadow:0 -8px 40px rgba(3,15,26,.22);
  animation:rise .18s cubic-bezier(.2,.8,.3,1);max-height:92vh;
  display:flex;flex-direction:column;
}
@media (min-width:560px){
  .modal{border-radius:var(--radius-lg);max-height:88vh;
         box-shadow:0 16px 48px rgba(3,15,26,.22)}
}
@keyframes rise{from{opacity:0;transform:translateY(8px) scale(.99)}to{opacity:1;transform:none}}
.modal-head{padding:20px 22px 0}
.modal-head h2{font-size:16px;letter-spacing:-.015em}
.modal-body{padding:12px 22px 20px;overflow-y:auto;font-size:13px;line-height:1.6;color:var(--ink-500)}
.modal-body p{margin:0 0 10px}
.modal-body p:last-child{margin-bottom:0}
.modal-body strong{color:var(--ink-900)}
.modal-body code{
  background:var(--surface-sunken);padding:1px 5px;border-radius:3px;color:var(--ink-900);
}
.modal-foot{
  display:flex;justify-content:stretch;gap:9px;padding:14px 18px;
  padding-bottom:max(14px,env(safe-area-inset-bottom));
  border-top:var(--border);background:var(--surface-sunken);
  border-radius:0 0 var(--radius-lg) var(--radius-lg);
}
.modal-foot .btn{flex:1;justify-content:center}
@media (min-width:560px){
  .modal-foot{justify-content:flex-end;padding:14px 22px}
  .modal-foot .btn{flex:0 0 auto}
}
.btn.danger-solid{background:var(--risk-600);border-color:var(--risk-600);color:#fff}
.btn.danger-solid:hover{filter:brightness(1.08)}
.btn.danger-solid:disabled{opacity:.45}

/* A section holding irreversible actions. Set apart so it reads as a place to
   slow down, not another row of settings. */
.danger-zone{border-color:var(--risk-600)}
.danger-zone .panel-head{border-bottom-color:var(--risk-600)}
.danger-zone .panel-title{color:var(--risk-600)}

/* ---------- toasts ---------- */
.toasts{
  position:fixed;bottom:12px;left:12px;right:12px;z-index:110;
  display:flex;flex-direction:column;gap:9px;
}
@media (min-width:560px){
  .toasts{left:auto;bottom:20px;right:20px;max-width:400px}
}
.toast{
  display:flex;align-items:flex-start;gap:10px;padding:11px 14px;
  border-radius:var(--radius);font-size:12.5px;line-height:1.5;
  background:var(--surface);border:var(--border);box-shadow:0 6px 20px rgba(3,15,26,.12);
  animation:slide .18s cubic-bezier(.2,.8,.3,1);
}
.toast.risk{border-left:3px solid var(--risk-600);color:var(--ink-900)}
.toast.risk svg{color:var(--risk-600)}
.toast.ok{border-left:3px solid var(--ok-600)}
.toast.ok svg{color:var(--ok-600)}
.toast.leaving{opacity:0;transform:translateX(8px);transition:.2s ease-in}
@keyframes slide{from{opacity:0;transform:translateX(12px)}to{opacity:1;transform:none}}

/* ---------- audit, grouped by activity ----------
   A flat stream interleaves concurrent meetings and hides the sequence of any
   single one. Each activity is a disclosure, closed by default beyond the first,
   so the page opens as a list of what happened rather than a wall of rows. */
.audit-controls{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  padding:12px 18px;border-bottom:var(--border);background:var(--surface-sunken);
}
.audit-count{font-size:12px;color:var(--ink-400);margin-left:auto}
.audit-group{border-bottom:var(--border)}
.audit-group:last-child{border-bottom:none}
.audit-group > summary{
  display:flex;flex-direction:column;gap:3px;padding:13px 18px;cursor:pointer;
  list-style:none;transition:background .12s ease;
}
.audit-group > summary::-webkit-details-marker{display:none}
.audit-group > summary:hover{background:var(--surface-sunken)}
.audit-group > summary::before{
  content:"";position:absolute;margin-left:-13px;margin-top:6px;
  width:0;height:0;border-left:5px solid var(--ink-400);
  border-top:4px solid transparent;border-bottom:4px solid transparent;
  transition:transform .15s ease;transform-origin:2px 50%;
}
.audit-group[open] > summary::before{transform:rotate(90deg)}
.audit-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px}
.audit-title code{font-size:12px;color:var(--ink-900)}
.audit-meta{font-size:12px;color:var(--ink-400)}
.audit-group .table-wrap{border-top:var(--border)}
.audit-group .table td.ts{white-space:nowrap;color:var(--ink-400)}
@media (min-width:760px){
  .audit-group > summary{flex-direction:row;align-items:baseline;gap:14px}
  .audit-meta{margin-left:auto;text-align:right}
}

/* ---------- ask the record ----------
   One input and a verdict. The citations matter as much as the answer, so they
   are a first-class block rather than small print. */
.ask-row{display:flex;flex-direction:column;gap:9px}
.ask-row input{width:100%}
@media (min-width:560px){
  .ask-row{flex-direction:row;align-items:center}
  .ask-row input{flex:1}
  .ask-row .btn{flex:none}
}
.ask-answer{margin:0;font-size:14px;line-height:1.65;color:var(--ink-900)}
.ask-thinking{margin:0;color:var(--ink-400)}
.ask-cites{margin:0;padding:0;list-style:none}
.ask-cites > li{padding:12px 0;border-bottom:var(--border)}
.ask-cites > li:last-child{border-bottom:none}
.ask-cites blockquote{
  margin:6px 0;padding:6px 0 6px 12px;border-left:2px solid var(--line-200);
  color:var(--ink-500);font-size:13px;line-height:1.6;
}

/* ---------- scope mode ----------
   Two postures, presented as a choice rather than a checkbox, because neither is
   the "off" state of the other. */
.radio-set{display:flex;flex-direction:column;gap:8px;margin:6px 0 8px}
.radio{
  display:flex;align-items:flex-start;gap:9px;font-size:13px;color:var(--ink-700);
  cursor:pointer;min-height:32px;
}
.radio input{margin-top:2px;flex:none;width:16px;height:16px;accent-color:var(--accent-600)}
textarea:disabled,input:disabled{
  background:var(--surface-sunken);color:var(--ink-300);cursor:not-allowed;
}
@media (min-width:760px){.radio-set{flex-direction:row;gap:20px;flex-wrap:wrap}}

/* ---------- the notetaker's browser ----------
   A real Chrome, streamed. Dark ground because a browser's own white fills the
   frame the moment it loads, and a white surround makes the seam invisible —
   a viewer needs to see where Atrium stops and Google starts. */
.nt-screen{
  background:#0b1520;border:var(--border);border-radius:var(--radius);
  min-height:320px;display:flex;align-items:center;justify-content:center;
  overflow:hidden;cursor:default;
}
.nt-screen:focus{outline:2px solid var(--accent-600);outline-offset:2px}
.nt-screen img{max-width:100%;height:auto;display:block;user-select:none;-webkit-user-drag:none}
.nt-waiting{color:var(--ink-300);font-size:13px;padding:40px 20px;text-align:center}

/* ---------- paging ---------- */
.pager{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  flex-wrap:wrap;padding:12px 16px;border-top:var(--border);
  background:var(--surface-raised);
}
.pager-count{font-size:12px;color:var(--ink-400);font-variant-numeric:tabular-nums}
.pager-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pager-size{
  display:flex;align-items:center;gap:6px;font-size:12px;color:var(--ink-500);
}
.pager-size select{
  font-family:inherit;font-size:12px;padding:5px 8px;border:var(--border);
  border-radius:var(--radius);background:var(--surface);color:var(--ink-900);
  min-height:32px;
}
.pager-at{
  font-size:12px;color:var(--ink-500);font-variant-numeric:tabular-nums;
  min-width:52px;text-align:center;
}
.pager .btn{min-height:32px;padding:5px 12px}

/* --- one meeting's log ---
 *
 * A three-column grid rather than a table: the message column has to be free to
 * wrap over several lines while the time and the source stay aligned down the
 * page, which is what makes a long log scannable rather than a wall.
 */
.logtable{display:flex;flex-direction:column}
.logrow{
  display:grid;grid-template-columns:64px 130px 1fr;gap:12px;
  padding:6px 16px;border-top:1px solid var(--line);font-size:12.5px;
  align-items:baseline;
}
.logrow:first-child{border-top:0}
.logrow.warn{background:var(--warn-100)}
.logrow.bad{background:var(--risk-100)}
.logtime{color:var(--ink-400);font-size:11.5px}
.logwhere{color:var(--ink-400);font-size:11.5px;overflow-wrap:anywhere}
.logmsg{overflow-wrap:anywhere;line-height:1.5}
.logdetail{color:var(--ink-400);font-size:11px;margin-top:2px;overflow-wrap:anywhere}

@media (max-width:720px){
  /* The source column is the first thing worth losing on a phone: the message
     already says what happened, and 130px of "the tool endpoint" costs half the
     width the message needs. */
  .logrow{grid-template-columns:56px 1fr}
  .logwhere{display:none}
}
