/* Five Boro Bridge Loans. Plain CSS, no build step. */

:root {
  --bg: #f7f4ee;          /* warm off-white */
  --bg-alt: #efeae0;      /* slightly deeper band */
  --surface: #fffdf9;     /* form inputs */
  --ink: #14233c;         /* deep navy, text and accent */
  --ink-soft: #3d4a60;    /* secondary text */
  --rule: #d9d1c2;        /* hairlines */
  --brass: #7d6026;       /* muted brass accent (AA on --bg) */
  --brass-line: #b39556;  /* decorative brass rules only */
  --error: #9b2c1f;

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 68rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space: clamp(3.5rem, 8vw, 6.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); letter-spacing: -0.01em; max-width: 24ch; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; max-width: 62ch; }

a { color: var(--ink); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.header-cta {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--brass-line);
  padding-bottom: 2px;
  white-space: nowrap;
}
.header-cta:hover { border-bottom-color: var(--ink); }

/* Hero */
.hero { padding: clamp(4rem, 11vw, 8rem) 0 var(--space); }
.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1.25rem;
}
.lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 48ch;
  margin: 1.25rem 0 2.25rem;
}

/* Buttons */
.button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  background: var(--ink);
  color: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 2px;
  padding: 0.85rem 1.6rem;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #0b1628; border-color: #0b1628; }
.button:disabled { opacity: 0.6; cursor: wait; }

/* Sections */
.section {
  padding: var(--space) 0;
  border-top: 1px solid var(--rule);
}
.section h2::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  background: var(--brass-line);
  margin-bottom: 1.25rem;
}
.section-intro { color: var(--ink-soft); margin-bottom: 2.5rem; }

/* Terms */
.terms {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  border-top: 1px solid var(--ink);
}
.terms > div {
  padding: 1.25rem 1.5rem 1.4rem 0;
  border-bottom: 1px solid var(--rule);
}
.terms dt {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.4rem;
}
.terms dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.35;
}
.fine {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-top: 1.5rem;
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--brass);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}
.steps p { color: var(--ink-soft); }

/* Why NYC / boroughs */
.two-col {
  display: grid;
  gap: 3rem 4rem;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}
.h-small { font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.boroughs {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}
.boroughs li {
  font-family: var(--serif);
  font-size: 1.3rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rule);
}

/* FAQ */
.faq { max-width: 48rem; }
.faq h3 {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.faq h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.faq p { color: var(--ink-soft); }

/* Quote form */
.quote { background: var(--bg-alt); }
.quote-form {
  display: grid;
  gap: 1.5rem 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 48rem;
}
.field { display: flex; flex-direction: column; }
.field-wide { grid-column: 1 / -1; }
label {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
}
.optional { font-weight: 400; color: var(--ink-soft); }
.hint { font-size: 0.85rem; color: var(--ink-soft); margin: 0.4rem 0 0; }
input, textarea, select {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #8f94a0;
  border-radius: 2px;
  padding: 0.75rem 0.85rem;
  width: 100%;
  min-height: 3rem;
}
textarea { resize: vertical; min-height: 8rem; }
input:hover, textarea:hover, select:hover { border-color: var(--ink); }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 1px;
  border-color: var(--ink);
}
input:user-invalid, textarea:user-invalid { border-color: var(--error); }

