/* ==========================================================================
   GTA HVAC — landing page
   Lightweight, dependency-free CSS. Design tokens + flex layout.
   ========================================================================== */

/* ---- Design tokens ---- */
:root {
  color-scheme: light;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* surfaces */
  --bg: hsl(210 25% 98%);
  --surface: hsl(0 0% 100%);
  --surface-2: hsl(210 22% 96%);

  /* text */
  --text: hsl(220 25% 12%);
  --text-muted: hsl(220 12% 42%);

  /* lines */
  --border: hsl(220 16% 89%);

  /* brand */
  --accent: hsl(212 92% 50%);
  --on-accent: hsl(0 0% 100%);
  /* inline links mix their accent toward this so the label clears 4.5:1 on the
     page surface (black on light, white on dark) */
  --link-tint: #000;

  /* per-column accents */
  --install: hsl(212 92% 52%);
  --install-soft: hsl(212 92% 52% / 0.12);
  --fix: hsl(165 68% 36%);
  --fix-soft: hsl(165 68% 36% / 0.12);
  --emergency: hsl(14 88% 54%);
  --emergency-soft: hsl(14 88% 54% / 0.12);

  /* shape + depth */
  --radius: 0.75rem;
  --radius-lg: 1.25rem;
  --shadow-sm: 0 1px 2px hsl(220 30% 12% / 0.06);
  --shadow-md: 0 18px 40px -22px hsl(220 30% 12% / 0.35);

  /* metrics */
  --max-width: 1180px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  /* Height of the tallest control in the header bar (the 2.4rem round
     buttons). Grows at 561px, where the phone pill starts showing its number.
     `.header-inner` and `.drawer-head` both pin to it so the close button
     lands exactly on the menu toggle it replaces. */
  --header-row: 2.4rem;
  --transition: 180ms ease;
}

html.dark {
  color-scheme: dark;

  --bg: hsl(222 24% 8%);
  --surface: hsl(222 22% 11%);
  --surface-2: hsl(222 20% 14%);
  --text: hsl(210 30% 96%);
  --text-muted: hsl(215 16% 66%);
  --border: hsl(220 16% 20%);
  --link-tint: #fff;
  --shadow-sm: 0 1px 2px hsl(0 0% 0% / 0.4);
  --shadow-md: 0 20px 44px -22px hsl(0 0% 0% / 0.7);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  transition: background-color var(--transition), color var(--transition);
}

