/* ==========================================================================
   Timberline Service — styles
   Tokens → base → components → header rail → sections → pages → consent
   → utilities → motion → print
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: 'Montagu Slab';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/montagu-slab-latin-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Spinnaker';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/spinnaker-latin-400.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  /* Evergreen for the rail and type, ember for heat, glacier for cooling,
     kraft for the cardboard filter frame. */
  --spruce-950: #0f1c16;
  --spruce-900: #16261f;
  --spruce-700: #24473a;
  --spruce-300: #b9c7bf;
  --paper: #f5f0e6;
  --paper-2: #fbf8f2;
  --white: #ffffff;
  --kraft: #cfae7c;
  --kraft-2: #e6d2b0;
  --kraft-ink: #3b2a14;
  --ember: #b23f17;
  --ember-600: #96330f;
  --ember-tint: #f6e1d6;
  --glacier: #1d5c78;
  --frost: #dcebf0;
  --brass: #d6a54a;
  --ink: #16261f;
  --muted: #4f5d55;
  --line: #d8cfbf;
  --marker: #1b2330;

  --font-display: 'Montagu Slab', 'Rockwell', Georgia, serif;
  --font-body: 'Spinnaker', 'Trebuchet MS', system-ui, sans-serif;

  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.45rem, 1.25rem + 0.9vw, 1.95rem);
  --step-3: clamp(1.8rem, 1.45rem + 1.6vw, 2.75rem);
  --step-4: clamp(1.95rem, 1.6rem + 2.4vw, 3.6rem);

  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: clamp(2rem, 1.6rem + 1.6vw, 3rem);
  --space-5: clamp(3.5rem, 2.6rem + 3.6vw, 6.5rem);
  --gutter: clamp(1.1rem, 0.6rem + 2.4vw, 3rem);

  --radius: 6px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgb(22 38 31 / 0.1), 0 10px 28px -12px rgb(22 38 31 / 0.35);
  --shadow-lift: 0 2px 4px rgb(22 38 31 / 0.12), 0 22px 44px -18px rgb(22 38 31 / 0.45);

  --rail-w: 272px;
  --bar-h: 64px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 1rem); }
body {
  margin: 0;
  padding-top: var(--bar-h);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: clip;
}
body.nav-open { overflow: hidden; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}
p, li, dd { text-wrap: pretty; }
p { margin: 0; }
a { color: var(--ember); text-underline-offset: 0.18em; }
a:hover { color: var(--ember-600); }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
code { font-size: 0.92em; }
/* Spinnaker has a single weight, so emphasis switches to the slab face. */
strong { font-family: var(--font-display); font-weight: 600; }

/* ---------- Components ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-ember { background: var(--ember); color: var(--white); }
.btn-ember:hover { background: var(--ember-600); color: var(--white); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }

.link-button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.link-button:hover { color: var(--ember-600); }

/* ---------- Header rail ----------
   Below 1100px: a slim top bar with the wordmark, Book and the round Menu
   button; the dial nav opens as a full-screen panel. From 1100px: a fixed
   left rail with the thermostat dial and its set points always in view.
*/
.rail {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  background: var(--spruce-900);
  color: var(--paper);
}
.rail-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: var(--bar-h);
  padding: 0 clamp(0.75rem, 3vw, 1.5rem);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  margin-right: auto;
  color: var(--paper);
  text-decoration: none;
}
.brand:hover { color: var(--white); }
.brand-mark { width: 38px; height: 38px; flex: none; color: var(--brass); }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; white-space: nowrap; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.22rem; letter-spacing: 0.01em; }
.brand-sub { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--spruce-300); }

.rail-book { gap: 0; min-height: 44px; padding: 0.55rem 1rem; font-size: 0.95rem; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.85rem 0 0.4rem;
  border: 2px solid var(--spruce-700);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--brass); }
