/* =====================================================================
   The Picket Line — main stylesheet
   ===================================================================== */

:root {
  --red:          #c41e3a;
  --red-hover:    #e02245;
  --black:        #1a1a1a;
  --gray-800:     #333;
  --gray-600:     #666;
  --gray-400:     #999;
  --gray-200:     #e4e4e4;
  --gray-100:     #f5f4f1;
  --white:        #fff;
  --cream:        #fafaf8;

  --badge-rc:       #1a3a6b;
  --badge-ca:       #b45309;
  --badge-election: #5b21b6;

  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --radius:  8px;
  --shadow:  0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.09);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: #fff;
  color: var(--black);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Editorial typography — Playfair Display for display headings */
.site-main h1,
.site-main h2 {
  font-family: var(--font-display);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.02em;
}

/* ---- Layout ---- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container--narrow { max-width: 620px; }
.site-main { flex: 1; }

/* ---- Header ---- */
.site-header {
  background: var(--black);
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 200;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.logo {
  display: flex;
  align-items: center;
  color: var(--white) !important;
  text-decoration: none !important;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.nav-link {
  color: rgba(255,255,255,.75);
  font-size: .875rem;
  transition: color .15s;
}
.nav-link:hover { color: #fff; text-decoration: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  border: none;
  transition: background .15s, color .15s, border-color .15s;
  text-decoration: none !important;
}
.btn-primary           { background: var(--red); color: #fff; }
.btn-primary:hover     { background: var(--red-hover); color: #fff; }
.btn-outline           { border: 1.5px solid rgba(255,255,255,.35); color: rgba(255,255,255,.85); background: transparent; }
.btn-outline:hover     { border-color: #fff; color: #fff; }
.btn-outline-dark      { border: 1.5px solid var(--gray-200); color: var(--black); background: transparent; }
.btn-outline-dark:hover{ border-color: var(--red); color: var(--red); }
.btn-ghost             { background: transparent; color: rgba(255,255,255,.65); }
.btn-ghost:hover       { color: #fff; }
.btn-full              { width: 100%; padding: .7rem; font-size: 1rem; }

/* ---- Hero / search ---- */
.hero {
  background: var(--black);
  color: #fff;
  padding: 4rem 0 3rem;
  text-align: center;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: .5rem;
}
.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 2rem;
}

.search-form  { max-width: 580px; margin: 0 auto 1rem; }
.search-bar   { display: flex; gap: .5rem; margin-bottom: 1rem; }
.search-input {
  flex: 1;
  padding: .7rem 1rem;
  border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  outline: none;
  transition: border-color .15s;
}
.search-input::placeholder { color: rgba(255,255,255,.35); }
.search-input:focus       { border-color: var(--red); }
.search-btn { padding: .7rem 1.4rem; font-size: .95rem; }

.search-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.25rem;
  justify-content: center;
}
.filter-label  { font-size: .8rem; color: rgba(255,255,255,.45); }
.filter-option {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .85rem;
  color: rgba(255,255,255,.7);
  cursor: pointer;
}
.filter-option input[type="radio"] { accent-color: var(--red); }

/* ---- Optional search fields (homepage hero) ---- */
.search-optional {
  display: flex;
  gap: .5rem;
  margin-top: .65rem;
}
.search-input-optional {
  flex: 1;
  padding: .5rem .85rem;
  border-radius: var(--radius);
  border: 1.5px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  color: #fff;
  font-family: var(--font);
  font-size: .85rem;
  outline: none;
  transition: border-color .15s;
}
.search-input-optional::placeholder { color: rgba(255,255,255,.3); }
.search-input-optional:focus        { border-color: var(--red); }
.search-select-optional {
  padding: .5rem .75rem;
  border-radius: var(--radius);
  border: 1.5px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.75);
  font-family: var(--font);
  font-size: .82rem;
  outline: none;
  cursor: pointer;
  transition: border-color .15s;
  /* Force dark option text on browsers that render native dropdowns */
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,255,255,.5)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .65rem center;
  padding-right: 2rem;
}
.search-select-optional:focus { border-color: var(--red); }
.search-select-optional option { background: var(--gray-800); color: #fff; }

.hero-note {
  margin-top: 1.5rem;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
}
.hero-note a        { color: rgba(255,255,255,.75); text-decoration: underline; }
.hero-note--pro     { color: rgba(255,255,255,.6); }
.hero-pro-link      { color: #e85d4a !important; font-weight: 700; text-decoration: none; }
.hero-pro-link:hover { text-decoration: underline; }

/* ---- Upgraded banner ---- */
.flash-banner {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  text-align: center;
  padding: .6rem 1rem;
  font-size: .875rem;
}

/* ---- Filing type cards on home ---- */
.filing-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  padding: 2.5rem 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
}
.filing-card {
  background: #fff;
  border-radius: 8px;
  border: 0.5px solid #e0e0e0;
  padding: 20px 24px;
  transition: box-shadow .15s;
}
.filing-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.filing-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  margin-bottom: .4rem;
}
.filing-card p  { font-size: .85rem; color: var(--gray-600); font-family: var(--font); }

/* ---- Results header ---- */
.results-header { padding: 2rem 0 .5rem; }
.results-header-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .25rem;
}
.results-header-top h2 { margin-bottom: 0; }
.results-header h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: .25rem; }
.query-text { color: var(--red); }
.export-btn { font-size: .8rem; white-space: nowrap; flex-shrink: 0; }
.export-btn--locked {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}
.results-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .8rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
}
.result-count { font-weight: 500; color: var(--black); }

