:root {
  --topbar-height: 58px;
  --bg:            #FCFBFA;
  --surface:       #F3F0EB;
  --surface2:      #EBE7E0;
  --border:        #E0DCD4;
  --border-strong: #C8C2B8;
  --magenta:       #C4727A;
  --cyan:          #5B8FA8;
  --yellow:        #B89840;
  --orange:        #C07840;
  --purple:        #8870A8;
  --red:           #C0544A;
  --slate:         #7A8898;
  --offer:         #4A9E6B;
  --lime:          #E7FC60;
  --gold:          #B8956A;
  --forest:        #004534;
  --text:          #2C2520;
  --text-dim:      #8C8478;
  --text-mid:      #5A524A;
  --sidebar-bg:    #EEEBE7;

  /* Radius scale */
  --radius-pill: 24px;
  --radius-lg:   16px;
  --radius-md:   8px;
  --radius-sm:   4px;
}

[data-theme="dark"] {
  --bg:            #1C1917;
  --surface:       #231F1B;
  --surface2:      #2C2723;
  --border:        #352F2A;
  --border-strong: #3E3830;
  --magenta:       #D0828A;
  --cyan:          #6BA0B8;
  --yellow:        #C8A850;
  --orange:        #D08850;
  --purple:        #9880B8;
  --red:           #D06858;
  --slate:         #8FA0B2;
  --offer:         #5BB87A;
  --lime:          #E7FC60;
  --gold:          #B8956A;
  --forest:        #0A5540;
  --text:          #EDE8E0;
  --text-dim:      #8C8478;
  --text-mid:      #A89E94;
  --sidebar-bg:    #1C1917;
}

/* ── DEV BANNER ── */
.dev-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--orange);
  color: #000;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-align: center;
  padding: 2px 0;
  pointer-events: none;
}
.dev-banner ~ .app-shell { padding-top: 20px; }

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── LAYOUT ── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 200px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: none;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.sidebar.collapsed { width: 52px; }

.sidebar.collapsed .sidebar-wordmark-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sidebar-meta,
.sidebar.collapsed .sidebar-label { display: none; }


.sidebar.collapsed .nav-item { justify-content: center; padding: 0.6rem 0; }
.sidebar.collapsed .nav-icon { width: auto; }
.sidebar.collapsed .sidebar-bottom { align-items: center; padding: 1rem 0; }
.sidebar.collapsed #sync-btn { padding: 0.4rem 0; width: 36px; text-align: center; font-size: 0.8rem; letter-spacing: 0; }
.sidebar.collapsed .logout-link { display: none; }
.sidebar.collapsed .sidebar-controls { justify-content: center; }

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem 0 0.75rem;
  flex-shrink: 0;
  height: var(--topbar-height);
  box-sizing: border-box;
}

.sidebar-wordmark {
  font-family: 'Archivo Black', sans-serif;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  flex: 1;
  padding-left: 0.5rem;
}
/* The period — accent, doubles as the liveness signal. Pulses whenever
   Ari is working for the user (sync running, scout scanning, anything
   long-running on the server). Wired via .working class added by
   base_app.html when is_working is true.
   Light mode: gold (lime lacks contrast on warm stone).
   Dark mode:  lime (contrast holds on #1C1917). */
.sidebar-wordmark span span {
  color: var(--gold);
  transition: opacity 300ms ease;
}
[data-theme="dark"] .sidebar-wordmark span span {
  color: var(--lime);
}
.sidebar-wordmark.working span span {
  animation: dot-pulse 1.8s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.2; }
}

/* ── HAMBURGER ── */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-dim);
  transform-origin: center;
  transition: transform 0.25s ease, opacity 0.2s ease, background 0.15s;
}
.hamburger:hover span { background: var(--text); }

/* Animate to × when collapsed */
.sidebar.collapsed .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sidebar.collapsed .hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.sidebar.collapsed .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hide wordmark text when collapsed */
.sidebar.collapsed .sidebar-wordmark-text { display: none; }

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.35rem 1.5rem;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.15s, background 0.15s;
}

.nav-item:hover { color: var(--text); background: rgba(44,37,32,0.04); }

.nav-item.active {
  color: var(--text);
  background: rgba(44,37,32,0.04);
  font-weight: 600;
}

.nav-icon { display: flex; align-items: center; justify-content: center; width: 16px; flex-shrink: 0; }
.nav-icon svg { width: 16px; height: 16px; }

.nav-badge {
  margin-left: auto;
  font-size: 0.6rem;
  font-weight: 600;
  background: var(--magenta);
  color: #fff;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.sidebar-meta {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  color: var(--text-dim);
  line-height: 2;
}

.sidebar-meta .timestamp { color: var(--text-mid); }

.sidebar-bottom {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── MAIN ── */
.main-content {
  flex: 1;
  min-width: 0;
}

.wordmark {
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.wordmark span { color: var(--lime); }

/* ── SIDEBAR CONTROLS (theme + collapse toggles) ── */
.sidebar-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-top: 1px solid var(--border);
}

.sidebar-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.8rem;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.sidebar-icon-btn:hover { color: var(--text); }

/* ── LOGOUT LINK ── */
.logout-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}
.logout-link:hover { color: var(--text); }

/* Settings nav item — sits below the product nav, visually separated */
.nav-item-meta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ── SYNC BUTTON ── */
#sync-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.5rem;
  background: var(--lime);
  border: none;
  color: var(--forest);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  border-radius: var(--radius-pill);
}
#sync-btn:hover:not(:disabled) {
  background: #D4EB3E;
}
#sync-btn:disabled {
  background: var(--border);
  color: var(--text-dim);
  cursor: not-allowed;
}

