/* ============================================================
   Job Shortlist — Editorial Light
   Paper background, serif headings, terracotta accent. Anti-AI-default.
   ============================================================ */

:root {
  --bg: #fbf9f4;
  --surface: #ffffff;
  --surface-hi: #f5f2eb;
  --border: #e5e2dd;
  --border-strong: #d6d2cb;
  --text: #1a1815;
  --text-2: #5b554d;
  --text-3: #8a847b;
  --text-faint: #b3aea4;
  --accent: #b85c38;
  --accent-hover: #9a4a2c;
  --accent-bg: rgba(184, 92, 56, 0.08);
  --emerald: #5d8b2e;
  --rose: #c44545;

  /* Score band tints */
  --score-elite-bg: rgba(184, 92, 56, 0.1);
  --score-elite-fg: #9a4a2c;
  --score-strong-bg: rgba(93, 139, 46, 0.1);
  --score-strong-fg: #4a701f;
  --score-ok-bg: rgba(90, 85, 77, 0.06);
  --score-ok-fg: #5b554d;
  --score-weak-bg: rgba(138, 132, 123, 0.04);
  --score-weak-fg: #8a847b;

  --shadow-card: 0 1px 0 rgba(26, 24, 21, 0.02), 0 0 0 1px var(--border);
  --shadow-card-elite: 0 1px 0 rgba(184, 92, 56, 0.06), 0 0 0 1px rgba(184, 92, 56, 0.2);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', system-ui, -apple-system, 'SF Pro Text', sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle paper texture for warmth (commented in case Josh wants it; very subtle) */
/* body::before { content: ''; position: fixed; inset: 0; pointer-events: none; opacity: 0.03; background-image: ...; } */

/* ============================================================
   Typography scale — serif for display, sans for everything else
   ============================================================ */

.t-page-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  font-variation-settings: 'opsz' 36, 'SOFT' 30;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
@media (min-width: 640px) { .t-page-title { font-size: 34px; } }

.t-card-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 19px;
  font-weight: 500;
  font-variation-settings: 'opsz' 28, 'SOFT' 30;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--text);
}
@media (min-width: 640px) { .t-card-title { font-size: 22px; } }

.t-body { font-size: 15px; line-height: 1.6; }
@media (min-width: 640px) { .t-body { font-size: 16px; } }
.t-meta { font-size: 13px; line-height: 1.5; color: var(--text-2); }
.t-faint { font-size: 12px; color: var(--text-3); }

.num { font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace; font-variant-numeric: tabular-nums; }

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 18px;
  transition: box-shadow 200ms ease;
}
@media (min-width: 640px) {
  .card { padding: 24px; border-radius: 16px; }
}
.card-elite {
  background: linear-gradient(180deg, rgba(184, 92, 56, 0.025) 0%, var(--surface) 70%);
  box-shadow: var(--shadow-card-elite);
}
.card-muted { background: var(--bg); }
.card-muted .t-card-title { color: var(--text-2); }
.card-hidden { opacity: 0.5; background: var(--bg); }

/* ============================================================
   Score badge
   ============================================================ */

.score {
  display: inline-flex;
  align-items: baseline;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.score-num { font-size: 17px; line-height: 1; }
.score-elite { background: var(--score-elite-bg); color: var(--score-elite-fg); }
.score-strong { background: var(--score-strong-bg); color: var(--score-strong-fg); }
.score-ok { background: var(--score-ok-bg); color: var(--score-ok-fg); }
.score-weak { background: var(--score-weak-bg); color: var(--score-weak-fg); }

/* ============================================================
   Pills (engagement type)
   ============================================================ */

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(90, 85, 77, 0.08);
  color: var(--text-2);
}
.pill-consulting { background: rgba(93, 139, 46, 0.1); color: #4a701f; }
.pill-ft { background: rgba(74, 112, 165, 0.1); color: #355a85; }
.pill-advisory { background: rgba(126, 90, 168, 0.1); color: #5a3f7a; }
.pill-field { background: rgba(184, 92, 56, 0.1); color: #9a4a2c; }

/* ============================================================
   Chance indicator
   ============================================================ */

.chance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.chance-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.chance-green .chance-dot { background: var(--emerald); }
.chance-amber .chance-dot { background: var(--accent); }
.chance-red .chance-dot { background: var(--rose); }

/* ============================================================
   Title + company links
   ============================================================ */

.title-link { color: var(--text); text-decoration: none; transition: color 150ms ease; }
.title-link:hover { color: var(--accent); }

.company-link {
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  transition: all 150ms ease;
}
.company-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

.link-ext {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text-2);
  font-size: 13px;
  text-decoration: none;
  transition: color 120ms ease;
}
.link-ext:hover { color: var(--accent); }
.link-ext::after { content: '↗'; font-size: 11px; opacity: 0.6; margin-left: 2px; }

/* ============================================================
   Meta strip
   ============================================================ */

.meta-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); }
.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.meta-icon { color: var(--text-3); font-size: 12px; line-height: 1; }
.meta-urgent { color: var(--rose); font-weight: 500; }

/* ============================================================
   Verdict buttons
   ============================================================ */

.verdict-group { display: flex; gap: 8px; }
.verdict-btn {
  flex: 1;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 22px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  cursor: pointer;
  transition: all 120ms ease;
  user-select: none;
}
.verdict-btn:hover { background: var(--surface-hi); }
.verdict-btn:active { transform: scale(0.97); }
input[type="radio"]:checked + .verdict-btn[data-v="up"] {
  background: rgba(93, 139, 46, 0.1);
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(93, 139, 46, 0.12);
}
input[type="radio"]:checked + .verdict-btn[data-v="down"] {
  background: rgba(196, 69, 69, 0.1);
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(196, 69, 69, 0.12);
}
input[type="radio"]:checked + .verdict-btn[data-v="maybe"] {
  background: var(--accent-bg);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.12);
}

