/* ============================================================
   LowKeyHired app pages: modern SaaS aesthetic
   Palette: white/soft-grey surfaces, navy ink, emerald→teal accent
   Typography: Inter throughout (tabular figures for data)
   ============================================================ */

:root {
  /* Surface & text palette */
  --ink: #14211b;
  --ink-soft: #53625a;
  --ink-mute: #7b887f;
  --rule: #e5e0d3;
  --rule-soft: #efeadd;
  --paper: #ffffff;
  --paper-warm: #faf8f3;
  --paper-deep: #e8f1ea;
  --forest: #0b3d2e;
  --forest-2: #12503d;
  --amber: #f5b942;
  --amber-soft: #fdeec7;
  --cream: #faf8f3;

  /* Accent */
  --accent: #0d9158;          /* emerald */
  --accent-deep: #087043;
  --accent-soft: #e6f6ee;
  --accent-2: #14b8a6;        /* teal, for gradients */
  --focus-ring: 0 0 0 3px rgba(13, 145, 88, 0.18);

  /* Status colors — muted, not neon */
  --status-confirmed: #0f9d63;
  --status-confirmed-bg: #dcf5e8;
  --status-likely: #b5820a;
  --status-likely-bg: #faf0d6;
  --status-unknown: #6b7490;
  --status-unknown-bg: #eaecf3;

  --status-saved: #7c5cff;
  --status-saved-bg: #f1ecff;
  --status-applied: #2f63e0;
  --status-applied-bg: #e8effd;
  --status-interview: #b5820a;
  --status-interview-bg: #faf0d6;
  --status-offer: #0f9d63;
  --status-offer-bg: #dcf5e8;
  --status-rejected: #d1435b;
  --status-rejected-bg: #fbe4e9;
  --status-stale: #d1435b;
  --status-stale-bg: #fbe4e9;

  --shadow-card: 0 1px 2px rgba(16, 21, 43, 0.04), 0 8px 24px -14px rgba(16, 21, 43, 0.12);
  --shadow-hover: 0 2px 4px rgba(16, 21, 43, 0.04), 0 22px 44px -22px rgba(16, 21, 43, 0.2);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --font-display: 'Bricolage Grotesque', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Menlo', monospace;
}

/* ============================================================
   Reset & base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  background-image: radial-gradient(60% 40% at 50% 0%, rgba(13, 145, 88, 0.06) 0%, transparent 70%);
  min-height: 100vh;
  font-feature-settings: 'cv11', 'ss01';
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 160ms ease, color 160ms ease;
}

a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent-deep);
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: var(--ink);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
   Masthead
   ============================================================ */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: none;
}

.brand-mark {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 10px -3px rgba(13, 145, 88, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand-tag {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
  text-transform: none;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  border-bottom: none;
  padding: 6px 0;
  position: relative;
  transition: color 160ms ease;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link.is-active {
  color: var(--accent);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

.nav-link.btn-primary {
  padding: 8px 18px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 88px 0 56px;
  border-bottom: none;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(13, 145, 88, 0.08) 0%, transparent 100%),
    radial-gradient(50% 45% at 90% 10%, rgba(20, 184, 166, 0.08) 0%, transparent 100%);
}

.hero-compact {
  padding: 56px 0 40px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 800;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  color: var(--ink);
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0;
  font-style: normal;
  font-weight: 400;
}

.hero-lede em {
  font-style: normal;
  color: var(--accent-deep);
  font-weight: 600;
}

/* ============================================================
   Search form
   ============================================================ */
.search-section {
  padding: 48px 0 24px;
}

.search-form {
  background: #fff;
  border: 1px solid var(--rule);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
  margin-bottom: 24px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

.form-field .hint {
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  color: var(--ink-mute);
}

.form-field input,
.form-field select,
.form-field textarea {
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink);
  border-radius: var(--radius-sm);
  outline: none;
  width: 100%;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover {
  border-color: #d3d9e8;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.form-field input::placeholder {
  color: var(--ink-mute);
}

.form-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
}

.checkbox input {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--rule);
  border-radius: 5px;
  background: var(--paper);
  cursor: pointer;
  position: relative;
}

.checkbox input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox input:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  font-size: 12px;
  font-weight: bold;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 26px;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  transition: background 160ms ease, transform 160ms ease;
}

.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-2px);
}

.btn-primary .btn-arrow {
  font-size: 18px;
  transition: transform 200ms ease;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0;
  border-radius: var(--radius-pill);
  transition: all 160ms ease;
}

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

.btn-link {
  background: none;
  border: none;
  color: var(--ink-mute);
  font-size: 13px;
  padding: 6px 12px;
  letter-spacing: 0;
  font-weight: 500;
  border-radius: var(--radius-pill);
  transition: color 160ms ease, background 160ms ease;
}

.btn-link:hover {
  color: var(--accent-deep);
  background: var(--paper-deep);
}

.btn-link.danger:hover {
  color: var(--status-rejected);
}

/* ============================================================
   Status bar / messages
   ============================================================ */
.status-bar {
  margin: 16px 0 24px;
  padding: 14px 20px;
  background: var(--paper-warm);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.status-bar .status-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

.status-bar.is-warning {
  border-left-color: var(--status-stale);
  background: var(--status-stale-bg);
}

/* ============================================================
   Results — job cards
   ============================================================ */
.results-section {
  padding: 24px 0 80px;
}

.results {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: none;
}

.job-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  transition: box-shadow 200ms ease, transform 200ms ease;
  position: relative;
}

.job-card:hover {
  background: #fff;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.job-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 6px;
  flex-wrap: wrap;
}

.job-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink-mute);
}

.job-title {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 4px;
  font-weight: 650;
}

.job-company {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.job-company strong {
  font-weight: 600;
  color: var(--ink);
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}

.tag-confirmed {
  background: var(--status-confirmed-bg);
  color: var(--status-confirmed);
}
.tag-confirmed::before { content: "●"; }

.tag-likely {
  background: var(--status-likely-bg);
  color: var(--status-likely);
}
.tag-likely::before { content: "◐"; }

.tag-unknown {
  background: var(--status-unknown-bg);
  color: var(--status-unknown);
}
.tag-unknown::before { content: "○"; }

.job-reason {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 10px 0 0;
}

.jd-trigger {
  cursor: pointer;
  transition: color 160ms ease;
}

.jd-trigger:hover {
  color: var(--accent-deep);
}

/* ============================================================
   JD overlay — custom (not <dialog>) so two panels can sit
   side by side; native dialogs each claim their own top-layer
   and can't be laid out next to each other.
   ============================================================ */
.jd-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jd-overlay[hidden] {
  display: none;
}

.jd-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 21, 43, 0.45);
  backdrop-filter: blur(3px);
}

.jd-overlay-panels {
  position: relative;
  display: flex;
  gap: 20px;
  align-items: stretch;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
}

.jd-panel {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px -20px rgba(16, 21, 43, 0.35);
  padding: 36px;
  width: 720px;
  max-width: 100%;
  overflow-y: auto;
}

@media (max-width: 1500px) {
  /* Two 720px panels + gap no longer fit side by side — stack them. */
  .jd-overlay-panels {
    flex-direction: column;
    overflow-y: auto;
  }
  .jd-panel {
    width: min(720px, calc(100vw - 48px));
  }
}

.jd-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.jd-panel-header-main {
  flex: 1;
  min-width: 0;
}

.jd-panel-title {
  margin-bottom: 4px;
}

.jd-panel-header-match {
  flex-shrink: 0;
}

.jd-modal-sub {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.jd-modal-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 24px;
  overflow-x: auto;
  min-width: 0; /* nested flex items need this too, or overflow-x:auto never clips */
}

.jd-modal-actions .btn-primary,
.jd-modal-actions .btn-ghost {
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.jd-modal-description {
  margin-top: 24px;
  padding: 16px 18px;
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
}

.jd-modal-description p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  white-space: pre-line;
}

/* ============================================================
   Match strength ring
   ============================================================ */
.match-ring {
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--ring-color, var(--accent)) calc(var(--pct, 0) * 3.6deg), #e3e8f1 0deg);
}

.match-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fff;
}

.match-ring-value {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
}

.tier-perfect { --ring-color: #6a49e0; }
.tier-strong { --ring-color: #0d9158; }
.tier-good { --ring-color: #2f63e0; }
.tier-fair { --ring-color: #b5820a; }
.tier-weak { --ring-color: #d1435b; }

/* Match card — light surface, tier-coloured ring. One design, sized
   to context (compact on job cards, medium in the JD panel header). */
.match-card {
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.match-card .match-ring::before {
  background: var(--paper-warm);
}

.match-card .match-ring-value {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.match-card-label {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ring-color, var(--ink));
}

.match-card-sponsor {
  color: var(--ink-soft);
  font-weight: 500;
  border-top: 1px solid var(--rule);
  width: 100%;
}

/* Compact: job cards */
.match-card-compact {
  padding: 16px 14px;
  gap: 6px;
}

.match-card-compact .match-ring {
  width: 76px;
  height: 76px;
}

.match-card-compact .match-ring::before {
  inset: 6px;
}

.match-card-compact .match-ring-value {
  font-size: 16px;
}

.match-card-compact .match-card-label {
  font-size: 10px;
}

.match-card-compact .match-card-sponsor {
  font-size: 10px;
  padding-top: 6px;
}

/* Medium: JD panel header, proportional to the title block beside it */
.match-card-medium {
  padding: 18px 16px;
  gap: 8px;
  width: 150px;
}

.match-card-medium .match-ring {
  width: 92px;
  height: 92px;
}

.match-card-medium .match-ring::before {
  inset: 8px;
}

.match-card-medium .match-ring-value {
  font-size: 19px;
}

.match-card-medium .match-card-label {
  font-size: 11px;
}

.match-card-medium .match-card-sponsor {
  font-size: 11px;
  padding-top: 8px;
}

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.pagination:empty {
  display: none;
}

.pagination-info {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
}

.pagination button {
  padding: 8px 16px;
  font-size: 13px;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================
   Apply-confirmation modal
   ============================================================ */
.apply-confirm-modal {
  max-width: 420px;
}

.apply-confirm-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.apply-confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--paper-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 8px;
}

.apply-confirm-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.apply-confirm-sub {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 12px;
}

.apply-confirm-yes,
.apply-confirm-save {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 14px;
}

.job-actions {
  display: flex;
  align-items: flex-start;
}

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--ink-mute);
}

.empty-mark {
  font-family: var(--font-display);
  font-size: 64px;
  color: var(--rule);
  line-height: 1;
  margin-bottom: 16px;
}

.empty-state p {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  margin: 0;
  color: var(--ink-mute);
}

/* ============================================================
   Tracker dashboard
   ============================================================ */
.dashboard {
  padding: 48px 0 80px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  background: none;
  border: none;
  margin-bottom: 32px;
}

.summary-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 22px 18px;
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease;
  position: relative;
}

.summary-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.summary-card.is-active {
  background: var(--paper-deep);
  border-color: var(--accent);
}

.summary-card.is-active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.summary-card--alert .summary-num {
  color: var(--status-stale);
}

.summary-num {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 8px;
}

.summary-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.active-filter {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

/* ============================================================
   Application cards
   ============================================================ */
.apps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: none;
}

.app-row {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr 220px 180px;
  gap: 24px;
  align-items: start;
  position: relative;
}

.app-row.is-stale {
  border-left: 3px solid var(--status-stale);
}

.app-row.is-stale::before {
  content: "Follow up";
  position: absolute;
  top: 12px;
  right: 28px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--status-stale-bg);
  color: var(--status-stale);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.app-main {
  min-width: 0;
}

.app-title {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 4px;
  font-weight: 650;
}

.app-company {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.app-company strong {
  font-weight: 600;
  color: var(--ink);
}

.app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.app-notes {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  white-space: pre-wrap;
  border-left: 2px solid var(--rule-soft);
  padding-left: 12px;
  margin-top: 10px;
}

.app-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 600;
  border-radius: var(--radius-pill);
  width: fit-content;
}

.status-pill.saved { background: var(--status-saved-bg); color: var(--status-saved); }
.status-pill.applied { background: var(--status-applied-bg); color: var(--status-applied); }
.status-pill.interview { background: var(--status-interview-bg); color: var(--status-interview); }
.status-pill.offer { background: var(--status-offer-bg); color: var(--status-offer); }
.status-pill.rejected { background: var(--status-rejected-bg); color: var(--status-rejected); }
.status-pill.withdrawn { background: var(--status-unknown-bg); color: var(--status-unknown); }

.app-row select {
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  padding: 6px 10px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
}

.app-row select:focus {
  outline: none;
  border-color: var(--accent);
}

.app-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.app-actions a,
.app-actions button {
  font-size: 12px;
}

/* ============================================================
   Modal
   ============================================================ */
.modal {
  border: none;
  background: #fff;
  padding: 0;
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: calc(100% - 48px);
  box-shadow: 0 24px 80px -20px rgba(16, 21, 43, 0.35);
}

.modal::backdrop {
  background: rgba(16, 21, 43, 0.45);
  backdrop-filter: blur(3px);
}

.modal-form {
  padding: 36px;
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 24px;
  color: var(--ink);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-field--full {
  grid-column: 1 / -1;
}

.modal-field span {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}

.modal-field input,
.modal-field select,
.modal-field textarea {
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  padding: 10px 12px;
  font-size: 15px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 160ms ease;
  resize: vertical;
}

.modal-field input:focus,
.modal-field select:focus,
.modal-field textarea:focus {
  border-color: var(--accent);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(16, 21, 43, 0.25);
  animation: slideIn 200ms ease;
}

.toast.is-error { background: var(--status-rejected); }
.toast.is-success { background: var(--status-confirmed); }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--rule);
  padding: 24px 0;
  background: var(--paper);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-mute);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-meta {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: none;
}

/* ============================================================
   Loading shimmer
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--paper-warm) 0%, var(--paper-deep) 50%, var(--paper-warm) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 2px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.job-card.skeleton-card {
  pointer-events: none;
}

.job-card.skeleton-card .skeleton-line {
  height: 16px;
  margin-bottom: 12px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 880px) {
  .container { padding: 0 20px; }
  .form-row { grid-template-columns: 1fr; }
  .form-controls { flex-direction: column; align-items: stretch; }
  .form-controls .btn-primary { width: 100%; justify-content: center; }
  .summary { grid-template-columns: repeat(3, 1fr); }
  .job-card { grid-template-columns: 1fr; }
  .app-row { grid-template-columns: 1fr; }
  .app-row.is-stale::before { position: static; align-self: flex-start; margin-bottom: 8px; }
  .modal-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 44px; }
  .nav { gap: 18px; }
  .analysis-scores { flex-direction: column; gap: 12px; }
  .score-arrow { transform: rotate(90deg); }
}

/* ============================================================
   Analyze button
   ============================================================ */
.btn-analyze {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border: 1px solid var(--accent);
  padding: 10px 18px;
  font-size: 13px;
  letter-spacing: 0;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 200ms ease;
  font-family: var(--font-body);
  text-transform: none;
}

.btn-analyze:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 145, 88, 0.3);
}