/* Spinner — inherits color from parent text color */
.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
  margin-right: 0.5em;
  flex-shrink: 0;
}
/* Buttons in loading state */
.btn-primary.is-loading,
.btn-secondary.is-loading,
.editor-btn.is-loading,
#sync-btn.is-loading,
.save-btn.is-loading,
#import-btn.is-loading,
#scout-btn.is-loading {
  cursor: wait;
  opacity: 0.85;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TICKER BAR ── */
.ticker {
  background: var(--surface);
  border-bottom: none;
  box-shadow: 0 1px 2px rgba(44, 37, 32, 0.04);
  height: var(--topbar-height);
  box-sizing: border-box;
  padding: 0 2rem;
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.ticker::-webkit-scrollbar { display: none; }

.tick {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.tick-label {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.tick-value {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.5rem;
  line-height: 1;
}

.tick-value.magenta { color: var(--magenta); }
.tick-value.cyan    { color: var(--cyan); }
/* .tick-value.green renamed: use .offer for offer-count tickers, no callers found in templates */
.tick-value.offer   { color: var(--offer); }
.tick-value.yellow  { color: var(--yellow); }
.tick-value.orange  { color: var(--orange); }
.tick-value.purple  { color: var(--purple); }
.tick-value.dim     { color: var(--text-mid); }

.tick-divider {
  width: 1px;
  height: 2rem;
  background: var(--border-strong);
  align-self: center;
}

/* ── PAGE HEADER ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 2.5rem;
  min-height: 108px;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}
.page-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.page-title-crumb {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}
.page-title-crumb:hover { color: var(--text); }
.page-title-sep { color: var(--text-dim); }
.detail-page {
  max-width: 840px;
  padding-top: 0.5rem;
}

/* ── OPPORTUNITY DRAWER ── */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 500;
}
.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.opp-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(640px, 92vw);
  background: var(--bg);
  box-shadow: -8px 0 32px rgba(28, 25, 23, 0.08);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 501;
  overflow-y: auto;
}
.opp-drawer.open { transform: translateX(0); }

.drawer-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 2;
}
.drawer-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}
.drawer-title-input {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
  padding: 0.25rem 0.5rem;
  margin-left: -0.5rem;
  border-radius: var(--radius-sm);
  flex: 1;
  min-width: 0;
  transition: background 0.12s;
}
.drawer-title-input:hover,
.drawer-title-input:focus { background: var(--surface); }
.drawer-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.drawer-save-btn:disabled {
  background: var(--border);
  border-color: var(--border);
  color: var(--text-dim);
  opacity: 0.5;
  cursor: default;
}
.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.12s, color 0.12s;
}
.drawer-close:hover { background: var(--surface); color: var(--text); }
.drawer-body {
  padding: 1.5rem 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}
