:root {
  --bg: #f4f7f8;
  --surface: #ffffff;
  --ink: #14213d;
  --muted: #556070;
  --accent: #1d4ed8;
  --coral: #e07a5f;
  --rule: #c9d2d8;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --measure: 34em;
  --gut: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.015em;
}
p { margin: 0 0 1em; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

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

/* Masthead */
.masthead { border-bottom: 1px solid var(--ink); background: var(--bg); }
.masthead .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .75rem 2rem; padding-top: 1rem; padding-bottom: 1rem;
}
.brand { display: inline-flex; }
.brand img { width: 220px; height: auto; }
.masthead nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .25rem 1.25rem;
  font-size: 1rem;
}
.masthead nav a { color: var(--ink); text-decoration: none; padding: .25rem 0; display: inline-block; }
.masthead nav a:hover { text-decoration: underline; }
.issue {
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--muted);
}
.issue .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: .4rem; padding-bottom: .4rem; }

/* Running header + folio on each spread */
.spread { padding: clamp(3rem, 8vw, 6rem) 0; border-bottom: 1px solid var(--rule); }
.running {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  border-top: 2px solid var(--ink);
  padding-top: .5rem; margin-bottom: clamp(2rem, 5vw, 3.5rem);
  font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1rem;
}
.folio { font-variant-numeric: oldstyle-nums; white-space: nowrap; }

/* Hero */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem); }
.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
.hero h1 {
  font-size: clamp(2.5rem, 8.5vw, 5.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.02;
  max-width: 12ch;
}
.lead {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  line-height: 1.45;
  font-weight: 400;
  font-variation-settings: "opsz" 24;
  max-width: 30em;
  margin: 1.5rem 0 2rem;
}
.byline { color: var(--muted); font-size: 1rem; max-width: var(--measure); border-left: 3px solid var(--coral); padding-left: 1rem; }

.btn {
  display: inline-block;
  background: var(--accent); color: #fff;
  font-weight: 600; font-size: 1.05rem;
  padding: .85rem 1.4rem; text-decoration: none;
  border-radius: 3px; border: 2px solid var(--accent);
}
.btn:hover { background: #1a43bd; border-color: #1a43bd; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: #e6ecfb; }

/* Calculator insert */
.insert {
  background: var(--surface);
  border: 1px solid var(--ink);
  outline: 1px solid var(--ink); outline-offset: 5px;
  padding: clamp(1.25rem, 3vw, 2rem);
  margin: 6px;
  align-self: start;
}
.insert h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
.insert .intro { color: var(--muted); font-size: 1rem; margin: .5rem 0 1.25rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: 1rem; margin-bottom: .3rem; }
.field input, .field select {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink);
  background: var(--bg); border: 1px solid #8893a0; border-bottom: 2px solid var(--ink);
  padding: .6rem .7rem; border-radius: 2px;
}
.field input:focus-visible, .field select:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.fields-2 { display: grid; gap: 0 1rem; }
.insert .btn { width: 100%; text-align: center; margin-top: .5rem; }
.insert .note { font-size: .95rem; color: var(--muted); margin: .9rem 0 0; }
.insert-out {
  list-style: none; padding: 1rem 0 0; margin: 1.25rem 0 0; border-top: 1px solid var(--rule);
  font-size: 1rem; display: grid; gap: .35rem;
}
.insert-out li { display: flex; gap: .6rem; align-items: baseline; }
.insert-out svg { flex: none; width: 14px; height: 14px; transform: translateY(2px); }

/* Figure */
.plate { margin: 0; }
.plate .frame { background: var(--surface); border: 1px solid var(--ink); padding: clamp(.5rem, 2vw, 1.25rem); }
.plate figcaption {
  font-size: .95rem; color: var(--muted); margin-top: .6rem; max-width: 46em;
}
.plate figcaption b { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--ink); }