/* A tiny thermostat: brass ring with a needle that swings when the menu opens. */
.nav-toggle-dial {
  position: relative;
  width: 30px;
  height: 30px;
  border: 2px solid var(--brass);
  border-radius: 50%;
}
.nav-toggle-dial::after {
  content: '';
  position: absolute;
  left: calc(50% - 1px);
  top: 4px;
  width: 2px;
  height: 11px;
  border-radius: 2px;
  background: var(--ember-tint);
  transform-origin: 50% 100%;
  transform: rotate(-40deg);
  transition: transform 0.3s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-dial::after { transform: rotate(50deg); }

.dial-nav {
  display: none;
  position: fixed;
  inset: var(--bar-h) 0 0;
  overflow-y: auto;
  padding: var(--space-3) var(--gutter) var(--space-4);
  background: var(--spruce-900);
  border-top: 1px solid var(--spruce-700);
}
.dial-nav.is-open { display: grid; align-content: start; justify-items: center; gap: var(--space-2); }

.dial { position: relative; width: min(200px, 60vw); --needle: -72deg; }
.dial-face { width: 100%; height: auto; }
.dial-rim { fill: var(--spruce-950); stroke: var(--brass); stroke-width: 3; }
.dial-plate { fill: var(--spruce-900); }
.dial-tick { stroke: var(--spruce-300); stroke-width: 1; }
.dial-tick-major { stroke-width: 2; }
.dial-dot { fill: var(--brass); }
.dial-num { fill: var(--spruce-300); font-family: var(--font-body); font-size: 10px; text-anchor: middle; }
.dial-needle {
  fill: var(--ember);
  transform-origin: 100px 100px;
  transform: rotate(var(--needle));
  transition: transform 0.6s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.dial-hub { fill: var(--brass); }
.dial-readout {
  position: absolute;
  inset: auto 0 18%;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}
.dial-temp { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--white); }
.dial-name { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass); white-space: nowrap; }

.setpoints-title {
  width: 100%;
  max-width: 22rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--spruce-300);
}
.setpoints { width: 100%; max-width: 22rem; margin: 0; padding: 0; list-style: none; }
.setpoints a {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  color: var(--paper);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.setpoints a:hover { background: var(--spruce-700); color: var(--white); }
.setpoints a[aria-current] { background: var(--spruce-700); }
.setpoints a[aria-current] .sp-temp { color: var(--brass); }
.sp-temp { min-width: 2.6rem; font-family: var(--font-display); font-weight: 700; color: var(--spruce-300); }
.sp-name { font-size: 1.02rem; }

.rail-contact { width: 100%; max-width: 22rem; padding-top: var(--space-2); border-top: 1px solid var(--spruce-700); }
.rail-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  white-space: nowrap;
}
.rail-phone:hover { color: var(--brass); }
.rail-phone svg { width: 20px; height: 20px; color: var(--brass); }
.rail-hours { font-size: 0.88rem; color: var(--spruce-300); }

/* Narrow bars: "Book" alone, and the Menu label is kept for screen readers only. */
@media (max-width: 599px) {
  .rail-book-more { display: none; }
}
@media (max-width: 479px) {
  .nav-toggle { padding: 0 7px; }
  .nav-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
@media (max-width: 379px) {
  .brand-sub { display: none; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-word { font-size: 1.1rem; }
  .rail-book { padding: 0.55rem 0.9rem; }
}

@media (min-width: 1100px) {
  html { scroll-padding-top: 1.5rem; }
  body { padding-top: 0; padding-left: var(--rail-w); }
  .rail {
    inset: 0 auto 0 0;
    width: var(--rail-w);
    display: flex;
    flex-direction: column;
    padding: 1.4rem 1.25rem 1.25rem;
  }
  .rail-bar { display: contents; }
  .brand { order: 0; margin: 0 0 1rem; }
  .nav-toggle { display: none; }
  .dial-nav,
  .dial-nav.is-open {
    order: 1;
    position: static;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    flex: 1;
    overflow: visible;
    padding: 0;
    border: 0;
  }
  .dial { width: 168px; align-self: center; }
  .setpoints a { padding: 0.45rem 0.6rem; }
  .rail-contact { margin-top: auto; }
  .rail-book { order: 2; margin-top: 0.9rem; min-height: 48px; }
}
@media (min-width: 1100px) and (max-height: 820px) {
  .dial { width: 128px; }
  .setpoints a { min-height: 44px; padding-block: 0.35rem; }
  .rail-hours { display: none; }
}

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: var(--space-5) var(--gutter) 0; max-width: 78rem; margin: 0 auto; }
.section-head { max-width: 46rem; margin-bottom: var(--space-4); }
.section-head h2 { font-size: var(--step-3); margin: 0.6rem 0 0.9rem; }
.section-head p:not(.setpoint-tag) { color: var(--muted); font-size: var(--step-1); line-height: 1.5; }
/* Section labels read like a set point on the dial: the temperature, then the name. */
.setpoint-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.setpoint-tag span {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0;
}

/* ----- Hero: the furnace filter ----- */
.hero { padding: clamp(1.25rem, 3vw, 3rem) var(--gutter) 0; max-width: 78rem; margin: 0 auto; }
.filter {
  background: var(--kraft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift), inset 0 0 0 1px rgb(59 42 20 / 0.2);
}
.filter-edge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.75rem clamp(1rem, 2.4vw, 1.6rem);
  color: var(--kraft-ink);
}
.edge-print {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.edge-flow { font-weight: 600; }
.edge-arrow {
  display: inline-block;
  width: 36px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(0 40%, 70% 40%, 70% 0, 100% 50%, 70% 100%, 70% 60%, 0 60%);
}
.edge-date { display: inline-flex; align-items: center; gap: 0.75rem; }
.edge-date-label {
  padding-right: 0.75rem;
  border-right: 2px solid var(--kraft-ink);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  line-height: 1.25;
  text-transform: uppercase;
}
.marker-date {
  width: clamp(120px, 16vw, 168px);
  height: auto;
  fill: none;
  stroke: var(--marker);
  stroke-width: 4.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-4deg);
  overflow: visible;
}
.marker-date path:last-child { stroke-width: 3; }