.drawer-footer {
  display: flex;
  gap: 1.5rem;
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.edit-row-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.edit-row-grid-4 {
  display: grid;
  grid-template-columns: 1.5fr auto 1fr 1fr;
  gap: 0.75rem;
  align-items: end;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.page-summary {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── MAIN ── */
main {
  padding: 0 2.5rem 2.5rem;
}

/* ── OPPORTUNITY TABLE ── */
.opp-table {
  margin-top: 0.5rem;
  font-size: 16px;
}
.opp-thead {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 240px 150px 100px 120px 100px;
  gap: 1rem;
  padding: 0.85rem 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.opp-th {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95em;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}
.opp-th-time { text-align: right; }

.opp-section-break {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 0 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95em;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}
.opp-section-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85em;
  font-weight: 400;
  color: var(--text-dim);
}

.opp-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 240px 150px 100px 120px 100px;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}
.opp-row:hover {
  background: var(--surface);
  margin: 0 -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.opp-row-archived,
.archived-wrap .opp-row { opacity: 0.6; }
.archived-wrap .opp-thead { display: none; }

/* For radar/non-table rows */
.opp-list .opp-row {
  display: flex;
  gap: 1rem;
}
.opp-list .opp-row:first-child {
  border-top: 1px solid var(--border);
}
/* Status dot (used on radar, scout) */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.needs_response    { background: var(--magenta); }
.status-dot.upcoming_interview { background: var(--cyan); }
.status-dot.active_interviews  { background: var(--orange); }
.status-dot.offer              { background: var(--offer); }
.status-dot.applied_waiting    { background: var(--yellow); }
.status-dot.considering        { background: var(--slate); }
.status-dot.referral_pending   { background: var(--purple); }
.status-dot.rejected           { background: var(--red); opacity: 0.5; }
.status-dot.archived           { background: var(--border-strong); }

/* Pipeline progress bar */
.progress-bar {
  display: flex;
  gap: 3px;
  width: 64px;
  flex-shrink: 0;
}
.progress-bar .seg {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}
/* NOTE: .progress-bar .seg.filled default was var(--green) — mapped to --cyan (generic progress,
   not offer-specific). If this bar is used exclusively on offer-stage rows, change to --offer. */
.progress-bar .seg.filled { background: var(--cyan); }
.progress-bar.stage-1 .seg.filled { background: var(--cyan); }
.progress-bar.stage-2 .seg.filled { background: var(--yellow); }
.progress-bar.stage-3 .seg.filled { background: var(--cyan); }
.progress-bar.stage-4 .seg.filled { background: var(--offer); }
.progress-bar.stage-rejected .seg.filled { background: var(--red); opacity: 0.5; }
.progress-bar.stage-archived .seg { background: var(--border); opacity: 0.5; }

.opp-cell-company { min-width: 0; }
.opp-company-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex-wrap: wrap;
}
.opp-company {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.15em;
  line-height: 1.25;
  color: var(--text);
}
.opp-interview-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65em;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--lime);
  background: rgba(0, 69, 52, 0.88);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.opp-role {
  font-size: 1.05em;
  line-height: 1.4;
  color: var(--text-mid);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.2rem;
}
.opp-cell-location,
.opp-cell-salary,
.opp-cell-equity,
.opp-cell-recruiter,
.opp-cell-date,
.opp-cell-time {
  font-size: 1.05em;
  font-weight: 400;
  color: var(--text-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.opp-cell-time { text-align: right; }
.opp-detail {
  padding: 1rem 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.archived-toggle {
  padding: 1.25rem 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  color: var(--text-dim);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.archived-toggle:hover { color: var(--text-mid); }

/* Page-level controls */
.page-filter {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-mid);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.page-checkbox {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

/* ── Canonical buttons — 4 variants per brand.html ── */
.btn-primary {
  background: var(--lime);
  color: var(--forest);
  border: none;
  padding: 0.85rem 1.75rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: background 0.15s;
  text-decoration: none;
  display: inline-block;
}
.btn-primary:hover { background: #D4EB3E; }
.btn-primary:active { background: #C8E032; }
.btn-primary:disabled { opacity: 0.35; cursor: default; }

.btn-secondary {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: transparent;
  border: 1px solid var(--forest);
  color: var(--forest);
  padding: 0.8rem 1.7rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s;
}
.btn-secondary:hover  { background: rgba(0, 69, 52, 0.06); }
.btn-secondary:active { background: rgba(0, 69, 52, 0.12); }
.btn-secondary:disabled { opacity: 0.4; cursor: default; }

/* Inverted secondary — filled forest. Pairs with .btn-primary (lime) when a
   view has more than one important action. High-contrast dark/light duo. */
.btn-secondary-inverse {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--forest);
  border: 1px solid var(--forest);
  color: #FCFBFA;
  padding: 0.8rem 1.7rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-secondary-inverse:hover  { background: #0a5540; border-color: #0a5540; }
.btn-secondary-inverse:active { background: #063828; border-color: #063828; }
.btn-secondary-inverse:disabled { opacity: 0.4; cursor: default; }

/* Primary CTA on dark backgrounds (inverted) */
.btn-primary.on-dark,
.btn-primary-inverse {
  background: var(--bg);
  color: var(--forest);
}
.btn-primary.on-dark:hover,
.btn-primary-inverse:hover  { background: #EDEAE2; }
.btn-primary.on-dark:active,
.btn-primary-inverse:active { background: #DFDBD0; }

.btn-ghost {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 8px 12px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}
.btn-ghost:hover  { color: var(--text); background: var(--surface); }
.btn-ghost:active { color: var(--text); background: var(--border); }

/* Save-confirmation state — button transforms own label to "Saved." in text-mid.
   Paired with setSaving()/confirmSave()/revertSaving() in app.js. Canonical
   save UX per brand v2. */
.btn-primary.is-saved,
.btn-secondary.is-saved,
.btn-secondary-inverse.is-saved,
.btn-ghost.is-saved,
.btn-action.is-saved,
.editor-btn.is-saved,
.save-btn.is-saved,
.drawer-save-btn.is-saved {
  color: var(--text-mid);
  pointer-events: none;
}

/* ── feature-card — canonical card primitive ── */
/* Use .feature-card for the light variant, .feature-card.is-dark for the forest-surface variant. */
.feature-card {
  background: var(--surface);
  color: var(--text);
  padding: 32px;
  border-radius: var(--radius-lg);
}
.feature-card.is-dark {
  background: var(--forest);
  color: #EDEAE0;
}
.feature-card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.feature-card.is-dark .feature-card-title { color: #FCFBFA; }
.feature-card-lead {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.feature-card.is-dark .feature-card-lead { color: #EDEAE0; }
.feature-card-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 1.25rem;
}
.feature-card.is-dark .feature-card-divider { background: rgba(255,255,255,0.12); }
.feature-card-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-mid);
  margin-bottom: 1.25rem;
}
.feature-card.is-dark .feature-card-body { color: rgba(237, 232, 224, 0.72); }
.feature-card-link {
  display: inline-block;
  color: var(--forest);
  text-decoration: underline;
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}
.feature-card.is-dark .feature-card-link { color: #FCFBFA; }
.feature-card-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

/* Scout import */
.scout-import {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

/* Detail meta row */
.detail-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.detail-link {
  font-size: 0.75rem;
  color: var(--cyan);
  text-decoration: none;
}
.detail-link:hover { text-decoration: underline; }
.detail-recruiter {
  font-size: 0.8rem;
  color: var(--text-mid);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.detail-recruiter a { color: var(--cyan); text-decoration: none; }
.detail-recruiter a:hover { text-decoration: underline; }

/* ── SECTIONS ── */
section { margin-bottom: 1.5rem; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.25rem;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  user-select: none;
  transition: background 0.15s;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(44, 37, 32, 0.03);
}
.section-header:hover { background: var(--surface2); }

.section-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-accent {
  width: 3px;
  height: 1.1rem;
  flex-shrink: 0;
}

.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 0.95rem;
  font-weight: 400;
}

.section-count {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.section-chevron {
  width: 13px;
  height: 13px;
  color: var(--text-dim);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.section-chevron.rotated { transform: rotate(180deg); }

.section-body { display: block; }
.section-body.collapsed { display: none; }

/* ── CARDS ── */
.cards { margin-top: 8px; display: flex; flex-direction: column; gap: 10px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(44, 37, 32, 0.04), 0 1px 2px rgba(44, 37, 32, 0.02);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.card-header {
  padding: 1.15rem 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  cursor: pointer;
  gap: 1rem;
}
.card-header:hover { background: var(--surface2); border-radius: var(--radius-md); }

.card-meta { flex: 1; min-width: 0; }

.card-top {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.company-name {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.role-title {
  font-size: 0.8rem;
  color: var(--text-mid);
}

.badge {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border: 1px solid;
  border-radius: var(--radius-sm);
}

.badge-override {
  color: var(--yellow);
  border-color: var(--yellow);
  background: rgba(255,214,0,0.06);
}

.card-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.card-sub a { color: var(--cyan); text-decoration: none; }
.card-sub a:hover { text-decoration: underline; }
.card-sub .stale { color: var(--yellow); }
/* NOTE: .card-sub .salary was var(--green) — mapped to --forest (dark authoritative green,
   salary is a positive fact, not a status). Flag for Scott: should this be --offer or --forest? */
.card-sub .salary { color: var(--forest); font-weight: 600; }

.card-chevron {
  width: 11px;
  height: 11px;
  color: var(--text-dim);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-top: 4px;
}
.card-chevron.rotated { transform: rotate(180deg); }

.card-body { display: none; }
.card-body.open { display: block; }

.card-detail {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.detail-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.detail-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.detail-link:hover { color: var(--text-dim); }

/* ── INLINE EDIT ── */
.edit-row { display: flex; flex-direction: column; gap: 0.75rem; }

.edit-row-top {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.edit-group { display: flex; flex-direction: column; gap: 0.25rem; }
.edit-row-grid {
  display: grid;
  grid-template-columns: 1.5fr auto 1fr 1fr;
  gap: 0.75rem;
  align-items: end;
}
.text-edit {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 0.5rem 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  border-radius: var(--radius-md);
  outline: none;
}
.text-edit:focus { border-color: var(--cyan); }
.remote-edit { accent-color: var(--cyan); margin-right: 0.35rem; }

.status-select {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  min-width: 160px;
  border-radius: var(--radius-md);
}
.status-select:focus { outline: 1px solid var(--cyan); }

.notes-edit, .next-step-edit {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 0.5rem 0.75rem;
  resize: vertical;
  width: 100%;
  line-height: 1.5;
  border-radius: var(--radius-md);
}
.notes-edit:focus, .next-step-edit:focus { outline: 1px solid var(--cyan); }

.save-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.5rem 1.1rem;
  background: var(--lime);
  border: none;
  color: var(--forest);
  cursor: pointer;
  transition: background 0.15s;
  align-self: flex-end;
  border-radius: var(--radius-pill);
}
.save-btn:hover:not(:disabled) { background: #D4EB3E; }
.save-btn:disabled { opacity: 0.35; cursor: default; }

.next-step-box {
  border-left: 3px solid var(--cyan);
  padding: 0.6rem 0.85rem;
  background: rgba(91,143,168,0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.next-step-box .detail-label { color: var(--cyan); }
.next-step-box p { font-size: 0.85rem; color: var(--text); line-height: 1.5; }

.notes-text {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.5;
}

.event-list, .email-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.event-list li, .email-list li {
  font-size: 0.8rem;
  color: var(--text-mid);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.event-dot-future { color: var(--cyan); flex-shrink: 0; }
.event-dot-past   { color: var(--text-dim); flex-shrink: 0; }
.event-time       { font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; color: var(--text-dim); white-space: nowrap; }
.email-date       { font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; color: var(--text-dim); flex-shrink: 0; }
.email-subject {
  color: var(--cyan);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.email-subject:hover { text-decoration: underline; }

.card-footer {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.copy-btn {
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.75rem;
  padding: 0;
  font-family: inherit;
  transition: color 0.15s;
}
.copy-btn:hover { color: var(--cyan); }

/* ── STATUS THEMES ── */
.theme-needs_response .section-accent   { background: var(--magenta); }
.theme-needs_response .section-title    { color: var(--magenta); }
.theme-needs_response .card             { box-shadow: inset 3px 0 0 var(--magenta), 0 1px 3px rgba(44,37,32,0.04); }
.theme-needs_response .card:hover       { box-shadow: inset 3px 0 0 var(--magenta), 0 2px 8px rgba(44,37,32,0.06); }
.theme-needs_response .badge           { color: var(--magenta); border-color: var(--magenta); background: rgba(196,114,122,0.07); }

.theme-upcoming_interview .section-accent  { background: var(--cyan); }
.theme-upcoming_interview .section-title   { color: var(--cyan); }
.theme-upcoming_interview .card            { box-shadow: inset 3px 0 0 var(--cyan), 0 1px 3px rgba(44,37,32,0.04); }
.theme-upcoming_interview .card:hover      { box-shadow: inset 3px 0 0 var(--cyan), 0 2px 8px rgba(44,37,32,0.06); }
.theme-upcoming_interview .badge          { color: var(--cyan); border-color: var(--cyan); background: rgba(91,143,168,0.07); }

.theme-offer .section-accent   { background: var(--offer); }
.theme-offer .section-title    { color: var(--offer); }
.theme-offer .card             { box-shadow: inset 3px 0 0 var(--offer), 0 1px 3px rgba(44,37,32,0.04); }
.theme-offer .card:hover       { box-shadow: inset 3px 0 0 var(--offer), 0 2px 8px rgba(44,37,32,0.06); }
.theme-offer .badge           { color: var(--offer); border-color: var(--offer); background: rgba(74,158,107,0.07); }
.theme-offer .company-name    { color: var(--offer); }

.theme-active_interviews .section-accent  { background: var(--orange); }
.theme-active_interviews .section-title   { color: var(--orange); }
.theme-active_interviews .card            { box-shadow: inset 3px 0 0 var(--orange), 0 1px 3px rgba(44,37,32,0.04); }
.theme-active_interviews .card:hover      { box-shadow: inset 3px 0 0 var(--orange), 0 2px 8px rgba(44,37,32,0.06); }
.theme-active_interviews .badge          { color: var(--orange); border-color: var(--orange); background: rgba(192,120,64,0.07); }

.theme-referral_pending .section-accent  { background: var(--purple); }
.theme-referral_pending .section-title   { color: var(--purple); }
.theme-referral_pending .card            { box-shadow: inset 3px 0 0 var(--purple), 0 1px 3px rgba(44,37,32,0.04); }
.theme-referral_pending .card:hover      { box-shadow: inset 3px 0 0 var(--purple), 0 2px 8px rgba(44,37,32,0.06); }
.theme-referral_pending .badge          { color: var(--purple); border-color: var(--purple); background: rgba(136,112,168,0.07); }

.theme-applied_waiting .section-accent  { background: var(--yellow); }
.theme-applied_waiting .section-title   { color: var(--yellow); }
.theme-applied_waiting .card            { box-shadow: inset 3px 0 0 var(--yellow), 0 1px 3px rgba(44,37,32,0.04); }
.theme-applied_waiting .card:hover      { box-shadow: inset 3px 0 0 var(--yellow), 0 2px 8px rgba(44,37,32,0.06); }
.theme-applied_waiting .badge          { color: var(--yellow); border-color: var(--yellow); background: rgba(184,152,64,0.06); }

.theme-considering .section-accent  { background: var(--slate); }
.theme-considering .section-title   { color: var(--slate); }
.theme-considering .card            { box-shadow: inset 3px 0 0 var(--slate), 0 1px 3px rgba(44,37,32,0.04); }
.theme-considering .card:hover      { box-shadow: inset 3px 0 0 var(--slate), 0 2px 8px rgba(44,37,32,0.06); }
.theme-considering .badge          { color: var(--slate); border-color: var(--slate); background: rgba(122,136,152,0.07); }

.theme-rejected .section-accent  { background: var(--red); }
.theme-rejected .section-title   { color: var(--red); }
.theme-rejected .card            { opacity: 0.7; }
.theme-rejected .badge          { color: var(--red); border-color: var(--red); background: transparent; }
.theme-rejected .company-name   { text-decoration: line-through; color: var(--text-dim); }

.theme-archived .section-accent  { background: var(--border-strong); }
.theme-archived .section-title   { color: var(--text-dim); }
.theme-archived .card            { opacity: 0.5; }
.theme-archived .badge          { color: var(--text-dim); border-color: var(--border-strong); }

/* ── EMPTY STATE ── */
.empty {
  text-align: center;
  padding: 6rem 2rem;
  color: var(--text-dim);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--text-mid);
}
.empty p { font-size: 0.85rem; line-height: 1.7; }

/* Company-not-found inside /scout/company/<slug>/ — uses .empty for the
   silhouette, then narrows the column and lifts a few visual details so the
   slug reads as the failed lookup, not a placeholder. */
.company-not-found {
  max-width: 520px;
  margin: 4rem auto 0;
}
.company-not-found-slug {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85em;
  color: var(--text-mid);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.4em;
}
.company-not-found-link {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.company-not-found-link:hover { color: var(--text); }

/* ── CONNECT-GMAIL EMPTY (used by Pipeline/Apply/Find when no Google) ── */
.connect-empty {
  max-width: 520px;
  margin: 5rem auto 0;
  padding: 0 2rem;
  text-align: left;
}
.connect-empty-headline {
  font-family: 'Archivo Black', sans-serif;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1rem;
}
.connect-empty-sub {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-mid);
  margin-bottom: 1.5rem;
}

/* ── NAV "needs setup" dot (rendered when has_google is false) ── */
.nav-setup-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
}

/* ── LINKEDIN SCOUT ── */
#scout-section {
  margin: 1.5rem 0 2rem;
}

#scout-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.scout-empty {
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 2rem 1rem;
  grid-column: 1 / -1;
  text-align: center;
}

/* ── Company typeahead (top of /scout/) ── */
.company-search {
  position: relative;
  margin: 1.5rem 0 0;
}
.company-search-input {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.company-search-input:focus { border-color: var(--cyan); }
.company-search-input::placeholder {
  color: var(--text-dim);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
}
.company-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  max-height: 360px;
  overflow-y: auto;
  z-index: 20;
}
.company-search-row {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.company-search-row:last-child { border-bottom: none; }
.company-search-row:hover,
.company-search-row.is-active {
  background: var(--surface);
  color: var(--text);
}

/* ── Prestige logo grid (top of /scout/) ── */
.prestige-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin: 1.5rem 0 0.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.prestige-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem 0.75rem;
  background: var(--bg);
  text-decoration: none;
  color: var(--text-mid);
  transition: background 0.15s, color 0.15s;
  min-height: 110px;
}
.prestige-tile:hover {
  background: var(--surface);
  color: var(--text);
}
.prestige-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  filter: grayscale(0.4);
  transition: filter 0.15s;
}
.prestige-tile:hover .prestige-logo { filter: grayscale(0); }
.prestige-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

/* ── Scout card (alternating light/dark) ── */
.scout-card {
  background: var(--surface);  /* warm cream #F3F0EB — matches brand page */
  border: none;
  border-radius: 0;
  padding: 1.75rem 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-sizing: border-box;
}
.scout-card.is-dark {
  background: var(--forest);
  color: #EDE8E0;
}
.scout-dismissed { opacity: 0.45; }

.scout-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}
.scout-card.is-dark .scout-eyebrow {
  color: var(--lime);
}

.scout-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.scout-card.is-dark .scout-title { color: #FCFBFA; }

.scout-lead {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.scout-card.is-dark .scout-lead { color: #EDE8E0; }

/* Company name on a scout card links to the company drilldown. Inherits
   the lead's color so the visual weight stays the same; underline appears
   on hover only. */
.scout-lead-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.12s;
}
.scout-lead-link:hover { border-bottom-color: currentColor; }

/* Company drilldown summary — sits between the page header and the grid */
.company-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 0 0.5rem;
}
.company-summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.company-summary-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.company-summary-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.company-summary-stat-num {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text);
}
.company-summary-stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.company-summary-locations {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.company-summary-loc {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-mid);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  display: inline-flex;
  gap: 0.4rem;
  align-items: baseline;
}
.company-summary-loc-count {
  color: var(--text-dim);
  font-size: 0.7rem;
}

.scout-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.scout-card.is-dark .scout-meta { color: rgba(237, 232, 224, 0.6); }

.scout-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 1rem;
}
.scout-card.is-dark .scout-divider { background: rgba(255,255,255,0.12); }

.scout-body {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-mid);
  margin-bottom: 0.85rem;
}
.scout-card.is-dark .scout-body { color: rgba(237, 232, 224, 0.72); }

.scout-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.scout-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  padding: 0.2rem 0.5rem;
  background: rgba(0, 69, 52, 0.06);
  color: var(--forest);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.scout-card.is-dark .scout-tag {
  background: rgba(231, 252, 96, 0.14);
  color: var(--lime);
}

.scout-link {
  font-size: 0.8rem;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: auto;
  margin-bottom: 1.25rem;
  align-self: flex-start;
}
.scout-card.is-dark .scout-link { color: #FCFBFA; }

.scout-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.scout-dismiss-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.scout-dismiss-btn:hover { color: var(--text); }
.scout-card.is-dark .scout-dismiss-btn { color: rgba(237, 232, 224, 0.55); }
.scout-card.is-dark .scout-dismiss-btn:hover { color: #FCFBFA; }

.scout-saved-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--forest);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 1rem;
}
.scout-card.is-dark .scout-saved-label { color: var(--lime); }

/* ── JOB DESCRIPTION ── */
.jd-edit {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  resize: vertical;
}
.jd-preview {
  margin-top: 0.35rem;
}
.jd-content {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-mid);
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 2rem;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2rem;
}
footer span { color: var(--text-mid); }

/* ── RESUME EDITOR OVERLAY ── */
.editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.editor-overlay-inner {
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 1rem;
}
.editor-header-left {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  min-width: 0;
}
.editor-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
}
.editor-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--text-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editor-lock {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface2);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
}
.editor-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.editor-save-status {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.editor-save-status.saving { color: var(--text-dim); }
.editor-save-status.saved { color: var(--forest); }
.editor-save-status.error { color: var(--red); }
.editor-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.7rem 1.45rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid var(--forest);
  background: transparent;
  color: var(--forest);
  transition: background 0.15s;
}
.editor-btn:hover:not(:disabled) { background: rgba(0, 69, 52, 0.06); }
.editor-btn:disabled { opacity: 0.4; cursor: default; }

/* Save = filled primary */
.editor-btn-save {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--forest);
}
.editor-btn-save:hover:not(:disabled) { background: #D4EB3E; border-color: #D4EB3E; }
.editor-btn-save:disabled {
  background: var(--border);
  border-color: var(--border);
  color: var(--text-dim);
  opacity: 0.5;
}

/* Export = secondary outline — inherits .editor-btn */
.editor-btn-export { }

/* Close = ghost icon */
.editor-btn-close {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  padding: 0.3rem 0.6rem;
  border: none;
  background: transparent;
  color: var(--text-dim);
  border-radius: var(--radius-sm);
}
.editor-btn-close:hover { color: var(--text); background: var(--surface); }
.editor-export-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.editor-template-select {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.editor-panes {
  display: flex;
  flex: 1;
  min-height: 0;
}
.editor-pane-edit,
.editor-pane-preview {
  width: 50%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.editor-pane-edit {
  border-right: 1px solid var(--border);
  background: var(--surface);
}
.editor-pane-preview {
  background: var(--bg);
}
.editor-pane-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 1;
}
.editor-pane-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
}
.editor-pane-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.md-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.md-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.12s;
  line-height: 1;
}
.md-btn:hover {
  background: var(--surface2);
  border-color: var(--border-strong);
  color: var(--text);
}
.md-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 4px;
}
.editor-textarea {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  border: none;
  outline: none;
  resize: none;
  padding: 2rem 2.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.75;
}
.editor-preview-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.editor-preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
  display: block;
}
.editor-preview-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg);
  overflow-y: auto;
}
.editor-preview {
  padding: 2rem 2.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
}
.editor-preview h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.editor-preview h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  font-weight: 400;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.editor-preview h2:has(+ h3) {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}
.editor-preview h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.85rem;
  margin-bottom: 0.2rem;
  color: var(--text);
}
.editor-preview ul {
  padding-left: 1.25rem;
  margin: 0.25rem 0;
}
.editor-preview li {
  margin-bottom: 0.15rem;
}
.editor-preview p {
  margin: 0.35rem 0;
}
.editor-preview strong {
  color: var(--text);
}
/* NOTE: diff-changed was var(--green). Mapped to --cyan (informational change indicator,
   not offer-status). Flag for Scott if a different diff color is preferred. */
.editor-preview .diff-changed {
  border-left: 2px solid var(--cyan);
  padding-left: 0.5rem;
  background: rgba(91,143,168,0.08);
}
.diff-removals {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.diff-removals-header {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.diff-removed-line {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--red);
  text-decoration: line-through;
  opacity: 0.6;
  padding: 0.1rem 0 0.1rem 0.5rem;
  border-left: 2px solid var(--red);
  margin-bottom: 0.15rem;
}

/* .btn-resume, .btn-resume-tailor, .btn-resume-edit, .btn-resume-view deleted (Phase 5).
   Callers migrated to .btn-action / .btn-action.view in opp_card.html and resume_editor.js. */

/* ── btn-action — canonical compact action button (replaces btn-resume-*) ── */
.btn-action {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--cyan);
  border: 1px solid currentColor;
  background: transparent;
  transition: background 0.15s ease;
}
.btn-action:hover  { background: rgba(91, 143, 168, 0.08); }
.btn-action:active { background: rgba(91, 143, 168, 0.16); }
/* View variant — offer context only */
.btn-action.view {
  color: var(--offer);
}
.btn-action.view:hover  { background: rgba(74, 158, 107, 0.08); }
.btn-action.view:active { background: rgba(74, 158, 107, 0.16); }

/* ── JOB IMPORT ── */
#import-section {
  margin: 2rem 0 0;
}

#import-body {
  padding: 1.25rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#import-form-row {
  display: flex;
  gap: 0.75rem;
}

#import-url {
  flex: 1;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 0.6rem 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}
#import-url:focus { border-color: var(--cyan); }
#import-url::placeholder { color: var(--text-dim); }

#import-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.5rem 1.1rem;
  background: var(--lime);
  border: none;
  color: var(--forest);
  cursor: pointer;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  transition: background 0.15s;
}
#import-btn:hover:not(:disabled) { background: #D4EB3E; }
#import-btn:disabled { background: var(--border); color: var(--text-dim); cursor: not-allowed; }

#import-status {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  min-height: 1rem;
}

/* ── INBOUND LEADS (Scout section on Pipeline page) ── */
.theme-scout .section-accent { background: var(--cyan); }

#scout-leads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.scout-lead-card {
  background: var(--surface);
  padding: 1rem 1.25rem 0.85rem;
  display: flex;
  gap: 0.75rem;
  transition: background 0.15s;
  position: relative;
}
.scout-lead-card:hover { background: var(--surface2); }
/* NOTE: scout-lead-saved was var(--green). Mapped to --forest (saved-to-pipeline indicator,
   not an offer status). Flag for Scott: should this be --cyan or --forest? */
.scout-lead-saved { border-left: 2px solid var(--forest); }

.scout-lead-score {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  width: 2rem;
  text-align: center;
  padding-top: 0.1rem;
}

.scout-lead-body { flex: 1; min-width: 0; }

.scout-lead-title {
  font-family: 'Archivo Black', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.2rem;
}
.scout-lead-company { font-size: 0.8rem; color: var(--cyan); margin-bottom: 0.1rem; }
.scout-lead-meta { font-size: 0.7rem; color: var(--text-dim); margin-bottom: 0.5rem; }
.scout-lead-reasoning {
  font-size: 0.75rem;
  color: var(--text-mid);
  line-height: 1.5;
  border-left: 2px solid var(--border-strong);
  padding-left: 0.5rem;
  margin-bottom: 0.5rem;
}
.scout-lead-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.5rem; }

.scout-lead-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}
.scout-action-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--border-strong);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
}
.scout-action-link:hover { color: var(--text); border-color: var(--text-mid); }
/* NOTE: scout-action-save/saved was var(--green). Mapped to --forest (save-to-pipeline action,
   not offer status). Flag for Scott: should this be --cyan (action) or --forest? */
