/* ============================================================================
   Cape Cod Septic Experts — one hand-written stylesheet, no build step.
   Ported from site/src/styles/global.css with the Tailwind layer removed:
   @theme -> :root custom properties, @layer -> plain rules, plus the small
   utility set the templates use in place of Tailwind classes.
   ========================================================================= */

/* ---- Tokens --------------------------------------------------------------- */
:root {
  --color-harbor: #f7f4ee;      /* page background, light sand */
  --color-sand: #efeae0;        /* alternate section background */
  --color-paper: #ffffff;       /* content surfaces */
  --color-deep: #0e2a3a;        /* dark band, deep ocean */
  --color-deep-soft: #163a4e;   /* raised surface on the dark band */
  --color-deep-line: #24465a;   /* hairline on the dark band */
  --color-tide: #157a8c;        /* links, focus, accents */
  --color-tide-deep: #0f5f6d;   /* link hover */
  --color-tide-mist: #e3f1f3;   /* tinted backgrounds */
  --color-tide-pale: #8fd0da;   /* eyebrow on the dark band */
  --color-buoy: #c4501a;        /* primary CTA (4.66:1 with white) */
  --color-buoy-deep: #a5410f;   /* CTA hover / pressed */
  --color-line: #e6e0d6;        /* borders, warm grey */
  --color-line-strong: #d3cbbd;
  --color-ink: #14202b;         /* body text */
  --color-muted: #5b6771;       /* secondary text */
  --color-ok: #1f7a4d;
  --color-warn: #a34a00;
  --color-onDeep: #d7e0e5;      /* body text on the dark band */
  --color-onDeep-muted: #b8c4cc;

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

  --radius-card: 10px;
  --shadow-card: 0 1px 2px rgba(20, 32, 43, 0.04), 0 8px 24px -16px rgba(20, 32, 43, 0.18);
  --container: 1200px;
  --prose: 72ch;
  color-scheme: light;
}

