/* =====================================================================
   IBEW Where To Go — Apple/Notion-inspired styling.
   Warm white surfaces, hairline borders, restrained typography,
   generous whitespace.
   ===================================================================== */

:root {
  /* Surfaces */
  --bg: #ffffff;
  --bg-soft: #fbfbfa;          /* warm off-white, Notion-ish */
  --surface: #ffffff;
  --surface-hover: #f7f7f5;    /* Notion hover */
  --surface-sunken: #f4f4f2;

  /* Lines */
  --border: #ececea;           /* hairline */
  --border-strong: #d9d9d6;
  --divider: #efefed;

  /* Text */
  --text: #1d1d1f;             /* Apple text */
  --text-secondary: #515154;
  --text-muted: #86868b;
  --text-faint: #a1a1a6;

  /* Accent */
  --accent: #0066cc;           /* Apple link blue */
  --accent-hover: #004999;
  --accent-soft: #eef4fb;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Effects */
  --shadow-modal: 0 30px 80px rgba(0, 0, 0, 0.18),
                  0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-stat:  0 1px 2px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { color: var(--accent-hover); }

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

/* ============================================================
   Hero
   ============================================================ */

.hero {
  background: var(--bg);
  padding: 96px 0 56px;
  border-bottom: 1px solid var(--divider);
}

.hero-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
}

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

.hero-emblem {
  width: 420px;
  max-width: 44%;
  height: auto;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  /* Image is grayscale on white; subtle drop shadow gives it presence
     without competing with the headline color. */
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.08));
}

@media (max-width: 900px) {
  .hero-grid { flex-direction: column; align-items: flex-start; gap: 32px; }
  .hero-emblem { width: 260px; max-width: 60%; align-self: center; opacity: 0.9; }
}

@media (max-width: 520px) {
  .hero-emblem { display: none; }
}

.hero-title {
  margin: 0 0 16px;
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--text);
}

.hero-sub {
  margin: 0 0 48px;
  color: var(--text-secondary);
  max-width: 680px;
  font-size: 19px;
  line-height: 1.5;
  font-weight: 400;
}

.hero-sub a {
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-strong);
}
.hero-sub a:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* Inline stats — Apple-style, no boxes, just dividers */

.stats {
  display: flex;
  gap: 48px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0;
}

/* ============================================================
   Search
   ============================================================ */

.search-wrap {
  max-width: 560px;
}

.search-input {
  position: relative;
}

.search-input input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  display: block;
}

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

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

.search-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.12);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.search-count {
  font-size: 13px;
  color: var(--text-muted);
  min-height: 18px;
}

/* Apple-style segmented control */

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: var(--surface-sunken);
  border-radius: 9px;
  font-size: 13px;
}

.sort-label {
  padding: 0 8px 0 6px;
  color: var(--text-muted);
  font-weight: 500;
}

.sort-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
  white-space: nowrap;
}

.sort-btn:hover {
  color: var(--text);
}

.sort-btn.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06),
              0 0 0 1px rgba(0, 0, 0, 0.04);
}

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

/* ============================================================
   Main / list
   ============================================================ */

.main {
  padding: 32px 32px 96px;
}

.status {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  min-height: 18px;
}
.status.error { color: #c8332f; }

/* Notion-style flat list: hairline separators, no boxes. */

.locals-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--divider);
}

.local-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 8px;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  transition: background 0.12s ease;
  border-radius: 6px;
  margin: 0 -8px;
}

.local-row:hover {
  background: var(--surface-hover);
}

.local-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: var(--surface-hover);
}