.scout-action-save {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  background: transparent;
  border: 1px solid var(--forest);
  color: var(--forest);
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.scout-action-save:hover { background: rgba(0, 69, 52, 0.07); }
.scout-action-saved {
  font-size: 0.7rem;
  color: var(--forest);
}
.scout-action-dismiss {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.scout-action-dismiss:hover { border-color: var(--red); color: var(--red); }

/* Light mode overrides removed — light is now the default palette */

/* ── RESUME PAGE ── */
.resume-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 0;
  min-height: calc(100vh - var(--topbar-height));
}

.resume-editor-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 2rem 2.5rem;
}

.resume-editor-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.resume-preview-area {
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 0.15s;
  overflow: hidden;
}
.resume-preview-area:hover {
  background: var(--surface2);
}
.resume-preview-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-mid);
  padding: 1.5rem 1.75rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
}

.resume-save-status {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.05em;
}
.resume-save-status.saving { color: var(--text-dim); }
.resume-save-status.saved  { color: var(--forest); }
.resume-save-status.error  { color: var(--red); }

.resume-sidebar-panel {
  border-left: 1px solid var(--border);
  background: var(--bg);
}

.resume-profile-card,
.resume-versions-card {
  padding: 0;
}

.resume-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

/* Stacked profile cards (like scout cards) */
.profile-stack {
  display: flex;
  flex-direction: column;
}
.profile-card {
  background: var(--bg);
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border);
}
.profile-card:last-child { border-bottom: none; }
.profile-card.is-dark {
  background: var(--forest);
  color: #EDE8E0;
  border: none;
  border-radius: 0;
  padding: 1.5rem 1.75rem;
}

