*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 13px/1.45 var(--sans); color: var(--ink); background: var(--canvas);
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-s); }
.num, td.n, .tnum { font-variant-numeric: tabular-nums; }
code, .mono { font-family: var(--mono); font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; grid-template-rows: 48px 1fr; height: 100vh; }
.top {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 10px;
  background: var(--panel); border-bottom: 1px solid var(--line); position: relative; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: var(--r-s); color: var(--ink); }
.brand:hover { text-decoration: none; background: var(--hover); }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--ultra); display: grid; place-items: center; }
.brand-mark svg { width: 14px; height: 14px; }
.brand-name { font-weight: 600; letter-spacing: -.01em; }
.crumb { display: flex; align-items: center; gap: 2px; }
.crumb-sep { color: var(--ink-4); padding: 0 2px; }
.switch {
  display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 8px; border: 0; background: none; border-radius: var(--r-s);
  font-weight: 500; white-space: nowrap;
}
.switch:hover { background: var(--hover); }
.switch .i { color: var(--ink-3); width: 14px; height: 14px; }
.org-dot { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; }
.env { font-size: 11px; font-weight: 500; color: var(--ink-3); padding: 1px 6px; border-radius: 4px; background: var(--sunk); }
.search {
  flex: 1; max-width: 560px; margin: 0 auto; height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  border: 1px solid var(--line); background: var(--canvas); border-radius: 8px; color: var(--ink-3); text-align: left;
}
.search:hover { border-color: var(--line-2); }
.search span { flex: 1; }
kbd {
  font: 500 11px/1 var(--sans); color: var(--ink-3); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line-2);
  background: var(--panel); min-width: 18px; text-align: center; display: inline-block;
}
.top-r { display: flex; align-items: center; gap: 2px; }
.ibtn {
  width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; border-radius: var(--r-s); color: var(--ink-2);
  position: relative;
}
.ibtn:hover { background: var(--hover); color: var(--ink); }
.ibtn[aria-pressed="true"] { background: var(--press); color: var(--ink); }
.ibtn .dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--panel); }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #fff; flex: none; }
.statusdot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); padding: 0 8px; height: 30px; border-radius: var(--r-s); }
.statusdot:hover { background: var(--hover); text-decoration: none; color: var(--ink); }
.statusdot i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.menu-btn { display: none; }

/* nav */
.nav {
  background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 8px 16px;
  display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin;
}
.nav-group h3 { margin: 0 0 3px; padding: 0 10px; font-size: 11.5px; font-weight: 500; color: var(--ink-3); display: flex; align-items: center; justify-content: space-between; }
.nav a {
  display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; border-radius: var(--r-s); color: var(--ink-2);
  position: relative; font-weight: 450;
}
.nav a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--sel); color: var(--ink); font-weight: 550; }
.nav a[aria-current="page"] .i { color: var(--accent); }
.nav a .i { color: var(--ink-3); }
.nav a .pin { margin-left: auto; opacity: 0; color: var(--ink-4); border: 0; background: none; padding: 2px; border-radius: 4px; display: grid; }
.nav a:hover .pin { opacity: 1; }
.nav a .pin:hover { color: var(--ink); background: var(--press); }
.nav a .pin.on { opacity: 1; color: var(--accent); }
.nav a .live { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: breathe 2.4s var(--ease) infinite; }
.nav a:hover .live { display: none; }
.nav-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; }
.credit-chip { display: block; margin: 0 2px 8px; padding: 10px 10px 9px; border-radius: var(--r-m); background: var(--canvas); border: 1px solid var(--line); color: var(--ink); }
.credit-chip:hover { text-decoration: none; border-color: var(--line-2); }
.credit-chip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.credit-chip small { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 1px; }
.meter { height: 4px; border-radius: 2px; background: var(--c1-wash); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.meter.warn { background: var(--warn-wash); } .meter.warn i { background: var(--warn); }
.meter.bad { background: var(--bad-wash); } .meter.bad i { background: var(--bad); }

@keyframes breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.82); } }

/* main */
.main { overflow-y: auto; overflow-x: hidden; position: relative; scroll-behavior: smooth; }
.page { padding: 26px 32px 64px; max-width: 1280px; margin: 0 auto; }
.page.wide { max-width: none; }
.banner {
  display: flex; align-items: center; gap: 12px; padding: 10px 32px; border-bottom: 1px solid var(--line); font-size: 13px;
}
.banner.bad { background: var(--bad-wash); }
.banner.warn { background: var(--warn-wash); }
.banner .i { flex: none; }
.banner.bad .i { color: var(--bad-ink); } .banner.warn .i { color: var(--warn-ink); }
.banner p { margin: 0; flex: 1; }
.banner .btns { display: flex; gap: 8px; }