.btn-analyze:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.analyze-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ============================================================
   Analysis panel
   ============================================================ */
.analysis-panel {
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 32px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.analysis-header {
  margin-bottom: 20px;
}

.analysis-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  font-weight: 700;
}

.analysis-assessment {
  background: #fff;
  border: 1px solid var(--rule-soft);
  padding: 16px 20px;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
}

.analysis-assessment p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* Score comparison */
.analysis-scores {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 28px;
}

.score-card {
  background: #fff;
  border: 1px solid var(--rule);
  padding: 20px 28px;
  text-align: center;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  min-width: 140px;
}

.score-card-projected {
  border-color: var(--accent);
  background: linear-gradient(135deg, #fff, var(--accent-soft));
}

.score-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  margin-bottom: 6px;
  font-weight: 500;
}

.score-value {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
  color: var(--ink);
}

.score-card-projected .score-value {
  color: var(--accent-deep);
}

.score-delta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--status-confirmed);
  margin-top: 6px;
  font-weight: 600;
}

.score-arrow {
  font-size: 24px;
  color: var(--ink-mute);
}

/* Sections */
.analysis-section {
  margin-bottom: 24px;
}

.analysis-section-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  margin: 0 0 4px;
  font-weight: 400;
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 8px;
}

.analysis-section-hint {
  font-size: 13px;
  color: var(--ink-mute);
  font-style: italic;
  margin: 4px 0 14px;
}

/* Skill gaps */
.gap-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.gap-item {
  background: #fff;
  border: 1px solid var(--rule-soft);
  padding: 14px 18px;
  border-radius: var(--radius-md);
}

.gap-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.gap-skill {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.importance-badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.importance-critical { color: var(--status-rejected); }
.importance-important { color: var(--status-interview); }
.importance-nice { color: var(--status-confirmed); }

.gap-suggestion {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Resume bullets */
.bullet-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bullet-item {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--rule-soft);
  padding: 16px 18px;
  border-radius: var(--radius-md);
  transition: border-color 200ms ease;
}

.bullet-item:hover {
  border-color: var(--accent);
}

.bullet-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.bullet-content {
  flex: 1;
  min-width: 0;
}

.bullet-text {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.55;
  font-style: italic;
}

.bullet-targets {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-deep);
  font-weight: 500;
}

/* Analysis error */
.analysis-error {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--status-stale-bg);
  border-radius: var(--radius-md);
}

.analysis-error-icon {
  font-size: 20px;
}

.analysis-error {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.analysis-error-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.analysis-error p {
  margin: 0;
  color: var(--status-stale);
  font-size: 14px;
}

.analysis-retry-btn {
  padding: 8px 16px;
  font-size: 12px;
}

/* The question a free account is asked before an analysis spends a credit: a neutral panel, not an error. */
.analysis-confirm {
  background: color-mix(in srgb, var(--lk-text) 6%, var(--lk-surface));
}

.analysis-confirm p {
  color: var(--lk-text);
}

/* Loading shimmer while analysis is in flight */
.analysis-loading {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Strengths / Weaknesses / Opportunities */
.swo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

@media (max-width: 560px) {
  .swo-grid {
    grid-template-columns: 1fr;
  }
}

.swo-card {
  background: #fff;
  border: 1px solid var(--rule-soft);
  border-top: 3px solid var(--swo-color, var(--accent));
  border-radius: var(--radius-md);
  padding: 16px;
}

.swo-card.is-strengths { --swo-color: var(--status-confirmed); }
.swo-card.is-weaknesses { --swo-color: var(--status-rejected); }
.swo-card.is-opportunities { --swo-color: var(--accent); }

.swo-card-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--swo-color, var(--ink));
  margin: 0 0 10px;
}

.swo-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.swo-list li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
  padding-left: 14px;
  position: relative;
}

.swo-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--swo-color, var(--ink-mute));
}

/* On-demand resume bullets */
.bullets-cta-row {
  text-align: center;
  padding: 8px 0 4px;
}

.bullets-cta-hint {
  font-size: 12px;
  color: var(--ink-mute);
  margin: 8px 0 0;
}

/* ============================================================
   Auth pages
   ============================================================ */
.auth-section {
  padding: 48px 0 80px;
}

.auth-card {
  max-width: 460px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--rule);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  background: var(--paper-warm);
  border-radius: var(--radius-pill);
  padding: 4px;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 0;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-mute);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--radius-pill);
  position: relative;
  transition: color 160ms ease, background 160ms ease;
}

