/* Ramp brand reference: warm neutrals, lime accent #E4F222, Inter, light weight 300. */

:root {
  --ramp-accent: #e4f222;
  --ramp-accent-light: #f5ff78;
  --bg: #fcfbfa;
  --surface: #f4f2f0;
  --border: #d2cecb;
  --input-bg: #e9e5e2;
  --text-primary: #1a1919;
  --text-secondary: #6e6a68;
  --text-muted: #a39d99;
  --notice-bg: #feffe1;
  --companion-width: 440px;
  --topbar-h: 48px;
  --transition-panel: transform 0.24s cubic-bezier(0.2, 0, 0, 1);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 300;
  font-size: 16px;
  color: var(--text-primary);
  background: var(--bg);
  height: 100%;
}

button {
  font-family: inherit;
  font-weight: 300;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}

/* Top bar */
.topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  /* Offset by demo console height so the topbar sticks BELOW the meta-bar
   * during scroll, not behind it. Defaults to 0 if no demo console present. */
  top: var(--demo-console-h, 0px);
  z-index: 40;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.logo { font-weight: 500; font-size: 18px; letter-spacing: -0.01em; }
.search {
  background: var(--input-bg);
  border-radius: 4px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 320px;
  color: var(--text-secondary);
  font-size: 14px;
}
.search kbd {
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  font-family: "Fira Code", ui-monospace, monospace;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }
.persona-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.persona-switcher { display: flex; gap: 4px; }
.persona {
  border: 1px solid var(--border);
  background: white;
  color: var(--text-secondary);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 400;
  transition: all 0.15s ease;
}
.persona:hover { background: var(--surface); }
.persona.active {
  background: var(--ramp-accent);
  border-color: var(--ramp-accent);
  color: var(--text-primary);
  font-weight: 500;
}

.ask-toggle {
  border: 1px solid var(--border);
  background: white;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 400;
  transition: background 0.15s ease;
}
.ask-toggle:hover { background: var(--surface); }
body.companion-open .ask-toggle {
  background: var(--ramp-accent);
  border-color: var(--ramp-accent);
  font-weight: 500;
}

/* Shell — when companion opens, the right gutter expands so content doesn't get clipped. */
.shell {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: calc(100vh - var(--topbar-h));
  transition: padding-right 0.24s cubic-bezier(0.2, 0, 0, 1);
}
body.companion-open .shell { padding-right: var(--companion-width); }

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: block;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
}
.nav-item.active { background: rgba(0,0,0,0.04); color: var(--text-primary); }
.nav-item.nav-help { margin-top: auto; }

.content { padding: 32px 40px; max-width: 1080px; }
.greeting {
  font-size: 28px;
  font-weight: 300;
  margin: 0 0 24px 0;
  letter-spacing: -0.01em;
}

/* Sections */
.content-section { margin-bottom: 28px; }
.section-heading {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 12px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
}
.section-heading .caret {
  font-size: 10px;
  color: var(--text-muted);
  display: inline-block;
  width: 10px;
}
.section-heading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.section-heading-row .section-heading { margin: 0; }
.section-link {
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--ramp-accent-light);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Tiles */
.tile-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.tile-row-2 { grid-template-columns: 2.2fr 1fr; margin-bottom: 0; }
.tile {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  transition: box-shadow 0.15s ease;
}
.tile-active:hover { box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 4px 8px rgba(0,0,0,0.04); }
.tile-disabled {
  background: var(--surface);
  color: var(--text-muted);
  cursor: not-allowed;
}
.tile-icon { font-size: 24px; }
.tile-title { font-size: 16px; font-weight: 400; color: var(--text-primary); }
.tile-disabled .tile-title { color: var(--text-muted); }
.tile-sub { font-size: 13px; color: var(--text-secondary); }

/* Receipts tile — drag-drop canvas + footer (matches Ramp's "Get paid back") */
.receipts-tile {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}
.receipts-canvas {
  flex: 1;
  border: 1px dashed var(--border);
  border-radius: 6px;
  margin: 12px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
}
.receipts-icon {
  font-size: 26px;
  color: var(--text-muted);
}
.receipts-prompt {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 32ch;
  line-height: 1.4;
}
.receipts-footer {
  font-size: 13px;
  color: var(--text-primary);
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 6px;
}
.receipts-footer .muted { color: var(--text-secondary); font-weight: 300; }

