/* BrainTrust console — BASE AND COMPONENTS. Every value comes from css/tokens.css.
   Order: reset → typography → controls (buttons, inputs, toggles, chips) → surfaces (card, tiles, banner, badge) →
   tables → states (empty, skeleton, spinner) → the ported screens' shared classes (.hero, .frow, .pill …) restyled. */

/* ── reset & base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body{ margin: 0; font-family: var(--font-sans); font-size: var(--fs-sm); line-height: var(--lh-base); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "cv11", "ss01"; }
img, svg{ max-width: 100%; }
svg.ico{ flex: none; display: inline-block; vertical-align: -0.2em; }
h1, h2, h3, h4{ margin: 0; color: var(--text); line-height: var(--lh-tight); }
p{ margin: 0 0 var(--sp-3); }
a{ color: var(--accent-text); text-decoration: none; text-underline-offset: 2px; cursor: pointer; }
a:hover{ text-decoration: underline; }
b, strong{ font-weight: var(--fw-semibold); }
code, kbd, pre, .mono{ font-family: var(--font-mono); font-size: 0.92em; }
hr{ border: 0; border-top: 1px solid var(--border); margin: var(--sp-4) 0; }
::selection{ background: var(--accent-soft); }
.sr-only{ position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hidden{ display: none !important; }
.muted{ color: var(--text-muted); }
.text-2{ color: var(--text-2); }
.num{ text-align: right; font-variant-numeric: tabular-nums; }
.tnum{ font-variant-numeric: tabular-nums; }
.nowrap{ white-space: nowrap; }
.wrap-any{ overflow-wrap: anywhere; }

/* focus — visible for keyboard users, on every interactive element */
:focus{ outline: none; }
:focus-visible{ outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }
input:focus-visible, select:focus-visible, textarea:focus-visible{ border-radius: var(--r-md); }

/* ── buttons ───────────────────────────────────────────────────────────────────
   .btn + .btn-primary | .btn-secondary | .btn-ghost | .btn-danger, sizes .btn-sm / .btn-lg, .btn-icon (square).
   The ported screens' button.act / button.ghost / button.ico are the same buttons under their old names. */
