:root {
  color-scheme: dark;
  --bg: #08090a;
  --panel: rgba(255,255,255,0.025);
  --panel-2: rgba(255,255,255,0.045);
  --surface: #0f1011;
  --surface-2: #191a1b;
  --text: #f7f8f8;
  --muted: #8a8f98;
  --muted-2: #62666d;
  --line: rgba(255,255,255,0.08);
  --line-soft: rgba(255,255,255,0.05);
  --accent: #7170ff;
  --accent-bg: #5e6ad2;
  --ok: #10b981;
  --warn: #fbbf24;
  --danger: #f87171;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: "cv01", "ss03";
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 50% -20%, rgba(94,106,210,.18), transparent 34rem), var(--bg); color: var(--text); }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 18px; border-right: 1px solid var(--line-soft); background: rgba(15,16,17,.82); backdrop-filter: blur(16px); display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 4px 18px; border-bottom: 1px solid var(--line-soft); }
.logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--accent-bg), #828fff); display: grid; place-items: center; font: 600 12px 'JetBrains Mono', monospace; color: white; box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset; }
.brand strong { display: block; font-size: 14px; font-weight: 590; letter-spacing: -.13px; }
.brand span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
nav { display: grid; gap: 4px; }
nav a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 510; padding: 9px 10px; border-radius: 8px; }
nav a.active, nav a:hover { background: var(--panel-2); color: var(--text); }
.sidebar-card { margin-top: auto; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel); display: flex; gap: 10px; align-items: flex-start; }
.sidebar-card strong { font-size: 13px; }
.sidebar-card p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; background: var(--muted); }
.dot.live { background: var(--ok); box-shadow: 0 0 14px rgba(16,185,129,.55); }
.workspace { padding: 26px; max-width: 1440px; width: 100%; }
.topbar { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 590; }
h1 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1; letter-spacing: -1.056px; font-weight: 510; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.kbd, .pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 9px; background: var(--panel); color: #d0d6e0; font-size: 12px; font-weight: 510; }
.kbd.muted { color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 0 0 1px rgba(0,0,0,.2), 0 18px 40px rgba(0,0,0,.22); }
.search-panel { padding: 14px; }
.controls { display: grid; grid-template-columns: 1.2fr .45fr .55fr .8fr .6fr .45fr; gap: 10px; align-items: end; }
.field { display: grid; gap: 7px; }
.field span, legend { color: var(--muted); font-size: 12px; font-weight: 510; }
input, select, button { min-height: 38px; border-radius: 8px; border: 1px solid var(--line); font: inherit; }
input, select { background: rgba(255,255,255,.035); color: var(--text); padding: 0 10px; outline: none; }
input:focus, select:focus { border-color: rgba(113,112,255,.7); box-shadow: 0 0 0 3px rgba(113,112,255,.14); }
button { cursor: pointer; border-color: rgba(113,112,255,.65); background: var(--accent-bg); color: #fff; font-weight: 590; padding: 0 14px; }
button:hover { background: #6f78e8; }
button:disabled { filter: grayscale(1); opacity: .5; cursor: not-allowed; }
.provider-box { grid-column: 1 / 5; border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 10px 10px; display: flex; flex-wrap: wrap; gap: 12px; background: rgba(255,255,255,.018); }
.check { display: inline-flex; align-items: center; gap: 7px; color: #d0d6e0; font-size: 13px; font-weight: 510; }
.check input { width: 14px; height: 14px; min-height: unset; accent-color: var(--accent); }
.option { align-self: center; justify-self: start; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin: 12px 0; }
.metric { border: 1px solid var(--line-soft); background: rgba(255,255,255,.02); border-radius: 12px; padding: 12px; }
.metric span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.metric strong { display: block; margin-top: 8px; font-size: 18px; font-weight: 510; letter-spacing: -.28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statusbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 12px 0; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; }
.actions button { background: rgba(255,255,255,.04); border-color: var(--line); color: var(--text); }
.summary { padding: 14px; margin-bottom: 12px; display: grid; gap: 10px; }
.summary strong { color: var(--text); font-weight: 590; }
.provider-status { display: flex; flex-wrap: wrap; gap: 7px; }
.pill.ok { color: var(--ok); border-color: rgba(16,185,129,.35); }
.pill.partial, .pill.skipped { color: var(--warn); border-color: rgba(251,191,36,.35); }
.pill.error { color: var(--danger); border-color: rgba(248,113,113,.35); }
.hidden { display: none; }
.table-wrap { overflow-x: auto; }
.table-title { display: flex; justify-content: space-between; padding: 14px 14px 0; }
.table-title h2 { margin: 0; font-size: 16px; font-weight: 590; letter-spacing: -.18px; }
.table-title p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; min-width: 1120px; margin-top: 12px; }
th, td { padding: 10px 12px; border-top: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: #101112; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 590; }
td { font-size: 13px; color: #d0d6e0; }
td strong { color: var(--text); font-weight: 590; }
a { color: #828fff; text-decoration: none; }
a:hover { text-decoration: underline; }
.empty { text-align: center; color: var(--muted); padding: 44px 14px; }
.error { color: var(--danger); }
.score { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 500; }
.likelihood { font-weight: 590; }
.likelihood.high { color: var(--ok); }
.likelihood.medium { color: var(--warn); }
.likelihood.low, .likelihood.chain { color: var(--danger); }
.link-stack { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .sidebar nav { display: flex; }
  .sidebar-card { margin-top: 0; margin-left: auto; }
  .controls { grid-template-columns: 1fr 1fr; }
  .provider-box, .controls button { grid-column: 1 / -1; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .workspace { padding: 16px; }
  .topbar { display: block; }
  .top-actions { justify-content: flex-start; margin-top: 12px; }
  .controls, .metric-grid { grid-template-columns: 1fr; }
  .statusbar { align-items: stretch; flex-direction: column; }
}
