:root {
  --sound: #12383d;      /* deep Puget Sound water */
  --sound-2: #1d4d53;
  --sound-ink: #e7efee;
  --paper: #f5f7f6;
  --ink: #172124;
  --muted: #56666a;
  --line: #d3dbda;
  --placard: #f2c230;    /* job-site permit card yellow */
  --placard-ink: #1b1a14;
  --ok: #2e7d57;
  --error: #b3261e;
  --radius: 6px;
  --wrap: 1120px;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); line-height: 1.55; font-size: 17px; }
img { max-width: 100%; }
a { color: var(--sound-2); }
:focus-visible { outline: 3px solid var(--placard); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }

/* ---------- top bar ---------- */
.topbar { background: var(--sound); color: var(--sound-ink); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none;
  font-weight: 800; font-stretch: 112%; font-size: 19px; letter-spacing: -0.01em; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.topnav { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.topnav a { color: var(--sound-ink); text-decoration: none; }
.topnav a:hover { text-decoration: underline; }
.topnav .btn { padding: 8px 14px; font-size: 15px; }
@media (max-width: 720px) { .topnav a:not(.btn) { display: none; } }
.brand, .topnav .btn { white-space: nowrap; }
@media (max-width: 420px) { .brand { font-size: 16px; gap: 8px; } .topnav .btn { padding: 7px 10px; font-size: 14px; } .helper-btn { padding: 11px 14px; } }

/* ---------- buttons ---------- */
.btn { display: inline-block; background: var(--placard); color: var(--placard-ink); border: 0;
  border-radius: var(--radius); padding: 13px 20px; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; }
.btn:hover { background: #ffd24a; }
.btn.secondary { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn.secondary:hover { background: rgba(255,255,255,.08); }

/* ---------- hero ---------- */
.hero { background: var(--sound); color: var(--sound-ink); padding: 56px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.02; font-weight: 800; font-stretch: 118%;
  letter-spacing: -0.025em; margin: 0 0 22px; color: #fff; max-width: 13ch; }
.hero p.lede { font-size: 19px; max-width: 34em; margin: 0 0 28px; color: var(--sound-ink); }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero .fine { font-size: 14px; margin-top: 16px; opacity: .8; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: 40px; } }

/* the permit placard: the one loud thing on the page */
.placard { background: var(--placard); color: var(--placard-ink); border-radius: 4px;
  padding: 22px 24px 20px; position: relative; box-shadow: 0 18px 0 -8px rgba(0,0,0,.25);
  transform: rotate(-1.2deg); max-width: 440px; justify-self: end; width: 100%; }
@media (max-width: 860px) { .placard { justify-self: start; transform: none; } }
.placard::before, .placard::after { content: ""; position: absolute; top: 12px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--sound); }
.placard::before { left: 12px; } .placard::after { right: 12px; }
.placard-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  border-bottom: 3px solid var(--placard-ink); padding: 6px 0 10px; margin-bottom: 14px; }
.placard-title { font-weight: 900; font-stretch: 125%; font-size: 22px; letter-spacing: .02em; text-transform: uppercase; }
.placard-trade { font-size: 14px; font-weight: 700; }
.placard dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.placard dt { font-weight: 700; }
.placard dd { margin: 0; }
.placard .work { grid-column: 1 / -1; font-size: 16px; line-height: 1.45; margin: 4px 0 6px;
  padding: 10px 0; border-top: 1px solid rgba(0,0,0,.25); border-bottom: 1px solid rgba(0,0,0,.25); }
.placard-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 13px; }
.placard-nav { display: flex; gap: 6px; }
.placard-nav button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--placard-ink);
  background: transparent; color: var(--placard-ink); font: inherit; font-weight: 800; cursor: pointer; }
.placard-nav button:hover { background: rgba(0,0,0,.08); }
.placard.swap { animation: swap .35s ease; }
@keyframes swap { from { opacity: .2; transform: rotate(-1.2deg) translateY(6px); } to { opacity: 1; transform: rotate(-1.2deg); } }

/* ---------- sections ---------- */
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }
h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.1; font-weight: 800; font-stretch: 112%;
  letter-spacing: -0.02em; margin: 0 0 14px; }
h3 { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.intro { max-width: 40em; color: var(--muted); margin: 0 0 36px; font-size: 18px; }

/* numbers this week */
.numbers { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .numbers { grid-template-columns: 1fr; } }
.big-stat { font-size: clamp(64px, 9vw, 112px); font-weight: 900; font-stretch: 75%; line-height: .9;
  color: var(--sound); letter-spacing: -0.02em; margin: 8px 0 6px; }
.stat-note { color: var(--muted); max-width: 26em; }
.home-stat { margin-top: 28px; padding: 16px 18px; border-left: 6px solid var(--placard); background: #fff; }
.home-stat strong { font-size: 22px; }
table.counts { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
.counts th, .counts td { padding: 9px 8px; text-align: right; border-bottom: 1px solid var(--line); }
.counts th:first-child, .counts td:first-child { text-align: left; padding-left: 0; }
.counts thead th { font-size: 14px; color: var(--muted); font-weight: 600; }
.counts td.total { font-weight: 700; }
.counts .bar { display: block; height: 4px; background: var(--sound-2); margin-top: 5px; border-radius: 2px; opacity: .35; }
.updated { font-size: 14px; color: var(--muted); margin-top: 12px; }

/* how it works */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: s; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 24px; } }
.steps li { counter-increment: s; padding-top: 14px; border-top: 3px solid var(--ink); }
.steps li::before { content: counter(s); display: block; font-weight: 900; font-stretch: 75%; font-size: 40px; line-height: 1; margin-bottom: 10px; color: var(--sound-2); }
.steps p { margin: 0; color: var(--muted); }

/* finished homes */
.homes { background: var(--sound); color: var(--sound-ink); }
.homes h2 { color: #fff; }
.homes .intro { color: var(--sound-ink); }
.homes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .homes-grid { grid-template-columns: 1fr; } }
.needs { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 24px; }
.needs li { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.18); break-inside: avoid; }

