/* ==========================================================================
   DorkixAI console — design system v5
   Restrained graphite interface for security operations.
   No frameworks, no build step.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* surfaces */
  --bg: #0b0d10;
  --bg-deep: #090b0e;
  --surface: #101318;
  --surface-2: #151920;
  --surface-3: #1a1f27;
  --panel: var(--surface);
  --panel-solid: var(--surface);
  --elev: var(--surface-2);

  /* lines */
  --line: #212831;
  --line-soft: #1a2028;
  --line-strong: #2d3641;

  /* type */
  --text: #e8ecf2;
  --muted: #9aa4b2;
  --dim: #6b7686;
  --faint: #4c5665;

  /* accent (refined indigo) */
  --accent: #7189f7;
  --accent-strong: #556df0;
  --accent-soft: rgba(113, 137, 247, 0.11);
  --accent-line: rgba(113, 137, 247, 0.38);

  /* semantic */
  --green: #3ecf9a;
  --green-soft: rgba(62, 207, 154, 0.1);
  --amber: #d9a441;
  --amber-soft: rgba(217, 164, 65, 0.1);
  --red: #f0566b;
  --red-soft: rgba(240, 86, 107, 0.1);
  --blue: #4b9fd6;
  --blue-soft: rgba(75, 159, 214, 0.1);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, 0.1);
  --orange: #e8873c;

  /* geometry */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 9px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);

  /* type */
  --font: "Inter", "Inter var", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;

  --rail: 236px;
  --topbar: 56px;
}

[data-accent="violet"] { --accent: #7189f7; --accent-strong: #556df0; --accent-soft: rgba(113, 137, 247, 0.11); --accent-line: rgba(113, 137, 247, 0.38); }
[data-accent="cyan"] { --accent: #37b3c4; --accent-strong: #219aab; --accent-soft: rgba(55, 179, 196, 0.11); --accent-line: rgba(55, 179, 196, 0.38); }
[data-accent="emerald"] { --accent: #3cb98a; --accent-strong: #2a9a70; --accent-soft: rgba(60, 185, 138, 0.11); --accent-line: rgba(60, 185, 138, 0.38); }
[data-accent="rose"] { --accent: #e2586c; --accent-strong: #cc4157; --accent-soft: rgba(226, 88, 108, 0.11); --accent-line: rgba(226, 88, 108, 0.38); }

/* ==========================================================================
   base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.5;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "tnum" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(113, 137, 247, 0.32); color: #fff; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.014em; line-height: 1.28; color: var(--text); }
h1 { font-size: 23px; letter-spacing: -0.019em; }
h2 { font-size: 14px; }
h3 { font-size: 13px; }
p { margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: color-mix(in srgb, var(--accent) 74%, #fff); }

.mono { font-family: var(--mono); font-size: 0.96em; font-variant-ligatures: none; }
.dim { color: var(--dim); }
.muted { color: var(--muted); }
.sub { color: var(--muted); font-size: 13px; line-height: 1.55; }
.hint { color: var(--dim); font-size: 12px; line-height: 1.55; }
.hint strong { color: var(--muted); font-weight: 550; }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.err { color: var(--red); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 550; letter-spacing: 0.02em;
  color: var(--dim);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft);
  flex: none;
}

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: #303945 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: #2a323d; border-radius: 8px;
  border: 3px solid transparent; background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: #3b4553; background-clip: content-box; }

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 80%, #fff);
  outline-offset: 1px;
  border-radius: var(--radius-xs);
}

/* ==========================================================================
   app shell
   ========================================================================== */

.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail);
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 12px 14px;
  background: var(--bg-deep);
  border-right: 1px solid var(--line-soft);
  z-index: 40;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 16px;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  color: var(--accent);
}
.brand-mark svg {
  width: 27px; height: 27px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.brand-text { min-width: 0; }
.brand-text strong {
  display: block; font-size: 14px; font-weight: 650; letter-spacing: -0.01em;
  line-height: 1.2;
}
.brand-text strong span { color: var(--accent); }
.brand-text small {
  display: block; margin-top: 2px;
  font-size: 9px; font-weight: 600; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--faint);
  white-space: nowrap;
}

.nav { display: flex; flex-direction: column; gap: 1px; padding: 0 2px; }
.nav-group-label {
  padding: 16px 10px 6px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--faint);
}
.nav-group-label:first-child { padding-top: 4px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  height: 33px; padding: 0 10px;
  border-radius: var(--radius-sm);
  color: var(--muted); font-size: 13px; font-weight: 450;
  transition: background 0.13s ease, color 0.13s ease;
}
.nav-item .icon { width: 16px; height: 16px; opacity: 0.72; flex: none; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item:hover .icon { opacity: 0.95; }
.nav-item.active {
  background: var(--surface-2);
  color: var(--text); font-weight: 500;
}
.nav-item.active::before {
  content: ""; position: absolute; left: -2px; top: 8px; bottom: 8px;
  width: 2px; border-radius: 2px; background: var(--accent);
}
.nav-item.active .icon { color: var(--accent); opacity: 1; }
.nav-count {
  margin-left: auto;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: -0.02em;
  color: var(--dim); font-variant-numeric: tabular-nums;
  padding: 1px 6px; border-radius: var(--radius-xs);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}
.nav-item.active .nav-count { color: var(--muted); border-color: var(--line); }

.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

.scanner-card {
  display: block; padding: 10px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  transition: border-color 0.13s ease, background 0.13s ease;
}
.scanner-card:hover { border-color: var(--line); background: var(--surface-2); }
.scanner-row { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.scanner-label { font-weight: 550; color: var(--muted); }
.scanner-state {
  margin-left: auto; font-family: var(--mono); font-size: 10px;
  color: var(--dim); text-transform: lowercase;
}
.scanner-sub {
  margin-top: 5px; padding-left: 14px;
  font-size: 10.5px; color: var(--faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--mono);
}

.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: var(--green); box-shadow: 0 0 0 2px var(--green-soft); }
.dot.warn { background: var(--amber); box-shadow: 0 0 0 2px var(--amber-soft); }
.dot.bad { background: var(--red); box-shadow: 0 0 0 2px var(--red-soft); }
.dot.busy { background: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); animation: pulseDot 2s infinite; }

.rail-meta {
  display: flex; align-items: center; gap: 6px;
  padding: 0 9px; font-size: 10px; color: var(--faint);
  font-family: var(--mono);
}
.rail-meta-dot { opacity: 0.6; }

.shell {
  margin-left: var(--rail); min-height: 100vh;
  display: flex; flex-direction: column;
  position: relative; z-index: 1;
}

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  height: var(--topbar); padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px) saturate(120%);
  border-bottom: 1px solid var(--line-soft);
}
.crumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--dim); min-width: 0;
}
.crumb-root { color: var(--dim); }
.crumb-sep { width: 11px; height: 11px; opacity: 0.6; transform: none; }
#crumbCurrent { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.nav-toggle {
  display: none; width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle:hover { color: var(--text); border-color: var(--line-strong); }