.ph { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ph-t { flex: 1; min-width: 260px; }
.ph h1 { font: 600 27px/1.15 var(--serif); letter-spacing: -.012em; margin: 0; }
.ph p { margin: 5px 0 0; color: var(--ink-2); max-width: 70ch; }
.ph-a { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumbs { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.crumbs a { color: var(--ink-3); }

/* controls */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-s); font-weight: 500;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); white-space: nowrap;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--btn); border-color: transparent; color: var(--on-btn); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn.primary:hover { background: var(--btn-hover); }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.danger { color: var(--bad-ink); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12.5px; }
.btn .i { width: 15px; height: 15px; }
.btn kbd { margin-left: 4px; background: transparent; }
.btn.primary kbd { color: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .3); }
.seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--sunk); gap: 2px; }
.seg button { border: 0; background: none; height: 26px; padding: 0 10px; border-radius: 6px; color: var(--ink-2); font-weight: 500; font-size: 12.5px; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 1px 2px rgba(35, 31, 43, .12), 0 0 0 .5px var(--line-2); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .lbl { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.input, select.input, textarea.input {
  height: 32px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--panel); width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.hint { font-size: 12px; color: var(--ink-3); }
.toggle { width: 30px; height: 18px; border-radius: 9px; background: var(--line-2); border: 0; position: relative; padding: 0; flex: none; transition: background .2s var(--ease); }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .22s var(--rise); }
.toggle[aria-checked="true"] { background: var(--good); }
.toggle[aria-checked="true"]::after { transform: translateX(12px); }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.panel-h h2 { margin: 0; font-size: 13.5px; font-weight: 600; flex: 1; letter-spacing: -.005em; }
.panel-h .sub { color: var(--ink-3); font-weight: 400; margin-left: 6px; }
.panel-b { padding: 12px 16px 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.muted { color: var(--ink-3); }
.ink2 { color: var(--ink-2); }

/* stat strip: one panel, divided by hairlines */
.stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.stat { padding: 14px 16px 12px; border-left: 1px solid var(--line); min-width: 0; text-align: left; background: none; border-top: 0; border-right: 0; border-bottom: 0; display: block; color: inherit; }
button.stat:hover { background: var(--hover); }
.stat:first-child { border-left: 0; border-radius: var(--r-l) 0 0 var(--r-l); }
.stat:last-child { border-radius: 0 var(--r-l) var(--r-l) 0; }
.stat-l { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.stat-v { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-v small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.stat-d { font-size: 12px; color: var(--ink-3); margin-top: 1px; display: flex; gap: 6px; align-items: center; }
.up-good { color: var(--good); } .up-bad { color: var(--bad-ink); }
.spark { display: block; margin-top: 8px; width: 100%; height: 26px; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 500; font-size: 12px; color: var(--ink-3); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 0 12px; height: 38px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 16px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 16px; }
.tbl .n { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tbody tr[data-open] { cursor: pointer; }
.tbl tbody tr[data-open]:hover td { background: var(--hover); }
.tbl tbody tr.sel td { background: var(--sel); }
.tbl tbody tr.fresh td { animation: fresh 1.6s var(--ease); }
@keyframes fresh { from { background: var(--accent-wash); } to { background: transparent; } }
.tbl .id { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.tbl .strong { font-weight: 550; }
.cell-sub { font-size: 12px; color: var(--ink-3); }
.trunc { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }

/* status pills: icon + word, never colour alone */
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); flex: none; }
.st.good::before { background: var(--good); }
.st.bad::before { background: var(--bad); border-radius: 2px; transform: rotate(45deg); width: 6px; height: 6px; }
.st.warn::before { background: var(--warn); border-radius: 1px; width: 7px; height: 7px; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.st.live::before { background: var(--accent); animation: breathe 1.6s var(--ease) infinite; }
.st.off::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.code-pill { font: 500 11.5px/1 var(--mono); padding: 3px 6px; border-radius: 4px; background: var(--sunk); color: var(--ink-2); }
.code-pill.bad { background: var(--bad-wash); color: var(--bad-ink); }
.code-pill.warn { background: var(--warn-wash); color: var(--warn-ink); }
.code-pill.good { background: var(--good-wash); color: var(--good); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 11.5px; font-weight: 500; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.tag.accent { background: var(--accent-wash); color: var(--accent-ink); }
.swatch { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex: none; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button, .tabs a {
  border: 0; background: none; height: 34px; padding: 0 10px; color: var(--ink-2); font-weight: 500; position: relative; display: inline-flex; align-items: center; gap: 6px;
}
.tabs button:hover, .tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs [aria-selected="true"] { color: var(--ink); }
.tabs [aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }

/* code */
.code {
  font: 12.5px/1.6 var(--mono); background: var(--sunk); border-radius: var(--r-m); padding: 12px 14px; margin: 0; overflow-x: auto;
  color: var(--ink); white-space: pre; tab-size: 2;
}
:root[data-theme="dark"] .code { background: #0F0C14; }
.code .k { color: var(--c3); } .code .s { color: var(--good); } .code .c { color: var(--ink-3); } .code .p { color: var(--accent-ink); } .code .n { color: var(--c2); }
.code-box { position: relative; }
.code-box .copy { position: absolute; top: 8px; right: 8px; }
.secret { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: var(--r-m); background: var(--sunk); font: 12.5px var(--mono); }
.secret span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* sentences: Nenya explaining, in the serif */
.say { font: 400 16px/1.5 var(--serif); color: var(--ink); margin: 0; max-width: 66ch; }
.say b { font-weight: 600; }
.say.sm { font-size: 14.5px; }

/* empty */
.empty { text-align: center; padding: 40px 20px; color: var(--ink-2); }
.empty h3 { font: 600 18px/1.3 var(--serif); color: var(--ink); margin: 0 0 6px; }

/* charts */
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .ax { font: 11px var(--sans); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .gl { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .base { stroke: var(--line-2); stroke-width: 1; shape-rendering: crispEdges; }
.chart .xh { stroke: var(--ink-4); stroke-width: 1; shape-rendering: crispEdges; }
.tip {
  position: absolute; pointer-events: none; z-index: 5; background: var(--raised); color: var(--ink); border-radius: 8px; padding: 8px 10px;
  box-shadow: var(--shadow-pop); font-size: 12px; min-width: 140px; opacity: 0; transition: opacity .12s; white-space: nowrap;
}
.tip.on { opacity: 1; }
.tip .t { color: var(--ink-3); margin-bottom: 4px; }
.tip .r { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.tip .r span:first-child { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tip .r b { font-weight: 600; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* sheet (inspector) */
.sheet {
  position: fixed; top: 48px; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--panel); box-shadow: var(--shadow-sheet);
  z-index: 30; transform: translateX(104%); transition: transform .32s var(--ease); display: flex; flex-direction: column;
}
.sheet.on { transform: none; }
.sheet-h { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); }
.sheet-h .t { flex: 1; min-width: 0; }
.sheet-h h2 { margin: 0; font: 600 17px/1.25 var(--serif); }
.sheet-h .id { font: 12px var(--mono); color: var(--ink-3); }
.sheet-b { overflow-y: auto; padding: 18px 20px 40px; flex: 1; }
.sheet-sec { margin-top: 20px; }
.sheet-sec h3 { font-size: 12px; font-weight: 500; color: var(--ink-3); margin: 0 0 8px; }
dl.kv { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; margin: 0; font-size: 12.5px; }
dl.kv dt { color: var(--ink-3); }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* modal + palette */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; opacity: 0; transition: opacity .16s var(--ease); }
.scrim.on { opacity: 1; }
.pal {
  position: fixed; left: 50%; top: 14vh; width: min(660px, calc(100vw - 24px)); transform: translateX(-50%) scale(.98); opacity: 0;
  background: var(--raised); border-radius: 14px; box-shadow: var(--shadow-pop); z-index: 41; overflow: hidden;
  transition: transform .18s var(--rise), opacity .14s var(--ease);
}
.pal.on { transform: translateX(-50%) scale(1); opacity: 1; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 52px; border-bottom: 1px solid var(--line); }
.pal-in input { flex: 1; border: 0; background: none; font-size: 15px; outline: none; height: 100%; }
.pal-in .i { color: var(--ink-3); width: 18px; height: 18px; }
.pal-scope { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.pal-list { max-height: min(440px, 56vh); overflow-y: auto; padding: 6px; }
.pal-g { font-size: 11.5px; color: var(--ink-3); padding: 8px 10px 4px; font-weight: 500; }
.pal-it { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.pal-it .i { color: var(--ink-3); }
.pal-it .d { color: var(--ink-3); font-size: 12px; margin-left: auto; display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.pal-it[aria-selected="true"] { background: var(--sel); }
.pal-it[aria-selected="true"] .i { color: var(--accent); }
.pal-it mark { background: none; color: var(--accent-ink); font-weight: 600; }
.pal-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3); }
.pal-foot span { display: inline-flex; align-items: center; gap: 5px; }

.modal {
  position: fixed; left: 50%; top: 50%; width: min(480px, calc(100vw - 24px)); transform: translate(-50%, -48%) scale(.98); opacity: 0;
  background: var(--raised); border-radius: 14px; box-shadow: var(--shadow-pop); z-index: 41; transition: transform .2s var(--rise), opacity .14s;
}
.modal.on { transform: translate(-50%, -50%); opacity: 1; }
.modal-h { padding: 18px 20px 0; }
.modal-h h2 { margin: 0; font: 600 19px/1.25 var(--serif); }
.modal-h p { margin: 4px 0 0; color: var(--ink-2); }
.modal-b { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-f { padding: 12px 20px 16px; display: flex; justify-content: flex-end; gap: 8px; }

/* popover (switcher, activity) */
.pop {
  position: fixed; z-index: 35; background: var(--raised); border-radius: 12px; box-shadow: var(--shadow-pop); opacity: 0;
  transform: translateY(-4px) scale(.99); transform-origin: top left; transition: opacity .14s var(--ease), transform .18s var(--rise); pointer-events: none;
}
.pop.on { opacity: 1; transform: none; pointer-events: auto; }
.sw { width: 560px; display: grid; grid-template-columns: 210px 1fr; min-height: 280px; }
.sw-col { padding: 8px; }
.sw-col + .sw-col { border-left: 1px solid var(--line); }
.sw-h { font-size: 11.5px; color: var(--ink-3); padding: 6px 8px; font-weight: 500; }
.sw-it { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; text-align: left; padding: 7px 8px; border-radius: 7px; }
.sw-it:hover { background: var(--hover); }
.sw-it[aria-current="true"] { background: var(--sel); }
.sw-it .t { flex: 1; min-width: 0; }
.sw-it .t b { font-weight: 550; display: block; }
.sw-it .t small { color: var(--ink-3); font-size: 11.5px; }
.act { width: 380px; max-height: 70vh; display: flex; flex-direction: column; }
.act-h { display: flex; align-items: center; padding: 12px 14px 8px; }
.act-h h2 { font-size: 13.5px; margin: 0; flex: 1; }
.act-list { overflow-y: auto; padding: 0 6px 8px; }
.act-it { display: flex; gap: 10px; padding: 9px 8px; border-radius: 8px; cursor: pointer; }
.act-it:hover { background: var(--hover); }
.act-it .ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--sunk); color: var(--ink-2); }
.act-it .ic.good { background: var(--good-wash); color: var(--good); }
.act-it .ic.bad { background: var(--bad-wash); color: var(--bad-ink); }
.act-it .ic.acc { background: var(--accent-wash); color: var(--accent-ink); }
.act-it p { margin: 0; font-size: 12.5px; line-height: 1.4; }
.act-it time { font-size: 11.5px; color: var(--ink-3); }
.act-it.new p { font-weight: 550; }

/* toast */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 14px; border-radius: 10px; background: var(--plum); color: var(--chalk);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .35); font-size: 13px; animation: toastin .32s var(--rise);
}
:root[data-theme="dark"] .toast { background: #F3F0EA; color: var(--plum); }
.toast .i { color: #6FD3A4; }
:root[data-theme="dark"] .toast .i { color: var(--good); }
.toast button { border: 0; background: rgba(255, 255, 255, .12); color: inherit; border-radius: 6px; height: 24px; padding: 0 8px; font-weight: 500; }
:root[data-theme="dark"] .toast button { background: rgba(35, 31, 43, .08); }
@keyframes toastin { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* docs drawer */
.docs-b h3 { font-size: 13.5px; margin: 18px 0 6px; }
.docs-b p { margin: 0 0 8px; color: var(--ink-2); max-width: 64ch; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- narrow ---------- */
@media (max-width: 1080px) {
  .g-main { grid-template-columns: 1fr; }
  .g3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .nav {
    position: fixed; top: 48px; left: 0; bottom: 0; width: 280px; z-index: 32; transform: translateX(-102%); transition: transform .28s var(--ease);
    box-shadow: 0 0 60px rgba(0, 0, 0, .2);
  }
  .nav.on { transform: none; }
  .menu-btn { display: grid; }
  .brand-name, .search span, .search kbd, .statusdot span, .top-r .hide-s, .crumb .org-name, .env { display: none; }
  .search { flex: 0 0 32px; width: 32px; margin: 0 0 0 auto; padding: 0; justify-content: center; border: 0; background: none; }
  .search .i { color: var(--ink-2); }
  .page { padding: 18px 16px 48px; }
  .banner { padding: 10px 16px; flex-wrap: wrap; }
  .ph h1 { font-size: 24px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .stats { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:first-child, .stat:last-child { border-radius: 0; }
  .hide-s { display: none !important; }
  .sheet { top: 0; width: 100vw; z-index: 45; }
  .sw { width: calc(100vw - 16px); grid-template-columns: 1fr; }
  .sw-col + .sw-col { border-left: 0; border-top: 1px solid var(--line); }
  .act { width: calc(100vw - 16px); }
  dl.kv { grid-template-columns: 110px 1fr; }
  .tbl td, .tbl th { padding: 0 8px; }
}