/* coverage */
.coverage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 860px) { .coverage { grid-template-columns: 1fr; } }
.county h3 { font-stretch: 112%; }
.county ul { list-style: none; padding: 0; margin: 10px 0 0; }
.county li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.county .on { color: var(--ok); font-weight: 700; }
.county .soon { color: var(--muted); }
.county.later h3 { color: var(--muted); }

/* plans */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 900px; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }
.plan { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--sound); }
.plan .price { font-size: 52px; font-weight: 900; font-stretch: 75%; line-height: 1; margin: 12px 0 2px; }
.plan .price small { font-size: 18px; font-weight: 600; font-stretch: 100%; color: var(--muted); }
.plan .later { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.plan ul { padding-left: 20px; margin: 0 0 24px; flex: 1; }
.plan li { margin-bottom: 8px; }
.plan .btn { text-align: center; }
.pro-note { margin-top: 24px; color: var(--muted); max-width: 46em; }

/* form */
.signup-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; }
@media (max-width: 860px) { .signup-grid { grid-template-columns: 1fr; gap: 28px; } }
form.card { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 28px; }
.field { margin-bottom: 18px; }
.field label, fieldset legend { display: block; font-weight: 700; margin-bottom: 6px; font-size: 15px; }
.field .hint { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], textarea, select {
  width: 100%; font: inherit; padding: 11px 12px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); }
input:focus, textarea:focus, select:focus { border-color: var(--sound-2); outline: none; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; }
@media (max-width: 520px) { .choices { grid-template-columns: 1fr; } }
.choice { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; padding: 4px 0; }
.choice input { margin-top: 4px; accent-color: var(--sound); width: 17px; height: 17px; flex: none; }
.plan-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-pick label { border: 2px solid var(--line); border-radius: var(--radius); padding: 12px; cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.plan-pick input { accent-color: var(--sound); }
.plan-pick label:has(input:checked) { border-color: var(--sound); background: #eef4f3; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
.limit { font-size: 14px; color: var(--muted); margin-top: 4px; }
.limit.over { color: var(--error); font-weight: 600; }
.hp { position: absolute; left: -5000px; }
.form-status { margin-top: 14px; font-weight: 600; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--error); }
.done { background: #fff; border: 2px solid var(--ok); border-radius: var(--radius); padding: 28px; }

/* faq */
.faq { max-width: 800px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--sound-2); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--muted); max-width: 42em; }

/* footer */
footer { background: var(--ink); color: #c9d1d0; padding: 40px 0; font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
footer a { color: #fff; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- helper chat ---------- */
.helper-btn { position: fixed; right: 18px; bottom: 18px; z-index: 50; background: var(--sound); color: #fff;
  border: 0; border-radius: 28px; padding: 13px 18px; font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); display: flex; gap: 8px; align-items: center; }
.helper-btn:hover { background: var(--sound-2); }
.helper { position: fixed; right: 18px; bottom: 82px; z-index: 50; width: min(380px, calc(100vw - 36px));
  max-height: min(560px, calc(100vh - 110px)); background: #fff; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.28);
  display: flex; flex-direction: column; overflow: hidden; }
.helper[hidden] { display: none; }
.helper-head { background: var(--sound); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.helper-head strong { font-stretch: 112%; }
.helper-head button { background: transparent; border: 0; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.helper-log { padding: 14px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.msg { padding: 10px 12px; border-radius: 10px; max-width: 88%; line-height: 1.45; }
.msg.bot { background: #eef2f1; align-self: flex-start; }
.msg.me { background: var(--sound); color: #fff; align-self: flex-end; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--sound-2); color: var(--sound-2); background: #fff; border-radius: 16px; padding: 5px 10px; font: inherit; font-size: 14px; cursor: pointer; }
.chips button:hover { background: #eef4f3; }
.helper-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.helper-form input { flex: 1; padding: 10px; }
.helper-form button { background: var(--sound); color: #fff; border: 0; border-radius: var(--radius); padding: 0 14px; font: inherit; font-weight: 700; cursor: pointer; }
.ask-form { display: flex; flex-direction: column; gap: 8px; }
.ask-form input, .ask-form textarea { font-size: 15px; padding: 8px 10px; }
.ask-form button { align-self: flex-start; }

/* legal pages */
.legal { max-width: 760px; padding: 48px 20px 72px; }
.legal h1 { font-size: 40px; font-stretch: 112%; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.legal h2 { font-size: 22px; margin-top: 32px; }
.legal p, .legal li { color: #2c393c; }