.nav-toggle .icon { width: 17px; height: 17px; }

.live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 26px; padding: 0 10px;
  border-radius: 999px; font-size: 11px; font-weight: 550;
  color: #8fd6ff;
  background: rgba(75, 159, 214, 0.09);
  border: 1px solid rgba(75, 159, 214, 0.28);
  letter-spacing: 0.01em;
}
.pulse {
  width: 5px; height: 5px; border-radius: 50%;
  background: #67c2f5; animation: pulseDot 1.8s infinite;
}
.pulse-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px var(--green-soft);
  flex: none;
}

.wallet-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 12px; font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  transition: border-color 0.13s ease, background 0.13s ease;
}
.wallet-chip:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.wallet-chip .icon { color: var(--green); }
.wallet-chip-label {
  font-family: var(--font); font-size: 10.5px; color: var(--dim);
  letter-spacing: 0.01em; margin-right: 1px;
}

.account-chip { display: inline-flex; align-items: center; gap: 8px; padding-left: 4px; }
.account-avatar {
  width: 28px; height: 28px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.account-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.account-email {
  font-size: 11.5px; color: var(--muted);
  max-width: 176px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-role {
  font-size: 9.5px; color: var(--faint); text-transform: uppercase;
  letter-spacing: 0.07em;
}
.account-chip .btn.quiet { color: var(--dim); }
.account-chip .btn.quiet:hover { color: var(--text); }

.view {
  flex: 1; width: 100%; max-width: 1400px;
  margin: 0 auto; padding: 28px 32px 80px;
}
.page { display: flex; flex-direction: column; gap: 0; }

/* ==========================================================================
   buttons, pills, tags
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font: inherit; font-size: 12.5px; font-weight: 500; letter-spacing: -0.002em;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer; white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn:hover { background: var(--surface-3); border-color: var(--line-strong); }
.btn:active { background: var(--surface-2); }
.btn[disabled], .btn.loading { opacity: 0.55; pointer-events: none; }
.btn .icon { width: 14px; height: 14px; }

.btn.primary {
  background: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent-strong) 80%, #000);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.btn.primary:hover {
  background: color-mix(in srgb, var(--accent-strong) 90%, #fff);
  border-color: var(--accent-strong);
}
.btn.ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--muted);
}
.btn.ghost:hover { background: var(--surface-2); color: var(--text); border-color: #3a4450; }
.btn.quiet {
  background: transparent; border-color: transparent;
  color: var(--dim); padding: 0 8px;
}
.btn.quiet:hover { background: var(--surface-2); color: var(--text); }
.btn.danger {
  background: transparent;
  border-color: rgba(240, 86, 107, 0.28);
  color: #f08b98;
}
.btn.danger:hover { background: rgba(240, 86, 107, 0.08); border-color: rgba(240, 86, 107, 0.45); color: #ffb4be; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: var(--radius-sm); }
.btn.lg { height: 36px; padding: 0 16px; font-size: 13px; }
.btn.block { width: 100%; }

.icon-btn {
  width: 28px; height: 28px;
  display: inline-grid; place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim); cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--line-strong); }
.icon-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.icon-btn.danger:hover { color: #f08b98; border-color: rgba(240, 86, 107, 0.4); }

.icon {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.icon.sm { width: 13px; height: 13px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 7px;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  font-size: 10.5px; font-weight: 550; letter-spacing: 0.01em;
  background: var(--surface-2); color: var(--muted);
  white-space: nowrap;
  text-transform: capitalize;
}
.pill .dot, .pill .pulse { width: 5px; height: 5px; }
.pill.green { background: var(--green-soft); color: #6fdcb4; border-color: rgba(62, 207, 154, 0.22); }
.pill.amber { background: var(--amber-soft); color: #e4be74; border-color: rgba(217, 164, 65, 0.22); }
.pill.red { background: var(--red-soft); color: #f58d9b; border-color: rgba(240, 86, 107, 0.24); }
.pill.blue { background: var(--blue-soft); color: #85c4e8; border-color: rgba(75, 159, 214, 0.24); }
.pill.violet { background: var(--violet-soft); color: #c3b1fb; border-color: rgba(167, 139, 250, 0.24); }
.pill.gray { background: var(--surface-2); color: var(--dim); border-color: var(--line-soft); }
.pill.blue .pulse { background: #67c2f5; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 19px; padding: 0 6px;
  border-radius: var(--radius-xs);
  font-size: 10.5px; color: var(--dim);
  background: transparent;
  border: 1px solid var(--line);
  white-space: nowrap;
  font-family: var(--mono);
}
.tag.mono { font-size: 10px; }

/* ==========================================================================
   surfaces
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card.pad { padding: 18px; }
.card-h {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 16px 18px 0;
}
.card-h h2 { font-size: 13.5px; }
.card-h .sub { font-size: 12px; margin-top: 2px; }
.card-body { padding: 14px 18px 18px; }
.card > h2 { padding: 16px 18px 0; }
.card.pad > h2:first-child { padding: 0; }

.grid { display: grid; gap: 14px; }
.grid > * { min-width: 0; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid .span-2 { grid-column: span 2; }

.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; min-width: 0; }

.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }

/* ==========================================================================
   page headers, chips, KPI, hero
   ========================================================================== */

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 20px; flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.page-head > div:first-child { min-width: 0; }
.page-head h1 { font-size: 22px; margin-top: 4px; }
.page-head .sub { margin-top: 5px; max-width: 68ch; }
.page-head .eyebrow { color: var(--dim); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--dim); font: inherit; font-size: 12px; font-weight: 450;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.chip:hover { color: var(--text); background: var(--surface-2); }
.chip.active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
}
.chip .count {
  font-family: var(--mono); font-size: 10px; color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.chip.active .count { color: var(--muted); }

.time-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.search-bar { position: relative; display: flex; align-items: center; }
.search-bar .icon {
  position: absolute; left: 10px; width: 14px; height: 14px;
  color: var(--dim); pointer-events: none;
}
.search-bar .input { padding-left: 31px; height: 32px; }

/* hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.014), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0 auto auto 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--accent-line), transparent 55%);
  opacity: 0.55;
}
.hero-copy { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.hero .eyebrow { color: var(--muted); }
.hero .eyebrow::before { box-shadow: none; }
.hero h1 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -0.022em; margin-top: 2px; }
.hero .sub { max-width: 58ch; font-size: 13.5px; color: var(--muted); }
.hero-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.hero-actions .btn { height: 32px; }

.hero-panel {
  align-self: stretch;
  display: flex; flex-direction: column;
  padding: 2px 14px 12px;
  border-radius: var(--radius);
  background: var(--bg-deep);
  border: 1px solid var(--line-soft);
  position: relative; z-index: 1;
}
.hero-panel-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px; color: var(--dim);
}
.hero-panel-row:last-of-type { border-bottom: 0; }
.hero-panel-row strong {
  color: var(--text); font-size: 13.5px; font-weight: 600;
  letter-spacing: -0.005em; font-variant-numeric: tabular-nums;
}
.hero-panel .btn { margin-top: auto; }

.hero-stats { display: flex; gap: 26px; margin-top: 6px; flex-wrap: wrap; }
.hero-stat .v { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.hero-stat .l { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }

.kpi { padding: 15px 16px 13px; display: flex; flex-direction: column; gap: 2px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label {
  font-size: 10.5px; font-weight: 550; letter-spacing: 0.055em;
  text-transform: uppercase; color: var(--dim);
}
.kpi-icon {
  width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: var(--radius-xs);
  color: var(--dim);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}
.kpi-icon .icon { width: 13px; height: 13px; }
.kpi-icon.danger { color: #f08b98; background: var(--red-soft); border-color: rgba(240, 86, 107, 0.2); }
.kpi-value {
  font-size: 27px; font-weight: 640; letter-spacing: -0.03em; line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.kpi-value small { font-size: 12px; color: var(--dim); font-weight: 500; margin-left: 2px; letter-spacing: 0; }
.kpi-foot { font-size: 11.5px; color: var(--faint); }
.kpi-foot strong { color: var(--muted); font-weight: 550; }

.mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.mini-stat { padding: 13px 15px; background: var(--surface); }
.mini-stat .l { font-size: 10px; letter-spacing: 0.055em; text-transform: uppercase; color: var(--dim); font-weight: 550; }
.mini-stat .v { font-size: 21px; font-weight: 620; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.mini-stat .v small { font-size: 11px; color: var(--faint); font-weight: 500; }

.recon-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.recon-chip {
  flex: 1 1 100px; padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background: var(--bg-deep);
}
.recon-chip .v { font-size: 17px; font-weight: 620; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.recon-chip .l { font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin-top: 1px; }

/* ==========================================================================
   tables
   ========================================================================== */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table th {
  text-align: left; font-weight: 550; color: var(--faint);
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-soft);
  border-top: 1px solid var(--line-soft);
  white-space: nowrap; background: var(--bg-deep);
}
table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
  color: var(--muted);
}
table td .mono { color: var(--text); }
table tbody tr:last-child td { border-bottom: 0; }
table tbody tr { transition: background 0.1s ease; }
table.data tbody tr:hover { background: rgba(255, 255, 255, 0.018); }
tr.clickable { cursor: pointer; }
tr.clickable .icon { transition: color 0.12s ease, transform 0.12s ease; }
tr.clickable:hover .icon { color: var(--muted) !important; transform: translateX(1px); }