.profile-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.profile-card.is-dark .profile-eyebrow { color: var(--lime); }

.profile-summary {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.profile-field {
  margin-bottom: 1rem;
}
.profile-field:last-child { margin-bottom: 0; }

.profile-label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}
.profile-card.is-dark .profile-label { color: rgba(237, 232, 224, 0.55); }

.profile-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
}
.profile-card.is-dark .profile-value { color: #EDE8E0; }
.profile-value.small { font-size: 0.85rem; color: var(--text-mid); }

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.profile-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  padding: 0.35rem 0.6rem;
  background: rgba(0, 69, 52, 0.06);
  color: var(--forest);
  border-radius: var(--radius-sm);
}
.profile-card.is-dark .profile-tag {
  background: rgba(231, 252, 96, 0.14);
  color: var(--lime);
}
.profile-tag.strength {
  background: rgba(0, 69, 52, 0.06);
  color: var(--forest);
}
.profile-card.is-dark .profile-tag.strength {
  background: rgba(231, 252, 96, 0.14);
  color: var(--lime);
}

/* Resume versions list */
.resume-version-row {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.resume-version-row:last-child { border-bottom: none; }

.version-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.version-company {
  font-family: 'Archivo Black', sans-serif;
  font-size: 13px;
  color: var(--text);
}

.version-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  color: var(--text-dim);
}