/* ============================================================
   Range slider
   ============================================================ */

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 9999px;
  background: var(--border-strong);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid var(--surface);
  box-shadow: 0 1px 3px rgba(184, 92, 56, 0.3);
  transition: transform 100ms ease;
}
input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid var(--surface);
}

/* ============================================================
   Primary button
   ============================================================ */

.btn-primary {
  min-height: 48px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  transition: all 120ms ease;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.99); }

/* ============================================================
   Secondary action icons
   ============================================================ */

.action-icon {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-3);
  background: transparent;
  cursor: pointer;
  transition: all 120ms ease;
}
.action-icon:hover { color: var(--text); background: var(--surface-hi); border-color: var(--border-strong); }
.action-icon:active { transform: scale(0.95); }
.action-icon.danger { color: var(--rose); border-color: rgba(196, 69, 69, 0.25); }
.action-icon.danger:hover { background: rgba(196, 69, 69, 0.06); border-color: rgba(196, 69, 69, 0.45); }

/* ============================================================
   Textarea / inputs
   ============================================================ */

textarea, input[type="text"], input[type="password"] {
  width: 100%;
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  resize: vertical;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
textarea::placeholder { color: var(--text-faint); }
textarea:focus, input[type="text"]:focus, input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

/* ============================================================
   Header / nav
   ============================================================ */

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 249, 244, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand-bar { height: 2px; background: linear-gradient(90deg, transparent 0%, var(--accent) 30%, var(--accent) 70%, transparent 100%); }
.brand {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 19px;
  font-weight: 500;
  font-variation-settings: 'opsz' 36, 'SOFT' 30;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nav-link {
  position: relative;
  padding: 8px 0;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: color 120ms ease;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -13px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* ============================================================
   Empty state
   ============================================================ */

.empty { padding: 60px 20px; text-align: center; color: var(--text-2); font-size: 15px; }
.empty-title { font-family: 'Fraunces', serif; color: var(--text); font-size: 22px; font-weight: 500; margin-bottom: 10px; letter-spacing: -0.01em; }

/* ============================================================
   HTMX animations
   ============================================================ */

.htmx-swapping { opacity: 0; transition: opacity 100ms ease; }
article { animation: cardIn 220ms cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Feedback summary strip
   ============================================================ */

.fb-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(93, 139, 46, 0.06);
  border: 1px solid rgba(93, 139, 46, 0.18);
  font-size: 13px;
  color: var(--text-2);
}
.fb-verdict {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(93, 139, 46, 0.12);
  color: #4a701f;
}
.fb-score { font-family: 'JetBrains Mono', monospace; font-weight: 600; padding: 2px 8px; border-radius: 5px; background: rgba(90, 85, 77, 0.08); color: var(--text); }
.fb-note { font-style: italic; color: var(--text-2); flex: 1; min-width: 0; word-break: break-word; }

/* ============================================================
   Saved / dismissed strips (after voting)
   ============================================================ */

.card-saved-strip, .card-dismissed-strip {
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.card-saved-strip {
  background: rgba(93, 139, 46, 0.06);
  border: 1px solid rgba(93, 139, 46, 0.2);
}
.card-dismissed-strip {
  background: rgba(138, 132, 123, 0.05);
  border: 1px solid var(--border-strong);
}
.strip-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
}
.card-saved-strip .strip-label { color: #4a701f; }
.card-dismissed-strip .strip-label { color: var(--text-3); }
.strip-title {
  flex: 1;
  min-width: 0;
  color: var(--text-2);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   Deleted state
   ============================================================ */

.card-deleted {
  background: rgba(196, 69, 69, 0.04);
  border: 1px solid rgba(196, 69, 69, 0.2);
  padding: 14px 18px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-2);
}

/* ============================================================
   Application status pills (on /saved)
   ============================================================ */

.pill-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(90, 85, 77, 0.08);
  color: var(--text-2);
}
.pill-status-new { background: rgba(90, 85, 77, 0.08); color: var(--text-2); }
.pill-status-applied { background: rgba(74, 112, 165, 0.1); color: #355a85; }
.pill-status-interviewing { background: rgba(184, 92, 56, 0.1); color: #9a4a2c; }
.pill-status-offer { background: rgba(93, 139, 46, 0.12); color: #4a701f; }
.pill-status-rejected { background: rgba(196, 69, 69, 0.08); color: var(--rose); }
.pill-status-withdrawn { background: rgba(138, 132, 123, 0.06); color: var(--text-3); }

/* ============================================================
   Sources page — search-row component
   ============================================================ */

.search-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (min-width: 640px) { .search-row { flex-direction: row; align-items: center; } }
.search-row-main { flex: 1; min-width: 0; }
.search-label {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.search-url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-3);
  word-break: break-all;
  margin-bottom: 4px;
}
.search-row-actions { display: flex; gap: 8px; flex-shrink: 0; }
.test-result {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
}
.test-ok { background: rgba(93, 139, 46, 0.08); color: #4a701f; border: 1px solid rgba(93, 139, 46, 0.2); }
.test-fail { background: rgba(196, 69, 69, 0.06); color: var(--rose); border: 1px solid rgba(196, 69, 69, 0.25); }

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: var(--surface-hi);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text-2);
}

/* ============================================================
   Utility
   ============================================================ */

.divider { height: 1px; background: var(--border); margin: 14px 0; }
.section-gap > * + * { margin-top: 12px; }
