/* AIN-DT shared stylesheet (option B "Calm"). Used by: docs site, run dashboards/reports, runs index, console.
   Needs: <link rel="stylesheet" href=".../ain-dt.css"> and (optional) <script src=".../ain-dt-theme.js"></script> in <head>.
   Fonts load from fonts/ next to this file; no external URLs. Dark mode follows the OS unless <html data-theme="light|dark"> is set.

   COMPONENT CONTRACT (copy markup verbatim)
   Top bar (every page; the PUBLIC build omits the Console <a>; mark the current tab with aria-current="page"):
     <header class="topbar">
       <a class="brand" href="HOME"><svg class="ico logo" viewBox="0 0 22 22" aria-hidden="true"><rect x="2" y="2" width="7" height="7" rx="2"/><rect x="13" y="13" width="7" height="7" rx="2"/><path d="M9 5.5h4.5a2 2 0 0 1 2 2V13"/><path d="M5.5 9v4.5a2 2 0 0 0 2 2H13" stroke-dasharray="2 2"/></svg><span>AIN-DT</span></a>
       <nav class="tabs" aria-label="Sections"><a href="DOCS">Docs</a><a href="RUNS" aria-current="page">Runs</a>[local-only Console tab, see the spec]</nav>
       <div class="search" role="search">SEARCH-INPUT-OR-LINK-HERE</div>
       <button class="theme-toggle" type="button" data-theme-toggle aria-label="Switch light/dark theme"><svg class="ico" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="8.5"/><path d="M12 3.5a8.5 8.5 0 0 1 0 17z" fill="currentColor"/></svg></button>
     </header>
     Optional: <nav class="crumbs"><a>Runs</a> / ...</nav>, then <main class="page"> (max 1240px, grid, 24px gap; 16px gutter at phone width).
   Layout:      .page  .crumbs  .section-title (rule line after text)  .fine (small muted text)  .ref (small "reference" line for codes)
                .scroll (overflow-x wrapper for wide tables)  .cols (2-col grid)  .stack-gap
   Panels:      .panel (card)  .panel.flush  .hero (dark navy panel; children use .muted, .lead; optional <svg class="pat">)
                .note-schem (small note under schematic visuals)
   Buttons:     .btn (secondary)  .btn.primary (ink black); a.btn also works; bare select/input[type=text|search]/textarea are styled to match
   Links:       plain <a> is blue; .quiet-link = muted, no underline
   Severity:    .pill.low|.medium|.high|.critical|.invalid  (+ .ok = low colours, .lost = critical colours, both without dot); a dot is added automatically
                .band-badge.low|.medium|.high|.critical|.invalid (solid, for hero)  .dot.low|.medium|.high|.critical (bare dot)
   Status:      .chip (+ .ok .warn .bad .idle), optional leading <svg class="ico">
   Tables:      plain <table>; numeric cells <td class="num"> (th.num too); identifiers in <code> or .id (IBM Plex Mono)
   Notices:     <p class="scaled"><svg class="ico">..</svg><span>Throughput is from a scaled emulation (S = 1/100): ratios and congestion onset hold, absolute bandwidth does not.</span></p>
   Tooltip:     <span class="tip" tabindex="0" data-tip="Share of ...">Services affected</span>  (CSS-only hover/focus bubble)
   Score bar:   <span class="score-bar" style="--v:43;--c:var(--st-medium)"><i></i></span>  (--v is 0-100; add .lg for a full-width thick bar)
   Hero stats:  .stats > .stat > (.big + small)
   Colour variables: --st-low --st-medium --st-high --st-critical --st-invalid (fills), --st-*-ink (text on tinted backgrounds),
                --bg --surface --surface-2 --line --text --muted --accent --link --hero --hero-acc. */