h1,
h2,
h3 {
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

svg {
  display: block;
}

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

/* ---- Shared: brand mark ---- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.7rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.brand-name {
  font-size: 1.15rem;
}

.brand-accent {
  color: var(--accent);
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding: 0.7rem var(--gutter);
  min-height: calc(var(--header-row) + 1.4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Brand keeps the action cluster against the far edge once the menu button leads. */
.header-inner > .brand {
  margin-inline-end: auto;
}

/* Hamburger: trails the action cluster on phones, leads the header from tablet up. */
.menu-toggle {
  order: 3;
  margin-inline-start: -0.5rem; /* cancel the header gap so it matches the action cluster */
}

@media (min-width: 768px) {
  .menu-toggle {
    order: 0;
    margin-inline-start: 0;
  }
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color var(--transition), color var(--transition);
}

.header-phone:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* From here the pill shows its number, so the bar is taller than the round
   buttons: padding 0.55rem ×2 + line-height 1.5 × 0.9rem + 1px borders. Keep in
   sync with the label being hidden at 560px and below (responsive block). */
@media (min-width: 561px) {
  :root {
    --header-row: calc(1.1rem + 1.35rem + 2px);
  }
}

.theme-toggle,
.menu-toggle,
.drawer-close {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.theme-toggle:hover,
.menu-toggle:hover,
.drawer-close:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.theme-toggle .icon-sun {
  display: none;
}

html.dark .theme-toggle .icon-sun {
  display: block;
}

html.dark .theme-toggle .icon-moon {
  display: none;
}

/* ---- Slide-out menu ---- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  visibility: hidden;
  transition: visibility 0s linear 300ms;
}

body.menu-open .drawer {
  visibility: visible;
  transition-delay: 0s;
}

body.menu-open {
  overflow: hidden;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: hsl(220 30% 10% / 0.45);
  opacity: 0;
  transition: opacity 300ms ease;
}

body.menu-open .drawer-backdrop {
  opacity: 1;
}

.drawer-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(22rem, 88vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.32, 0.72, 0, 1);
}

.drawer-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--install), var(--fix) 50%, var(--emergency));
}

body.menu-open .drawer-panel {
  transform: none;
}

/* Tablet and up (two-handed layouts): slide in from the left. */
@media (min-width: 768px) {
  .drawer {
    justify-content: flex-start;
  }

  .drawer-panel {
    /* Same math as .header-inner: how far the header's content edge sits from
       the viewport edge. Lets the drawer head mirror the header exactly. */
    --drawer-lead: calc(max(0px, (100vw - var(--max-width)) / 2) + var(--gutter));
    /* Keep the head compact, but grow just enough that the close button still
       fits on the toggle at ultra-wide widths (lead + button + title room). */
    width: min(max(22rem, calc(var(--drawer-lead) + 9.5rem)), 88vw);
    border-left: 0;
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
  }
}

/* Head mirrors the site header's metrics so the close button lands exactly on
   the menu toggle it replaces: same block padding, same edge inset, and the
   same row height (plus 1px so its rule sits on the header's rule). */
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: calc(var(--header-row) + 1.4rem + 1px);
  padding: 0.7rem var(--gutter) 0.7rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.drawer-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Tablet and up: the head becomes a mirror of the site header — the close
   button leads and sits exactly on the menu toggle it replaces, and the title
   is switched over to the far edge of the panel. */
@media (min-width: 768px) {
  .drawer-head {
    flex-direction: row-reverse;
    padding-inline: var(--drawer-lead) 1rem;
  }
}

/* ---- Slide-out menu: body ---- */
.drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.35rem 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.drawer-heading {
  margin-bottom: 0.5rem;
  padding-inline: 0.7rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.7rem;
  border-radius: 0.6rem;
  font-weight: 600;
  transition: background-color var(--transition), color var(--transition);
}

.drawer-link:hover {
  background: var(--surface-2);
}

.drawer-chevron {
  flex: none;
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
}

.drawer-link:hover .drawer-chevron {
  transform: translateX(3px);
  color: var(--accent);
}

/* ---- Slide-out menu: sub-menu (disclosure) ---- */

/* Rows like "Install" open a nested group in place instead of navigating. The
   reset below lets a <button> wear .drawer-link without looking different. */
.drawer-sub-toggle {
  width: 100%;
  font: inherit;
  font-weight: 600;
  color: inherit;
  text-align: start;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
}

/* Parent rows open downwards, so their chevron doesn't slide sideways. */
.drawer-sub-toggle:hover .drawer-chevron {
  transform: none;
  color: var(--accent);
}

.drawer-sub-toggle[aria-expanded="true"] {
  color: var(--accent);
  background: var(--surface-2);
}

.drawer-sub-toggle[aria-expanded="true"] .drawer-chevron {
  transform: rotate(90deg);
  color: var(--accent);
}

/* Nested group: hung off a rail so it reads as a child of the parent row. */
.drawer-sublinks {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0.15rem 0 0.25rem 0.7rem;
  padding-inline-start: 0.4rem;
  border-inline-start: 1px solid var(--border);
}

/* Author display rules beat the UA's [hidden] rule, so restate it here. */
.drawer-sublinks[hidden] {
  display: none;
}

.drawer-sub-toggle[aria-expanded="true"] + .drawer-sublinks {
  border-inline-start-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.drawer-sublink {
  padding-block: 0.6rem; /* same tap target height as the parent rows */
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
}

.drawer-sublink:hover {
  color: var(--text);
}

/* ---- Slide-out menu: call block ---- */
.drawer-foot {
  display: grid;
  gap: 0.65rem;
  padding: 1rem 1rem 1.15rem;
  padding-bottom: calc(1.15rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.drawer-call {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--emergency) 28%, transparent);
  background: var(--surface);
  transition: border-color var(--transition);
}

.drawer-call:hover {
  border-color: var(--emergency);
}

.drawer-call-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  color: var(--emergency);
  background: var(--emergency-soft);
}

.drawer-call-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.drawer-call-number {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--emergency);
}

.drawer-note {
  font-size: 0.75rem;
  text-align: center;
  color: var(--text-muted);
}

/* ---- Landing: three flex columns ---- */
.landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.columns {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter);
}

