:root {
  --bg: #0b0f1a;
  --bg-2: #11162a;
  --surface: #171d35;
  --surface-2: #1f2745;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --ink: #f4f6fb;
  --ink-mid: #b8c0d4;
  --ink-dim: #7b87a5;
  --brand: #22c55e;
  --brand-2: #14532d;
  --accent: #60a5fa;
  --warn: #f59e0b;
  --danger: #ef4444;
  --deed: #22c55e;
  --lien: #60a5fa;
  --hybrid: #a78bfa;
  --redeemable: #f59e0b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

* { box-sizing: border-box; }

/* Jumps and scrollIntoView stop below the pinned page tabs */
html { scroll-padding-top: 56px; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(34, 197, 94, 0.18), transparent 60%),
              radial-gradient(1000px 500px at 110% 0%, rgba(96, 165, 250, 0.14), transparent 50%),
              var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header (scrolls away; the page tabs below it stay pinned) */
.site-header {
  position: relative;
  z-index: 20;
  background: rgba(11, 15, 26, 0.75);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center;
  font-weight: 800; color: white;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.brand-sub { font-size: 12px; color: var(--ink-dim); }
.nav a { color: var(--ink-mid); font-weight: 500; font-size: 14px; }
.nav a:hover { color: var(--ink); text-decoration: none; }

/* Page tabs (pages.js): one page at a time, pinned to the top, sideways scroll on phones */
.tabbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: saturate(160%) blur(12px);
  background: rgba(11, 15, 26, 0.9);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.tabbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabbar-inner::-webkit-scrollbar { display: none; }
.tabbar a {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 12px 12px 10px;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.tabbar a.is-active { color: var(--ink); border-bottom-color: var(--brand); }
.tabbar a.tg-btn { padding: 6px 12px; margin: 0 4px; border-bottom: 0; }
.view-off { display: none !important; }

/* Sections are pages now: no stacked-section dividers */
[data-view]:not(.hero):not(#search) { margin-top: 0; border-top: 0; padding-top: 32px; }
[data-view]:not(.hero):not(#search) > .container > .results-header:first-child { margin-top: 0; }
.view-subtabs { padding-top: 28px !important; }
.view-subtabs .subtabs { margin-bottom: 0; }
[data-view="directory"][data-subview] { padding-top: 20px; }

/* Sub-tabs inside a page */
.subtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 20px; padding: 2px 0; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button {
  flex: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink-mid);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.subtabs button:hover { color: var(--ink); }
.subtabs button.is-active { background: var(--brand); border-color: var(--brand); color: #0b1f12; }
.subtabs button.is-active .tab-n { background: rgba(11, 31, 18, 0.18); color: #0b1f12; }

/* Hero */
.hero {
  padding: 64px 0 32px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 16px;
  background: linear-gradient(180deg, #ffffff 0%, #b8c0d4 140%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: 17px;
  color: var(--ink-mid);
  max-width: 720px;
  margin: 0 0 32px;
}

/* Search */
.search-wrap {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.15s;
}
.search-bar:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}
.search-bar .icon {
  width: 20px; height: 20px;
  fill: var(--ink-dim);
  flex-shrink: 0;
}
.search-bar input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
}
.search-bar input::placeholder { color: var(--ink-dim); }
.clear-btn {
  background: transparent;
  border: 0;
  color: var(--ink-dim);
  font-size: 22px;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}
.clear-btn:hover { color: var(--ink); }

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.filter { display: flex; flex-direction: column; gap: 4px; }
.filter-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  font-weight: 600;
}
.filter select {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%237b87a5'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
.filter select:focus {
  outline: none;
  border-color: var(--brand);
}

/* Stats */
.stat-row {
  display: flex;
  gap: 32px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat strong {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  font-weight: 600;
}

/* Results */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 48px 0 20px;
}
.results-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.results-count {
  font-size: 13px;
  color: var(--ink-dim);
}
.results-count span {
  color: var(--ink);
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding-bottom: 64px;
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--regime-color, var(--brand));
  opacity: 0.8;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-title { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.card-sub { font-size: 12px; color: var(--ink-dim); margin-top: 2px; font-weight: 500; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.badge-deed { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.badge-lien { background: rgba(96, 165, 250, 0.15); color: #93c5fd; }
.badge-hybrid { background: rgba(167, 139, 250, 0.15); color: #c4b5fd; }
.badge-redeemable { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }

.fact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 13px;
}
.fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.fact-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  font-weight: 600;
}
.fact-value {
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
}

.card-note {
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.5;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}
.btn-primary, .btn-secondary {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn-primary {
  background: var(--brand);
  color: #0b1f12;
}
.btn-primary:hover { background: #4ade80; text-decoration: none; transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--ink-mid); background: var(--bg-2); text-decoration: none; }

/* Empty state */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-mid);
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--ink-dim);
}
.empty h3 { color: var(--ink); margin: 0 0 8px; font-size: 20px; }
.empty p { margin: 0 0 20px; }
.empty .btn-secondary { display: inline-flex; flex: none; padding: 10px 20px; }

/* Sections */
.section-alt, .section-alt-2 {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  margin-top: 32px;
}
.section-alt { background: rgba(255, 255, 255, 0.015); }
.section-alt-2 { background: rgba(255, 255, 255, 0.03); }
.section-alt h2, .section-alt-2 h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.section-lede {
  color: var(--ink-mid);
  max-width: 720px;
  margin: 0 0 32px;
}

/* Vendors */
.vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.vendor {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vendor:hover { border-color: var(--border-strong); transform: translateY(-1px); text-decoration: none; }
.vendor-name { font-weight: 700; font-size: 15px; color: var(--ink); }
.vendor-desc { font-size: 12px; color: var(--ink-mid); line-height: 1.5; }
.vendor-coverage { font-size: 11px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

/* Learn */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.learn-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.learn-card h3 { margin: 0 0 10px; font-size: 16px; font-weight: 700; color: var(--ink); }
.learn-card p { margin: 0; font-size: 13px; color: var(--ink-mid); line-height: 1.55; }

/* Map section */
.section-map {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  margin-top: 32px;
  background: rgba(255, 255, 255, 0.015);
}
.map-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.map-header h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.map-header .section-lede { margin: 0; }

.map-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}
.map-select {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 10px 32px 10px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%237b87a5'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.map-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-mid);
  cursor: pointer;
  user-select: none;
}
.map-toggle input { accent-color: var(--brand); }

/* Setup card (API key entry) */
.map-setup-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.map-setup-inner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.map-setup-icon {
  font-size: 32px;
  color: var(--brand);
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(34, 197, 94, 0.12);
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.map-setup-body h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.map-setup-body p { margin: 0 0 14px; color: var(--ink-mid); font-size: 14px; }
.map-setup-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.map-setup-row input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
}
.map-setup-row input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}
.map-setup-row .btn-primary { flex: 0 0 auto; }
.map-setup-help { font-size: 12px; color: var(--ink-dim); margin: 0; }
.linkish {
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  text-decoration: underline;
}
.linkish:hover { color: #93c5fd; }

/* Map canvas */
.map-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}
.map-canvas {
  width: 100%;
  height: 620px;
  background: var(--bg-2);
}
.map-legend {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(11, 15, 26, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--ink-mid);
  min-width: 160px;
  z-index: 1;
}
.legend-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  font-weight: 700;
  margin-bottom: 8px;
}
.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  color: var(--ink);
}
.legend-row.muted { color: var(--ink-mid); }
.legend-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}
.legend-reset {
  margin-top: 6px;
  font-size: 11px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(11, 15, 26, 0.9);
}
.dot-deed { background: var(--deed); }
.dot-lien { background: var(--lien); }
.dot-redeemable { background: var(--redeemable); }
.dot-hybrid { background: var(--hybrid); }
.dot-parcel { background: #ffffff; width: 8px; height: 8px; }

.map-disclaimer {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-dim);
  text-align: center;
}

/* Info window overrides (Google Maps injects white-background windows) */
.gm-style .gm-style-iw-c {
  background: var(--surface) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow) !important;
  padding: 0 !important;
}
.gm-style .gm-style-iw-d { overflow: hidden !important; }
.gm-style .gm-style-iw-tc::after { background: var(--surface) !important; }
.gm-ui-hover-effect > span { background-color: var(--ink-mid) !important; }

.iw {
  color: var(--ink);
  font-family: var(--sans);
  padding: 14px 16px 12px;
  min-width: 240px;
  max-width: 300px;
}
.iw h4 { margin: 0 0 4px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.iw .iw-sub { font-size: 12px; color: var(--ink-dim); margin-bottom: 10px; }
.iw .iw-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.iw .iw-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  font-size: 12px;
  border-top: 1px solid var(--border);
}
.iw .iw-row:first-of-type { border-top: 0; }
.iw .iw-row-label { color: var(--ink-dim); }
.iw .iw-row-value { color: var(--ink); font-weight: 600; }
.iw .iw-note { font-size: 12px; color: var(--ink-mid); margin: 8px 0; line-height: 1.45; }
.iw .iw-cta {
  display: inline-block;
  margin-top: 8px;
  background: var(--brand);
  color: #0b1f12;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
}
.iw .iw-cta:hover { background: #4ade80; }
.iw .iw-sample { font-size: 10px; color: var(--warn); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }

/* Calendar section */
.section-calendar {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  margin-top: 32px;
  background: rgba(255, 255, 255, 0.02);
}
.cal-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.cal-header h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.cal-header .section-lede { margin: 0; max-width: 620px; }
.cal-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cal-nav-btn {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.cal-nav-btn:hover { background: var(--surface-2); border-color: var(--ink-mid); }
.cal-nav-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  min-width: 180px;
  text-align: center;
}
.cal-today-btn {
  flex: 0 0 auto;
  padding: 8px 14px;
  font-size: 13px;
}
.cal-counts {
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-dim);
}
.cal-counts span { color: var(--ink); font-weight: 700; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cal-dow {
  background: var(--bg-2);
  padding: 10px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  font-weight: 700;
  text-align: left;
}
.cal-cell {
  background: var(--surface);
  min-height: 108px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  transition: background 0.15s;
}
.cal-cell.out-of-month {
  background: var(--bg-2);
  opacity: 0.55;
}
.cal-cell.today {
  background: rgba(34, 197, 94, 0.08);
  outline: 1px solid var(--brand);
  outline-offset: -1px;
}
.cal-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mid);
}
.cal-cell.today .cal-date {
  color: var(--brand);
  font-weight: 700;
}
.cal-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}
.cal-event {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--bg-2);
  border-left: 3px solid var(--regime-color, var(--brand));
  font-size: 11px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  width: 100%;
  font-family: inherit;
  transition: background 0.12s, transform 0.1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-event:hover {
  background: var(--surface-2);
  transform: translateX(1px);
}
.cal-event-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  font-weight: 500;
}
.cal-event-more {
  font-size: 10px;
  color: var(--ink-dim);
  padding: 2px 4px;
  font-weight: 600;
}

/* Agenda list (mobile + supplementary) */
.cal-agenda-block { margin-top: 32px; }
.cal-agenda-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.cal-agenda {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.agenda-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--regime-color, var(--brand));
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
  text-align: left;
  width: 100%;
  font-family: inherit;
  color: inherit;
}
.agenda-item:hover {
  border-color: var(--border-strong);
  transform: translateX(2px);
}
.agenda-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border-right: 1px solid var(--border);
  padding-right: 14px;
}
.agenda-date-mo {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  font-weight: 700;
}
.agenda-date-day {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.agenda-date-dow {
  font-size: 10px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.agenda-body .agenda-title-text {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 2px;
}
.agenda-body .agenda-meta {
  font-size: 12px;
  color: var(--ink-mid);
}
.agenda-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Event modal */
.event-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.event-modal[hidden] { display: none; }
.event-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 16, 0.72);
  backdrop-filter: blur(6px);
  cursor: pointer;
}
.event-modal-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  z-index: 1;
}
.event-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: var(--bg-2);
  color: var(--ink-mid);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.event-modal-close:hover { background: var(--surface-2); color: var(--ink); }

