:root {
  --bg: #ffffff;
  --text: #202124;
  --text-muted: #5f6368;
  --border: #dfe1e5;
  --shadow: rgba(32, 33, 36, 0.28);
  --accent2: #0284c7;
  --button-bg: #f8f9fa;
  --button-border: #f1f1f1;
  --status-active-bg: #e6f4ea;
  --status-active-text: #1e7e34;
  --status-lapsed-bg: #fce8e6;
  --status-lapsed-text: #c5221f;
  --badge-info-bg: #e8f0fe;
  --badge-info-text: #1a56db;
  --row-hover: #f8f9fa;
  --map-full: #4f9768;
  --map-partial: #a3d6b3;
  --map-outage: #d99a1f;
  --map-outage-text: #8a5c15;
  --logo-ink: #414245;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Inter Tight", var(--font-body);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #202124;
    --text: #e8eaed;
    --text-muted: #9aa0a6;
    --border: #3c4043;
    --shadow: rgba(0, 0, 0, 0.4);
    --button-bg: #303134;
    --button-border: #303134;
    --status-active-bg: #0f3d22;
    --status-active-text: #81c995;
    --status-lapsed-bg: #3d1210;
    --status-lapsed-text: #f28b82;
    --badge-info-bg: #1b2a4a;
    --badge-info-text: #8ab4f8;
    --row-hover: #27282b;
    --map-full: #3a6b4a;
    --map-partial: #5faf78;
    --map-outage: #d9a154;
    --map-outage-text: #e0b876;
    --logo-ink: #f2f0ec;
  }
}

:root[data-theme="dark"] {
  --bg: #202124;
  --text: #e8eaed;
  --text-muted: #9aa0a6;
  --border: #3c4043;
  --shadow: rgba(0, 0, 0, 0.4);
  --button-bg: #303134;
  --button-border: #303134;
  --status-active-bg: #0f3d22;
  --status-active-text: #81c995;
  --status-lapsed-bg: #3d1210;
  --status-lapsed-text: #f28b82;
  --badge-info-bg: #1b2a4a;
  --badge-info-text: #8ab4f8;
  --row-hover: #27282b;
  --map-full: #3a6b4a;
  --map-partial: #5faf78;
  --map-outage: #d9a154;
  --map-outage-text: #e0b876;
  --logo-ink: #f2f0ec;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 550;
}

html {
  scroll-behavior: smooth;
}

/* Baseline keyboard-focus ring for every interactive element that doesn't already
   define its own (search box icon buttons, the FAQ question toggle, etc. keep their
   existing, more specific rules below - these just cover everything else so nothing on
   the page is left with only the browser's default outline, or none at all). */
a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

.search-option-checkbox input:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

/* The search box itself shows a focus ring via box-shadow on `.search-box:focus-within`
   (below) - an outline on the input too would double up on that, so it's suppressed here. */
.search-input:focus-visible {
  outline: none;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

.app.has-results .hero {
  min-height: 0;
  justify-content: flex-start;
  padding-top: 40px;
  padding-bottom: 40px;
}

.brand {
  text-align: center;
  margin-bottom: 28px;
}

.app.has-results .brand {
  margin-bottom: 20px;
}

.logo {
  font-size: 3.5rem;
  transition: font-size 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
}

.app.has-results .logo {
  font-size: 1.6rem;
}

.logo-mark {
  width: 0.75em;
  height: 0.75em;
  flex-shrink: 0;
  color: var(--logo-ink);
}

.logo-primary {
  font-family: var(--font-display);
  font-size: 1em;
  font-weight: 600;
  letter-spacing: -1px;
}

.accent {
  color: var(--accent2);
}

.beta-badge-wrap {
  position: relative;
  display: inline-flex;
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--accent2);
  background: none;
  color: var(--accent2);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.5;
  cursor: pointer;
}

.beta-badge:hover {
  background: var(--badge-info-bg);
}

.beta-badge:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

.beta-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  width: 250px;
  max-width: 70vw;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 4px 16px var(--shadow);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 60;
}

.beta-badge-wrap:hover .beta-tooltip,
.beta-badge-wrap:focus-within .beta-tooltip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .beta-tooltip {
    transition: none;
  }
}