/* ---- Refine bar (results page) ---- */
.refine-bar {
  margin: .85rem 0 .5rem;
}
.refine-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
}
.refine-input {
  flex: 1;
  min-width: 160px;
  padding: .38rem .75rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: .82rem;
  outline: none;
  transition: border-color .15s;
  background: var(--white);
  color: var(--black);
}
.refine-input:focus { border-color: var(--red); }
.refine-select {
  padding: .38rem .7rem;
  padding-right: 2rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: .82rem;
  outline: none;
  cursor: pointer;
  background: var(--white);
  color: var(--black);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .65rem center;
  transition: border-color .15s;
}
.refine-select:focus { border-color: var(--red); }
.btn-sm { padding: .35rem .8rem; font-size: .8rem; }
.clear-filters-link {
  font-size: .78rem;
  color: var(--gray-600);
  white-space: nowrap;
}
.clear-filters-link:hover { color: var(--red); text-decoration: none; }

/* ---- Filter chips ---- */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .5rem;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .22rem .55rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 99px;
  font-size: .75rem;
  color: #1d4ed8;
  font-weight: 500;
}
.chip-remove {
  color: #1d4ed8;
  font-size: .85rem;
  line-height: 1;
  opacity: .65;
  text-decoration: none !important;
}
.chip-remove:hover { opacity: 1; }

/* ---- Tabs ---- */
.result-tabs {
  display: flex;
  overflow-x: auto;
  gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 1.5rem;
  scrollbar-width: none;
}
.result-tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: .55rem 1rem;
  font-size: .85rem;
  color: var(--gray-600);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  text-decoration: none !important;
}
.tab:hover  { color: var(--black); }
.tab.active { color: var(--red); border-bottom-color: var(--red); font-weight: 600; }
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #888;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
  min-width: 20px;
  font-family: var(--font);
}
.tab.active .tab-count {
  background: rgba(196,30,58,.1);
  color: var(--red);
}

