/* JuriSite web styles: search-first home, live progress, site dossier report. */
:root {
  --navy: #0a1f3a;
  --blue: #1569b3;
  --blue-brand: #167bce;
  --blue-soft: #e4effa;
  --green: #18713c;
  --green-brand: #5fb043;
  --green-soft: #e7f5ea;
  --amber: #99560a;
  --amber-soft: #fbf0dc;
  --red: #b42318;
  --red-soft: #fff1f0;
  --ink: #17212b;
  --muted: #56636f;
  --faint: #8193a7;
  --line: #d5dfe9;
  --line-strong: #b7c7d8;
  --bg: #f1f5fa;
  --surface: #ffffff;
  --surface-2: #f1f5fa;
  --shadow: 0 1px 2px rgb(10 31 58 / 6%), 0 10px 28px rgb(10 31 58 / 8%);
  --radius: 10px;
  /* Midnight: the report's dark band color and its on-dark text. */
  --dark: #0a1f3a;
  --dark-2: #173459;
  --on-dark-muted: #c9d3da;
  --on-dark-accent: #8cc8f5;
  --font-body: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, ui-monospace, monospace;
  color: var(--ink);
  background: #fff;
  font-family: var(--font-body);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font-body); display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }
h1, h2, h3, h4 { color: var(--navy); font-family: var(--font-display); line-height: 1.15; text-wrap: balance; }
a { color: var(--blue); }
a:hover { color: var(--navy); }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; }
.eyebrow { color: var(--blue); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; margin: 0 0 0.6rem; text-transform: uppercase; }
button:focus-visible, input:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--blue-brand); outline-offset: 2px; }

/* Buttons */
button, .button-link {
  align-items: center; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
  color: var(--ink); cursor: pointer; display: inline-flex; font: 600 0.92rem/1 var(--font-body);
  gap: 0.4rem; justify-content: center; margin: 0; min-height: 2.6rem; padding: 0.65rem 1rem; text-decoration: none;
}
button:hover, .button-link:hover { border-color: var(--blue); color: var(--navy); }
.button-primary, #generate-report { background: var(--blue); border-color: var(--blue); color: #fff; }
.button-primary:hover, #generate-report:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
button:disabled:hover { background: inherit; }
#generate-report:disabled:hover { background: var(--blue); border-color: var(--blue); }

/* Header and footer */
.site-header {
  align-items: center; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; justify-content: space-between; padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  position: sticky; top: 0; z-index: 5;
}
.brand { align-items: center; display: inline-flex; gap: 0.6rem; text-decoration: none; }
.brand-mark { display: block; height: 36px; width: 36px; }
.brand-word { font: 800 1.45rem/1 var(--font-display); letter-spacing: -0.02em; }
.brand-word.small { font-size: 1rem; }
.brand-juri { color: var(--navy); }
.brand-site { color: var(--blue-brand); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.site-header nav a { border-radius: 6px; color: var(--muted); font-size: 0.92rem; font-weight: 600; padding: 0.5rem 0.75rem; text-decoration: none; }
.site-header nav a:hover { background: var(--surface-2); color: var(--navy); }
.site-header nav a[aria-current="page"] { background: var(--blue-soft); color: var(--navy); }
.site-footer {
  border-top: 1px solid var(--line); color: var(--muted); display: flex; flex-wrap: wrap; font-size: 0.82rem;
  gap: 0.5rem 1.5rem; padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
}
.terms-cue { color: var(--muted); font-size: 0.86rem; line-height: 1.45; margin: 0.75rem 0 0; max-width: 75ch; }
.terms-page { margin: 0 auto; max-width: 72rem; padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem; width: 100%; }
.terms-article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 auto; max-width: 55rem; padding: clamp(1.25rem, 4vw, 3rem); }
.terms-article > h1 { font-size: clamp(2rem, 5vw, 2.7rem); margin: 0 0 1rem; }
.terms-document-title { color: var(--navy); font-size: 1.25rem; font-weight: 700; margin: 0 0 0.75rem; }
.terms-draft-notice { background: var(--amber-soft); border-left: 4px solid var(--amber); border-radius: 4px; color: var(--ink); margin: 0 0 1.5rem; padding: 0.8rem 1rem; }
.terms-summary { background: var(--blue-soft); border-radius: 8px; margin: 0 0 1.5rem; padding: 1rem 1.2rem; }
.terms-summary h2 { font-size: 1rem; margin: 0 0 0.4rem; }
.terms-summary p { margin: 0; }
.terms-article section { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1.25rem; }
.terms-article section h2 { font-size: 1.3rem; margin: 0 0 0.75rem; }
.terms-article section p, .terms-article > p { line-height: 1.7; margin: 0 0 0.9rem; max-width: 75ch; overflow-wrap: anywhere; }
.pricing-page { margin: 0 auto; max-width: 76rem; padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem; width: 100%; }
.pricing-intro { margin: 0 auto 1.5rem; max-width: 58rem; }
.pricing-intro h1 { font-size: clamp(2rem, 5vw, 2.7rem); margin: 0 0 0.75rem; }
.pricing-intro > p:not(.eyebrow) { max-width: 72ch; }
.pricing-billing-switch { border: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.pricing-billing-switch legend { color: var(--navy); font-weight: 700; margin-bottom: 0.4rem; }
.pricing-billing-switch label { align-items: center; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; display: inline-flex; gap: 0.4rem; padding: 0.45rem 0.8rem; }
.pricing-billing-switch label:has(input:checked) { background: var(--blue-soft); border-color: var(--blue); color: var(--navy); font-weight: 700; }
.pricing-billing-switch span { color: var(--green); font-size: 0.82rem; font-weight: 700; }
.pricing-billing-note { color: var(--muted); font-size: 0.86rem; margin: 0.5rem 0 0; }
.pricing-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pricing-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; padding: clamp(1.25rem, 3vw, 2rem); }
.pricing-card h2 { font-size: 1.3rem; margin: 0 0 0.75rem; }
.pricing-amount { color: var(--navy); font-size: clamp(2.3rem, 5vw, 3rem); font-weight: 750; letter-spacing: -0.04em; line-height: 1; margin: 0.3rem 0 0.6rem; }
.pricing-currency { font-size: 1.3rem; vertical-align: top; }
.pricing-period { color: var(--muted); font-size: 0.95rem; font-weight: 600; letter-spacing: 0; }
.pricing-annual-equivalent { color: var(--green); font-size: 0.88rem; font-weight: 700; margin: 0 0 0.5rem; }
.pricing-volume { color: var(--blue); font-weight: 700; margin: 0 0 0.25rem; }
.pricing-card .button-link { align-self: flex-start; margin-top: auto; }
.pricing-custom { font-size: 2.4rem; }
.pricing-enterprise-note { color: var(--muted); font-size: 0.86rem; margin-top: auto; }
.pricing-value { margin: clamp(2rem, 5vw, 3.5rem) auto 0; }
.pricing-value-heading { margin: 0 auto 1.25rem; max-width: 58rem; }
.pricing-value-heading h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 0.65rem; }
.pricing-value-heading > p:last-child { color: var(--muted); line-height: 1.6; max-width: 72ch; }
.pricing-value-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pricing-value-grid article { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--on-dark-accent); border-radius: var(--radius); padding: 1.25rem; }
.pricing-value-grid h3 { color: var(--navy); font-size: 1.05rem; margin: 0 0 0.55rem; }
.pricing-value-grid p { color: var(--muted); line-height: 1.6; margin: 0; }
.pricing-details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 1rem auto 0; max-width: 58rem; padding: clamp(1.25rem, 3vw, 2rem); }
.pricing-details h2 { font-size: 1.3rem; margin: 0 0 0.75rem; }
.pricing-details p { line-height: 1.65; max-width: 78ch; }
@media (max-width: 760px) { .pricing-grid, .pricing-value-grid { grid-template-columns: 1fr; } }