/* Address suggestions (combobox) */
.combo { position: relative; }
.suggestions {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 2px;
  box-shadow: 0 6px 18px rgba(20, 35, 60, 0.12);
  max-height: 18rem;
  overflow-y: auto;
}
.suggestions li {
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  line-height: 1.35;
  border-left: 3px solid transparent;
}
.suggestions li + li { border-top: 1px solid var(--bg-alt); }
.suggestions li:hover { background: var(--bg-alt); }
.suggestions li[aria-selected="true"] {
  background: var(--bg-alt);
  border-left-color: var(--brass);
}
.attribution { font-size: 0.75rem; color: var(--ink-soft); margin: 0.35rem 0 0; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.form-actions .fine { margin-top: 1rem; }

.thanks {
  max-width: 48rem;
  border-left: 3px solid var(--brass-line);
  padding: 0.5rem 0 0.5rem 1.5rem;
}
.thanks:focus { outline: none; }
.thanks:focus-visible { outline: 3px solid var(--brass); }
.form-error { color: var(--error); font-weight: 600; margin-top: 1.5rem; }

[hidden] { display: none !important; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #dfe3ea;
  padding: 3.5rem 0 4rem;
}
.site-footer p { max-width: 60ch; }
.brand img { display: block; height: 3.5rem; width: auto; }
.footer-brand img { display: block; width: 15rem; height: auto; margin-bottom: 0.5rem; }
.footer-brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: #fff;
}
.site-footer .fine { color: #b9c1ce; }

/* Small screens */
@media (max-width: 44rem) {
  .two-col { grid-template-columns: 1fr; }
  .quote-form { grid-template-columns: 1fr; }
  .terms > div { padding-right: 0; }
  .header-cta { font-size: 0.9rem; }
  .brand { font-size: 1.15rem; }
  .brand img { height: 3.25rem; }
  .button { width: 100%; text-align: center; }
  .hero .button { width: auto; }
}

@media print {
  .skip-link, .header-cta, .hero .button, .quote { display: none; }
  body { background: #fff; }
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 50%, calc(100% - 0.9rem) 50%;
  background-size: 0.4rem 0.4rem;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}
.field[hidden] { display: none; }
.brokers { border-top: 1px solid #d9d3c6; }
.brokers .broker-lead { font-size: 1.2rem; max-width: 40rem; }
.brokers p { max-width: 40rem; }

/* Draft additions: multi-page nav, footer links, CTA band */
.header-inner { flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.main-nav ul, .footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.main-nav a, .footer-links a { color: var(--ink); text-decoration: none; font-size: 0.95rem; border-bottom: 1px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--brass-line); }
.site-footer .footer-links { margin: 1rem 0; }
.site-footer .footer-links a { color: #e4e8ef; }
.cta-band { background: var(--bg-alt); }
.section a:not(.button) { color: var(--brass); }
.quote-form select { font: inherit; padding: 0.7rem 0.8rem; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); }
.check label { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 600; }
.check input { margin-top: 0.3rem; }
@media (max-width: 52rem) { .main-nav { order: 3; width: 100%; } .header-cta { margin-left: auto; } }

/* ---- Round design language ---- */
:root { --r-sm: 14px; --r-md: 22px; --r-lg: 32px; --pill: 999px; }
.button, .header-cta, .hero .button { border-radius: var(--pill); padding: 0.9rem 1.9rem; }
.header-cta { background: var(--ink); color: var(--bg); border: 2px solid var(--ink); padding: 0.55rem 1.3rem; font-size: 0.95rem; }
.header-cta:hover { background: #0b1628; border-color: #0b1628; }
.main-nav a, .footer-links a { padding: 0.35rem 0.8rem; border-radius: var(--pill); border-bottom: 0; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--bg-alt); }
.site-footer .footer-links a:hover { background: rgba(255,255,255,0.12); }
.main-nav ul, .footer-links { gap: 0.2rem; }
.skip-link { border-radius: var(--pill); }
/* terms as soft cards */
.terms { border-top: 0; gap: 1rem; }
.terms > div { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 1.25rem 1.5rem; }
/* inputs */
input, textarea, select { border-radius: var(--r-sm); border-color: var(--rule); border-width: 1.5px; padding: 0.8rem 1.1rem; }
textarea { border-radius: var(--r-md); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 2px; }
select, .quote-form select { border-radius: var(--r-sm); }
input[type="checkbox"] { width: 1.5rem; min-height: 1.5rem; height: 1.5rem; padding: 0; border-radius: 8px; accent-color: var(--ink); flex: none; }
.check label { background: var(--surface); border: 1.5px solid var(--rule); border-radius: var(--r-md); padding: 1rem 1.2rem; }
/* form panel */
.quote-form { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: clamp(1.25rem, 4vw, 2.25rem); max-width: 52rem; }
.suggestions { border-radius: var(--r-sm); overflow: hidden; }
.thanks { border-radius: var(--r-lg); }
/* FAQ cards */
.faq h3 { background: var(--surface); border: 1px solid var(--rule); border-bottom: 0; border-radius: var(--r-md) var(--r-md) 0 0; padding: 1.1rem 1.4rem 0.3rem; margin: 1rem 0 0; }
.faq h3:first-child { padding-top: 1.1rem; border-top: 1px solid var(--rule); }
.faq p { background: var(--surface); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md); padding: 0 1.4rem 1.2rem; margin: 0; }
/* borough chips */
.boroughs { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0; list-style: none; border: 0; }
.boroughs li { border: 1.5px solid var(--rule); border-radius: var(--pill); padding: 0.5rem 1.2rem; background: var(--surface); }
/* steps */
.steps li { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 1.4rem 1.5rem; }
/* bands and images */
.quote, .cta-band { border-radius: var(--r-lg); }
.cta-band .wrap { background: var(--bg-alt); border-radius: var(--r-lg); padding: 2.5rem clamp(1.25rem, 4vw, 3rem); }
.cta-band { background: transparent; }
.brand img, .footer-brand img { border-radius: var(--r-sm); }
.site-footer { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.faq p { max-width: none; }
.faq h3, .faq p { max-width: none; }
.cta-band { border-radius: 0; }
.quote { margin: 0 clamp(0.5rem, 2vw, 1.5rem); border-top: 0; }
@media (min-width: 52.01rem) { .header-inner { flex-wrap: nowrap; } .main-nav { margin-left: auto; } }
.site-header { border-bottom-color: transparent; }
.brand img, .footer-brand img { border-radius: 0; }
.main-nav ul { flex-wrap: nowrap; }
.main-nav a { white-space: nowrap; font-size: 0.92rem; padding: 0.35rem 0.65rem; }
.section h2::before { display: none; }
.eyebrow { display: none; }
.ineligible { background: var(--surface); border: 1.5px solid var(--brass-line); border-radius: var(--r-lg); padding: clamp(1.25rem, 4vw, 2.25rem); max-width: 52rem; }
.ineligible:focus { outline: none; }
.ineligible ul { padding-left: 1.2rem; }
.ineligible li { margin: 0.5rem 0; font-weight: 600; }
.checks li::before { content: "\2713"; color: var(--brass); font-weight: 700; margin-right: 0.5rem; }

/* ---- UX polish pass (Dec 3): sticky compact header, real mobile menu, FAQ accordions, micro-interactions, touch targets ---- */

/* Sticky header, compact. */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--rule); }
.skip-link { z-index: 60; }

/* Fast, subtle micro-interactions. */
.button, .header-cta { transition: background-color .15s ease, border-color .15s ease, transform .1s ease; }
.button:active, .header-cta:active { transform: translateY(1px); }
.main-nav a, .footer-links a { transition: background-color .15s ease; }

/* Menu button (mobile only; hidden on desktop below). */
.nav-toggle {
  display: none;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-radius: var(--pill);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle:hover { background: var(--bg-alt); }

/* FAQ accordion (JS wraps h3+p into .faq-item; without JS the old card styles still apply). */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  margin: 0 0 0.75rem;
  overflow: hidden;
}
.faq-item h3, .faq-item h3:first-child {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.9rem 1.4rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.3;
  text-align: left;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
.faq-q:hover { background: var(--bg-alt); }
.faq-chevron { flex: none; width: 1.1rem; height: 1.1rem; color: var(--brass); transition: transform .2s ease; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows .22s ease, visibility 0s linear .22s;
}
.faq-item.open .faq-a {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows .22s ease;
}
.faq-a-inner { overflow: hidden; min-height: 0; }
.faq-a-inner p, .faq .faq-a-inner p {
  margin: 0;
  padding: 0 1.4rem 1.2rem;
  border: 0;
  background: none;
  border-radius: 0;
  color: var(--ink-soft);
  max-width: none;
}

/* Footer links: comfortable tap targets. */
.footer-links a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.35rem 0.9rem; }

/* Mobile header + menu. */
@media (max-width: 52rem) {
  .header-inner { flex-wrap: nowrap; gap: 0.6rem; min-height: 4rem; }
  .brand img { height: 2.6rem; }
  .header-cta { margin-left: auto; padding: 0.5rem 1.1rem; font-size: 0.9rem; }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: auto;
    order: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 14px 28px rgba(20, 35, 60, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
  }
  .main-nav.open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .15s ease, transform .15s ease;
  }
  .main-nav ul { flex-direction: column; flex-wrap: nowrap; gap: 0.15rem; padding: 0.6rem; }
  .main-nav a {
    display: flex;
    align-items: center;
    min-height: 3rem;
    padding: 0.6rem 1.1rem;
    font-size: 1.05rem;
    border-radius: var(--r-md);
  }
  .main-nav a[aria-current="page"] { font-weight: 700; }
}

