:root {
  --ink: #111b22;
  --slate: #2b3c48;
  --muted: #566875;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --border: #d8e2df;
  --brand: #0c7a5f;
  --brand-dark: #085c47;
  --brand-soft: #e7f6f1;
  --amber: #b8620b;
  --amber-soft: #fef4e6;
  --dark: #101d24;
  --radius: 10px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 84px; }

body {
  margin: 0;
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.18;
  margin-top: 0;
  letter-spacing: -0.015em;
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-name {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 1.18rem;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.brand-sub {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  padding-left: 18px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav a {
  color: var(--slate);
  font-weight: 600;
  font-size: 0.93rem;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--brand);
  text-decoration: none;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phone-link {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.94rem;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 7px;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; }

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

.btn-outline {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--ink); }

.btn-sm {
  padding: 7px 12px;
  font-size: 0.84rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  width: 42px;
  height: 42px;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* Desk Hero */
.desk-hero {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 40px 0 36px;
}

.desk-hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 32px;
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "Archivo", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 5px 10px;
  border-radius: 99px;
  margin-bottom: 12px;
}

.desk-hero h1 {
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  margin-bottom: 12px;
}

.desk-lead {
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0;
  max-width: 62ch;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.kpi {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 15px;
}

.kpi-val {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--ink);
  line-height: 1.1;
}

.kpi-lbl {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 3px;
}

/* Finder Controls */
.finder-section {
  padding: 28px 0 56px;
}

.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

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

.f-group label {
  font-size: 0.79rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.f-group input,
.f-group select {
  padding: 9px 11px;
  border: 1px solid #c6d3cf;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.94rem;
  background: #ffffff;
  color: var(--ink);
}

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.blocks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.blocks-table th,
.blocks-table td {
  text-align: left;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.blocks-table th {
  background: #eef3f1;
  font-family: "Archivo", sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate);
  white-space: nowrap;
}

.blocks-table tbody tr:hover {
  background: #f9fbfa;
}

.blocks-table tr:last-child td {
  border-bottom: 0;
}

.id-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--slate);
}

.mw-val {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-now {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.badge-2027 {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge-later {
  background: #edf1f4;
  color: var(--slate);
}

.hw-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  background: #eef2f6;
  color: var(--slate);
  font-size: 0.75rem;
  font-weight: 600;
  margin: 2px 4px 2px 0;
}

.sub-note {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.empty-state {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
}

/* Sections & Cards */
.section {
  padding: 52px 0;
}

.section-white {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 {
  font-size: 1.14rem;
  margin-bottom: 8px;
}

.card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.card p:last-child { margin-bottom: 0; }

/* Forms */
.form-grid {
  display: grid;
  gap: 13px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.field label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--slate);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c6d3cf;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #ffffff;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(12, 122, 95, 0.24);
  border-color: var(--brand);
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.form-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 4px 0 0;
}

/* Modal Drawer for Block Unlock */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 29, 36, 0.56);
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-panel {
  background: #ffffff;
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 26px;
  box-shadow: 0 24px 54px rgba(10, 20, 26, 0.34);
}

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

.modal-close {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 34px;
  height: 34px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--slate);
}

.selected-summary {
  background: var(--brand-soft);
  border: 1px solid #bce4d8;
  border-radius: 7px;
  padding: 11px 14px;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 16px;
}

/* Prose */
.content-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 32px;
  align-items: start;
}

.prose h2 {
  font-size: 1.38rem;
  margin: 26px 0 10px;
}
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 16px; padding-left: 20px; }
.prose li { margin-bottom: 8px; }

/* Footer */
.site-footer {
  background: var(--dark);
  color: #aebec6;
  padding: 40px 0 30px;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer h3 {
  color: #ffffff;
  font-size: 0.94rem;
  margin-bottom: 10px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 7px;
}

.site-footer a { color: #cfe0dc; }
.site-footer a:hover { color: #ffffff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
  font-size: 0.83rem;
  color: #879ca5;
}

/* Responsive */
/* ---------- Matcher ---------- */
.section-tight { padding: 28px 0 8px; }

.matcher-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.matcher-intro h2 { font-size: 1.3rem; margin-bottom: 4px; }
.matcher-intro p { margin: 0 0 16px; color: var(--muted); }

.matcher-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto auto;
  gap: 12px;
  align-items: end;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--slate);
  padding-bottom: 10px;
  white-space: nowrap;
}

.matcher-results { margin-top: 18px; }
.match-note { margin: 0; color: var(--muted); font-size: 0.92rem; }
.match-head { margin: 0 0 14px; }

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.match-card {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  background: #fbfdfc;
}

.match-card h3 { font-size: 1.05rem; margin: 8px 0 2px; }
.tags { margin-top: 8px; }

.match-empty {
  background: var(--amber-soft);
  border: 1px solid #f2d3a8;
  border-radius: 9px;
  padding: 16px;
}
.match-empty p { margin: 0 0 12px; }

/* ---------- Power map ---------- */
.section-head { margin-bottom: 20px; max-width: 70ch; }
.section-head h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin-bottom: 8px; }
.section-head p { margin: 0; color: var(--muted); }
.muted-inline { display: block; margin-top: 4px; font-size: 0.86rem; }

.power-map {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
  min-width: 720px;
}

.power-map th,
.power-map td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.power-map thead th {
  background: #eef3f1;
  font-family: "Archivo", sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate);
}

.power-map tbody th {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  white-space: nowrap;
}

.row-total {
  display: block;
  font-family: "Source Sans 3", sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--muted);
}

.power-map tfoot th,
.power-map tfoot td {
  font-weight: 700;
  background: #f6f9f8;
  border-bottom: 0;
}

.cell { padding: 4px !important; }

.cell-btn.btn { display: inline-flex; }

td .cell-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

td .cell-btn:hover,
td .cell-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.cell-mw { font-family: "Archivo", sans-serif; font-weight: 800; font-size: 1rem; }
.cell-sub { font-size: 0.76rem; color: var(--slate); }
.cell-empty { display: block; text-align: center; color: #b5c3bf; }

.h1 { background: #f1faf6; }
.h2 { background: #d9f1e7; }
.h3 { background: #a9dfc9; }
.h4 { background: #6cc4a3; }
.h0 { background: #ffffff; }

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 0.84rem;
  color: var(--muted);
  margin: 12px 0 0;
}

.sw {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid var(--border);
  vertical-align: -2px;
  margin-right: 4px;
}

/* ---------- Region cards ---------- */
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.region-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.region-card h3 { margin: 0; font-size: 1.1rem; }
.region-mw { margin: 0; font-family: "Archivo", sans-serif; font-weight: 800; font-size: 1.5rem; color: var(--brand-dark); }
.region-card ul { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 5px; font-size: 0.9rem; color: var(--slate); }
.region-card .btn { align-self: flex-start; margin-top: auto; }

@media (max-width: 980px) {
  .matcher-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .matcher-form { grid-template-columns: 1fr; }
}

/* Responsive */
@media (max-width: 980px) {
  .desk-hero-grid,
  .content-layout,
  .footer-grid,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 16px 22px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 12px 26px rgba(16, 29, 36, 0.1);
  }
  .site-nav.open { display: flex; }
  .header-cta .phone-link { display: none; }
}

@media (max-width: 640px) {
  .filter-bar,
  .grid-2,
  .form-row {
    grid-template-columns: 1fr;
  }
}