.mileage-tile { min-height: 200px; }

/* Draft card — Submit your drafts row */
.draft-card {
  width: 100%;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  font-family: inherit;
  font-weight: 300;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.draft-card:hover { background: var(--surface); border-color: var(--text-muted); }
.draft-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
  flex-shrink: 0;
}
.draft-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.draft-amount {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.draft-label {
  font-size: 13px;
  color: var(--text-secondary);
}
.draft-arrow {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 300;
}

/* Recent expenses (collapsed placeholder) */
.recent-expenses .section-heading-row { border-top: 1px solid var(--border); padding-top: 16px; }

/* Companion */
/* The demo console sits above Ramp's topbar in normal flow, so the
 * companion panel — which is position:fixed — needs to know how tall
 * it is to place its top edge below it. --demo-console-h is set by
 * :has() rules just below: 0 when no demo console is present, ~24px
 * when collapsed, ~66px when expanded. The companion's top + height
 * track it automatically. */
.companion {
  position: fixed;
  top: calc(var(--topbar-h) + var(--demo-console-h, 0px));
  right: 0;
  width: var(--companion-width);
  height: calc(100vh - var(--topbar-h) - var(--demo-console-h, 0px));
  background: white;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 30;
  box-shadow: -2px 0 12px rgba(0,0,0,0.04);
  transition: var(--transition-panel), top 0.22s cubic-bezier(0.2, 0, 0, 1), height 0.22s cubic-bezier(0.2, 0, 0, 1);
}

/* Demo console height tokens — drive --demo-console-h from the actual
 * presence + collapsed state of the meta-bar. CSS-only, no JS measurement
 * race conditions. The class selector beats the bare element selector in
 * specificity so the collapsed value wins when both rules match. */
:root:has(#demo-console) { --demo-console-h: 66px; }
:root:has(#demo-console.dc-collapsed) { --demo-console-h: 24px; }
.companion.hidden { transform: translateX(100%); pointer-events: none; }
.companion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.companion-title { font-size: 14px; font-weight: 400; }
.companion-close {
  font-size: 22px;
  color: var(--text-secondary);
  line-height: 1;
  padding: 0 4px;
  border-radius: 4px;
  transition: background 0.15s;
}
.companion-close:hover { background: var(--surface); }

.companion-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.companion-greeting { font-size: 18px; }

.suggested { display: flex; flex-direction: column; gap: 8px; }
.suggestion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  color: var(--text-primary);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.suggestion:hover {
  background: var(--input-bg);
  border-color: var(--text-muted);
}

.thread { display: flex; flex-direction: column; gap: 14px; }
.msg { font-size: 14px; line-height: 1.55; }
.msg.user {
  align-self: flex-end;
  background: var(--input-bg);
  padding: 8px 12px;
  border-radius: 12px 12px 2px 12px;
  max-width: 80%;
}
.msg.assistant {
  align-self: flex-start;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Markdown styling inside assistant messages */
.markdown { white-space: normal; }
.markdown p { margin: 0 0 8px 0; }
.markdown p:last-child { margin-bottom: 0; }
.markdown strong { font-weight: 500; color: var(--text-primary); }
.markdown em { font-style: italic; }
.markdown code {
  font-family: "Fira Code", ui-monospace, monospace;
  font-size: 12.5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 4px;
}
.markdown ol, .markdown ul {
  margin: 4px 0 8px 0;
  padding-left: 22px;
}
.markdown li { margin: 2px 0; }
.markdown ol { list-style: decimal; }
.markdown ul { list-style: disc; }

/* Citation chips */
.cite {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 4px;
  margin: 0 1px;
  vertical-align: 1px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  text-decoration: none;
}
.cite:hover {
  background: var(--ramp-accent);
  border-color: var(--ramp-accent);
  color: var(--text-primary);
}
.cite.cite-pulse { animation: cite-pulse 0.6s ease-out; }
@keyframes cite-pulse {
  0% { background: var(--ramp-accent); }
  100% { background: var(--surface); }
}

/* Streaming caret */
.msg.assistant.thinking .markdown::after {
  content: "▍";
  display: inline-block;
  animation: blink 1s steps(2, end) infinite;
  color: var(--text-muted);
  margin-left: 2px;
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* Sources block */
.sources {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sources-title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.sources a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.12s ease;
}
.sources a:hover { color: var(--text-primary); text-decoration: underline; }
.sources a.source-highlight { color: var(--text-primary); }

/* Behind-the-scenes drawer (Premise 6 — engine made visible) */
.behind {
  margin-top: 6px;
  border-top: 1px dashed var(--border);
  padding-top: 8px;
}
.behind-toggle {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: 3px;
  transition: color 0.12s ease;
}
.behind-toggle::before {
  content: "▸";
  font-size: 10px;
  transition: transform 0.15s ease;
  display: inline-block;
}
.behind[open] .behind-toggle::before { transform: rotate(90deg); }
.behind-toggle:hover { color: var(--text-secondary); }
.behind-body {
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.behind-section-title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 4px 0;
}
.behind-kv { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; }
.behind-kv span { color: var(--text-secondary); }
.behind-kv strong { color: var(--text-primary); font-weight: 500; }
.chunk-list { display: flex; flex-direction: column; gap: 6px; }
.chunk {
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 11.5px;
}
.chunk-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}
.chunk-title { color: var(--text-primary); font-weight: 500; }
.chunk-section { color: var(--text-secondary); }
.chunk-meta {
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: "Fira Code", ui-monospace, monospace;
  white-space: nowrap;
}

/* Composer */
.companion-foot {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.companion-input {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 300;
  color: var(--text-primary);
}
.companion-input:focus { outline: none; border-color: var(--ramp-accent); background: white; }
.companion-send {
  background: var(--ramp-accent);
  color: var(--text-primary);
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  transition: filter 0.12s ease;
}
.companion-send:hover { filter: brightness(0.96); }
.companion-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* Spotlight overlay (Premise 1: DOM-pointing protocol) */
.spotlight-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 19, 19, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 20;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.22s ease;
}
.spotlight-overlay.hidden { opacity: 0; pointer-events: none; }
.spotlight-target {
  position: relative;
  z-index: 25 !important;
  outline: 3px solid var(--ramp-accent);
  outline-offset: 4px;
  border-radius: 8px;
  box-shadow: 0 0 0 6px rgba(228, 242, 34, 0.35), 0 0 24px rgba(228, 242, 34, 0.7);
  animation: glow-pulse 1.6s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(228, 242, 34, 0.35), 0 0 24px rgba(228, 242, 34, 0.7); }
  50% { box-shadow: 0 0 0 10px rgba(228, 242, 34, 0.5), 0 0 36px rgba(228, 242, 34, 0.95); }
}
.spotlight-label {
  position: fixed;
  z-index: 26;
  background: var(--ramp-accent);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.18s ease, top 0.2s ease, left 0.2s ease;
  white-space: nowrap;
}
.spotlight-label.hidden { opacity: 0; }

/* Action card (Gen-3 confirmation gate inside the companion message) */
.action-card {
  margin-top: 10px;
  border: 1px solid var(--ramp-accent);
  border-radius: 6px;
  padding: 12px 14px;
  background: var(--notice-bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.action-card-eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}
.action-card-eyebrow::before {
  content: "✦ ";
  color: var(--text-primary);
}
.action-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.35;
}
.action-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.action-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.action-confirm {
  background: var(--ramp-accent);
  color: var(--text-primary);
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
}
.action-confirm:hover { filter: brightness(0.95); }
.action-confirm:disabled { opacity: 0.5; cursor: not-allowed; }
.action-decline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 13px;
}
.action-decline:hover { background: white; color: var(--text-primary); }
.action-card.confirmed {
  background: white;
}
.action-card.confirmed .action-actions { display: none; }

/* Drafted-state block — replaces the confirm/decline buttons with the
 * suggested message + a Copy button. No outbox, no fake send — the user
 * takes the text into their own channel (email / Slack / etc). */
.action-draft {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.action-draft-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}
.action-draft-label:first-child { margin-top: 0; }
.action-draft-subject {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px;
}
.action-draft-body {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-primary);
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 240px;
  overflow-y: auto;
  margin: 0;
}
.action-draft-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.action-copy {
  background: var(--text-primary);
  color: white;
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s ease;
}
.action-copy:hover { background: #2a2826; }
.action-copy.action-copy-success {
  background: var(--ramp-accent);
  color: var(--text-primary);
  border-color: var(--ramp-accent);
}
.action-draft-hint {
  font-size: 12px;
  color: var(--text-secondary);
}
.action-error {
  font-size: 12.5px;
  color: var(--sla-alarm-text, #a33b1f);
  margin-top: 4px;
}

/* ===== View router (multi-step flow stub views) ===== */
.view { display: none; animation: view-fade 0.22s ease-out; }
.view.view-active { display: block; }
@keyframes view-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reimbursements + Settings page chrome */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.page-title {
  font-size: 28px;
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
}
.page-btn {
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.page-btn:hover { background: var(--surface); border-color: var(--text-secondary); }
.page-btn-icon { font-size: 14px; }
.page-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.page-tab {
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.page-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}
.page-back { margin-bottom: 16px; font-size: 13px; }
.page-back a { color: var(--text-secondary); text-decoration: none; }
.page-back a:hover { color: var(--text-primary); }

/* Empty state on Reimbursements view */
.empty-state {
  margin-top: 48px;
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: white;
}
.empty-icon { font-size: 32px; margin-bottom: 12px; opacity: 0.6; }
.empty-title { font-size: 16px; font-weight: 400; margin-bottom: 4px; }
.empty-sub { font-size: 13px; color: var(--text-secondary); }

/* Settings card with toggle rows */
.settings-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 16px;
  overflow: hidden;
}
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  gap: 24px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row-label { flex: 1; min-width: 0; }
.settings-row-title { font-size: 15px; font-weight: 400; margin-bottom: 4px; }
.settings-row-sub { font-size: 13px; color: var(--text-secondary); line-height: 1.45; }
.settings-row-link {
  font-size: 13px;
  color: var(--text-primary);
  text-decoration: underline;
}

/* Toggle (two-state pill) — used on settings rows */
.toggle {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--input-bg);
  padding: 0;
  position: relative;
  flex-shrink: 0;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transition: left 0.18s ease, background 0.18s ease;
}
.toggle-on { background: var(--ramp-accent); }
.toggle-on .toggle-knob { left: 20px; background: var(--text-primary); }
.toggle-off { background: var(--input-bg); }
.toggle-off .toggle-knob { left: 2px; }
button.toggle:hover { border-color: var(--border); }
.toggle.toggle-flipping {
  animation: toggle-flip-flash 0.6s ease-out;
}
@keyframes toggle-flip-flash {
  0%   { box-shadow: 0 0 0 0 rgba(228, 242, 34, 0.9); }
  40%  { box-shadow: 0 0 0 10px rgba(228, 242, 34, 0); }
  100% { box-shadow: 0 0 0 0 rgba(228, 242, 34, 0); }
}

/* Step counter that floats next to spotlight label during a flow */
.spotlight-progress {
  position: fixed;
  z-index: 26;
  background: var(--text-primary);
  color: white;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.18s ease, top 0.2s ease, left 0.2s ease;
  white-space: nowrap;
}
.spotlight-progress.hidden { opacity: 0; }

/* Flow completion toast — shown briefly after the last step click */
.flow-toast {
  position: fixed;
  top: 72px;
  right: 24px;
  z-index: 60;
  background: var(--text-primary);
  color: white;
  padding: 14px 18px;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.22);
  max-width: 360px;
  font-size: 13px;
  line-height: 1.5;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.24s ease, transform 0.24s ease;
}
.flow-toast::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--ramp-accent);
  color: var(--text-primary);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: -2px;
}
.flow-toast.hidden {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

/* When companion is open, push spotlight label/progress so they don't sit
   beneath the companion panel on right-positioned targets. */
body.companion-open .spotlight-label,
body.companion-open .spotlight-progress {
  /* No special offset needed — positionLabel already clamps to viewport
     minus companion width via maxLeft. */
}

/* Sidebar nav items become real cursors when they're part of a flow step. */
.sidebar .nav-item { cursor: pointer; }

/* Demo footer — meta-link block for /evals. Mono-cased + muted so it reads
 * as demo apparatus rather than product nav. Lives below the in-product
 * sections at the bottom of the home view. */
.demo-footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: 0.02em;
}
.demo-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.12s ease;
}
.demo-footer a:hover { color: var(--text-primary); }