.version-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.version-badge {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
}
/* NOTE: version-badge.used was var(--green). Mapped to --offer (used resume = offer-path context).
   Flag for Scott if a neutral confirmation color is preferred instead. */
.version-badge.used { border-color: var(--offer); color: var(--offer); }
.version-badge.mark-used { background: none; cursor: pointer; }
.version-badge.mark-used:hover { border-color: var(--offer); color: var(--offer); }

.version-copy {
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  font-size: 12px;
  padding: 0.15rem 0.4rem;
  cursor: pointer;
}
.version-copy:hover { border-color: var(--cyan); color: var(--cyan); }

.version-content.hidden { display: none; }

/* Light mode is now the default — no overrides needed */

.profile-edit-btn,
.profile-cancel-btn {
  background: transparent;
  border: 1px solid var(--forest);
  color: var(--forest);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s;
}
.profile-edit-btn:hover,
.profile-cancel-btn:hover { background: rgba(0, 69, 52, 0.06); }

.profile-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  padding: 0.4rem 0.5rem;
  box-sizing: border-box;
  outline: none;
}
.profile-input:focus { border-color: var(--cyan); }
.profile-textarea-sm { resize: vertical; min-height: 72px; line-height: 1.6; }
.profile-hint { font-size: 9px; color: var(--text-dim); text-transform: none; letter-spacing: 0; }