/* Small understated badge — not a heavy circle */
.badge {
  flex-shrink: 0;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--surface-sunken);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-top {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.location {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.calls-pill {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  padding: 2px 10px;
  background: var(--accent-soft);
  border-radius: 999px;
  letter-spacing: 0;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.row-meta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}
.row-meta a:hover { color: var(--text); }

.row-meta .external {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

.row-meta .updated {
  color: var(--text-faint);
}

.outlook-preview {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Scale (hourly wage) on the row — right-aligned headline number */

.row-scale {
  flex-shrink: 0;
  text-align: right;
  align-self: center;
  min-width: 92px;
  padding-left: 12px;
}

.scale-value {
  display: block;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.scale-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Empty / fallback */

.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  border-top: 1px solid var(--divider);
  padding: 32px 0;
  color: var(--text-muted);
  background: var(--bg);
  font-size: 13px;
}
.footer a { color: var(--text-secondary); }
.footer a:hover { color: var(--text); }

/* ============================================================
   Modal
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px;
  overflow-y: auto;
}
.modal[hidden] { display: none; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 22, 0.32);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  animation: fade 0.18s ease-out;
}

.modal-card {
  position: relative;
  background: var(--surface);
  width: 100%;
  max-width: 760px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-modal);
  padding: 40px 48px 44px;
  animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes fade {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--surface-sunken);
  border: 0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.12s, color 0.12s;
}
.modal-close:hover {
  background: var(--border-strong);
  color: var(--text);
}
.modal-close svg { width: 16px; height: 16px; }

.modal-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--divider);
}

.modal-header .badge {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 14px;
  font-size: 17px;
  padding: 0;
}

.modal-header-text {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.modal-header .eyebrow {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
  margin-bottom: 4px;
}

.modal-header h2 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

.modal-header .contact {
  display: flex;
  gap: 6px 18px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 14px;
  align-items: center;
}
.modal-header .contact > span,
.modal-header .contact > a {
  display: inline-flex;
  align-items: center;
}
.modal-header .contact a {
  color: var(--text-secondary);
}
.modal-header .contact a:hover { color: var(--text); }

/* Sections */

.section {
  margin-top: 28px;
}

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

.outlook-full {
  font-size: 16px;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.6;
  margin: 0;
}

.summary-line {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--accent-hover);
  font-weight: 500;
}

/* Scale card — sits between header and Outlook in the modal */

.scale-card {
  margin-top: 24px;
  padding: 22px 24px;
  background: var(--bg-soft);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
}

.scale-card-main {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.scale-amount {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.scale-caption {
  font-size: 14px;
  color: var(--text-muted);
}

.scale-lines {
  list-style: none;
  margin: 14px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}
.scale-lines li::before {
  content: "• ";
  color: var(--text-faint);
  margin-right: 2px;
}

/* Category groups — flat, Notion-style */

.category-group {
  margin-top: 18px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}

.category-header {
  background: var(--bg-soft);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--divider);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.category-header .cat-count {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 12px;
}

.jobs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--surface);
}
.jobs-table th, .jobs-table td {
  text-align: left;
  padding: 12px 16px;
  border-top: 1px solid var(--divider);
  vertical-align: top;
  line-height: 1.5;
}
.jobs-table thead th {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border-top: 0;
  background: transparent;
}
.jobs-table tbody tr:hover {
  background: var(--bg-soft);
}
.jobs-table td.qty {
  width: 52px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
}
.jobs-table td.contractor {
  width: 220px;
  font-weight: 500;
  color: var(--text);
}
.jobs-table td.details {
  color: var(--text-secondary);
}

.no-calls {
  color: var(--text-muted);
  margin: 12px 0 0;
  font-size: 14px;
}

/* Raw posting — collapsed by default */

details.raw {
  margin-top: 32px;
  border-top: 1px solid var(--divider);
  padding-top: 16px;
}
details.raw summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  user-select: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
details.raw summary::before {
  content: "▸";
  font-size: 11px;
  color: var(--text-faint);
  transition: transform 0.15s;
  display: inline-block;
}
details.raw[open] summary::before {
  transform: rotate(90deg);
}
details.raw summary::-webkit-details-marker { display: none; }
details.raw .raw-body {
  margin-top: 14px;
  padding: 18px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  max-height: 360px;
  overflow: auto;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  line-height: 1.6;
}
details.raw .raw-body * { max-width: 100%; }
details.raw .raw-body p { margin: 0 0 12px; }
details.raw .raw-body p:last-child { margin-bottom: 0; }
details.raw .raw-body strong { color: var(--text); font-weight: 600; }
details.raw .raw-body a { color: var(--accent); }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .hero { padding: 56px 0 36px; }
  .hero-title { font-size: 36px; }
  .hero-sub { font-size: 17px; margin-bottom: 32px; }
  .stats { gap: 28px; margin-bottom: 32px; }
  .stat-value { font-size: 26px; }
  .main { padding: 24px 20px 64px; }

  .local-row {
    gap: 14px;
    padding: 18px 8px;
  }
  .badge { min-width: 38px; height: 38px; font-size: 13px; padding: 0 8px; }
  .location { font-size: 17px; }
  .row-top { gap: 10px; }
  .row-meta { gap: 8px 14px; font-size: 13px; }
  .row-scale { min-width: 76px; padding-left: 6px; }
  .scale-value { font-size: 16px; }
  .scale-label { font-size: 11px; }
  .scale-card { padding: 18px 18px; }
  .scale-amount { font-size: 28px; }

  .search-toolbar { gap: 10px; }
  .sort-control { font-size: 12px; padding: 2px; }
  .sort-btn { padding: 5px 10px; font-size: 12px; }
  .sort-label { padding: 0 6px; }

  .modal-card {
    padding: 28px 22px 28px;
    border-radius: var(--radius-lg);
  }
  .modal-header { gap: 14px; padding-bottom: 18px; }
  .modal-header .badge { width: 44px; height: 44px; min-width: 44px; font-size: 14px; }
  .modal-header h2 { font-size: 22px; }
  .jobs-table td.contractor { width: auto; }
  .jobs-table th, .jobs-table td { padding: 10px 12px; }
}

body.modal-open { overflow: hidden; }

/* ============================================================
   Topbar (auth)
   ============================================================ */

.topbar {
  border-bottom: 1px solid var(--divider);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand:hover { color: var(--text); }

.brand-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 50%;
  /* JPEG has a white-ish background; clip it to the emblem's circular edge */
}

.brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}

.brand-tag {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

@media (max-width: 520px) {
  .brand-tag { display: none; }
}

.auth-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-user {
  font-size: 13px;
  color: var(--text-muted);
  margin-right: 4px;
}

.btn-ghost, .btn-primary {
  appearance: none;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }

.btn-primary {
  background: var(--text);
  color: white;
}
.btn-primary:hover { background: #000; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.link-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
}
.link-btn:hover { text-decoration: underline; }

/* ============================================================
   Locked rows (paywall)
   ============================================================ */

.local-row.is-locked {
  cursor: pointer;
  position: relative;
}

.local-row.is-locked .badge-locked,
.local-row.is-locked .location,
.local-row.is-locked .row-meta,
.local-row.is-locked .outlook-preview {
  /* Server-side redaction means the underlying text is placeholder. The
     blur is purely a visual cue. */
  filter: blur(6px);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  color: var(--text-faint);
}

.local-row.is-locked .badge-locked {
  background: var(--surface-sunken);
  color: var(--text-faint);
}

.local-row.is-locked .calls-pill {
  background: var(--surface-sunken);
  color: var(--text-faint);
}

/* When the user is sorting by salary, the scale is the only real value on
   each row — make sure it stays sharp and prominent. */
.local-row.is-locked .row-scale {
  filter: none;
}

.local-row.is-locked:hover {
  background: var(--surface-hover);
}

.local-row.is-locked::after {
  content: "Sign up to view";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.12s;
}
.local-row.is-locked:hover::after {
  opacity: 1;
}

/* ============================================================
   Paywall CTA bar
   ============================================================ */

/* ============================================================
   Tabs
   ============================================================ */

.tabs {
  display: flex;
  gap: 4px;
  margin: 24px 0 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.tab {
  appearance: none;
  background: none;
  border: 0;
  padding: 10px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted, #6b7280);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  color: var(--text);
  border-bottom-color: var(--text);
}
.tab-lock {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: currentColor;
  opacity: 0.6;
}
.tab-lock svg { width: 100%; height: 100%; }

[role="tabpanel"][hidden] { display: none; }

/* ============================================================
   Map
   ============================================================ */

.map-section {
  margin: 16px 0 24px;
}
#map {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f4f5f7;
  overflow: hidden;
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  padding: 10px 4px 0;
  font-size: 13px;
  color: var(--muted, #555);
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
}
.legend-dot.legend-0    { background: #cbd0d8; }
.legend-dot.legend-low  { background: #34d399; }
.legend-dot.legend-mid  { background: #f59e0b; }
.legend-dot.legend-high { background: #ef4444; }

.leaflet-popup-content { margin: 10px 12px; font: 13px/1.4 Inter, system-ui, sans-serif; }
.leaflet-popup-content .marker-title { font-weight: 600; margin-bottom: 2px; }
.leaflet-popup-content .marker-meta { color: #555; }
.leaflet-popup-content button {
  margin-top: 6px;
  padding: 4px 10px;
  font: inherit;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
}
.leaflet-popup-content button:hover { background: #f3f4f6; }

.row-meta .distance {
  font-size: 13px;
  color: var(--muted, #555);
}
.row-meta .distance::before {
  content: "·";
  margin: 0 6px;
  color: rgba(0, 0, 0, 0.25);
}

.paywall-cta {
  margin-bottom: 24px;
  padding: 22px 28px;
  background: var(--text);
  color: white;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.paywall-cta[hidden] { display: none; }

.paywall-cta-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.paywall-cta-text strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.paywall-cta-text span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.paywall-cta .btn-primary {
  background: white;
  color: var(--text);
  padding: 10px 18px;
}
.paywall-cta .btn-primary:hover { background: #f0f0f0; }

/* ============================================================
   Auth modal
   ============================================================ */

.auth-card {
  position: relative;
  background: var(--surface);
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-modal);
  padding: 40px 36px 32px;
  animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.auth-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-sub {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 14px;
}

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

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

.auth-field span {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.12);
}

.auth-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  cursor: pointer;
}
.auth-consent[hidden] { display: none; }

.auth-consent input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.auth-error {
  font-size: 13px;
  color: #c8332f;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.auth-submit {
  margin-top: 8px;
  width: 100%;
  padding: 12px;
  font-size: 15px;
}

.auth-switch {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}