/* Articles */
.articles { display: grid; gap: 2.5rem; }
.article h3 { font-size: clamp(1.5rem, 2.6vw, 1.85rem); margin-bottom: .8rem; }
.article p { max-width: var(--measure); }
.article .kicker {
  font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1rem; margin-bottom: .4rem;
}
.article ul { padding-left: 1.1rem; margin: 0 0 1em; }
.article li { margin-bottom: .3rem; }
.article li::marker { color: var(--coral); }

.section-title { font-size: clamp(2rem, 5vw, 3.25rem); max-width: 18ch; margin-bottom: 1.25rem; }
.section-lead { font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.5; max-width: 34em; color: var(--ink); margin-bottom: clamp(2rem, 5vw, 3rem); }

.pull {
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--ink);
  display: grid; gap: 1rem;
}
.pull blockquote { margin: 0; }
.pull p {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem); line-height: 1.2; letter-spacing: -0.01em;
  max-width: 24ch; margin: 0;
  font-variation-settings: "opsz" 144;
}
.pull .mark-line { width: 64px; height: 12px; }
.pull figcaption { color: var(--muted); font-size: 1rem; }

/* Steps (a real sequence) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: s; }
.steps li {
  counter-increment: s;
  display: grid; grid-template-columns: 3.2rem 1fr; gap: 0 1rem;
  padding: 1.5rem 0; border-top: 1px solid var(--rule);
}
.steps li::before {
  content: counter(s);
  font-family: var(--serif); font-size: 2.6rem; line-height: 1; font-weight: 400;
  color: var(--accent); font-variation-settings: "opsz" 144;
}
.steps h3 { font-size: 1.4rem; margin-bottom: .4rem; }
.steps p { margin: 0; max-width: var(--measure); }

/* Installers */
.installers { background: var(--ink); color: #eef2f6; border-bottom: 0; }
.installers .running { border-color: #eef2f6; color: #b9c3cf; }
.installers .section-title { color: #fff; }
.installers p { max-width: var(--measure); }
.installers a { color: #fff; }
.installers .btn { background: #fff; color: var(--ink); border-color: #fff; }
.installers .btn:hover { background: #dfe6ef; border-color: #dfe6ef; }
.inst-grid { display: grid; gap: 2rem; }
.inst-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid #47536b; }
.inst-list li { padding: 1rem 0; border-bottom: 1px solid #47536b; }
.inst-list b { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; display: block; color: #fff; }

/* Area */
.area-grid { display: grid; gap: 2rem; align-items: start; }
.towns { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.towns li { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 500; }

/* Contact */
.contact { border-bottom: 0; }
.contact-box { border-top: 2px solid var(--ink); padding-top: 2rem; display: grid; gap: 1.5rem; }
.contact .email {
  font-family: var(--serif); font-size: clamp(1.4rem, 5.4vw, 3rem); font-weight: 500;
  color: var(--accent); overflow-wrap: anywhere; letter-spacing: -0.01em;
}

footer.colophon { background: var(--surface); border-top: 1px solid var(--ink); font-size: .95rem; color: var(--muted); }
footer.colophon .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; padding-bottom: 1.5rem; align-items: center; }
footer.colophon img { width: 170px; }

/* Illustration motion: one load moment */
@media (prefers-reduced-motion: no-preference) {
  .js .coast { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.2s .3s ease-out forwards; }
  .js .sun { transform-origin: 1010px 250px; transform: translateY(40px); opacity: 0; animation: rise 1.6s 1s ease-out forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { to { transform: none; opacity: 1; } }

@media (min-width: 560px) {
  .fields-2 { grid-template-columns: 1fr 1fr; }
  .brand img { width: 250px; }
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
  .articles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .article { padding: 0 2rem; border-left: 1px solid var(--rule); }
  .article:first-child { padding-left: 0; border-left: 0; }
  .article:last-child { padding-right: 0; }
  .pull { grid-template-columns: 1fr 2fr; align-items: start; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2.5rem; }
  .steps li { grid-template-columns: 1fr; border-top: 2px solid var(--ink); }
  .steps li::before { margin-bottom: .75rem; }
  .inst-grid, .area-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; }
  .contact-box { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; }
}