.logo-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
  border-radius: 8px;
}

.logo-link:hover {
  opacity: 0.85;
}

.logo-link:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 4px;
}

.tagline {
  color: var(--text-muted);
  margin-top: 8px;
  font-size: 0.95rem;
}

.app.has-results .tagline {
  display: none;
}

.search-form {
  width: 100%;
  max-width: 632px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.search-box {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 0 18px;
  height: 52px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-box:focus-within {
  box-shadow: 0 1px 6px var(--shadow);
  border-color: transparent;
}

.search-icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.search-icon-button:hover {
  color: var(--accent2);
}

.search-icon-button:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

.search-icon {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
  padding: 0 12px;
  position: relative;
  z-index: 2;
}

.search-tips-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-left: 8px;
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: color 0.15s ease;
  position: relative;
  z-index: 2;
}

.search-tips-button svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.search-tips-button:hover {
  color: var(--accent2);
}

.search-tips-button:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

.placeholder-cycle {
  position: absolute;
  left: 50px;
  right: 54px;
  color: var(--text-muted);
  font-size: 1.05rem;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.placeholder-cycle.fade,
.placeholder-cycle.hidden {
  opacity: 0;
}

.advanced-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 18px;
}

.advanced-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.advanced-toggle:hover {
  color: var(--text);
  background: var(--button-bg);
}

.advanced-toggle .chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}

.advanced-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.advanced-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
  width: 100%;
}

.advanced-panel.open {
  grid-template-rows: 1fr;
}

.advanced-panel-inner {
  overflow: hidden;
  min-height: 0;
}

.search-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-top: 14px;
}

.search-option {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-option[hidden] {
  display: none;
}

.search-option-select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.search-option-checkbox {
  cursor: pointer;
}

.search-option-checkbox input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent2);
  cursor: pointer;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent2);
  font-weight: 600;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.scroll-cue {
  position: fixed;
  top: calc(100vh - 80px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  z-index: 50;
  transition: top 0.5s ease, color 0.2s ease;
  animation: scroll-cue-bounce 2.2s ease-in-out infinite;
}

.scroll-cue.scrolled {
  top: 20px;
  animation: none;
}

.scroll-cue:hover {
  color: var(--accent2);
}

.scroll-cue-label-stack {
  position: relative;
  display: inline-block;
  min-width: 64px;
  height: 1em;
  text-align: center;
}

.scroll-cue-label {
  position: absolute;
  left: 0;
  right: 0;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scroll-cue-label-down {
  opacity: 1;
}

.scroll-cue.scrolled .scroll-cue-label-down {
  opacity: 0;
}

.scroll-cue.scrolled .scroll-cue-label-up {
  opacity: 1;
}

.scroll-cue-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.4s ease;
}

.scroll-cue.scrolled .scroll-cue-icon {
  transform: rotate(180deg);
}

@keyframes scroll-cue-bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(6px);
  }
}

.app.has-results .scroll-cue {
  display: none;
}

.info-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Bottom gap is deliberately vh-scaled, not a fixed px value: app.js's scroll-snap
     centers the FAQ card by scrolling to leave (viewport height - card height) / 2 of
     room below it, and this gap targets landing the footer at roughly that same depth
     - i.e. right at the bottom of the screen once centered - across viewport heights. */
  padding: 8vh 24px calc(50vh - 318px);
}

.app.has-results .info-section {
  display: none;
}

/* The footer's default position (in the non-results state) is governed entirely by the
   vh-scaled gap on .info-section above, tuned to land it right after the FAQ card - but
   .info-section is hidden outright once results are showing, leaving nothing to pin the
   footer down. Without this, the footer sits wherever the (often short, especially mid-
   "Searching..." before results populate) results content happens to end, floating up
   the page and jumping around as that content's height changes. Scoped to has-results
   only, so the FAQ-relative positioning above is untouched. */
.app.has-results {
  min-height: 100vh;
}

.app.has-results .site-footer-wide {
  margin-top: auto;
}

.faq-card {
  width: 100%;
  max-width: 1125px;
  display: flex;
  gap: 60px;
  padding: 60px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: 0 2px 12px var(--shadow);
  filter: blur(10px);
  opacity: 0.3;
  transition: filter 0.5s ease, opacity 0.5s ease;
}

