/* Affordable Solar TX v2 · site styles
 * Hallmark · macrostructure: photo-front-door + rail + tool band · theme: custom (Gulf blue, sun, ink)
 * Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 (see design-review.md)
 * Tokens: every colour and font family below comes from :root. */

@font-face {
  font-family: "Zilla Slab";
  src: url("zillaslab-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0F2A3D;
  --ink-soft: #4A5E6E;
  --blue: #1665A3;
  --blue-deep: #0F4F82;
  --sky: #E8F2FA;
  --sky-line: #BFD6EA;
  --sun: #F6B93B;
  --sun-deep: #E5A21F;
  --sun-pale: #FFF6E3;
  --green: #1E7A4C;
  --green-pale: #E6F4EC;
  --paper: #FCFDFE;
  --soft: #F5F7F9;
  --rule: #D3DDE6;
  --field: #6B8193;
  --on-dark: #FAFCFE;
  --on-dark-soft: #C9DDF0;
  --scrim: rgba(15, 42, 61, 0.9);
  --scrim-mid: rgba(15, 42, 61, 0.72);
  --scrim-clear: rgba(15, 42, 61, 0);
  --ledger-bg: rgba(15, 42, 61, 0.86);
  --ledger-rule: rgba(250, 252, 254, 0.18);
  --focus: #0F2A3D;
  --font-display: "Zilla Slab", "Rockwell", "Roboto Slab", Georgia, serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  font-feature-settings: "kern" 1;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-deep); text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; font-style: normal; line-height: 1.12; margin: 0; overflow-wrap: anywhere; min-width: 0; letter-spacing: -0.005em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
.hero-home, .check-band, .site-footer { --focus: var(--sun); }

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

.skip {
  position: absolute; left: 12px; top: -120px; z-index: 10;
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px;
  background: var(--ink); color: var(--on-dark); font-weight: 700; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 8px; border: 2px solid transparent;
  font-family: var(--font-body); font-size: 17px; font-weight: 700; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 18px; }
.btn-sun { background: var(--sun); color: var(--ink); border-color: var(--sun); }
.btn-sun:hover { background: var(--sun-deep); border-color: var(--sun-deep); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: var(--on-dark); border-color: var(--on-dark); }
.btn-ghost:hover { background: var(--on-dark); color: var(--ink); }
.btn-blue { background: var(--blue); color: var(--on-dark); border-color: var(--blue); }
.btn-blue:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--on-dark); }