.btn, button.act, button.ghost, button.ico{
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: 34px; padding: 0 var(--sp-3); border-radius: var(--r-md); border: 1px solid transparent;
  font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: 1; white-space: nowrap;
  cursor: pointer; user-select: none; text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.btn:hover{ text-decoration: none; }
.btn-primary, button.act{ background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: var(--shadow-xs); }
.btn-primary:hover:not(:disabled), button.act:hover:not(:disabled){ background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary, button.ghost{ background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover:not(:disabled), button.ghost:hover:not(:disabled){ background: var(--surface-2); }
.btn-ghost{ background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled){ background: var(--surface-2); color: var(--text); }
.btn-danger{ background: var(--danger-solid); color: #fff; border-color: var(--danger-solid); }
.btn-danger:hover:not(:disabled){ filter: brightness(.94); }
.btn-danger-ghost{ background: transparent; color: var(--danger); border-color: var(--border-strong); }
.btn-danger-ghost:hover:not(:disabled){ background: var(--danger-soft); border-color: var(--danger-border); }
.btn-sm, button.ico{ height: 28px; padding: 0 var(--sp-2); font-size: var(--fs-xs); gap: 6px; border-radius: var(--r-sm); }
button.ico{ background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
button.ico:hover:not(:disabled){ background: var(--surface-2); color: var(--text); }
button.ico.active{ background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-ring); }
.btn-lg{ height: 40px; padding: 0 var(--sp-4); font-size: var(--fs-md); }
.btn-block{ width: 100%; }
.btn-icon{ width: 34px; padding: 0; }
.btn-icon.btn-sm{ width: 28px; }
.btn:disabled, button:disabled{ opacity: .5; cursor: not-allowed; }
button{ font-family: inherit; }
/* loading — the label stays (for width) but goes invisible under a spinner */
button.loading, .btn.loading{ color: transparent !important; pointer-events: none; position: relative; }
button.loading > *{ visibility: hidden; }
button.loading::after{ content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border: 2px solid currentColor; border-color: var(--text-muted); border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-primary.loading::after, button.act.loading::after{ border-color: rgba(255,255,255,.9); border-top-color: transparent; }
button.ghost.spin{ opacity: .6; pointer-events: none; }
@keyframes spin{ to{ transform: rotate(360deg); } }

/* ── form controls ─────────────────────────────────────────────────────────── */
input, select, textarea{
  font: inherit; font-size: var(--fs-sm); color: var(--text); background: var(--surface); min-width: 0;
  border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 0 var(--sp-3); height: 34px;
  box-shadow: var(--shadow-xs); transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
textarea{ height: auto; padding: var(--sp-2) var(--sp-3); line-height: 1.55; resize: vertical; }
select{ appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><path d='M6 8l4 4 4-4' stroke='%23858ea3' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 7px center; background-size: 16px; }
select[multiple]{ height: auto; background-image: none; padding: var(--sp-1); }
input[type="checkbox"], input[type="radio"]{ height: auto; width: auto; padding: 0; box-shadow: none; accent-color: var(--accent); }
input[type="range"]{ height: auto; padding: 0; border: 0; box-shadow: none; background: transparent; accent-color: var(--accent); }
input::placeholder, textarea::placeholder{ color: var(--text-muted); opacity: .85; }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled){ border-color: var(--text-muted); }
input:focus, select:focus, textarea:focus{ outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled, select:disabled, textarea:disabled{ background: var(--surface-2); color: var(--text-muted); cursor: not-allowed; }
input[aria-invalid="true"], .ctl.invalid{ border-color: var(--danger); }
.field{ display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.field-label, label.lbl{ font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-2); }
.field-hint{ font-size: var(--fs-xs); color: var(--text-muted); }
.input-group{ position: relative; display: flex; align-items: center; }
.input-group > .ico{ position: absolute; left: 10px; color: var(--text-muted); pointer-events: none; }
.input-group > input{ padding-left: 34px; width: 100%; }
.ctl{ width: 100%; max-width: 420px; }
textarea.ctl, select[multiple].ctl, .ctl.wide{ max-width: none; }
textarea.ctl{ min-height: 104px; }
.ferr{ color: var(--danger); font-size: var(--fs-xs); margin-top: 5px; }

/* switch — <label class="toggle"><input type=checkbox><span class="track"></span> text</label> */
.toggle{ display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer; font-size: var(--fs-sm); color: var(--text); line-height: 1.35; position: relative; }
.toggle.top{ align-items: flex-start; }
.toggle input{ position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.toggle .track{ display: inline-block; position: relative; flex: none; width: 34px; height: 20px; background: var(--border-strong); border-radius: var(--r-full); transition: background-color var(--dur) var(--ease); }
.toggle .track::before{ content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(16,24,40,.25); transition: transform var(--dur) var(--ease); }
.toggle input:checked + .track{ background: var(--accent); }
.toggle input:checked + .track::before{ transform: translateX(14px); }
.toggle input:focus-visible + .track{ box-shadow: var(--focus-ring); }
.toggle input:disabled + .track{ opacity: .5; }

/* chips — filter pills */
.chips{ display: flex; flex-wrap: wrap; gap: 6px; }
button.chip, .chip{ display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--sp-3); border-radius: var(--r-full);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-medium); cursor: pointer; white-space: nowrap; }
button.chip:hover{ background: var(--surface-2); color: var(--text); }
button.chip.on, .chip.on{ background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-ring); }
button.chip .muted{ color: inherit; opacity: .7; }
button.chip.off{ opacity: .45; cursor: default; border-style: dashed; }
button.chip.clear{ color: var(--danger); border-color: var(--danger-border); background: var(--danger-soft); }

/* segmented control */
.seg{ display: inline-flex; padding: 2px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); }
.seg button{ height: 26px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-muted); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-medium); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover{ color: var(--text); }
.seg button[aria-pressed="true"], .seg button.on{ background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }

/* ── surfaces ──────────────────────────────────────────────────────────────── */
.card{ background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-5); box-shadow: var(--shadow-xs); min-width: 0; margin-bottom: var(--sp-4); }
.card > :last-child{ margin-bottom: 0; }
.card-head{ display: flex; align-items: flex-start; gap: var(--sp-3); justify-content: space-between; margin-bottom: var(--sp-4); flex-wrap: wrap; }
.card-title, .card .eyebrow, .card h3{ font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--text); margin: 0 0 var(--sp-1); letter-spacing: 0; text-transform: none; }
.card .eyebrow{ margin-bottom: var(--sp-4); display: flex; align-items: baseline; gap: var(--sp-2); flex-wrap: wrap; }
.card .eyebrow .muted{ font-size: var(--fs-xs); font-weight: var(--fw-regular); }
.card-sub{ font-size: var(--fs-xs); color: var(--text-muted); margin: 0; }
.card-flush{ padding: 0; }
.card-flush > .card-head{ padding: var(--sp-4) var(--sp-5) 0; }
.card-foot, .cardfoot{ display: flex; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--sp-4); }
.grid > .card{ margin-bottom: 0; }
.grid-2{ display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--sp-4); margin-bottom: var(--sp-4); align-items: start; }
.grid-2 > .card{ margin-bottom: 0; }
.stack{ display: flex; flex-direction: column; gap: var(--sp-4); }
.row{ display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; min-width: 0; }
.spacer{ flex: 1; }