@media (prefers-reduced-motion: reduce) {
  .button, .header-cta, .main-nav a, .footer-links a, .faq-a, .faq-chevron, .main-nav { transition: none !important; }
}

/* Very small phones (320-380px): keep the header row on one line. */
@media (max-width: 23.75rem) {
  .header-inner { gap: 0.5rem; }
  .brand img { height: 2.3rem; }
  .header-cta { padding: 0.45rem 0.85rem; font-size: 0.85rem; }
  .nav-toggle { width: 2.5rem; height: 2.5rem; }
}

/* ---- Borough pages + cross-linking (Dec 3) ---- */

/* Footer groups. */
.footer-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #b9c1ce; margin: 1.5rem 0 0.35rem; font-family: var(--sans); }

/* Related-page links. */
.related-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.related-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.2rem;
  border: 1.5px solid var(--rule);
  border-radius: var(--pill);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  transition: background-color .15s ease;
}
.related-links a:hover { background: var(--bg-alt); }

/* Linked borough chips (Where we lend). */
.boroughs li a {
  display: block;
  margin: -0.5rem -1.2rem;
  padding: 0.5rem 1.2rem;
  color: inherit;
  text-decoration: none;
  border-radius: var(--pill);
  transition: background-color .15s ease;
}
.boroughs li:has(a):hover { background: var(--bg-alt); }
.boroughs li a::after { content: ""; display: inline-block; margin-left: 0.45rem; width: 0.4rem; height: 0.4rem; border-right: 2px solid var(--brass); border-bottom: 2px solid var(--brass); transform: rotate(-45deg) translateY(1px); }

