/* YC S26 Watch — light, clean, Notion/Linear inspired */

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-hover: #fafafa;
  --border: #e8e8e4;
  --border-strong: #d9d9d3;
  --text: #1a1a18;
  --text-secondary: #5c5c56;
  --text-muted: #8a8a82;
  --accent: #f26522;
  --accent-soft: #fff4ed;
  --accent-border: #ffd9c2;
  --chip-bg: #f0f0ec;
  --chip-active: #1a1a18;
  --chip-active-text: #ffffff;
  --shadow-sm: 0 1px 2px rgba(26, 26, 24, 0.04);
  --shadow-md: 0 4px 16px rgba(26, 26, 24, 0.06), 0 1px 3px rgba(26, 26, 24, 0.04);
  --shadow-card: 0 1px 3px rgba(26, 26, 24, 0.04), 0 0 0 1px rgba(26, 26, 24, 0.03);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --radius-pill: 999px;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 1200px;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ——— Boot ——— */
.boot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 60vh;
  color: var(--text-muted);
  font-size: 14px;
}

.boot-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state {
  max-width: 420px;
  margin: 80px auto;
  padding: 32px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.error-state h1 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.error-state p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ——— Layout ——— */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 247, 245, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-title h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.brand-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.brand-sub strong {
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.stat-chip strong {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stat-chip.secondary {
  background: transparent;
  box-shadow: none;
}

.main {
  flex: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

/* ——— Filters ——— */
.filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.search-wrap {
  position: relative;
  flex: 1 1 240px;
  min-width: 180px;
}

.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:hover {
  border-color: var(--border-strong);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.12);
  background: var(--surface);
}

.kbd-hint {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  pointer-events: none;
}

.search-wrap:focus-within .kbd-hint {
  display: none;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s var(--ease);
  white-space: nowrap;
}

.toggle-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.toggle-pill[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background 0.15s;
}

.toggle-pill[aria-pressed="true"] .toggle-dot {
  background: var(--accent);
}

.clear-btn {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  transition: color 0.15s, background 0.15s;
}

.clear-btn:hover {
  color: var(--text);
  background: var(--chip-bg);
}

.clear-btn[hidden] {
  display: none;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-section-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.filter-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.filter-label-note {
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  opacity: 0.7;
}

.chip-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  -webkit-overflow-scrolling: touch;
}

.chip-scroll::-webkit-scrollbar {
  height: 4px;
}

.chip-scroll::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 2px;
}

.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.12s var(--ease);
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.chip[aria-pressed="true"] {
  background: var(--chip-active);
  border-color: var(--chip-active);
  color: var(--chip-active-text);
}

.chip-count {
  font-size: 11px;
  opacity: 0.65;
  font-variant-numeric: tabular-nums;
}

.chip[aria-pressed="true"] .chip-count {
  opacity: 0.75;
}

.tags-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tags-more-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  padding: 6px 10px;
  border-radius: var(--radius-xs);
}

.tags-more-btn:hover {
  background: var(--accent-soft);
}

.tag-search-wrap {
  flex: 1 1 160px;
  min-width: 140px;
  max-width: 220px;
}

.tag-search {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg);
  font-size: 12.5px;
}

.tag-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(242, 101, 34, 0.1);
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.results-bar strong {
  color: var(--text-secondary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ——— Card grid ——— */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
  cursor: pointer;
  text-align: left;
  color: inherit;
  height: 100%;
  min-height: 168px;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.logo,
.monogram {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--chip-bg);
  border: 1px solid var(--border);
}

.monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-secondary);
  background: linear-gradient(145deg, #f5f5f2, #ebebe6);
}

.logo.lg,
.monogram.lg {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  font-size: 20px;
}

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

.card-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.badge-batch {
  color: #5746af;
  background: #f3f0ff;
  border: 1px solid #e4daff;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.badge-rebrand {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}

.badge-hiring {
  color: #1a7a4c;
  background: #edf8f2;
  border: 1px solid #c6ead7;
}

.badge-cohort {
  color: var(--text-secondary);
  background: var(--chip-bg);
  border: 1px solid var(--border);
}

/* Source badges */
.badge-source {
  color: var(--text-secondary);
  background: var(--chip-bg);
  border: 1px solid var(--border);
}

.badge-source-yc {
  color: #f26522;
  background: #fff4ed;
  border: 1px solid #ffd9c2;
  font-weight: 700;
}

.badge-source-techstars {
  color: #0052cc;
  background: #e6f0ff;
  border: 1px solid #b3d4ff;
  font-weight: 700;
}

.badge-source-ef {
  color: #7c3aed;
  background: #ede9fe;
  border: 1px solid #ddd6fe;
  font-weight: 700;
}

.badge-source-antler {
  color: #059669;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  font-weight: 700;
}

.badge-source-speedrun {
  color: #dc2626;
  background: #fee2e2;
  border: 1px solid #fecaca;
  font-weight: 700;
}

.hiring-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22a06b;
  box-shadow: 0 0 0 2px rgba(34, 160, 107, 0.2);
}

.card-one-liner {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}

.pill {
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  color: var(--text-secondary);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill-industry {
  background: #eef1f8;
  color: #3d4f73;
}

/* ——— Empty ——— */
.empty {
  text-align: center;
  padding: 64px 24px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.empty h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.empty p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ——— Detail ——— */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding: 6px 10px 6px 6px;
  border-radius: var(--radius-xs);
  transition: color 0.15s, background 0.15s;
}

.detail-back:hover {
  color: var(--text);
  background: var(--chip-bg);
}

.detail-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.detail-header-text {
  flex: 1;
  min-width: 200px;
}

.detail-header-text h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.detail-one-liner {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 640px;
}

.detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.15s var(--ease);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text);
  color: #fff;
}