.evm-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.evm-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--ink);
}
.evm-sub {
  color: var(--ink-mid);
  font-size: 14px;
  margin-bottom: 20px;
}
.evm-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.evm-fact {
  background: var(--bg-2);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.evm-fact-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  font-weight: 600;
  margin-bottom: 2px;
}
.evm-fact-value { font-size: 13px; font-weight: 600; color: var(--ink); }
.evm-note {
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.55;
  margin: 0 0 18px;
  padding: 12px 14px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--regime-color, var(--brand));
}
.evm-actions {
  display: flex;
  gap: 8px;
}
.evm-actions .btn-primary { flex: 1; }

/* Live feed indicators */
.cal-live-status {
  margin-left: 12px;
  font-size: 12px;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.cal-live-status.is-active {
  color: var(--ink);
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}
.cal-live-status code {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink);
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: pulse-live 2s infinite;
}
.live-dot.dim {
  background: var(--ink-dim);
  animation: none;
  box-shadow: none;
}
@keyframes pulse-live {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.cal-event.is-live {
  background: rgba(34, 197, 94, 0.08);
}
.cal-event-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
  animation: pulse-live 2s infinite;
}
.agenda-item.is-live {
  background: linear-gradient(to right, rgba(34, 197, 94, 0.08), var(--surface) 40%);
}
.badge-live {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  font-size: 10px;
  letter-spacing: 0.1em;
  animation: badge-pulse 2.2s infinite;
}
@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.cal-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-mid);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* Responsive calendar */
@media (max-width: 768px) {
  .cal-grid { font-size: 11px; }
  .cal-cell { min-height: 72px; padding: 4px; }
  .cal-event { font-size: 10px; padding: 2px 4px; }
  .cal-nav-title { font-size: 16px; min-width: 140px; }
  .cal-counts { width: 100%; margin-left: 0; margin-top: 4px; }
  .evm-facts { grid-template-columns: 1fr; }
  .agenda-item { grid-template-columns: 56px 1fr; }
  .agenda-badges { grid-column: 2; justify-content: flex-start; margin-top: 4px; }
}