/* Nav dropdown (desktop: hover/focus; mobile: static sub-list). */
.has-drop { position: relative; }
.drop { list-style: none; margin: 0; padding: 0.4rem; }
@media (min-width: 52.01rem) {
  .main-nav ul.drop {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    min-width: 12rem;
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: var(--r-md);
    box-shadow: 0 14px 28px rgba(20, 35, 60, 0.12);
    z-index: 45;
  }
  .has-drop:hover .drop, .has-drop:focus-within .drop { display: block; }
  .drop a { display: block; padding: 0.55rem 1rem; border-radius: var(--r-sm); white-space: nowrap; }
  .has-drop > a::after { content: ""; display: inline-block; margin-left: 0.4rem; width: 0.4rem; height: 0.4rem; border-right: 2px solid var(--brass); border-bottom: 2px solid var(--brass); transform: rotate(45deg) translateY(-2px); }
}
@media (max-width: 52rem) {
  .drop { padding: 0 0 0.25rem 1rem; background: none; }
  .drop a { min-height: 2.75rem; font-size: 0.98rem; color: var(--ink-soft); }
}

/* Per-field form errors. */
.field-error { color: var(--error); font-size: 0.875rem; font-weight: 600; margin: 0.35rem 0 0; }
.field-error:empty { display: none; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--error); }

