/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-md);
  line-height: 1.5;
  transition: background var(--tr-med), color var(--tr-med);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--text-invert); }

/* ===== Typography helpers ===== */
.h-display {
  font-family: var(--ff-h);
  font-weight: var(--h-weight);
  font-variation-settings: var(--h-opsz);
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.h-eyebrow {
  font-family: var(--ff-mono);
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--text-mute);
  font-weight: 500;
}
.num {
  font-family: var(--ff-mono);
  font-feature-settings: "tnum" 1, "zero" 1;
  letter-spacing: -0.01em;
}
.italic { font-style: italic; }

/* ===== Chrome-level layout ===== */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 256px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
}
[data-layout="compact-rail"] .app-shell { grid-template-columns: 68px 1fr; }
[data-layout="no-sidebar"] .app-shell {
  grid-template-columns: 1fr;
  grid-template-areas: "topbar" "main";
}

.topbar { grid-area: topbar; }
.sidebar { grid-area: sidebar; }
.main { grid-area: main; min-width: 0; }

/* ===== Sidebar ===== */
.sidebar {
  border-right: 1px solid var(--line);
  background: var(--surface);
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  padding: var(--s-6) 0;
}
[data-layout="no-sidebar"] .sidebar { display: none; }

.brand-lockup {
  padding: 0 var(--s-6) var(--s-7);
  display: flex; align-items: center; gap: var(--s-3);
}
.brand-mark {
  width: 28px; height: 28px;
  flex-shrink: 0;
}
.brand-wordmark {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
}
.brand-wordmark em {
  font-style: italic;
  color: var(--accent-hi);
}
[data-layout="compact-rail"] .brand-wordmark,
[data-layout="compact-rail"] .nav-label,
[data-layout="compact-rail"] .nav-section-title,
[data-layout="compact-rail"] .sidebar-footer { display: none; }
[data-layout="compact-rail"] .brand-lockup { padding: 0 var(--s-5) var(--s-6); justify-content: center; }
[data-layout="compact-rail"] .nav-item { justify-content: center; padding: 10px 0; }

.nav-section { padding: var(--s-4) var(--s-5); }
.nav-section + .nav-section { border-top: 1px solid var(--line); margin-top: var(--s-2); }
.nav-section-title {
  font-family: var(--ff-mono);
  font-size: var(--text-3xs);
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--text-dim);
  padding: 0 var(--s-2);
  margin-bottom: var(--s-3);
}
.nav-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--text-mute);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--tr-fast), color var(--tr-fast);
  position: relative;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active {
  color: var(--text);
  background: var(--surface-2);
}
.nav-item.active::before {
  content: "";
  position: absolute; left: -6px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--accent);
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .85; }
.nav-badge {
  margin-left: auto;
  font-family: var(--ff-mono);
  font-size: var(--text-2xs);
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent-hi);
}

.sidebar-footer {
  margin-top: auto;
  padding: var(--s-5) var(--s-5) var(--s-2);
  border-top: 1px solid var(--line);
}
.user-chip {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2);
  border-radius: var(--r-sm);
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent);
  color: var(--text-invert);
  display: grid; place-items: center;
  font-family: var(--ff-mono);
  font-size: var(--text-xs);
  font-weight: 600;
}
.user-meta { min-width: 0; flex: 1; }
.user-meta-name { font-size: var(--text-sm); font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta-role { font-size: var(--text-2xs); color: var(--text-dim); }

/* ===== Topbar ===== */
.topbar {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(8px);
}
.crumbs {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: var(--text-sm);
  color: var(--text-mute);
}
.crumbs .sep { color: var(--text-dim); }
.crumbs .here { color: var(--text); }

.topbar-spacer { flex: 1; }

.search {
  display: flex; align-items: center; gap: var(--s-2);
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-mute);
  font-size: var(--text-sm);
  min-width: 280px;
}
.search kbd {
  margin-left: auto;
  font-family: var(--ff-mono);
  font-size: var(--text-3xs);
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--text-dim);
}