/* Role tier editor */
.role-tier-read { margin-bottom: 0.85rem; }
.role-tier-read:last-child { margin-bottom: 0; }
.role-tier-label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 0.4rem;
}
.role-tier-edit {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.6rem;
  margin-bottom: 0.5rem;
}
.tier-row-top {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.4rem;
}
.tier-label-input { flex: 1; }
.tier-remove-btn {
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
  flex-shrink: 0;
}
.tier-remove-btn:hover { border-color: var(--red); color: var(--red); }
.profile-add-tier-btn {
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  cursor: pointer;
}
.profile-add-tier-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── Responsive: mobile ─────────────────────────────────────────────────── */
@media (max-width: 840px) {
  /* Sidebar collapses to icons only */
  .sidebar {
    width: 52px;
  }
  .sidebar .sidebar-wordmark-text,
  .sidebar .nav-label,
  .sidebar .nav-badge,
  .sidebar .sidebar-label {
    display: none;
  }
  .sidebar .nav-item {
    justify-content: center;
    padding: 1rem 0;
  }
  .sidebar .nav-icon { width: auto; }
  .sidebar-top { padding: 0 0.5rem; justify-content: center; }

  /* Page header stacks */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 1.25rem;
    min-height: 0;
  }
  .page-title { font-size: 1.15rem; }
  .page-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  /* Main content padding */
  main { padding: 0 1.25rem 2rem; }

  /* Table: hide Location, Salary, Equity, First contact on mobile
     Keep: Company (+ role stacked), Last contact */
  .opp-thead {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.75rem 0;
  }
  .opp-thead .opp-th:not(:first-child):not(.opp-th-time) { display: none; }
  .opp-row {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 1rem 0;
    gap: 0.75rem;
  }
  .opp-cell-location,
  .opp-cell-salary,
  .opp-cell-equity,
  .opp-cell-date { display: none; }
  .opp-row:hover {
    margin: 0 -1.25rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Drawer: full-width slideout */
  .opp-drawer {
    width: 100%;
  }
  .drawer-header {
    padding: 1.25rem 1.25rem 0.75rem;
    flex-wrap: wrap;
  }
  .drawer-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .drawer-body {
    padding: 1.25rem 1.25rem 2rem;
  }
  .edit-row-grid-2,
  .edit-row-grid-4 {
    grid-template-columns: 1fr;
  }

  /* Resume page: stack columns */
  .resume-main {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .resume-editor-panel { padding: 1.5rem 1.25rem; }
  .resume-sidebar-panel { border-left: none; border-top: 1px solid var(--border); }

  /* Editor overlay: stack panes */
  .editor-panes { flex-direction: column; }
  .editor-pane-edit,
  .editor-pane-preview {
    width: 100%;
    min-height: 50vh;
  }
  .editor-pane-edit { border-right: none; border-bottom: 1px solid var(--border); }
  .editor-header {
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
  }
  .editor-header-right { flex-wrap: wrap; }
}