/* Pleats: soft folds of filter media with a fine wire mesh over them. */
.filter-media {
  margin: 0 clamp(0.6rem, 1.6vw, 1.25rem);
  padding: clamp(1.25rem, 5vw, 4.5rem) clamp(0.75rem, 4vw, 4rem);
  border-radius: 3px;
  background:
    repeating-linear-gradient(135deg, rgb(22 38 31 / 0.06) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(45deg, rgb(22 38 31 / 0.06) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, #f3f0e9 0 9px, #e4dfd4 9px 15px, #cdc6b8 15px 17px, #eae6dd 17px 24px);
  box-shadow: inset 0 3px 8px rgb(59 42 20 / 0.35), inset 0 -3px 8px rgb(59 42 20 / 0.25);
}
.filter-label {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(1.4rem, 4vw, 2.75rem);
  background: var(--paper-2);
  border-top: 8px solid var(--ember);
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.filter-label h1 { font-size: var(--step-4); letter-spacing: -0.01em; }
.h1-accent { color: var(--ember); }
.lede { margin-top: 1.1rem; font-size: var(--step-1); line-height: 1.5; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.filter-edge-bottom { justify-content: space-between; }
.edge-shop { letter-spacing: 0.1em; }

@media (min-width: 900px) {
  .filter { transform: rotate(-0.5deg); }
}

/* ----- Equipment ----- */
.unit {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-top: 2px solid var(--ink);
}
.unit-panel {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 240px;
  padding: 1.25rem;
  background: var(--kraft-2);
  border-radius: var(--radius-lg);
}
.unit-cool .unit-panel { background: var(--frost); }
.unit-warm .unit-panel { background: var(--ember-tint); }
.unit-art { width: 100%; height: auto; }
.unit-copy h3 { font-size: var(--step-2); }
.unit-copy > p { margin-top: 0.6rem; max-width: 42rem; }
.unit-lists { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.unit-lists h4 {
  margin-bottom: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.unit-lists ul { margin: 0; padding: 0; list-style: none; }
.unit-lists li { position: relative; padding: 0.2rem 0 0.2rem 1.2rem; }
.unit-lists li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 0.55rem;
  height: 2px;
  background: var(--ember);
}
.unit-cool .unit-lists li::before { background: var(--glacier); }

.art-body { fill: var(--paper-2); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.art-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.art-louver { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.art-window { fill: #2a1d14; }
.art-flame { fill: var(--ember); }
.art-fan { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.art-plate { fill: var(--brass); stroke: var(--ink); stroke-width: 1.5; }
.art-pipe { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.art-pipe-fill { fill: #cfd6d6; }
.art-fins { fill: none; stroke: var(--glacier); stroke-width: 2; }
.art-fan-cool { fill: var(--white); stroke: var(--ink); stroke-width: 2.5; }
.art-hub { fill: var(--ink); }
.art-frost { fill: none; stroke: var(--glacier); stroke-width: 3; stroke-linecap: round; }
.art-pad { fill: #bdb6a8; }
.art-line-cool { fill: none; stroke: var(--glacier); stroke-width: 4; stroke-linecap: round; }
.art-valve { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }

@media (min-width: 720px) {
  .unit { grid-template-columns: minmax(160px, 220px) 1fr; gap: var(--space-4); }
  .unit-lists { grid-template-columns: 1fr 1fr; }
}

/* ----- Tune-up tickets ----- */
.ticket-row { display: grid; gap: var(--space-3); }
.ticket {
  position: relative;
  display: grid;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border-top: 8px solid var(--ember);
}
.ticket-cool { border-top-color: var(--glacier); }
.ticket-main { padding: var(--space-3); }
.ticket-season { font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.ticket-main h3 { margin: 0.3rem 0 1rem; font-size: var(--step-2); }
.ticket-checks { margin: 0; padding: 0; list-style: none; counter-reset: check; }
.ticket-checks li {
  position: relative;
  padding: 0.45rem 0 0.45rem 2.1rem;
  border-bottom: 1px dashed var(--line);
}
.ticket-checks li:last-child { border-bottom: 0; }
/* A printed box with a pen tick in it. */
.ticket-checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid var(--ink);
  border-radius: 3px;
}
.ticket-checks li::after {
  content: '';
  position: absolute;
  left: 0.38rem;
  top: 0.55rem;
  width: 0.45rem;
  height: 0.85rem;
  border: solid var(--marker);
  border-width: 0 3px 3px 0;
  transform: rotate(40deg);
}
.ticket-stub {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.2rem;
  padding: var(--space-3);
  border-top: 2px dashed var(--line);
  background: var(--paper-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  text-align: center;
}
.stub-label { font-size: 0.78rem; letter-spacing: 0.12em; white-space: nowrap; text-transform: uppercase; color: var(--muted); }
.stub-price { font-family: var(--font-display); font-size: var(--step-3); font-weight: 700; color: var(--ember); line-height: 1; }
.ticket-cool .stub-price { color: var(--glacier); }
.stub-note { font-size: 0.9rem; color: var(--muted); }
.tickets-note { max-width: 46rem; margin-top: var(--space-3); color: var(--muted); }

@media (min-width: 560px) {
  .ticket { grid-template-columns: 1fr 10.5rem; }
  .ticket-stub { border-top: 0; border-left: 2px dashed var(--line); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
}
@media (min-width: 1280px) {
  .ticket-row { grid-template-columns: 1fr 1fr; }
}

/* ----- A visit: the thermometer ----- */
.thermo {
  --thermo-gap: clamp(1rem, 3vw, 2.5rem);
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: var(--thermo-gap);
  max-width: 54rem;
}
.thermo-tube {
  position: relative;
  width: 1.4rem;
  margin: 0.4rem auto 0;
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  background: var(--white);
}
.thermo-fill {
  position: absolute;
  inset: 0.35rem 0.25rem 0;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(to top, var(--ember) 0%, var(--ember) 55%, var(--brass) 100%);
  transform-origin: bottom;
}
.thermo-bulb {
  position: absolute;
  left: 50%;
  bottom: -2.1rem;
  width: 2.5rem;
  height: 2.5rem;
  margin-left: -1.25rem;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--ember);
}
.thermo-steps { margin: 0; padding: 0 0 1rem; list-style: none; counter-reset: step; }
.thermo-steps li {
  position: relative;
  padding: 0 0 var(--space-4);
  counter-increment: step;
}
.thermo-steps li::before {
  content: counter(step);
  position: absolute;
  left: calc(-1 * var(--thermo-gap) - 2.075rem);
  top: -0.1rem;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}
.thermo-steps h3 { font-size: var(--step-1); margin-bottom: 0.35rem; }
.thermo-steps p { max-width: 40rem; color: var(--muted); }

/* ----- Rates: a printed program schedule ----- */
.schedule { border: 2px solid var(--ink); border-radius: var(--radius-lg); overflow: hidden; background: var(--white); }
.schedule-table { width: 100%; border-collapse: collapse; }
.schedule-table th, .schedule-table td { padding: 0.95rem 1.1rem; text-align: left; vertical-align: top; }
.schedule-table thead th {
  background: var(--spruce-900);
  color: var(--paper);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.schedule-table tbody tr + tr { border-top: 1px solid var(--line); }
.schedule-table tbody th { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.schedule-table tbody td:nth-of-type(1) { font-family: var(--font-display); font-weight: 700; color: var(--ember); white-space: nowrap; }
.schedule-table tbody td:nth-of-type(3) { white-space: nowrap; color: var(--muted); }
.rates-notes { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.rates-notes p { padding-left: 1rem; border-left: 4px solid var(--brass); }

@media (min-width: 900px) {
  .rates-notes { grid-template-columns: 1fr 1fr; }
}
/* Narrow screens: each row becomes a stacked label/value block instead of scrolling sideways. */
@media (max-width: 759px) {
  .schedule-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .schedule-table, .schedule-table tbody, .schedule-table tr, .schedule-table th, .schedule-table td { display: block; }
  .schedule-table tbody tr { padding: 0.9rem 1rem; }
  .schedule-table tbody th, .schedule-table td { padding: 0.15rem 0; }
  .schedule-table tbody th { font-size: 1.15rem; margin-bottom: 0.3rem; }
  .schedule-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .schedule-table tbody td:nth-of-type(3) { white-space: normal; }
}

/* ----- Service area: heating zones ----- */
.zones { display: grid; gap: var(--space-4); align-items: center; }
.zones-art { width: min(300px, 100%); height: auto; margin: 0 auto; }
.zone-ring-2 { fill: var(--frost); stroke: var(--glacier); stroke-width: 2; stroke-dasharray: 6 6; }
.zone-ring-1 { fill: var(--kraft-2); stroke: var(--kraft-ink); stroke-width: 2; }
.zone-core { fill: var(--ember); }
.zone-core-text { fill: var(--white); font-family: var(--font-display); font-weight: 700; font-size: 15px; text-anchor: middle; }
.zone-label { fill: var(--ink); font-family: var(--font-body); font-size: 13px; letter-spacing: 2px; text-anchor: middle; text-transform: uppercase; }
.zone-list { display: grid; gap: var(--space-3); }
.zone h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; font-size: var(--step-1); }
.zone-key {
  padding: 0.15rem 0.6rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.zone p { margin-top: 0.4rem; }
.zone-note { color: var(--muted); }

@media (min-width: 820px) {
  .zones { grid-template-columns: 300px 1fr; }
}

/* ----- Before you call: a symptom ledger ----- */
.ledger-alert {
  max-width: 54rem;
  margin-bottom: var(--space-3);
  padding: 1rem 1.2rem;
  border: 2px solid var(--ember);
  border-radius: var(--radius);
  background: var(--ember-tint);
}
.ledger-rows { margin: 0; border-top: 2px solid var(--ink); }
.ledger-row {
  display: grid;
  gap: 0.6rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
}
.ledger-row dt { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); line-height: 1.25; }
.ledger-row dd { margin: 0; }
.ledger-key {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--glacier);
}
.ledger-row dd + dd .ledger-key { color: var(--ember); }

@media (min-width: 960px) {
  .ledger-row { grid-template-columns: minmax(12rem, 0.8fr) 1fr 1fr; gap: var(--space-3); }
  .ledger-row dd:only-of-type { grid-column: span 2; }
}

/* ----- Service request: a work order sheet ----- */
.order { padding-bottom: var(--space-5); }
.order-sheet {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.order-head {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4) clamp(1.1rem, 4vw, 3rem);
  background: var(--frost);
  border-bottom: 2px dashed var(--glacier);
}
.order-kicker { font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--glacier); }
.order-head h2 { margin: 0.4rem 0 0.7rem; font-size: var(--step-3); }
.order-contact { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; align-content: start; }
.order-contact li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0.75rem; align-items: baseline; }
.order-contact a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.order-key { font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.order-form { display: grid; gap: var(--space-3); padding: var(--space-4) clamp(1.1rem, 4vw, 3rem); }
.form-legend { color: var(--muted); }
.req { color: var(--ember); }
.form-grid { display: grid; gap: var(--space-3); }
.field { display: grid; align-content: start; gap: 0.35rem; min-width: 0; }
.field label, .field legend { font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 2px solid #8b958f;
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink);
  font: inherit;
}
.field textarea { resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 1px; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--ember); background: var(--ember-tint); }
.field-hint { font-size: 0.9rem; color: var(--muted); }
.field-error { font-size: 0.92rem; color: var(--ember-600); font-weight: 600; }
.field-error:empty { display: none; }
.field-choices { margin: 0; padding: 0; border: 0; }
.field-choices legend { margin-bottom: 0.5rem; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.choice { position: relative; display: inline-flex; }
.choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0.5rem 1rem;
  border: 2px solid #8b958f;
  border-radius: 999px;
  background: var(--paper-2);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.choice:hover span { border-color: var(--ink); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.choice input:focus-visible + span { outline: 3px solid var(--ember); outline-offset: 2px; }
.field-choices[aria-invalid="true"] .choice span { border-color: var(--ember); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form-note { flex: 1 1 18rem; font-size: 0.92rem; color: var(--muted); }
.form-status:empty { display: none; }
.form-status { padding: 0.9rem 1rem; border-radius: var(--radius); }
.form-status.is-success { background: var(--frost); }
.form-status.is-error { background: var(--ember-tint); }

@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .order-head { grid-template-columns: 1.5fr 1fr; align-items: start; }
}

/* ----- Footer: the printed edge of a filter frame ----- */
.site-footer { background: var(--kraft); color: var(--kraft-ink); }
.footer-edge {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.7rem var(--gutter);
  border-bottom: 2px solid rgb(59 42 20 / 0.35);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.footer-print {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
  max-width: 78rem;
  margin: 0 auto;
  padding: var(--space-4) var(--gutter) var(--space-3);
}
.footer-print > * { flex: 1 1 15rem; }
.footer-brand { display: flex; gap: 0.9rem; align-items: flex-start; flex-basis: 22rem; }
.footer-brand .brand-mark { color: var(--kraft-ink); }
.footer-contact, .footer-links ul { margin: 0; padding: 0; list-style: none; }
.footer-contact li, .footer-links li { min-height: 44px; display: flex; align-items: center; }
.site-footer a { color: var(--kraft-ink); font-weight: 600; }
.site-footer a:hover { color: var(--spruce-950); }
.site-footer .link-button { color: var(--kraft-ink); font-weight: 600; }
.site-footer :focus-visible { outline-color: var(--spruce-950); }
.footer-legal {
  max-width: 78rem;
  margin: 0 auto;
  padding: 1rem var(--gutter) 1.5rem;
  border-top: 1px dashed rgb(59 42 20 / 0.45);
  font-size: 0.88rem;
}
@media (min-width: 900px) {
  .footer-print > * + * { padding-left: var(--space-3); border-left: 2px solid rgb(59 42 20 / 0.3); }
}

/* ---------- Pages: legal documents and the 404 ---------- */
.doc { max-width: 50rem; margin: 0 auto; padding: var(--space-4) var(--gutter) var(--space-5); }
.doc-head { padding-bottom: var(--space-3); margin-bottom: var(--space-3); border-bottom: 2px solid var(--ink); }
.doc-head h1 { font-size: var(--step-4); margin: 0.6rem 0 0.6rem; }
.doc-head p:last-child { color: var(--muted); font-size: var(--step-1); }
.doc-updated { font-size: 0.88rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.prose h2 { font-size: var(--step-2); margin: var(--space-4) 0 0.8rem; }
.prose h3 { font-size: var(--step-1); margin: var(--space-3) 0 0.5rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; }
.prose li { margin-bottom: 0.4rem; }
.prose .callout { padding: 1rem 1.2rem; background: var(--white); border-left: 5px solid var(--ember); border-radius: var(--radius); }
.prose address { font-style: normal; margin-bottom: 1rem; }
.prose a { overflow-wrap: anywhere; }
.table-wrap { margin: 0 0 1.25rem; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--white); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { padding: 0.7rem 0.8rem; text-align: left; vertical-align: top; }
.prose thead th { background: var(--spruce-900); color: var(--paper); font-weight: 400; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
.prose tbody tr + tr { border-top: 1px solid var(--line); }
@media (max-width: 759px) {
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose table, .prose tbody, .prose tr, .prose td { display: block; }
  .prose tbody tr { padding: 0.75rem 0.9rem; }
  .prose td { padding: 0.2rem 0; }
  .prose td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

.notfound { max-width: 40rem; margin: 0 auto; padding: var(--space-5) var(--gutter); text-align: center; }
.notfound-dial { width: 160px; margin: 0 auto var(--space-3); }
.notfound h1 { font-size: var(--step-4); }
.notfound p { margin-top: 1rem; font-size: var(--step-1); color: var(--muted); }
.notfound .hero-actions { justify-content: center; }
.nf-rim { fill: var(--white); stroke: var(--ink); stroke-width: 4; }
.nf-tick { stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
.nf-needle { fill: var(--glacier); }
.nf-text { fill: var(--glacier); font-family: var(--font-display); font-weight: 700; font-size: 30px; text-anchor: middle; }

/* ---------- Consent banner and dialog ---------- */
.consent {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 60;
  max-width: 34rem;
  margin-left: auto;
  padding: 1.25rem 1.35rem;
  background: var(--spruce-900);
  color: var(--paper);
  border-radius: var(--radius-lg);
  border-top: 6px solid var(--brass);
  box-shadow: var(--shadow-lift);
}
.consent a { color: var(--brass); }
.consent a:hover { color: var(--white); }
.consent :focus-visible { outline-color: var(--brass); }
.consent-title { font-size: var(--step-1); margin-bottom: 0.5rem; }
.consent-text { font-size: 0.95rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; align-items: center; }
.consent-btn {
  flex: 1 1 8rem;
  min-height: 46px;
  padding: 0.6rem 1rem;
  border: 2px solid var(--brass);
  border-radius: 999px;
  background: var(--brass);
  color: var(--spruce-950);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.consent-btn:hover { background: var(--white); border-color: var(--white); }
.consent-link {
  min-height: 44px;
  padding: 0 0.3rem;
  border: 0;
  background: none;
  color: var(--paper);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.consent-link:hover { color: var(--brass); }

.consent-dialog {
  width: min(36rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: var(--shadow-lift);
}
.consent-dialog::backdrop { background: rgb(15 28 22 / 0.6); }
.consent-dialog-inner { padding: 1.5rem; }
.consent-dialog .consent-btn { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.consent-dialog .consent-btn:hover { background: var(--spruce-700); border-color: var(--spruce-700); }
.consent-dialog .consent-btn-save { background: var(--ember); border-color: var(--ember); color: var(--white); }
.consent-dialog .consent-btn-save:hover { background: var(--ember-600); border-color: var(--ember-600); }
.consent-categories { margin: 1rem 0 0; padding: 0; list-style: none; }
.consent-category { padding: 0.9rem 0; border-top: 1px solid var(--line); }
.consent-category p { font-size: 0.94rem; color: var(--muted); margin-top: 0.3rem; }
.consent-category-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.consent-category-head h3 { font-size: 1.05rem; }
.consent-always { font-size: 0.85rem; color: var(--muted); }
.consent-switch { position: relative; display: inline-flex; min-width: 52px; min-height: 44px; align-items: center; }
.consent-switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.consent-switch-track {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #8b958f;
  transition: background-color 0.2s ease;
}
.consent-switch-track::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.2s ease;
}
.consent-switch input:checked + .consent-switch-track { background: var(--ember); }
.consent-switch input:checked + .consent-switch-track::after { transform: translateX(22px); }
.consent-switch input:focus-visible + .consent-switch-track { outline: 3px solid var(--ember); outline-offset: 2px; }

@media (min-width: 1100px) {
  .consent { left: calc(var(--rail-w) + var(--gutter)); }
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
/* The date is written on the frame as the page opens. */
.marker-date path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: write 0.32s ease-out forwards; }
.marker-date path:nth-of-type(2) { animation-delay: 0.22s; }
.marker-date path:nth-of-type(3) { animation-delay: 0.45s; }
.marker-date path:nth-of-type(4) { animation-delay: 0.68s; }
.marker-date path:nth-of-type(5) { animation-delay: 0.95s; }
.marker-date path:nth-of-type(6) { animation-delay: 1.18s; }
.marker-date path:nth-of-type(7) { animation-delay: 1.4s; }
.marker-date path:nth-of-type(8) { animation-delay: 1.68s; }
.marker-date path:nth-of-type(9) { animation-delay: 1.95s; }
@keyframes write { to { stroke-dashoffset: 0; } }
.thermo-fill { animation: rise 1.6s ease-out both; }
@keyframes rise { from { transform: scaleY(0.1); } to { transform: scaleY(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Print ---------- */
@media print {
  body { padding: 0; background: #fff; }
  .rail, .consent, .consent-dialog, .skip-link, .hero-actions, .order-form { display: none; }
  .filter, .ticket, .order-sheet { box-shadow: none; transform: none; }
}