/* ===== Main canvas ===== */
.main {
  background:
    radial-gradient(circle at 20px 20px, var(--grid-dot) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
  padding: var(--s-7) var(--s-7) var(--s-9);
}
.page { max-width: 1280px; margin: 0 auto; }
.page--wide { max-width: 1440px; }

.page-header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-5);
  margin-bottom: var(--s-7);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
}
.page-title {
  font-family: var(--ff-h);
  font-weight: var(--h-weight);
  font-variation-settings: var(--h-opsz);
  font-size: var(--text-4xl);
  letter-spacing: -0.025em;
  line-height: 1.02;
}
.page-title em { font-style: var(--h-italic, italic); color: var(--accent-hi); }
.page-sub { color: var(--text-mute); margin-top: 6px; font-size: var(--text-sm); }

/* ===== Cards / panels ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--pad-card);
}
.card--flush { padding: 0; }

/* Today rail — hero triage cards */
.today-card {
  display: flex; flex-direction: column;
  transition: border-color var(--tr-fast), transform var(--tr-fast), box-shadow var(--tr-fast);
  padding: 20px;
  position: relative;
}
.today-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--accent);
  opacity: 0; transition: opacity var(--tr-fast);
  border-top-left-radius: var(--r-md); border-bottom-left-radius: var(--r-md);
}
.today-card:hover {
  border-color: var(--line-accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -12px color-mix(in oklab, var(--accent) 30%, transparent);
}
.today-card:hover::before { opacity: 1; }
.today-card:hover .btn--ghost { border-color: var(--line-accent); background: var(--surface-2); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line);
}
.card-header .eyebrow {
  font-family: var(--ff-mono);
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--text-mute);
  white-space: nowrap;
}
.card-header .title {
  font-size: var(--text-md);
  font-weight: 500;
  margin-top: 2px;
}
.card-body { padding: var(--s-5); }

.stack > * + * { margin-top: var(--gap-stack); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--pad-btn);
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background var(--tr-fast), color var(--tr-fast), border-color var(--tr-fast), transform var(--tr-fast);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--accent);
  color: var(--text-invert);
}
.btn--primary:hover { background: var(--accent-hi); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--line-accent); background: var(--surface-2); }
.btn--quiet {
  color: var(--text-mute);
  padding: 6px 10px;
}
.btn--quiet:hover { color: var(--text); background: var(--surface-2); }

/* ===== Pills / badges ===== */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-size: var(--text-2xs);
  font-family: var(--ff-mono);
  letter-spacing: .04em;
  border: 1px solid var(--line-strong);
  color: var(--text-mute);
  white-space: nowrap;
  flex-shrink: 0;
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.pill--good { color: var(--good); border-color: color-mix(in oklab, var(--good) 40%, transparent); }
.pill--warn { color: var(--warn); border-color: color-mix(in oklab, var(--warn) 40%, transparent); }
.pill--bad { color: var(--bad); border-color: color-mix(in oklab, var(--bad) 40%, transparent); }
.pill--accent { color: var(--accent-hi); border-color: color-mix(in oklab, var(--accent-hi) 40%, transparent); background: var(--accent-soft); }

/* ===== Tables ===== */
.t {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.t th {
  text-align: left;
  font-family: var(--ff-mono);
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--text-dim);
  font-weight: 500;
  padding: var(--s-2) var(--s-5);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.t td {
  padding: var(--pad-row);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.t tr:hover td { background: var(--surface-2); }
.t tr:last-child td { border-bottom: 0; }

/* ===== Scroll / focus ===== */
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: var(--r-xs); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--line-accent); }

/* ===== Tweaks panel ===== */
.tweaks-fab {
  position: fixed; right: 16px; bottom: 16px;
  z-index: 90;
  display: none;
  padding: 10px 14px;
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--bg);
  font-family: var(--ff-mono);
  font-size: var(--text-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: var(--shadow-lg);
}
body.tweaks-on .tweaks-fab { display: inline-flex; align-items: center; gap: 8px; }
.tweaks-panel {
  position: fixed; right: 16px; bottom: 68px;
  z-index: 90;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: var(--s-5);
  display: none;
}
body.tweaks-on.tweaks-open .tweaks-panel { display: block; }
.tweaks-panel h3 {
  margin: 0 0 var(--s-2);
  font-family: var(--ff-h);
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}
.tweaks-panel .hint {
  font-size: var(--text-xs);
  color: var(--text-mute);
  margin-bottom: var(--s-4);
}
.tweaks-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s-4); }
.tweaks-row label {
  font-family: var(--ff-mono);
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--text-mute);
}
.seg {
  display: flex; gap: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.seg button {
  flex: 1;
  padding: 6px 10px;
  background: transparent;
  color: var(--text-mute);
  font-size: var(--text-xs);
  border-right: 1px solid var(--line);
}
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--surface-2); color: var(--text); }
.seg button:hover { color: var(--text); }