.faq-card.in-view {
  filter: blur(0);
  opacity: 1;
}

.faq-intro {
  flex: 0 0 260px;
}

.faq-intro h2 {
  font-size: 2.2rem;
  font-weight: 550;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.faq-intro p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.faq-list {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--button-bg);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  text-align: left;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  padding: 18px 20px;
  cursor: pointer;
}

.faq-question:hover {
  color: var(--accent2);
}

.faq-question:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: -2px;
}

.faq-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.faq-item.open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-answer-inner {
  overflow: hidden;
  min-height: 0;
}

.faq-answer p {
  padding: 0 20px 20px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.faq-answer strong {
  color: var(--text);
}

.faq-answer a {
  color: var(--accent2);
  font-weight: 600;
  text-decoration: none;
}

.faq-answer a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .faq-card {
    flex-direction: column;
    gap: 24px;
    padding: 32px 24px;
  }

  .faq-intro {
    flex: none;
  }
}

.results {
  width: 100%;
  max-width: 1280px;
  margin-top: 32px;
  padding-bottom: 64px;
}

.results-summary-block {
  margin-bottom: 18px;
}

.results-heading {
  font-size: 1.4rem;
  font-weight: 550;
  color: var(--text);
}

/* --- Centered loading state (search fan-out across states, filings lookup) --- */

.centered-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 72px 24px 88px;
}

/* The source GIF's canvas (640x700) isn't square and its artwork isn't centered within
   it - confirmed by sampling frames: content sits ~46px below and ~22px left of the
   canvas's own center. object-fit: contain keeps it undistorted; the translate nudges
   the actual artwork (not the canvas) to the middle of this frame instead of the source
   file's own off-center padding. Frame clips via overflow so the shift never spills
   outside the intended frame area - harmless, since what's clipped is just more of the
   same solid background color the GIF already matches to the page. The translate amount
   is tied to this frame's own size (object-fit's scale factor changes with it) - resizing
   the frame means rescaling .loader-mark-gif's shift by the same ratio. */
.loader-mark-frame {
  width: 200px;
  height: 200px;
  overflow: hidden;
  display: flex;
}

.loader-mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.loader-mark-gif {
  transform: translate(6.25px, -12.5px);
}

.loader-progress {
  width: 200px;
  height: 4px;
  border-radius: 999px;
  background: var(--button-bg);
  overflow: hidden;
}

.loader-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: #2896cf;
  transition: width 0.3s ease;
}

/* Only while the real completed/total count isn't known yet (or can't be - the filings
   lookup is a single request, not a fan-out with a meaningful count to report) - a
   sliding bar instead of a fixed width driven by JS. Removed as soon as real progress
   data starts arriving for a search that spans multiple states. */
