/* Orbio Product Intelligence — Research Reports dashboard
 * Design tokens copied 1:1 from the Orbio.cc/app (OPI) main application so
 * the reports site feels like a page inside the same product, not a bolt-on.
 */
:root {
  --bg:           #FAFAFA;
  --surface:      #FFFFFF;
  --surface2:     #F5F3F0;
  --surface3:     #EDEBE8;
  --border:       #E8E5E1;
  --border-light: #D9D6D2;

  --text:         #1A1A1A;
  --text-muted:   #6B6B6B;
  --text-dim:     #9E9E9E;

  --accent:       #848FDD;
  --accent-dim:   rgba(132, 143, 221, 0.10);
  --accent-soft:  rgba(132, 143, 221, 0.18);

  --green:        #34C889;
  --green-dim:    rgba(52, 200, 137, 0.08);
  --orange:       #E8943A;
  --orange-dim:   rgba(232, 148, 58, 0.08);
  --red:          #E05A5A;
  --red-dim:      rgba(224, 90, 90, 0.08);
  --purple:       #9BA7DC;
  --purple-dim:   rgba(155, 167, 220, 0.08);
  --yellow:       #D4A843;
  --yellow-dim:   rgba(212, 168, 67, 0.08);
  --teal:         #86DCC8;
  --teal-dim:     rgba(134, 220, 200, 0.08);
  --pink:         #EBC8D6;
  --pink-dim:     rgba(235, 200, 214, 0.12);

  --orbio-green:  #97ECAF;
  --orbio-cream:  #F9F0E6;

  --sidebar-w: 250px;
  --radius: 14px;

  --gradient: linear-gradient(135deg,
    #97ECAF 0%,
    #86DCC8 20%,
    #848FDD 50%,
    #EBC8D6 80%,
    #F2E4EA 100%);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 60px rgba(20, 20, 20, 0.12);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Force hidden to actually hide even when the class sets display: grid */
.modal[hidden], .tour[hidden], .compare-dock[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 22px 0 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 0 22px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.logo-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  box-shadow: 0 2px 12px rgba(132, 143, 221, 0.25);
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.logo-expansion {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.25;
}
.logo-sub {
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  padding: 0 10px 12px;
  overflow-y: auto;
}
.nav-section {
  padding: 8px 12px;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-top: 14px;
  font-weight: 600;
}
.nav-section:first-child { margin-top: 4px; }

/* Search (top of sidebar, inside a nav group) */
.sidebar-search {
  padding: 0 12px;
  margin: 6px 0 2px;
}
.sidebar-search input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.85rem;
  background: var(--surface2);
  outline: none;
  font-family: inherit;
  transition: border-color 0.12s, background 0.12s;
}
.sidebar-search input:focus {
  border-color: var(--accent);
  background: var(--surface);
}

/* Filter chips — styled as tag pills, accent-purple when active */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 12px;
}
.chip {
  font-family: inherit;
  font-size: 0.75rem;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
  white-space: nowrap;
  line-height: 1.4;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--text);
}
.chip.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.chip .count {
  margin-left: 5px;
  font-size: 0.65rem;
  opacity: 0.65;
}

.filter-inputs {
  padding: 4px 12px 0;
}
.date-row, .score-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 6px;
  align-items: center;
}
.date-row input, .score-row input {
  font-family: inherit;
  font-size: 0.78rem;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  width: 100%;
  min-width: 0;
  color: var(--text);
}
.date-row span, .score-row span { color: var(--text-dim); font-size: 0.8rem; }

.reset-btn {
  margin: 14px 12px 0;
  width: calc(100% - 24px);
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.12s;
}
.reset-btn:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border-light);
}

/* User card at the bottom of the sidebar */
.sidebar-user {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  color: #fff;
  flex-shrink: 0;
}
.user-name {
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.2;
}
.sidebar-sign-out {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-family: inherit;
  padding: 0;
  text-align: left;
  line-height: 1;
  margin-top: 3px;
  transition: color 0.12s;
}
.sidebar-sign-out:hover { color: var(--red); }

/* ============================================================
   Main content
   ============================================================ */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 28px 32px 48px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 26px;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}
.topbar-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* View tabs — Pipeline / Reference Library toggle */
.view-tabs {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  align-self: center;
}
.view-tab {
  padding: 6px 16px;
  border-radius: 7px;
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}
.view-tab:hover { color: var(--text); }
.view-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* Verdict pill for archive REFERENCE reports */
.verdict.REFERENCE {
  background: var(--surface3);
  color: var(--text-muted);
}