/* ---- Sleeker scale-down (Dec 3): smaller type, tighter spacing, compact buttons/pills/cards. Touch targets stay >= 2.75rem. ---- */
:root { --wrap: 60rem; --space: clamp(2.5rem, 5.5vw, 4.25rem); }
body { font-size: 1rem; }
h1 { font-size: clamp(1.8rem, 4.4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); margin-bottom: 1.1rem; }
h3 { font-size: 1.1rem; }
p { margin-bottom: 0.9rem; }
.hero { padding: clamp(2.5rem, 7vw, 4.5rem) 0 var(--space); }
.lede { font-size: clamp(1.02rem, 1.6vw, 1.15rem); margin: 1rem 0 1.75rem; }
.section-intro { margin-bottom: 1.75rem; }
.two-col { gap: 2rem 3rem; }

/* Buttons: visibly smaller, still >= 44px tall. */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; font-size: 0.92rem; padding: 0.45rem 1.3rem; }
.header-cta { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.3rem 1rem; font-size: 0.88rem; }

/* Compact header. */
.header-inner { min-height: 3.9rem; }
.brand { font-size: 1.15rem; }
.brand img { height: 2.9rem; }
.main-nav a { font-size: 0.86rem; padding: 0.3rem 0.55rem; }

/* Terms cards: smaller, tighter, even heights. */
.terms { gap: 0.7rem; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); align-items: stretch; }
.terms > div { padding: 0.85rem 1.1rem; }
.terms dt { font-size: 0.72rem; margin-bottom: 0.3rem; }
.terms dd { font-size: 1.02rem; }
.fine { font-size: 0.8rem; margin-top: 1.1rem; }

/* Fit pills and borough chips: smaller type and padding, text never clipped. */
.boroughs li { font-size: 1.02rem; padding: 0.4rem 1rem; overflow-wrap: anywhere; }
.boroughs li a { margin: -0.4rem -1rem; padding: 0.4rem 1rem; }
.related-links a { font-size: 0.88rem; padding: 0.4rem 1rem; }

/* Steps. */
.steps { gap: 1.25rem 2rem; }
.steps li { padding: 1rem 1.1rem; }
.steps li::before { font-size: 0.9rem; padding-bottom: 0.45rem; margin-bottom: 0.7rem; }

/* FAQ accordion. */
.faq-q { min-height: 3.1rem; padding: 0.7rem 1.1rem; font-size: 1.02rem; }
.faq-a-inner p, .faq .faq-a-inner p { padding: 0 1.1rem 1rem; }

/* Form. */
.quote-form { gap: 1.1rem 1.5rem; max-width: 46rem; padding: clamp(1rem, 3vw, 1.75rem); }
label { font-size: 0.88rem; margin-bottom: 0.35rem; }
input, textarea, select { padding: 0.6rem 0.85rem; min-height: 2.75rem; font-size: 0.95rem; }
textarea { min-height: 6rem; }
.hint { font-size: 0.8rem; }
.check label { padding: 0.8rem 1rem; }
.suggestions li { padding: 0.55rem 0.85rem; }
.ineligible { padding: clamp(1rem, 3vw, 1.75rem); }
.thanks { padding: 0.4rem 0 0.4rem 1.1rem; }