.td-target { display: flex; align-items: center; gap: 10px; min-width: 0; }
.td-target .name {
  font-weight: 550; font-size: 12.5px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px;
}
.td-target .meta {
  font-size: 10.5px; color: var(--faint); font-family: var(--mono);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px;
  margin-top: 1px;
}
.tile {
  width: 28px; height: 28px; border-radius: var(--radius-sm); flex: none;
  display: grid; place-items: center;
  font-weight: 600; font-size: 12px; color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-transform: uppercase;
}

/* ==========================================================================
   charts
   ========================================================================== */

.chart { padding-top: 4px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .bar { fill: var(--accent); opacity: 0.85; transition: opacity 0.12s ease; }
.chart .bar:hover { opacity: 1; }
.chart .bar-empty { fill: #242c36; }
.chart .axis { fill: var(--faint); font-size: 9px; font-family: var(--font); letter-spacing: 0.02em; }
.chart-legend {
  display: flex; align-items: center; gap: 14px;
  margin-top: 8px; padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 10.5px; color: var(--faint);
}
.legend-key { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }

.donut-wrap { display: flex; align-items: center; gap: 22px; padding: 4px 0; }
.donut {
  width: 124px; height: 124px; flex: none; position: relative;
  border-radius: 50%; display: grid; place-items: center;
}
.donut::after {
  content: ""; position: absolute; inset: 18px; border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-soft);
}
.donut-center { position: relative; z-index: 1; display: grid; place-items: center; text-align: center; }
.donut-center .n {
  font-size: 23px; font-weight: 640; letter-spacing: -0.03em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.donut-center .l { font-size: 9px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 3px; }
.legend { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--dim); }
.legend-row .sw { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.legend-row .lbl { flex: 1; }
.legend-row .val { font-family: var(--mono); color: var(--text); font-size: 11px; font-variant-numeric: tabular-nums; }

/* severity */
.sev {
  display: inline-flex; align-items: center;
  height: 18px; padding: 0 5px;
  border-radius: var(--radius-xs);
  font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: 0.04em;
}
.sev.CRITICAL { color: #ffb3bd; background: rgba(240, 86, 107, 0.16); box-shadow: inset 0 0 0 1px rgba(240, 86, 107, 0.22); }
.sev.HIGH { color: #f6c094; background: rgba(232, 135, 60, 0.14); box-shadow: inset 0 0 0 1px rgba(232, 135, 60, 0.2); }
.sev.MEDIUM { color: #ecd08a; background: rgba(217, 164, 65, 0.12); box-shadow: inset 0 0 0 1px rgba(217, 164, 65, 0.18); }
.sev.LOW { color: #a4cfe8; background: rgba(75, 159, 214, 0.12); box-shadow: inset 0 0 0 1px rgba(75, 159, 214, 0.18); }
.sev.INFO { color: #a8b3c2; background: rgba(154, 164, 178, 0.1); box-shadow: inset 0 0 0 1px rgba(154, 164, 178, 0.14); }
.sev-dots { display: inline-flex; gap: 3px; margin-right: 6px; vertical-align: middle; }
.sev-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.sev-dot.CRITICAL { background: #f0566b; } .sev-dot.HIGH { background: #e8873c; }
.sev-dot.MEDIUM { background: #d9a441; } .sev-dot.LOW { background: #4b9fd6; }
.sev-dot.INFO { background: #6b7686; }
.sev-count { font-family: var(--mono); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* finding totals strip */
.finding-strip-wrap { margin: 0 0 14px; }
.run-head .finding-strip-wrap { margin-bottom: 0; }
.finding-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 11px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
}
.finding-strip-total {
  font-size: 11.5px; color: var(--dim); font-weight: 450;
  padding-right: 10px; border-right: 1px solid var(--line-soft);
  display: inline-flex; align-items: baseline; gap: 5px;
}
.finding-strip-total strong {
  color: var(--text); font-family: var(--mono); font-size: 13px;
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.finding-strip-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.finding-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  border-radius: var(--radius-xs);
  font-size: 10px; font-weight: 550; letter-spacing: 0.02em;
  border: 1px solid transparent; color: var(--muted);
  background: var(--surface-2);
}
.finding-chip strong { font-family: var(--mono); font-size: 10.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.finding-chip-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
.finding-chip.CRITICAL { color: #f5a1ab; background: rgba(240, 86, 107, 0.08); border-color: rgba(240, 86, 107, 0.2); }
.finding-chip.CRITICAL .finding-chip-dot { background: #f0566b; }
.finding-chip.HIGH { color: #f0b489; background: rgba(232, 135, 60, 0.07); border-color: rgba(232, 135, 60, 0.18); }
.finding-chip.HIGH .finding-chip-dot { background: #e8873c; }
.finding-chip.MEDIUM { color: #e5c67e; background: rgba(217, 164, 65, 0.06); border-color: rgba(217, 164, 65, 0.16); }
.finding-chip.MEDIUM .finding-chip-dot { background: #d9a441; }
.finding-chip.LOW { color: #96c6e3; background: rgba(75, 159, 214, 0.06); border-color: rgba(75, 159, 214, 0.16); }
.finding-chip.LOW .finding-chip-dot { background: #4b9fd6; }
.finding-chip.zero { opacity: 0.4; }

/* ==========================================================================
   forms
   ========================================================================== */

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label, .field > span, .field-label {
  font-size: 12px; letter-spacing: 0; text-transform: none;
  color: var(--muted); font-weight: 500;
}
.field .hint { margin-top: 1px; }
.field-label {
  display: block;
  font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--faint); font-weight: 600;
  margin-bottom: 8px;
}

.input, .field input, .field select, .field textarea, select, input[type="text"], input[type="email"], input[type="password"], input[type="number"] {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  height: 33px;
  color: var(--text); font: inherit; font-size: 13px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.field textarea, textarea.input {
  height: auto; min-height: 76px; resize: vertical;
  line-height: 1.55; padding: 8px 10px;
}
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-strong); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, select:focus, textarea:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--surface);
}
.field input::placeholder, .input::placeholder, textarea::placeholder { color: #5a6472; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7686' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 30px;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.field.full { grid-column: 1 / -1; }
.req { color: #f08b98; font-weight: 600; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.55; }

.check {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  cursor: pointer;
  font-size: 12.5px; color: var(--muted); line-height: 1.5;
  transition: border-color 0.12s ease;
}
.check:hover { border-color: var(--line); }
.check input { margin: 2px 0 0; accent-color: var(--accent-strong); width: 14px; height: 14px; flex: none; }
.check strong { color: var(--text); font-weight: 550; }

.mode-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mode-card {
  position: relative; display: block; padding: 12px 13px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-deep);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.mode-card:hover { border-color: var(--line-strong); }
.mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.mode-card strong { display: block; font-size: 12.5px; color: var(--text); font-weight: 550; }
.mode-card span { display: block; color: var(--dim); font-size: 11.5px; margin-top: 3px; line-height: 1.5; padding-right: 26px; }
.mode-card:has(input:checked) {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.mode-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.mode-icon {
  position: absolute; top: 11px; right: 11px;
  width: 20px; height: 20px; display: grid; place-items: center;
  color: var(--faint); background: none; border: 0;
}
.mode-card:has(input:checked) .mode-icon { color: var(--accent); }
.mode-card .mode-icon .icon { width: 15px; height: 15px; }

.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.switch-row:last-child { border-bottom: 0; }
.switch-copy strong { display: block; font-size: 12.5px; font-weight: 500; color: var(--text); }
.switch-copy span { display: block; font-size: 11.5px; color: var(--dim); margin-top: 1px; }
.switch { position: relative; display: inline-flex; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch .track {
  width: 32px; height: 19px; border-radius: 999px;
  background: #2b333e;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  transition: background 0.15s ease; position: relative;
}
.switch .thumb {
  position: absolute; top: 3px; left: 3px;
  width: 13px; height: 13px; border-radius: 50%;
  background: #aeb8c6;
  transition: transform 0.15s ease, background 0.15s ease;
  pointer-events: none;
}
.switch input:checked + .track { background: var(--accent-strong); }
.switch input:checked + .track + .thumb { transform: translateX(13px); background: #fff; }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

.cred-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.cred-row .input { flex: 1; }

.time-chip {
  height: 28px; padding: 0 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: transparent;
  color: var(--dim); font: inherit; font-size: 11.5px; cursor: pointer;
  font-family: var(--mono);
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.time-chip:hover { color: var(--text); border-color: var(--line-strong); }
.time-chip.active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--accent-line);
  box-shadow: inset 0 0 0 1px var(--accent-soft);
}

/* ==========================================================================
   run view
   ========================================================================== */

.run-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.run-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.run-title h1 { font-size: 21px; letter-spacing: -0.02em; }
.run-sub {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  color: var(--dim); font-size: 11.5px; margin-top: 5px;
}
.run-sub .sep { opacity: 0.45; }
.run-sub .mono { color: var(--muted); font-size: 11px; }
.run-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.tabs {
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 16px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px;
  font-size: 12.5px; font-weight: 450; color: var(--dim);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.tab .icon { width: 13px; height: 13px; opacity: 0.7; }
.tab:hover { color: var(--text); }
.tab:hover .icon { opacity: 1; }
.tab.active {
  color: var(--text); font-weight: 500;
  border-bottom-color: var(--accent);
}
.tab.active .icon { color: var(--accent); opacity: 1; }

.phases { display: flex; flex-direction: column; gap: 0; }
.phase {
  display: flex; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.phase:last-child { border-bottom: 0; }
.phase-dot {
  width: 7px; height: 7px; border-radius: 50%;
  margin-top: 5px; flex: none;
  background: #39424f;
}
.phase-dot.done, .phase-dot.complete { background: var(--green); box-shadow: 0 0 0 2px var(--green-soft); }
.phase-dot.running { background: var(--accent); animation: pulseDot 1.8s infinite; }
.phase-dot.pending { background: #39424f; }
.phase-dot.failed, .phase-dot.error { background: var(--red); box-shadow: 0 0 0 2px var(--red-soft); }
.phase-body { flex: 1; min-width: 0; }
.phase-title { font-size: 12.5px; font-weight: 500; color: var(--text); }
.phase-meta { display: flex; gap: 12px; font-size: 10.5px; color: var(--faint); margin-top: 2px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.phase-meta .err { color: #f08b98; }

.track { height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.track.sm { height: 3px; }
.track .fill {
  height: 100%; border-radius: 999px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.budget { padding: 18px; }
.budget-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.budget-top .big { font-size: 23px; font-weight: 640; letter-spacing: -0.025em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.budget-top > .dim { text-align: right; white-space: nowrap; padding-bottom: 1px; }
.budget-top .big small {
  display: block; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint); font-weight: 550; margin-top: 3px;
}
.budget-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; font-size: 11px; color: var(--faint); }
.scan-paused-banner { border-color: rgba(217, 164, 65, 0.3); }

/* ==========================================================================
   console
   ========================================================================== */

.console-card { padding: 0; position: relative; background: var(--bg-deep); }
.console-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
  font-family: var(--font); font-size: 10.5px; color: var(--dim);
}
.console-title { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 550; color: var(--text); }
.console-title .icon { color: var(--dim); }
.console-sub { font-size: 10.5px; color: var(--faint); font-family: var(--mono); }
.console-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.console-filter {
  width: 190px; height: 28px; padding: 0 10px;
  font-size: 11.5px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font); outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.console-filter:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.console-filter::placeholder { color: #5a6472; }

.console {
  height: min(62vh, 560px); overflow: auto;
  padding: 8px 0 14px;
  background: #080a0d;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6;
  position: relative;
  color: #b8c1cd;
}
.console-empty {
  padding: 36px 18px; color: var(--faint);
  font-family: var(--font); font-size: 12.5px; text-align: center;
}
.log-line {
  display: flex; gap: 10px; padding: 0 14px;
  white-space: pre-wrap; word-break: break-word;
}
.log-line:hover { background: rgba(255, 255, 255, 0.02); }
.log-line .lg {
  color: #3d4653; user-select: none; flex: none; width: 34px;
  text-align: right; font-size: 10px; padding-top: 1px;
  font-variant-numeric: tabular-nums;
}
.log-line > span:not(.lg) { min-width: 0; }
.ansi-bold { font-weight: 700; color: #e8ecf2; }
.ansi-dim { opacity: 0.6; }
.ansi-red, .ansi-bright-red { color: #f07183; }
.ansi-green { color: #6fdcb4; }
.ansi-yellow { color: #e4be74; }
.ansi-blue { color: #85c4e8; }
.ansi-magenta { color: #c3b1fb; }
.ansi-cyan { color: #78d3e0; }
.ansi-white { color: #e8ecf2; }
.ansi-bg-red { background: rgba(240, 86, 107, 0.22); }

.jump-latest {
  position: absolute; bottom: 46px; left: 50%; transform: translateX(-50%);
  display: flex; width: fit-content; z-index: 5;
  height: 26px; align-items: center;
  padding: 0 11px; border-radius: var(--radius-sm);
  font-size: 11px; font-family: var(--font);
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  color: var(--text); cursor: pointer;
}
.console-foot {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 7px 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 10px; color: var(--faint);
  font-family: var(--mono);
  background: var(--surface);
}

/* ==========================================================================
   findings
   ========================================================================== */

.finding {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  overflow: hidden;
  transition: border-color 0.12s ease;
}
.finding:hover { border-color: var(--line); }
.finding + .finding { margin-top: 7px; }
.finding > summary {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px;
  cursor: pointer; list-style: none;
}
.finding > summary::-webkit-details-marker { display: none; }
.finding[open] > summary {
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
.f-main { flex: 1; min-width: 0; }
.f-title { font-weight: 500; font-size: 12.5px; color: var(--text); }
.f-url {
  font-size: 10.5px; color: var(--faint);
  font-family: var(--mono); margin-top: 2px;
  overflow-wrap: anywhere;
}
.f-chev { color: var(--faint); transition: transform 0.15s ease; flex: none; width: 14px; height: 14px; }
.finding[open] .f-chev { transform: rotate(90deg); }
.f-body { padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.f-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.f-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.f-section { margin-top: 12px; }
.f-section .lbl {
  font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--faint); font-weight: 600; margin-bottom: 5px;
}
.f-section p { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.f-evidence { margin-top: 12px; }
.f-evidence summary {
  cursor: pointer; color: var(--dim); font-size: 12px;
  padding: 5px 0; list-style: none;
}
.f-evidence summary::-webkit-details-marker { display: none; }
.f-evidence summary::before { content: "▸ "; color: var(--faint); }
.f-evidence[open] summary::before { content: "▾ "; }
.steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.steps li { font-size: 12px; color: var(--muted); line-height: 1.55; padding-left: 2px; }
.steps li::marker { color: var(--faint); font-family: var(--mono); font-size: 10.5px; }
.evidence {
  background: #080a0d;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--mono); font-size: 11px; line-height: 1.55;
  color: #b8c1cd;
  overflow-x: auto; white-space: pre-wrap; word-break: break-word; margin: 0;
}
.findings-list { display: flex; flex-direction: column; gap: 7px; }

/* ==========================================================================
   alerts, empty states, skeletons, toasts
   ========================================================================== */

.alert {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px; line-height: 1.55;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
}
.alert .icon { flex: none; margin-top: 1px; color: var(--dim); width: 15px; height: 15px; }
.alert.danger { background: rgba(240, 86, 107, 0.06); border-color: rgba(240, 86, 107, 0.24); color: #f3b3bb; }
.alert.danger .icon { color: #f07183; }
.alert.warn { background: rgba(217, 164, 65, 0.055); border-color: rgba(217, 164, 65, 0.22); color: #e8cf9c; }
.alert.warn .icon { color: var(--amber); }
.alert strong { color: var(--text); font-weight: 550; }
.alert a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.empty { text-align: center; padding: 44px 20px; }
.empty-icon {
  width: 38px; height: 38px; border-radius: var(--radius);
  margin: 0 auto 12px;
  display: grid; place-items: center;
  color: var(--dim);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.empty-icon .icon { width: 18px; height: 18px; }
.empty h3 { font-size: 13px; margin-bottom: 4px; }
.empty p { color: var(--dim); font-size: 12px; max-width: 46ch; margin: 0 auto 14px; line-height: 1.55; }

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease infinite;
  height: 14px;
}
.skeleton.h1 { height: 28px; width: 260px; margin-bottom: 20px; }
.skeleton.row { height: 92px; }
.loading-page { display: flex; flex-direction: column; gap: 14px; padding: 4px 0; }

.toasts {
  position: fixed; right: 18px; bottom: 18px;
  display: flex; flex-direction: column; gap: 7px;
  z-index: 80; max-width: 360px;
}
.toast {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px; line-height: 1.45;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  box-shadow: var(--shadow);
  animation: toastIn 0.16s ease;
  cursor: default;
}
.toast .icon { width: 14px; height: 14px; margin-top: 2px; flex: none; }
.toast.ok { border-color: rgba(62, 207, 154, 0.34); color: #bcebd8; }
.toast.ok .icon { color: var(--green); }
.toast.err { border-color: rgba(240, 86, 107, 0.36); color: #f5c0c6; }
.toast.err .icon { color: var(--red); }
.toast.info { color: var(--muted); }
.toast.info .icon { color: var(--dim); }
.toast.leaving { animation: toastOut 0.2s ease forwards; }

/* ==========================================================================
   markdown report
   ========================================================================== */

.md {
  font-size: 13px; color: var(--muted); line-height: 1.7;
  max-width: 860px;
}
.md h1 { font-size: 21px; color: var(--text); margin: 24px 0 10px; }
.md h2 {
  font-size: 15.5px; color: var(--text);
  margin: 26px 0 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
}
.md h3 { font-size: 13.5px; color: var(--text); margin: 20px 0 7px; }
.md h4 {
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint); margin: 16px 0 5px;
}
.md p { margin: 8px 0; }
.md ul, .md ol { margin: 8px 0; padding-left: 20px; }
.md li { margin: 4px 0; }
.md ol li::marker { color: var(--faint); font-family: var(--mono); font-size: 11.5px; }
.md code {
  font-family: var(--mono); font-size: 11.5px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  padding: 1px 4px; border-radius: var(--radius-xs);
  color: #d6dce5;
}
.md pre {
  background: #080a0d;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  overflow-x: auto; margin: 10px 0;
}
.md pre code { background: none; border: 0; padding: 0; font-size: 11px; }
.md table { margin: 12px 0; font-size: 12px; }
.md th { background: var(--surface-2); }
.md blockquote {
  margin: 12px 0; padding: 9px 14px;
  border-left: 2px solid var(--accent-line);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.md a { text-decoration: underline; text-underline-offset: 2px; }
.md strong { color: var(--text); font-weight: 600; }
.md hr { border: 0; border-top: 1px solid var(--line-soft); margin: 20px 0; }

/* ==========================================================================
   wallet, settings, account
   ========================================================================== */

.wallet-card {
  padding: 18px;
  display: flex; flex-direction: column; gap: 3px;
  background:
    linear-gradient(135deg, var(--accent-soft), transparent 55%),
    var(--surface);
}
.wallet-label {
  font-size: 10.5px; font-weight: 550; letter-spacing: 0.055em;
  text-transform: uppercase; color: var(--dim);
}
.wallet-value {
  font-size: 34px; font-weight: 640; letter-spacing: -0.035em;
  line-height: 1.1; font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.wallet-note { font-size: 11.5px; color: var(--dim); margin-top: 2px; line-height: 1.5; }
.wallet-actions { margin-top: 14px; }

.set-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
}
.set-row:last-child { border-bottom: 0; }
.set-row .lbl { color: var(--dim); }
.set-row .val { color: var(--text); text-align: right; overflow-wrap: anywhere; font-size: 12.5px; }
.status-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 12.5px; }
.status-row .dim { color: var(--dim); }
.status-row .val { color: var(--muted); text-align: right; }

.swatches { display: flex; gap: 7px; }
.swatch {
  width: 20px; height: 20px; border-radius: var(--radius-xs);
  cursor: pointer; border: 2px solid transparent; padding: 0;
  outline: 1px solid var(--line);
  outline-offset: 1px;
}
.swatch.violet { background: linear-gradient(135deg, #8e9cf8, #556df0); }
.swatch.cyan { background: linear-gradient(135deg, #5fc3d1, #219aab); }
.swatch.emerald { background: linear-gradient(135deg, #60c9a1, #2a9a70); }
.swatch.rose { background: linear-gradient(135deg, #e98a99, #cc4157); }
.swatch.active { outline: 2px solid var(--text); outline-offset: 2px; }

/* request lab */
.request-editor {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  min-height: 320px;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
}
.request-preview .set-row .val { max-width: 62%; }
.request-flag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--violet);
  font-family: var(--mono);
}
.request-flag .dot { width: 5px; height: 5px; }

/* guidance composer */
.guidance {
  display: flex; gap: 7px; align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}
.guidance .input { flex: 1; height: 32px; }
.guidance .btn { height: 32px; white-space: nowrap; }

/* ==========================================================================
   files
   ========================================================================== */

.file-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.11s ease;
}
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: rgba(255, 255, 255, 0.02); }
.file-row .icon { color: var(--faint); flex: none; width: 14px; height: 14px; }
.file-row .fpath {
  flex: 1; font-family: var(--mono); font-size: 11px;
  color: var(--muted); overflow-wrap: anywhere;
}
.file-row .fsize {
  font-family: var(--mono); font-size: 10px;
  color: var(--faint); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fa { display: inline-flex; color: var(--faint); padding: 3px; border-radius: 4px; }
.fa:hover { color: var(--text); background: var(--surface-2); }

/* ==========================================================================
   auth
   ========================================================================== */

.auth-shell {
  min-height: 100vh;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  background: var(--bg);
  position: relative; z-index: 1;
}
.auth-hero {
  position: relative;
  padding: 36px 48px 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--bg-deep);
  border-right: 1px solid var(--line-soft);
  overflow: hidden;
}
.auth-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(560px 480px at 18% 32%, #000 0%, transparent 78%);
  opacity: 0.5;
  pointer-events: none;
}
.auth-hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 220px;
  background: linear-gradient(0deg, var(--bg-deep), transparent);
  pointer-events: none;
}
.auth-hero-top { position: relative; z-index: 1; }
.auth-hero .brand { padding: 0; }
.auth-hero .brand-text strong { font-size: 15px; }
.auth-hero-body { position: relative; z-index: 1; margin: 48px 0; max-width: 480px; }
.auth-hero h2 {
  font-size: clamp(25px, 2.6vw, 32px);
  letter-spacing: -0.025em; line-height: 1.22;
  margin-top: 12px; max-width: 20ch;
}
.auth-hero p {
  color: var(--muted); margin-top: 12px;
  max-width: 46ch; font-size: 13.5px; line-height: 1.65;
}
.auth-points { display: flex; flex-direction: column; gap: 14px; margin-top: 30px; }
.auth-point { display: flex; gap: 11px; align-items: flex-start; }
.auth-point-icon {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--dim);
}
.auth-point-icon .icon { width: 13px; height: 13px; }
.auth-point strong { display: block; font-size: 12.5px; font-weight: 550; color: var(--text); }
.auth-point span { display: block; font-size: 12px; color: var(--dim); margin-top: 1px; }
.auth-hero-foot {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.auth-legal { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.auth-legal .icon { color: var(--dim); }
.auth-legal-dim { font-size: 10.5px; color: var(--faint); }

.auth-form-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 32px;
  background: var(--bg);
}
.auth-card { width: min(360px, 100%); }
.auth-brand { display: flex; gap: 11px; align-items: center; margin-bottom: 24px; }
.auth-brand .brand-mark { width: 34px; height: 34px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.auth-brand .brand-mark svg { width: 20px; height: 20px; }
.auth-brand h1 { font-size: 19px; }
.auth-brand .sub { font-size: 12px; margin-top: 3px; }
.auth-card .field { margin-bottom: 13px; }
.auth-card .field > span { font-size: 11.5px; }
.auth-card .btn.primary { height: 36px; margin-top: 4px; font-size: 13px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--dim); }
.auth-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.auth-foot a:hover { color: var(--text); }
.auth-error {
  background: rgba(240, 86, 107, 0.07);
  border: 1px solid rgba(240, 86, 107, 0.28);
  color: #f3b3bb;
  border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: 12px; margin-bottom: 12px;
  line-height: 1.5;
}
.auth-shell .field input { height: 36px; }

/* ==========================================================================
   finding chat
   ========================================================================== */

.finding-chat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 0.85fr);
  gap: 14px;
  align-items: start;
}
.chat-card {
  display: flex; flex-direction: column;
  min-height: 560px;
  max-height: calc(100vh - 220px);
  overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
.chat-head strong { font-size: 12.5px; font-weight: 550; }
.chat-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px var(--green-soft);
}
.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 16px;
  scroll-behavior: smooth;
  background: var(--bg-deep);
}
.chat-msg { display: flex; flex-direction: column; gap: 5px; max-width: 92%; }
.chat-msg.user { align-self: flex-end; align-items: flex-end; }
.chat-msg.assistant { align-self: flex-start; width: 100%; }
.chat-role {
  font-size: 9.5px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--faint); font-weight: 600;
}
.chat-bubble {
  padding: 10px 13px;
  border-radius: var(--radius);
  font-size: 12.5px; line-height: 1.62;
  overflow-wrap: anywhere;
}
.chat-msg.user .chat-bubble {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-bottom-right-radius: 3px;
  color: #dfe4ff;
  white-space: normal;
}
.chat-msg.assistant .chat-bubble {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-bottom-left-radius: 3px;
  width: 100%;
}
.chat-bubble .md { font-size: 12.5px; max-width: none; }
.chat-bubble .md > :first-child { margin-top: 0; }
.chat-bubble .md > :last-child { margin-bottom: 0; }
.chat-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.chat-typing span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--dim); animation: chatBob 1.1s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.16s; }
.chat-typing span:nth-child(3) { animation-delay: 0.32s; }
.chat-error { margin-top: 6px; color: #f08b98; font-size: 11.5px; }
.chat-compose {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 12px 8px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}
.chat-quick { display: flex; flex-wrap: wrap; gap: 5px; }
.chat-quick-chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
  font: inherit; font-size: 11px; line-height: 1.2;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.chat-quick-chip:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.chat-input-wrap {
  display: flex; align-items: flex-end; gap: 7px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-deep);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.chat-input-wrap:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.chat-input {
  flex: 1 1 auto; min-height: 26px; max-height: 180px;
  padding: 5px 0;
  border: 0; border-radius: 0; background: transparent;
  color: var(--text); font: inherit; font-size: 12.5px;
  line-height: 1.55; resize: none; overflow-y: auto;
  outline: none; box-shadow: none;
}
.chat-input:focus { outline: none; box-shadow: none; border: 0; }
.chat-input::placeholder { color: #5a6472; }
.chat-send {
  flex: 0 0 32px; width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent-strong) 75%, #000);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: #fff;
  background: var(--accent-strong);
  transition: background 0.12s ease, opacity 0.12s ease;
}
.chat-send .icon { width: 14px; height: 14px; }
.chat-send:hover:not(:disabled) { background: color-mix(in srgb, var(--accent-strong) 88%, #fff); }
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-send.is-busy .icon { display: none; }
.chat-send.is-busy::after {
  content: ""; width: 13px; height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.chat-compose-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 4px; color: var(--faint); font-size: 10.5px;
}
.chat-shortcut kbd {
  display: inline-block; padding: 0 4px;
  border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--dim);
  font-family: var(--mono); font-size: 9.5px; line-height: 1.5;
}
.chat-count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.chat-working { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.chat-working .spinner {
  width: 9px; height: 9px;
  border: 1.5px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.chat-hint { padding: 0 16px 12px; }
.chat-empty { margin: auto 0; padding: 8px 4px; }
.chat-empty-title { font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chat-context { position: sticky; top: calc(var(--topbar) + 16px); }
.chat-context .f-evidence { margin-top: 8px; }
.chat-asset { font-size: 11.5px; letter-spacing: -0.1px; }
.code-block { position: relative; margin: 10px 0; }
.code-block pre { margin: 0; padding-top: 30px; }
.code-block .code-copy { position: absolute; top: 5px; right: 5px; z-index: 1; font-size: 10.5px; padding: 2px 7px; }

/* ==========================================================================
   responsive
   ========================================================================== */

@media (max-width: 1200px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-email { max-width: 140px; }
  .account-role { display: none; }
}

@media (max-width: 1080px) {
  .rail {
    transform: translateX(-100%);
    width: min(272px, 84vw);
    box-shadow: var(--shadow-lg);
  }
  .rail.open { transform: translateX(0); }
  .rail-scrim {
    position: fixed; inset: 0; z-index: 35;
    background: rgba(4, 6, 9, 0.66);
    opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
  }
  .rail-scrim.show { opacity: 1; pointer-events: auto; }
  .shell { margin-left: 0; }
  .nav-toggle { display: inline-flex; }
  .view { padding: 22px 20px 70px; }
  .topbar { padding: 0 20px; }
  .hero { grid-template-columns: 1fr; padding: 20px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-form-wrap { min-height: 100vh; }
  .chat-context { position: static; }
  .finding-chat-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .account-meta { display: none; }
  .wallet-chip-label { display: none; }
}

@media (max-width: 760px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .grid .span-2 { grid-column: auto; }
  .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view { padding: 16px 14px 76px; }
  .topbar { height: 52px; padding: 0 14px; }
  .crumb-root, .crumb-sep { display: none; }
  .top-actions .btn.primary { display: none; }
  .live-pill { display: none; }
  .page-head { align-items: flex-start; }
  .hero { padding: 18px; border-radius: var(--radius); }
  .hero h1 { font-size: 23px; }
  .hero-panel { padding-inline: 12px; }
  .run-head { gap: 12px; }
  .run-title h1 { font-size: 19px; }
  .run-actions { width: 100%; }
  .run-actions .btn { flex: 1; }
  .console { height: 56vh; }
  .console-filter { width: 120px; }
  .f-grid { grid-template-columns: 1fr; gap: 2px; }
  .log-line { padding: 0 10px; gap: 8px; }
  .log-line .lg { width: 26px; }
  .toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-actions .btn.primary { grid-column: 1 / -1; }
  .runs-table th:nth-child(2), .runs-table td:nth-child(2),
  .runs-table th:nth-child(5), .runs-table td:nth-child(5),
  .runs-table th:nth-child(6), .runs-table td:nth-child(6) { display: none; }
  .runs-table:not(.compact) th:nth-child(7),
  .runs-table:not(.compact) td:nth-child(7) { display: none; }
  .runs-table th, .runs-table td { padding-left: 10px; padding-right: 10px; }
  .runs-table .td-target .name { max-width: 156px; }
  .runs-table .td-target { gap: 8px; }
  .f-url { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .recon-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recon-chip { min-width: 0; }
  .tabs { mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent); }
  .table-wrap { margin: 0 -1px; }
  .mode-cards, .form-grid { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: column; align-items: stretch; gap: 14px; }
  .donut { margin: 0 auto; }
  .page-head h1 { font-size: 20px; }
  .chat-shortcut { display: none; }
  .chat-compose-meta { justify-content: flex-end; }
}

@media (max-width: 560px) {
  .runs-table th:nth-child(4), .runs-table td:nth-child(4) { display: none; }
  .guidance { flex-direction: column; align-items: stretch; }
  .guidance .btn { width: 100%; }
  .account-chip .btn.quiet { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   keyframes
   ========================================================================== */

@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(5px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes chatBob { 0%, 80%, 100% { transform: translateY(0); opacity: 0.45; } 40% { transform: translateY(-3px); opacity: 1; } }

.btn.loading::after {
  content: ""; width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28); border-top-color: currentColor;
  animation: spin 0.7s linear infinite; margin-left: 5px;
}

/* ==========================================================================
   print — clean report output
   ========================================================================== */

@media print {
  body { background: #fff; color: #111; }
  .rail, .topbar, .toasts, .rail-scrim, .run-actions, .tabs, .page-head > .btn { display: none !important; }
  .shell { margin: 0; }
  .view { max-width: none; padding: 0; }
  .card { border-color: #ddd; box-shadow: none; background: #fff; }
  .md, .md p, .md li, .f-section p { color: #222; }
  .md h1, .md h2, .md h3, .md strong { color: #000; }
  .md pre, .evidence { background: #f6f7f9; color: #111; border-color: #ddd; }
}