/* ===================== Advanced search ===================== */
[hidden] { display: none !important; }
a.brand { color: inherit; }
a.brand:hover { text-decoration: none; }
.muted { color: var(--ink-dim); }
.mono { font-family: var(--mono); font-size: 0.92em; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; color: var(--ink); }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(130px, 170px)) auto;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
}
.qs-main {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
}
.qs-main:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15); }
.qs-main .icon { width: 18px; height: 18px; fill: var(--ink-dim); flex-shrink: 0; }
.qs-main input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 12px 0;
}
.qs-main input::placeholder { color: var(--ink-dim); }
.quick-search select,
.f-input,
.map-select {
  background-color: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
}
.quick-search select {
  padding: 10px 30px 10px 12px;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%237b87a5'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.quick-search select:focus, .f-input:focus { outline: none; border-color: var(--brand); }
.qs-go { flex: 0 0 auto; padding: 12px 22px; font-size: 14px; }
.quick-search.has-county { grid-template-columns: minmax(200px, 1fr) repeat(4, minmax(120px, 165px)) auto; }
.f-county-sel { width: 100%; cursor: pointer; }
.f-county-sel optgroup { font-weight: 700; color: var(--ink-dim); }
.f-county-sel option { font-weight: 400; color: var(--ink); }

.qs-popular {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink-mid);
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--brand); color: var(--ink); }
.chip span { color: var(--ink-dim); font-size: 14px; line-height: 1; }
.chip-clear { border-style: dashed; }

.data-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink-mid);
}
.ds-msg { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.src-list { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: 4px; }
.src {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
}
.src::before { content: "●"; margin-right: 4px; }
.src-ok { color: #86efac; border-color: rgba(34, 197, 94, 0.35); }
.src-stale { color: #fcd34d; border-color: rgba(245, 158, 11, 0.4); }
.src-off { color: var(--ink-dim); }

.section-search {
  padding: 48px 0 64px;
  border-top: 1px solid var(--border);
  margin-top: 32px;
}
.search-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.search-head h2, .results-header h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.search-head .section-lede, .results-header .section-lede { margin: 0; }
.filters-toggle { display: none; flex: 0 0 auto; padding: 8px 14px; }

.search-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* Filter sidebar */
.filters {
  position: sticky;
  top: 60px;
  max-height: calc(100vh - 76px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  scrollbar-width: thin;
}
.f-group { padding: 12px 0; border-bottom: 1px solid var(--border); }
.f-group:first-child { padding-top: 0; }
.f-group[hidden] { display: none; }
.f-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  font-weight: 700;
  margin-bottom: 8px;
}
.f-label .linkish { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }
.f-input { width: 100%; padding: 9px 11px; }
.f-input::placeholder { color: var(--ink-dim); }
.f-input[type="date"] { color-scheme: dark; }
.f-help { font-size: 11px; color: var(--ink-dim); margin: 6px 0 0; line-height: 1.45; }
.f-radios { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.f-radio, .f-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
  padding: 4px 2px;
  cursor: pointer;
  border-radius: 6px;
}
.f-radio:hover, .f-check:hover { background: var(--bg-2); }
.f-radio input, .f-check input { accent-color: var(--brand); margin: 0; flex-shrink: 0; }
.f-check-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-count { font-size: 11px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.f-check.is-empty { opacity: 0.45; }
.f-swatch { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.f-scroll { max-height: 230px; overflow-y: auto; margin-top: 8px; padding-right: 4px; scrollbar-width: thin; }
.f-range { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--ink-dim); }
.f-range .f-input { min-width: 0; }
.f-reset { width: 100%; margin-top: 14px; }

/* Results */
.r-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-strong);
  margin-bottom: 14px;
  overflow-x: auto;
}
.r-tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ink-mid);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: -1px;
}
.r-tabs button:hover { color: var(--ink); }
.r-tabs button.is-active { color: var(--ink); border-bottom-color: var(--brand); }
.tab-n {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-mid);
  font-variant-numeric: tabular-nums;
}
.r-tabs button.is-active .tab-n { background: rgba(34, 197, 94, 0.18); color: #86efac; }

.r-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.r-summary { font-size: 13px; color: var(--ink-mid); }
.r-summary strong { color: var(--ink); }
.r-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; max-width: 100%; }
.r-tools .map-select { padding: 7px 30px 7px 10px; font-size: 13px; }
.r-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; min-height: 0; }
.r-chips:empty { display: none; }