/* Bands and footer. */
.cta-band .wrap { padding: 1.75rem clamp(1.25rem, 4vw, 2.25rem); }
.site-footer { padding: 2.5rem 0 3rem; }
.footer-brand img { width: 12rem; }
.footer-brand { font-size: 1.1rem; }
.footer-links a { font-size: 0.9rem; }

@media (max-width: 52rem) {
  .header-cta { padding: 0.3rem 0.9rem; font-size: 0.85rem; min-height: 2.75rem; }
  .brand img { height: 2.5rem; }
  .main-nav a { min-height: 2.75rem; font-size: 1rem; }
  .drop a { min-height: 2.75rem; font-size: 0.92rem; }
}
@media (max-width: 23.75rem) {
  .header-cta { padding: 0.3rem 0.75rem; font-size: 0.82rem; }
}

/* ---- Synced control scale (Dec 3, pass 2): one size system for buttons, pills, cards, inputs. Mobile keeps 44px minimums. ---- */
:root {
  --ctl-fs: 0.85rem;   /* shared control font size */
  --ctl-py: 0.35rem;   /* shared vertical padding */
  --ctl-px: 1.1rem;    /* shared horizontal padding */
  --ctl-h: 2.5rem;     /* shared control height (desktop) */
}
.button { font-size: var(--ctl-fs); padding: var(--ctl-py) var(--ctl-px); min-height: var(--ctl-h); }
.header-cta { font-size: 0.82rem; padding: 0.25rem 0.9rem; min-height: var(--ctl-h); }
.boroughs li { font-size: var(--ctl-fs); padding: 0.3rem 0.9rem; }
.boroughs li a { margin: -0.3rem -0.9rem; padding: 0.3rem 0.9rem; }
.related-links a { font-size: var(--ctl-fs); padding: 0.3rem 0.9rem; min-height: var(--ctl-h); }
input, textarea, select { font-size: 0.9rem; padding: 0.5rem 0.8rem; min-height: var(--ctl-h); }
label { font-size: 0.85rem; }
.terms > div { padding: 0.75rem 1rem; }
.terms dt { font-size: 0.68rem; }
.terms dd { font-size: 0.95rem; }
.steps li { padding: 0.9rem 1rem; }
.faq-q { font-size: 0.98rem; min-height: 2.9rem; padding: 0.6rem 1rem; }
.check label { padding: 0.7rem 0.9rem; font-size: 0.9rem; }
.footer-links a { font-size: 0.85rem; min-height: var(--ctl-h); }
@media (max-width: 52rem) {
  .button, .header-cta, input, textarea, select, .related-links a, .footer-links a { min-height: 2.75rem; }
  .main-nav a { min-height: 2.75rem; }
}

/* ---- Alignment pass (Dec 3): centered hero, shared container edges, even fit pills. ---- */
.hero .wrap { text-align: center; }
.hero h1 { margin-left: auto; margin-right: auto; }
.hero .lede { margin-left: auto; margin-right: auto; }
.hero .lede, .hero p { max-width: 52ch; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; justify-content: center; }
.checks li { text-align: left; }
@media (max-width: 40rem) { .checks { grid-template-columns: 1fr; } }
/* Same content edges everywhere: section bands insets match on both sides, footer content uses the same wrap. */
.quote { margin: 0 var(--gutter); }

/* ---- Fix pass 3 (Dec 3): center hero button, center quote column in its band, intentional prose measure + borough two-col, pill spacing. ---- */
.hero p { margin-left: auto; margin-right: auto; }
.section .wrap > p { max-width: 65ch; }
.quote .wrap { max-width: calc(46rem + 2 * var(--gutter)); }
.quote .wrap > p { max-width: none; }
.quote-form { margin-left: auto; margin-right: auto; }
.checks { margin-bottom: 1.5rem; }
.cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem; align-items: start; }
.cols .note { background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--brass-line); padding: 1rem 1.25rem; margin: 0; }
@media (max-width: 52rem) { .cols { grid-template-columns: 1fr; } }