/* ---- Reset / base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background-color: var(--color-harbor);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.012em;
  color: var(--color-ink);
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(1.95rem, 1.35rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.45rem, 1.2rem + 1.1vw, 1.95rem); }
h3 { font-size: clamp(1.15rem, 1.08rem + 0.45vw, 1.35rem); }
h4, h5, h6 { font-family: var(--font-body); font-weight: 600; margin: 0; }
p, ul, ol, dl, figure, blockquote, pre { margin: 0; }
a {
  color: var(--color-tide);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}
a:hover { color: var(--color-tide-deep); }
:focus-visible {
  outline: 3px solid var(--color-tide);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection { background: var(--color-tide-mist); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; height: auto; }
summary { cursor: pointer; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
hr { border: 0; border-top: 1px solid var(--color-line); }

/* ---- Skip link ------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
}
.skip-link:focus-visible,
.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
  background: var(--color-paper);
  border: 1px solid var(--color-line-strong);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-weight: 600;
  text-decoration: none;
}

/* ---- Layout --------------------------------------------------------------- */
.container-x {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 640px) { .container-x { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container-x { padding-inline: 2rem; } }

.card {
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.card.block { display: block; }
.card-link { text-decoration: none; color: var(--color-ink); display: block; }
.card-link:hover { border-color: var(--color-tide); color: var(--color-ink); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  /* Small bold text needs 4.5:1; the deeper teal clears it on paper, sand and mist. */
  color: var(--color-tide-deep);
}
.eyebrow-pale { color: var(--color-tide-pale); }
.eyebrow-buoy { color: var(--color-buoy); }

.dek {
  font-size: 1.18rem;
  line-height: 1.5;
  color: var(--color-muted);
  max-width: 42rem;
  text-wrap: pretty;
}

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--color-buoy); border-color: var(--color-buoy); color: #ffffff; }
.btn-primary:hover { background: var(--color-buoy-deep); border-color: var(--color-buoy-deep); color: #ffffff; }
.btn-secondary { background: transparent; border-color: var(--color-deep); color: var(--color-deep); }
.btn-secondary:hover { background: var(--color-deep); color: #ffffff; }
.btn-light { background: transparent; border-color: rgba(255, 255, 255, 0.55); color: #ffffff; }
.btn-light:hover { background: rgba(255, 255, 255, 0.12); border-color: #ffffff; color: #ffffff; }
.btn-sm { min-height: 2.4rem; padding: 0.45rem 1rem; font-size: 0.95rem; }
.btn-block { width: 100%; }

/* ---- Dark band ------------------------------------------------------------ */
.band-deep { background: var(--color-deep); color: #e9eef1; }
.band-deep h2, .band-deep h3 { color: #ffffff; }
.band-deep a { color: #ffffff; }
.band-deep a:hover { color: var(--color-tide-mist); }
.band-deep .muted { color: var(--color-onDeep-muted); }
.band-deep .on-deep { color: var(--color-onDeep); }
.bg-sand { background: var(--color-sand); }
.bg-paper { background: var(--color-paper); }
.border-y { border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); }
.border-b { border-bottom: 1px solid var(--color-line); }
.border-t { border-top: 1px solid var(--color-line); }
.hero-bg { background-image: linear-gradient(180deg, #ffffff 0%, var(--color-harbor) 100%); }

/* ---- Forms ---------------------------------------------------------------- */
.field { display: grid; gap: 0.35rem; }
.field label, .field legend { font-weight: 600; font-size: 0.95rem; }
.field .hint { color: var(--color-muted); font-size: 0.85rem; font-weight: 400; }
.input, .select, .textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--color-line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--color-ink);
  min-height: 2.8rem;
}
.input:focus, .select:focus, .textarea:focus {
  outline: 3px solid var(--color-tide);
  outline-offset: 1px;
  border-color: var(--color-tide);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path d='M4 6l4 4 4-4' fill='none' stroke='%235b6771' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}
.textarea { min-height: 6rem; resize: vertical; }
.checkline { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.88rem; line-height: 1.45; color: var(--color-muted); }
.checkline input { margin-top: 0.3rem; flex: none; width: 1.05rem; height: 1.05rem; accent-color: var(--color-tide); }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-msg { display: none; margin-top: 0.75rem; padding: 0.75rem 0.9rem; border-radius: 8px; font-size: 0.95rem; }
.form-msg:target, .form-msg.is-visible { display: block; }
.form-msg-ok { background: #e6f4ec; color: var(--color-ok); border: 1px solid #bfe3cf; }
.form-msg-err { background: #fbeee6; color: var(--color-warn); border: 1px solid #f2d3bd; }
.form-note { font-weight: 400; color: var(--color-muted); }

/* ---- Key facts ------------------------------------------------------------ */
.keyfacts {
  background: var(--color-tide-mist);
  border: 1px solid #c9e2e6;
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
}
.keyfacts ul { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.5rem; }
.keyfacts li { position: relative; padding-left: 1.4rem; }
.keyfacts li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 0.6rem; height: 0.6rem; border-radius: 999px; background: var(--color-tide);
}

/* ---- Accordion ------------------------------------------------------------ */
.faq details { border-top: 1px solid var(--color-line); }
.faq details:last-child { border-bottom: 1px solid var(--color-line); }
.faq summary {
  list-style: none; display: flex; justify-content: space-between; gap: 1rem;
  align-items: center; padding: 1rem 0;
  font-family: var(--font-heading); font-weight: 600; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 1.6rem; height: 1.6rem; display: grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--color-line-strong); color: var(--color-tide);
  font-family: var(--font-body); font-weight: 600;
}
.faq details[open] summary::after { content: "\2013"; }
.faq .answer { padding: 0 0 1.1rem; color: var(--color-ink); max-width: 46rem; }

/* ---- Breadcrumbs ---------------------------------------------------------- */
.crumbs { font-size: 0.9rem; color: var(--color-muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--color-line-strong); }
.crumbs a { color: var(--color-muted); text-decoration: none; }
.crumbs a:hover { color: var(--color-tide); text-decoration: underline; }

/* ---- Header nav ----------------------------------------------------------- */
.site-header {
  background: var(--color-paper); border-bottom: 1px solid var(--color-line);
  position: sticky; top: 0; z-index: 60;
}
@supports (backdrop-filter: blur(6px)) {
  .site-header { background: color-mix(in srgb, var(--color-paper) 92%, transparent); backdrop-filter: blur(8px); }
}
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--color-ink); }
.wordmark .mark { flex: none; }
.wordmark .name { font-family: var(--font-heading); font-weight: 600; font-size: 1.12rem; line-height: 1.05; letter-spacing: -0.01em; }
.wordmark .name .accent { color: var(--color-tide); }

.nav-link {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.5rem 0.65rem;
  border-radius: 8px; font-weight: 600; font-size: 0.93rem; color: var(--color-ink);
  text-decoration: none; background: transparent; border: 0; cursor: pointer;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { background: var(--color-sand); color: var(--color-ink); }
.nav-item { position: relative; }
.nav-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 17rem; display: none;
  padding: 0.75rem; background: #ffffff; border: 1px solid var(--color-line);
  border-radius: var(--radius-card); box-shadow: 0 16px 40px -20px rgba(14, 42, 58, 0.35);
}
.nav-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.nav-item[data-open="true"] .nav-panel { display: block; }
.nav-panel a { display: block; padding: 0.4rem 0.6rem; border-radius: 6px; color: var(--color-ink); text-decoration: none; font-size: 0.93rem; }
.nav-panel a:hover { background: var(--color-harbor); color: var(--color-tide); }
.nav-panel .group-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-muted); padding: 0.35rem 0.6rem 0.2rem;
}
.nav-panel .cols { display: grid; gap: 0.5rem; }
.nav-panel.wide { min-width: 31rem; }
.nav-panel.wide .cols { grid-template-columns: 1fr 1fr; }
.nav-panel.right { left: auto; right: 0; }

/* ---- Mobile menu ---------------------------------------------------------- */
.mobile-menu { display: none; border-top: 1px solid var(--color-line); background: #ffffff; }
.mobile-menu[data-open="true"] { display: block; }
.mobile-menu details { border-bottom: 1px solid var(--color-line); }
.mobile-menu summary { padding: 0.85rem 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary::after { content: "+"; color: var(--color-tide); }
.mobile-menu details[open] summary::after { content: "\2013"; }
.mobile-menu a { display: block; padding: 0.5rem 0; color: var(--color-ink); text-decoration: none; }
.mobile-menu a:hover { color: var(--color-tide); }
.mobile-menu .plain { border-bottom: 1px solid var(--color-line); padding: 0.85rem 0; font-weight: 600; }
.mobile-menu .group-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-muted); padding: 0.5rem 0 0.15rem; }

.mobile-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 50; display: grid; grid-auto-flow: column;
  gap: 0.5rem; padding: 0.6rem 0.9rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--color-line); backdrop-filter: blur(6px);
}
body.has-mobile-bar { padding-bottom: 4.5rem; }
@media (min-width: 1024px) {
  .mobile-bar { display: none; }
  body.has-mobile-bar { padding-bottom: 0; }
}

/* ---- Footer --------------------------------------------------------------- */
.footer { margin-top: 4rem; }
.footer a { color: #d7e0e5; text-decoration: none; }
.footer a:hover { color: #ffffff; text-decoration: underline; }
.footer h2 {
  font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: #9fb0ba; font-weight: 700; margin-bottom: 0.75rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer .brand { font-family: var(--font-heading); font-weight: 600; font-size: 1.3rem; color: #ffffff; }
.footer .county-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: #9fb0ba; margin-bottom: 0.3rem; }
.footer .legal { border-top: 1px solid var(--color-deep-line); color: var(--color-onDeep-muted); }

/* ---- Figures / diagrams --------------------------------------------------- */
.figure img { width: 100%; border-radius: var(--radius-card); border: 1px solid var(--color-line); aspect-ratio: 16 / 9; object-fit: cover; }
.figure figcaption { margin-top: 0.5rem; font-size: 0.85rem; color: var(--color-muted); }
.diagram {
  margin: 2rem 0;
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  max-width: 100%;
  overflow-x: auto;
}
.diagram svg { width: 100%; height: auto; display: block; margin-inline: auto; }
.diagram figcaption { margin-top: 0.75rem; font-size: 0.88rem; color: var(--color-muted); text-align: left; }
.diagram-hero { margin-top: 0; }

/* ---- Callout / steps / results -------------------------------------------- */
.callout { border: 1px solid var(--color-line); border-left: 4px solid var(--color-tide); border-radius: var(--radius-card); background: #ffffff; padding: 1rem 1.25rem; }
.callout.warn { border-left-color: var(--color-buoy); }
.callout .callout-title { font-weight: 700; margin-bottom: 0.25rem; }

.step-num {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 999px;
  background: var(--color-deep); color: #ffffff; font-family: var(--font-heading); font-weight: 600;
  font-size: 1.1rem; flex: none;
}
.step-num.on-tide { background: var(--color-tide); }
.verify-item { border-radius: var(--radius-card); border: 1px solid var(--color-deep-line); background: var(--color-deep-soft); padding: 1.25rem; display: flex; gap: 1rem; }

.result-box { border: 1px solid var(--color-line); border-radius: var(--radius-card); background: #ffffff; padding: 1.25rem 1.5rem; }
.result-range { font-family: var(--font-heading); font-weight: 600; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); color: var(--color-deep); line-height: 1.1; }
.radio-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.radio-row label { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.9rem; border: 1px solid var(--color-line-strong); border-radius: 999px; cursor: pointer; background: #ffffff; font-weight: 500; }
.radio-row label:has(input:checked) { border-color: var(--color-tide); background: var(--color-tide-mist); }
.radio-row input { accent-color: var(--color-tide); }
.result-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.result-list li { padding-left: 1rem; position: relative; }
.result-list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.4rem; height: 0.4rem; border-radius: 999px; background: var(--color-tide); }

/* ---- Prose ---------------------------------------------------------------- */
.prose { max-width: var(--prose); font-size: 1.0625rem; line-height: 1.65; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.2em; margin-bottom: 0.6em; scroll-margin-top: 1.5rem; }
.prose h3 { margin-top: 1.6em; margin-bottom: 0.4em; scroll-margin-top: 1.5rem; }
.prose h2 + h3 { margin-top: 0.8em; }
.prose p { text-wrap: pretty; }
.prose a { color: var(--color-tide); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
.prose a:hover { color: var(--color-tide-deep); }
.prose ul, .prose ol { padding-left: 1.4rem; margin-left: 0; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-top: 0.4em; padding-left: 0.2rem; }
.prose li::marker { color: var(--color-tide); }
.prose strong { font-weight: 700; color: var(--color-ink); }
.prose blockquote { margin: 1.5em 0; padding: 0.8em 1.2em; border-left: 4px solid var(--color-tide); background: #ffffff; border-radius: 0 var(--radius-card) var(--radius-card) 0; color: var(--color-muted); }
.prose blockquote p { margin: 0; }
.prose hr { margin: 2.5em 0; }
.prose dl dt { font-weight: 700; margin-top: 1em; }
.prose dl dd { margin: 0.25em 0 0 1.2rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--color-line); border-radius: var(--radius-card); background: #fff; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 0; }
.table-wrap thead th { text-align: left; font-weight: 700; background: var(--color-sand); }
.table-wrap th, .table-wrap td { border: 1px solid var(--color-line); padding: 0.55rem 0.7rem; vertical-align: top; }
.table-wrap tr > *:first-child { border-left: 0; }
.table-wrap tr > *:last-child { border-right: 0; }
.prose code { font-size: 0.9em; background: var(--color-sand); padding: 0.1em 0.35em; border-radius: 4px; }
.prose img { border-radius: var(--radius-card); border: 1px solid var(--color-line); }
.prose figure figcaption { font-size: 0.85rem; color: var(--color-muted); margin-top: 0.5rem; }
.prose .lede { font-size: 1.2rem; color: var(--color-muted); }
.ext-icon { display: inline-block; vertical-align: -0.08em; margin-left: 0.2em; opacity: 0.65; }

/* ---- Utilities ------------------------------------------------------------ */
.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; }
.hidden { display: none !important; }
.flex { display: flex; }
.grid { display: grid; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.shrink-0 { flex: none; }
.mt-auto { margin-top: auto; }
.list-none { list-style: none; margin: 0; padding: 0; }
.no-underline { text-decoration: none; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-heading { font-family: var(--font-heading); }
.text-xs { font-size: 0.78rem; }
.text-sm { font-size: 0.9rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.12rem; }
.text-h2sm { font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.5rem); }
.text-h3sm { font-size: 1.12rem; }
.text-muted { color: var(--color-muted); }
.text-deep { color: var(--color-deep); }
.text-white { color: #ffffff; }
.uppercase { text-transform: uppercase; }
.tracking-widest { letter-spacing: 0.1em; }
.whitespace-nowrap { white-space: nowrap; }
.relative { position: relative; }

.gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; } .gap-5 { gap: 1.25rem; } .gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; } .gap-10 { gap: 2.5rem; }
.gap-x-4 { column-gap: 1rem; } .gap-y-2 { row-gap: 0.5rem; }

.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; } .mt-5 { margin-top: 1.25rem; } .mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; } .mt-10 { margin-top: 2.5rem; } .mt-12 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; }
.pt-3 { padding-top: 0.75rem; } .pt-4 { padding-top: 1rem; } .pt-5 { padding-top: 1.25rem; }
.pt-6 { padding-top: 1.5rem; } .pt-8 { padding-top: 2rem; }
.pb-2 { padding-bottom: 0.5rem; } .pb-3 { padding-bottom: 0.75rem; } .pb-4 { padding-bottom: 1rem; }
.pb-6 { padding-bottom: 1.5rem; } .pb-8 { padding-bottom: 2rem; } .pb-10 { padding-bottom: 2.5rem; }
.pb-14 { padding-bottom: 3.5rem; }
.py-2 { padding-block: 0.5rem; } .py-3 { padding-block: 0.75rem; } .py-4 { padding-block: 1rem; }
.py-6 { padding-block: 1.5rem; } .py-8 { padding-block: 2rem; } .py-10 { padding-block: 2.5rem; }
.py-12 { padding-block: 3rem; } .py-14 { padding-block: 3.5rem; } .py-16 { padding-block: 4rem; }
.p-5 { padding: 1.25rem; } .p-6 { padding: 1.5rem; }
@media (min-width: 640px) { .sm-p-7 { padding: 1.75rem; } }

.max-w-sm { max-width: 26rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-prose { max-width: var(--prose); }

.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .sm-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm-span-2 { grid-column: span 2; }
}
@media (min-width: 768px) {
  .md-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md-row { flex-direction: row; align-items: center; justify-content: space-between; }
}
/* Declared before the 1024px block so the media query wins at desktop widths. */
.lg-only { display: none; }

@media (min-width: 1024px) {
  .lg-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg-items-start { align-items: start; }
  .lg-span-2 { grid-column: span 2; }
  .lg-span-3 { grid-column: span 3; }
  .lg-span-5 { grid-column: span 5; }
  .lg-span-6 { grid-column: span 6; }
  .lg-span-7 { grid-column: span 7; }
  .lg-only { display: flex; }
  .lg-hidden { display: none !important; }
}

/* ---- Narrow screens (down to 360px) ------------------------------------- */
html, body { overflow-x: clip; max-width: 100%; }
.grid > *, .flex > * { min-width: 0; }
.prose { overflow-wrap: break-word; }
.prose a, dd a, .footer a, .keyfacts li { overflow-wrap: anywhere; }
dl dd { margin-left: 0; overflow-wrap: anywhere; }
dl dt { margin: 0; }
@media (max-width: 380px) {
  body { font-size: 16px; }
  .btn { padding-inline: 1rem; font-size: 0.95rem; }
  .mobile-bar { padding-inline: 0.75rem; }
}

/* ---- Motion / print ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .mobile-bar, .site-header, .footer, .no-print, .band-deep, .skip-link,
  #cta, #after-form, #money, #verify, #related, form { display: none !important; }
  body { background: #fff; font-size: 11.5pt; padding-bottom: 0; }
  .container-x { max-width: none; padding-inline: 0; }
  .prose { max-width: none; }
  h1, h2, h3 { break-after: avoid; page-break-after: avoid; }
  .prose p, .prose li, .table-wrap, .keyfacts, .diagram { break-inside: avoid; page-break-inside: avoid; }
  .prose a { color: #000; text-decoration: underline; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; word-break: break-all; }
  .ext-icon { display: none; }
  .faq details { display: block; }
  .faq details > div.answer { display: block !important; }
  .keyfacts { border: 1px solid #999; background: #fff; }
}


/* ---- Photos ---------------------------------------------------------------- */
.photo { margin: 0; }
.photo img {
  width: 100%; height: auto; display: block; border-radius: 14px;
  background: #e9e4da; aspect-ratio: 3 / 2; object-fit: cover;
}
@media (max-width: 640px) { .photo img { border-radius: 10px; } }
@media print { .photo { display: none; } }

/* Town photographs: local place shot under the key-facts block. */
.photo-town { margin: 0; }
.photo-town figcaption {
  margin-top: .6rem;
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--color-muted);
}
.photo-town figcaption a {
  color: var(--color-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.photo-town figcaption a:hover { color: var(--color-tide-deep); }