/* ---- Result cards ---- */
.results-list {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding-bottom: 3rem;
}
.result-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 0.5px solid #e8e8e8;
  padding: 1.1rem 1.25rem;
  display: flex;
  gap: 1rem;
  transition: box-shadow .15s;
}
.result-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.result-badge {
  flex-shrink: 0;
  align-self: flex-start;
  min-width: 62px;
  text-align: center;
  padding: .18rem .55rem;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 3px;
}
.badge--rc       { background: #e3eaf6; color: #1a3a6b; }
.badge--ca       { background: #fdf0e6; color: #8b4a0f; }
.badge--election { background: #f0e8f8; color: #5b21b6; }

.result-body     { flex: 1; min-width: 0; }
.result-employer {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: .3rem;
}
/* Tabler icons inside metadata detail spans */
.detail .ti {
  font-size: 12px;
  opacity: .6;
  margin-right: 2px;
  vertical-align: -1px;
}
.result-details  {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .9rem;
  margin-bottom: .4rem;
}
.detail          { font-size: .78rem; color: var(--gray-600); }
.result-union, .result-allegation {
  font-size: .83rem;
  color: var(--gray-600);
  font-style: italic;
  margin-bottom: .3rem;
}
.result-status, .result-closing {
  display: inline-block;
  font-size: .72rem;
  padding: .12rem .45rem;
  border-radius: 3px;
  background: var(--gray-100);
  color: var(--gray-600);
  margin-right: .3rem;
  margin-top: .2rem;
}
.result-unit { font-size: .77rem; color: var(--gray-400); margin-top: .3rem; }
.persuader-warning {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  margin-top: .6rem;
  padding: .45rem .65rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 3px solid var(--red);
  border-radius: calc(var(--radius) - 2px);
  font-size: .775rem;
  color: #991b1b;
  line-height: 1.45;
}
.persuader-warning__icon { flex-shrink: 0; margin-top: .05rem; }
.persuader-warning a            { color: #991b1b; font-weight: 600; text-decoration: underline; }
.persuader-warning a:hover      { color: #7f1d1d; }
.result-outcome {
  display: inline-block;
  font-size: .77rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 3px;
  margin-bottom: .35rem;
}
/* 4-state election outcome badges */
.outcome--union-won      { background: #d4edda; color: #1e7e34; }
.outcome--union-leads    { background: #fff3cd; color: #856404; }
.outcome--employer-leads { background: #f8d7da; color: #c0392b; }
.outcome--pending        { background: #e9ecef; color: #6c757d; }

.election-tally {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  font-size: .78rem;
  color: var(--gray-600);
  margin-top: .25rem;
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0 3rem;
}
.page-btn {
  padding: .45rem .9rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .85rem;
  color: var(--black);
  transition: border-color .15s, color .15s;
}
.page-btn:hover { border-color: var(--red); color: var(--red); text-decoration: none; }
.page-info { font-size: .85rem; color: var(--gray-600); }

/* ---- No results ---- */
.no-results {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--gray-600);
}
.no-results p { margin-bottom: 1rem; font-size: .95rem; }

/* ---- Auth cards ---- */
.auth-card {
  margin: 2.5rem auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.25rem 2.5rem;
}
.auth-card h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: .25rem; }
.auth-sub     { font-size: .85rem; color: var(--gray-600); margin-bottom: 1.5rem; }
.auth-form    { display: flex; flex-direction: column; gap: 1.1rem; }
.form-group   { display: flex; flex-direction: column; gap: .3rem; }
.form-group label { font-size: .85rem; font-weight: 500; }
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
  padding: .6rem .8rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .975rem;
  font-family: var(--font);
  outline: none;
  transition: border-color .15s;
}
.form-group input:focus { border-color: var(--red); }
.form-hint  { font-size: .75rem; color: var(--gray-400); }
.auth-alt   { margin-top: 1.1rem; text-align: center; font-size: .85rem; color: var(--gray-600); }
.auth-alt a { color: var(--red); }

/* ---- Alerts ---- */
.alert {
  padding: .7rem 1rem;
  border-radius: var(--radius);
  font-size: .85rem;
  margin-bottom: 1rem;
}
.alert--error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert--success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

/* ---- Rate limit page ---- */
.rate-limit-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  padding: 2rem;
}
.limit-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  text-align: center;
  max-width: 460px;
  width: 100%;
}
.limit-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.limit-card h1 { font-size: 1.4rem; margin-bottom: .75rem; }
.limit-card p  { font-size: .875rem; color: var(--gray-600); margin-bottom: .75rem; }
.limit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* ---- About page ---- */
.about-page { padding: 2.5rem 0 4rem; }
.about-page h1  { font-size: 2rem; font-weight: 700; margin-bottom: 1.5rem; }
.about-section  { margin-bottom: 2.5rem; }
.about-section h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: .75rem; }
.about-section p  { font-size: .9rem; color: var(--gray-600); margin-bottom: .6rem; }
.data-types dt { font-weight: 600; margin-top: 1rem; font-size: .9rem; }
.data-types dd { margin-left: 1rem; font-size: .85rem; color: var(--gray-600); }
.tier-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  margin-bottom: 1.25rem;
}
.tier-table th,
.tier-table td { padding: .55rem .8rem; text-align: left; border-bottom: 1px solid var(--gray-200); }
.tier-table th  { background: var(--gray-100); font-weight: 600; }
.tier-table th:not(:first-child),
.tier-table td:not(:first-child) { text-align: center; }
.about-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }

/* ---- Footer ---- */
.site-footer {
  background: var(--black);
  color: rgba(255,255,255,.45);
  font-size: .8rem;
  padding: 1.75rem 0;
}
.site-footer a { color: rgba(255,255,255,.65); }
.site-footer a:hover { color: #fff; }
.footer-links { display: flex; gap: 1rem; margin-top: .4rem; }

/* ---- Jobs section (homepage + /jobs page) ---- */
.jobs-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
}
.jobs-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-top: .25rem;
}
.jobs-section-header h2 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.jobs-section-header a  { font-size: .82rem; color: var(--gray-600); }
.jobs-section-header a:hover { color: var(--red); text-decoration: none; }

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: .85rem;
}
.job-card {
  background: #fff;
  border-radius: 8px;
  border: 0.5px solid #e0e0e0;
  padding: 1rem 1.15rem 1rem;
  position: relative;
  transition: box-shadow .15s;
}
.job-card:hover               { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.job-card--featured           { border-left: 3px solid #d97706; }
.job-badge-featured {
  position: absolute;
  top: .8rem;
  right: .9rem;
  background: #fef3c7;
  color: #92400e;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .13rem .42rem;
  border-radius: 3px;
}
.job-org {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .25rem;
}
.job-title {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: .3rem;
}
.job-title a            { color: var(--black); }
.job-title a:hover      { color: var(--red); text-decoration: none; }
.job-location {
  font-size: .77rem;
  color: var(--gray-600);
  margin-top: .25rem;
}

/* /jobs full page header */
.jobs-page-header        { padding: 2rem 0 1.5rem; }
.jobs-page-header h1     { font-size: 1.65rem; font-weight: 700; margin-bottom: .35rem; }
.jobs-page-subhead       { font-size: .9rem; color: var(--gray-600); }
.jobs-list-full {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding-bottom: 3rem;
}
.jobs-list-full .job-card { border-left-width: 3px; }

/* ---- Employer link (result cards) ---- */
.employer-link         { color: var(--black); }
.employer-link:hover   { color: var(--red); text-decoration: none; }

/* ---- Employer detail page ---- */
.employer-page-header {
  padding: 1.75rem 0 0;
  margin-bottom: 0;
}
.employer-breadcrumb { margin-bottom: .75rem; }
.back-link {
  font-size: .8rem;
  color: var(--gray-600);
}
.back-link:hover { color: var(--red); text-decoration: none; }

.employer-page-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.employer-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 1.25rem;
}
.summary-stat {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .8rem;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 500;
}
.summary-stat__num     { font-size: .9rem; font-weight: 700; }
.summary-stat--rc      { background: #dbeafe; color: #1d4ed8; }
.summary-stat--ca      { background: #fef3c7; color: #92400e; }
.summary-stat--election{ background: #ede9fe; color: #5b21b6; }

.employer-source-note {
  font-size: .75rem;
  color: var(--gray-400);
  text-align: center;
  padding: 1.75rem 0 3rem;
  border-top: 1px solid var(--gray-200);
  margin-top: 1.5rem;
}
.employer-source-note a { color: var(--gray-400); text-decoration: underline; }
.employer-source-note a:hover { color: var(--gray-600); }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .hero h1         { font-size: 1.75rem; }
  .hero-sub        { font-size: .95rem; }
  .search-bar      { flex-direction: column; }
  .search-btn      { width: 100%; }
  .search-optional { flex-direction: column; }
  .search-select-optional { width: 100%; }
  .refine-form     { flex-direction: column; align-items: stretch; }
  .refine-input,
  .refine-select   { width: 100%; }
  .main-nav        { gap: .4rem; }
  .logo-text       { font-size: 1rem; }
  .result-card     { flex-direction: column; gap: .6rem; }
  .result-badge    { align-self: flex-start; }
  .auth-card       { padding: 1.5rem; margin: 1.5rem auto; }
  .employer-watch-item { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .add-employer-form   { flex-direction: column; }
  .prefs-form .profile-input { max-width: 100%; }
}

/* =====================================================================
   Profile page
   ===================================================================== */

.profile-page { padding: 2rem 0 4rem; }
.profile-page h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 2rem; }

.profile-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.profile-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--black);
}

.profile-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}