/* KPI tiles */
.tiles{ display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--sp-4); margin-bottom: var(--sp-4); }
.tiles > .card, .tile{ margin-bottom: 0; }
.tile{ display: flex; flex-direction: column; gap: 6px; }
.tile-label, .card > h3:first-child{ font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.tile-value, .stat{ font-size: var(--fs-2xl); font-weight: var(--fw-semibold); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.15; }
.tile-sub{ font-size: var(--fs-xs); color: var(--text-muted); }
.tile-value.is-good{ color: var(--success); } .tile-value.is-warn{ color: var(--warning); } .tile-value.is-bad{ color: var(--danger); }

/* banners */
.banner{ display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); border: 1px solid; font-size: var(--fs-sm); margin-bottom: var(--sp-4); }
.banner > .banner-ico{ margin-top: 2px; }
.banner-body{ flex: 1; min-width: 0; overflow-wrap: anywhere; }
.banner-title{ font-weight: var(--fw-semibold); margin-bottom: 2px; }
.banner > .btn{ flex: none; margin-top: -3px; }
.banner-info{ background: var(--info-soft); border-color: var(--info-border); color: var(--text); } .banner-info > .banner-ico{ color: var(--info); }
.banner-success{ background: var(--success-soft); border-color: var(--success-border); color: var(--text); } .banner-success > .banner-ico{ color: var(--success); }
.banner-warning{ background: var(--warning-soft); border-color: var(--warning-border); color: var(--text); } .banner-warning > .banner-ico{ color: var(--warning); }
.banner-danger{ background: var(--danger-soft); border-color: var(--danger-border); color: var(--text); } .banner-danger > .banner-ico{ color: var(--danger); }

/* badges */
.badge{ display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 var(--sp-2); border-radius: var(--r-full); font-size: var(--fs-2xs); font-weight: var(--fw-medium); line-height: 1; white-space: nowrap; vertical-align: middle;
  background: var(--accent-soft); color: var(--accent-text); border: 1px solid transparent; }