.swatches { display: flex; gap: 8px; }
.swatch {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  position: relative;
}
.swatch.on::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--line-accent);
}

/* ===== Utility ===== */
.hr { height: 1px; background: var(--line); border: 0; }
.row { display: flex; align-items: center; gap: var(--s-3); }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mono { font-family: var(--ff-mono); }
.dim { color: var(--text-mute); }
.faint { color: var(--text-dim); }
.big-num {
  font-family: var(--ff-h);
  font-feature-settings: "tnum" 1;
  font-weight: 400;
  font-variation-settings: var(--h-opsz);
  font-size: var(--text-4xl);
  letter-spacing: -0.02em;
  line-height: 1;
}
.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ===== Mobile/tablet breakpoints ===== */

/* Tablet: 2-col grids, narrower sidebar */
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: stack everything */
@media (max-width: 760px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }

  /* App shell: hide sidebar, give main full width */
  .app-shell {
    grid-template-columns: 1fr !important;
    grid-template-areas: "topbar" "main" !important;
  }
  .sidebar { display: none; }
  .main { padding: var(--s-5) var(--s-4); }

  /* Topbar: hide search bar (not enough room); keep crumb + right actions */
  .search { display: none; }
  .topbar { padding: 0 var(--s-4); }
  .crumbs { font-size: 12px; }

  /* Page headers: stack title + actions */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-4);
  }
  .page-header > *:last-child { width: 100%; }
  .page-header .row { flex-wrap: wrap; }

  /* Typography shrinks */
  .page-title { font-size: var(--text-3xl); line-height: 1.1; }
  .big-num { font-size: 36px; }

  /* Thesis banner: stack verdict above body */
  .thesis-banner {
    flex-direction: column;
    padding: var(--s-5);
  }
  .thesis-banner .thesis-verdict {
    width: 100%; flex-shrink: 1;
    padding-right: 0; padding-bottom: var(--s-4);
    border-right: 0; border-bottom: 1px solid var(--line);
  }

  /* Results view two-col → one-col, evidence rail moves below */
  .results-split { grid-template-columns: 1fr !important; }
  .results-split > *:last-child { position: static !important; }

  /* Founder hero: stack stats below text */
  .founder-hero {
    grid-template-columns: 1fr !important;
    gap: var(--s-4);
  }
  .founder-hero-stats {
    padding-left: 0; border-left: 0;
    border-top: 1px solid var(--line); padding-top: var(--s-4);
    grid-template-columns: repeat(3, 1fr);
  }

  /* Today rail: stack */
  .today-card { padding: 16px; }

  /* Tables: reduce padding, hide some columns */
  .t th, .t td { padding: 10px 8px; font-size: 12px; }
  .t th:nth-child(3), .t td:nth-child(3) { display: none; }

  /* Buttons/tabs: scroll instead of wrap */
  .tabs-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .tabs-row::-webkit-scrollbar { display: none; }

  /* Segmented controls: allow wrap */
  .seg { flex-wrap: wrap; }

  /* Modals fill screen */
  .modal { width: calc(100% - 32px); max-height: 90vh; }
  .cmdk { width: calc(100% - 24px); }
}

/* ===== Analysis view ===== */
.thesis-banner {
  display: flex;
  gap: var(--s-6);
  padding: var(--s-6);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}
.thesis-verdict {
  width: 200px; flex-shrink: 0;
  padding-right: var(--s-5);
  border-right: 1px solid var(--line);
}
.thesis-verdict-value {
  font-family: var(--ff-h);
  font-size: var(--text-2xl);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-top: 10px;
  color: var(--accent-hi);
}
.thesis-textarea {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-family: var(--ff-body);
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--text);
  resize: vertical;
  transition: border-color var(--tr-fast);
}
.thesis-textarea:hover,
.thesis-textarea:focus {
  border-style: solid;
  border-color: var(--line-accent);
  outline: none;
}

.tabs-row {
  display: flex;
  gap: var(--s-5);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s-6);
  overflow-x: auto;
}
.tab-item {
  padding: 10px 0;
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-mute);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color var(--tr-fast), border-color var(--tr-fast);
}
.tab-item:hover { color: var(--text); }
.tab-item.on {
  color: var(--text);
  border-bottom-color: var(--accent-hi);
}