/* Notices */
.notice, .boundary-note, .help-text { color: var(--muted); }
.notice { background: var(--blue-soft); border-radius: 8px; margin: 0; padding: 0.7rem 0.9rem; }
.notice-success { background: var(--green-soft); color: #18713c; font-weight: 700; }
.notice-error { background: var(--red-soft); color: var(--red); font-weight: 700; }

/* Status chips */
.chip {
  align-items: center; border-radius: 999px; display: inline-flex; flex: 0 0 auto; font: 700 0.72rem/1 var(--font-body);
  gap: 0.35rem; letter-spacing: 0.01em; padding: 0.35rem 0.6rem; white-space: nowrap;
}
.chip::before { background: currentColor; border-radius: 50%; content: ""; height: 0.45rem; width: 0.45rem; }
.chip-ok, .chip-done { background: var(--green-soft); color: var(--green); }
.chip-prov, .chip-action { background: var(--amber-soft); color: var(--amber); }
.chip-na, .chip-unavailable { background: var(--surface-2); color: var(--muted); }
.chip-off, .chip-skipped, .chip-pending { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }
.chip-off::before, .chip-skipped::before, .chip-pending::before { background: transparent; border: 1.5px solid currentColor; height: 0.3rem; width: 0.3rem; }
.chip-info { background: var(--blue-soft); color: var(--blue); }
.chip-running { background: var(--blue-soft); color: var(--blue); }
.chip-running::before { animation: pulse 1.2s ease-in-out infinite; }
.chip-error { background: var(--red-soft); color: var(--red); }
@keyframes pulse { 50% { opacity: 0.25; } }

/* ---------- Home: search-first ---------- */
.home-page { margin: 0 auto; max-width: 72rem; padding: 0 clamp(1rem, 4vw, 2.5rem) 3rem; width: 100%; }
.hero {
  background:
    radial-gradient(ellipse at 85% 10%, rgb(22 123 206 / 12%), transparent 55%),
    radial-gradient(ellipse at 5% 100%, rgb(95 176 67 / 10%), transparent 50%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgb(12 56 107 / 6%) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgb(12 56 107 / 6%) 39px 40px),
    var(--surface);
  border: 1px solid var(--line); border-radius: 0 0 18px 18px; border-top: 0;
  margin: 0 calc(-1 * clamp(1rem, 4vw, 2.5rem)); padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2.5rem) clamp(1.75rem, 4vw, 2.75rem);
}
.hero-inner { margin: 0 auto; max-width: 52rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.04; margin: 0; }
.hero h1 span { color: var(--blue-brand); display: block; }
.hero-lede { color: var(--muted); font-size: 1.08rem; margin: 1rem 0 0; max-width: 60ch; }
.search-card { margin-top: 1.75rem; }
.search-mode-tabs { display: flex; gap: 0.45rem; margin: 0 0 0.85rem; }
.search-mode-tabs button { background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-weight: 700; padding: 0.55rem 1rem; }
.search-mode-tabs button[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.parcel-id-fields { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.parcel-id-field { color: var(--navy); display: grid; font-size: 0.85rem; font-weight: 700; gap: 0.4rem; }
.parcel-id-fields select, .parcel-id-input-row input { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); font: inherit; min-height: 2.75rem; min-width: 0; padding: 0.55rem 0.7rem; }
.parcel-id-input-label { grid-column: 1 / -1; }
.parcel-id-input-row { display: flex; gap: 0.5rem; }
.parcel-id-input-row input { flex: 1 1 auto; }
.parcel-id-input-row button, .parcel-id-result button { min-height: 2.75rem; padding: 0.5rem 1rem; }
.parcel-id-results { margin-top: 0.85rem; }
.parcel-id-results h3 { font-size: 0.95rem; margin: 0 0 0.5rem; }
.parcel-id-result { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 0.75rem; margin: 0.45rem 0; padding: 0.7rem 0.8rem; }
.parcel-id-result h4, .parcel-id-result p { margin: 0; }
.parcel-id-result h4 { font-size: 0.9rem; overflow-wrap: anywhere; }
.parcel-id-result button { grid-column: 2; grid-row: 1; }
.parcel-id-result p { color: var(--muted); font-size: 0.8rem; grid-column: 1 / -1; margin-top: 0.2rem; }
.parcel-id-confirm[hidden], .parcel-id-results[hidden], .parcel-id-map[hidden], .submission-recovery[hidden] { display: none; }
.submission-recovery { background: #fff7df; border: 1px solid #c8a95b; border-radius: 8px; margin-top: 0.75rem; padding: 0.8rem; }
.submission-recovery p { margin: 0 0 0.6rem; overflow-wrap: anywhere; }
.parcel-id-confirm { margin-top: 0.65rem; width: 100%; }
.parcel-id-map { margin: 0.75rem 0 0; }
.parcel-id-map svg { background: #edf4f6; border: 1px solid var(--line); border-radius: 8px; max-height: 280px; width: 100%; }
.parcel-id-map figcaption { color: var(--muted); font-size: 0.78rem; margin-top: 0.35rem; }
.parcel-id-map-boundary { fill: #c9e8dc; fill-rule: evenodd; stroke: #28755c; stroke-width: 2; vector-effect: non-scaling-stroke; }
.search-submit-row { justify-content: flex-end; margin-top: 0.8rem; }
.search-submit-row #generate-report { width: 100%; }
.location-picker > label { color: var(--navy); display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 0.45rem; }
.search-row {
  background: var(--surface); border: 2px solid var(--blue); border-radius: 12px; box-shadow: var(--shadow);
  display: flex; gap: 0.5rem; padding: 0.4rem;
}
.search-row:focus-within { border-color: var(--navy); box-shadow: 0 0 0 4px rgb(22 123 206 / 18%), var(--shadow); }
#address {
  background: transparent; border: 0; color: var(--ink); flex: 1 1 auto; font: 500 1.05rem/1.3 var(--font-body);
  min-width: 0; padding: 0.7rem 0.75rem;
}
#address:focus-visible { outline: none; }
#address::placeholder { color: var(--faint); }
#generate-report { font-size: 0.98rem; min-height: 3rem; padding: 0 1.3rem; }
.address-caveat { font-size: 0.82rem; margin: 0.55rem 0 0.9rem; }
.home-status { font-size: 0.9rem; }

.report-options { border: 0; margin: 1.25rem 0 0; min-width: 0; padding: 0; }
.report-options-summary { color: var(--navy); cursor: pointer; display: list-item; font-size: 0.85rem; font-weight: 700; list-style: none; padding-right: 1.25rem; position: relative; }
.report-options-summary::-webkit-details-marker { display: none; }
.report-options-summary::marker { content: ""; }
.report-options-summary::after { border-bottom: 2px solid currentColor; border-right: 2px solid currentColor; content: ""; height: 0.42rem; position: absolute; right: 0.15rem; top: 0.15rem; transform: rotate(45deg); transition: transform 120ms ease; width: 0.42rem; }
.report-options[open] > .report-options-summary::after { transform: rotate(225deg); }
.report-options-body { border: 0; margin: 0.65rem 0 0; min-width: 0; padding: 0; }
#report-options-count { background: var(--blue-soft); border-radius: 999px; color: var(--blue); display: inline-block; font-size: 0.72rem; margin-left: 0.6rem; padding: 0.25rem 0.55rem; }
.check-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.check-chip { cursor: pointer; position: relative; }
.check-chip input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.check-chip span {
  align-items: center; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--muted); display: inline-flex; font-size: 0.85rem; font-weight: 600; gap: 0.4rem; padding: 0.45rem 0.8rem;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.check-chip span::before {
  border: 1.5px solid var(--line-strong); border-radius: 4px; content: ""; flex: 0 0 auto; height: 0.8rem; width: 0.8rem;
}
.check-chip input:checked + span { background: var(--blue-soft); border-color: var(--blue); color: var(--navy); }
.check-chip input:checked + span::before {
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.2 2.2 4.8-4.9' stroke='white' stroke-width='1.8' fill='none'/%3E%3C/svg%3E") center / 100% no-repeat;
  border-color: var(--blue);
}
.check-chip input:focus-visible + span { outline: 3px solid var(--blue-brand); outline-offset: 2px; }
.check-chip input:disabled + span { cursor: not-allowed; opacity: 0.5; }
.check-chip:hover input:not(:disabled) + span { border-color: var(--blue); }
.check-chip-ai input:checked + span { background: #f1ecfd; border-color: #6541b5; color: #4b2f8f; }
.check-chip-ai input:checked + span::before { background-color: #6541b5; border-color: #6541b5; }
.ai-options { border-top: 1px dashed var(--line); margin-top: 0.9rem; padding-top: 0.8rem; }
.ai-options-label { align-items: center; color: var(--muted); display: flex; flex-wrap: wrap; font-size: 0.82rem; gap: 0.5rem; margin: 0 0 0.55rem; }
.call-badge { border-radius: 999px; font-size: 0.65rem; letter-spacing: 0.05em; padding: 0.28rem 0.5rem; white-space: nowrap; }
.openai-badge { background: #f1ecfd; color: #6541b5; }
.option-footnote { font-size: 0.78rem; margin: 0.9rem 0 0; }

/* Live progress */
.run-progress {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  margin: 0.55rem auto 0; max-width: 72rem; padding: 0.65rem clamp(0.8rem, 2vw, 1.1rem);
}
.run-progress-row { align-items: center; display: grid; gap: 0.45rem 0.65rem; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.65fr) auto; }
.run-progress-row h2 { font-size: 0.9rem; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-elapsed { color: var(--muted); font: 0.82rem var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter { background: var(--surface-2); border-radius: 999px; height: 0.55rem; margin: 0; overflow: hidden; position: relative; }
.meter i { background: linear-gradient(90deg, var(--green-brand), var(--blue-brand)); display: block; height: 100%; width: 0; }
.run-progress-summary { color: var(--muted); font-size: 0.76rem; line-height: 1.4; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.reopen-parcel { font-size: 0.8rem; grid-column: 3 / -1; justify-self: end; min-height: 2.2rem; padding: 0.45rem 0.7rem; white-space: nowrap; }
.reopen-parcel[hidden] { display: none; }
.loading-stage, .parcel-choice-reminder {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  margin: 0.65rem auto 0; max-width: 72rem; padding: clamp(0.85rem, 2vw, 1.25rem);
}
.loading-stage[hidden], .parcel-choice-reminder[hidden] { display: none; }
.loading-stage { display: flex; flex-direction: column; gap: 0.85rem; height: min(34rem, calc(100dvh - 15.5rem)); min-height: 19rem; overflow: hidden; }
.loading-stage-intro { align-items: stretch; display: grid; gap: 1rem; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.loading-stage-intro .eyebrow { margin-bottom: 0.25rem; }
.loading-stage-intro h2 { font-size: clamp(1.1rem, 2vw, 1.5rem); margin: 0 0 0.3rem; }
.loading-stage-intro > div:first-child > p:last-child { color: var(--muted); font-size: 0.82rem; line-height: 1.4; margin: 0; }
.loading-quip { align-items: center; background: linear-gradient(120deg, var(--blue-soft), #f2f8ee); border-radius: 10px; display: flex; gap: 0.75rem; min-height: 5.5rem; padding: 0.8rem 1rem; }
.loading-quip-mark { color: var(--green); font-size: 1.8rem; line-height: 1; }
.loading-quip p { color: var(--navy); font: 700 clamp(0.95rem, 1.7vw, 1.25rem)/1.25 var(--font-display); margin: 0; }
.live-results { align-items: stretch; display: grid; flex: 1 1 0; gap: 0.85rem; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); min-height: 0; overflow-y: auto; }
.live-map { align-self: start; margin: 0; min-width: 0; }
.live-map-frame { aspect-ratio: 16 / 9; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; position: relative; width: 100%; }
.live-map-placeholder { color: var(--muted); font-size: 0.8rem; inset: 0; margin: 0; place-items: center; position: absolute; display: grid; }
.live-map-frame svg { display: block; height: 100%; width: 100%; }
.live-map-image { opacity: 0; transition: opacity 0.5s ease; }
.live-map-image.is-ready { opacity: 1; }
.live-map-outline { fill: rgba(255, 255, 255, 0.14); stroke: #fff; stroke-linejoin: round; stroke-width: 2.5; }
.live-map-halo { fill: none; stroke: rgba(15, 23, 42, 0.55); stroke-linejoin: round; stroke-width: 5.5; }
.live-map-point { fill: var(--blue); stroke: #fff; stroke-width: 2.5; }
.live-map-point-halo { fill: rgba(255, 255, 255, 0.35); stroke: rgba(15, 23, 42, 0.6); stroke-width: 1.5; }
.live-map-caption { color: var(--muted); font-size: 0.68rem; margin: 0.3rem 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-map-caption[hidden] { display: none; }
.live-feed-column { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.live-feed { display: grid; gap: 0.45rem; list-style: none; margin: 0; padding: 0; }
.live-feed-item { animation: live-in 0.35s ease both; background: #f8fafc; border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: 8px; display: grid; gap: 0.2rem 0.6rem; grid-template-columns: minmax(0, 1fr) auto; min-width: 0; padding: 0.5rem 0.7rem; }
.live-feed-item[data-kind="ok"] { border-left-color: var(--green-brand); }
.live-feed-item[data-kind="flag"], .live-feed-item[data-kind="error"] { border-left-color: var(--red); }
.live-feed-item[data-kind="prov"] { border-left-color: var(--amber); }
.live-feed-item[data-kind="info"] { border-left-color: var(--blue); }
.live-feed-title { color: var(--navy); font-size: 0.82rem; font-weight: 800; min-width: 0; }
.live-feed-meaning { color: var(--muted); font-size: 0.76rem; grid-column: 1 / -1; line-height: 1.35; margin: 0; overflow-wrap: anywhere; }
.live-pending { color: var(--muted); font-size: 0.76rem; margin: 0; }
.live-pending[hidden] { display: none; }
@keyframes live-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .loading-stage { height: auto; min-height: 0; overflow: visible; }
  .live-results { flex: none; grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .live-map-frame { aspect-ratio: auto; height: 10rem; max-height: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .live-feed-item { animation: none; }
  .live-map-image { transition: none; }
}
.check-diagnostics { color: var(--muted); display: grid; gap: 0.25rem; font-size: 0.72rem; max-height: 7rem; overflow: auto; }
.check-diagnostics p { margin: 0; }
.check-diagnostics strong { color: var(--navy); }
.saved-generation { margin: 1rem 0 1.25rem; }
.saved-generation .run-progress, .saved-generation .loading-stage { max-width: none; }
.saved-generation .run-progress { margin-top: 0; }
.saved-generation .loading-stage { height: auto; min-height: 0; overflow: visible; }
.saved-generation .live-results { flex: none; min-height: auto; overflow: visible; }
.saved-run-progress { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.8rem 1rem; }
.saved-checks { color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; list-style: none; margin: 0.55rem 0 0; padding: 0; }
.saved-checks li { font-size: 0.75rem; }
.saved-generation.notice-error { border-left: 4px solid var(--red); padding-left: 0.75rem; }
.source-diagnostics { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; margin: 1rem 0; padding: 0.85rem 1rem; }
.source-diagnostics h2 { font-size: 1rem; margin: 0 0 0.45rem; }
.source-diagnostics ul { margin: 0; padding-left: 1.2rem; }
.source-diagnostics li { color: var(--muted); margin: 0.25rem 0; }
.parcel-choice-reminder { align-items: center; display: flex; flex-direction: column; gap: 0.55rem; justify-content: center; min-height: min(25rem, calc(100dvh - 16rem)); text-align: center; }
.parcel-choice-reminder h2, .parcel-choice-reminder p { margin: 0; }
.parcel-choice-reminder p { color: var(--muted); }
.run-steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.run-steps > li {
  align-items: center; border-bottom: 1px dashed var(--line); column-gap: 0.75rem; counter-increment: step;
  display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; padding: 0.7rem 0;
}
.run-steps > li:last-child { border-bottom: 0; }
.run-steps > li::before {
  align-items: center; background: var(--surface-2); border-radius: 50%; color: var(--muted); content: counter(step);
  display: flex; font-size: 0.75rem; font-weight: 700; height: 1.6rem; justify-content: center; width: 1.6rem;
}
.run-step-name { font-weight: 600; }
.run-step-name small { color: var(--muted); display: block; font-size: 0.78rem; font-weight: 400; }

/* Parcel review */
.home-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1rem, 3vw, 1.75rem); }
.parcel-review { margin: 1.5rem auto 0; max-width: 72rem; }
.parcel-review h2 { font-size: 1.35rem; margin: 0 0 0.8rem; }
.parcel-review > .help-text { font-size: 0.9rem; margin: 0.8rem 0 1rem; }
.parcel-layout { align-items: start; display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.7fr); }
.parcel-map-panel, .parcel-list-panel { min-width: 0; }
.parcel-map-panel { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.parcel-map { background: #eef2e6; display: block; height: auto; max-height: 65vh; min-height: 18rem; width: 100%; }
.parcel-map.is-zoomed { cursor: grab; touch-action: none; }
.parcel-map.is-dragging, .parcel-map.is-dragging .parcel-shape { cursor: grabbing; }
.parcel-shape { cursor: pointer; fill: #95b8d5; fill-opacity: 0.35; stroke: #24567c; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.parcel-shape:hover, .parcel-shape:focus { fill-opacity: 0.65; outline: none; stroke: #102f49; stroke-width: 2.5; }
.parcel-shape.is-selected { fill: var(--blue-brand); fill-opacity: 0.45; stroke: var(--navy); stroke-width: 3; }
.census-point { fill: #d97706; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.parcel-halo { fill: none; pointer-events: none; stroke: #fff; stroke-width: 0; vector-effect: non-scaling-stroke; }
.census-point-halo { fill: none; pointer-events: none; stroke: none; }
.map-tools { align-items: center; background: var(--surface); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; font-size: 0.8rem; gap: 0.6rem; padding: 0.4rem 0.65rem; }
.map-navigation { align-items: center; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.map-navigation[hidden] { display: none; }
.map-tools button { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; font: inherit; padding: 0.25rem 0.55rem; }
.map-tools button:disabled { cursor: default; opacity: 0.55; }
.map-zoom-level { color: var(--muted); min-width: 3.2rem; text-align: center; }
.map-pan-hint { color: var(--muted); }
.map-tools .aerial-toggle[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue); }
.map-tools .aerial-credit { color: #4b5563; }
.parcel-map.has-aerial .parcel-halo { stroke-opacity: 0.95; stroke-width: 5.5; }
.parcel-map.has-aerial .parcel-halo.is-selected { stroke-width: 9; }
.parcel-map.has-aerial .parcel-shape { fill: #fff; fill-opacity: 0.12; stroke: #1d8fff; stroke-width: 2.2; }
.parcel-map.has-aerial .parcel-shape:hover, .parcel-map.has-aerial .parcel-shape:focus { fill-opacity: 0.35; stroke: #00b8e6; stroke-width: 3; }
.parcel-map.has-aerial .parcel-shape.is-selected { fill: #ffb800; fill-opacity: 0.3; stroke: #ff5a00; stroke-width: 4; }
.parcel-map.has-aerial .census-point-halo { stroke: #fff; stroke-opacity: 0.9; stroke-width: 3; vector-effect: non-scaling-stroke; }
.parcel-map.has-aerial .census-point { stroke-width: 3; }
.parcel-map.has-aerial .census-point-label { fill: #fff; stroke: #000; stroke-width: 3.5px; }
.census-point-label { fill: #7c3d06; font-size: 12px; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-linejoin: round; stroke-width: 3px; }
.map-legend { align-items: center; background: var(--surface); display: flex; flex-wrap: wrap; font-size: 0.8rem; gap: 0.4rem; margin: 0; padding: 0.65rem; }
.map-legend span { border: 1px solid #24567c; display: inline-block; height: 0.8rem; margin-left: 0.4rem; width: 0.8rem; }
.map-legend .legend-parcel { background: #95b8d5; }
.map-legend .legend-selected { background: var(--blue-brand); border-color: var(--navy); }
.map-legend .legend-point { background: #d97706; border-color: #7c3d06; border-radius: 50%; }
.parcel-list-panel h3 { font-size: 1rem; margin-top: 0; }
.parcel-list-panel select { border: 1px solid var(--line-strong); border-radius: 6px; display: block; font: inherit; margin: 0.35rem 0 0.8rem; padding: 0.45rem; width: 100%; }
.parcel-list { display: grid; gap: 0.55rem; max-height: min(65vh, 26rem); overflow-y: auto; padding-right: 0.25rem; scrollbar-gutter: stable; }
.parcel-list:focus-visible { outline: 3px solid var(--blue-brand); outline-offset: 2px; }
.parcel-choice { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.parcel-choice.is-selected { background: var(--blue-soft); border: 2px solid var(--blue); }
.parcel-choice label { align-items: start; cursor: pointer; display: flex; gap: 0.7rem; padding: 0.7rem; }
.parcel-choice input { accent-color: var(--blue); flex: 0 0 auto; margin: 0.2rem 0 0; width: auto; }
.parcel-choice-body { display: grid; gap: 0.2rem; min-width: 0; overflow-wrap: anywhere; }
.parcel-choice-body strong { color: var(--navy); }
.parcel-choice-body span { color: var(--muted); font-size: 0.86rem; }
.parcel-pagination { align-items: center; display: flex; gap: 0.5rem; justify-content: space-between; margin-top: 0.8rem; }
.parcel-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.parcel-actions[hidden] { display: none; }
.parcel-dialog { border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 70px rgb(10 30 55 / 28%); height: calc(100dvh - 1rem); max-height: calc(100dvh - 1rem); max-width: none; overflow: hidden; padding: 0; width: min(96vw, 78rem); }
.parcel-dialog::backdrop { background: rgb(12 25 42 / 58%); backdrop-filter: blur(2px); }
.parcel-dialog[open] { display: block; }
.parcel-dialog .parcel-review { display: flex; flex-direction: column; height: 100%; margin: 0; max-height: 100%; max-width: none; min-height: 0; overflow: hidden; padding: clamp(0.75rem, 2vw, 1.25rem); }
.parcel-dialog-head { align-items: center; display: flex; flex: 0 0 auto; gap: 0.75rem; justify-content: space-between; }
.parcel-dialog-head h2 { font-size: 1.25rem; margin: 0; }
.parcel-dialog-caption { color: var(--muted); font-size: 0.82rem; margin: 0.2rem 0 0; }
.parcel-dialog .parcel-dialog-head button { flex: 0 0 auto; min-height: 2.25rem; padding: 0.45rem 0.7rem; }
.parcel-dialog #parcel-status { flex: 0 0 auto; margin-top: 0.55rem; max-height: 4rem; overflow: auto; padding: 0.45rem 0.65rem; }
.parcel-dialog .parcel-review > .help-text { flex: 0 0 auto; font-size: 0.8rem; margin: 0.4rem 0 0.55rem; }
.parcel-dialog .parcel-layout { align-items: stretch; flex: 1 1 0; grid-template-columns: minmax(0, 1.25fr) minmax(15rem, 0.75fr); grid-template-rows: minmax(0, 1fr); min-height: 0; }
.parcel-dialog .parcel-map-panel, .parcel-dialog .parcel-list-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }
.parcel-dialog .parcel-map { flex: 1 1 auto; height: auto; max-height: none; min-height: 9rem; }
.parcel-dialog .map-legend { flex: 0 0 auto; }
.parcel-dialog .parcel-list-panel h3 { flex: 0 0 auto; margin: 0 0 0.4rem; }
.parcel-dialog .parcel-list { flex: 1 1 0; max-height: none; min-height: 0; overflow-y: auto; }
.parcel-dialog #parcel-source-control { flex: 0 0 auto; }
.parcel-dialog .parcel-pagination { flex: 0 0 auto; }
.parcel-dialog-footer { background: var(--surface); border-top: 1px solid var(--line); flex: 0 0 auto; margin-top: 0.5rem; padding-top: 0.55rem; }
.parcel-dialog .parcel-actions { margin: 0; }
.parcel-dialog.is-inline { height: min(34rem, calc(100dvh - 15.5rem)); inset: auto; margin: 0.65rem auto 0; max-height: none; min-height: 19rem; position: relative; width: 100%; }
.parcel-dialog.is-inline::backdrop { display: none; }
.parcel-dialog.is-inline .parcel-dialog-caption { display: none; }
.parcel-dialog.is-inline .parcel-map-panel { overscroll-behavior: contain; overflow-x: hidden; overflow-y: auto; }
.parcel-dialog.is-inline .parcel-map { min-height: 6.5rem; }
.parcel-dialog.is-inline .map-pan-hint { display: none; }
.parcel-dialog.is-inline .map-tools { font-size: 0.72rem; gap: 0.3rem; padding: 0.25rem 0.4rem; }
.home-workflow-active .home-page { padding-bottom: 0.65rem; padding-top: 0.7rem; }
.home-workflow-active .hero, .home-workflow-active .how { display: none; }
.home-workflow-active .site-footer { padding-bottom: 0.65rem; padding-top: 0.65rem; }

/* How it works */
.how { margin: 3rem auto 0; max-width: 72rem; }
.how h2 { font-size: 1.4rem; margin: 0 0 1rem; }
.how-steps { counter-reset: how; display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.how-steps li { border-top: 3px solid var(--line); counter-increment: how; display: grid; gap: 0.3rem; padding-top: 0.9rem; }
.how-steps li:first-child { border-top-color: var(--green-brand); }
.how-steps li::before { color: var(--blue); content: "Step " counter(how); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.how-steps strong { color: var(--navy); font-size: 1.05rem; }
.how-steps span { color: var(--muted); font-size: 0.92rem; }
.source-strip { border-top: 1px solid var(--line); color: var(--muted); display: flex; flex-wrap: wrap; font-size: 0.82rem; font-weight: 600; gap: 0.4rem 1.4rem; margin-top: 2rem; padding-top: 1rem; }

/* ---------- Reports list ---------- */
.content { margin: 0 auto; max-width: 72rem; padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem; width: 100%; }
.page-head { align-items: end; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; margin-bottom: 1.5rem; }
.page-head h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin: 0; }
.saved-reports { margin-top: clamp(1.75rem, 4vw, 3rem); scroll-margin-top: 6rem; }
.saved-reports .page-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.saved-report-search { display: grid; gap: 0.35rem; max-width: 34rem; width: min(100%, 34rem); }
.saved-report-search label { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.saved-report-search-controls { align-items: center; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.saved-report-search input { background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; flex: 1 1 12rem; font: inherit; min-height: 2.6rem; min-width: 0; padding: 0.55rem 0.75rem; }
.report-list { display: grid; gap: 0.9rem; }
.report-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.report-card-head { align-items: start; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; justify-content: space-between; }
.report-card-head p { margin: 0; }
.report-card h2 { font-size: 1.1rem; margin: 0; overflow-wrap: anywhere; }
.report-card h2 a { color: var(--navy); text-decoration: none; }
.report-card h2 a:hover { text-decoration: underline; }
.report-card-new { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.new-report { color: var(--blue); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; margin: 0 0 0.4rem; text-transform: uppercase; }
.report-card-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.report-meta { color: var(--muted); font-size: 0.85rem; margin: 0.35rem 0; overflow-wrap: anywhere; }
.sources-appendix .source-group { border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: 0.9rem; }
.sources-appendix .source-group p, .sources-appendix .source-group a { overflow-wrap: anywhere; }
.status { border-radius: 999px; display: inline-block; font-size: 0.78rem; font-weight: 700; margin: 0; padding: 0.3rem 0.65rem; }
.status-completed { background: var(--green-soft); color: var(--green); }
.status-failed, .status-address-not-found { background: var(--red-soft); color: var(--red); }
.status-pending, .status-researching, .status-generating { background: var(--blue-soft); color: var(--blue); }
.error-message { color: var(--red); margin: 0; }
.empty-state { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); display: grid; gap: 1rem; justify-items: start; padding: 2rem; }
.empty-state p { margin: 0; }
.property-details { display: grid; gap: 0.5rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin: 0.9rem 0 0; }
.property-details div { min-width: 0; }
.property-details dt { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.property-details dd { margin: 0.1rem 0 0; overflow-wrap: anywhere; }

/* ---------- Report: site dossier ---------- */
.dossier { margin: 0 auto; max-width: 78rem; padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem; width: 100%; }
.dossier-head { align-items: end; border-bottom: 3px solid var(--navy); display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; padding-bottom: 1.1rem; }
.dossier-title { min-width: 0; }
.dossier-title h1 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); letter-spacing: -0.015em; margin: 0; overflow-wrap: anywhere; }
.dossier-meta { color: var(--muted); display: flex; flex-wrap: wrap; font-size: 0.88rem; gap: 0.25rem 1.25rem; margin: 0.6rem 0 0; }
.dossier-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.report-delete-control { flex: 1 1 100%; margin-top: 0.35rem; padding: 0.65rem 0.8rem; border: 1px solid var(--line); border-radius: 0.65rem; background: rgb(255 255 255 / 7%); }
.report-delete-control summary { cursor: pointer; font-weight: 700; }
.report-delete-control p { max-width: 58ch; margin: 0.55rem 0; font-size: 0.92rem; }
.report-delete-control form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem 0.8rem; }
.report-delete-control label { display: flex; align-items: flex-start; gap: 0.45rem; font-size: 0.9rem; }
.report-delete-control input { margin-top: 0.2rem; }
/* Account chapter preferences, opened from the report sidebar. */
body.chapter-modal-open { overflow: hidden; }
.chapter-picker { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 24px 80px #00152e55; color: var(--ink); max-height: calc(100dvh - 2rem); max-width: calc(100vw - 2rem); padding: 0; width: 39rem; }
.chapter-picker[open] { display: flex; flex-direction: column; }
.chapter-picker::backdrop { background: #071c35a6; }
.chapter-picker-head { align-items: start; border-bottom: 1px solid var(--line); display: flex; gap: 1rem; justify-content: space-between; padding: 1.1rem 1.25rem; }
.chapter-picker-head h2 { font-size: 1.25rem; margin: 0; }
.chapter-picker-head p { color: var(--muted); font-size: 0.8rem; margin: 0.25rem 0 0; }
.chapter-picker-close { background: transparent; border: 0; color: var(--muted); font-size: 1.6rem; line-height: 1; min-width: 2rem; padding: 0.2rem; }
.chapter-picker-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1rem 1.25rem 0.5rem; }
.chapter-picker-footer { border-top: 1px solid var(--line); padding: 0.5rem 1.25rem 1rem; }
.chapter-picker-help { color: var(--muted); font-size: 0.88rem; margin: 0 0 0.75rem; }
.chapter-list { list-style: none; margin: 0; padding: 0; }
.chapter-list li { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 0.5rem; padding: 0.35rem 0; border-radius: 4px; }
.chapter-list label { align-items: center; display: flex; flex: 1; gap: 0.5rem; min-width: 0; }
.chapter-grip, .chapter-grip-spacer { flex: 0 0 1.9rem; width: 1.9rem; }
.chapter-grip { align-items: center; background: transparent; border: 0; box-shadow: none; color: var(--muted); cursor: grab; display: inline-flex; justify-content: center; min-height: 2.1rem; padding: 0; touch-action: none; user-select: none; }
.chapter-grip:hover { background: var(--surface-2); color: var(--navy); }
.chapter-list li.is-reordering { background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue-brand); }
.chapter-list li.is-reordering .chapter-grip { color: var(--blue-brand); cursor: grabbing; }
.chapter-list.is-pointer-reordering { cursor: grabbing; user-select: none; }
.chapter-pin { color: var(--muted); font-size: 0.72rem; }
.chapter-picker-status { color: var(--muted); font-size: 0.85rem; margin: 0.5rem 0 0; min-height: 1.2em; }
.chapter-picker-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: end; margin-top: 0.5rem; }
.chapter-picker-actions [data-chapter-reset] { margin-right: auto; }
.chapter-list li.chapter-excluded { background: var(--red-soft); }
.chapter-picker-status.is-error { color: var(--red); }
.dossier-sidebar { min-width: 0; position: sticky; top: 5rem; }
.customize-report-button { align-items: center; background: var(--surface); border: 1px solid var(--line-strong); color: var(--navy); display: inline-flex; font-size: 0.88rem; gap: 0.5rem; margin-bottom: 1rem; padding: 0.55rem 0.75rem; }
.customize-report-button[hidden] { display: none; }
.dossier-section.chapter-excluded { background: var(--red-soft); border-color: #e7aaa5; }
.dossier-section.chapter-excluded .report-card { background: #ffffff80; }
.dossier-toc a.chapter-excluded { background: var(--red-soft); border-left: 3px solid var(--red); }
.chapter-excluded-badge { color: var(--red); display: block; font-size: 0.65rem; font-weight: 700; }
.section-head > .chapter-excluded-badge { background: #fff; border: 1px solid #e7aaa5; border-radius: 4px; padding: 0.25rem 0.45rem; }

.dossier-summary {
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 1.25rem 0 0; overflow: hidden;
}
.dossier-summary div { background: var(--surface); padding: 0.85rem 1rem; }
.dossier-summary dt { color: var(--muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.dossier-summary dd { color: var(--navy); font: 700 1.05rem/1.3 var(--font-display); margin: 0.2rem 0 0; overflow-wrap: anywhere; }
.dossier-body { align-items: start; display: grid; gap: 2rem; grid-template-columns: 15rem minmax(0, 1fr); margin-top: 1.75rem; }
.dossier-toc { display: grid; gap: 0.15rem; }
.toc-label { color: var(--muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; margin: 0 0 0.4rem; text-transform: uppercase; }
.dossier-toc a {
  align-items: center; border-radius: 6px; color: var(--ink); display: flex; font-size: 0.88rem; gap: 0.5rem;
  justify-content: space-between; padding: 0.45rem 0.55rem; text-decoration: none;
}
.dossier-toc a:hover { background: var(--surface); box-shadow: var(--shadow); }
.dossier-toc .chip { font-size: 0.64rem; padding: 0.25rem 0.45rem; }
.dossier-sections { display: grid; gap: 1.25rem; min-width: 0; }
.dossier-section {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.6rem); scroll-margin-top: 5rem; min-width: 0;
}
.section-head { align-items: center; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; justify-content: space-between; margin-bottom: 0.9rem; padding-bottom: 0.75rem; }
.section-head h2 { font-size: 1.2rem; margin: 0; }
.dossier-section h3 { font-size: 1rem; margin: 1rem 0 0.4rem; }
.dossier-section h4 { font-size: 0.95rem; margin: 0.9rem 0 0.3rem; }
.dossier-section p { margin: 0.4rem 0; max-width: 80ch; }
.dossier-section .report-card { background: var(--surface-2); border: 0; border-radius: 8px; margin-top: 0.8rem; padding: 0.9rem 1rem; }
.dossier-section .report-card h3 { margin-top: 0; }
.dossier-section .report-card.attribution { background: var(--surface); border: 1px solid var(--line); }
.caveat, .caveat-inline { color: var(--muted); }
.caveat { border-left: 3px solid var(--line-strong); font-size: 0.9rem; padding-left: 0.75rem; }
.finding { color: var(--navy); font-weight: 700; }
.callout { background: var(--surface-2); border-radius: 8px; padding: 0.7rem 0.9rem; }
.callout-prov { background: var(--amber-soft); color: var(--amber); font-weight: 600; }
.aerial-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.aerial-grid figure { margin: 0; }
.aerial-grid figcaption { color: var(--muted); font-size: 0.8rem; margin-top: 0.4rem; }
.aerial-image { background: #e5e9ee; border-radius: 6px; display: block; max-height: 560px; object-fit: contain; width: 100%; }
.terrain-maps { display: flex; flex-wrap: wrap; gap: 1rem; }
.terrain-maps figure { flex: 1 1 260px; margin: 0; max-width: 420px; }
.terrain-maps img { border: 1px solid #59636b; height: auto; image-rendering: pixelated; width: 100%; }
.terrain-maps figcaption { color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.ahj-table-wrap { margin: 1rem 0; max-width: 100%; overflow-x: auto; }
.ahj-table { border-collapse: collapse; font-size: 0.86rem; line-height: 1.4; min-width: 760px; table-layout: fixed; width: 100%; }
.ahj-table th, .ahj-table td { border: 1px solid var(--line); overflow-wrap: anywhere; padding: 0.55rem; text-align: left; vertical-align: top; }
.ahj-table th { background: var(--surface-2); color: var(--navy); font-weight: 700; }
.ahj-table td small { color: var(--muted); display: block; margin-top: 0.2rem; }
.permit-cost-table th:first-child { width: 30%; }
.permit-cost-table th:last-child { width: 24%; }
.permit-cost { font-variant-numeric: tabular-nums; }
.permit-subtotal td { background: var(--surface-2); }
.project-details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 0.35rem 1rem; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); padding: 0.75rem 1rem; }
.project-details[hidden] { display: none; }
.project-details h3 { font-size: 0.95rem; margin: 0 0 0.2rem; }
.project-details h3 .optional { color: var(--muted); font-size: 0.75rem; font-weight: 400; }
.project-details-copy p { color: var(--muted); font-size: 0.8rem; margin: 0; }
.project-details-fields { align-items: end; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.project-details-fields label { color: var(--muted); display: grid; font-size: 0.78rem; gap: 0.2rem; min-width: 0; }
.project-details-fields select { max-width: 100%; }
.project-details-fields select, .project-details-fields input { font: inherit; font-size: 0.88rem; min-height: 2.2rem; padding: 0.3rem 0.5rem; }
.project-details-fields input { width: 10rem; }
.project-details-fields button { min-height: 2.2rem; padding: 0.4rem 0.9rem; }
.project-details-status { color: var(--muted); font-size: 0.8rem; grid-column: 1 / -1; margin: 0; min-height: 1em; }
.project-details-status:empty { display: none; }
.project-details.is-compact { grid-template-columns: 1fr; margin: 0.5rem 0 0.75rem; }
@media (max-width: 720px) { .project-details { grid-template-columns: 1fr; } .project-details-fields input { width: 100%; } .project-details-fields label { flex: 1 1 12rem; } }
.ahj-table td div + div { margin-top: 0.35rem; }

@media (max-width: 900px) {
  .run-progress-row { grid-template-columns: minmax(0, 1fr) auto; }
  .run-progress-row h2 { grid-column: 1; grid-row: 1; }
  .run-elapsed { grid-column: 2; grid-row: 1; }
  .run-progress-row .meter { grid-column: 1 / -1; grid-row: 2; }
  .run-progress-summary { grid-column: 1 / -1; grid-row: 3; }
  .reopen-parcel { grid-column: 1 / -1; grid-row: 4; }
  .dossier-body { grid-template-columns: minmax(0, 1fr); }
  .dossier-sidebar { position: static; }
  .dossier-toc { background: var(--bg); display: flex; gap: 0.35rem; margin: 0 calc(-1 * clamp(1rem, 4vw, 2.5rem)); overflow-x: auto; padding: 0.5rem clamp(1rem, 4vw, 2.5rem); top: 3.6rem; z-index: 2; }
  .toc-label { display: none; }
  .dossier-toc a { background: var(--surface); border: 1px solid var(--line); flex: 0 0 auto; white-space: nowrap; }
  .dossier-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parcel-layout { grid-template-columns: minmax(0, 1fr); }
  .parcel-dialog .parcel-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(8rem, 0.85fr) minmax(6rem, 1.15fr); }
  .parcel-dialog .parcel-map-panel { overscroll-behavior: contain; overflow-x: hidden; overflow-y: auto; }
}
@media (max-width: 600px) {
  .parcel-id-fields { grid-template-columns: minmax(0, 1fr); }
  .parcel-id-input-row { flex-wrap: wrap; }
  .parcel-id-input-row input { width: 100%; }
  .site-header { padding: 0.6rem 1rem; }
  .brand-word { font-size: 1.2rem; }
  .brand-mark { height: 30px; width: 30px; }
  .search-row { flex-direction: column; }
  #generate-report { width: 100%; }
  .how-steps { grid-template-columns: minmax(0, 1fr); }
  .run-progress { padding: 0.55rem 0.65rem; }
  .run-progress-row { gap: 0.35rem 0.55rem; grid-template-columns: minmax(0, 1fr) auto; }
  .run-progress-row h2 { font-size: 0.85rem; grid-column: 1; }
  .run-progress-row .meter { grid-column: 1 / -1; grid-row: 2; }
  .run-elapsed { font-size: 0.72rem; }
  .run-progress-summary { font-size: 0.7rem; }
  .loading-stage { height: auto; min-height: 0; overflow: visible; }
  .loading-stage-intro { grid-template-columns: minmax(0, 1fr); }
  .loading-stage-intro > div:first-child > p:last-child { display: none; }
  .loading-quip { min-height: 3.5rem; padding: 0.55rem 0.7rem; }
  .loading-quip p { font-size: 0.9rem; }
  .reopen-parcel { font-size: 0.72rem; min-height: 1.9rem; padding: 0.35rem 0.45rem; }
  .parcel-map { min-height: 15rem; }
  .parcel-list { max-height: min(50vh, 24rem); }
  .parcel-actions { display: grid; }
  .parcel-actions button { width: 100%; }
  .parcel-dialog { border-radius: 10px; height: calc(100dvh - 0.5rem); max-height: calc(100dvh - 0.5rem); width: calc(100vw - 0.5rem); }
  .parcel-dialog .parcel-review { padding: 0.6rem; }
  .parcel-dialog-head h2 { font-size: 1.05rem; }
  .parcel-dialog-caption, .parcel-dialog .parcel-review > .help-text { font-size: 0.74rem; }
  .parcel-dialog .parcel-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(8rem, 0.85fr) minmax(6rem, 1.15fr); }
  .parcel-dialog .parcel-map { min-height: 7.5rem; }
  .parcel-dialog .map-legend { font-size: 0.67rem; gap: 0.25rem; padding: 0.35rem; }
  .parcel-dialog .map-tools { gap: 0.3rem; padding: 0.3rem; }
  .parcel-dialog .map-pan-hint { display: none; }
  .parcel-dialog .parcel-list { min-height: 6rem; }
  .parcel-dialog .parcel-choice label { padding: 0.45rem; }
  .parcel-dialog-footer { margin-top: 0.35rem; padding-top: 0.35rem; }
  .dossier-summary dd { font-size: 0.95rem; }
  .dossier-actions { width: 100%; }
  .dossier-actions > * { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .chip-running::before { animation: none; }
  .check-retry-spinner, .working-motion { display: none !important; }
  .working-static { display: inline !important; }
}
@media print {
  .site-header, .site-footer, .dossier-sidebar, .dossier-actions, .chapter-picker { display: none; }
  .dossier-body { grid-template-columns: 1fr; }
  .dossier-section { break-inside: avoid-page; border: 0; }
}

/* ---------- Midnight: matches the PDF report ----------
   Dark header band with an accent rule, a light home hero, and a dark report header. */

/* Header: dark band, logo mark in a white circle, short accent rule underneath. */
.site-header { background: var(--dark); border-bottom: 0; }
.check-retry-panel { margin: 0.85rem 0; border-block: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; }
.check-retry-panel > summary { display: flex; align-items: center; gap: 0.5rem; padding: 0.65rem 0; cursor: pointer; list-style: none; }
.check-retry-panel > summary::-webkit-details-marker { display: none; }
.check-retry-panel > summary::after { content: ""; width: 0.35rem; height: 0.35rem; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); margin: -0.2rem 0.2rem 0 0.2rem; }
.check-retry-panel[open] > summary::after { transform: rotate(225deg); margin-top: 0.2rem; }
.check-retry-panel > summary:focus-visible { outline: 2px solid var(--blue-brand); outline-offset: 4px; }
#check-retry-title { color: var(--ink); font-weight: 600; }
.check-retry-count { min-width: 1.25rem; padding: 0.05rem 0.3rem; border-radius: 4px; background: var(--surface-2); text-align: center; font-size: 0.72rem; }
.check-retry-summary-note { margin-left: auto; font-size: 0.75rem; }
.check-retry-running-note { font-size: 0.72rem; }
.check-retry-hide, .check-retry-panel[open] .check-retry-show { display: none; }
.check-retry-panel[open] .check-retry-hide { display: inline; }
.check-retry-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.check-retry-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.check-retry-row:first-child { border-top: 0; }
.check-retry-description { flex: 1; min-width: 0; display: grid; grid-template-columns: 9rem minmax(0, 1fr); align-items: baseline; gap: 0.8rem; }
.check-retry-name { color: var(--ink); text-decoration: none; }
.check-retry-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.check-retry-name strong { font-weight: 550; }
.check-retry-status { line-height: 1.5; }
.check-retry-attempts { color: var(--muted); font-size: 0.71rem; white-space: nowrap; }
.check-retry-attempts:not([hidden]):not(:empty)::before { content: " · "; }
.check-retry-action { flex: 0 0 auto; max-width: 12rem; text-align: right; font-size: 0.74rem; }
.check-retry-action button { background: transparent; border: 1px solid var(--line); border-radius: 4px; box-shadow: none; color: var(--ink); padding: 0.25rem 0.65rem; min-height: 1.9rem; font-size: 0.75rem; font-weight: 500; }
.check-retry-action button:hover { background: var(--surface-2); border-color: var(--line-strong); }
.check-retry-working { display: inline-flex; align-items: center; gap: 0.55rem; }
.check-retry-spinner { width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: check-retry-spin 0.8s linear infinite; }
.working-static { display: none; }
@keyframes check-retry-spin { to { transform: rotate(360deg); } }
.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; }
@media (max-width: 620px) { .check-retry-row { align-items: center; gap: 0.75rem; } .check-retry-description { grid-template-columns: 1fr; gap: 0.1rem; } .check-retry-action { max-width: 7rem; } }
@media (prefers-reduced-motion: reduce) { .check-retry-spinner, .working-motion { display: none !important; } .working-static { display: inline !important; } }
.site-header .brand-mark { background: #fff; border-radius: 50%; padding: 3px; }
.site-header .brand-juri { color: #fff; }
.site-header .brand-site { color: var(--on-dark-accent); }
.site-header nav a { color: var(--on-dark-muted); }
.site-header nav a:hover { background: rgb(255 255 255 / 8%); color: #fff; }
.site-header nav a[aria-current="page"] { background: rgb(140 200 245 / 18%); color: #fff; }

/* The report header runs edge to edge. Clip sideways overflow from a scrollbar. */
body { overflow-x: clip; }
.dossier-head { isolation: isolate; position: relative; }
.dossier-head::before {
  background: url("/static/img/topo-contours.svg") right center / cover no-repeat, var(--dark);
  content: ""; inset: 0 calc(50% - 50vw); position: absolute; z-index: -1;
}

/* Landing pages: top-down city aerials (USDA NAIP, public domain) down both sides on wide
   screens. The layer is fixed, so the cities stay put while the page scrolls over them,
   and it runs the full page height. The side mask fades each image into white. */
body:is(.page-home, .page-how) { background: transparent; }
body:is(.page-home, .page-how)::before {
  --aerial-side: calc((100vw - 64rem) / 2);
  --aerial-width: max(var(--aerial-side), calc(100vh * 960 / 2100));
  --aerial-tint: linear-gradient(rgb(255 255 255 / 68%), rgb(255 255 255 / 68%));
  /* Put each image's landmark (--focus-*, measured from the page edge) 30% into its side
     column, where the fade mask is fully opaque, while the image still fills the column. */
  --aerial-left-x: clamp(calc(var(--aerial-side) - var(--aerial-width)),
    calc(var(--aerial-side) * 0.3 - var(--focus-left, 0.5) * var(--aerial-width)), 0px);
  --aerial-right-x: clamp(calc(var(--aerial-side) - var(--aerial-width)),
    calc(var(--aerial-side) * 0.3 - var(--focus-right, 0.5) * var(--aerial-width)), 0px);
  background:
    var(--aerial-tint) left top / var(--aerial-side) 100% no-repeat,
    var(--aerial-tint) right top / var(--aerial-side) 100% no-repeat,
    var(--aerial-left, url("/static/img/aerials/new-york.jpg?v=landmarks")) left var(--aerial-left-x) center / var(--aerial-width) auto no-repeat,
    var(--aerial-right, url("/static/img/aerials/miami.jpg?v=landmarks")) right var(--aerial-right-x) center / var(--aerial-width) auto no-repeat;
  content: ""; filter: saturate(0.6); inset: 0; pointer-events: none; position: fixed; z-index: -1;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(var(--aerial-side) * 0.4), transparent var(--aerial-side),
    transparent calc(100% - var(--aerial-side)), #000 calc(100% - var(--aerial-side) * 0.4), #000 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(var(--aerial-side) * 0.4), transparent var(--aerial-side),
    transparent calc(100% - var(--aerial-side)), #000 calc(100% - var(--aerial-side) * 0.4), #000 100%);
}
@media (max-width: 1199px) { body:is(.page-home, .page-how)::before { display: none; } }
/* The footer spans the full width, so it gets a solid background over the aerials. */
body:is(.page-home, .page-how) .site-footer { background: #fff; position: relative; }

/* Home hero: navy type on white, with an aerial fade at the sides. */
.hero { background: transparent; border: 0; border-radius: 0; }
.hero .eyebrow { color: var(--blue); }
.hero h1 { color: var(--navy); }
.hero h1 span { color: var(--blue-brand); }
.hero-lede { color: var(--muted); }
.hero .search-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 1.25rem; }
.hero .search-row { border-color: var(--blue-brand); }

/* Report header: dark panel with the address in white. */
.dossier-head { border-bottom: 0; margin-top: -2rem; padding: 2rem 0 1.5rem; }
.dossier-head .eyebrow { color: var(--on-dark-accent); }
.dossier-title h1 { color: #fff; }
.dossier-meta { color: var(--on-dark-muted); }
.dossier-actions .button-link:not(.button-primary) { background: transparent; border-color: rgb(255 255 255 / 35%); color: #fff; }
.dossier-actions .button-link:not(.button-primary):hover { background: rgb(255 255 255 / 10%); border-color: #fff; }
.dossier-summary { margin-top: 1.5rem; }

/* Section navigation: accent marker on hover. */
.dossier-toc a { border-left: 3px solid transparent; border-radius: 0; }
.dossier-toc a:hover { border-left-color: var(--on-dark-accent); }

/* Cards inside report sections: white with a square accent stripe, like the PDF. */
.dossier-section .report-card {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--on-dark-accent); border-radius: 0;
}
.dossier-section .report-card.attribution { border-left-color: var(--line-strong); }

.permit-track-card { margin: 0.75rem 0; }
.permit-track-card h4 { align-items: center; color: var(--navy); display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 0.8rem; }
.permit-track-number { align-items: center; background: var(--on-dark-accent); border-radius: 50%; color: var(--navy); display: inline-flex; flex: none; font-size: 0.8rem; height: 1.55rem; justify-content: center; width: 1.55rem; }
.permit-track-fields, .permit-milestone-list { margin: 0; }
.permit-track-fields > div, .permit-milestone-list > div { display: grid; gap: 0.3rem 1rem; grid-template-columns: minmax(9rem, 27%) minmax(0, 1fr); padding: 0.45rem 0; }
.permit-track-fields > div + div, .permit-milestone-list > div + div { border-top: 1px solid var(--line); }
.permit-track-fields dt, .permit-milestone-list dt { color: var(--navy); font-weight: 700; }
.permit-track-fields dd, .permit-milestone-list dd { margin: 0; overflow-wrap: anywhere; }
.approval-sequence { counter-reset: approval-step; list-style: none; margin: 0.8rem 0 1.2rem; padding: 0; }
.approval-sequence li { align-items: start; display: grid; gap: 0.7rem; grid-template-columns: 1.7rem minmax(0, 1fr); padding: 0.5rem 0; }
.approval-sequence li + li { border-top: 1px solid var(--line); }
.approval-sequence li::before { align-items: center; background: var(--on-dark-accent); border-radius: 50%; color: var(--navy); content: counter(approval-step); counter-increment: approval-step; display: inline-flex; font-size: 0.8rem; font-weight: 700; height: 1.55rem; justify-content: center; width: 1.55rem; }
.permit-milestone-group { background: #fff; border: 1px solid var(--line); margin: 0.7rem 0; padding: 0.8rem 1rem; }
.permit-milestone-group h5 { color: var(--navy); font-size: 0.9rem; margin: 0 0 0.4rem; }
@media (max-width: 600px) {
  .permit-track-fields > div, .permit-milestone-list > div { grid-template-columns: 1fr; }
}

/* Section headings: hairline rule with a short accent segment, like the PDF section heads. */
.section-head {
  border-bottom: 0; padding-bottom: 0.85rem;
  background:
    linear-gradient(var(--on-dark-accent), var(--on-dark-accent)) left bottom / 40px 3px no-repeat,
    linear-gradient(var(--line), var(--line)) left bottom / 100% 1px no-repeat;
}

/* Callouts: square accent edge. */
.callout { border-left: 4px solid var(--on-dark-accent); border-radius: 0; }
.callout-prov { border-left-color: var(--amber); }

/* Framed images with a caption strip, like the PDF figures. */
.aerial-grid figure, .terrain-maps figure {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; padding: 8px 8px 0;
}
.aerial-grid figcaption, .terrain-maps figcaption {
  background: var(--surface-2); border-top: 1px solid var(--line); margin: 8px -8px 0; padding: 0.45rem 0.7rem;
}
.aerial-image { border-radius: 4px; }

/* Other primary actions keep the stronger accent blue. */
.button-primary { background: var(--blue-brand); border-color: var(--blue-brand); }
.button-primary:hover { background: var(--dark); border-color: var(--dark); }

/* The report action uses JuriSite light blue, then gray while pressed or running. */
#generate-report { background: var(--on-dark-accent); border-color: var(--on-dark-accent); color: var(--navy); transition: background-color 120ms ease, border-color 120ms ease; }
#generate-report:hover:not(:disabled) { background: #a7d7f8; border-color: #a7d7f8; color: var(--navy); }
#generate-report:active:not(:disabled), #generate-report[aria-busy="true"], #generate-report:disabled,
#generate-report:disabled:hover { background: #e5e9ee; border-color: #d2dbe4; color: #516174; opacity: 1; }

/* ===== Accounts (login, sign-up, account nav). Self-contained section; safe to move or merge. ===== */
.site-header nav { align-items: center; }
.site-header nav .nav-logout { display: inline-flex; margin: 0; }
.site-header nav .nav-logout button { background: transparent; border: 0; border-radius: 6px; color: var(--on-dark-muted); font: inherit; font-size: 0.92rem; font-weight: 600; line-height: inherit; padding: 0.5rem 0.75rem; }
.site-header nav .nav-logout button:hover { background: rgb(255 255 255 / 8%); color: #fff; }
.site-header nav .nav-account { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-header nav a.nav-login { border: 1px solid rgb(255 255 255 / 35%); color: #fff; margin-left: 0.35rem; }
.site-header nav a.nav-login:hover { background: rgb(255 255 255 / 10%); border-color: #fff; }
body.page-auth { background: #f5f9fc; }
.auth-page { align-items: center; background: radial-gradient(circle at 50% 0, #e7f3fc, transparent 36rem); display: flex; justify-content: center; max-width: none; padding: clamp(2.5rem, 7vh, 5rem) 1.25rem; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 48px rgb(10 31 58 / 10%), 0 2px 8px rgb(10 31 58 / 5%); margin: 0; max-width: 30rem; padding: clamp(1.5rem, 4vw, 2.5rem); width: 100%; }
.auth-card--login { border-top: 4px solid var(--on-dark-accent); max-width: 29rem; }
.auth-card h1 { font-size: clamp(1.85rem, 4vw, 2.15rem); letter-spacing: -0.025em; margin: 0; }
.auth-card h2 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }
.auth-eyebrow { color: var(--blue-brand); font-size: 0.73rem; font-weight: 800; letter-spacing: 0.12em; margin: 0 0 0.55rem; text-transform: uppercase; }
.auth-subtitle { color: var(--muted); line-height: 1.55; margin: 0.65rem 0 0; }
.auth-form { display: grid; gap: 0.9rem; margin: 1rem 0; }
.auth-form label { color: var(--navy); display: grid; font-size: 0.88rem; font-weight: 600; gap: 0.3rem; }
.auth-form input[type="email"], .auth-form input[type="password"] { background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; min-height: 3rem; padding: 0.65rem 0.8rem; width: 100%; }
.auth-form input[type="email"]:hover, .auth-form input[type="password"]:hover { border-color: var(--blue); }
.auth-card--login .auth-form { gap: 1.15rem; margin: 1.7rem 0 0; }
.auth-field { display: grid; gap: 0.45rem; }
.auth-field-heading { align-items: center; display: flex; gap: 0.75rem; justify-content: space-between; }
.auth-field-heading a { font-size: 0.83rem; font-weight: 600; text-decoration: none; }
.auth-field-heading a:hover, .auth-signup-prompt a:hover { text-decoration: underline; }
.auth-card--login .auth-form .button-primary { font-size: 0.96rem; margin-top: 0.2rem; min-height: 3.1rem; width: 100%; }
.auth-signup-prompt { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; margin: 1.8rem 0 0; padding-top: 1.3rem; text-align: center; }
.auth-signup-prompt a { font-weight: 700; margin-left: 0.2rem; text-decoration: none; }
.auth-form .auth-check { align-items: start; display: flex; font-weight: 400; gap: 0.5rem; }
.auth-hint { color: var(--muted); font-size: 0.8rem; font-weight: 400; }
.auth-error, .auth-notice { border-radius: 6px; margin: 1rem 0; padding: 0.6rem 0.8rem; }
.auth-error { background: var(--red-soft); color: var(--red); }
.auth-notice { background: var(--green-soft); color: var(--green); }

/* Public introduction to the report workflow, styled like the new-report landing page. */
.how-page { margin: 0 auto; max-width: 72rem; padding: 0 clamp(1rem, 4vw, 2.5rem) 3.5rem; width: 100%; }
.how-hero {
  margin: 0 auto; max-width: 52rem;
  padding: clamp(2rem, 6vw, 4rem) 0 clamp(1.75rem, 4vw, 2.75rem);
}
.how-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.04; margin: 0; }
.how-hero h1 span { color: var(--blue-brand); display: block; }
.how-promise { color: var(--navy); font-family: var(--font-display); font-size: clamp(1rem, 1.6vw, 1.13rem); font-weight: 750; line-height: 1.4; margin: 1rem 0 0; text-wrap: balance; }
.how-promise span { display: block; }
.how-lede { color: var(--muted); font-size: 1.08rem; margin: 0.45rem 0 0; max-width: 60ch; }
.how-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.75rem; }
.how-actions .button-link, .how-bottom-cta .button-link { min-height: 3rem; padding: 0.8rem 1.2rem; }
.how-page .button-primary { background: var(--on-dark-accent); border-color: var(--on-dark-accent); color: var(--navy); }
.how-page .button-primary:hover { background: #a7d7f8; border-color: #a7d7f8; color: var(--navy); }
.how-overview { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); color: var(--navy); margin-top: 1.75rem; padding: clamp(1.25rem, 3vw, 1.75rem); }
.how-overview-label { color: var(--blue); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.11em; margin: 0 0 1rem; text-transform: uppercase; }
.how-overview ol { list-style: none; margin: 0; padding: 0; }
.how-overview li { align-items: center; display: flex; font-size: 1rem; font-weight: 650; gap: 1rem; padding: 0.85rem 0; }
.how-overview li + li { border-top: 1px solid var(--line); }
.how-overview li span { color: var(--blue-brand); font: 700 0.8rem var(--font-mono); }
.how-overview-tagline { color: var(--navy); font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; margin: 1.2rem 0 0.35rem; }
.how-overview-note { color: var(--muted); font-size: 0.86rem; line-height: 1.55; margin: 0; }
.how-section { padding-top: clamp(2.5rem, 5vw, 4rem); }
.how-section-heading { max-width: 45rem; }
.how-section-heading h2, .how-value h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); letter-spacing: -0.025em; margin: 0; }
.how-section-heading > p:last-child { color: var(--muted); font-size: 1.02rem; margin: 0.8rem 0 0; }
.how-audience { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); margin-top: 1.7rem; overflow: hidden; }
.how-audience-tabs { border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.how-audience-tab { background: var(--surface-2); border: 0; border-bottom: 3px solid transparent; color: var(--muted); cursor: pointer; font: 700 0.94rem var(--font-body); margin-bottom: -1px; min-height: 3.6rem; padding: 0.9rem 1rem; text-align: center; }
.how-audience-tab + .how-audience-tab { border-left: 1px solid var(--line); }
.how-audience-tab:hover { color: var(--blue); }
.how-audience-tab[aria-selected="true"] { background: #fff; border-bottom-color: var(--blue-brand); color: var(--navy); }
.how-audience-tab:focus-visible, .how-audience-panel:focus-visible { outline: 3px solid var(--on-dark-accent); outline-offset: -3px; }
.how-audience-panel { padding: clamp(1.4rem, 3vw, 2rem); }
.how-audience-panel[hidden] { display: none; }
.how-audience-intro h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin: 0 0 0.5rem; }
.how-audience-intro p { color: var(--muted); margin: 0; max-width: 65ch; }
.how-audience-benefits { display: grid; gap: 1.6rem 1.25rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.6rem; }
.how-audience-benefits article { border-top: 2px solid var(--on-dark-accent); padding-top: 0.85rem; }
.how-audience-benefits h4 { font-size: 1rem; margin: 0 0 0.4rem; }
.how-audience-benefits p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.how-source-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.7rem; }
.how-source-grid article { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--on-dark-accent); padding: 1.3rem 1.45rem; }
.how-source-grid h3, .how-source-note h3 { font-size: 1.08rem; margin: 0 0 0.6rem; }
.how-source-grid p, .how-source-note p { color: var(--muted); margin: 0; }
.how-source-note { background: var(--blue-soft); border-left: 4px solid var(--on-dark-accent); margin-top: 1rem; padding: 1.2rem 1.45rem; }
.how-source-caveat { color: var(--muted); font-size: 0.86rem; line-height: 1.6; margin: 1rem 0 0; }
.how-value { align-items: start; background: var(--blue-soft); border-left: 4px solid var(--on-dark-accent); display: grid; gap: 1.5rem 3rem; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); margin-top: clamp(2.5rem, 5vw, 4rem); padding: clamp(1.5rem, 4vw, 2.5rem); }
.how-value > p { color: var(--ink); line-height: 1.7; margin: 0; }
.how-output-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.7rem; }
.how-output-grid article { border-top: 2px solid var(--line-strong); padding-top: 0.9rem; }
.how-output-grid h3 { font-size: 1.04rem; margin: 0 0 0.5rem; }
.how-output-grid p { color: var(--muted); margin: 0; }
.how-limitation { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.86rem; line-height: 1.6; margin: 2rem 0 0; padding-top: 1rem; }
.how-bottom-cta { align-items: center; background: var(--dark); color: #fff; display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; margin-top: clamp(2.5rem, 5vw, 4rem); padding: clamp(1.5rem, 4vw, 2.5rem); }
.how-bottom-cta h2 { color: #fff; font-size: 1.65rem; margin: 0 0 0.4rem; }
.how-bottom-cta p { color: var(--on-dark-muted); margin: 0; }
@media (max-width: 800px) {
  .how-value { grid-template-columns: 1fr; }
  .how-audience-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-source-grid, .how-output-grid { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 600px) {
  .how-hero { padding-top: 2.5rem; }
  .how-actions .button-link { flex: 1 1 auto; }
  .how-audience-tab { font-size: 0.86rem; padding: 0.75rem 0.6rem; }
  .how-audience-benefits { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* Contact page and "Report a data error" link on the report header. */
.dossier-meta .report-error-link { color: var(--on-dark-accent); text-decoration: underline; text-underline-offset: 2px; }
.contact-list { line-height: 1.7; margin: 0 0 0.9rem; max-width: 75ch; padding-left: 1.25rem; }

/* Billing: pricing-card purchase forms, account plan panel, new-report usage line, founder note. */
.pricing-card form { align-self: flex-start; margin-top: auto; }
.billing-panel p { margin: 0.4rem 0; }
.billing-panel form { margin-top: 0.75rem; }
.billing-usage { color: var(--muted); font-size: 0.9rem; margin: 0.75rem 0 0; text-align: center; }
.billing-blocked { background: var(--red-soft); border-radius: 6px; color: var(--red); padding: 0.6rem 0.8rem; }
.billing-blocked a { color: inherit; text-decoration: underline; }
.billing-founder-note { background: var(--green-soft); border-radius: 6px; color: var(--green); display: inline-block; font-weight: 700; margin: 0.75rem 0; padding: 0.5rem 0.8rem; }

/* Quiet modern input form; deliberately scoped to the report builder. */
.hero .search-card.search-card-modern {
  background: var(--blue-soft); border: 1px solid var(--line); border-radius: 0;
  box-shadow: none; display: flex; flex-direction: column; padding: 1.15rem 1.5rem 2rem;
}
.search-card-modern .search-mode-tabs {
  align-self: flex-start; border-bottom: 1px solid #bccddd; gap: 1.625rem;
  margin: 0 0 1.5rem; max-width: 100%; width: max-content;
}
.search-card-modern .search-mode-tabs button {
  background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  color: var(--navy); font-size: 0.8125rem; font-weight: 400; margin-bottom: -1px;
  min-height: 2.75rem; padding: 0.7rem 0;
}
.search-card-modern .search-mode-tabs button[aria-selected="true"] {
  background: transparent; border-bottom-color: var(--green); color: var(--navy); font-weight: 700;
}
.search-card-modern .parcel-id-coming-soon {
  align-items: center; background: var(--red-soft); border: 1px solid var(--red); color: var(--red);
  display: flex; justify-content: center; min-height: 7rem; padding: 1.25rem;
}
.search-card-modern .parcel-id-coming-soon span {
  border: 2px solid currentColor; font-size: 0.875rem; font-weight: 800;
  letter-spacing: 0.12em; padding: 0.65rem 1rem;
}
.search-card-modern .parcel-id-fields {
  gap: 0.875rem; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1.05fr);
}
.search-card-modern .parcel-id-input-label { grid-column: auto; }
.search-card-modern .parcel-id-field { font-size: 0.75rem; font-weight: 400; gap: 0.5rem; }
.search-card-modern #address-mode-panel > label { color: var(--navy); display: block; font-size: 0.75rem; margin-bottom: 0.5rem; }
.search-card-modern .parcel-id-fields select, .search-card-modern .parcel-id-input-row input, .search-card-modern #address {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 3px;
  color: var(--navy); font: 400 0.8125rem/1.4 var(--font-body); height: 3rem;
  min-height: 3rem; padding: 0 0.875rem; width: 100%;
}
.search-card-modern .parcel-id-input-row { display: block; }
.search-card-modern .parcel-id-input-row input::placeholder { color: var(--faint); }
.search-card-modern #address:focus-visible { outline: 3px solid var(--blue-brand); outline-offset: 2px; }
.search-card-modern .search-row { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
.search-card-modern .search-row:focus-within { border: 0; box-shadow: none; }
.search-card-modern .help-text { font-size: 0.6875rem; line-height: 1.7; margin: 0.5rem 0 0; }
.search-card-modern #parcel-id-search-status:not([data-state]),
.search-card-modern #parcel-id-search-status[data-state=""] { display: none; }
.search-card-modern #parcel-id-search-status[data-state="error"] { color: var(--red); }
.search-card-modern .parcel-id-search-actions, .search-card-modern .search-submit-row {
  display: flex; justify-content: flex-end; margin: 0.875rem 0 0;
}
.search-card-modern #parcel-id-search, .search-card-modern .search-submit-row #generate-report {
  background: var(--blue); border: 1px solid var(--blue); border-radius: 3px; color: #fff;
  font-size: 0.75rem; font-weight: 600; gap: 1.125rem; min-height: 3rem;
  min-width: 8.75rem; padding: 0 1.375rem; width: auto;
}
.search-card-modern #parcel-id-search:hover, .search-card-modern .search-submit-row #generate-report:hover { background: var(--navy); border-color: var(--navy); }
.search-card-modern:has(#parcel-id-mode-tab[aria-selected="true"]):not(:has(#parcel-id-results button:disabled[aria-pressed="true"])) .search-submit-row,
.search-card-modern:has(#parcel-id-mode-panel[data-coming-soon]:not([hidden])) .search-submit-row { display: none; }
.page-reports:not(.home-workflow-active) .search-card-modern #address-message:not(.notice-error):not(.notice-success) {
  clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden;
  padding: 0; position: absolute; white-space: nowrap; width: 1px;
}
.search-card-modern .report-options { border-bottom: 1px solid #bccddd; border-top: 1px solid #bccddd; margin-top: 1.25rem; }
.search-card-modern .report-options-summary { align-items: center; display: flex; font-size: 0.75rem; font-weight: 400; gap: 0.4rem; padding: 0.95rem 0; }
.search-card-modern #report-options-count { background: transparent; border-radius: 0; color: var(--muted); font-size: 0.6875rem; margin-left: auto; padding: 0; }
.search-card-modern .report-options-summary::after { border: 0; content: "+"; height: auto; position: static; transform: none; width: auto; }
.search-card-modern .report-options[open] > .report-options-summary::after { content: "−"; transform: none; }
.search-card-modern .report-options-body { margin: 0; padding: 0 0 1rem; }
.search-card-modern .terms-cue { font-size: 0.6875rem; line-height: 1.7; margin: 1.05rem 0 0; max-width: none; }
@media (max-width: 640px) {
  .hero .search-card.search-card-modern { padding: 1rem 1rem 1.5rem; }
  .search-card-modern .parcel-id-fields { grid-template-columns: minmax(0, 1fr); }
  .search-card-modern .parcel-id-fields select, .search-card-modern .parcel-id-input-row input, .search-card-modern #address { font-size: 1rem; }
}