.r-list { display: flex; flex-direction: column; gap: 10px; }
.r-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--regime-color, var(--brand));
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: border-color 0.15s, background 0.15s;
}
.r-card:hover { border-color: var(--border-strong); border-left-color: var(--regime-color, var(--brand)); background: #1a2140; }
.r-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.r-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.r-badges .badge { font-size: 10px; padding: 3px 8px; }
.r-state { font-size: 12px; color: var(--ink-dim); font-weight: 600; white-space: nowrap; }
.r-title { margin: 0 0 3px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.r-title a { color: var(--ink); }
.r-title a:hover { color: #86efac; text-decoration: none; }
.r-sub { font-size: 12px; color: var(--ink-mid); line-height: 1.5; }
.r-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 10px 0 12px;
}
.r-facts div { display: flex; flex-direction: column; gap: 1px; }
.r-facts dt { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); font-weight: 700; }
.r-facts dd { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.r-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-sm { flex: 0 0 auto !important; padding: 7px 12px !important; font-size: 12px !important; }
.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-mid);
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn-ghost:hover { color: var(--ink); background: var(--bg-2); }
.btn-secondary:disabled { opacity: 0.6; cursor: progress; }

.r-parcel { display: flex; justify-content: space-between; gap: 16px; }
.r-parcel-main { min-width: 0; flex: 1; }
.r-parcel-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
  flex-shrink: 0;
}
.r-bid-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); font-weight: 700; }
.r-bid { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: #86efac; font-variant-numeric: tabular-nums; }
.r-parcel-side .btn-sm { margin-top: 6px; }
.r-legal {
  font-size: 11px;
  color: var(--ink-dim);
  margin: 6px 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.r-portal { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.r-portal .r-badges { margin-bottom: 6px; }

.r-empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--ink-mid);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.r-empty h3 { color: var(--ink); margin: 0 0 6px; }
.r-empty p { margin: 0 auto 16px; max-width: 460px; font-size: 14px; }
.r-empty .btn-secondary { display: inline-flex; flex: none; padding: 9px 18px; }

.r-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.pg {
  min-width: 36px;
  padding: 7px 11px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink-mid);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.pg:hover { color: var(--ink); border-color: var(--ink-mid); }
.pg.is-active { background: var(--brand); border-color: var(--brand); color: #0b1f12; font-weight: 700; }
.pg-gap { color: var(--ink-dim); padding: 7px 2px; }

/* Status pills + extra badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-open { background: rgba(34, 197, 94, 0.2); color: #86efac; border-color: rgba(34, 197, 94, 0.4); animation: badge-pulse 2.2s infinite; }
.status-registration { background: rgba(96, 165, 250, 0.15); color: #93c5fd; border-color: rgba(96, 165, 250, 0.35); }
.status-upcoming { background: var(--surface-2); color: var(--ink-mid); }
.status-closed { background: transparent; color: var(--ink-dim); border-color: var(--border-strong); }
.status-cancelled { background: rgba(239, 68, 68, 0.14); color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); }
.badge-platform { background: var(--surface-2); color: var(--ink); border: 1px solid var(--border-strong); }
.badge-est { background: rgba(245, 158, 11, 0.12); color: #fcd34d; border: 1px dashed rgba(245, 158, 11, 0.45); }
.badge-taxfc { background: rgba(45, 212, 191, 0.15); color: #5eead4; }
.badge-fc { background: rgba(248, 113, 113, 0.15); color: #fca5a5; }
.badge-surplus { background: rgba(250, 204, 21, 0.14); color: #fde047; }
.badge-other { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }
.evm-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.evm-badges .evm-badge { margin-bottom: 0; }
.evm-actions { flex-wrap: wrap; }
.evm-actions .btn-secondary { flex: 0 0 auto; padding: 10px 14px; }

/* Calendar tweaks */
.cal-event.is-est { opacity: 0.75; border-left-style: dashed; }
button.cal-event-more { background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left; }
button.cal-event-more:hover { color: var(--ink); }

/* Directory */
.dir-controls { margin-bottom: 20px; }
#directory .results-header { margin-top: 0; align-items: flex-end; }

/* Bid-to-value highlight */
.ratio-good { color: #86efac; }
.ratio-ok { color: #fcd34d; }

/* Map additions */
.map-key-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fecaca;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.map-key-error ol { margin: 6px 0; padding-left: 20px; }
.map-steps {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 4px 0 10px;
  font-size: 13px;
  color: var(--ink-mid);
}
.map-steps summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.map-steps ol { margin: 10px 0 2px; padding-left: 20px; line-height: 1.6; }
.map-steps li { margin-bottom: 4px; }
.dot-cluster { background: #14532d; box-shadow: 0 0 0 2px #22c55e; }
.map-controls { flex-wrap: wrap; }
button.iw-cta { border: 0; cursor: pointer; font-family: inherit; }
.iw .iw-link { display: inline-block; margin: 8px 0 0 10px; font-size: 12px; }

/* Vendor warning */
.vendor-warning {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.55;
}
.vendor-warning strong { color: #fecaca; display: block; margin-bottom: 4px; }

/* Platform website down */
.r-down {
  margin: 6px 0 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fecaca;
  font-size: 12px;
  line-height: 1.45;
}
.src-down { color: #fca5a5; border-color: rgba(239, 68, 68, 0.5); }

/* Federal badge */
.badge-federal { background: rgba(56, 189, 248, 0.15); color: #7dd3fc; }
.badge-landbank { background: rgba(163, 230, 53, 0.14); color: #bef264; }
.badge-direct { background: rgba(45, 212, 191, 0.12); color: #5eead4; border: 1px solid rgba(45, 212, 191, 0.3); }
.badge-land { background: rgba(132, 204, 22, 0.1); color: #d9f99d; border: 1px dashed rgba(163, 230, 53, 0.4); }
.badge-bldg { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; }

/* Land bank cards + county land bank line */
.r-landbank .rc-actions { justify-content: flex-end; }
.rc-lb { margin-top: 6px; font-size: 13px; color: var(--ink-mid); line-height: 1.5; }
.rc-lb-label { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: #bef264; margin-right: 4px; }
.rc-lb .linkish { font-size: 13px; }

/* Alerts */
.nav-alerts { position: relative; }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 5px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; vertical-align: middle; }
.section-alerts { padding: 56px 0; border-top: 1px solid var(--border); margin-top: 32px; background: rgba(96, 165, 250, 0.025); }
.section-alerts h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; }
.section-alerts .results-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.al-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.al-status { font-size: 13px; color: var(--ink-mid); margin: -16px 0 18px; }
.al-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.al-h { font-size: 15px; margin: 0 0 10px; }
.al-inbox-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.al-inbox-tools { display: flex; gap: 14px; font-size: 12px; }
.al-card { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; min-width: 0; }
.al-card.is-off { opacity: 0.6; border-left-color: var(--border-strong); }
.al-card h4 { margin: 0 0 3px; font-size: 14px; overflow-wrap: anywhere; }
.al-card-main { min-width: 0; }
.al-card-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.al-switch { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-mid); cursor: pointer; }
.al-note { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; }
.al-note.is-unread { border-color: rgba(96, 165, 250, 0.5); background: rgba(96, 165, 250, 0.06); cursor: pointer; }
.al-note.is-reminder.is-unread { border-color: rgba(245, 158, 11, 0.5); background: rgba(245, 158, 11, 0.06); }
.al-note.is-focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.al-note-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.al-when { margin-left: auto; font-size: 12px; }
.al-items { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.al-items .muted { font-size: 12px; }
.al-note-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; font-size: 12px; }
.al-empty { padding: 18px; }
.al-ideas { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.al-how { margin-top: 18px; font-size: 13px; color: var(--ink-mid); }
.al-how summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.al-how ol { line-height: 1.6; padding-left: 20px; }
.al-what { margin-bottom: 12px; }
.al-what-line { font-size: 13px; color: var(--ink-mid); margin-bottom: 6px; }
.chip-static { cursor: default; }
.al-channels, .al-email { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px 10px; margin: 10px 0; min-width: 0; }
.al-channels legend, .al-email legend { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); font-weight: 700; padding: 0 4px; }
.al-email legend .f-check { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink); }
.al-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; font-size: 12px; }
.al-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.al-grid .dl-field input, .al-grid .dl-field select, .al-remind select { width: 100%; }
#alert-modal .dl-field input, #als-form > .dl-field select { width: 100%; }

@media (max-width: 860px) {
  .al-layout { grid-template-columns: minmax(0, 1fr); }
  .al-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .al-card { flex-direction: column; align-items: flex-start; }
  .al-card-actions { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .al-grid { grid-template-columns: minmax(0, 1fr); }
  .section-alerts { padding: 40px 0; }
}

/* Past auction results (calendar + event modal) */
.cal-event.has-res { flex-direction: column; align-items: flex-start; gap: 0; opacity: 0.92; }
.cal-res { display: block; font-size: 9px; font-weight: 700; color: #86efac; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal-month-results { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; background: rgba(34, 197, 94, 0.06); border: 1px solid rgba(34, 197, 94, 0.3); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 12px; font-size: 13px; color: var(--ink-mid); }
.cal-month-results strong { color: var(--ink); }
.cal-mr-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; color: #86efac; }
.cal-agenda-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.agenda-item.is-result { border-left-color: #22c55e; }
.evm-results { margin: 14px 0; padding: 14px; border: 1px solid rgba(34, 197, 94, 0.3); border-radius: var(--radius-sm); background: rgba(34, 197, 94, 0.04); }
.evm-results h4 { margin: 0 0 10px; font-size: 15px; }
.res-headline { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-mid); margin-bottom: 8px; }
.res-headline strong { color: var(--ink); font-size: 18px; }
.res-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--bg-2); gap: 2px; }
.res-seg { display: block; min-width: 4px; }
.res-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 4px; font-size: 12px; color: var(--ink-mid); }
.res-key i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.res-buyers { font-size: 12px; margin-bottom: 8px; }
.res-table-wrap { max-height: 380px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 6px 0 8px; }
.res-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.res-table th { position: sticky; top: 0; background: var(--bg-2); text-align: left; padding: 7px 9px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-dim); }
.res-table td { padding: 7px 9px; border-top: 1px solid var(--border); color: var(--ink-mid); vertical-align: top; }
.res-table td strong { color: var(--ink); }
.res-table tr.res-more { display: none; }
.res-table.show-all tr.res-more { display: table-row; }
.res-table .muted { font-size: 11px; }
.evm-results .linkish { margin-right: 14px; font-size: 12px; }
.res-note { font-size: 11px; margin: 8px 0 0; }

/* Sniper (paid alerts) */
.sn-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; color: #fbbf24; margin-bottom: 6px; }
.sn-steps { list-style: none; counter-reset: sn; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; padding: 0; }
.sn-steps li { counter-increment: sn; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 12px 12px 44px; position: relative; font-size: 12px; color: var(--ink-mid); line-height: 1.45; }
.sn-steps li::before { content: counter(sn); position: absolute; left: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #0b1220; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.sn-steps strong { display: block; color: var(--ink); font-size: 13px; margin-bottom: 2px; }
.sn-plan-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sn-plan { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sn-plan.is-featured { border-color: rgba(251, 191, 36, 0.45); }
.sn-plan.is-current { outline: 2px solid var(--accent); outline-offset: -1px; }
.sn-plan h4 { margin: 0; font-size: 15px; }
.sn-plan .muted { font-size: 12px; margin: 0; }
.sn-plan ul { list-style: none; margin: 4px 0 8px; padding: 0; font-size: 12px; color: var(--ink); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sn-plan li.is-no { color: var(--ink-dim); text-decoration: line-through; }
.sn-plan .btn-sm { align-self: flex-start; }
.sn-price { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.sn-price small { font-size: 12px; font-weight: 500; color: var(--ink-dim); margin-left: 2px; }
.sn-plan-flag { position: absolute; top: -9px; right: 12px; background: #fbbf24; color: #1f1300; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 999px; }
.sn-current { font-size: 12px; font-weight: 700; color: var(--accent); }
.sn-plan-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12px; color: var(--ink-mid); margin: 10px 0 18px; }
.sn-lock { color: #fbbf24; font-size: 12px; }
.sn-builder { background: var(--surface); border: 1px solid rgba(251, 191, 36, 0.35); border-radius: var(--radius); padding: 16px; margin: 0 0 18px; }
.snb-head .f-help { margin: 0 0 12px; }
.snb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.snb-col { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.snb-states { max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 8px; }
.snb-states label[hidden] { display: none; }
.snb-types { display: flex; flex-direction: column; }
.snb-col .dl-field input, .snb-col .dl-field select { width: 100%; }
.snb-col .btn-primary { align-self: flex-start; margin-top: 4px; }
.snipe-btn.is-on { color: #fbbf24; border-color: rgba(251, 191, 36, 0.5); }
.al-card.al-watch { border-left-color: #fbbf24; }
.al-target { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 4px; }
@media (max-width: 860px) {
  .snb-grid { grid-template-columns: minmax(0, 1fr); }
}
.sn-lock-row { margin: 0 0 6px; }
fieldset.is-locked > :not(legend):not(.sn-lock-row) { opacity: 0.45; }

@media (max-width: 860px) {
  .sn-steps, .sn-plan-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .sn-steps, .sn-plan-row { grid-template-columns: minmax(0, 1fr); }
}

/* Research a property */
.section-research { padding: 64px 0; border-top: 1px solid var(--border); margin-top: 32px; background: rgba(163, 230, 53, 0.02); }
.section-research h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; }
.rs-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 20px; }
.rs-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rs-field .map-select, .rs-field .f-input { width: 100%; min-width: 0; }
.rs-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rs-head h3 { margin: 0 0 4px; font-size: 20px; }
.rs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rs-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-width: 0; }
.rs-card-wide { grid-column: span 3; }
.rs-card h4 { margin: 0 0 10px; font-size: 15px; }
.rs-links { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.rs-links li { line-height: 1.4; }
.rs-note { font-size: 12px; line-height: 1.5; color: var(--ink-mid); margin: 8px 0 0; }
.rs-stats .dl-row span { color: var(--ink-mid); }
.rs-ref { font-weight: 500; font-size: 11px; color: var(--ink-dim); margin-left: 6px; }
.rs-comp { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
.rs-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.rs-checklist { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-mid); line-height: 1.5; }
.rs-checklist strong { color: var(--ink); }
#rs-value .dl-col { margin-top: 10px; }

@media (max-width: 1000px) {
  .rs-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rs-form .rs-wide { grid-column: 1 / -1; }
  .rs-grid { grid-template-columns: minmax(0, 1fr); }
  .rs-card-wide { grid-column: auto; }
}
@media (max-width: 640px) {
  .rs-form { grid-template-columns: minmax(0, 1fr); }
  .section-research { padding: 40px 0; }
}

/* Crime context */
.r-crime {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  font-size: 12px;
  color: var(--ink-mid);
  margin: 6px 0 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.r-crime strong { color: var(--ink); }
.crime-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-dim); flex-shrink: 0; }
.crime-low .crime-dot { background: #22c55e; }
.crime-mid .crime-dot { background: #f59e0b; }
.crime-high .crime-dot { background: #ef4444; }
.crime-low.r-crime { border-color: rgba(34, 197, 94, 0.3); }
.crime-high.r-crime { border-color: rgba(239, 68, 68, 0.35); }
.crime-high-text { color: #fca5a5; }
.r-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12px; }
.r-links .linkish { font-size: 12px; }
.r-parcel-side .btn-secondary.btn-sm { margin-top: 4px; }

/* Safety ranking cards */
.r-area { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; border-left-width: 3px; }
.r-area.crime-low { border-left-color: #22c55e; }
.r-area.crime-mid { border-left-color: #f59e0b; }
.r-area.crime-high { border-left-color: #ef4444; }
.ar-rank { text-align: center; }
.ar-rank span { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.ar-rank small { color: var(--ink-dim); font-size: 11px; }
.ar-bars { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 6px; max-width: 460px; }
.ar-bar { display: grid; grid-template-columns: 96px minmax(0, 1fr) 54px; gap: 8px; align-items: center; font-size: 11px; color: var(--ink-mid); }
.ar-track { height: 8px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.ar-fill { display: block; height: 100%; border-radius: 999px; background: var(--ink-dim); }
.ar-fill.crime-low { background: #22c55e; }
.ar-fill.crime-mid { background: #f59e0b; }
.ar-fill.crime-high { background: #ef4444; }
.ar-fill.state { background: #64748b; }
.ar-fill.us { background: #475569; }
.ar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.ar-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.ar-count { font-size: 22px; font-weight: 800; color: var(--ink); }

/* Every-county directory */
.r-county { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; border-left-width: 3px; }
.r-county.rc-sales { border-left-color: #22c55e; }
.r-county.rc-site { border-left-color: #60a5fa; }
.r-county.rc-none { border-left-color: var(--border-strong); }
.rc-state { color: var(--ink-dim); font-weight: 600; }
.rc-next { margin-top: 8px; font-size: 13px; color: var(--ink-mid); line-height: 1.5; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.rc-next.muted { display: block; color: var(--ink-dim); }
.rc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.rc-counts { display: flex; gap: 14px; font-size: 12px; color: var(--ink-dim); }
.rc-counts strong { display: block; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.rc-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 360px; }
.cov-bar { display: flex; gap: 4px; margin-bottom: 12px; min-width: 0; }
.cov-seg { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; font: inherit; font-size: 12px; color: var(--ink-mid); text-align: left; cursor: pointer; background: var(--surface); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cov-seg strong { color: var(--ink); font-size: 14px; }
.cov-seg.cov-sales { border-color: rgba(34, 197, 94, 0.45); background: rgba(34, 197, 94, 0.08); }
.cov-seg.cov-site { border-color: rgba(96, 165, 250, 0.45); background: rgba(96, 165, 250, 0.08); }
.cov-seg.is-active { outline: 2px solid var(--accent); outline-offset: 1px; }

@media (max-width: 860px) {
  .r-county { grid-template-columns: minmax(0, 1fr); }
  .rc-side { align-items: flex-start; text-align: left; }
  .rc-actions { justify-content: flex-start; max-width: none; }
  .cov-bar { flex-direction: column; }
  .cov-seg { flex: none !important; white-space: normal; }
}

/* Pre-foreclosure section */
.pd-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: start; }
.pd-select { width: 100%; margin-bottom: 12px; }
.pd-card { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 18px; }
.pd-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.pd-head h3 { margin: 0; font-size: 20px; }
.pd-facts { display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; }
.pd-facts dt { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); font-weight: 700; }
.pd-facts dd { margin: 2px 0 0; font-size: 14px; color: var(--ink); line-height: 1.45; }
.pd-county { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pd-county label { font-size: 12px; color: var(--ink-dim); font-weight: 600; }
.pd-county .f-input, .pd-county .map-select { max-width: 280px; min-width: 0; flex: 1 1 auto; }
.pd-table-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.pd-table-head h3 { margin: 0; font-size: 16px; }
.pd-table-wrap { max-height: 560px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pd-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pd-table th { position: sticky; top: 0; background: var(--bg-2); text-align: left; padding: 8px 10px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-dim); }
.pd-table td { padding: 8px 10px; border-top: 1px solid var(--border); color: var(--ink-mid); vertical-align: top; }
.pd-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.pd-intro { margin: 0 0 16px; max-width: 820px; }

/* Pre-foreclosure page (foreclosure.js) */
.section-pf h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; }
.pf-h { font-size: 18px; margin: 28px 0 6px; }
.pf-h:first-child { margin-top: 0; }
.pf-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.pf-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-card strong { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.pf-card span { font-size: 13px; color: var(--ink); font-weight: 600; }
.pf-card small { font-size: 12px; color: var(--ink-dim); line-height: 1.4; }
.pf-why { font-size: 13px; color: var(--ink-mid); line-height: 1.55; margin: 0 0 12px; max-width: 900px; }
.pf-statechips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pf-statechips .chip.is-active { border-color: var(--brand); color: var(--ink); background: rgba(34, 197, 94, 0.12); }
.pf-form { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.5fr); gap: 10px; align-items: end; margin-bottom: 12px; }
.pf-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pf-when { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg-2); color: var(--ink-mid); border: 1px solid var(--border); }
.pf-when.pf-near { color: #fcd34d; border-color: rgba(245, 158, 11, 0.45); }
.pf-when.pf-soon { color: #fca5a5; border-color: rgba(239, 68, 68, 0.5); background: rgba(239, 68, 68, 0.08); }
.pf-note { font-size: 12px; color: var(--ink-mid); background: var(--bg-2); border-left: 3px solid var(--warn); border-radius: 4px; padding: 6px 10px; margin: 6px 0; line-height: 1.45; }
.pf-list-link { font-size: 12px; margin-top: 4px; }
.pf-more { text-align: center; margin: 12px 0 4px; }
.pf-block { margin-top: 26px; }
.pf-days-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pf-day { display: flex; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid #f87171; border-radius: var(--radius-sm); padding: 10px 12px; min-width: 0; }
.pf-day-main { min-width: 0; }
.pf-day-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: none; }
.pf-table-wrap { max-height: none; margin-top: 10px; }
.pf-cmp th small { display: block; font-size: 10px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-dim); margin-top: 2px; }
.pf-cmp thead th { color: var(--ink); font-size: 11px; }
.pf-cmp tbody th { text-align: left; padding: 10px; border-top: 1px solid var(--border); color: var(--ink); font-size: 12px; vertical-align: top; white-space: nowrap; background: var(--bg-2); position: sticky; left: 0; }
.pf-cmp td { min-width: 200px; line-height: 1.5; }
.pf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 10px; }
.pf-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; min-width: 0; }
.pf-stat h4 { margin: 0 0 2px; font-size: 15px; }
.pf-stat .r-sub { margin-bottom: 8px; }
.pf-stat .dl-row small, .pf-side .dl-row small { color: var(--ink-dim); font-size: 11px; }
.pf-table td { white-space: nowrap; }
.pf-cmp-pick { display: inline-flex; flex-direction: column; gap: 4px; margin: 6px 0 12px; min-width: 220px; }
.pf-sbs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.pf-side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.pf-side h4 { margin: 0 0 8px; font-size: 16px; }
.pf-side .dl-row { align-items: flex-start; }
.pf-side .dl-row span { flex: none; width: 38%; }
.pf-side .dl-row strong { text-align: right; font-weight: 600; font-size: 13px; line-height: 1.45; }
.pf-side .r-actions { margin-top: 12px; }
.pf-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.pf-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.pf-step h4 { margin: 0 0 6px; font-size: 15px; }
.pf-step p { margin: 0; font-size: 13px; color: var(--ink-mid); line-height: 1.55; }
.pf-step strong { color: var(--ink); }
@media (max-width: 1000px) {
  .pf-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pf-steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .pf-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pf-days-grid, .pf-sbs { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .pf-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pf-form .pf-q { grid-column: 1 / -1; }
  .pf-steps { grid-template-columns: minmax(0, 1fr); }
  .pf-card strong { font-size: 20px; }
  .section-pf h2 { font-size: 22px; }
  .pf-cmp td { min-width: 190px; }
  .pf-cmp tbody th { white-space: normal; width: 84px; min-width: 84px; padding: 10px 8px; }
  .pf-side .dl-row { flex-direction: column; gap: 2px; }
  .pf-side .dl-row span { width: auto; }
  .pf-side .dl-row strong { text-align: left; }
}

/* Deal analyzer */
.deal-card { max-width: 860px; }
.dl-tabs { display: inline-flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; margin: 4px 0 14px; }
.dl-tabs button { background: none; border: 0; color: var(--ink-mid); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.dl-tabs button.is-active { background: var(--brand); color: #0b1f12; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.dl-grid fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin: 0; min-width: 0; }
.dl-grid legend { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); font-weight: 700; padding: 0 4px; }
.dl-field { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; font-size: 12px; color: var(--ink-mid); }
.dl-field input { background: var(--bg-2); border: 1px solid var(--border); color: var(--ink); border-radius: 6px; padding: 7px 9px; font: inherit; font-size: 14px; width: 100%; }
.dl-field input:focus { outline: none; border-color: var(--brand); }
.dl-verdict { margin: 16px 0 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border-strong); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.dl-verdict.good { border-color: rgba(34, 197, 94, 0.45); background: rgba(34, 197, 94, 0.08); }
.dl-verdict.ok { border-color: rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.07); }
.dl-verdict.bad { border-color: rgba(239, 68, 68, 0.45); background: rgba(239, 68, 68, 0.07); }
.dl-big { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.dl-verdict-text { font-size: 13px; color: var(--ink-mid); }
.dl-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 12px; }
.dl-col { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.dl-col-title { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); font-weight: 700; margin-bottom: 6px; }
.dl-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0; border-top: 1px solid var(--border); color: var(--ink-mid); }
.dl-row:first-of-type { border-top: 0; }
.dl-row strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.dl-row.dl-total strong { font-size: 15px; }
.dl-row.dl-good strong { color: #86efac; }
.dl-help { font-size: 12px; color: var(--ink-dim); line-height: 1.5; margin: 10px 0 0; }
.dl-note { font-size: 12px; align-self: center; }

/* Settings + status bar */
.settings-steps { font-size: 13px; color: var(--ink-mid); line-height: 1.6; padding-left: 20px; margin: 0 0 14px; }
.ds-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

@media (max-width: 860px) {
  .pd-layout { grid-template-columns: minmax(0, 1fr); }
  .r-area { grid-template-columns: 48px minmax(0, 1fr); }
  .ar-side { grid-column: 1 / -1; align-items: flex-start; text-align: left; }
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 200;
}
.toast[hidden] { display: none; }

@media (max-width: 1000px) {
  .quick-search, .quick-search.has-county { grid-template-columns: 1fr 1fr 1fr; }
  .quick-search.has-county { grid-template-columns: 1fr 1fr; }
  .qs-main { grid-column: 1 / -1; }
  .qs-go { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .search-layout { grid-template-columns: minmax(0, 1fr); }
  .filters-toggle { display: inline-flex; }
  .filters { display: none; position: static; max-height: none; }
  .filters.is-open { display: block; }
  .r-parcel { flex-direction: column; }
  .r-parcel-side { align-items: flex-start; text-align: left; }
}
@media (max-width: 640px) {
  .quick-search, .quick-search.has-county { grid-template-columns: minmax(0, 1fr); }
  .cal-dow { padding: 8px 4px; font-size: 9px; letter-spacing: 0.02em; }
  .cal-cell { padding: 3px; min-height: 64px; }
  .cal-event { padding: 2px 3px; font-size: 9px; border-left-width: 2px; }
  .cal-event-live { display: none; }
  .cal-controls .map-select { flex: 1 1 140px; }
  .map-setup-card { padding: 18px; }
  .map-setup-inner { flex-direction: column; gap: 12px; }
  .map-setup-row { flex-wrap: wrap; }
  .map-setup-row input { min-width: 0; flex-basis: 100%; }
  .r-portal { flex-direction: column; align-items: flex-start; }
  .r-toolbar { flex-direction: column; align-items: flex-start; }
  .search-head h2 { font-size: 22px; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  color: var(--ink-mid);
  font-size: 13px;
}
.site-footer p { margin: 0 0 10px; max-width: 900px; }
.footer-meta { font-size: 12px; color: var(--ink-dim); }

/* Responsive */
@media (max-width: 640px) {
  .hero { padding: 40px 0 24px; }
  .filter-row { grid-template-columns: 1fr; }
  .stat-row { gap: 20px; }
  .stat strong { font-size: 22px; }
  .header-inner { padding: 10px 16px; }
  .brand-sub { display: none; }
  .tabbar-inner { padding: 0 6px; }
  .tabbar a { padding: 11px 10px 9px; font-size: 13px; }
  [data-view]:not(.hero):not(#search) { padding-top: 22px; }
  .container { padding: 0 16px; }
  .fact-row { grid-template-columns: 1fr; }
}