/* --------------------------------------------------------------- header */
.masthead { background: var(--paper); border-bottom: 1px solid var(--rule); }
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1; white-space: nowrap; }
.brand-tx { display: inline-block; margin-left: 2px; padding: 3px 5px 2px; background: var(--blue); color: var(--on-dark); border-radius: 4px; font-size: 0.72em; vertical-align: 0.12em; }
.mark { flex: none; }
.mark-tile { fill: var(--blue); }
.mark-sun { fill: var(--sun); }
.mark-line { stroke: var(--on-dark); stroke-width: 2; stroke-linecap: round; }
.mark-arrow { stroke: var(--on-dark); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.brand-on-dark { color: var(--on-dark); }
.brand-on-dark:hover { color: var(--on-dark); }
.brand-on-dark .brand-tx { background: var(--sun); color: var(--ink); }
.brand-on-dark .mark-tile { fill: var(--blue); }

.main-nav ul { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.nav-link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; color: var(--ink); font-weight: 600; text-decoration: none; border-radius: 8px; }
.nav-link:hover { color: var(--blue); text-decoration: underline; }

.town-nav { background: var(--sky); border-top: 1px solid var(--sky-line); }
.town-nav-row { display: flex; align-items: center; gap: 12px; }
.town-nav-label { flex: none; font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.town-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.town-nav ul::-webkit-scrollbar { display: none; }
.town-link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px; color: var(--ink); font-size: 16px; font-weight: 500; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.town-link:hover { color: var(--blue); border-bottom-color: var(--sky-line); }
.town-link[aria-current="page"] { font-weight: 700; border-bottom-color: var(--blue); }

/* --------------------------------------------------------------- shared */
.kicker { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.lead { font-size: 20px; line-height: 1.55; max-width: 52ch; margin-top: 20px; }
.hero-action { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.concept { font-size: 15px; line-height: 1.5; margin-top: 22px; max-width: 60ch; }
.section-note { color: var(--ink-soft); max-width: 62ch; margin-top: 12px; }

/* --------------------------------------------------------------- home hero */
.hero-home { position: relative; color: var(--on-dark); background: var(--ink); isolation: isolate; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; z-index: -2; }
.hero-home::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, var(--scrim) 0%, var(--scrim) 34%, var(--scrim-mid) 50%, var(--scrim-clear) 78%);
}
.hero-inner { padding-top: clamp(44px, 6vw, 72px); padding-bottom: clamp(60px, 7vw, 96px); }
.hero-home .kicker { color: var(--sun); }
.hero-home .hero-text { max-width: 640px; }
.h1-home { font-size: clamp(40px, 4.9vw, 64px); }
.hero-home .lead { color: var(--on-dark-soft); }
.hero-home .concept { color: var(--on-dark-soft); }
.hero-home .concept strong { color: var(--on-dark); }
.hero-ledger { background: var(--ledger-bg); border-top: 1px solid var(--ledger-rule); }
.ledger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0 auto; }
.ledger li { position: relative; padding: 18px 20px 18px 34px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.ledger li::before { content: ""; position: absolute; left: 12px; top: 25px; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); }
.ledger li + li { border-left: 1px solid var(--ledger-rule); }
.ledger li:first-child { padding-left: 22px; }
.ledger li:first-child::before { left: 0; }

/* --------------------------------------------------------------- journey */
.journey { background: var(--sky); padding: 72px 0 80px; }
.journey-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; }
.journey-head h2 { font-size: clamp(30px, 3.2vw, 42px); max-width: 18ch; }
.journey-head p { color: var(--ink-soft); max-width: 52ch; }
.rail { counter-reset: step; list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; position: relative; }
.rail::before { content: ""; position: absolute; left: 18px; right: 18px; top: 18px; height: 3px; background: var(--blue); }
.step { counter-increment: step; position: relative; }
.step-dot { position: relative; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--sun); border: 3px solid var(--blue); font-weight: 800; font-size: 16px; color: var(--ink); }
.step-dot::after { content: counter(step); }
.step-name { font-size: 22px; margin: 18px 0 8px; }
.step p { font-size: 16px; line-height: 1.55; color: var(--ink-soft); }

