:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --ink: #0f172a;
  --ink-secondary: #334155;
  --ink-muted: #64748b;
  --navy: #14284b;
  --navy-hover: #0d1c36;
  --accent-blue: #1d4ed8;
  --accent-soft: #eff6ff;
  --emerald: #047857;
  --emerald-bg: #ecfdf5;
  --emerald-border: #a7f3d0;
  --gold: #92400e;
  --gold-bg: #fffbeb;
  --gold-border: #fde68a;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: 16px;
}

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

a:hover {
  text-decoration: underline;
}

button, input, select, textarea {
  font: inherit;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none !important;
  min-width: 0;
}

.brand-flag-wrap {
  width: 50px;
  height: 34px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.state-flag-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.header-state-select {
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--surface-subtle);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  max-width: 215px;
}

.state-grid-flag {
  width: 30px;
  height: 20px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
}

.brand-title {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  display: block;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-weight: 500;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.nav-link {
  color: var(--ink-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--navy);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
  text-decoration: none !important;
  line-height: 1.25;
}

.btn-primary {
  background: var(--navy);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--navy-hover);
  color: #ffffff;
}

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--surface-subtle);
}

.btn-urgent {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.btn-urgent:hover {
  background: #dbeafe;
}

.btn-emerald {
  background: var(--emerald);
  color: #ffffff;
}

.btn-emerald:hover {
  background: #065f46;
  color: #ffffff;
}

/* Hero & Search Console */
.hero-section {
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
  padding: 28px 0 22px;
  border-bottom: 1px solid var(--border);
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 20px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.hero-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink);
}

.hero-copy p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 1.02rem;
}

.hero-metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.metric-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  min-width: 132px;
  box-shadow: var(--shadow-sm);
}

.metric-chip strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
}

.metric-chip span {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 500;
}

/* Search Card */
.search-console {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
}

.mode-tab {
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink-secondary);
}

.mode-tab strong {
  font-size: 0.98rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-tab span {
  font-size: 0.81rem;
  color: var(--ink-muted);
}

.mode-tab.active {
  background: var(--surface);
  border-bottom-color: var(--navy);
}

.search-body {
  padding: 18px 20px;
}

.search-grid {
  display: grid;
  grid-template-columns: 1.25fr 1.15fr 0.95fr auto;
  gap: 12px;
  align-items: end;
}

.search-grid:has(#specialty-field-wrap[hidden]) {
  grid-template-columns: 1fr 1.45fr auto;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

.input-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--ink);
}

.input-control:focus {
  outline: 2px solid #93c5fd;
  border-color: var(--accent-blue);
}

/* Disambiguation Banner */
.disambig-alert {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.disambig-alert[hidden] {
  display: none;
}

/* Specialty Chips & Live Toggle */
.filter-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.chip-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-chip:hover {
  background: var(--surface-subtle);
}

.filter-chip.active {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.duty-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--emerald-border);
  background: var(--emerald-bg);
  color: var(--emerald);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.duty-toggle input {
  accent-color: var(--emerald);
  width: 15px;
  height: 15px;
  margin: 0;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
  display: inline-block;
}

/* Main Content Layout */
.workspace-section {
  padding: 24px 0 32px;
}

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

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.results-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.results-meta {
  font-size: 0.88rem;
  color: var(--ink-muted);
}

/* Notary Pro Cards */
.cards-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.notary-card.featured {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-strong);
  color: var(--navy);
  font-weight: 800;
  font-size: 1.02rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.identity-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.notary-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notary-name {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--ink);
}

.badge-spotlight {
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid var(--gold-border);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.badge-verified {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.business-sub {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  font-weight: 600;
  margin-top: 2px;
}

.commission-line {
  font-size: 0.81rem;
  color: var(--ink-muted);
  margin-top: 3px;
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.availability-pill.live {
  background: var(--emerald-bg);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
}

.availability-pill.scheduled {
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  border: 1px solid var(--border);
}

.notary-bio {
  margin: 12px 0 10px;
  font-size: 0.94rem;
  color: var(--ink-secondary);
}

.tag-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.spec-tag {
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.earned-tag {
  background: #f0fdf4;
  color: #166534;
  font-size: 0.77rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid #bbf7d0;
}

.fee-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.85rem;
  color: var(--ink-secondary);
  margin-bottom: 12px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.coverage-text {
  font-size: 0.82rem;
  color: var(--ink-muted);
  max-width: 440px;
}

.cta-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* FOIA Lookup Table / Cards */
.foia-explainer {
  background: #f8fafc;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.foia-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.status-pill.active {
  background: var(--emerald-bg);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
}

.status-pill.expiring {
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid var(--gold-border);
}

.status-pill.expired {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Right Utility Rail & Tasteful Weekly Ad Spot */
.utility-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 84px;
}

.rail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.rail-card h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 800;
}

.rail-card p {
  margin: 0 0 12px;
  font-size: 0.89rem;
  color: var(--ink-secondary);
}

/* Clean, Non-Overwhelming Weekly Promo Ad Card */
.weekly-ad-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  position: relative;
}

.weekly-ad-card.inline-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: #fcfdff;
}

.ad-kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.ad-kicker {
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.ad-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--surface-subtle);
  padding: 2px 8px;
  border-radius: 999px;
}

.ad-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.ad-summary {
  margin: 0 0 10px;
  font-size: 0.87rem;
  color: var(--ink-secondary);
}

.ad-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ad-bullets li {
  font-size: 0.82rem;
  color: var(--ink-secondary);
  padding-left: 18px;
  position: relative;
}

.ad-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--emerald);
  font-weight: 800;
}

.ad-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ad-price-note {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 600;
}

/* 133 Localities Directory Browser */
.localities-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 0.94rem;
}

.locality-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 8px;
}

.locality-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none !important;
}

.locality-link:hover {
  border-color: var(--navy);
  background: #ffffff;
}

.loc-type {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Pricing / Claim Section */
.pricing-section {
  padding: 34px 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.tier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.tier-card.highlight {
  border: 2px solid var(--navy);
  box-shadow: var(--shadow-md);
}

.tier-name {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.tier-price {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--ink);
  margin: 6px 0 4px;
}

.tier-price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.tier-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.89rem;
  color: var(--ink-secondary);
}

.tier-list li {
  padding-left: 20px;
  position: relative;
}

.tier-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--emerald);
  font-weight: 800;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 28px 0;
  font-size: 0.86rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #1e293b;
}

.footer-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.96rem;
  margin: 0 0 8px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-disclaimer {
  padding-top: 16px;
  color: #94a3b8;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 100;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.close-btn {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-weight: 700;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pro-unlocked-box {
  background: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 12px;
}

/* Responsive: Tablet, iPhone Duo Unfolded (890x626), & Folded Cover (466x678) */
@media (max-width: 1080px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .hero-top {
    grid-template-columns: 1fr;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .utility-rail {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .search-grid {
    grid-template-columns: 1fr 1fr;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 14px;
    padding-right: 18px; /* Keep interactive controls clear of right-edge gesture rail on folded cover displays */
  }
  .mode-tabs {
    grid-template-columns: 1fr;
  }
  .search-grid {
    grid-template-columns: 1fr;
  }
  .main-nav {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