.badge-dot{ width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.badge-neutral{ background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.badge-success{ background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.badge-warning{ background: var(--warning-soft); color: var(--warning); border-color: var(--warning-border); }
.badge-danger{ background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.badge-info{ background: var(--info-soft); color: var(--info); border-color: var(--info-border); }
.badge-accent{ background: var(--accent-soft); color: var(--accent-text); }
/* the ported screens' pills are badges */
.pill{ display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 var(--sp-2); border-radius: var(--r-full); font-size: var(--fs-2xs); font-weight: var(--fw-medium); white-space: nowrap;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.pill.g{ background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.pill.y{ background: var(--warning-soft); color: var(--warning); border-color: var(--warning-border); }
.pill.r{ background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
/* status dot */
.dot{ width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; background: var(--text-muted); vertical-align: 1px; }
.dot.ok{ background: var(--success-solid); } .dot.warn{ background: var(--warning-solid); } .dot.err{ background: var(--danger-solid); }
/* inline status messages: .ok / .warn / .err on a span of text */
.ok:not(.dot), .warn:not(.dot), .err:not(.dot){ display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-md); font-size: var(--fs-xs); font-weight: var(--fw-medium); line-height: 1.5; max-width: 100%; border: 1px solid; }
.ok:not(.dot){ color: var(--success); background: var(--success-soft); border-color: var(--success-border); }
.warn:not(.dot){ color: var(--warning); background: var(--warning-soft); border-color: var(--warning-border); }
.err:not(.dot){ color: var(--danger); background: var(--danger-soft); border-color: var(--danger-border); }
td .ok:not(.dot), td .warn:not(.dot), td .err:not(.dot){ padding: 1px 8px; font-size: var(--fs-2xs); }
.err-inline{ color: var(--danger); font-size: var(--fs-xs); display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.ok-inline{ color: var(--success); font-size: var(--fs-xs); display: inline-flex; align-items: center; gap: 6px; }
code.k, .card code{ background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-xs); padding: 1px 5px; font-size: var(--fs-2xs); color: var(--text-2); overflow-wrap: anywhere; }
pre{ background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-3); overflow: auto; font-size: var(--fs-xs); max-width: 100%; }
kbd{ border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--r-xs); padding: 0 4px; font-size: var(--fs-2xs); background: var(--surface); }

/* ── tables ─────────────────────────────────────────────────────────────────
   Sticky header inside a scrolling .tablewrap (the page never scrolls sideways — the card does), hairline rows,
   no zebra, numerics right-aligned (.num), ids monospace (.mono). */
.tablewrap{ overflow: auto; max-width: 100%; max-height: min(70vh, 680px); border: 1px solid var(--border); border-radius: var(--r-md); -webkit-overflow-scrolling: touch; }
.card > .tablewrap:only-child{ margin: 0; }
.tablewrap.flush{ border: 0; border-radius: 0; }
table{ width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.tablewrap table{ min-width: 560px; }
th, td{ text-align: left; padding: 10px var(--sp-3); border-bottom: 1px solid var(--border); vertical-align: middle; }
th{ position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--text-muted); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
tbody tr:last-child td{ border-bottom: 0; }
tbody tr:hover td{ background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
td.num, th.num{ text-align: right; }
td.mono, .mono{ font-family: var(--font-mono); font-size: var(--fs-xs); }
td .muted{ font-size: inherit; }

/* ── states ─────────────────────────────────────────────────────────────── */
.empty-state{ display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: var(--sp-8) var(--sp-4); color: var(--text-muted); }
.empty-state .empty-ico{ width: 40px; height: 40px; padding: 10px; border-radius: var(--r-lg); background: var(--surface-2); color: var(--text-muted); margin-bottom: var(--sp-2); box-sizing: border-box; }
.empty-title{ font-weight: var(--fw-semibold); color: var(--text); font-size: var(--fs-sm); }
.empty-text{ font-size: var(--fs-xs); max-width: 52ch; }
.skel{ display: block; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--skeleton-a) 0%, var(--skeleton-b) 50%, var(--skeleton-a) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skel-line{ height: 10px; margin: 6px 0; }
.skel-stat{ height: 26px; width: 45%; margin: 6px 0; }
.skel-row{ padding: 10px 0; border-bottom: 1px solid var(--border); }
.skel-row:last-child{ border-bottom: 0; }
@keyframes shimmer{ from{ background-position: 100% 0; } to{ background-position: -100% 0; } }
.ovskel{ display: inline-block; height: 1em; min-width: 48px; border-radius: var(--r-sm); vertical-align: -2px; color: transparent; background: linear-gradient(90deg, var(--skeleton-a), var(--skeleton-b), var(--skeleton-a)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.ovstale{ font-size: 10.5px; opacity: .6; cursor: help; }
.inlspin{ display: inline-block; width: 12px; height: 12px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; margin-right: 7px; }
.spinner{ width: 20px; height: 20px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
.viewload{ display: flex; align-items: center; justify-content: center; min-height: 40vh; }
.viewload i{ display: block; width: 24px; height: 24px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
.live{ display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.live i{ width: 8px; height: 8px; border-radius: 50%; background: var(--success-solid); display: inline-block; animation: blink 2s infinite; }
.live.stale i{ background: var(--danger-solid); animation: none; }
@keyframes blink{ 0%,100%{ opacity: 1; } 50%{ opacity: .3; } }
.bigdot{ width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }

/* ── the ported screens' shared classes, restyled ─────────────────────────────── */
/* .hero is a summary card (the page title itself lives in the page header above the screen) */
.hero{ display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-5); margin-bottom: var(--sp-4); box-shadow: var(--shadow-xs); }
.hero .htitle{ font-size: var(--fs-lg); font-weight: var(--fw-semibold); color: var(--text); }
.legend{ display: flex; gap: var(--sp-4); margin-left: auto; font-size: var(--fs-xs); color: var(--text-muted); flex-wrap: wrap; }
.legend span{ display: inline-flex; align-items: center; gap: 6px; }
.legend i{ width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lead{ font-size: var(--fs-md); line-height: 1.6; color: var(--text-2); margin: 0; }
.note{ display: flex; gap: var(--sp-2); align-items: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-3); font-size: var(--fs-xs); line-height: 1.55; color: var(--text-2); margin-top: var(--sp-3); }
.note .ni{ flex: none; margin-top: 1px; color: var(--text-muted); }
.steps{ counter-reset: s; list-style: none; padding: 0; margin: var(--sp-2) 0 0; }
.steps li{ counter-increment: s; position: relative; padding: var(--sp-2) 0 var(--sp-2) 32px; font-size: var(--fs-sm); border-bottom: 1px solid var(--border); }
.steps li:last-child{ border-bottom: 0; }
.steps li::before{ content: counter(s); position: absolute; left: 0; top: var(--sp-2); width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); display: flex; align-items: center; justify-content: center; }
/* settings-style form rows */
.form{ max-width: none; width: 100%; }
.frow{ display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: var(--sp-5); align-items: center; padding: var(--sp-4) 0; border-bottom: 1px solid var(--border); }
.frow:first-child{ padding-top: 0; }
.frow:last-child{ border-bottom: 0; padding-bottom: 0; }
.frow.top{ align-items: flex-start; }
.flabel, .frow .flabel{ font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text); }
.fhint, .frow .fhint{ font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; line-height: 1.45; }
@media (max-width: 900px){ .frow{ grid-template-columns: 1fr; gap: var(--sp-2); } }
details.collapse > summary{ cursor: pointer; list-style: none; display: flex; align-items: center; gap: var(--sp-2); user-select: none; }
details.collapse > summary::-webkit-details-marker{ display: none; }
details.collapse > summary::before{ content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted); transform: rotate(-45deg); transition: transform var(--dur) var(--ease); }
details.collapse[open] > summary::before{ transform: rotate(45deg); }
.collbody{ margin-top: var(--sp-3); }
.tpill{ display: inline-flex; align-items: center; gap: var(--sp-2); height: 30px; padding: 0 var(--sp-3); border-radius: var(--r-full); background: var(--surface); color: var(--text-2); border: 1px solid var(--border-strong); font-size: var(--fs-xs); cursor: pointer; user-select: none; }
.tpill:hover{ background: var(--surface-2); color: var(--text); }
.tpill .dot{ width: 7px; height: 7px; margin: 0; }
/* bar rows (Overview "Where the work went") */
.stgrow{ display: flex; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-sm); margin-top: var(--sp-3); }
.stgrow:first-of-type{ margin-top: 0; }
.stgname{ overflow-wrap: anywhere; color: var(--text-2); }
.stgval{ font-variant-numeric: tabular-nums; color: var(--text); font-weight: var(--fw-medium); }
.stgbar{ height: 6px; background: var(--surface-2); border-radius: var(--r-full); overflow: hidden; margin-top: 6px; }
.stgbar i{ display: block; height: 100%; background: var(--accent); border-radius: var(--r-full); }
.noteRow{ padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); display: flex; gap: var(--sp-3); }
.noteRow:first-child{ padding-top: 0; }
.noteRow:last-child{ border-bottom: 0; padding-bottom: 0; }