/* --------------------------------------------------------------- written cards */
.written { padding: 80px 0; }
.written h2 { font-size: clamp(30px, 3.2vw, 42px); }
.cards { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.card img { width: 100%; height: 236px; object-fit: cover; }
.card-body { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 26px; }
.card-body p { font-size: 16.5px; color: var(--ink-soft); flex: 1; }
.card-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.card-chart { height: 236px; background: var(--soft); border-bottom: 1px solid var(--rule); padding: 20px 22px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.qline { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; font-size: 15px; color: var(--ink-soft); }
.qline span:last-child { white-space: nowrap; }
.qline.is-solar { background: var(--sky); border-color: var(--blue); color: var(--ink); font-weight: 700; }
.bar { display: flex; align-items: center; height: 44px; padding: 0 12px; border-radius: 6px; font-size: 15px; font-weight: 700; }
.bar-use { width: 100%; background: var(--sky-line); color: var(--ink); }
.bar-out { width: 99.6%; background: var(--green); color: var(--on-dark); }
.bar-key { font-size: 14px; color: var(--ink-soft); }

/* --------------------------------------------------------------- buyback check */
.check-band { background: var(--blue); color: var(--on-dark); padding: 80px 0; }
.check-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px 64px; align-items: end; }
.check-head h2 { font-size: clamp(36px, 4vw, 54px); }
.check-head p { color: var(--on-dark); max-width: 62ch; }
.checker {
  --focus: var(--ink);
  margin-top: 36px; background: var(--paper); color: var(--ink); border-radius: 14px; padding: clamp(18px, 3vw, 36px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px 40px;
  grid-template-areas: "system plans" "sysout plans" "summary summary" "note note";
}
.checker fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.checker legend { padding: 0; font-family: var(--font-display); font-size: 24px; margin-bottom: 14px; }
.system { grid-area: system; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 16px; }
.system legend { grid-column: 1 / -1; }
.cfield { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cfield label { font-size: 15px; font-weight: 700; line-height: 1.3; }
.unit { font-weight: 500; color: var(--ink-soft); }
.hint { font-size: 13.5px; color: var(--ink-soft); line-height: 1.35; }
.cfield input, .qfield select {
  width: 100%; min-height: 48px; padding: 0 12px; border: 1.5px solid var(--field); border-radius: 8px;
  background: var(--paper); color: var(--ink); font: 600 18px/1.2 var(--font-body);
}
.cfield input:disabled { background: var(--soft); }
.system-out { grid-area: sysout; border-top: 2px solid var(--ink); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.system-out > p:not(.status) { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.out-label { font-size: 16px; color: var(--ink-soft); }
.out-value { font-family: var(--font-display); font-size: 24px; white-space: nowrap; }
.status { margin-top: 8px; padding: 12px 14px; border-radius: 8px; font-size: 16px; line-height: 1.45; background: var(--soft); }
.status.is-ok { background: var(--green-pale); color: var(--green); font-weight: 700; }
.status.is-over { background: var(--sun-pale); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--sun-deep); }
.plans { grid-area: plans; align-self: start; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: var(--radius); }
.plan { padding: 18px !important; display: flex; flex-direction: column; gap: 14px; }
.plan + .plan { border-left: 1px solid var(--rule) !important; }
.plan legend { float: left; width: 100%; margin: 0; font-size: 22px; padding-bottom: 10px; border-bottom: 3px solid var(--sun); }
.plan legend + * { clear: both; }
.plan-out { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.plan-value { font-family: var(--font-display); font-size: 28px; line-height: 1.1; color: var(--blue); }
.plan-sub { font-size: 14.5px; color: var(--ink-soft); line-height: 1.4; }
.check-summary { grid-area: summary; font-size: 19px; font-weight: 600; line-height: 1.5; }
.check-summary:empty { display: none; }
.check-note { grid-area: note; font-size: 14.5px; color: var(--ink-soft); line-height: 1.5; max-width: 90ch; }

/* --------------------------------------------------------------- reading */
.reading { display: grid; grid-template-columns: 250px minmax(0, 680px); gap: 64px; padding-top: 80px; padding-bottom: 88px; justify-content: center; }
.reading-rail { min-width: 0; }
.toc { position: sticky; top: 16px; }
.toc summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; cursor: pointer; font-weight: 700; font-size: 16px; border-bottom: 2px solid var(--ink); list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-size: 22px; font-weight: 600; }
.toc[open] summary::after { content: "–"; }
.toc-count { margin-left: auto; font-weight: 500; color: var(--ink-soft); font-size: 14px; }
.toc ul { list-style: none; margin: 8px 0 0; padding: 0; }
.toc a { display: flex; align-items: center; min-height: 44px; padding: 6px 0 6px 12px; border-left: 3px solid var(--rule); color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.35; }
.toc a:hover { color: var(--blue); border-left-color: var(--sky-line); }
.toc a.is-here { border-left-color: var(--blue); font-weight: 700; }

.editorial { min-width: 0; }
.editorial > * + * { margin-top: 20px; }
.editorial h2 { font-size: clamp(28px, 3vw, 36px); margin-top: 72px; padding-top: 18px; border-top: 3px solid var(--sun); scroll-margin-top: 16px; }
.editorial > h2:first-child { margin-top: 0; }
.editorial h3 { font-size: 23px; margin-top: 40px; }
.editorial h2 + *, .editorial h3 + * { margin-top: 16px; }
.editorial p, .editorial li { line-height: 1.68; }
.editorial ul, .editorial ol { padding-left: 1.3em; }
.editorial li + li { margin-top: 8px; }
.editorial li::marker { color: var(--blue); font-weight: 700; }
.editorial strong { font-weight: 700; }
.example { margin: 28px 0; padding: 20px 24px; background: var(--sky); border: 1px solid var(--sky-line); border-radius: var(--radius); }
.example p { font-size: 17px; }
.example strong:first-child { color: var(--blue-deep); }
.table-scroll { overflow-x: auto; margin: 28px 0; border: 1px solid var(--rule); border-radius: var(--radius); }
.table-scroll:focus-visible { outline-offset: 2px; }
.editorial table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; min-width: 560px; }
.editorial th, .editorial td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.editorial thead th { background: var(--ink); color: var(--on-dark); font-weight: 700; }
.editorial tbody tr:nth-child(even) td { background: var(--soft); }
.editorial tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  .table-scroll { overflow-x: visible; border: 0; border-radius: 0; }
  .editorial table.stack { min-width: 0; font-size: 16px; }
  .editorial table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .editorial table.stack, .editorial table.stack tbody, .editorial table.stack tr, .editorial table.stack td, .editorial table.stack tbody th { display: block; }
  .editorial table.stack tr { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
  .editorial table.stack tr + tr { margin-top: 12px; }
  .editorial table.stack tbody tr:nth-child(even) td:not(:first-child) { background: transparent; }
  .editorial table.stack td, .editorial table.stack tbody th { padding: 8px 14px; border-bottom: 0; }
  .editorial table.stack tbody tr td:first-child, .editorial table.stack tbody tr th:first-child { background: var(--ink); color: var(--on-dark); font-weight: 700; padding: 10px 14px; }
  .editorial table.stack td:first-child::before { content: none; }
  .editorial table.stack td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); letter-spacing: .02em; }
  .editorial table.stack td:last-child { padding-bottom: 14px; }
}

/* --------------------------------------------------------------- towns */
.towns { background: var(--soft); padding: 80px 0; border-top: 1px solid var(--rule); }
.towns-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: start; }
.page-town .towns-grid { grid-template-columns: minmax(0, 1fr); }
.towns h2 { font-size: clamp(30px, 3.2vw, 42px); }
.town-table { list-style: none; margin: 28px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.page-town .town-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.town-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 16px 4px; min-height: 64px; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.town-row:hover .town-name { color: var(--blue); text-decoration: underline; }
.town-name { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.2; }
.town-topic { grid-column: 1; font-size: 15.5px; color: var(--ink-soft); line-height: 1.4; }
.town-pending { font-weight: 600; color: var(--ink); }
.town-open { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 14px; font-weight: 700; color: var(--blue); white-space: nowrap; }
.towns-photo { margin: 6px 0 0; }
.towns-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }

/* --------------------------------------------------------------- quote */
.quote-band { background: var(--sun-pale); padding: 80px 0 88px; border-top: 4px solid var(--sun); }
.quote-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.quote-intro h2 { font-size: clamp(34px, 3.8vw, 50px); }
.quote-intro p { margin-top: 16px; max-width: 46ch; }
.quote-tool { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: clamp(18px, 3vw, 32px); display: grid; gap: 18px; }
.qfield { display: flex; flex-direction: column; gap: 6px; }
.qfield label { font-weight: 700; font-size: 16px; }
.qfield select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px; background-repeat: no-repeat; font-weight: 600; font-size: 17px; }
.quote-tool .btn { justify-self: start; }
.quote-result:empty { display: none; }
.quote-result { border-top: 2px solid var(--ink); padding-top: 18px; }
.quote-result h3 { font-size: 24px; }
.quote-result ol { margin: 14px 0 0; padding-left: 1.4em; }
.quote-result li { line-height: 1.55; }
.quote-result li + li { margin-top: 8px; }
.quote-result li::marker { font-weight: 700; color: var(--blue); }
.quote-result p { margin-top: 14px; font-size: 15.5px; color: var(--ink-soft); }

/* --------------------------------------------------------------- town hero + next */
.hero-town { background: var(--sky); padding: 64px 0 72px; border-bottom: 1px solid var(--sky-line); }
.hero-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 56px; align-items: start; }
.hero-town .kicker { color: var(--blue); }
.h1-town { font-size: clamp(38px, 4.4vw, 58px); }
.h1-town.h1-long { font-size: clamp(34px, 3.8vw, 50px); }
.hero-town .lead { color: var(--ink); }
.hero-town .concept { color: var(--ink-soft); }
.teaser { background: var(--paper); border: 1px solid var(--sky-line); border-top: 5px solid var(--blue); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.teaser-props { list-style: none; margin: 0 0 6px; padding: 0 0 16px; border-bottom: 1px solid var(--rule); display: grid; gap: 8px; }
.teaser-props li { position: relative; padding-left: 22px; font-weight: 600; font-size: 16.5px; line-height: 1.4; }
.teaser-props li::before { content: ""; position: absolute; left: 0; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 2px var(--blue); }
.teaser-title { font-size: 26px; }
.teaser p { font-size: 16.5px; color: var(--ink-soft); }
.teaser .btn { align-self: flex-start; }

.next { padding: 72px 0; background: var(--sky); }
.next h2 { font-size: clamp(28px, 3vw, 38px); }
.next-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.next-card { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 26px; background: var(--paper); border: 1px solid var(--sky-line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.next-check { border-top: 5px solid var(--blue); }
.next-quote { border-top: 5px solid var(--sun); }
.next-name { font-family: var(--font-display); font-size: 25px; font-weight: 700; line-height: 1.2; }
.next-text { color: var(--ink-soft); font-size: 16.5px; }
.next-action { margin-top: auto; font-weight: 700; color: var(--blue); }
.next-card:hover .next-action { text-decoration: underline; }

/* --------------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: var(--on-dark-soft); padding: 56px 0 64px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 5fr); gap: 40px; }
.footer-brand p { margin-top: 14px; font-size: 16px; max-width: 34ch; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav .footer-link { display: inline-flex; align-items: center; min-height: 44px; }
.footer-link { color: var(--on-dark); }
.footer-link:hover { color: var(--sun); }
.footer-link[aria-current="page"] { font-weight: 700; text-decoration: none; }
.footer-notes p { font-size: 14.5px; line-height: 1.55; }
.footer-notes p + p { margin-top: 12px; }
.footer-notes strong { color: var(--on-dark); }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .reading { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 48px; max-width: 800px; }
  .toc { position: static; }
  .toc summary { border: 1px solid var(--rule); border-radius: 8px; padding: 0 14px; background: var(--soft); }
  .rail { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 32px; }
  .rail::before { left: 17px; right: auto; top: 18px; bottom: 18px; width: 3px; height: auto; }
  .step { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 18px; padding-bottom: 22px; }
  .step-dot { grid-row: 1 / span 2; }
  .step-name { margin: 4px 0 4px; }
  .checker { grid-template-columns: minmax(0, 1fr); grid-template-areas: "system" "sysout" "plans" "summary" "note"; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-notes { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .journey-head, .check-head, .quote-grid, .towns-grid, .hero-split { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  .hero-home::before { background: linear-gradient(180deg, var(--scrim-mid) 0%, var(--scrim) 55%, var(--scrim) 100%); }
  .hero-photo { object-position: 60% 30%; }
  .ledger { grid-template-columns: minmax(0, 1fr); }
  .ledger li { padding: 12px 0 12px 22px; }
  .ledger li::before { left: 0; top: 19px; }
  .ledger li + li { border-left: 0; border-top: 1px solid var(--ledger-rule); }
  .page-town .town-table { grid-template-columns: minmax(0, 1fr); }
  .next-list { grid-template-columns: minmax(0, 1fr); }
  .hero-split { gap: 36px; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .nav-secondary { display: none; }
  .lead { font-size: 18px; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan + .plan { border-left: 0 !important; border-top: 1px solid var(--rule) !important; }
  .system { grid-template-columns: minmax(0, 1fr); }
  .journey, .written, .check-band, .towns, .quote-band, .next { padding: 56px 0; }
  .hero-town { padding: 44px 0 52px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .town-row { grid-template-columns: minmax(0, 1fr); }
  .town-open { grid-column: 1; grid-row: auto; }
  .editorial h2 { margin-top: 56px; }
  .example { padding: 16px 18px; }
  .hero-action .btn { flex: 1 1 100%; }
}
@media (max-width: 440px) {
  .masthead-row { flex-wrap: wrap; gap: 4px 12px; padding-top: 10px; padding-bottom: 12px; }
  .main-nav { flex: 1 1 100%; }
  .main-nav ul, .main-nav li:last-child { width: 100%; }
  .main-nav .btn { width: 100%; }
  .brand-name { font-size: 20px; }
  .town-nav-label { display: none; }
  .btn-lg { padding: 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Phones and tablets: the hero photo becomes a visible band above the text instead of sitting under a heavy scrim. */
@media (max-width: 900px) {
  .hero-home { background: var(--ink); }
  .hero-home::before { display: none; }
  .hero-photo { position: relative; inset: auto; z-index: 0; height: clamp(170px, 34vw, 300px); object-position: 70% 35%; }
  .hero-inner { padding-top: 32px; }
}