.auth-tab:hover { color: var(--ink); }
.auth-tab.is-active {
  color: #fff;
  background: var(--accent);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field label {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

.auth-field input {
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-field input:focus { background: #fff; border-color: var(--accent); box-shadow: var(--focus-ring); }
.auth-field input::placeholder { color: var(--ink-mute); }

.auth-submit {
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}

.auth-error {
  background: var(--status-rejected-bg);
  color: var(--status-rejected);
  padding: 12px 16px;
  font-size: 14px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border-left: 3px solid var(--status-rejected);
}

.auth-modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-modal-header .brand-mark {
  margin: 0 auto 16px;
}

.auth-modal-sub {
  color: var(--ink-mute);
  font-size: 14px;
  line-height: 1.5;
  margin: 8px 0 0;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: 1px solid var(--rule);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  color: var(--ink-mute);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 160ms ease;
}

.modal-close:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ============================================================
   Visual refresh — shared polish layer
   Everything below builds on the tokens in :root so the app and
   landing page stay in lockstep.
   ============================================================ */
::selection { background: rgba(13, 145, 88, 0.2); }

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

input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Masthead */
.masthead { background: rgba(255, 255, 255, 0.82); backdrop-filter: saturate(180%) blur(14px); }
.masthead-row { padding: 12px 0; }
.brand-name { font-size: 18px; font-weight: 750; letter-spacing: -0.02em; }
.brand-name .brand-dot { color: var(--accent); }
.nav { gap: 6px; }
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  transition: color 160ms ease, background 160ms ease;
}
.nav-link:hover { background: var(--paper-warm); }
.nav-link.is-active { color: var(--accent-deep); background: var(--accent-soft); }
.nav-link.is-active::after { display: none; }
.nav-link.btn-primary { padding: 9px 20px; margin-left: 6px; color: #fff; }
.nav-link.btn-primary:hover { background: var(--accent-deep); }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
  padding: 4px 6px 4px 4px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  background: #fff;
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.user-name { font-size: 13px; font-weight: 600; color: var(--ink); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip form { display: inline; margin: 0; }
.user-chip .btn-link { padding: 4px 10px; font-size: 12px; }

/* Buttons — soft glow, firmer press */
.btn-primary { box-shadow: 0 1px 2px rgba(8, 112, 67, 0.3), 0 6px 14px -6px rgba(13, 145, 88, 0.55); }
.btn-primary:hover { box-shadow: 0 1px 2px rgba(8, 112, 67, 0.3), 0 10px 20px -8px rgba(13, 145, 88, 0.6); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost:hover { border-color: var(--accent); }

/* In-app page headers (search page): tighter than the marketing hero */
.hero:not(.landing-hero) { padding: 64px 0 28px; }
.hero:not(.landing-hero) .hero-title { font-size: clamp(30px, 4.2vw, 46px); margin-bottom: 14px; }
.hero:not(.landing-hero) .hero-lede { font-size: 16px; max-width: 640px; }
.search-section { padding: 20px 0 12px; }
.search-form { box-shadow: var(--shadow-hover); }
.form-controls { padding-top: 22px; border-top: 1px solid var(--rule-soft); }
.form-controls .checkbox + .checkbox { margin-left: 8px; }
.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23838da8' stroke-width='2'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Job cards */
.job-card { border-color: var(--rule); }
.job-card:hover { border-color: #cfe9dc; }
.job-head { display: flex; align-items: flex-start; gap: 16px; }
.job-head-text { min-width: 0; }
.company-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--av-fg, var(--accent-deep));
  background: var(--av-bg, var(--accent-soft));
  border: 1px solid rgba(16, 21, 43, 0.05);
}
.job-card .job-title { transition: color 160ms ease; }
.job-card .job-title:hover { color: var(--accent-deep); }
.job-company { margin: 0; font-size: 14px; }
.job-company strong { font-weight: 600; }
.job-tags { margin-top: 14px; }
.tag { padding: 4px 10px; font-size: 12px; }
.job-reason { line-height: 1.5; }
.job-reason--gap { color: var(--ink-soft); }
.job-reason--gap strong { color: var(--ink); font-weight: 600; }

/* Status bar */
.status-bar { background: var(--accent-soft); border: 1px solid #cfe9dc; color: var(--accent-deep); font-weight: 500; }
.status-bar.is-warning { background: var(--status-stale-bg); border-color: #f3c6d0; color: var(--status-stale); }

/* Tracker */
.summary { gap: 14px; }
.summary-card { padding: 20px 18px; }
.summary-card.is-active { background: var(--accent-soft); border-color: var(--accent); }
.summary-label { letter-spacing: 0.06em; font-weight: 600; }
.app-row { padding: 22px 26px; }
.app-meta { font-family: var(--font-body); letter-spacing: 0; }
.status-pill { padding: 4px 11px; font-size: 12px; }
.active-filter { font-family: var(--font-body); font-weight: 600; letter-spacing: 0.04em; }

/* Modals + pagination + footer */
.modal, .jd-panel { border: 1px solid var(--rule); }
.pagination-info { font-family: var(--font-body); font-weight: 500; }
.footer { padding: 28px 0; background: var(--paper-warm); }
.footer-meta { font-family: var(--font-body); letter-spacing: 0; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink-soft); }
.footer-brand .brand-mark { width: 20px; height: 20px; font-size: 11px; border-radius: 6px; box-shadow: none; }

@media (max-width: 960px) {
  .user-name { display: none; }
}
@media (max-width: 880px) {
  .job-head { gap: 12px; }
  .company-avatar { width: 40px; height: 40px; border-radius: 12px; font-size: 16px; }
}


[hidden] { display: none !important; }

/* ============================================================
   App v2 — shared with the landing page: cream canvas, forest ink,
   emerald + amber accents, Bricolage headings.
   ============================================================ */
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; }
.hero-title, .modal-title { color: var(--forest); }
.hero-title em { background: linear-gradient(180deg, transparent 62%, var(--amber) 62%, var(--amber) 92%, transparent 92%); -webkit-background-clip: border-box; background-clip: border-box; color: inherit; padding: 0 3px; }
.job-title, .app-title { color: var(--forest); }
.summary-num { color: var(--forest); }

/* Top nav */
.app-nav { position: sticky; top: 0; z-index: 50; background: rgba(250, 248, 243, 0.86); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid rgba(229, 224, 211, 0.8); }
.app-nav-row { display: flex; align-items: center; gap: 24px; height: 66px; }
.app-logo { display: inline-flex; align-items: center; gap: 10px; font: 800 20px var(--font-display); letter-spacing: -0.02em; color: var(--ink); border-bottom: none; }
.app-logo:hover { color: var(--ink); }
.app-logo-mark { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
/* LowKeyHired logo: the brand symbol plus the wordmark as text (brand.css .lk-word) */
.app-logo { gap: 4px; }
.app-logo .lk-word { font-size: 21px; color: var(--lk-text); }
.app-logo-symbol { width: 40px; height: 40px; margin: 0 -2px 0 -10px; }
.footer-mark { width: 26px; height: 26px; }
.footer-brand .lk-word { font-size: 15px; }
.auth-modal-mark { display: block; width: 72px; height: 72px; margin: -8px auto 4px; }
.auth-hint { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink-mute); }

/* Profile: sign-in and security */
.sec-h3 { margin: 22px 0 10px; font-size: 15px; font-weight: 700; }
.sec-h3:first-of-type { margin-top: 8px; }
.sec-form { display: grid; gap: 8px; max-width: 420px; margin-top: 4px; }
.sec-form label { font-size: 13px; font-weight: 600; }
.sec-form input { padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; font-size: 15px; }
.sec-sessions { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.sec-sessions li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 10px 14px; border: 1px solid var(--rule-soft); border-radius: 12px; }
.mfa-setup img { width: 220px; height: 220px; border: 1px solid var(--rule-soft); border-radius: 12px; background: #fff; }
.mfa-setup code, .mfa-codes li { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.mfa-codes { margin-top: 14px; padding: 16px 20px; border: 1px solid var(--rule); border-radius: 14px; max-width: 520px; }
.mfa-codes ol { columns: 2; margin: 10px 0; padding-left: 22px; }
.sec-sessions li.is-warning { border-color: #f0c4cc; background: #fff6f7; }
.sec-msg { margin: 8px 0 0; font-weight: 600; color: #1f6b45; }
.sec-msg.is-error { color: #8a1f33; }

/* Profile: your data */
.footer-privacy { font-size: 13px; color: var(--ink-soft); }
.data-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.data-delete { margin-top: 16px; padding: 18px 20px; border: 1px solid #f0c4cc; border-radius: 14px; background: #fff6f7; display: grid; gap: 8px; max-width: 520px; }
.data-delete p { margin: 0; }
.data-delete label { font-size: 13px; font-weight: 600; }
.data-delete input { padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; font-size: 15px; }
.btn-primary.danger-fill { background: #b3304a; border-color: #b3304a; }
.data-error { margin: 0; color: #8a1f33; font-weight: 600; }
.auth-legal { margin: 4px 0 0; font-size: 12.5px; color: var(--lk-muted, #6b6358); text-align: center; }
.auth-legal a { color: inherit; text-decoration: underline; }

/* Invite admin (/admin/invites) */
.app-links { display: flex; gap: 4px; margin-right: auto; margin-left: 12px; }
.app-links a { font-size: 14.5px; font-weight: 500; color: var(--ink-soft); padding: 8px 14px; border-radius: 10px; border-bottom: none; transition: background 160ms ease, color 160ms ease; }
.app-links a:hover { background: var(--rule-soft); color: var(--ink); }
.app-links a.is-active { background: var(--forest); color: #fff; }
.app-nav-actions { margin-left: auto; }
.app-links + .app-nav-actions { margin-left: 0; }

/* Buttons: soften the pill to the landing's rounded-rect */
.btn-primary { border-radius: 12px; }
.btn-ghost, .btn-analyze { border-radius: 12px; }
.btn-primary:hover { color: #fff; }

/* Company logos (see static/js/logos.js) */
.company-avatar { position: relative; overflow: hidden; background: var(--av-bg, var(--accent-soft)); }
.company-avatar .company-initial { position: relative; z-index: 0; }
.company-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 9px; background: #fff; z-index: 1; }

/* Tag inputs (onboarding + profile) */
.tag-input { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fff; min-height: 50px; transition: border-color 160ms ease, box-shadow 160ms ease; }
.tag-input:focus-within { border-color: var(--accent); box-shadow: var(--focus-ring); }
.tag-input-tags { display: contents; }
.tag-input input { flex: 1; min-width: 180px; border: none; outline: none; background: transparent; padding: 6px 4px; font-size: 15px; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; background: var(--forest); color: #fff; border-radius: 999px; font-size: 13.5px; font-weight: 600; }
.tag-chip button { background: rgba(255, 255, 255, 0.18); border: 0; color: #fff; width: 18px; height: 18px; border-radius: 50%; line-height: 1; font-size: 13px; padding: 0; display: grid; place-items: center; }
.tag-chip button:hover { background: rgba(255, 255, 255, 0.35); }

/* ── Home ─────────────────────────────────────────────── */
.home-hero { padding: 44px 0 8px; }
.home-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.home-kicker { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-deep); }
.home-title { margin: 0; font: 800 clamp(26px, 3.2vw, 38px)/1.1 var(--font-display); letter-spacing: -0.03em; color: var(--forest); max-width: 560px; }
.home-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 6px 6px 6px 14px; min-width: min(100%, 380px); box-shadow: var(--shadow-card); }
.home-search svg { width: 18px; height: 18px; fill: none; stroke: #8a968f; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.home-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; padding: 10px 0; min-width: 0; }
.home-search .btn-primary { padding: 10px 18px; font-size: 14px; }
.home-main { padding: 28px 0 80px; }
.home-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 28px; align-items: start; }
.home-side { position: sticky; top: 90px; display: grid; gap: 14px; }
.side-card { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow-card); }
.side-card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.side-card h2 { margin: 0; font: 700 16px var(--font-display); color: var(--forest); }
.side-edit { font-size: 13px; font-weight: 600; color: var(--accent-deep); border-bottom: none; }
.side-edit:hover { text-decoration: underline; }
.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.side-list li { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.side-list span { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); }
.side-list strong { font-weight: 600; color: var(--ink); line-height: 1.35; }
.side-note { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.side-card-tip { background: var(--amber-soft); border-color: #f4dd9c; box-shadow: none; }
.side-card-tip strong { font-size: 13px; color: #6b4a00; }
.side-card-tip p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: #6b5420; }

.feed-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.feed-roles { display: flex; gap: 8px; flex-wrap: wrap; }
.role-pill { border: 1px solid var(--rule); background: #fff; color: var(--ink-soft); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transition: all 160ms ease; }
.role-pill i { font-style: normal; font-size: 11.5px; background: var(--cream); border-radius: 99px; padding: 1px 8px; color: var(--ink-mute); }
.role-pill:hover { border-color: var(--accent); color: var(--ink); }
.role-pill.is-active { background: var(--forest); border-color: var(--forest); color: #fff; }
.role-pill.is-active i { background: rgba(255, 255, 255, 0.18); color: #fff; }
.feed-actions { display: flex; align-items: center; gap: 12px; }
.feed-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft); cursor: pointer; }
.feed-toggle input { accent-color: var(--accent); width: 16px; height: 16px; }
.feed-refresh { padding: 8px 14px; font-size: 13.5px; }
.feed-meta { margin: 8px 2px 14px; font-size: 13px; color: var(--ink-mute); }
.home-feed .status-bar { margin-top: 12px; }

/* ── Onboarding ───────────────────────────────────────── */
.ob-bar { background: rgba(250, 248, 243, 0.9); border-bottom: 1px solid var(--rule); }
.ob-bar-row { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.ob-steps { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; font-size: 14px; font-weight: 600; color: var(--ink-mute); }
.ob-steps li { display: inline-flex; align-items: center; gap: 8px; }
.ob-steps li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--rule); color: var(--ink-soft); }
.ob-steps li.is-current { color: var(--forest); }
.ob-steps li.is-current span { background: var(--forest); color: #fff; }
.ob-steps li.is-done span { background: var(--accent); color: #fff; }
.ob-skip { font-size: 14px; font-weight: 600; color: var(--ink-soft); border-bottom: none; }
.ob-main { padding: 40px 20px 80px; }
.ob-card { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--rule); border-radius: 28px; padding: 44px 48px; box-shadow: var(--shadow-hover); }
.ob-step[hidden] { display: none; }
.ob-kicker { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-deep); }
.ob-title { margin: 0; font: 800 clamp(28px, 3.6vw, 40px)/1.08 var(--font-display); letter-spacing: -0.03em; color: var(--forest); }
.ob-sub { margin: 12px 0 30px; font-size: 16px; line-height: 1.55; color: var(--ink-soft); max-width: 560px; }
.ob-field { margin-bottom: 24px; }
.ob-label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 700; color: var(--ink); }
.ob-label span { font-weight: 500; color: var(--ink-mute); margin-left: 6px; font-size: 12.5px; }
.ob-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ob-suggest-chip { border: 1px dashed #cfd6c9; background: transparent; color: var(--ink-soft); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 500; transition: all 140ms ease; }
.ob-suggest-chip:hover { border-style: solid; border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }
.ob-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ob-chip { border: 1px solid var(--rule); background: #fff; color: var(--ink-soft); border-radius: 12px; padding: 11px 18px; font-size: 14.5px; font-weight: 600; transition: all 150ms ease; }
.ob-chip:hover { border-color: var(--accent); color: var(--ink); }
.ob-chip.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); box-shadow: 0 0 0 3px rgba(13, 145, 88, 0.12); }
.ob-two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ob-switch { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 16px; background: var(--cream); cursor: pointer; margin-top: 4px; position: relative; }
.ob-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ob-switch-track { width: 46px; height: 26px; border-radius: 99px; background: #d5d9cf; position: relative; flex-shrink: 0; transition: background 160ms ease; }
.ob-switch-track i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 160ms ease; }
.ob-switch input:checked + .ob-switch-track { background: var(--accent); }
.ob-switch input:checked + .ob-switch-track i { transform: translateX(20px); }
.ob-switch input:focus-visible + .ob-switch-track { box-shadow: var(--focus-ring); }
.ob-switch-copy { display: flex; flex-direction: column; gap: 2px; }
.ob-switch-copy strong { font-size: 15px; }
.ob-switch-copy small { font-size: 13px; color: var(--ink-soft); }
.ob-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px; }
.ob-actions-right { display: flex; align-items: center; gap: 18px; }
.ob-next { padding: 14px 26px; font-size: 15px; }
.ob-error { margin: 18px 0 0; padding: 12px 16px; background: var(--status-rejected-bg); color: var(--status-rejected); border-radius: 12px; font-size: 14px; font-weight: 500; }
.ob-error[hidden] { display: none; }
.ob-note { margin: 16px 0 0; font-size: 14px; color: var(--accent-deep); font-weight: 500; }
.ob-link { background: none; border: 0; padding: 0; color: var(--ink-soft); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ob-link:hover { color: var(--accent-deep); }
.ob-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 44px 24px; border: 2px dashed #cdd5c6; border-radius: 20px; background: var(--cream); cursor: pointer; transition: all 160ms ease; margin-bottom: 14px; }
.ob-drop:hover, .ob-drop.is-drag { border-color: var(--accent); background: var(--accent-soft); }
.ob-drop.is-filled { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.ob-drop-icon { font-size: 34px; margin-bottom: 4px; }
.ob-drop strong { font-size: 16px; color: var(--forest); }
.ob-drop small { font-size: 13px; color: var(--ink-mute); }
#pasteField textarea { width: 100%; margin-top: 12px; padding: 14px; border: 1px solid var(--rule); border-radius: var(--radius-sm); font-size: 14px; line-height: 1.5; resize: vertical; background: #fff; }
#pasteField textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.ob-working { text-align: center; padding: 20px 0; }
.ob-spinner { width: 54px; height: 54px; margin: 0 auto 22px; border: 4px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
.ob-progress { list-style: none; margin: 28px auto 0; padding: 0; display: inline-grid; gap: 12px; text-align: left; font-size: 15px; color: var(--ink-mute); }
.ob-progress li::before { content: "○"; display: inline-block; width: 24px; }
.ob-progress li.is-active { color: var(--ink); font-weight: 600; }
.ob-progress li.is-active::before { content: "◔"; color: var(--accent); }
.ob-progress li.is-done { color: var(--accent-deep); }
.ob-progress li.is-done::before { content: "✓"; font-weight: 800; }
.ob-progress li.is-skip { color: var(--ink-mute); text-decoration: line-through; }
.ob-progress li.is-skip::before { content: "–"; }

@media (max-width: 960px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-side { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); order: 2; }
  /* The links drop to their own row under the logo instead of disappearing. */
  .app-nav-row { flex-wrap: wrap; height: auto; padding-top: 10px; row-gap: 6px; }
  .app-links { order: 3; flex: 1 0 100%; margin: 0 -6px; padding: 0 0 8px; overflow-x: auto; scrollbar-width: none; }
  .app-links::-webkit-scrollbar { display: none; }
  .app-links a { flex-shrink: 0; }
  .app-links + .app-nav-actions { margin-left: auto; }
  .user-name { display: none; }
}
@media (max-width: 480px) {
  .app-links { justify-content: space-between; gap: 0; }
  .app-links a { padding: 7px 10px; font-size: 14px; }
}
@media (max-width: 640px) {
  .ob-card { padding: 28px 20px; border-radius: 22px; }
  .ob-two { grid-template-columns: 1fr; }
  .ob-steps li:not(.is-current) { display: none; }
  .ob-steps { display: none; }  /* the card itself says "Step 1 of 2" */
  .ob-skip { white-space: nowrap; }
  .ob-actions { flex-direction: column-reverse; align-items: stretch; }
  .ob-actions-right { flex-direction: column-reverse; align-items: stretch; text-align: center; }
  .home-search { width: 100%; }
}


/* ── Resume builder: skills advisor ───────────────────── */
.sk-advisor { margin-top: 28px; padding: 24px; background: var(--cream); border: 1px solid var(--rule); border-radius: 20px; }
.sk-advisor-head .rb-h3 { margin: 0 0 6px; color: var(--forest); }
.sk-advisor-head .rb-lede { margin: 0 0 16px; max-width: 640px; }
.sk-advisor-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.sk-advisor-form .form-field { flex: 1; min-width: 240px; }
.sk-advisor-form .btn-primary { height: 48px; }
#skJD { width: 100%; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius-sm); font-size: 14px; line-height: 1.5; background: #fff; resize: vertical; }
#skJD:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
#skResults { margin-top: 22px; }

.sk-role { background: #fff; border: 1px solid var(--rule); border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; }
.sk-role h4 { margin: 0 0 6px; font: 700 15px var(--font-display); color: var(--forest); }
.sk-role > p { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.sk-day { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sk-day li { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 3px solid var(--accent-soft); font-size: 13.5px; color: var(--ink); }
.sk-day li span { font-size: 12.5px; color: var(--ink-mute); }

.sk-bulk { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; color: var(--ink-mute); }
.sk-bulk .btn-ghost { padding: 8px 14px; font-size: 13px; }
.sk-group { margin-top: 14px; }
.sk-group h4 { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); }
.sk-rec { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "top add" "why add"; gap: 4px 14px; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 8px; background: #fff; border: 1px solid var(--rule); border-radius: 14px; transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease; }
.sk-rec:hover { border-color: var(--accent); box-shadow: 0 6px 16px -10px rgba(11, 61, 46, 0.35); }
.sk-rec.is-added { background: #f1faf5; border-color: #b7e2c9; }
.sk-rec-top { grid-area: top; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.sk-rec-top b { font-size: 14.5px; color: var(--forest); margin-right: 4px; }
.sk-rec-why { grid-area: why; font-size: 13px; line-height: 1.45; color: var(--ink-soft); }
.sk-rec-add { grid-area: add; align-self: center; font-size: 13px; font-weight: 700; color: var(--accent-deep); white-space: nowrap; }
.sk-badge { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.sk-pri-must { background: var(--forest); color: #fff; }
.sk-pri-strong { background: var(--accent-soft); color: var(--accent-deep); }
.sk-pri-nice { background: #efeadd; color: #6b6554; }
.sk-fit-have { background: #d9f3e5; color: #0a7a4d; }
.sk-fit-adjacent { background: var(--amber-soft); color: #8a5d00; }
.sk-fit-new { background: #ecece8; color: #6b6b63; }
.sk-note { margin: 16px 0 0; font-size: 13px; color: var(--ink-mute); line-height: 1.5; }
@media (max-width: 640px) {
  .sk-advisor { padding: 18px 16px; }
  .sk-rec { grid-template-columns: 1fr; grid-template-areas: "top" "why" "add"; }
  .sk-rec-add { justify-self: start; }
}

.job-reason--fit { color: var(--ink-soft); }
.job-reason--fit strong { color: var(--accent-deep); font-weight: 600; }


/* ── Home: fit tiers ──────────────────────────────────── */
.fit-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; margin: 14px 0 4px; }
.fit-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; background: #fff; border: 1px solid var(--rule); border-radius: 14px; text-align: left; transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease; }
.fit-tab strong { font: 700 15px var(--font-display); color: var(--forest); }
.fit-tab span { font-size: 12.5px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.fit-tab::before { content: ""; width: 22px; height: 4px; border-radius: 4px; background: var(--fit-c, var(--forest)); margin-bottom: 6px; }
.fit-tab:hover { border-color: var(--fit-c, var(--accent)); }
.fit-tab.is-active { border-color: var(--fit-c, var(--forest)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fit-c, var(--forest)) 16%, transparent); }
.fit-tab-perfect { --fit-c: #6a49e0; }
.fit-tab-strong { --fit-c: #0d9158; }
.fit-tab-good { --fit-c: #2f63e0; }
.fit-tab-unscored { --fit-c: var(--ink-soft); }

.fit-heading { display: flex; align-items: baseline; gap: 10px; margin: 14px 2px 2px; padding-top: 6px; }
.fit-heading:first-child { margin-top: 0; }
.fit-heading strong { font: 800 18px var(--font-display); letter-spacing: -0.01em; color: var(--fit-c, var(--forest)); }
.fit-heading span { font-size: 13px; color: var(--ink-mute); }
.fit-heading-perfect { --fit-c: #6a49e0; }
.fit-heading-strong { --fit-c: #087043; }
.fit-heading-good { --fit-c: #2f63e0; }

.scan-progress { display: flex; align-items: center; gap: 12px; margin: 12px 2px 0; font-size: 13px; color: var(--ink-soft); }
.scan-progress i { flex: 0 0 160px; height: 6px; background: var(--rule); border-radius: 99px; overflow: hidden; }
.scan-progress u { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width 400ms ease; }

@media (max-width: 760px) {
  .fit-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scan-progress { flex-direction: column; align-items: flex-start; }
  .scan-progress i { flex-basis: auto; width: 100%; }
}

/* Show the initial until the logo has actually loaded (lazy images are blank until then). */
.company-avatar img { opacity: 0; transition: opacity 200ms ease; }
.company-avatar img.is-loaded { opacity: 1; }

/* Sponsorship evidence on job cards */
.tag-history { background: #eef2fb; color: #3b4f86; }
.job-filings { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.job-filings span { color: var(--ink-mute); }


/* ── Home sidebar: inline preferences & resume editor ─── */
.side-edit { background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.pe-card { transition: box-shadow 200ms ease, border-color 200ms ease; }
.pe-card.is-editing { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 145, 88, 0.12), var(--shadow-hover); }
.home-side:has(.pe-card.is-editing) { position: static; }  /* a tall editor must scroll with the page */
.pe-role-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.pe-role-list i { font-style: normal; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); }

.pe-editor { display: grid; gap: 16px; margin-top: 4px; animation: peOpen 220ms ease; }
@keyframes peOpen { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pe-field { display: grid; gap: 7px; }
.pe-label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.pe-label em { font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-mute); margin-left: 4px; }
.pe-tags { min-height: 0; padding: 6px 8px; }
.pe-tags input { min-width: 120px; font-size: 14px; padding: 4px 2px; }
.pe-tags .tag-chip { font-size: 12.5px; padding: 4px 6px 4px 10px; }
.pe-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.pe-suggest .ob-suggest-chip { font-size: 12px; padding: 3px 9px; }
.pe-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pe-chip { border: 1px solid var(--rule); background: #fff; color: var(--ink-soft); border-radius: 10px; padding: 7px 11px; font-size: 13px; font-weight: 600; transition: all 140ms ease; }
.pe-chip:hover { border-color: var(--accent); color: var(--ink); }
.pe-chip.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }
.pe-switch { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--cream); cursor: pointer; font-size: 13.5px; font-weight: 600; position: relative; }
.pe-switch input { position: absolute; opacity: 0; pointer-events: none; }
.pe-switch input:checked + .ob-switch-track { background: var(--accent); }
.pe-switch input:checked + .ob-switch-track i { transform: translateX(20px); }
.pe-switch input:focus-visible + .ob-switch-track { box-shadow: var(--focus-ring); }
.pe-error { margin: 0; padding: 9px 12px; background: var(--status-rejected-bg); color: var(--status-rejected); border-radius: 10px; font-size: 13px; }
.pe-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 10px 0 2px; background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 30%); }
.pe-actions .btn-primary { padding: 10px 14px; font-size: 13.5px; }
.pe-drop { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 18px 12px; border: 2px dashed #cdd5c6; border-radius: 14px; background: var(--cream); cursor: pointer; transition: all 150ms ease; }
.pe-drop:hover, .pe-drop.is-drag { border-color: var(--accent); background: var(--accent-soft); }
.pe-drop.is-filled { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.pe-drop strong { font-size: 13.5px; color: var(--forest); word-break: break-word; }
.pe-drop small { font-size: 12px; color: var(--ink-mute); }
.pe-paste-toggle { justify-self: start; font-size: 13px; }
#peResumeText { width: 100%; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius-sm); font-size: 13px; line-height: 1.5; resize: vertical; }
#peResumeText:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.side-list .pe-role-list { text-transform: none; letter-spacing: 0; font-size: inherit; color: inherit; }
.side-list .pe-role-list i { text-transform: none; letter-spacing: 0; }
.pe-actions .btn-primary { white-space: nowrap; }


/* ── Companies tab ─────────────────────────────────────── */
.co-hero { padding-bottom: 4px; }
.co-lede { margin: 12px 0 0; max-width: 640px; font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
.co-form { margin-top: 24px; max-width: 820px; }
.co-mode { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 10px; background: var(--rule-soft); border-radius: 12px; }
.co-mode-btn { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.co-mode-btn.is-on { background: #fff; color: var(--forest); box-shadow: 0 1px 3px rgba(16, 21, 43, 0.12); }
.co-input { display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 16px; background: #fff; border: 1px solid var(--rule); border-radius: 16px; box-shadow: var(--shadow-hover); transition: border-color 160ms ease, box-shadow 160ms ease; }
.co-input:focus-within { border-color: var(--accent); box-shadow: var(--focus-ring), var(--shadow-hover); }
.co-input svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: #8a968f; stroke-width: 2; stroke-linecap: round; }
.co-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15.5px; padding: 11px 0; }
.co-input .btn-primary { padding: 12px 24px; }
.co-hint { margin: 10px 2px 0; font-size: 13px; color: var(--ink-mute); }
.co-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; font-size: 13px; color: var(--ink-mute); }
.co-popular > span { margin-right: 4px; font-weight: 600; }
.co-pick { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; background: #fff; border: 1px solid var(--rule); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink); transition: border-color 150ms ease, transform 150ms ease; }
.co-pick:hover { border-color: var(--accent); transform: translateY(-1px); }
.co-pick-logo { width: 22px; height: 22px; border-radius: 6px; background: var(--rule-soft); overflow: hidden; display: grid; place-items: center; }
.co-pick-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; background: #fff; }

.co-main { padding-top: 24px; }
.co-result { margin-bottom: 8px; }
.co-head { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: #fff; border: 1px solid var(--rule); border-radius: 18px; box-shadow: var(--shadow-card); }
.co-head-logo .company-avatar { width: 56px; height: 56px; border-radius: 16px; font-size: 22px; }
.co-head-glyph { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--rule-soft); font-size: 26px; }
.co-head-text h2 { margin: 0; font: 800 24px var(--font-display); letter-spacing: -0.02em; color: var(--forest); }
.co-head-text p { margin: 3px 0 0; font-size: 14px; color: var(--ink-soft); }
.co-head-text .co-filings { font-size: 13px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.co-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.fit-tab-stretch { --fit-c: #b5820a; }
.fit-heading-stretch { --fit-c: #8a6208; }
.fit-heading-unscored { --fit-c: var(--ink-soft); }
.co-wait { display: grid; place-items: center; padding: 48px 0; }

/* Home: in-feed search */
.feed-search-empty { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }

@media (max-width: 760px) {
  .co-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-input { flex-wrap: wrap; padding: 8px; }
  .co-input .btn-primary { width: 100%; }
  .co-mode { display: flex; }
  .co-mode-btn { flex: 1; }
}


/* ============================================================
   Home: split (list + detail) layout
   ============================================================ */
.pv-home { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pv-prefs-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.pv-prefs-row .side-card { padding: 16px 20px; }
.pv-prefs-row #prefSummary { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.pv-prefs-row #prefSummary li { flex: 0 1 auto; }
.pv-home .feed-toolbar { margin-bottom: 0; }

.pv-workspace { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); background: #fff; border: 1px solid var(--rule);
  border-radius: 22px; box-shadow: var(--shadow-hover); overflow: hidden; height: calc(100vh - 150px); min-height: 560px; }
.pv-list-pane { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-right: 1px solid var(--rule); min-height: 0; overflow-y: auto; }
.pv-detail-pane { padding: 24px 26px; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }

.pv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-chip { border: 0; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--cream-2, #f3efe5); color: #6d6a5a; transition: background 150ms ease, color 150ms ease; }
.pv-chip.is-on { background: var(--forest); color: #fff; }
.pv-tiers { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-tier { border: 1px solid var(--rule); background: #fff; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.pv-tier i { font-style: normal; color: var(--ink-mute); margin-left: 2px; }
.pv-tier.is-on { border-color: var(--forest); color: var(--forest); background: var(--accent-soft); }
.pv-tier-perfect.is-on { border-color: #6a49e0; color: #6a49e0; background: #f1ecff; }
.pv-meta { margin: 0 2px; font-size: 12.5px; color: var(--ink-mute); }

.pv-list { display: grid; gap: 10px; }
.pv-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: start; width: 100%; padding: 14px; text-align: left;
  background: #fff; border: 1px solid var(--rule); border-radius: 14px; transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease; }
.pv-row:hover { border-color: #b7d3c2; }
.pv-row.is-sel { border-color: var(--accent); background: #f4fbf7; box-shadow: 0 0 0 3px rgba(13, 145, 88, 0.12); }
.pv-row .company-avatar { width: 40px; height: 40px; border-radius: 11px; font-size: 15px; }
.pv-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-row-text strong { font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pv-row-text small { font-size: 12px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-tag { align-self: flex-start; margin-top: 6px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.pv-tag-g { background: #d9f3e5; color: #0a7a4d; }
.pv-tag-y { background: var(--amber-soft); color: #8a5d00; }
.pv-tag-n { background: #ecece8; color: #6b6b63; }
.pv-tag-r { background: #fde4e4; color: #b3304a; }
.pv-score { font: 800 15px var(--font-display); font-style: normal; color: var(--accent-deep); }
.pv-score-perfect { color: #6a49e0; }
.pv-score-good { color: #2f63e0; }
.pv-score-stretch { color: #8a6208; }
.pv-more { justify-self: center; padding: 8px 16px; font-size: 13px; }
.pv-none { margin: 24px 4px; color: var(--ink-mute); font-size: 14px; }

.pv-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.pv-detail-head h2 { margin: 0; font: 700 21px/1.2 var(--font-display); letter-spacing: -0.015em; color: var(--forest); }
.pv-detail-head p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-mute); }
.pv-ring { --p: 80; position: relative; flex-shrink: 0; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ring-color, var(--accent)) calc(var(--p) * 3.6deg), #e6e2d4 0); }
.pv-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.pv-ring span { position: relative; display: flex; align-items: flex-start; font: 800 18px var(--font-display); }
.pv-ring sup { font-size: 9px; margin-top: 3px; }
.tier-stretch { --ring-color: #b5820a; }
.pv-bars { display: grid; gap: 10px; }
.pv-bar { display: grid; grid-template-columns: 84px minmax(0, 1fr) 38px; align-items: center; gap: 12px; }
.pv-bar span { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.pv-bar i { height: 8px; background: #ebe7da; border-radius: 99px; overflow: hidden; }
.pv-bar u { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; }
.pv-bar b { font-size: 12px; color: var(--ink-mute); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.pv-detail-pane h4 { margin: 2px 0 -6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.pv-fit { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-fit span { font-size: 12.5px; font-weight: 500; padding: 6px 11px; border-radius: 999px; line-height: 1.35; }
.pv-fit-y { background: #e1f4e9; color: #0a7a4d; }
.pv-fit-n { background: #fde4e4; color: #b3304a; }
.pv-evidence { display: grid; gap: 8px; }
.pv-ev { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; background: var(--cream); border: 1px solid var(--rule); }
.pv-ev > span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.pv-ev div { display: flex; flex-direction: column; gap: 1px; }
.pv-ev strong { font-size: 13.5px; font-weight: 600; }
.pv-ev small { font-size: 12px; color: var(--ink-mute); }
.pv-ev-ok > span { background: #d9f3e5; color: #0a7a4d; }
.pv-ev-no > span { background: #fde4e4; color: #b3304a; }
.pv-ev-no { opacity: 0.85; }
.pv-ev-neutral > span { background: #ecece8; color: #6b6b63; }
.pv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 4px; }
.pv-actions .btn-primary, .pv-actions .btn-ghost { padding: 10px 16px; font-size: 13.5px; border-bottom: none; }
.pv-apply { color: #fff; }
.pv-applied { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--amber-soft); font-size: 13.5px; font-weight: 600; color: #6b4a00; }
.pv-applied .btn-primary { padding: 7px 12px; font-size: 13px; }
.pv-desc { border-top: 1px solid var(--rule); padding-top: 12px; }
.pv-desc summary { cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--forest); }
.pv-desc p { white-space: pre-line; font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
.pv-detail-empty { display: grid; gap: 10px; justify-items: start; margin-top: 30px; }
.pv-detail-empty p { margin: 0; color: var(--ink-soft); }

.pv-sheet { position: fixed; inset: 0; z-index: 90; background: #fff; display: flex; flex-direction: column; }
.pv-sheet-bar { padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.pv-sheet-body { padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.pv-sheet-body h4 { margin: 2px 0 -6px; font-size: 13px; }

@media (max-width: 900px) {
  .pv-prefs-row { grid-template-columns: minmax(0, 1fr); }
  .pv-workspace { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .pv-list-pane { border-right: 0; overflow: visible; }
  .pv-detail-pane { display: none; }
}

/* ── Tracker: stage panel + follow-up nudges ── */
.tk-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; align-items: start; }
.tk-stages { position: sticky; top: 90px; display: grid; gap: 10px; padding: 18px; background: var(--cream); border: 1px solid var(--rule); border-radius: 22px; }
.tk-stages h3 { margin: 0 0 4px; font: 700 15px var(--font-display); color: var(--forest); }
.tk-stage { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 12px 14px; background: #fff;
  border: 1px solid var(--rule); border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; transition: border-color 140ms ease, background 140ms ease; }
.tk-stage i { font-style: normal; font-size: 12px; font-weight: 700; background: var(--cream-2, #f3efe5); padding: 2px 9px; border-radius: 99px; color: var(--ink-soft); }
.tk-stage:hover { border-color: #b7d3c2; }
.tk-stage.is-active { background: #e1f4e9; border-color: #b7e2c9; }
.tk-stage-offer i { background: #d9f3e5; color: #0a7a4d; }
.tk-nudges { display: grid; gap: 8px; margin-top: 4px; }
.tk-nudge { justify-self: start; border: 0; text-align: left; font-size: 12.5px; font-weight: 600; color: #8a5d00; background: var(--amber-soft); padding: 6px 11px; border-radius: 99px; }
.tk-nudge:hover { background: #fbe3a5; }
.tk-empty-nudge { font-size: 12.5px; color: var(--ink-mute); margin: 0; }
@media (max-width: 900px) { .tk-layout { grid-template-columns: minmax(0, 1fr); } .tk-stages { position: static; } }

/* Stage buttons reuse .summary-card for the tracker filter logic; drop its card look */
.tk-stage.summary-card { box-shadow: none; cursor: pointer; }
.tk-stage.summary-card:hover { transform: none; box-shadow: none; }
.tk-stage.summary-card.is-active::after { display: none; }
.tk-layout .dashboard-toolbar { margin-top: 0; }

/* Home toolbar controls (role dropdown + refresh), one-line fit chips */
.pv-list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-list-tools { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pv-list-tools select { max-width: 210px; padding: 7px 28px 7px 10px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; font-size: 13px; font-weight: 600; color: var(--ink); }
.pv-icon-btn { width: 34px; height: 34px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; font-size: 16px; color: var(--ink-soft); display: grid; place-items: center; }
.pv-icon-btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.pv-icon-btn.is-spinning { animation: spin 1s linear infinite; }
.pv-icon-btn.is-stop { color: #b3304a; border-color: #e7b9c2; }

/* Saved / Applied (from the tracker), on list rows, the detail panel and cards */
.tag-tracked { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.tag-tracked.tag-saved { background: #eef0ff; color: #3d3fa8; }
.tag-tracked.tag-saved::before { content: "★"; font-size: 10px; }
.tag-tracked.tag-applied { background: #e3f4ea; color: #126b40; }
.tag-tracked.tag-applied::before { content: "✓"; font-size: 10px; }
.pv-tracked { margin-top: 6px; }
.pv-check-more { display: block; width: calc(100% - 16px); margin: 10px 8px 12px; }
.pv-check-more-cards { width: auto; margin: 14px auto 0; }

/* Pages of roles: the scan's, then one per "Search more roles" */
.pv-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 6px auto 2px; }
.pv-page { min-width: 32px; height: 32px; padding: 0 10px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.pv-page:hover:not(:disabled) { border-color: var(--accent); color: var(--ink); }
.pv-page.is-on { background: var(--forest, #1c3d2e); border-color: var(--forest, #1c3d2e); color: #fff; }
.pv-page:disabled { opacity: 0.4; cursor: default; }

/* Country chips sit with the list tools, next to the dropdowns */
.pv-list-tools .pv-country-chips { flex-wrap: nowrap; gap: 6px; margin-right: 2px; }
.pv-list-tools .pv-country-chips .pv-chip { padding: 7px 12px; }

/* Toolbar dropdowns (home.js Dropdown): roles are multi-select, date posted single-select */
.fx-dd { position: relative; min-width: 0; }
.fx-dd-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 210px; padding: 7px 10px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.fx-dd-btn:hover, .fx-dd.is-open .fx-dd-btn { border-color: var(--accent); }
.fx-dd-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fx-dd-btn i { font-style: normal; font-size: 10px; color: var(--ink-mute); }
.fx-dd-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 220px; max-width: 300px; padding: 6px; background: #fff; border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12); }
.fx-dd-menu[hidden] { display: none; }
.fx-dd-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font-size: 13px; color: var(--ink); text-align: left; cursor: pointer; }
.fx-dd-opt:hover { background: var(--accent-soft, #e6f4ec); }
.fx-dd-opt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-dd-opt em { font-style: normal; font-size: 12px; color: var(--ink-mute); }
.fx-dd-opt.is-all { border-bottom: 1px solid var(--rule); border-radius: 8px 8px 0 0; margin-bottom: 4px; }
.fx-dd-mark { flex: none; width: 16px; height: 16px; border: 1.5px solid #b9b3a6; display: grid; place-items: center; }
.fx-dd-mark.is-box { border-radius: 4px; }
.fx-dd-mark.is-dot { border-radius: 50%; }
.fx-dd-opt.is-on .fx-dd-mark { border-color: var(--forest, #1c3d2e); background: var(--forest, #1c3d2e); }
.fx-dd-opt.is-on .fx-dd-mark.is-box::after { content: ""; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.fx-dd-opt.is-on .fx-dd-mark.is-dot { box-shadow: inset 0 0 0 3px #fff; }
.pv-icon-btn.is-stop::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: currentColor; }
.pv-icon-btn.is-stop:hover { background: #fde4e4; border-color: #b3304a; color: #b3304a; }
.pv-fit span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-workspace { height: calc(100vh - 120px); }

/* ── Home: shared toolbar, layout switch, tiered list, compact search bar ── */
.fx-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.fx-view { display: inline-flex; gap: 2px; padding: 3px; margin-left: 4px; background: var(--rule-soft); border-radius: 11px; }
.fx-view-btn { border: 0; background: transparent; padding: 6px 11px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.fx-view-btn.is-on { background: #fff; color: var(--forest); box-shadow: 0 1px 3px rgba(16, 21, 43, 0.12); }
.pv-home .fit-tabs { margin: 0; }
.pv-home .pv-meta { margin: -4px 2px 0; }
.pv-list-heading { margin: 6px 2px -2px; padding-top: 0; }
.pv-list-heading strong { font-size: 15px; }
.pv-list-heading:first-child { margin-top: 0; }
.pv-row-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; }
.pv-row-tags .pv-tag { margin-top: 0; }
.pv-filings { font-size: 11.5px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.fx-tier-label { display: inline-block; margin-bottom: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fit-c, var(--accent-deep)); }
.fx-tier-perfect { --fit-c: #6a49e0; } .fx-tier-strong { --fit-c: #087043; } .fx-tier-good { --fit-c: #2f63e0; }
.pv-prefs-row .side-card-head { margin-bottom: 6px; }
.pv-prefs-row #prefSummary li { flex-direction: row; align-items: baseline; gap: 6px; }
.pv-prefs-row #prefSummary li > strong { white-space: nowrap; }
.pv-prefs-row .pe-role-list { display: inline-flex; flex-wrap: nowrap; gap: 4px; margin-top: 0; }
.pv-prefs-row .pe-role-list i { white-space: nowrap; }
.pe-role-more { background: var(--rule-soft) !important; color: var(--ink-soft) !important; cursor: help; }
/* JD in two sentences (written by the matcher alongside the score) */
.pv-sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.pv-sec > h4, .pv-sec-head h4 { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-mute); }
.pv-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-summary { padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--cream); border-radius: 0 12px 12px 0; display: grid; gap: 8px; }
.pv-summary p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink); }
.pv-summary .pv-req { font-size: 13px; color: var(--ink-soft); }
.pv-summary .pv-req strong, .jd-summary strong { margin-right: 4px; color: var(--forest); }
.pv-core-gap { display: grid; gap: 2px; padding: 9px 12px; border-radius: 10px; background: #fde4e4; color: #8f2338; font-size: 13px; line-height: 1.4; }
.pv-core-gap strong { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.pv-core-gap.is-preferred { background: #fdf3dc; color: #7a5410; }
.pv-tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--rule-soft); }
.pv-tabs button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.pv-tabs button.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.pv-tab-fit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.pv-tab-fit[hidden] { display: none; }
.job-summary { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job-core-gap { margin: 6px 0 0; font-size: 13px; color: #8f2338; }
.jd-summary { padding: 12px 14px; background: var(--cream); border-radius: 12px; margin-bottom: 14px; }
.jd-summary h5, .jd-full-head { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-mute); }
.jd-summary p { margin: 0 0 6px; }

/* Analysis drawn inside the split view's detail pane */
.pv-analysis { scroll-margin-top: 90px; }
.pv-analysis .analysis-header { display: none; }  /* the section heading or tab already says "Analysis" */
.pv-analysis-sec, .pv-tabs { scroll-margin-top: 90px; }
.pv-analysis .swo-grid { grid-template-columns: minmax(0, 1fr); }
.pv-analysis .analysis-scores { justify-content: flex-start; flex-wrap: wrap; }

/* Resume builder, Download step: saved vs tailored resume, both scored by the matcher */
.rb-match { margin: 0 0 18px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 16px; background: var(--cream); }
.rb-match h4 { margin: 0 0 10px; font-size: 14px; color: var(--forest); }
.rb-match .analysis-scores { justify-content: flex-start; flex-wrap: wrap; margin: 0; }
.rb-match .hint { margin: 10px 0 0; }
.rb-match-wait { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 14px; }

/* Feed meta line (and the pager) */
.pv-meta-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.pv-meta-row:not(:has(:not([hidden]))) { display: none; }
.pv-sponsor-note { margin: 0 2px 10px; font-size: 12.5px; color: var(--ink-mute); }
.pv-sponsor-note::before { content: "ⓘ "; }
.pv-check-more { font-size: 13.5px; font-weight: 600; color: var(--accent-deep); }
/* Free analyses left (app/credits.py FREE), under the analysis title */
.analysis-allowance { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-soft); }
/* Free resume tailorings left (app/credits.py FREE), under the resume builder's banners */
.rb-allowance { margin: 0 0 10px; font-size: 13px; color: var(--ink-soft); }

/* Location picker (static/js/location_picker.js) */
.lp-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lp-chips { display: contents; }
.lp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); font-size: 13.5px; font-weight: 600; }
.lp-chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 3px; }
.lp-any { padding: 6px 12px; background: var(--cream); color: var(--ink); border: 1px solid var(--rule); }
.lp-add { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border: 1.5px dashed var(--accent); border-radius: 999px; background: #fff; color: var(--accent-deep); font-size: 19px; font-weight: 700; line-height: 1; cursor: pointer; }
.lp-add:hover, .lp-add[aria-expanded="true"] { background: var(--accent-soft); border-style: solid; }
.lp-search { position: relative; margin-top: 8px; }
.lp-input { width: 100%; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 12px; background: #fff; font: inherit; font-size: 14px; }
.lp-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.lp-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow-hover); max-height: 288px; overflow-y: auto; }
.lp-menu li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 10px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.lp-menu li small { flex-shrink: 0; font-size: 12px; color: var(--ink-mute); }
.lp-menu li.is-active, .lp-menu li[data-i]:hover { background: var(--accent-soft); }
.lp-menu li.lp-empty { color: var(--ink-mute); cursor: default; }
.lp-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lp-quick:empty { display: none; }

/* Resume lives inside the preferences card: a summary row, and a field in the editor. */
.pe-inline-link { border: 0; background: none; padding: 0; margin-left: 6px; font: inherit; font-weight: 600; color: var(--accent-deep); cursor: pointer; }
.pe-inline-link:hover { text-decoration: underline; }
.pe-missing { color: #b3304a; }
.pe-drop-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.pe-drop-row .pe-drop { flex: 1 1 260px; flex-direction: row; justify-content: center; gap: 8px; padding: 12px; }
.pe-drop-row .pe-paste-toggle { align-self: center; }
#peResumeText { width: 100%; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 12px; font: inherit; font-size: 13.5px; resize: vertical; }
@media (min-width: 901px) {
  .pv-prefs-row .pe-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; align-items: start; }
  .pv-prefs-row .pe-editor > .pe-span, .pv-prefs-row .pe-editor > .pe-switch,
  .pv-prefs-row .pe-editor > .pe-error, .pv-prefs-row .pe-editor > .pe-actions { grid-column: 1 / -1; }
}
/* Summary values as removable pills */
.pe-pills { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.side-list .pe-pills { font-size: inherit; font-weight: inherit; letter-spacing: 0; text-transform: none; color: inherit; }
.pe-pill { display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-size: 12.5px; font-weight: 600; padding: 3px 4px 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); white-space: nowrap; }
.pe-pill:not(:has(.pe-x)) { padding-right: 9px; }
.pe-x { border: 0; background: none; color: inherit; opacity: 0.55; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 4px; border-radius: 999px; }
.pe-x:hover, .pe-x:focus-visible { opacity: 1; background: rgba(8, 112, 67, 0.12); }
.pe-more { border: 0; font: inherit; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--rule-soft); color: var(--ink-soft); cursor: pointer; }
.pv-prefs-row #prefSummary li > strong:has(.pe-pills) { white-space: normal; }
.pe-status { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-mute); }
.pe-status.is-error { color: var(--status-rejected); }
@media (max-width: 560px) {
  .fx-toolbar .pv-list-tools { flex: 1 1 100%; }
  .fx-toolbar .pv-list-tools select { flex: 1 1 auto; min-width: 0; max-width: none; }
}
@media (max-width: 640px) {
  .pv-prefs-row #prefSummary li { flex-wrap: wrap; }
  .pv-prefs-row #prefSummary li > strong { white-space: normal; }
  .pv-prefs-row .pe-role-list { flex-wrap: wrap; }
}
.pv-home > #results { margin-top: 2px; }

.tag-none { background: #fde4e4; color: #b3304a; }
.tag-none::before { content: "✕"; }

/* Country buttons: the flag is the background. Unselected, it's washed out; selected, it's full colour under a dark
   veil so the white label stays legible. */
.ob-chips[data-group="countries"] .ob-chip[data-value="us"],.pe-chips[data-group="countries"] .pe-chip[data-value="us"],#pvCountryChips .pv-chip[data-country="us"],.cm-flag[data-flag="us"] { --flag: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 190 100%22 preserveAspectRatio=%22xMidYMid slice%22%3E%3Crect y=%220.000%22 width=%22190%22 height=%227.692%22 fill=%22%23b22234%22/%3E%3Crect y=%227.692%22 width=%22190%22 height=%227.692%22 fill=%22%23fff%22/%3E%3Crect y=%2215.385%22 width=%22190%22 height=%227.692%22 fill=%22%23b22234%22/%3E%3Crect y=%2223.077%22 width=%22190%22 height=%227.692%22 fill=%22%23fff%22/%3E%3Crect y=%2230.769%22 width=%22190%22 height=%227.692%22 fill=%22%23b22234%22/%3E%3Crect y=%2238.462%22 width=%22190%22 height=%227.692%22 fill=%22%23fff%22/%3E%3Crect y=%2246.154%22 width=%22190%22 height=%227.692%22 fill=%22%23b22234%22/%3E%3Crect y=%2253.846%22 width=%22190%22 height=%227.692%22 fill=%22%23fff%22/%3E%3Crect y=%2261.538%22 width=%22190%22 height=%227.692%22 fill=%22%23b22234%22/%3E%3Crect y=%2269.231%22 width=%22190%22 height=%227.692%22 fill=%22%23fff%22/%3E%3Crect y=%2276.923%22 width=%22190%22 height=%227.692%22 fill=%22%23b22234%22/%3E%3Crect y=%2284.615%22 width=%22190%22 height=%227.692%22 fill=%22%23fff%22/%3E%3Crect y=%2292.308%22 width=%22190%22 height=%227.692%22 fill=%22%23b22234%22/%3E%3Crect width=%2276%22 height=%2253.85%22 fill=%22%233c3b6e%22/%3E%3C/svg%3E"); }
.ob-chips[data-group="countries"] .ob-chip[data-value="uk"],.pe-chips[data-group="countries"] .pe-chip[data-value="uk"],#pvCountryChips .pv-chip[data-country="uk"],.cm-flag[data-flag="uk"] { --flag: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 60 30%22 preserveAspectRatio=%22xMidYMid slice%22%3E%3CclipPath id=%22c%22%3E%3Cpath d=%22M30 15h30v15zv15H0zH0V0zV0h30z%22/%3E%3C/clipPath%3E%3Crect width=%2260%22 height=%2230%22 fill=%22%23012169%22/%3E%3Cpath d=%22M0 0l60 30m0-30L0 30%22 stroke=%22%23fff%22 stroke-width=%226%22/%3E%3Cpath d=%22M0 0l60 30m0-30L0 30%22 clip-path=%22url(%23c)%22 stroke=%22%23c8102e%22 stroke-width=%224%22/%3E%3Cpath d=%22M30 0v30M0 15h60%22 stroke=%22%23fff%22 stroke-width=%2210%22/%3E%3Cpath d=%22M30 0v30M0 15h60%22 stroke=%22%23c8102e%22 stroke-width=%226%22/%3E%3C/svg%3E"); }
.ob-chips[data-group="countries"] .ob-chip[data-value="au"],.pe-chips[data-group="countries"] .pe-chip[data-value="au"],#pvCountryChips .pv-chip[data-country="au"],.cm-flag[data-flag="au"] { --flag: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 60%22 preserveAspectRatio=%22xMidYMid slice%22%3E%3CclipPath id=%22c%22%3E%3Cpath d=%22M30 15h30v15zv15H0zH0V0zV0h30z%22/%3E%3C/clipPath%3E%3Crect width=%22120%22 height=%2260%22 fill=%22%23012169%22/%3E%3Cpath d=%22M0 0l60 30m0-30L0 30%22 stroke=%22%23fff%22 stroke-width=%226%22/%3E%3Cpath d=%22M0 0l60 30m0-30L0 30%22 clip-path=%22url(%23c)%22 stroke=%22%23e4002b%22 stroke-width=%224%22/%3E%3Cpath d=%22M30 0v30M0 15h60%22 stroke=%22%23fff%22 stroke-width=%2210%22/%3E%3Cpath d=%22M30 0v30M0 15h60%22 stroke=%22%23e4002b%22 stroke-width=%226%22/%3E%3Cpolygon points=%2230.00,36.00 31.74,41.40 37.04,39.39 33.90,44.11 38.77,47.00 33.13,47.49 33.90,53.11 30.00,49.00 26.10,53.11 26.87,47.49 21.23,47.00 26.10,44.11 22.96,39.39 28.26,41.40%22 fill=%22%23fff%22/%3E%3Cpolygon points=%2290.00,46.40 90.69,48.56 92.81,47.76 91.56,49.64 93.51,50.80 91.25,51.00 91.56,53.24 90.00,51.60 88.44,53.24 88.75,51.00 86.49,50.80 88.44,49.64 87.19,47.76 89.31,48.56%22 fill=%22%23fff%22/%3E%3Cpolygon points=%2276.00,22.40 76.69,24.56 78.81,23.76 77.56,25.64 79.51,26.80 77.25,27.00 77.56,29.24 76.00,27.60 74.44,29.24 74.75,27.00 72.49,26.80 74.44,25.64 73.19,23.76 75.31,24.56%22 fill=%22%23fff%22/%3E%3Cpolygon points=%2290.00,6.40 90.69,8.56 92.81,7.76 91.56,9.64 93.51,10.80 91.25,11.00 91.56,13.24 90.00,11.60 88.44,13.24 88.75,11.00 86.49,10.80 88.44,9.64 87.19,7.76 89.31,8.56%22 fill=%22%23fff%22/%3E%3Cpolygon points=%22104.00,19.40 104.69,21.56 106.81,20.76 105.56,22.64 107.51,23.80 105.25,24.00 105.56,26.24 104.00,24.60 102.44,26.24 102.75,24.00 100.49,23.80 102.44,22.64 101.19,20.76 103.31,21.56%22 fill=%22%23fff%22/%3E%3Cpolygon points=%2297.50,30.40 97.99,31.82 99.50,31.85 98.30,32.76 98.73,34.20 97.50,33.34 96.27,34.20 96.70,32.76 95.50,31.85 97.01,31.82%22 fill=%22%23fff%22/%3E%3C/svg%3E"); }
.ob-chips[data-group="countries"] .ob-chip[data-value="us"],.pe-chips[data-group="countries"] .pe-chip[data-value="us"],#pvCountryChips .pv-chip[data-country="us"],.ob-chips[data-group="countries"] .ob-chip[data-value="uk"],.pe-chips[data-group="countries"] .pe-chip[data-value="uk"],#pvCountryChips .pv-chip[data-country="uk"],.ob-chips[data-group="countries"] .ob-chip[data-value="au"],.pe-chips[data-group="countries"] .pe-chip[data-value="au"],#pvCountryChips .pv-chip[data-country="au"] {
  --veil: rgba(255, 255, 255, 0.72);
  background: linear-gradient(var(--veil), var(--veil)), var(--flag) center / cover no-repeat;
  border: 1px solid var(--rule); color: var(--ink); text-shadow: none;
}
.ob-chips[data-group="countries"] .ob-chip[data-value="us"]:hover,.pe-chips[data-group="countries"] .pe-chip[data-value="us"]:hover,#pvCountryChips .pv-chip[data-country="us"]:hover,.ob-chips[data-group="countries"] .ob-chip[data-value="uk"]:hover,.pe-chips[data-group="countries"] .pe-chip[data-value="uk"]:hover,#pvCountryChips .pv-chip[data-country="uk"]:hover,.ob-chips[data-group="countries"] .ob-chip[data-value="au"]:hover,.pe-chips[data-group="countries"] .pe-chip[data-value="au"]:hover,#pvCountryChips .pv-chip[data-country="au"]:hover { --veil: rgba(255, 255, 255, 0.55); color: var(--ink); border-color: var(--accent); }
.ob-chips[data-group="countries"] .ob-chip[data-value="us"].is-on,.pe-chips[data-group="countries"] .pe-chip[data-value="us"].is-on,#pvCountryChips .pv-chip[data-country="us"].is-on,.ob-chips[data-group="countries"] .ob-chip[data-value="uk"].is-on,.pe-chips[data-group="countries"] .pe-chip[data-value="uk"].is-on,#pvCountryChips .pv-chip[data-country="uk"].is-on,.ob-chips[data-group="countries"] .ob-chip[data-value="au"].is-on,.pe-chips[data-group="countries"] .pe-chip[data-value="au"].is-on,#pvCountryChips .pv-chip[data-country="au"].is-on {
  --veil: rgba(10, 20, 15, 0.42);
  color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 145, 88, 0.18);
}

/* ── Resume builder: edit on the left, live preview on the right (static/js/resume_preview.js) ── */
.rb-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.rb-edit { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.rb-card { border: 1px solid var(--rule); border-radius: 14px; background: #fff; }
.rb-card > summary { list-style: none; cursor: pointer; padding: 14px 18px; font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); display: flex; align-items: center; justify-content: space-between; }
.rb-card > summary::-webkit-details-marker { display: none; }
.rb-card > summary::after { content: "▾"; color: var(--ink-mute); font-size: 0.9rem; transition: transform 150ms ease; }
.rb-card:not([open]) > summary::after { transform: rotate(-90deg); }
.rb-card-body { padding: 0 18px 18px; }
.rb-hist { margin-left: auto; margin-right: 12px; display: inline-flex; gap: 4px; }
.rb-hist-btn { width: 30px; height: 30px; padding: 0; border-radius: 8px; border: 1px solid var(--rule); background: #fff; color: var(--ink); font-size: 1.05rem; line-height: 1; cursor: pointer; }
.rb-hist-btn:hover:not(:disabled) { background: var(--paper); }
.rb-hist-btn:disabled { opacity: 0.35; cursor: default; }
.oc-dialog { width: min(920px, 96vw); max-height: 94vh; padding: 0; border: 1px solid var(--rule); border-radius: 18px; background: #fff; color: var(--ink); overflow: hidden; }
.oc-dialog[open] { display: flex; flex-direction: column; }
.oc-dialog::backdrop { background: rgba(11, 31, 23, 0.45); }
.oc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px 8px; }
.oc-head h2 { margin: 0; font-size: 1.2rem; }
.oc-sub { margin: 2px 0 0; color: var(--ink-soft); font-size: 0.9rem; }
.oc-x { display: grid; place-items: center; flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: var(--rule-soft); cursor: pointer; color: var(--ink-soft); }
.oc-x:hover { color: var(--ink); }
.oc-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 20px; }
.oc-actions { display: flex; gap: 8px; }
.oc-status { margin: 0; padding: 4px 20px; color: var(--forest); font-weight: 600; font-size: 0.92rem; }
.oc-paper { position: relative; display: flex; flex: 1; min-height: 0; }
.oc-paper { background: radial-gradient(520px 320px at 20% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), radial-gradient(460px 300px at 85% 10%, rgba(106, 73, 224, 0.12), transparent 70%), var(--paper); overflow: hidden; }
.oc-stage { flex: 1; overflow: auto; padding: 14px 20px 22px; min-height: 280px; }
/* Blurred, the resume is half size and sits on a soft stage; made, it grows to full size. */
.oc-stage .rp-stage { margin: 0 auto; transition: width 800ms cubic-bezier(0.22, 1, 0.36, 1); }
.oc-stage.is-blurred .rp-stage { width: 50%; }
.oc-stage .rp-pages { transition: filter 700ms ease, opacity 700ms ease; }
.oc-stage .rp-page { border-radius: 4px; box-shadow: 0 2px 4px rgba(11, 31, 23, 0.06), 0 30px 60px -24px rgba(11, 31, 23, 0.35); }
.oc-stage.is-blurred .rp-pages { filter: blur(5px) saturate(1.15); opacity: 0.92; pointer-events: none; user-select: none; }
/* While it's being made: a slow breathing blur and a small label. The drifting colour blobs and the sweeping light were removed (founder, 10 Nov 2026: they looked awkward over the page). */
.oc-fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity 500ms ease; }
.oc-paper.is-working .oc-fx { opacity: 1; }
.oc-paper.is-working .oc-stage.is-blurred .rp-pages { animation: oc-breathe 2.6s ease-in-out infinite; }
.oc-fx-label { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 13px; font-weight: 700; color: var(--ink); box-shadow: 0 10px 28px -12px rgba(11, 31, 23, 0.45); }
.oc-fx-label b { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: oc-pulse 1.1s ease-in-out infinite; }
@keyframes oc-breathe { 0%, 100% { filter: blur(4px) saturate(1.1); } 50% { filter: blur(9px) saturate(1.3); } }
@keyframes oc-pulse { 0%, 100% { transform: scale(0.8); opacity: 0.6; } 50% { transform: scale(1.25); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .oc-fx-label b, .oc-paper.is-working .oc-stage.is-blurred .rp-pages { animation: none; } .oc-stage .rp-stage { transition: none; } }
.oc-pen { position: absolute; top: 14px; right: 30px; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--rule); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; box-shadow: 0 6px 16px -8px rgba(11, 31, 23, 0.4); transition: transform 160ms ease, background 160ms ease; }
.oc-pen:hover:not(:disabled) { background: var(--accent-soft); transform: scale(1.06); }
.oc-pen:disabled { opacity: 0.45; cursor: default; }
.rb-note-ok { margin: 0.6rem 0 0; color: var(--forest); font-weight: 600; font-size: 0.92rem; }
.rb-card-body .rb-lede { margin-top: 0; }

.rb-preview-pane { position: sticky; top: 76px; min-width: 0; max-height: calc(100vh - 92px); display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: 14px; background: #e9e6df; overflow: hidden; }
.rb-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--rule); }
.rb-seg { display: inline-flex; max-width: 100%; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; }
.rb-seg button { white-space: nowrap; border: 0; background: #fff; padding: 6px 13px; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.rb-seg button + button { border-left: 1px solid var(--rule); }
.rb-seg button.is-on { background: var(--forest, #1c3d2e); color: #fff; }
.rb-toolbar-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.rb-toolbar-actions button { padding: 7px 14px; font-size: 13px; }
.rb-pane-scroll { overflow: auto; padding: 16px; }
.rb-match-slot { padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--rule); font-size: 0.85rem; color: var(--ink-mute); }
.rb-match-slot[hidden] { display: none; }
.rb-mobile-toggle { display: none; }

@media (max-width: 960px) {
  .rb-split { grid-template-columns: minmax(0, 1fr); }
  .rb-preview-pane { position: static; max-height: none; }
  .rb-mobile-toggle { display: flex; position: sticky; top: 64px; z-index: 5; margin-bottom: 12px; }
  .rb-mobile-toggle .rb-seg { width: 100%; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
  .rb-mobile-toggle .rb-seg button { flex: 1; }
  .rb-split[data-pane="edit"] .rb-preview-pane { display: none; }
  .rb-split[data-pane="preview"] .rb-edit { display: none; }
}

/* Pages are laid out at their real size (US Letter, in points, like the PDF) and scaled to the pane by JS
   (static/js/resume_preview.js). Every template is Times New Roman: 12pt bold headings, 10pt for the rest, body text
   and bullets justified. Each page is its own sheet with a gap below it. */
.rp-stage { position: relative; overflow: hidden; width: 100%; }
.rp-pages { position: absolute; top: 0; left: 0; transform-origin: top left; }
.rp-page { position: relative; width: 612pt; height: 792pt; box-sizing: border-box; overflow: hidden; margin-bottom: 44px;
  background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18); color: #3a342d;
  font-family: "Times New Roman", Times, serif; font-size: 10pt; line-height: 13pt; }
.rp-page:last-child { margin-bottom: 0; }
.rp-page *, .rp-measure * { box-sizing: border-box; }
.rp-page h3, .rp-page h4, .rp-page p, .rp-measure h3, .rp-measure h4, .rp-measure p { margin: 0; padding: 0; }
.rp-measure { font-family: "Times New Roman", Times, serif; font-size: 10pt; line-height: 13pt; color: #3a342d; }
.rp-measure .rp-blk { display: flow-root; }   /* measured one at a time, margins and all; on a page they collapse like ReportLab's spacing */
.rp-top > :first-child { margin-top: 0 !important; }
.rp-empty { padding: 120pt 40pt; text-align: center; color: #9a9384; font: 12pt/16pt "Times New Roman", Times, serif; }

/* Shared content styles */
.rp-page .rp-body, .rp-measure .rp-body { text-align: justify; margin-bottom: 4pt; }
.rp-page .rp-bullet, .rp-measure .rp-bullet { position: relative; padding-left: 14pt; text-align: justify; margin-bottom: 2pt; }
.rp-page .rp-bullet::before, .rp-measure .rp-bullet::before { content: "•"; position: absolute; left: 2pt; }
.rp-page .rp-role, .rp-measure .rp-role { font-weight: bold; color: #1a1815; }
.rp-page .rp-meta, .rp-measure .rp-meta { font-style: italic; color: #6b6358; margin-bottom: 2pt; white-space: pre-wrap; }
.rp-page .rp-contact, .rp-measure .rp-contact { color: #6b6358; white-space: pre-wrap; }
.rp-page .rp-sec, .rp-measure .rp-sec { font-weight: bold; font-size: 12pt; line-height: 15pt; text-transform: uppercase; }
.rp-page .rp-gap3, .rp-measure .rp-gap3 { height: 3pt; }

/* Classic: centered header, thin grey rules */
.rp-classic { padding: 56.4pt 67.2pt; }
.rp-classic .rp-name { font-weight: bold; font-size: 22pt; line-height: 26pt; text-align: center; color: #1a1815; margin-bottom: 2pt; }
.rp-classic .rp-headline { font-style: italic; text-align: center; margin-bottom: 4pt; }
.rp-classic .rp-contact { text-align: center; margin-bottom: 10pt; }
.rp-classic .rp-hr { border: 0; border-top: 0.6pt solid #d9d2c4; margin: 2pt 0 4pt; }
.rp-classic .rp-sec { color: #1a1815; margin-top: 8pt; padding-bottom: 2pt; border-bottom: 0.4pt solid #d9d2c4; margin-bottom: 4pt; }
.rp-classic .rp-dot { color: #6b6358; }
.rp-classic .rp-end { margin-bottom: 4pt; }
.rp-classic .rp-bullet.rp-end { margin-bottom: 6pt; }

/* Modern: left-aligned header, accent colour */
.rp-modern { padding: 60pt 67.2pt; }
.rp-modern .rp-name { font-weight: bold; font-size: 24pt; line-height: 28pt; text-transform: uppercase; color: #1a1815; margin-bottom: 2pt; }
.rp-modern .rp-headline { color: #b8542d; margin-bottom: 6pt; }
.rp-modern .rp-contact { margin-bottom: 14pt; }
.rp-modern .rp-sec { color: #8c3d1d; margin-top: 6pt; padding-bottom: 4pt; border-bottom: 1.2pt solid #b8542d; margin-bottom: 4pt; }
.rp-modern .rp-end { margin-bottom: 6pt; }
.rp-modern .rp-bullet.rp-end { margin-bottom: 8pt; }

/* One page: sizes follow --s (the step the preview picked, as templates_pdf.ONEPAGE_SCALES) */
.rp-onepage { --s: 1; padding: 36pt 43.2pt; }
.rp-measure.rp-onepage, .rp-page.rp-onepage { font-size: calc(10pt * var(--s)); line-height: calc(12pt * var(--s)); }
.rp-onepage .rp-name { font-weight: bold; font-size: calc(20pt * var(--s)); line-height: calc(23pt * var(--s)); text-align: center; color: #1a1815; margin-bottom: calc(1pt * var(--s)); }
.rp-onepage .rp-headline { font-style: italic; text-align: center; margin-bottom: calc(1pt * var(--s)); }
.rp-onepage .rp-contact { text-align: center; margin-bottom: calc(1pt * var(--s)); }
.rp-onepage .rp-sec { font-size: calc(10.5pt * var(--s)); line-height: calc(12.5pt * var(--s)); color: #1a1815; margin-top: calc(5pt * var(--s)); padding-bottom: calc(2pt * var(--s)); border-bottom: 0.4pt solid #d9d2c4; margin-bottom: calc(2pt * var(--s)); }
.rp-onepage .rp-body { margin-bottom: calc(2pt * var(--s)); }
.rp-onepage .rp-body:first-child { margin-top: calc(3pt * var(--s)); }
.rp-onepage .rp-bullet { padding-left: calc(11pt * var(--s)); margin-bottom: calc(1pt * var(--s)); }
.rp-onepage .rp-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 8pt; }
.rp-onepage .rp-line .rp-l { flex: 1 1 0; min-width: 0; color: #1a1815; }
.rp-onepage .rp-line .rp-l b { font-weight: bold; }
.rp-onepage .rp-line .rp-r { flex: 0 0 auto; white-space: nowrap; text-align: right; font-style: italic; color: #6b6358; }
.rp-onepage .rp-dot { color: #6b6358; }
.rp-onepage .rp-end { margin-bottom: calc(3pt * var(--s)); }
.rp-onepage .rp-bullet.rp-end { margin-bottom: calc(3pt * var(--s)); }

/* Analysis: a rewrite shows the resume's own bullet above it (search.js renderBulletList) */
.bullet-original { margin: 0 0 4px; font-size: 0.82rem; color: var(--ink-muted, #6b7280); }

/* A country that isn't served yet (app/markets.py): shown, not pickable. */
.ob-chip:disabled, .pe-chip:disabled { opacity: .55; cursor: not-allowed; }
.ob-chip:disabled:hover, .pe-chip:disabled:hover { border-color: var(--rule); color: var(--ink-soft); }

/* Continue with Google (partials/google_button.html): a plain link styled like Google's own button, above the sign-in tabs. */
.auth-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 14px 20px; margin: 0 0 6px; border: 1px solid var(--lk-line, #d9dedc); border-radius: 999px; background: var(--lk-surface, #fff); color: var(--lk-text, #14201c); font: 700 15.5px var(--lk-font, inherit); text-decoration: none; box-shadow: none; transition: background 160ms ease, border-color 160ms ease; }
.auth-google:hover { background: var(--lk-tint, #f4f7f6); border-color: var(--lk-muted, #6b7773); }
.auth-google:focus-visible { outline: 3px solid var(--lk-action, #0d9158); outline-offset: 2px; }
.auth-google svg { flex: none; }
.auth-or { display: flex; align-items: center; gap: 14px; margin: 14px 0 18px; color: var(--lk-muted, #6b7773); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--lk-line, #d9dedc); }

/* The "send it again" form under the notice on the sign-in page (routes/auth.py /auth/verify/resend). */
.auth-resend { margin: 0 0 16px; }
.auth-resend label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--lk-muted, #6b7773); }
.auth-resend-row { display: flex; gap: 8px; }
.auth-resend-row input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--lk-line, #d9dedc); border-radius: 12px; font: inherit; }
.auth-resend-btn { flex: none; padding: 11px 16px; border: 0; border-radius: 999px; background: var(--lk-tint, #eef3f1); color: var(--lk-text, #14201c); font: 700 14px var(--lk-font, inherit); cursor: pointer; }
.auth-resend-btn:hover { background: var(--lk-line, #d9dedc); }