@font-face{font-family:"Public Sans";font-weight:400;font-style:normal;font-display:swap;src:url(fonts/public-sans-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"Public Sans";font-weight:600;font-style:normal;font-display:swap;src:url(fonts/public-sans-latin-600-normal.woff2) format("woff2")}
@font-face{font-family:"Public Sans";font-weight:700;font-style:normal;font-display:swap;src:url(fonts/public-sans-latin-700-normal.woff2) format("woff2")}
@font-face{font-family:"IBM Plex Mono";font-weight:400;font-style:normal;font-display:swap;src:url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"IBM Plex Mono";font-weight:500;font-style:normal;font-display:swap;src:url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2")}

:root{
  color-scheme:light;
  --bg:#F7F8FA; --surface:#FFFFFF; --surface-2:#F1F3F6; --line:#E1E5EA; --text:#18212B; --muted:#586370;
  --accent:#18212B; --accent-ink:#FFFFFF; --bar:#FFFFFF; --bar-text:#18212B; --link:#2557D6;
  --hero:#15202D; --hero-acc:#9DB8FF; --ink:24,33,43;
  --st-low:#5C9C88; --st-medium:#B58A1C; --st-high:#A24A22; --st-critical:#6E1229; --st-invalid:#7A8494;
  --st-low-ink:#1B5546; --st-medium-ink:#634706; --st-high-ink:#873615; --st-critical-ink:#6E1229; --st-invalid-ink:#4A5362;
  --r-panel:18px; --r-btn:10px; --r-pill:999px; --r-inner:12px;
  --font:"Public Sans",system-ui,-apple-system,"Segoe UI",sans-serif; --mono:"IBM Plex Mono",ui-monospace,Consolas,monospace;
  --gap:24px; --row:44px; --gutter:24px;
  --shadow:0 1px 2px rgba(var(--ink),.07),0 10px 28px -10px rgba(var(--ink),.18);
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#171C22; --surface:#1D232B; --surface-2:#242B34; --line:#323B46; --text:#E8ECF0; --muted:#9AA5B2;
  --accent:#E8ECF0; --accent-ink:#171C22; --bar:#171C22; --bar-text:#E8ECF0; --link:#7FA6FF;
  --st-low:#9AD3C1; --st-medium:#E6C874; --st-high:#BE7A57; --st-critical:#E0708A; --st-invalid:#7A8494;
  --st-low-ink:#9AD3C1; --st-medium-ink:#E6C874; --st-high-ink:#DB9A79; --st-critical-ink:#EE90A2; --st-invalid-ink:#B4BDC9;
  --shadow:0 0 0 1px rgba(255,255,255,.02),0 0 28px -10px color-mix(in srgb,var(--accent) 35%,transparent);
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    color-scheme:dark;
    --bg:#171C22; --surface:#1D232B; --surface-2:#242B34; --line:#323B46; --text:#E8ECF0; --muted:#9AA5B2;
    --accent:#E8ECF0; --accent-ink:#171C22; --bar:#171C22; --bar-text:#E8ECF0; --link:#7FA6FF;
    --st-low:#9AD3C1; --st-medium:#E6C874; --st-high:#BE7A57; --st-critical:#E0708A; --st-invalid:#7A8494;
    --st-low-ink:#9AD3C1; --st-medium-ink:#E6C874; --st-high-ink:#DB9A79; --st-critical-ink:#EE90A2; --st-invalid-ink:#B4BDC9;
    --shadow:0 0 0 1px rgba(255,255,255,.02),0 0 28px -10px color-mix(in srgb,var(--accent) 35%,transparent);
  }
}

*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;background-color:var(--bg);color:var(--text);font:400 15px/1.55 var(--font);overflow-x:hidden;-webkit-text-size-adjust:100%}
h1,h2,h3{line-height:1.2;font-weight:700;margin:0 0 .5em}
h1{font-size:32px}h2{font-size:22px}h3{font-size:17px;font-weight:600}
p{margin:0 0 1em}
a{color:var(--link)}
.quiet-link{color:var(--muted);text-decoration:none}.quiet-link:hover{text-decoration:underline}
code,.id,kbd,pre{font-family:var(--mono);font-size:.88em}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}
.ico{width:1.25em;height:1.25em;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none;vertical-align:-.25em}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* top bar */
.topbar{display:flex;align-items:center;gap:24px;padding:0 var(--gutter);height:56px;background-color:var(--bar);color:var(--bar-text);border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;white-space:nowrap;color:inherit;text-decoration:none}
.brand .logo{width:24px;height:24px}
.tabs{display:flex;gap:4px;height:100%;align-items:center}
.tabs a{display:flex;align-items:center;gap:8px;padding:7px 14px;color:inherit;text-decoration:none;opacity:.8;border-radius:var(--r-pill);font-weight:600}
.tabs a:hover{background:color-mix(in srgb,var(--bar-text) 9%,transparent);opacity:1}
.tabs a[aria-current]{opacity:1;background:color-mix(in srgb,var(--bar-text) 15%,transparent)}
.tabs .local{font-size:12px;opacity:.7;font-weight:400}
.search{margin-left:auto;display:flex;align-items:center;gap:8px;padding:7px 14px;min-width:230px;border-radius:var(--r-pill);background:color-mix(in srgb,var(--bar-text) 10%,transparent);font-size:14px}
.search input{flex:1;min-width:0;height:auto;padding:0;border:0;outline:0;background:transparent;color:inherit;font:inherit}
.search a{color:inherit;text-decoration:none}
.theme-toggle{display:grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid var(--line);border-radius:var(--r-pill);background-color:var(--surface);color:var(--text);cursor:pointer}
.theme-toggle:hover{background-color:var(--surface-2)}
.crumbs{max-width:1240px;margin:0 auto;padding:16px var(--gutter) 0;font-size:13px;color:var(--muted);display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.crumbs a{color:var(--muted);text-decoration:none}.crumbs a:hover{text-decoration:underline}

/* layout */
.page{max-width:1240px;margin:0 auto;padding:12px var(--gutter) 64px;display:grid;gap:var(--gap)}
.cols{display:grid;grid-template-columns:1.25fr 1fr;gap:var(--gap)}
.stack-gap>*+*{margin-top:var(--gap)}
.section-title{font-size:13px;font-weight:600;color:var(--muted);margin:36px 0 -4px;display:flex;align-items:center;gap:12px}
.section-title::after{content:"";flex:1;height:1px;background:var(--line)}
.fine{font-size:12.5px;color:var(--muted);margin:0}
.ref{font-size:12px;color:var(--muted);margin:4px 0 0}
.ref code,.ref .id{font-size:11.5px}
.note-schem{font-size:12.5px;color:var(--muted);margin:12px 0 0;display:flex;gap:8px;align-items:flex-start}
.scroll{overflow-x:auto;max-width:100%}

/* panels */
.panel{background-color:var(--surface);border:1px solid var(--line);border-radius:var(--r-panel);padding:calc(var(--gap) + 6px);box-shadow:var(--shadow);min-width:0}
.panel.flush{padding:4px 12px}
.hero{position:relative;overflow:hidden;background-color:var(--hero);color:#EAF1F8;border:1px solid rgba(255,255,255,.06);border-radius:var(--r-panel);padding:34px;box-shadow:var(--shadow);min-width:0;
  --st-low:#9AD3C1; --st-medium:#E6C874; --st-high:#BE7A57; --st-critical:#E0708A}
.hero>svg.pat{position:absolute;inset:0;width:100%;height:100%;opacity:.13;color:var(--hero-acc);pointer-events:none}
.hero>*:not(.pat){position:relative}
.hero a{color:var(--hero-acc)}
.hero .muted{color:#A9BBCF}
.hero .lead{max-width:56ch;color:#B9C9DA;font-size:16px}
.hero h1,.hero h2{color:#F3F7FB}

/* buttons and form controls */
select,input[type="text"],input[type="search"],textarea,.btn{font:inherit;font-size:14px;height:38px;padding:0 14px;border-radius:var(--r-btn);border:1px solid var(--line);background-color:var(--surface);color:var(--text)}
textarea{height:auto;padding:10px 14px}
.btn{display:inline-flex;align-items:center;gap:8px;cursor:pointer;text-decoration:none;font-weight:600}
.btn:hover{background-color:var(--surface-2)}
.btn.primary{background-color:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.btn.primary:hover{background-color:var(--accent);filter:brightness(1.15)}
.btn[disabled],.btn[aria-disabled="true"]{opacity:.5;cursor:not-allowed}

/* severity */
.pill{display:inline-flex;align-items:center;gap:6px;padding:2px 11px 2px 9px;border-radius:var(--r-pill);font-size:12px;font-weight:600;white-space:nowrap;
  color:var(--pi,var(--text));background-color:color-mix(in srgb,var(--pc,var(--st-invalid)) 16%,var(--surface))}
.pill::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--pc,var(--st-invalid))}
.pill.low,.pill.ok{--pc:var(--st-low);--pi:var(--st-low-ink)}
.pill.medium{--pc:var(--st-medium);--pi:var(--st-medium-ink)}
.pill.high{--pc:var(--st-high);--pi:var(--st-high-ink)}
.pill.critical,.pill.lost{--pc:var(--st-critical);--pi:var(--st-critical-ink)}
.pill.invalid{--pc:var(--st-invalid);--pi:var(--st-invalid-ink)}
.pill.ok::before,.pill.lost::before{display:none}
.dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--st-invalid)}
.dot.low{background:var(--st-low)}.dot.medium{background:var(--st-medium)}.dot.high{background:var(--st-high)}.dot.critical{background:var(--st-critical)}
.band-badge{display:inline-flex;align-items:center;gap:8px;padding:6px 14px;border-radius:var(--r-pill);background:var(--st-invalid);color:#10161D;font-weight:700;font-size:14px}
.band-badge.low{background:var(--st-low)}.band-badge.medium{background:var(--st-medium)}.band-badge.high{background:var(--st-high)}
.band-badge.critical{background:var(--st-critical);color:#2A0A14}
.chip{display:inline-flex;align-items:center;gap:7px;padding:5px 12px 5px 10px;border:1px solid var(--line);border-radius:var(--r-pill);font-size:13px;background-color:var(--surface);color:var(--text)}
.chip.ok{color:var(--st-low-ink);border-color:color-mix(in srgb,var(--st-low) 40%,var(--line))}
.chip.warn{color:var(--st-medium-ink);border-color:color-mix(in srgb,var(--st-medium) 40%,var(--line))}
.chip.bad{color:var(--st-critical-ink);border-color:color-mix(in srgb,var(--st-critical) 40%,var(--line))}
.chip.idle{color:var(--muted)}

/* tables */
table{border-collapse:collapse;width:100%}
th{text-align:left;font-weight:600;color:var(--muted);font-size:13px;border-bottom:1px solid var(--line);padding:10px}
td{border-bottom:1px solid var(--line);padding:0 10px;height:var(--row)}
tr:last-child td{border-bottom:0}
.num{font-family:var(--mono);text-align:right;font-variant-numeric:tabular-nums}
th.num{text-align:right;font-family:var(--font)}

/* notices */
.scaled{font-size:13px;color:var(--muted);padding:12px 16px;border-radius:var(--r-inner);background-color:color-mix(in srgb,var(--st-medium) 10%,var(--surface));display:flex;gap:10px;align-items:flex-start;margin:0}
.scaled .ico{color:var(--st-medium);margin-top:2px}

/* tooltip */
.tip{position:relative;border-bottom:1px dotted var(--muted);cursor:help}
.tip::after{content:attr(data-tip);position:absolute;left:0;top:calc(100% + 6px);z-index:10;width:max-content;max-width:min(280px,80vw);padding:8px 10px;border-radius:var(--r-btn);
  background-color:var(--hero);color:#EAF1F8;font-size:12.5px;font-weight:400;line-height:1.4;box-shadow:var(--shadow);opacity:0;pointer-events:none;transition:opacity .12s}
.tip:hover::after,.tip:focus::after{opacity:1}

/* score bar */
.score-bar{display:inline-block;vertical-align:middle;width:84px;height:8px;border-radius:var(--r-pill);background-color:var(--surface-2);overflow:hidden}
.score-bar i{display:block;height:100%;width:calc(var(--v,0) * 1%);border-radius:var(--r-pill);background:var(--c,var(--accent))}
.score-bar.lg{width:100%;height:12px}

/* hero metric pills */
.stats{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px}
.stat{display:flex;align-items:center;gap:12px;padding:10px 16px 10px 12px;border-radius:var(--r-pill);background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12)}
.stat .big{font:500 20px/1 var(--mono)}
.stat small{display:block;color:#A9BBCF;font-size:12px;line-height:1.2}

@media (max-width:860px){.cols{grid-template-columns:1fr}}
@media (max-width:760px){
  :root{--gutter:16px}
  .topbar{gap:8px}
  .brand span,.tabs .local,.search{display:none}
  .tabs{flex:1;min-width:0}.tabs a{padding:7px 10px}
  .theme-toggle{margin-left:auto}
  .page{padding-bottom:48px}
  .hero{padding:22px 18px}h1{font-size:26px}
  .panel{padding:18px}
  td,th{padding-left:6px;padding-right:6px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ---- site visuals (run pages, runs index, docs home); appended in task 160 phase 2 ---- */
.search form{display:flex;align-items:center;gap:8px;flex:1;margin:0}

/* docs hero + pipeline */
.docs-hero h1{font-size:34px;max-width:20ch}
.docs-hero p.lead{margin:12px 0 30px}
.pipe{list-style:none;margin:0;padding:0;display:flex}
.pipe li{flex:1;position:relative;text-align:center;padding:0 4px;min-width:0}
.pipe .node{width:52px;height:52px;margin:0 auto 10px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.2);color:var(--hero-acc)}
.pipe .node .ico{width:24px;height:24px}
.pipe li:nth-child(2n) .node{background:color-mix(in srgb,var(--hero-acc) 16%,transparent)}
.pipe b{display:block;font-size:14px;font-weight:600}
.pipe small{display:block;font-size:12px;color:#A9BBCF;line-height:1.3;margin-top:2px}
.pipe li:not(:last-child)::after{content:"";position:absolute;top:26px;left:calc(50% + 32px);right:calc(-50% + 32px);border-top:2px dashed rgba(125,178,240,.5)}

/* run hero */
.run-hero{display:grid;grid-template-columns:1.1fr 1fr;gap:30px;align-items:center}
.run-hero h1{margin:14px 0 6px;font-size:32px}
.band-badge::before{content:"";width:9px;height:9px;border-radius:50%;background:currentColor;opacity:.55}
.meter{width:74px;height:8px;border-radius:var(--r-pill);background:rgba(255,255,255,.14);overflow:hidden}
.meter i{display:block;height:100%;border-radius:var(--r-pill);background:var(--hero-acc)}
.ring{width:40px;height:40px}
.hero .tip::after{background-color:#0B121A;border:1px solid rgba(255,255,255,.2)}
.hero .tip{border-bottom-color:#A9BBCF}
.gauge{width:100%;max-width:440px;margin:0 auto;display:block}
.gauge text{font-family:var(--font)}
.gnote{font-size:13px;color:#C3D2E2;margin:6px 0 0;text-align:center}
.legend{display:flex;flex-wrap:wrap;gap:6px 16px;justify-content:center;font-size:12.5px;color:#C3D2E2;margin-top:10px}
.legend i,.dp-key i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px;vertical-align:-1px}


/* before / after route */
.paths{display:grid;grid-template-columns:1fr 1fr;gap:var(--gap)}
.pathbox{--pb:var(--surface-2);border:1px solid var(--line);background-color:var(--pb);border-radius:var(--r-inner);padding:16px;min-width:0}
.pathbox.after{--pb:color-mix(in srgb,var(--st-critical) 6%,var(--surface));border-color:color-mix(in srgb,var(--st-critical) 55%,var(--line))}
.pathbox h3{margin:0 0 4px;font-size:15px;font-weight:600;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pathbox svg{width:100%;height:auto;display:block}
.pathbox text{font-family:var(--mono);font-size:11.5px;fill:var(--text);paint-order:stroke;stroke:var(--pb);stroke-width:4px;stroke-linejoin:round}
.pathbox .dim text{fill:var(--muted)}
.evlist{margin:12px 0 0;padding:0;list-style:none;font-size:13px;color:var(--muted);display:grid;gap:6px}
.ev-chip{display:inline-block;font:500 11.5px var(--mono);padding:1px 8px;border-radius:var(--r-pill);border:1px solid var(--line);background-color:var(--surface-2);color:var(--link);cursor:pointer;margin:0 2px}
.ev-chip:hover,.ev-chip.active{background-color:var(--accent);color:var(--accent-ink);border-color:var(--accent)}

/* how the score became the band */
.comp{width:100%;height:auto;display:block;max-width:760px}
.comp text{font-family:var(--font);fill:var(--text)}
.comp .sm{font-size:11.5px;fill:var(--muted)}
.comp .mono{font-family:var(--mono);font-size:12px}
.hrline{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 0;padding:0;list-style:none}
.hrline li{font-size:13px;padding:4px 12px;border-radius:var(--r-pill);background-color:var(--surface-2);border:1px solid var(--line)}
.hrline li.crit{border-color:var(--st-critical);color:var(--st-critical-ink);font-weight:600}
.dp-key{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:13px;color:var(--muted);margin-top:14px}
.dp-key i.ring{background-color:var(--surface-2);box-shadow:0 0 0 2px var(--surface),0 0 0 3.5px var(--text);width:8px;height:8px;margin:0 8px 0 2px}

/* factor bars and rules */
.panel h2{font-size:17px;margin:0 0 14px;font-weight:600}
.factor{padding:12px 0;border-bottom:1px solid var(--line)}
.factor:last-child{border-bottom:0}
.factor .top,.rule .top{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.factor .name{font-weight:600}
.factor .v{font:500 14px var(--mono)}
.factor .track{height:12px;margin:8px 0 6px;background-color:var(--surface-2);border-radius:var(--r-pill);overflow:hidden}
.factor .fill{height:100%;border-radius:var(--r-pill);background:color-mix(in srgb,var(--accent) 70%,var(--surface))}
.factor p,.rule p{margin:0;font-size:13px;color:var(--muted)}
.rule{padding:12px 0;border-bottom:1px solid var(--line)}
.rule:last-child{border-bottom:0}
.rule p{margin-top:4px}
.rule strong{font-weight:600;color:var(--text)}

/* dashboard explore section */
.cy-toolbar{display:flex;align-items:center;gap:14px;margin-bottom:10px;font-size:14px;flex-wrap:wrap}
.cy-toolbar label{display:flex;align-items:center;gap:8px;cursor:pointer}
#cy{width:100%;height:480px;border:1px solid var(--line);border-radius:var(--r-inner);background-color:var(--surface)}
#detail-panel{margin-top:10px;padding:10px 14px;background-color:var(--surface-2);border-radius:var(--r-inner);font-size:14px;min-height:44px}
#detail-panel .detail-ev{margin-top:6px;display:grid;gap:4px}
.empty{color:var(--muted);padding:6px 0}
.panel h3{margin:22px 0 8px}
.panel h3:first-of-type{margin-top:0}
input.filter{width:100%;margin-bottom:6px}
.table-wrap{max-height:300px;overflow:auto}
.ai-block{margin-bottom:18px}
.ai-block h3{font-size:15px;margin:0 0 6px;display:flex;align-items:center;gap:8px}
.ai-block p{white-space:pre-wrap;margin:0}
.ai-cites{margin-top:6px;font-size:13px;color:var(--muted)}
.ai-cites summary{cursor:pointer}
.ai-cites ul{margin:6px 0 0;padding-left:18px}
.ai-cites li{margin:3px 0}
.source-badge{font-size:12px;font-weight:400;color:var(--muted);border:1px solid var(--line);border-radius:var(--r-pill);padding:0 9px}

/* runs index */
.runs-sum{display:grid;grid-template-columns:1.2fr 1fr;gap:var(--gap)}
.stack{display:flex;height:34px;border-radius:var(--r-pill);overflow:hidden;gap:3px;margin:6px 0 14px}
.stack i{display:block;height:100%}
.keys{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.key{padding:10px 12px;border-radius:var(--r-inner);background-color:var(--surface-2);font-size:13px}
.key b{display:block;font:600 22px/1.1 var(--mono)}
.key span::before{content:"";display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px;background:var(--c)}
.key.zero{background:transparent;border:1px dashed var(--line)}
.key.zero b{color:var(--muted)}
.setrow{display:grid;grid-template-columns:84px 1fr 32px;gap:10px;align-items:center;height:30px;font-size:14px}
.setrow .t{height:12px;border-radius:var(--r-pill);background-color:var(--surface-2);overflow:hidden}
.setrow .t i{display:block;height:100%;border-radius:var(--r-pill);background:var(--accent);opacity:.85}
.sbar{display:flex;align-items:center;gap:10px;justify-content:flex-end}
.dotplot{display:grid;grid-template-columns:84px 1fr;gap:0 12px;align-items:center}
.dotplot .lab{font-size:13.5px}
.dp-track{position:relative;height:50px;border-bottom:1px solid var(--line);background:linear-gradient(to right,transparent calc(25% - 1px),var(--line) calc(25% - 1px),var(--line) 25%,transparent 25%,transparent calc(50% - 1px),var(--line) calc(50% - 1px),var(--line) 50%,transparent 50%,transparent calc(75% - 1px),var(--line) calc(75% - 1px),var(--line) 75%,transparent 75%)}
.dp-dot{position:absolute;width:11px;height:11px;margin:-5.5px 0 0 -5.5px;border-radius:50%;background:var(--c)}
.dp-dot.raised{box-shadow:0 0 0 2.5px var(--surface),0 0 0 4px var(--text)}
.dp-axis{position:relative;height:20px;font:11.5px var(--mono);color:var(--muted)}
.dp-axis span{position:absolute;transform:translateX(-50%)}
.dp-axis span:first-child{transform:none}.dp-axis span:last-child{transform:translateX(-100%)}

@media (max-width:860px){
  .run-hero,.paths,.runs-sum{grid-template-columns:1fr}
  .keys{grid-template-columns:1fr 1fr}
  .comp .seglab{display:none}
}
@media (max-width:760px){
  .docs-hero h1{font-size:27px}.run-hero h1{font-size:25px}
  .pipe{flex-direction:column;gap:0}
  .pipe li{display:grid;grid-template-columns:52px 1fr;column-gap:14px;text-align:left;align-items:center;padding:0 0 16px}
  .pipe .node{margin:0;grid-row:span 2}
  .pipe b{align-self:end}.pipe small{align-self:start}
  .pipe li:not(:last-child)::after{top:56px;bottom:4px;left:25px;right:auto;border-top:0;border-left:2px dashed rgba(125,178,240,.5)}
  .c-opt,.c-ai{display:none}
  .pathbox{padding:12px 8px}.pathbox text{font-size:15px}
  .comp .sm{font-size:19px}.comp .mono{font-size:20px}
  .setrow{grid-template-columns:62px 1fr 24px}
  .dotplot{grid-template-columns:62px 1fr}
  .sbar .score-bar{width:44px}
}
@media print{
  .topbar,.crumbs,.theme-toggle{display:none}
  body{background:#fff}
}
.search input[type="search"]{height:auto;padding:0;border:0;background-color:transparent;color:inherit}