/* Buttons — matches the OPI .btn pattern */
.btn {
  padding: 8px 18px;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  background: transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled {
  background: var(--surface3);
  color: var(--text-dim);
  border-color: var(--border);
  cursor: not-allowed;
  opacity: 1;
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--surface2);
  border-color: var(--border-light);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--surface2); color: var(--text); }
.btn-icon {
  padding: 8px 10px;
  width: 34px;
  justify-content: center;
}

/* Toolbar — count, compare toggle, sort */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 14px;
  flex-wrap: wrap;
}
.toolbar-left {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.toolbar-left #visible-count {
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
}
.toolbar-divider { color: var(--text-dim); }
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
}
.compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  transition: all 0.12s;
}
.compare-toggle:hover { border-color: var(--border-light); color: var(--text); }
.compare-toggle input { accent-color: var(--accent); margin: 0; }
.compare-toggle.on {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.sort-label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sort-label select {
  padding: 6px 10px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
}

/* ============================================================
   Report cards grid
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
}
.card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim), var(--shadow-sm);
  background: linear-gradient(0deg, var(--accent-dim), var(--accent-dim)), var(--surface);
}
.card-check {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--border-light);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: transparent;
  transition: all 0.12s;
  z-index: 2;
}
.card-check:hover { border-color: var(--accent); }
.card.selected .card-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
body:not(.compare-mode) .card-check { display: none; }
body.compare-mode .card { padding-right: 48px; }

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.card-meta {
  font-family: var(--font-display);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  row-gap: 4px;
}
.card-meta-sep {
  color: var(--text-dim);
  font-weight: 400;
}
/* Orbio portfolio brand (Matsato, Derila, Akusoli) — primary identifier. */
.card-brand {
  color: var(--accent);
  font-weight: 700;
}
/* Fallback when no portfolio brand is assigned — vertical takes the primary spot. */
.card-vertical {
  color: var(--text);
  font-weight: 700;
}
/* When both brand and vertical are set, the vertical shows secondarily in muted gray. */
.card-vertical-small {
  color: var(--text-dim);
  font-weight: 500;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 6px 0 0 0;
}
.card-summary {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.card-tag {
  font-size: 0.68rem;
  padding: 2px 8px;
  background: var(--surface2);
  color: var(--text-muted);
  border-radius: 999px;
  border: 1px solid var(--border);
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 11px;
  margin-top: auto;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--text-muted);
  gap: 10px;
}
.card-footer-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
/* "Ordered by" row on the card — small gradient avatar + name, so at a
   glance you can see whose research this is. */
.card-ordered {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--text);
  font-size: 0.78rem;
}
.card-ordered-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.6rem;
  color: #fff;
  flex-shrink: 0;
}
.card-date { color: var(--text-dim); font-size: 0.72rem; }

/* Hover tooltip — long summary shown when user hovers a card.
   Positioned absolutely by JS, styled here. */
.card-tip {
  position: absolute;
  max-width: 360px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.84rem;
  line-height: 1.55;
  box-shadow: var(--shadow-lg);
  z-index: 60;
  pointer-events: none;
  animation: tipIn 0.12s ease-out;
}
@keyframes tipIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Score + verdict pills — use OPI badge palette */
.score-pill {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  padding: 3px 12px;
  border-radius: 999px;
}
.score-pill.green  { background: var(--green-dim);  color: var(--green); }
.score-pill.yellow { background: var(--yellow-dim); color: var(--yellow); }
.score-pill.red    { background: var(--red-dim);    color: var(--red); }
.score-pill.grey   { background: var(--surface2);   color: var(--text-muted); }

.verdict {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 6px;
}
.verdict.GO, .verdict.PASS,
.verdict.PURSUE              { background: var(--green-dim);  color: var(--green); }
.verdict.CONDITIONAL         { background: var(--yellow-dim); color: var(--yellow); }
.verdict.PARK, .verdict.DEFER { background: var(--orange-dim); color: var(--orange); }
.verdict.KILL, .verdict.REJECT { background: var(--red-dim);  color: var(--red); }
.verdict.BRIEF {
  background: rgba(132, 143, 221, 0.12);
  color: #848FDD;
  border: 1px solid rgba(132, 143, 221, 0.3);
}
.verdict.DRAFT {
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed var(--border-light);
  padding: 2px 7px;
}