.loader-progress-bar.indeterminate {
  width: 45%;
  animation: loader-progress-slide 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes loader-progress-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

@media (prefers-reduced-motion: reduce) {
  .loader-progress-bar.indeterminate {
    animation: none;
    width: 100%;
  }
}

.results-subtext {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-link {
  background: none;
  border: none;
  color: var(--accent2);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
}

.back-link:hover {
  text-decoration: underline;
}

.results-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.entity-detail-card {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.entity-detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: baseline;
  font-size: 0.9rem;
}

.entity-detail-label {
  flex: 0 0 160px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.entity-detail-value {
  color: var(--text);
}

.ucc-filings-heading {
  font-size: 1.1rem;
  font-weight: 550;
  margin-bottom: 4px;
}

.business-match-note {
  margin-bottom: 16px;
}

.business-match-suggestions {
  display: block;
  margin-top: 12px;
  margin-bottom: 20px;
}

.business-match-suggestions .link-button {
  display: inline;
}

.business-match-active {
  display: inline;
  font-weight: 600;
  color: var(--text);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.results-table thead th {
  text-align: left;
  padding: 10px 14px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.results-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.results-table th.sortable:hover {
  color: var(--text);
}

.results-table th.sortable:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: -2px;
  color: var(--text);
}

.results-table th.sortable::after {
  content: "";
  display: inline-block;
  margin-left: 5px;
  border: 4px solid transparent;
  border-top-color: var(--text-muted);
  vertical-align: middle;
  opacity: 0.35;
}

.results-table th.sortable.sorted-asc::after,
.results-table th.sortable.sorted-desc::after {
  opacity: 1;
  border-top-color: var(--accent2);
}

.results-table th.sortable.sorted-asc::after {
  transform: rotate(180deg);
}

.results-table tbody tr {
  border-bottom: 1px solid var(--border);
}

.results-table tbody tr:last-child {
  border-bottom: none;
}

.results-table tbody tr.entity-row {
  cursor: pointer;
}

.results-table tbody tr.entity-row:hover {
  background: var(--row-hover);
}

.results-table td {
  padding: 12px 14px;
  vertical-align: middle;
}

.cell-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.cell-muted {
  color: var(--text-muted);
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-outline {
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge-info {
  background: var(--badge-info-bg);
  color: var(--badge-info-text);
}

.badge-active {
  background: var(--status-active-bg);
  color: var(--status-active-text);
  text-transform: uppercase;
}

.badge-lapsed,
.badge-terminated {
  background: var(--status-lapsed-bg);
  color: var(--status-lapsed-text);
  text-transform: uppercase;
}

.btn-outline {
  border: 1px solid var(--accent2);
  color: var(--accent2);
  background: transparent;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.btn-outline:hover {
  background: var(--accent2);
  color: #fff;
}

.table-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 12px 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.table-toolbar.has-export {
  justify-content: space-between;
}

.page-size-group {
  display: flex;
  align-items: center;
}

.page-size-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-size-select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.82rem;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.page-size-suffix {
  margin-left: 8px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 18px;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}

.page-btn:hover:not(:disabled):not(.page-btn-active) {
  background: var(--row-hover);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.page-btn-active {
  background: var(--accent2);
  border-color: var(--accent2);
  color: #fff;
}

/* --- Homepage-only top-left nav (About, Coverage Map) - same corner Google uses for
   its own "About / Store" links on its homepage. */

.top-nav {
  position: fixed;
  top: 20px;
  left: 24px;
  z-index: 100;
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
}

.top-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.top-nav a:hover {
  text-decoration: underline;
}

.app.has-results .top-nav {
  display: none;
}

/* --- Floating menu: a gear that expands into a pill holding the theme toggle and
   feedback trigger, replacing what used to be a single standalone theme-toggle circle --- */

.fab-menu {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 2px 8px var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.fab-menu:hover {
  box-shadow: 0 4px 12px var(--shadow);
}

.fab-actions {
  display: flex;
  align-items: center;
  max-width: 0;
  opacity: 0;
  transition: max-width 0.25s ease, opacity 0.2s ease;
}

.fab-menu.open .fab-actions {
  max-width: 100px;
  opacity: 1;
}

.fab-action,
.fab-trigger {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease;
}

.fab-action:hover,
.fab-trigger:hover {
  color: var(--accent2);
}

.fab-action svg,
.fab-trigger svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.fab-trigger .icon-gear {
  transition: transform 0.3s ease;
}

.fab-menu.open .fab-trigger .icon-gear {
  transform: rotate(75deg);
  color: var(--accent2);
}

/* On narrow viewports the fixed FAB sits over the bottom-right corner of whatever's on
   screen, not just the true end of the page - give scrollable content extra bottom
   clearance so the last row/button/stat isn't tucked underneath it. */
@media (max-width: 720px) {
  .results,
  .coverage-main,
  .static-main {
    padding-bottom: 96px;
  }
}

/* --- Coverage & status page --- */

.coverage-page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 24px 32px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.coverage-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 56px;
}

.coverage-logo {
  font-size: 1.6rem;
}

.coverage-main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.coverage-card {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 2px 14px var(--shadow);
  overflow: hidden;
  text-align: left;
}

.coverage-card-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
}

.coverage-card-title {
  font-size: 1.15rem;
  font-weight: 550;
}

.coverage-card-body {
  display: flex;
  align-items: stretch;
}

.coverage-card-map {
  flex: 1 1 auto;
  min-width: 0;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.coverage-card-stats {
  flex: 0 0 180px;
  padding: 24px 18px;
  border-left: 1px solid var(--border);
}

.coverage-legend {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 14px;
  background: var(--button-bg);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.coverage-map-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.coverage-map svg {
  width: 100%;
  height: auto;
  display: block;
}

.coverage-map .state {
  stroke: var(--border);
  stroke-width: 0.75;
  stroke-linejoin: round;
  transition: filter 0.15s ease;
  cursor: pointer;
}

.coverage-map .state:hover {
  filter: brightness(1.15);
}

.coverage-map .state-full {
  fill: var(--map-full);
}

.coverage-map .state-partial {
  fill: var(--map-partial);
}

.coverage-map .state-none {
  fill: var(--button-bg);
  stroke: var(--border);
}

/* A temporary outage is a transient runtime condition, not a data-coverage tier, so it
   gets its own fill (overriding whatever tier color the state would otherwise show) plus
   a slow pulse to read as "ongoing right now" rather than a static classification. */
.coverage-map .state-outage {
  fill: var(--map-outage);
  animation: state-outage-pulse 2.2s ease-in-out infinite;
}

@keyframes state-outage-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .coverage-map .state-outage {
    animation: none;
  }
}

.map-tooltip {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 4px 16px var(--shadow);
  font-size: 0.82rem;
  max-width: 260px;
  transform: translate(-50%, calc(-100% - 14px));
}

.map-tooltip[hidden] {
  display: none;
}

.map-tooltip-name {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 6px;
}

.map-tooltip-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--text);
  margin-bottom: 2px;
}

.map-tooltip-label {
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.map-tooltip-note {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
  margin: 2px 0 8px;
}

.map-tooltip-note:last-child {
  margin-bottom: 0;
}

.map-tooltip-warning {
  color: var(--map-outage-text);
  font-weight: 500;
}

.map-tooltip-outage-label {
  color: var(--map-outage-text);
}

.coverage-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.coverage-stat-total {
  margin-bottom: 16px;
}

.coverage-stat-number {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.coverage-stat-label {
  color: var(--text-muted);
  font-size: 0.66rem;
  margin-top: 4px;
}

.coverage-stat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.coverage-stat-row-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 0.68rem;
}

.coverage-stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.coverage-stat-row-label {
  flex: 1;
  color: var(--text);
  font-weight: 600;
}

.coverage-stat-row-value {
  color: var(--text-muted);
  font-weight: 600;
}

.coverage-stat-bar-track {
  height: 4px;
  border-radius: 999px;
  background: var(--button-bg);
  overflow: hidden;
}

.coverage-stat-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.dot-full,
.fill-full {
  background: var(--map-full);
}

.dot-partial,
.fill-partial {
  background: var(--map-partial);
}

.dot-none,
.fill-none {
  background: var(--text-muted);
}

.dot-outage {
  background: var(--map-outage);
}

.coverage-footer {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 720px) {
  .coverage-header {
    margin-bottom: 32px;
  }

  .coverage-card-body {
    flex-direction: column;
  }

  .coverage-card-stats {
    flex: none;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .coverage-legend {
    flex-wrap: wrap;
    row-gap: 6px;
  }
}

/* --- Site footer (homepage, coverage, static pages) --- */

.site-footer {
  width: 100%;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.site-footer-wide {
  max-width: 900px;
  /* .info-section's vh-scaled padding-bottom is the only gap above this footer on the
     homepage (it's sized to land the footer at the bottom of the screen once the FAQ
     card is centered) - the base .site-footer margin-top would double up on that gap. */
  margin-top: 0;
  /* Small residual scroll-room safety margin beyond the footer, on top of the
     vh-scaled gap on .info-section, so very tall viewports still have enough
     document height for the FAQ card to reach a fully centered scroll position. */
  padding-bottom: 8vh;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer-links a:hover {
  color: var(--accent2);
  text-decoration: underline;
}

.coverage-footer .site-footer {
  max-width: 720px;
  margin-top: 16px;
  border-top: none;
  padding-top: 0;
  justify-content: center;
  gap: 8px 24px;
}

/* --- Static content pages (privacy, terms, 404) --- */

.static-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.static-main {
  flex: 1 1 auto;
}

.static-title {
  font-size: 1.7rem;
  font-weight: 550;
  margin-bottom: 6px;
}

.static-updated {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 32px;
}

.static-content h3 {
  font-size: 1.1rem;
  font-weight: 550;
  margin: 28px 0 10px;
}

.static-content h3:first-child {
  margin-top: 0;
}

.static-content p {
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.static-content ul {
  padding-left: 22px;
  margin-bottom: 12px;
}

.static-content li {
  color: var(--text);
  line-height: 1.65;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.static-content a {
  color: var(--accent2);
  text-decoration: none;
}

.static-content a:hover {
  text-decoration: underline;
}

.static-page > .site-footer {
  margin-top: auto;
}

/* --- About page --- */

.about-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.about-page > .coverage-header {
  padding: 32px 24px 0;
  margin-bottom: 0;
}

.about-tagline {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 550;
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-bottom: 32px;
}

.about-heading {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 550;
  margin-bottom: 22px;
}

.about-hero {
  background: var(--badge-info-bg);
  padding: 64px 24px 104px;
  margin-top: 28px;
}

.about-hero-inner,
.about-section-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 56px;
}

.about-hero-text,
.about-section-text {
  flex: 1 1 420px;
  min-width: 0;
}

.about-hero-text p,
.about-section-text p {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.98rem;
  margin-bottom: 22px;
}

.about-highlight {
  color: var(--accent2);
  font-weight: 700;
}

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
}

.about-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  line-height: 1.5;
  font-size: 0.98rem;
}

.about-list-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.about-list-icon circle {
  fill: var(--accent2);
}

.about-list-icon path {
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.about-hero-text .about-hero-cta {
  display: inline-block;
  margin: 18px 0 0;
  text-decoration: none;
  background: var(--accent2);
  color: #fff;
}

.about-hero-illustration,
.about-illustration {
  flex: 1 1 360px;
  max-width: 400px;
}

.about-illus {
  width: 100%;
  height: auto;
  display: block;
}

.illus-halo {
  fill: var(--accent2);
  opacity: 0.07;
}

.illus-ghost-card {
  fill: var(--bg);
  stroke: var(--border);
  stroke-width: 2;
}

.illus-ghost-line {
  fill: var(--border);
}

.illus-dot {
  fill: var(--accent2);
  opacity: 0.55;
}

.illus-card {
  fill: var(--bg);
  stroke: var(--border);
  stroke-width: 2;
}

.illus-card-dot {
  fill: var(--text-muted);
  opacity: 0.45;
}

.illus-row {
  fill: var(--text-muted);
  opacity: 0.25;
}

.illus-row-accent {
  fill: var(--accent2);
  opacity: 0.85;
}

.illus-magnifier circle {
  fill: none;
  stroke: var(--accent2);
  stroke-width: 8;
}

.illus-magnifier line {
  stroke: var(--accent2);
  stroke-width: 8;
  stroke-linecap: round;
}

.illus-path {
  fill: none;
  stroke: var(--border);
  stroke-width: 2;
  stroke-dasharray: 5 7;
}

.illus-badge {
  fill: var(--accent2);
}

.illus-check {
  fill: none;
  stroke: #fff;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.about-section {
  padding: 120px 24px;
}

.about-section-inner.reverse .about-illustration {
  order: -1;
}

.about-contact {
  padding: 120px 24px 120px;
  text-align: center;
}

.about-contact p {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.98rem;
  max-width: 520px;
  margin: 0 auto 18px;
}

.about-contact a {
  color: var(--accent2);
  text-decoration: none;
}

.about-contact a:hover {
  text-decoration: underline;
}

.about-footer {
  margin-top: auto;
  padding: 0 24px;
}

.about-footer .site-footer {
  max-width: 1160px;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .about-hero-inner,
  .about-section-inner {
    flex-direction: column;
  }

  .about-section-inner.reverse .about-illustration {
    order: 0;
  }

  .about-hero-illustration,
  .about-illustration {
    max-width: 320px;
    width: 100%;
  }

  .about-tagline {
    font-size: 1.6rem;
  }
}

/* --- 404 page --- */

.error-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 40px 0;
}

.error-code {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--text);
}

.error-message {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 12px;
}

.error-page-body .btn-outline {
  display: inline-block;
  text-decoration: none;
}

/* --- Search tips modal (triggered from the search box icon and the results footer) --- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 300;
}

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

.modal-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px var(--shadow);
  padding: 32px;
}

.modal-card h3 {
  font-size: 1.15rem;
  font-weight: 550;
  margin-bottom: 16px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close:hover {
  background: var(--row-hover);
  color: var(--text);
}

/* --- Feedback form (opened from the floating menu) --- */

.feedback-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 16px;
}

.feedback-optional {
  color: var(--text-muted);
  font-weight: 400;
}

.feedback-field textarea,
.feedback-field input {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  resize: vertical;
}

.feedback-field textarea:focus,
.feedback-field input:focus {
  outline: none;
  border-color: var(--accent2);
}

.feedback-status {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.feedback-status.error {
  color: var(--status-lapsed-text);
}

.feedback-status.success {
  color: var(--status-active-text);
}

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

/* --- Speech-bubble variant (search tips) --- */

.modal-bubble {
  overflow: visible;
  text-align: center;
  padding-bottom: 32px;
}

.modal-bubble-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent2), #1d4ed8);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.modal-bubble-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.modal-tips-list {
  max-height: 50vh;
  overflow-y: auto;
  padding-left: 20px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: left;
}

.modal-tips-list li {
  margin-bottom: 20px;
}

.modal-tips-list li:last-child {
  margin-bottom: 0;
}

.modal-tips-list a {
  color: var(--accent2);
}

.modal-tips-subitem {
  margin-top: 6px;
  margin-left: 16px;
  font-size: 0.85em;
}

.modal-bubble-button {
  display: block;
  margin: 22px auto 0;
  padding: 10px 30px;
  border: none;
  border-radius: 999px;
  background: var(--badge-info-bg);
  color: var(--badge-info-text);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.modal-bubble-button:hover {
  opacity: 0.88;
}

.modal-bubble-tail {
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 20px;
  height: 20px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 4px 0;
  transform: translateX(-50%) rotate(45deg);
}

/* --- "Not what you're looking for?" note under the results table --- */

.results-tips-note {
  padding: 18px 4px 4px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.results-tips-note button,
.results-tips-note a {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent2);
  cursor: pointer;
  text-decoration: none;
}

.results-tips-note button:hover,
.results-tips-note a:hover {
  text-decoration: underline;
}

/* --- Empty state (zero results for a search) --- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 24px 8px;
}

.empty-state-icon {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  opacity: 0.55;
  margin-bottom: 18px;
}

.empty-state-title {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-state-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 360px;
}

.empty-state .results-tips-note {
  padding-top: 22px;
}

.empty-state-error-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  width: 100%;
  max-width: 360px;
}

.results-error-banner {
  background: var(--status-lapsed-bg);
  color: var(--status-lapsed-text);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  /* Only creates visible space *between* rows, so a single-state banner (the common
     case) is unaffected - it only shows up once there's a second line to separate from
     the first. */
  gap: 12px;
}

/* --- Manual "Check now" row (per failed state) --- */

.state-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
}

.state-check-code {
  font-weight: 600;
  color: var(--text);
  min-width: 2.2em;
}

.state-check-button {
  background: var(--button-bg);
  border: 1px solid var(--button-border);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent2);
  cursor: pointer;
}

.state-check-button:hover:not(:disabled) {
  filter: brightness(0.96);
}

.state-check-button:disabled {
  cursor: default;
  opacity: 0.7;
}

.state-check-result {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.state-check-result.state-check-ok {
  color: var(--status-active-text);
}

.state-check-result.state-check-down {
  color: var(--map-outage-text);
}

/* --- Copy-to-clipboard button (filing number cell) --- */

.copy-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: none;
  border: none;
  padding: 0;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.copy-btn:hover,
.copy-btn:focus-visible {
  opacity: 1;
  color: var(--accent2);
}

.copy-btn svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.copy-btn .icon-check {
  display: none;
}

.copy-btn.copied {
  color: var(--status-active-text);
  opacity: 1;
}

.copy-btn.copied .icon-copy {
  display: none;
}

.copy-btn.copied .icon-check {
  display: block;
}