.column {
  position: relative;
  overflow: hidden;
  scroll-margin-top: 5rem;
  flex: 1 1 17rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.column::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--column-accent), color-mix(in srgb, var(--column-accent) 35%, transparent));
}

.column:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--column-accent) 35%, var(--border));
}

.column--install {
  --column-accent: var(--install);
  --column-soft: var(--install-soft);
}

.column--fix {
  --column-accent: var(--fix);
  --column-soft: var(--fix-soft);
}

.column--emergency {
  --column-accent: var(--emergency);
  --column-soft: var(--emergency-soft);
}

.column-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.column-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  color: var(--column-accent);
  background: var(--column-soft);
}

.column-pill {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  color: var(--column-accent);
  background: var(--column-soft);
}

.column-title {
  font-size: clamp(1.35rem, 2.4vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.column-text {
  color: var(--text-muted);
  line-height: 1.6;
}

.column-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding-top: 0.5rem;
  width: fit-content;
  font-weight: 700;
  color: var(--column-accent);
}

.column-cta svg {
  transition: transform var(--transition);
}

.column-cta:hover svg {
  transform: translateX(4px);
}

/* ---- Shared: button ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition),
    color var(--transition), box-shadow var(--transition), transform var(--transition);
}

/* Solid variant: darkened accent so white label clears 4.5:1 on every column
   accent (`--install`, `--fix`, `--emergency`). */
.btn--solid {
  color: var(--on-accent);
  background: color-mix(in srgb, var(--column-accent) 84%, #000);
}

.btn--solid:hover {
  background: color-mix(in srgb, var(--column-accent) 74%, #000);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Ghost variant: the quiet secondary action beside a solid button. */
.btn--ghost {
  color: color-mix(in srgb, var(--column-accent, var(--accent)) 82%, var(--link-tint));
  border-color: var(--border);
  background: var(--surface);
}

.btn--ghost:hover {
  border-color: color-mix(in srgb, var(--column-accent, var(--accent)) 55%, var(--border));
  background: var(--surface-2);
}

/* the shared :focus-visible rule resets border-radius to 6px — keep the pill */
.btn:focus-visible {
  border-radius: 999px;
}

/* ---- Shared: inline link (inside running copy) ---- */
/* Picks up the surrounding column's accent, then mixes it toward --link-tint so
   the label clears 4.5:1 on the card surface in both themes. The underline is
   permanent, so the link never relies on colour alone. */
.link {
  color: color-mix(in srgb, var(--column-accent, var(--accent)) 82%, var(--link-tint));
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, currentColor 50%, transparent);
  text-underline-offset: 0.18em;
  transition: color var(--transition), text-decoration-color var(--transition),
    text-decoration-thickness var(--transition);
}

.link:hover {
  text-decoration-thickness: 2px;
  text-decoration-color: currentColor;
}

/* tighter ring than the global 6px — an inline link may wrap across lines */
.link:focus-visible {
  border-radius: 3px;
  outline-offset: 2px;
}

/* ==========================================================================
   Article page (seasonal tune-ups)
   Reuses the site header, drawer, and footer; adds one reading column that
   wears the same card language as the landing columns.
   ========================================================================== */

.article {
  flex: 1;
}

.article-inner {
  width: min(100%, 44rem);
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--gutter) clamp(3rem, 6vw, 4.5rem);
}

/* ---- Article: back affordance ---- */
/* Returns to the card that linked here, so the landing page picks up where the
   reader left it instead of dumping them at the top. */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem 0.5rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  transition: color var(--transition), border-color var(--transition), background-color var(--transition);
}

.back-btn svg {
  flex: none;
  transition: transform var(--transition);
}

.back-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
  background: var(--surface-2);
}

.back-btn:hover svg {
  transform: translateX(-3px);
}

/* the shared :focus-visible rule resets border-radius to 6px — keep the pill */
.back-btn:focus-visible {
  border-radius: 999px;
}

.article-inner > .back-btn {
  margin-bottom: 1rem;
}

.back-btn--end {
  margin-top: 1.25rem;
}