.employer-quota {
  font-size: .85rem;
  color: var(--gray-600);
}
.employer-quota--full { color: #b45309; font-weight: 500; }

/* Watched employer list */
.employer-watch-list {
  list-style: none;
  margin-bottom: 1rem;
}
.employer-watch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.employer-watch-item:last-child { border-bottom: none; }
.employer-watch-name { font-weight: 500; }
.employer-watch-remove { margin: 0; }
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--gray-400);
  transition: color .15s, background .15s;
}
.btn-icon.btn-remove:hover { color: var(--red); background: #fff0f0; }

.add-employer-form {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
}
.profile-input {
  flex: 1;
  max-width: 360px;
  padding: .55rem .75rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: var(--font);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.profile-input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(196,30,58,.1);
}
.profile-input:disabled { background: var(--gray-100); cursor: not-allowed; }

.profile-empty {
  color: var(--gray-600);
  font-style: italic;
  font-size: .9rem;
  margin-bottom: .5rem;
}
.limit-notice {
  font-size: .9rem;
  color: #b45309;
  margin-top: .5rem;
}

/* Alert preferences form */
.prefs-form .form-group { margin-bottom: 1.25rem; }
.prefs-form label { display: block; font-weight: 500; margin-bottom: .4rem; font-size: .9rem; }

.radio-group, .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .25rem;
}
.radio-option, .checkbox-option {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  font-weight: 400;
  cursor: pointer;
}
.radio-option input, .checkbox-option input { accent-color: var(--red); }