/* Empty state */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.empty-icon { font-size: 40px; color: var(--text-dim); margin-bottom: 14px; }
.empty-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.empty-sub { font-size: 0.85rem; }

/* ============================================================
   Compare dock (floating action bar)
   ============================================================ */
.compare-dock {
  position: fixed;
  bottom: 24px;
  left: calc(var(--sidebar-w) / 2 + 50% - var(--sidebar-w) / 2);
  transform: translateX(-50%);
  z-index: 30;
  animation: dockIn 0.2s ease-out;
}
@keyframes dockIn {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to   { transform: translate(-50%, 0);     opacity: 1; }
}
.compare-dock-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--text);
  color: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
}
.compare-dock-count {
  font-size: 0.82rem;
  padding-right: 4px;
}
.compare-dock-count strong {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--orbio-green);
  margin-right: 4px;
}
.btn-dock {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.12s;
}
.btn-dock.ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}
.btn-dock.ghost:hover { background: rgba(255,255,255,0.08); }
.btn-dock.primary {
  background: var(--accent);
  color: #fff;
}
.btn-dock.primary:hover:not(:disabled) { background: #9098E3; }
.btn-dock.primary:disabled {
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.35);
  cursor: not-allowed;
}

/* ============================================================
   Modal (compare)
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.45);
  backdrop-filter: blur(2px);
}
.modal-sheet {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  max-width: 1200px;
  width: 100%;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.18s ease-out;
}
@keyframes modalIn {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.modal-sub {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0;
}
.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.12s;
  display: grid;
  place-items: center;
}
.modal-close:hover {
  background: var(--red-dim);
  color: var(--red);
  border-color: var(--red-dim);
}

.compare-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  flex: 1;
  min-height: 0;
}
.compare-rows {
  border-right: 1px solid var(--border);
  padding: 18px;
  overflow-y: auto;
  background: var(--surface2);
}
.compare-rows-title {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.compare-row-toggles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.compare-row-toggles label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  padding: 6px 9px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.12s;
}
.compare-row-toggles label:hover { background: var(--surface); color: var(--text); }
.compare-row-toggles label.on { color: var(--text); font-weight: 500; background: var(--surface); }
.compare-row-toggles input { accent-color: var(--accent); }

.compare-table-wrap {
  overflow: auto;
  padding: 0 0 24px;
}
.compare-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 0.85rem;
}
.compare-table th, .compare-table td {
  padding: 13px 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  text-align: left;
  background: var(--surface);
}
.compare-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 2px solid var(--border);
  padding-top: 18px;
  padding-bottom: 16px;
}
.compare-table thead th.label,
.compare-table tbody th.label {
  background: var(--surface2);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: 180px;
  min-width: 180px;
  position: sticky;
  left: 0;
  z-index: 2;
}
.compare-table td { min-width: 200px; }
.compare-table .col-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.compare-table .col-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 5px;
}
.compare-table a.col-open {
  font-size: 0.72rem;
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 6px;
  margin-top: 8px;
  display: inline-block;
  font-weight: 600;
}
.compare-table a.col-open:hover { background: var(--accent-soft); }
.compare-col-tag {
  display: inline-block;
  font-size: 0.68rem;
  padding: 2px 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin: 2px 2px 0 0;
  color: var(--text-muted);
}

/* ============================================================
   Tour overlay
   ============================================================ */
.tour {
  position: fixed;
  inset: 0;
  z-index: 50;
}
.tour-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(1px);
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.tour-spot {
  position: absolute;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(20, 20, 20, 0.55);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}
.tour-popover {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  width: 380px;
  max-width: calc(100vw - 32px);
  box-shadow: var(--shadow-lg);
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}
.tour-step-pill {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 3px 9px;
  background: var(--accent-dim);
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 12px;
}
.tour-popover h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px 0;
}
.tour-popover p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 18px 0;
}
.tour-popover p strong { color: var(--text); font-weight: 600; }
.tour-popover p code {
  background: var(--surface2);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--text);
}
.tour-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.tour-spacer { flex: 1; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 18px;
  }
  .sidebar-nav { max-height: none; padding-bottom: 18px; }
  .sidebar-user { display: none; }
  .main { margin-left: 0; padding: 20px 18px 40px; }
  .compare-dock { left: 50%; }
  .compare-grid { grid-template-columns: 1fr; }
  .compare-rows { border-right: 0; border-bottom: 1px solid var(--border); }
  .tour-popover { width: calc(100vw - 32px); }
}