/* ---- Article: reading card ---- */
.article-body {
  --column-accent: var(--install);
  position: relative;
  overflow: hidden;
  padding: clamp(1.35rem, 4vw, 2.6rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Same three-stop rail as the drawer, so the page reads as part of the site. */
.article-body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--install), var(--fix) 50%, var(--emergency));
}

.article-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--column-accent) 82%, var(--link-tint));
}

.article-kicker::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
}

.article-title {
  margin-top: 0.45rem;
  font-size: clamp(1.85rem, 5vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.article-lede {
  margin-top: 0.8rem;
  font-size: clamp(1.02rem, 2.2vw, 1.14rem);
  line-height: 1.6;
  color: var(--text-muted);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.7rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.article-meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Separator trails its item, so it never starts a wrapped line. */
.article-meta li:not(:last-child)::after {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* ---- Article: running copy ---- */
.article-prose {
  margin-top: 1.4rem;
}

.article-prose > * + * {
  margin-top: 1.05rem;
}

.article-prose > h2 {
  margin-top: 2.15rem;
  font-size: clamp(1.22rem, 2.6vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.article-prose > h2 + * {
  margin-top: 0.75rem;
}

.article-prose p {
  line-height: 1.7;
}

.article-prose > figure {
  margin-top: 1.6rem;
}

/* ---- Article: figures ---- */
.article-figure {
  margin-inline: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--install) 7%, var(--surface)), var(--surface-2));
}

.article-figure .figure-art {
  display: block;
  width: 100%;
  height: auto;
}

.article-figure figcaption {
  padding: 0.7rem 0.95rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* The timeline is real markup, so it brings its own frame. */
.article-figure--plain {
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: none;
}

.article-figure--plain figcaption {
  padding: 0.75rem 0.15rem 0;
  border-top: 0;
}

/* Illustration palette: inline SVG, so it follows the theme toggle. */
.figure-art .fa-line {
  fill: none;
  stroke: color-mix(in srgb, var(--text) 26%, transparent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.figure-art .fa-panel {
  fill: var(--surface);
  stroke: color-mix(in srgb, var(--text) 24%, transparent);
  stroke-width: 4;
  stroke-linejoin: round;
}

.figure-art .fa-cool {
  fill: none;
  stroke: var(--install);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.figure-art .fa-cool-soft {
  fill: color-mix(in srgb, var(--install) 14%, transparent);
  stroke: var(--install);
  stroke-width: 4;
}

.figure-art .fa-warm {
  fill: color-mix(in srgb, var(--emergency) 14%, transparent);
  stroke: var(--emergency);
  stroke-width: 4;
  stroke-linecap: round;
}

.figure-art .fa-fix {
  fill: none;
  stroke: var(--fix);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.figure-art .fa-fix-soft {
  fill: color-mix(in srgb, var(--fix) 13%, transparent);
  stroke: var(--fix);
  stroke-width: 4;
}

.figure-art .fa-halo {
  fill: color-mix(in srgb, var(--install) 7%, transparent);
}

.figure-art .fa-air {
  fill: none;
  stroke: var(--install);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 18 16;
  opacity: 0.5;
}

.figure-art .fa-dot {
  fill: var(--install);
  stroke: none;
}

/* ---- Article: key numbers ---- */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.7rem;
}

.fact {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.fact-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: color-mix(in srgb, var(--column-accent) 82%, var(--link-tint));
}

.fact-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ---- Article: checklist cards ---- */
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  gap: 0.8rem;
}

.check-card {
  padding: 1.05rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.check-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.96rem;
  font-weight: 800;
}

.check-card h3 svg {
  flex: none;
  color: var(--column-accent);
}

.check-list {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.7rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.check-list li {
  display: flex;
  gap: 0.5rem;
}

.check-list li::before {
  content: "";
  flex: none;
  width: 0.38rem;
  height: 0.38rem;
  margin-top: 0.52rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--column-accent) 65%, transparent);
}

/* ---- Article: season timeline ---- */
/* Plain markup rather than an SVG, so the labels stay legible at 320px. */
.timeline-panel {
  padding: 1.15rem 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

/* Rail spans dot centres: 12.5% / 37.5% / 62.5% / 87.5% of the grid width. */
.timeline::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  right: 12.5%;
  left: 12.5%;
  height: 2px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--install), var(--border) 32%, var(--border) 68%, var(--emergency));
}

.tl-item {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  text-align: center;
}

.tl-dot {
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--surface-2);
}

.tl-item--cool .tl-dot {
  border-color: var(--install);
  background: var(--install);
  box-shadow: 0 0 0 4px var(--install-soft);
}

.tl-item--heat .tl-dot {
  border-color: var(--emergency);
  background: var(--emergency);
  box-shadow: 0 0 0 4px var(--emergency-soft);
}

.tl-season {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tl-visit {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.tl-visit--muted {
  font-weight: 600;
  color: var(--text-muted);
}

@media (max-width: 620px) {
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1.15rem;
  }

  .timeline::before {
    display: none;
  }

  /* A third key number would otherwise sit alone in the second row. */
  .fact-grid .fact:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* ---- Article: pull quote + closing CTA ---- */
.article-quote {
  padding: 1rem 1.15rem;
  border-inline-start: 3px solid var(--column-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface-2);
}

.article-quote p {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.55;
}

.article-quote cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
  color: var(--text-muted);
}

.article-cta {
  padding: clamp(1.15rem, 3vw, 1.6rem);
  border: 1px solid color-mix(in srgb, var(--column-accent) 30%, var(--border));
  border-radius: var(--radius);
  background: linear-gradient(140deg, color-mix(in srgb, var(--column-accent) 9%, var(--surface)),
      var(--surface) 70%);
}

.article-cta h2 {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.article-cta p {
  margin-top: 0.45rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.article-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

/* ---- Page transition ---- */
/* Cross-document view transitions where the browser and origin allow them; the
   links navigate normally everywhere else, so this is decoration only. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 240ms;
}

@media (prefers-reduced-motion: no-preference) {
  /* Same entrance on both ends of the journey, so moving between the landing
     page and the article reads as one transition. */
  .article-body,
  .landing .columns {
    animation: page-rise 360ms cubic-bezier(0.32, 0.72, 0, 1) both;
  }
}

@keyframes page-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.footer-inner {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding: clamp(2.5rem, 5vw, 3.75rem) var(--gutter);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(15rem, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
}

.footer-brand .brand {
  margin-bottom: 1rem;
}

.footer-tagline {
  max-width: 28ch;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.35rem;
}

.social-link {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}

.social-link:hover {
  color: var(--text);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.footer-heading {
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-lower {
  border-top: 1px solid var(--border);
}

.footer-bottom {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding: 1.25rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: 1.25rem;
}

.footer-legal a {
  transition: color var(--transition);
}

.footer-legal a:hover {
  color: var(--text);
}

/* ---- Responsive ---- */
@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    justify-content: flex-start;
  }

  .header-phone {
    padding: 0.55rem;
    gap: 0;
  }

  .header-phone span {
    display: none;
  }
}

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

  .column:hover {
    transform: none;
  }

  .social-link:hover {
    transform: none;
  }

  .column-cta:hover svg {
    transform: none;
  }

  .btn--solid:hover {
    transform: none;
  }

  .drawer-link:hover .drawer-chevron {
    transform: none;
  }

  .back-btn:hover svg {
    transform: none;
  }

  /* View-transition pseudos sit outside the universal selector above. */
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ==========================================================================
   Guide pages — glossary terms, popovers, tables, and deeper prose levels
   ========================================================================== */

/* ---- Inline definition terms (highlighted in the page's column accent:
   blue for Install guides, green for the Fix/repairs guide) ---- */
.term {
  display: inline;
  margin-inline: -0.02em;
  padding: 0.04em 0.18em;
  border: 0;
  border-radius: 0.32rem;
  font: inherit;
  font-weight: 600;
  line-height: inherit;
  color: color-mix(in srgb, var(--column-accent, var(--install)) 66%, var(--link-tint));
  background: color-mix(in srgb, var(--column-accent, var(--install)) 14%, var(--bg));
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--column-accent, var(--install)) 55%, transparent);
  text-underline-offset: 0.2em;
  cursor: pointer;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-color var(--transition), color var(--transition);
}

.term:hover {
  background: color-mix(in srgb, var(--column-accent, var(--install)) 22%, var(--bg));
}

.term[aria-expanded="true"] {
  background: color-mix(in srgb, var(--column-accent, var(--install)) 28%, var(--bg));
}

.term:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Definition popover (one element, reused for every term) ---- */
.term-pop {
  position: absolute;
  z-index: 200;
  width: min(20rem, calc(100vw - 1.5rem));
  padding: 0.95rem 1rem 1.05rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.term-pop[hidden] {
  display: none;
}

.term-pop:focus {
  outline: none;
}

.term-pop.is-open {
  animation: term-pop-in 150ms ease both;
}

@keyframes term-pop-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.term-pop-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.term-pop-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  color: var(--column-accent, var(--install));
  background: color-mix(in srgb, var(--column-accent, var(--install)) 14%, transparent);
}

.term-pop-icon[hidden] {
  display: none;
}

.term-pop-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.term-pop-title {
  flex: 1;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.term-pop-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.term-pop-close:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.term-pop-close svg {
  width: 1rem;
  height: 1rem;
}

.term-pop-def {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.term-pop-media {
  margin-top: 0.8rem;
}

.term-pop-media[hidden] {
  display: none;
}

.term-pop-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 338;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.term-pop-media figcaption {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.term-pop-links {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.7rem;
  font-size: 0.86rem;
}

.term-pop-links[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .term-pop.is-open {
    animation: none;
  }
}

/* ---- Guide prose: deeper heading levels and supporting blocks ---- */
.article-prose [id] {
  scroll-margin-top: 5.5rem;
}

.article-prose > h3 {
  margin-top: 1.95rem;
  font-size: clamp(1.06rem, 2.3vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.article-prose > h3 + * {
  margin-top: 0.6rem;
}

.article-prose > h4 {
  margin-top: 1.55rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.article-prose > h4 + * {
  margin-top: 0.55rem;
}

.article-prose strong {
  font-weight: 700;
  color: var(--text);
}

/* Short line under the title inviting people to tap the term highlights. */
.article-hint {
  padding: 0.65rem 0.9rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.article-note {
  padding: 0.85rem 1rem;
  border-left: 3px solid color-mix(in srgb, var(--emergency) 72%, var(--border));
  border-radius: 0 0.5rem 0.5rem 0;
  background: var(--surface-2);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.article-links-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.article-list {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.3rem;
  list-style: disc;
  font-size: 0.95rem;
  line-height: 1.6;
}

.article-links-label + .article-list {
  margin-top: 0.5rem;
}

.article-list li::marker {
  color: color-mix(in srgb, var(--install) 70%, var(--text));
}

/* ---- Guide prose: "what a tune-up covers" callout cards ---- */
/* The repairs guide leans on the teal "fix" accent. The reading-card rail stays
   three-colour, but the kicker, term highlights, pull quote, and CTA all follow
   this accent so the page reads as part of the Fix service. */
.article-body--fix {
  --column-accent: var(--fix);
}

.article-callout {
  margin-top: 1.5rem;
  padding: clamp(1.05rem, 2.6vw, 1.5rem);
  border: 1px solid color-mix(in srgb, var(--column-accent) 30%, var(--border));
  border-radius: var(--radius);
  background: linear-gradient(150deg,
      color-mix(in srgb, var(--column-accent) 9%, var(--surface)),
      color-mix(in srgb, var(--column-accent) 4%, var(--surface-2)) 78%);
}

.article-callout-title {
  padding-left: 0.85rem;
  border-left: 3px solid var(--column-accent);
  font-size: clamp(1.04rem, 2.3vw, 1.18rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.article-callout p {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.article-callout-list {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.45rem;
  padding-left: 1.2rem;
  list-style: disc;
  font-size: 0.95rem;
  line-height: 1.55;
}

.article-callout-list li::marker {
  color: color-mix(in srgb, var(--column-accent) 78%, var(--text));
}

p.article-callout-note {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px dashed color-mix(in srgb, var(--column-accent) 34%, var(--border));
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ---- Guide prose: rebate tables ---- */
.article-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.article-table {
  width: 100%;
  min-width: 33rem;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.45;
}

.article-table-caption {
  padding: 0.7rem 0.9rem;
  caption-side: top;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.article-table th,
.article-table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.article-table thead th {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom-color: var(--border);
}

.article-table tbody th {
  width: 32%;
  font-weight: 700;
  color: var(--text);
}

.article-table tbody tr:last-child th,
.article-table tbody tr:last-child td {
  border-bottom: 0;
}