/* Alert history list */
.alert-history-list { list-style: none; }
.alert-history-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.alert-history-item:last-child { border-bottom: none; }
.alert-history-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.alert-history-employer { font-weight: 500; font-size: .9rem; }
.alert-history-detail {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .85rem;
  color: var(--gray-600);
}
.alert-history-case { color: var(--red); text-decoration: none; }
.alert-history-case:hover { text-decoration: underline; }
.alert-history-date { color: var(--gray-400); }

/* =====================================================================
   Upgrade / billing page
   ===================================================================== */

.upgrade-page { padding: 3rem 0 4rem; max-width: 480px; margin: 0 auto; }
.upgrade-header { text-align: center; margin-bottom: 2rem; }
.upgrade-header h1 { font-size: 2rem; font-weight: 700; }
.upgrade-sub { color: var(--gray-600); margin-top: .5rem; font-size: 1.05rem; }

.upgrade-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.upgrade-price {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}
.price-amount { font-size: 3rem; font-weight: 700; color: var(--black); }
.price-period { font-size: 1.1rem; color: var(--gray-600); }

.upgrade-benefits {
  list-style: none;
  margin-bottom: 1.75rem;
}
.upgrade-benefits li {
  display: flex;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.upgrade-benefits li:last-child { border-bottom: none; }
.benefit-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  margin-top: .15rem;
}
.upgrade-benefits strong { display: block; font-weight: 600; margin-bottom: .2rem; }
.upgrade-benefits p { margin: 0; color: var(--gray-600); font-size: .9rem; }

.upgrade-btn { margin-bottom: 1rem; font-size: 1rem; padding: .75rem 1.5rem; }
.upgrade-note { font-size: .85rem; color: var(--gray-400); text-align: center; margin: 0; }