.btn-primary:hover {
  background: #333;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
}

.section h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-body {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  white-space: pre-wrap;
}

.section-body.muted {
  color: var(--text-muted);
  font-style: italic;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px 20px;
}

.meta-item dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.meta-item dd {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.former-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.former-list li {
  padding: 6px 12px;
  background: var(--chip-bg);
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  font-weight: 500;
}

.signals-note {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.not-found {
  text-align: center;
  padding: 80px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.not-found h1 {
  margin: 0 0 8px;
  font-size: 20px;
}

.not-found p {
  margin: 0 0 20px;
  color: var(--text-muted);
}

.footer-stub {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 40px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 640px) {
  .topbar-inner {
    padding: 12px 16px;
  }

  .main {
    padding: 16px 16px 48px;
  }

  .detail-header-text h1 {
    font-size: 22px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .kbd-hint {
    display: none;
  }

  .filters {
    padding: 14px;
  }
}


/* ——— Watchlist ——— */
.card-wrap {
  position: relative;
  height: 100%;
  min-height: 168px;
}

.card-wrap .card {
  height: 100%;
}

.watch-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  transition: color 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease);
}

.watch-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.watch-btn.is-watched {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.watch-btn:active {
  transform: scale(0.96);
}

.star-icon {
  display: block;
}

.toggle-pill.is-on,
.toggle-pill[aria-pressed="true"].is-on {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: #c24e12;
}

.toggle-pill .star-icon {
  margin-right: 2px;
}

.stat-chip.watchlist-stat {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
}

.stat-chip.watchlist-stat:hover,
.stat-chip.watchlist-stat.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: #c24e12;
}

.stat-chip.watchlist-stat .star-icon {
  color: var(--accent);
}

.btn-watch-on {
  background: var(--accent-soft);
  color: #c24e12;
  border: 1px solid var(--accent-border);
}

.btn-watch-on:hover {
  background: #ffe8d9;
}

.detail-actions .btn .star-icon {
  margin-right: 2px;
}

.detail-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ——— Watchlist export / import ——— */
.btn-compact {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.btn-compact:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.filters-row .btn-compact {
  align-self: center;
}

/* ——— Tab Navigation ——— */
.tab-nav {
  display: flex;
  gap: 4px;
  background: var(--chip-bg);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.tab-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s var(--ease);
  white-space: nowrap;
}

.tab-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
}

.tab-link.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.tab-link svg {
  flex-shrink: 0;
}

/* ——— Page Header ——— */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ——— Jobs Cards ——— */
.job-card {
  min-height: 168px;
}

.job-logo,
.job-monogram {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--chip-bg);
  border: 1px solid var(--border);
}

.job-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.job-logo.lg,
.job-monogram.lg {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  font-size: 20px;
}

.job-role {
  font-weight: 500;
  color: var(--text);
}

.card-blurb {
  margin: 2px 0 4px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ——— Job Detail Company ——— */
.detail-company-name {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.detail-blurb {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 600px;
}

/* ——— Fit Badges ——— */
.pill-fit {
  font-weight: 600;
}

.pill-fit.fit-very-high {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.pill-fit.fit-high {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.pill-fit.fit-medium {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.pill-fit.fit-low {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ——— Status Badges ——— */
.pill-status {
  font-weight: 600;
}

.pill-status.status-watch {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.pill-status.status-applied {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.pill-status.status-closed {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.pill-status.status-passed {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* ——— Remote/Hybrid Badges ——— */
.badge-remote {
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

.badge-hybrid {
  color: #7c3aed;
  background: #ede9fe;
  border: 1px solid #ddd6fe;
}

.badge-onsite {
  color: var(--text-secondary);
  background: var(--chip-bg);
  border: 1px solid var(--border);
}

@media (max-width: 640px) {
  .tab-nav {
    order: 10;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-chips {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ——— Company Health Badges ——— */
.badge-health {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-health.health-healthy {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.badge-health.health-watch {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
}

.badge-health.health-caution {
  color: #fff;
  background: #dc2626;
  border: 1px solid #b91c1c;
  font-weight: 700;
}

.badge-health.health-unknown {
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.badge-health-lg {
  font-size: 13px;
  padding: 6px 14px;
}

/* Health Strip on Cards */
.health-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.health-summary {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

/* Health filter chips */
.chip-health {
  border: 1px solid var(--border);
}

.chip-health.chip-health-healthy {
  border-color: #bbf7d0;
}

.chip-health.chip-health-healthy[aria-pressed="true"] {
  background: #166534;
  border-color: #166534;
  color: #fff;
}

.chip-health.chip-health-watch {
  border-color: #fde68a;
}

.chip-health.chip-health-watch[aria-pressed="true"] {
  background: #92400e;
  border-color: #92400e;
  color: #fff;
}

.chip-health.chip-health-caution {
  border-color: #fecaca;
}

.chip-health.chip-health-caution[aria-pressed="true"] {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.chip-health.chip-health-unknown {
  border-color: #e5e7eb;
}

.chip-health.chip-health-unknown[aria-pressed="true"] {
  background: #6b7280;
  border-color: #6b7280;
  color: #fff;
}

/* Health Section in Detail View */
.section-health {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.health-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.health-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.health-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.health-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.health-row-layoff .health-value {
  color: #dc2626;
  font-weight: 500;
}

.health-row-meta {
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.health-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  min-width: 80px;
  flex-shrink: 0;
}

.health-value {
  font-size: 14px;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.health-link,
.health-evidence-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  transition: background 0.15s var(--ease);
}

.health-link:hover,
.health-evidence-link:hover {
  background: var(--accent-soft);
}

.health-evidence-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.health-row-evidence {
  padding-top: 8px;
}

.health-no-data {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}