.seg--mini button { padding: 3px 10px; font-size: var(--text-3xs); letter-spacing: .05em; text-transform: uppercase; }

.cite {
  font-family: var(--ff-mono);
  font-size: 9px;
  color: var(--accent-hi);
  background: var(--accent-soft);
  padding: 1px 5px;
  margin-left: 4px;
  border-radius: 3px;
  vertical-align: super;
  cursor: pointer;
  top: 0;
}
.cite:hover { color: var(--text); background: var(--accent); }

.cite-pill {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: var(--text-2xs);
  color: var(--accent-hi);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 3px;
}

.slide-frame {
  margin-top: var(--s-4);
  aspect-ratio: 16/10;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.slide-frame-num {
  font-family: var(--ff-h);
  font-size: 48px;
  font-weight: 300;
  color: var(--accent-hi);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Founder hero */
.founder-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-6);
  align-items: center;
  padding: var(--s-6);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}
.founder-hero h2 em { font-style: italic; color: var(--bad); }
.founder-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: var(--s-6);
  padding-left: var(--s-6);
  border-left: 1px solid var(--line);
}
.founder-hero-stats > div { text-align: center; }

/* IAS legend modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: var(--s-6);
  animation: fadeIn .2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 640px; max-width: 100%;
  max-height: 85vh; overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: var(--s-7);
}

/* Admin distinguisher */
[data-section="admin"] .topbar {
  border-bottom-color: var(--bad);
  box-shadow: inset 0 -2px 0 0 color-mix(in oklab, var(--bad) 35%, transparent);
}
.admin-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--ff-mono);
  font-size: var(--text-3xs);
  letter-spacing: .2em;
  padding: 3px 8px;
  border: 1px solid var(--bad);
  color: var(--bad);
  border-radius: 3px;
}

/* Demo mode banner */
.demo-banner {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 80;
  background: var(--accent);
  color: var(--text-invert);
  font-family: var(--ff-mono);
  font-size: var(--text-2xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 6px 14px;
  display: flex; align-items: center; gap: 14px;
  justify-content: center;
}
.demo-banner button {
  color: var(--text-invert);
  border: 1px solid color-mix(in oklab, var(--text-invert) 40%, transparent);
  padding: 2px 8px;
  border-radius: 3px;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
}
body.demo-on { padding-top: 30px; }
body.demo-on .topbar { top: 30px; }
body.demo-on .sidebar { padding-top: calc(var(--s-6) + 30px); }

/* Command palette */
.cmdk-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  display: grid; place-items: flex-start center;
  padding-top: 12vh;
  animation: fadeIn .15s ease-out;
}
.cmdk {
  width: 560px; max-width: 92%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.cmdk-input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 16px 20px;
  font-size: 16px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  font-family: var(--ff-body);
}
.cmdk-input::placeholder { color: var(--text-dim); }
.cmdk-list { max-height: 400px; overflow-y: auto; padding: 6px; }
.cmdk-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r-xs);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-mute);
}
.cmdk-item.on, .cmdk-item:hover { background: var(--surface-2); color: var(--text); }
.cmdk-item .eyebrow {
  font-family: var(--ff-mono); font-size: 10px;
  color: var(--text-dim); letter-spacing: .1em;
  margin-left: auto; text-transform: uppercase;
}
.cmdk-group {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 14px 4px;
}

/* ===== Entering / route transitions ===== */
.route-enter {
  opacity: 1;
}

/* ===== Marginalia / instrument chrome ===== */
.rule {
  display: flex; align-items: center; gap: var(--s-3);
  color: var(--text-dim);
  font-family: var(--ff-mono);
  font-size: var(--text-2xs);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.rule::before, .rule::after {
  content: ""; height: 1px; background: var(--line); flex: 1;
}

/* Sparkline baseline bar */
.spark { display: block; width: 100%; height: 40px; }

/* Progress stub */
.bar {
  height: 6px; border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.bar > i { display: block; height: 100%; background: var(--accent); }

/* "As-of" meta row */
.as-of {
  font-family: var(--ff-mono);
  font-size: var(--text-2xs);
  color: var(--text-dim);
  letter-spacing: .08em;
  white-space: nowrap;
}
