/* ==========================================================================
   AskSolarEnergy: shared.css
   Design system + global styles. Every page loads this file only.
   Token-driven, dark-mode aware, zero framework dependencies.
   ========================================================================== */

/* ---------------------------------------------------------------------- */
/* 1. RESET                                                                */
/* ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
body {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--clr-ink);
  background: var(--clr-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, picture, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }

/* ---------------------------------------------------------------------- */
/* 2. DESIGN TOKENS                                                        */
/* ---------------------------------------------------------------------- */
:root {
  /* ---- Color: light (paper) mode ---- */
  --clr-bg:            #F7F5EF;
  --clr-bg-raised:     #FFFFFF;
  --clr-bg-sunk:       #EFEBE0;
  --clr-ink:            #10181C;
  --clr-ink-soft:       #45535A;
  --clr-ink-faint:      #7C8890;
  --clr-line:           #E1DCCC;
  --clr-line-strong:    #C9C2AC;

  --clr-amber:          #FF8A34;
  --clr-amber-ink:      #7A3E0E;
  --clr-amber-soft:     #FFE3C4;
  --clr-teal:           #1C7C6B;
  --clr-teal-ink:       #0E3B34;
  --clr-teal-soft:      #D7ECE6;
  --clr-pine:           #0E3B43;

  --clr-success:        #1C7C6B;
  --clr-warning:        #B8790E;
  --clr-danger:         #B5432E;
  --clr-info:           #2A6C9E;

  --grad-sunrise: linear-gradient(135deg, #FF8A34 0%, #FFC46B 45%, #F7F5EF 100%);
  --grad-horizon: linear-gradient(180deg, rgba(255,138,52,0.14) 0%, rgba(28,124,107,0.10) 100%);
  --grad-ink: linear-gradient(135deg, #10181C 0%, #0E3B43 100%);

  /* ---- Typography ---- */
  --font-display: 'Rajdhani', 'Arial', sans-serif;
  --font-body: 'DM Sans', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-2xs:  clamp(0.72rem, 0.70rem + 0.1vw, 0.78rem);
  --fs-xs:   clamp(0.82rem, 0.79rem + 0.15vw, 0.88rem);
  --fs-sm:   clamp(0.92rem, 0.89rem + 0.15vw, 0.98rem);
  --fs-base: clamp(1rem, 0.97rem + 0.15vw, 1.06rem);
  --fs-md:   clamp(1.15rem, 1.1rem + 0.25vw, 1.3rem);
  --fs-lg:   clamp(1.4rem, 1.3rem + 0.5vw, 1.7rem);
  --fs-xl:   clamp(1.8rem, 1.6rem + 1vw, 2.3rem);
  --fs-2xl:  clamp(2.3rem, 1.9rem + 2vw, 3.4rem);
  --fs-3xl:  clamp(2.3rem, 1.9rem + 2vw, 3.6rem);

  --lh-tight: 1.08;
  --lh-snug: 1.25;
  --lh-normal: 1.55;

  /* ---- Spacing scale ---- */
  --sp-3xs: 0.25rem;
  --sp-2xs: 0.5rem;
  --sp-xs:  0.75rem;
  --sp-sm:  1rem;
  --sp-md:  1.5rem;
  --sp-lg:  2.25rem;
  --sp-xl:  3.5rem;
  --sp-2xl: 5.5rem;
  --sp-3xl: 8rem;

  /* ---- Radius / shadow / motion ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(16,24,28,0.06), 0 1px 1px rgba(16,24,28,0.04);
  --shadow-md: 0 8px 24px rgba(16,24,28,0.08), 0 2px 6px rgba(16,24,28,0.05);
  --shadow-lg: 0 24px 60px rgba(16,24,28,0.14), 0 8px 20px rgba(16,24,28,0.08);
  --shadow-glow-amber: 0 0 0 1px rgba(255,138,52,0.25), 0 12px 30px rgba(255,138,52,0.20);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms;
  --dur-base: 260ms;
  --dur-slow: 480ms;

  --container-w: 1240px;
  --header-h: 76px;
}

/* ---- Dark mode ---- */
[data-theme='dark'] {
  --clr-bg:            #0A1116;
  --clr-bg-raised:     #101A20;
  --clr-bg-sunk:       #060B0E;
  --clr-ink:            #EDF1F2;
  --clr-ink-soft:       #A9B7BC;
  --clr-ink-faint:      #6D7B80;
  --clr-line:           #1E2A30;
  --clr-line-strong:    #2C3A41;

  --clr-amber-soft:     rgba(255,138,52,0.14);
  --clr-teal-soft:      rgba(28,124,107,0.18);

  --grad-horizon: linear-gradient(180deg, rgba(255,138,52,0.10) 0%, rgba(28,124,107,0.14) 100%);
  --grad-ink: linear-gradient(135deg, #0A1116 0%, #0E3B43 100%);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.45);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.55);
}

/* ---------------------------------------------------------------------- */
/* 3. LAYOUT PRIMITIVES                                                    */
/* ---------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--sp-md);
}
.container--narrow { max-width: 820px; }
.container--wide { max-width: 1440px; }

.section { padding-block: var(--sp-2xl); }
.section--tight { padding-block: var(--sp-xl); }
.section--sunk { background: var(--clr-bg-sunk); }

/* AD-ONLY SECTIONS: a .section--tight that wraps nothing but a single
   standalone ad slot (sitewide-header, below-hero-leaderboard,
   post-tool-leaderboard) doesn't need the full hero/body section padding
   on both sides. Halves the vertical space so ad slots don't create large
   empty gaps when stacked against a neighboring section. Uses a plain
   class, not :has(), so it works in every browser without exception. */
.section--tight.section--ad-only {
  padding-block: var(--sp-md);
}

.grid { display: grid; gap: var(--sp-md); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-xs { gap: var(--sp-xs); }
.gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); }
.gap-lg { gap: var(--sp-lg); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--sp-sm); top: -60px;
  background: var(--clr-ink); color: var(--clr-bg);
  padding: var(--sp-xs) var(--sp-sm); border-radius: var(--radius-sm);
  z-index: 1000; transition: top var(--dur-base) var(--ease-out);
  font-weight: 600; font-size: var(--fs-sm);
}
.skip-link:focus { top: var(--sp-sm); }

:focus-visible {
  outline: 3px solid var(--clr-amber);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------------- */
/* 4. TYPOGRAPHY                                                           */
/* ---------------------------------------------------------------------- */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: 0.005em;
  color: var(--clr-ink);
}
h1 { font-size: var(--fs-3xl); font-weight: 700; }
h2 { font-size: var(--fs-2xl); font-weight: 700; }
h3 { font-size: var(--fs-xl); font-weight: 600; }
h4 { font-size: var(--fs-md); font-weight: 600; }

p { font-size: var(--fs-base); color: var(--clr-ink-soft); }
.lede { font-size: var(--fs-lg); color: var(--clr-ink-soft); line-height: var(--lh-snug); }

/* ---------------------------------------------------------------------- */
/* HERO BAND: any .section--tight containing a .lede is treated as the    */
/* page hero and gets a bold solid brand band, matching a real product    */
/* header instead of blending into the page body. Pure CSS hook, no HTML  */
/* changes required: p.lede only ever appears once per page, in the hero. */
/* ---------------------------------------------------------------------- */
.section--tight:has(.lede) {
  background: linear-gradient(115deg, #E8721C 0%, var(--clr-amber) 55%, #FFA95C 100%);
  padding-block: var(--sp-xl);
  margin-bottom: 0;
}
.section--tight:has(.lede) .eyebrow {
  background: #1A0D02; color: #FFE3C4;
}
.section--tight:has(.lede) h1 {
  color: #1A0D02;
}
.section--tight:has(.lede) .lede {
  color: rgba(26,13,2,0.82);
}
[data-theme='dark'] .section--tight:has(.lede) {
  background: linear-gradient(115deg, #7A3E0E 0%, #B85E1E 55%, #D97A2E 100%);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2xs);
  font-family: var(--font-mono); font-size: var(--fs-2xs);
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #FFFFFF;
  background: var(--clr-teal);
  padding: 3px 9px; border-radius: var(--radius-sm);
  font-weight: 700;
}
[data-theme='dark'] .eyebrow { background: var(--clr-amber); color: #1A0D02; }
.eyebrow::before { content: none; }

.text-mono { font-family: var(--font-mono); }
.text-faint { color: var(--clr-ink-faint); }
.text-soft { color: var(--clr-ink-soft); }
.text-amber { color: var(--clr-amber-ink); }
[data-theme='dark'] .text-amber { color: var(--clr-amber); }
.text-teal { color: var(--clr-teal); }
.text-center { text-align: center; }
.text-balance { text-wrap: balance; }

/* ---------------------------------------------------------------------- */
/* 5. BUTTONS                                                              */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2xs);
  padding: 0.85rem 1.5rem; border-radius: var(--radius-sm);
  font-weight: 700; font-size: var(--fs-sm);
  border: 1px solid transparent; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--sm { padding: 0.55rem 1.05rem; font-size: var(--fs-xs); }
.btn--lg { padding: 1.05rem 1.9rem; font-size: var(--fs-md); }
.btn--block { width: 100%; }

.btn--primary {
  background: var(--clr-ink); color: var(--clr-bg-raised);
}
[data-theme='dark'] .btn--primary { background: var(--clr-amber); color: #1A0D02; }
.btn--primary:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn--accent {
  background: var(--clr-amber); color: #1A0D02; box-shadow: var(--shadow-sm);
}
.btn--accent:hover { background: #E8721C; box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn--outline {
  background: transparent; border-color: var(--clr-line-strong); color: var(--clr-ink);
}
.btn--outline:hover { border-color: var(--clr-ink); background: var(--clr-bg-sunk); }

.btn--ghost {
  background: transparent; color: var(--clr-ink-soft);
}
.btn--ghost:hover { color: var(--clr-ink); background: var(--clr-bg-sunk); }

.btn--icon {
  padding: 0.6rem; border-radius: var(--radius-full); background: transparent;
  border: 1px solid var(--clr-line);
}
.btn--icon:hover { background: var(--clr-bg-sunk); border-color: var(--clr-line-strong); }
.btn svg { width: 1.1em; height: 1.1em; flex-shrink: 0; }

/* ---------------------------------------------------------------------- */
/* 6. CARDS                                                                */
/* ---------------------------------------------------------------------- */
.card {
  background: var(--clr-bg-raised);
  border: 1px solid var(--clr-line);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}

/* ---------------------------------------------------------------------- */
/* AD SLOTS                                                                 */
/* ---------------------------------------------------------------------- */
/* Reserves layout space up front so ads never cause content to jump once
   they load. Each size has a fixed min-height matching its slot type;
   the label is muted and small so it reads as normal page chrome, not
   a placeholder. AdManager (shared.js) fills .ad-slot__unit at runtime. */
.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2xs);
  background: var(--clr-bg-sunk);
  border: 1px dashed var(--clr-line-strong);
  border-radius: var(--radius-sm);
  padding: var(--sp-sm);
  overflow: hidden;
}
/* Ad slots placed mid-content (inside an article body, or directly
   following other stacked content within the same section) need their
   own explicit spacing, since neither .section's padding-block nor any
   paragraph/heading margin reaches an element sitting between them.
   Slots that sit alone as the sole child of a section (sitewide-header,
   below-hero-leaderboard, sidebar-rectangle inside the sticky sidebar
   column) are intentionally excluded here since .section/.section--tight
   padding, or the sidebar-specific rule below, already spaces those
   correctly on their own. */
.ad-slot--in-article,
.doc-section .ad-slot,
.ad-slot--leaderboard[data-slot-id="post-faq-leaderboard"],
.ad-slot--leaderboard[data-slot-id="post-tool-leaderboard"] {
  margin-block: 32px;
}
.ad-slot__label {
  font-size: var(--fs-xs);
  color: var(--clr-ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  align-self: flex-start;
}
.ad-slot__unit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Fixed min-heights match common IAB sizes so the slot never collapses
   or jumps once a real ad fills it. Width stays fluid (max-width: 100%).
   aspect-ratio gives responsive ad units (data-ad-format="auto") a clear
   orientation signal from their container: wide containers render
   horizontal units, tall/narrow containers render vertical units. This
   is a container-shape concern, not an AdManager JS concern - the JS
   in shared.js stays identical regardless of orientation. */
.ad-slot--leaderboard .ad-slot__unit {
  min-height: 90px;
  aspect-ratio: 728 / 90;      /* wide horizontal signal on desktop */
  max-width: 970px;
}
.ad-slot--rectangle .ad-slot__unit {
  min-height: 250px;
  aspect-ratio: 300 / 250;     /* near-square, reads as vertical in a narrow sidebar column */
  max-width: 336px;
}
.ad-slot--in-article .ad-slot__unit {
  min-height: 250px;
  aspect-ratio: 300 / 250;     /* same vertical-friendly ratio as sidebar, fits narrow article column */
  max-width: 336px;
}
.ad-slot--mobile-banner .ad-slot__unit {
  min-height: 100px;
  aspect-ratio: 320 / 100;     /* wide horizontal signal, sized for small screens */
  max-width: 320px;
}

/* Sidebar ad sits below the related-tools card, same sticky column. */
.page-sidebar .ad-slot { margin-top: var(--sp-md); }

@media (max-width: 720px) {
  /* Below this breakpoint, leaderboard containers narrow toward a
     more vertical-friendly ratio instead of staying wide-and-short,
     since a 728x90-shaped container on a narrow phone screen forces
     an awkward, cramped horizontal render. A taller ratio here lets
     responsive units pick a vertical layout instead when the screen
     itself is narrow. */
  .ad-slot--leaderboard .ad-slot__unit {
    min-height: 100px;
    aspect-ratio: 320 / 100;
  }
}

@media (max-width: 960px) {
  /* .page-layout is set inline on every tool page as a fixed 2-column
     grid (main content + a minmax(0,360px) sidebar column). A narrowed
     desktop browser window commonly still reports a viewport width
     well above 720px (that breakpoint is tuned for real phone screens),
     so this separate, wider breakpoint collapses the layout to a single
     column earlier, for narrow desktop windows and tablets too, not
     just phones. !important is required to override the inline style. */
  .page-layout {
    grid-template-columns: 1fr !important;
  }
}

/* REAL FIX, separate from the media queries above and needed at EVERY
   width, not just narrow ones: grid items default to min-width:auto,
   which lets a grid item refuse to shrink below its CONTENT's intrinsic
   width. .page-content and .page-sidebar are grid items inside
   .page-layout, and .card/.tool-card-body had no width rule at all, so
   a form with several fields side by side could force its intrinsic
   width wider than the actual grid track, overflowing the whole page
   horizontally regardless of what grid-template-columns says (this is
   what the 960px/720px fixes alone did not resolve, since the grid
   track was correctly a single column but the content still refused to
   shrink into it). min-width:0 forces the grid item to respect its
   track's width instead of its content's intrinsic size. */
.page-content, .page-sidebar {
  min-width: 0;
}

/* Sidebar chrome: the "Related tools" card (and any sidebar card) gets a
   solid colored header bar instead of floating plain text in white
   space, matching a real product sidebar rather than a minimal list. */
.page-sidebar .card > h3:first-child {
  margin: calc(-1 * var(--sp-lg)) calc(-1 * var(--sp-lg)) var(--sp-sm) calc(-1 * var(--sp-lg)) !important;
  padding: var(--sp-sm) var(--sp-lg) !important;
  background: var(--clr-ink); color: #F7F5EF !important;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-size: var(--fs-xs) !important;
}
[data-theme='dark'] .page-sidebar .card > h3:first-child { background: rgba(255,138,52,0.14); color: var(--clr-amber) !important; }
.page-sidebar .sidebar-link {
  display: block; padding: var(--sp-2xs) var(--sp-xs); margin-inline: calc(-1 * var(--sp-xs));
  border-radius: var(--radius-sm); font-size: var(--fs-sm); font-weight: 500;
  border-left: 2px solid transparent;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.page-sidebar .sidebar-link:hover { background: var(--clr-bg-sunk); border-left-color: var(--clr-amber); }
.sidebar-links { display: flex; flex-direction: column; gap: var(--sp-2xs); }
.sidebar-card { position: sticky; top: 72px; }
.doc-section h3 { margin-top: var(--sp-lg); }
.doc-section p { margin-bottom: var(--sp-md); }
.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--clr-line-strong);
}

.card--glass {
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}
[data-theme='dark'] .card--glass {
  background: rgba(16,26,32,0.55);
  border: 1px solid rgba(255,255,255,0.08);
}

.cat-card {
  display: flex; flex-direction: column; gap: var(--sp-sm);
  padding: var(--sp-lg);
  background: var(--clr-bg-raised);
  border: 1px solid var(--clr-line);
  border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.cat-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--grad-horizon); opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.cat-card:hover::before { opacity: 1; }
.cat-card > * { position: relative; z-index: 1; }
.cat-card__icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--clr-amber-soft); color: var(--clr-amber-ink);
  flex-shrink: 0;
}
[data-theme='dark'] .cat-card__icon { color: var(--clr-amber); }
.cat-card__icon svg { width: 24px; height: 24px; }
.cat-card__title { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; }
.cat-card__desc { font-size: var(--fs-sm); color: var(--clr-ink-soft); }
.cat-card__meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: var(--sp-sm);
  border-top: 1px solid var(--clr-line);
  font-size: var(--fs-xs); color: var(--clr-ink-faint);
}
.cat-card__count { font-family: var(--font-mono); color: var(--clr-teal); font-weight: 600; }
[data-theme='dark'] .cat-card__count { color: var(--clr-amber); }

.tool-card {
  display: flex; align-items: center; gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  background: var(--clr-bg-raised);
  border: 1px solid var(--clr-line);
  border-left: 3px solid var(--clr-line-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.tool-card:hover { border-color: var(--clr-line); border-left-color: var(--clr-amber); background: var(--clr-amber-soft); }
[data-theme='dark'] .tool-card:hover { background: rgba(255,138,52,0.08); }
.tool-card__dot {
  width: 8px; height: 8px; border-radius: 2px; background: var(--clr-teal); flex-shrink: 0;
}
.tool-card__label { font-size: var(--fs-sm); font-weight: 600; flex: 1; }
.tool-card__arrow { color: var(--clr-ink-faint); transition: transform var(--dur-fast) var(--ease-out); }
.tool-card:hover .tool-card__arrow { transform: translateX(3px); color: var(--clr-amber-ink); }

.az-group { margin-bottom: var(--sp-2xl, 48px); scroll-margin-top: 90px; }
.az-group__letter {
  font-family: var(--font-display);
  font-size: var(--fs-3xl, 2.5rem);
  color: var(--clr-amber-ink, var(--clr-amber));
  padding-bottom: var(--sp-xs, 8px);
  margin-bottom: var(--sp-md, 20px);
  border-bottom: 2px solid var(--clr-line);
}
.az-group .grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.az-group .tool-card { max-width: 340px; }
.az-jump__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: var(--radius-sm, 6px);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--clr-ink-soft);
  text-decoration: none;
  transition: background var(--dur-fast, 0.15s), color var(--dur-fast, 0.15s);
}
.az-jump__link:hover, .az-jump__link:focus-visible {
  background: var(--clr-amber-soft);
  color: var(--clr-amber-ink);
}

.stat-card {
  text-align: center; padding: var(--sp-md);
  border-right: 1px solid var(--clr-line);
}
.stat-card:last-child { border-right: none; }
.stat-card__num {
  font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 600;
  color: var(--clr-ink); line-height: 1; display: block;
}
.stat-card__label {
  font-size: var(--fs-xs); color: var(--clr-ink-faint);
  text-transform: uppercase; letter-spacing: 0.08em; margin-top: var(--sp-2xs); display: block;
}

/* ---------------------------------------------------------------------- */
/* 7. BADGES / PILLS / ALERTS                                              */
/* ---------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-3xs);
  padding: 0.2rem 0.6rem; border-radius: var(--radius-sm);
  font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--clr-teal-soft); color: var(--clr-teal-ink);
}
[data-theme='dark'] .badge { color: var(--clr-teal); }
.badge--amber { background: var(--clr-amber-soft); color: var(--clr-amber-ink); }
[data-theme='dark'] .badge--amber { color: var(--clr-amber); }

.pill {
  display: inline-flex; align-items: center; gap: var(--sp-2xs);
  padding: 0.45rem 0.9rem; border-radius: var(--radius-full);
  font-size: var(--fs-xs); font-weight: 500;
  background: var(--clr-bg-sunk); border: 1px solid var(--clr-line);
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.pill:hover, .pill.is-active {
  border-color: var(--clr-amber); background: var(--clr-amber-soft); color: var(--clr-amber-ink);
}
[data-theme='dark'] .pill:hover, [data-theme='dark'] .pill.is-active { color: var(--clr-amber); }

.alert {
  display: flex; gap: var(--sp-sm); align-items: flex-start;
  padding: var(--sp-sm) var(--sp-md); border-radius: var(--radius-md);
  border: 1px solid var(--clr-line); font-size: var(--fs-sm);
}
.alert--info { background: rgba(42,108,158,0.08); border-color: rgba(42,108,158,0.3); }
.alert--success { background: var(--clr-teal-soft); border-color: rgba(28,124,107,0.3); }
.alert--warning { background: rgba(184,121,14,0.1); border-color: rgba(184,121,14,0.3); }
.alert--danger { background: rgba(181,67,46,0.08); border-color: rgba(181,67,46,0.3); }

.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2xs);
  font-size: var(--fs-xs); color: var(--clr-ink-faint); padding-block: var(--sp-sm);
}
.breadcrumb a { color: var(--clr-ink-soft); transition: color var(--dur-fast); }
.breadcrumb a:hover { color: var(--clr-amber-ink); }
[data-theme='dark'] .breadcrumb a:hover { color: var(--clr-amber); }
.breadcrumb__sep { opacity: 0.5; }

/* ---------------------------------------------------------------------- */
/* 8. FORMS                                                                */
/* ---------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--sp-2xs); margin-bottom: var(--sp-sm); }
.field label {
  font-size: var(--fs-xs); font-weight: 600; color: var(--clr-ink-soft);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--clr-line-strong); background: var(--clr-bg-raised); color: var(--clr-ink);
  font-size: var(--fs-base); transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--clr-amber);
  box-shadow: 0 0 0 3px var(--clr-amber-soft);
}
.field small { color: var(--clr-ink-faint); font-size: var(--fs-2xs); }

/* Checkbox field: a labeled checkbox row, used for multi-select feature
   lists (e.g. "which of these appliances do you have"). Distinct from
   .field, which is a single label+input/select/textarea stack; a group
   of .checkbox-field rows typically sits inside one .field wrapper that
   provides the shared group label and helper text above them. */
.checkbox-field {
  display: flex; align-items: center; gap: var(--sp-2xs);
  font-size: var(--fs-sm); color: var(--clr-ink); font-weight: 400;
  cursor: pointer; padding: var(--sp-2xs) 0;
}
.checkbox-field input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--clr-amber);
  cursor: pointer;
}

.form-grid { display: grid; gap: var(--sp-sm) var(--sp-md); }
.form-grid--2 { grid-template-columns: repeat(2, 1fr); }
.form-grid--3 { grid-template-columns: repeat(3, 1fr); }
.form-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) { .form-grid--2, .form-grid--3, .form-grid--4 { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .form-grid--4 { grid-template-columns: repeat(2, 1fr); } }

/* Form section: groups related fields under a labeled subsection inside
   a tool form, matching a real spec-sheet form (AskHVAC-style Design
   Conditions / Envelope Heat Gain grouping) instead of one flat field
   grid. Each section gets a small numbered/lettered label, a title, and
   optional one-line context, then its own field grid underneath. */
.form-section {
  padding-top: var(--sp-md); margin-top: var(--sp-md);
  border-top: 1px solid var(--clr-line);
}
.form-section:first-child { padding-top: 0; margin-top: 0; border-top: none; }
.form-section__head {
  display: flex; align-items: baseline; gap: var(--sp-2xs);
  margin-bottom: var(--sp-sm);
}
.form-section__num {
  font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 700;
  color: #FFFFFF; background: var(--clr-teal);
  width: 20px; height: 20px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
[data-theme='dark'] .form-section__num { background: var(--clr-amber); color: #1A0D02; }
.form-section__title {
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm);
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--clr-ink);
}
.form-section__note {
  font-size: var(--fs-2xs); color: var(--clr-ink-faint); margin-left: auto; text-align: right;
}

/* Inline unit suffix inside a numeric field, e.g. "1,500" + "sq ft"
   shown as part of the input row rather than only in helper text. */
.field-unit {
  display: flex; align-items: stretch; gap: 0;
}
.field-unit input {
  border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: none;
}
.field-unit__suffix {
  display: flex; align-items: center; padding: 0 var(--sp-sm);
  background: var(--clr-bg-sunk); border: 1px solid var(--clr-line-strong);
  border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm);
  font-size: var(--fs-xs); color: var(--clr-ink-faint); font-weight: 600;
  white-space: nowrap;
}

.search-box {
  display: flex; align-items: center; gap: var(--sp-2xs);
  background: var(--clr-bg-raised); border: 1px solid var(--clr-line-strong);
  border-radius: var(--radius-full); padding: 0.5rem 0.6rem 0.5rem 1.1rem;
  box-shadow: var(--shadow-sm);
}
.search-box input {
  flex: 1; min-width: 0; border: none; background: transparent; font-size: var(--fs-base);
  color: var(--clr-ink); outline: none;
}
.search-box svg { color: var(--clr-ink-faint); width: 20px; height: 20px; flex-shrink: 0; }
.search-box__kbd {
  font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--clr-ink-faint);
  border: 1px solid var(--clr-line); border-radius: 5px; padding: 2px 6px;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------- */
/* 9. TABLES                                                               */
/* ---------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--clr-line); border-radius: var(--radius-md); }
.data-table { font-size: var(--fs-sm); }
.data-table th, .data-table td { padding: var(--sp-xs) var(--sp-sm); text-align: left; }
.data-table th {
  background: var(--clr-bg-sunk); font-weight: 600; font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--clr-ink-soft);
}
.data-table tr:not(:last-child) td { border-bottom: 1px solid var(--clr-line); }

/* ---------------------------------------------------------------------- */
/* 10. ACCORDION / TABS / FAQ                                              */
/* ---------------------------------------------------------------------- */
.accordion-item {
  border-bottom: 1px solid var(--clr-line);
}
.accordion-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm);
  padding: var(--sp-md) 0; background: none; border: none; text-align: left;
  font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; color: var(--clr-ink);
}
.accordion-trigger__icon {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--clr-line-strong); display: flex; align-items: center; justify-content: center;
  transition: transform var(--dur-base) var(--ease-out), background var(--dur-base);
}
.accordion-item[data-open='true'] .accordion-trigger__icon { transform: rotate(45deg); background: var(--clr-amber); border-color: var(--clr-amber); color: #1A0D02; }
.accordion-panel {
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-slow) var(--ease-in-out);
}
.accordion-item[data-open='true'] .accordion-panel { grid-template-rows: 1fr; }
.accordion-panel__inner { overflow: hidden; }
.accordion-panel p { padding-bottom: var(--sp-md); max-width: 65ch; }

.tabs__list { display: flex; gap: var(--sp-2xs); border-bottom: 1px solid var(--clr-line); flex-wrap: wrap; }
.tabs__tab {
  padding: var(--sp-xs) var(--sp-sm); background: none; border: none; border-bottom: 2px solid transparent;
  font-weight: 600; font-size: var(--fs-sm); color: var(--clr-ink-faint); margin-bottom: -1px;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.tabs__tab.is-active, .tabs__tab:hover { color: var(--clr-ink); border-color: var(--clr-amber); }
.tabs__panel { display: none; padding-top: var(--sp-md); }
.tabs__panel.is-active { display: block; }

/* ---------------------------------------------------------------------- */
/* 11. TIMELINE                                                            */
/* ---------------------------------------------------------------------- */
.timeline { position: relative; padding-left: var(--sp-lg); }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--clr-amber), var(--clr-teal));
}
.timeline-item { position: relative; padding-bottom: var(--sp-lg); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute; left: calc(-1 * var(--sp-lg) + 1px); top: 5px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--clr-amber);
  border: 3px solid var(--clr-bg);
  box-shadow: 0 0 0 1px var(--clr-line-strong);
}
.timeline-item__label { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--clr-ink-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.timeline-item__title { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; margin-top: var(--sp-3xs); }

/* ---------------------------------------------------------------------- */
/* 12. HEADER + MEGA MENU                                                  */
/* ---------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  height: var(--header-h);
  display: flex; align-items: center;
  background: var(--clr-ink);
  border-bottom: 3px solid var(--clr-amber);
  transition: box-shadow var(--dur-base) var(--ease-out);
}
[data-theme='dark'] .site-header { background: #060B0E; }
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
.site-header__inner {
  width: 100%; max-width: var(--container-w); margin-inline: auto; padding-inline: var(--sp-md);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md);
}
.brand { display: flex; align-items: center; gap: var(--sp-2xs); flex-shrink: 0; }
.brand__mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand__name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: #F7F5EF;
  white-space: nowrap; letter-spacing: 0.01em;
}
.brand__name em { font-style: normal; color: var(--clr-amber); }

.main-nav { display: flex; align-items: center; gap: var(--sp-2xs); flex: 1; justify-content: center; }
.main-nav__item { position: relative; }
.main-nav__link {
  display: flex; align-items: center; gap: 4px;
  padding: 0.55rem 0.9rem; border-radius: var(--radius-sm); font-size: var(--fs-sm); font-weight: 600;
  color: rgba(247,245,239,0.82); transition: background var(--dur-fast), color var(--dur-fast);
  background: none; border: none; font-family: inherit; cursor: pointer;
}
.main-nav__link:hover, .main-nav__link[aria-expanded='true'] { background: var(--clr-amber); color: #1A0D02; }
.main-nav__link.is-current { color: var(--clr-amber); background: rgba(255,138,52,0.12); }
.main-nav__chevron { width: 14px; height: 14px; transition: transform var(--dur-fast); }
.main-nav__link[aria-expanded='true'] .main-nav__chevron { transform: rotate(180deg); }

.mega-menu {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(-6px);
  width: min(880px, 90vw);
  background: var(--clr-bg-raised); border: 1px solid var(--clr-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: var(--sp-md); opacity: 0; visibility: hidden;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility var(--dur-base);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-xs);
  max-height: 70vh; overflow-y: auto;
}
.mega-menu.is-open { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega-menu__link {
  display: flex; align-items: flex-start; gap: var(--sp-xs); padding: var(--sp-xs);
  border-radius: var(--radius-sm); transition: background var(--dur-fast);
}
.mega-menu__link:hover { background: var(--clr-bg-sunk); }
.mega-menu__icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--clr-teal-soft); color: var(--clr-teal-ink);
  display: flex; align-items: center; justify-content: center;
}
[data-theme='dark'] .mega-menu__icon { color: var(--clr-teal); }
.mega-menu__icon svg { width: 18px; height: 18px; }
.mega-menu__title { font-size: var(--fs-sm); font-weight: 600; color: var(--clr-ink); }
.mega-menu__desc { font-size: var(--fs-2xs); color: var(--clr-ink-faint); margin-top: 2px; }

.header-actions { display: flex; align-items: center; gap: var(--sp-2xs); flex-shrink: 0; }
.header-search-trigger {
  display: flex; align-items: center; gap: var(--sp-2xs);
  padding: 0.5rem 0.9rem; border-radius: var(--radius-sm);
  border: 1px solid rgba(247,245,239,0.18); background: rgba(247,245,239,0.06);
  color: rgba(247,245,239,0.7); font-size: var(--fs-xs); font-weight: 600;
}
.header-search-trigger svg { width: 16px; height: 16px; flex-shrink: 0; }
.header-search-trigger:hover { border-color: var(--clr-amber); color: #F7F5EF; }
.header-search-trigger .search-box__kbd { border-color: rgba(247,245,239,0.25); color: rgba(247,245,239,0.6); }

.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1px solid rgba(247,245,239,0.18);
  background: rgba(247,245,239,0.06); display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; flex-shrink: 0;
}
.theme-toggle svg {
  position: absolute; width: 19px; height: 19px;
  transition: transform var(--dur-slow) var(--ease-in-out), opacity var(--dur-slow) var(--ease-in-out);
}
.theme-toggle .icon-sun { color: var(--clr-amber); opacity: 1; transform: rotate(0) scale(1); }
.theme-toggle .icon-moon { color: var(--clr-teal); opacity: 0; transform: rotate(-90deg) scale(0.4); }
[data-theme='dark'] .theme-toggle .icon-sun { opacity: 0; transform: rotate(90deg) scale(0.4); }
[data-theme='dark'] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }

.hamburger {
  display: none; width: 40px; height: 40px; border-radius: var(--radius-sm);
  border: 1px solid rgba(247,245,239,0.18); background: rgba(247,245,239,0.06);
  align-items: center; justify-content: center; flex-shrink: 0;
}
.hamburger span, .hamburger::before, .hamburger::after {
  content: ''; display: block; width: 17px; height: 2px; background: #F7F5EF;
  border-radius: 2px; transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base);
}
.hamburger::before { transform: translateY(-5px); }
.hamburger::after { transform: translateY(5px); }
.hamburger[aria-expanded='true']::before { transform: translateY(0) rotate(45deg); }
.hamburger[aria-expanded='true']::after { transform: translateY(0) rotate(-45deg); }
.hamburger[aria-expanded='true'] span { opacity: 0; }

.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 190;
  background: var(--clr-bg); padding: var(--sp-md);
  overflow-y: auto; transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-in-out);
}
.mobile-nav.is-open { transform: translateX(0); }
.mobile-nav__cat { border-bottom: 1px solid var(--clr-line); }
.mobile-nav__cat-link {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: var(--sp-sm) var(--sp-2xs); background: none; border: none;
  font-weight: 600; font-size: var(--fs-base); color: var(--clr-ink);
  transition: color var(--dur-fast) var(--ease-out);
}
.mobile-nav__cat-link:hover, .mobile-nav__cat-link:active { color: var(--clr-amber-ink); }
[data-theme='dark'] .mobile-nav__cat-link:hover, [data-theme='dark'] .mobile-nav__cat-link:active { color: var(--clr-amber); }
.mobile-nav__chevron {
  width: 18px; height: 18px; flex-shrink: 0; color: var(--clr-ink-faint);
}

@media (max-width: 980px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 560px) {
  .header-search-trigger span:not(.search-box__kbd) { display: none; }
  .header-search-trigger .search-box__kbd { display: none; }
  .header-search-trigger { padding: 0.6rem; width: 40px; height: 40px; justify-content: center; border-radius: 50%; }
  .header-actions { gap: 6px; }
}

/* ---------------------------------------------------------------------- */
/* 13. HERO + SUN ARC SIGNATURE                                            */
/* ---------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: var(--sp-xl) var(--sp-lg);
  background: var(--grad-horizon);
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255,138,52,0.12), transparent 70%);
}
.hero__inner {
  position: relative; z-index: 2;
  max-width: var(--container-w); margin-inline: auto; padding-inline: var(--sp-md);
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--sp-2xl); align-items: center;
}
@media (max-width: 980px) { .hero__inner { grid-template-columns: 1fr; gap: var(--sp-xl); } }

.hero__eyebrow { margin-bottom: var(--sp-sm); }
.hero h1 { max-width: 15ch; }
.hero__sub { margin-top: var(--sp-sm); max-width: 46ch; }
.hero__ctas { display: flex; gap: var(--sp-sm); margin-top: var(--sp-md); flex-wrap: wrap; }
.hero__search { margin-top: var(--sp-md); max-width: 480px; }
.hero__trust {
  display: flex; gap: var(--sp-lg); margin-top: var(--sp-lg); flex-wrap: wrap;
}
.hero__trust-item { display: flex; flex-direction: column; }
.hero__trust-num { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; }
.hero__trust-label { font-size: var(--fs-2xs); color: var(--clr-ink-faint); text-transform: uppercase; letter-spacing: 0.06em; }

/* the signature: an animated sun-arc / analemma path with a moving dot */
.sun-arc {
  position: relative; width: 100%; max-width: 380px; margin-inline: auto; aspect-ratio: 1 / 0.72;
}
.sun-arc svg { width: 100%; height: 100%; overflow: visible; }
.sun-arc__path {
  fill: none; stroke: var(--clr-line-strong); stroke-width: 1.5; stroke-dasharray: 4 6;
}
.sun-arc__ground { stroke: var(--clr-line); stroke-width: 1; }
.sun-arc__dot {
  filter: drop-shadow(0 0 10px rgba(255,138,52,0.9)) drop-shadow(0 0 24px rgba(255,138,52,0.5));
}
.sun-arc__label {
  font-family: var(--font-mono); font-size: 11px; fill: var(--clr-ink-faint);
}
.sun-arc__ray { stroke: var(--clr-amber); opacity: 0.35; }

.sun-arc__chip {
  position: absolute; display: flex; flex-direction: column; gap: 2px;
  background: var(--clr-bg-raised); border: 1px solid var(--clr-line);
  border-radius: var(--radius-md); padding: 0.6rem 0.85rem; box-shadow: var(--shadow-sm);
  max-width: 148px; font-size: var(--fs-2xs);
}
.sun-arc__chip-num { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); color: var(--clr-ink); line-height: 1; }
.sun-arc__chip-label { color: var(--clr-ink-faint); line-height: 1.3; }
.sun-arc__chip--left { left: -6%; bottom: 6%; }
.sun-arc__chip--right { right: -6%; top: 8%; }
@media (max-width: 980px) {
  .sun-arc__chip--left { left: 0; }
  .sun-arc__chip--right { right: 0; }
}
@media (max-width: 560px) {
  .sun-arc__chip { display: none; }
}

/* ---------------------------------------------------------------------- */
/* 14. FEATURE / BENEFIT / CTA / EMPTY / ERROR / SUCCESS BLOCKS            */
/* ---------------------------------------------------------------------- */
.section-head { max-width: 640px; margin-bottom: var(--sp-xl); }
.section-head__eyebrow { margin-bottom: var(--sp-xs); }
.section-head--center { margin-inline: auto; text-align: center; }

.benefit {
  display: flex; gap: var(--sp-sm);
}
.benefit__icon {
  width: 44px; height: 44px; border-radius: var(--radius-md); flex-shrink: 0;
  background: var(--clr-teal-soft); color: var(--clr-teal-ink);
  display: flex; align-items: center; justify-content: center;
}
[data-theme='dark'] .benefit__icon { color: var(--clr-teal); }
.benefit__title { font-weight: 600; font-size: var(--fs-md); font-family: var(--font-display); }

.cta-band {
  border-radius: var(--radius-lg); padding: var(--sp-2xl);
  background: var(--grad-ink); color: #F7F5EF;
  text-align: center; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,138,52,0.25), transparent 55%);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #FDFBF6; }
.cta-band p { color: rgba(253,251,246,0.75); }
.cta-band .btn--primary { background: var(--clr-amber); color: #1A0D02; }

.state-block {
  text-align: center; padding: var(--sp-2xl) var(--sp-md); max-width: 440px; margin-inline: auto;
}
.state-block__icon { width: 64px; height: 64px; margin-inline: auto var(--sp-sm); color: var(--clr-ink-faint); }
.state-block--success .state-block__icon { color: var(--clr-teal); }
.state-block--error .state-block__icon { color: var(--clr-danger); }

/* ---------------------------------------------------------------------- */
/* 15. LOADING SKELETONS + PROGRESS + TOASTS + MODAL                        */
/* ---------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, var(--clr-bg-sunk) 25%, var(--clr-line) 37%, var(--clr-bg-sunk) 63%);
  background-size: 400% 100%; animation: skeleton-wave 1.8s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-wave { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.progress { height: 8px; border-radius: var(--radius-full); background: var(--clr-bg-sunk); overflow: hidden; }
.progress__bar {
  height: 100%; background: linear-gradient(90deg, var(--clr-amber), var(--clr-teal));
  border-radius: var(--radius-full); transition: width var(--dur-slow) var(--ease-out);
}

.toast-region {
  position: fixed; bottom: var(--sp-md); right: var(--sp-md); z-index: 500;
  display: flex; flex-direction: column; gap: var(--sp-2xs); max-width: 340px;
}
.toast {
  background: var(--clr-ink); color: var(--clr-bg);
  padding: var(--sp-sm) var(--sp-md); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); font-size: var(--fs-sm);
  display: flex; align-items: center; gap: var(--sp-xs);
  animation: toast-in var(--dur-base) var(--ease-out);
}
[data-theme='dark'] .toast { background: var(--clr-bg-raised); border: 1px solid var(--clr-line-strong); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.toast--success::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--clr-teal); flex-shrink: 0; }
.toast--error::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--clr-danger); flex-shrink: 0; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,17,22,0.55);
  backdrop-filter: blur(4px); z-index: 400;
  display: flex; align-items: center; justify-content: center; padding: var(--sp-md);
  opacity: 0; visibility: hidden; transition: opacity var(--dur-base), visibility var(--dur-base);
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }
.modal {
  background: var(--clr-bg-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  max-width: 560px; width: 100%; padding: var(--sp-lg);
  transform: scale(0.96) translateY(10px); transition: transform var(--dur-base) var(--ease-out);
}
.modal-overlay.is-open .modal { transform: scale(1) translateY(0); }

.dropdown-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 200px;
  background: var(--clr-bg-raised); border: 1px solid var(--clr-line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: var(--sp-2xs);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all var(--dur-fast) var(--ease-out); z-index: 150;
}
.dropdown-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a, .dropdown-menu button {
  display: block; width: 100%; text-align: left; padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm); font-size: var(--fs-sm); background: none; border: none;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--clr-bg-sunk); }

/* ---------------------------------------------------------------------- */
/* 16. NEWSLETTER                                                          */
/* ---------------------------------------------------------------------- */
.newsletter {
  display: flex; align-items: center; gap: var(--sp-lg); flex-wrap: wrap;
  background: var(--clr-bg-raised); border: 1px solid var(--clr-line); border-radius: var(--radius-lg);
  padding: var(--sp-xl);
}
.newsletter__copy { flex: 1; min-width: min(240px, 100%); }
.newsletter__form { display: flex; gap: var(--sp-2xs); flex: 1; min-width: min(280px, 100%); }
.newsletter__form input {
  flex: 1; min-width: 0; padding: 0.85rem 1.1rem; border-radius: var(--radius-full);
  border: 1px solid var(--clr-line-strong); background: var(--clr-bg); color: var(--clr-ink);
}
.newsletter__form input:focus { outline: none; border-color: var(--clr-amber); box-shadow: 0 0 0 3px var(--clr-amber-soft); }

/* ---------------------------------------------------------------------- */
/* 17. FOOTER                                                              */
/* ---------------------------------------------------------------------- */
.site-footer {
  background: var(--clr-ink); color: rgba(247,245,239,0.7);
  padding-block: var(--sp-2xl) var(--sp-lg);
}
[data-theme='dark'] .site-footer { background: var(--clr-bg-sunk); }
.site-footer a { color: rgba(247,245,239,0.7); transition: color var(--dur-fast); }
.site-footer a:hover { color: var(--clr-amber); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--sp-lg);
  padding-bottom: var(--sp-xl); border-bottom: 1px solid rgba(247,245,239,0.12);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #F7F5EF; font-size: var(--fs-sm); margin-bottom: var(--sp-sm); text-transform: uppercase; letter-spacing: 0.06em; }
.footer-grid ul li { margin-bottom: var(--sp-2xs); font-size: var(--fs-sm); }
.footer-brand__desc { font-size: var(--fs-sm); max-width: 32ch; margin-top: var(--sp-sm); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--sp-md);
  padding-top: var(--sp-lg); font-size: var(--fs-xs);
}
.footer-legal { display: flex; gap: var(--sp-md); flex-wrap: wrap; order: 3; flex-basis: 100%; padding-top: var(--sp-sm); border-top: 1px solid rgba(247,245,239,0.08); }
.footer-social { display: flex; gap: var(--sp-xs); }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(247,245,239,0.18);
  display: flex; align-items: center; justify-content: center;
}
.footer-social a svg { width: 17px; height: 17px; flex-shrink: 0; }
.footer-social a:hover { border-color: var(--clr-amber); }

/* ---------------------------------------------------------------------- */
/* 18. UTILITIES / MISC                                                    */
/* ---------------------------------------------------------------------- */
.hr { border: none; border-top: 1px solid var(--clr-line); margin-block: var(--sp-lg); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------------------- */
/* 19. RESULTS PANEL (header bar, hero metric, export bar)                 */
/* ---------------------------------------------------------------------- */
/* A results panel that feels like a finished output, not more form
   content: a colored header announcing the result has arrived, one
   metric visually promoted above its siblings, and a visible row of
   export actions once a calculation completes. */

.results-panel {
  border: 1px solid var(--clr-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--clr-bg-raised);
}

.results-header {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-lg);
  background: var(--clr-ink); color: var(--clr-bg-raised);
  flex-wrap: wrap;
}
[data-theme='dark'] .results-header { background: var(--clr-amber); color: #1A0D02; }
.results-header__title {
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md);
  letter-spacing: 0.01em;
}
.results-header__meta {
  font-family: var(--font-mono); font-size: var(--fs-2xs); opacity: 0.75;
  text-transform: uppercase; letter-spacing: 0.06em;
}

.results-body { padding: var(--sp-lg); }

.results-metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sp-md);
}
.result-metric {
  padding: var(--sp-md); border-radius: var(--radius-md);
  background: var(--clr-bg-sunk); border: 1px solid var(--clr-line);
  text-align: left;
}
.result-metric__label {
  font-size: var(--fs-2xs); color: var(--clr-ink-faint);
  text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: var(--sp-2xs);
}
.result-metric__value {
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xl);
  color: var(--clr-ink); line-height: 1; display: block;
}
.result-metric__unit {
  font-size: var(--fs-xs); color: var(--clr-ink-faint); margin-left: 4px;
}
/* the one number that matters most: promoted with the accent color and a
   filled background instead of the neutral sunk-panel treatment */
.result-metric--hero {
  background: var(--clr-amber-soft); border-color: rgba(255,138,52,0.35);
  grid-column: span 2;
}
[data-theme='dark'] .result-metric--hero { background: rgba(255,138,52,0.14); }
.result-metric--hero .result-metric__value { color: var(--clr-amber-ink); font-size: var(--fs-2xl); }
[data-theme='dark'] .result-metric--hero .result-metric__value { color: var(--clr-amber); }
@media (max-width: 480px) {
  .result-metric--hero { grid-column: span 1; }
}

.export-bar {
  display: flex; align-items: center; gap: var(--sp-xs); flex-wrap: wrap;
  padding: var(--sp-sm) var(--sp-lg);
  background: var(--clr-bg-sunk); border-top: 1px solid var(--clr-line);
}
.export-bar__label {
  font-size: var(--fs-2xs); color: var(--clr-ink-faint);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-right: var(--sp-2xs);
}
.export-btn {
  display: inline-flex; align-items: center; gap: var(--sp-2xs);
  padding: 0.45rem 0.85rem; border-radius: var(--radius-full);
  border: 1px solid var(--clr-line-strong); background: var(--clr-bg-raised); color: var(--clr-ink-soft);
  font-size: var(--fs-xs); font-weight: 600;
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.export-btn:hover { border-color: var(--clr-amber); color: var(--clr-amber-ink); background: var(--clr-amber-soft); }
[data-theme='dark'] .export-btn:hover { color: var(--clr-amber); }
.export-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ---------------------------------------------------------------------- */
/* 20. PRINTABLE REPORT (letterhead-style output for save/print/PDF)       */
/* ---------------------------------------------------------------------- */
.report-preview {
  background: #FFFFFF; color: #10181C;
  border: 1px solid var(--clr-line); border-radius: var(--radius-md);
  padding: var(--sp-lg); font-family: var(--font-body); font-size: var(--fs-sm); line-height: 1.6;
}
[data-theme='dark'] .report-preview { background: #12191d; color: #EDF1F2; border-color: var(--clr-line-strong); }

/* the "preview chrome" strip above the report itself, announcing what
   the panel contains, distinct from the report document's own letterhead */
.report-preview-chrome {
  display: flex; align-items: center; gap: var(--sp-xs);
  padding: var(--sp-sm) var(--sp-lg);
  background: var(--clr-info); color: #FFFFFF;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm);
}
[data-theme='dark'] .report-preview-chrome { background: var(--clr-info); color: #FFFFFF; }
.report-preview-chrome svg { width: 18px; height: 18px; flex-shrink: 0; }
.report-preview-wrap {
  border: 1px solid var(--clr-line); border-radius: var(--radius-lg); overflow: hidden;
}
.report-preview-wrap .report-preview { border: none; border-radius: 0; margin: var(--sp-md); width: calc(100% - 2 * var(--sp-md)); }

.report-header {
  display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: var(--sp-sm);
  margin-bottom: var(--sp-md); padding-bottom: var(--sp-sm); border-bottom: 2px solid var(--clr-info);
}
.report-header__brand { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); color: var(--clr-ink); }
[data-theme='dark'] .report-header__brand { color: #EDF1F2; }
.report-header__brand em { font-style: normal; color: var(--clr-amber); }
.report-header__tagline { font-size: var(--fs-2xs); color: var(--clr-ink-faint); margin-top: 2px; }
.report-header__meta { text-align: right; font-size: var(--fs-xs); color: var(--clr-ink-faint); }
.report-header__title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); color: var(--clr-info); }
[data-theme='dark'] .report-header__title { color: var(--clr-teal); }

.report-section { margin-bottom: var(--sp-md); }
.report-section h3 {
  font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--clr-info);
  margin-bottom: var(--sp-xs);
}
[data-theme='dark'] .report-section h3 { color: var(--clr-teal); }
/* only the report's very first section gets a divider under its heading,
   matching a letterhead-style document where one rule separates the
   header block from the body, not every subsection */
.report-section--first h3 {
  border-bottom: 1px solid var(--clr-line); padding-bottom: var(--sp-2xs);
}

/* two-per-line field layout for compact project-info style sections */
.report-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-lg);
}
@media (max-width: 560px) { .report-fields { grid-template-columns: 1fr; } }
.report-field { display: flex; justify-content: space-between; gap: var(--sp-sm); padding: 0.3rem 0; }
.report-field .lbl { color: var(--clr-ink-faint); }
.report-field .val { font-weight: 600; color: var(--clr-ink); text-align: right; }
[data-theme='dark'] .report-field .val { color: #EDF1F2; }

.report-row {
  display: flex; justify-content: space-between; gap: var(--sp-sm);
  padding: 0.2rem 0; border-bottom: 1px dotted var(--clr-line); font-size: var(--fs-sm);
}
.report-row:last-child { border-bottom: none; }
.report-row .lbl { color: var(--clr-ink-faint); }
.report-row .val { font-weight: 600; color: var(--clr-ink); }
[data-theme='dark'] .report-row .val { color: #EDF1F2; }
.report-row--total { font-size: var(--fs-md); border-bottom: none; margin-top: var(--sp-2xs); padding-top: var(--sp-xs); border-top: 1px solid var(--clr-line); }
.report-row--total .lbl { font-weight: 700; color: var(--clr-ink); text-transform: uppercase; letter-spacing: 0.03em; font-size: var(--fs-xs); }
[data-theme='dark'] .report-row--total .lbl { color: #EDF1F2; }
.report-row--total .val { color: var(--clr-info); font-size: var(--fs-lg); }
[data-theme='dark'] .report-row--total .val { color: var(--clr-teal); }

/* two-column grid for paired component-summary rows (e.g. Wall Conduction
   next to Window Conduction on the same line) */
.report-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-lg); }
@media (max-width: 560px) { .report-grid-2 { grid-template-columns: 1fr; } }

.report-stamp {
  display: flex; align-items: flex-start; gap: var(--sp-xs);
  background: var(--clr-teal-soft); border: 1px solid rgba(28,124,107,0.35);
  border-radius: var(--radius-md); padding: var(--sp-sm) var(--sp-md);
  color: var(--clr-teal-ink); font-weight: 500; font-size: var(--fs-xs); margin-top: var(--sp-md);
  line-height: 1.5;
}
[data-theme='dark'] .report-stamp { color: var(--clr-teal); }
.report-stamp svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--clr-teal); }

@media print {
  .site-header, .site-footer, .hero__ctas, .toast-region, .theme-toggle, .newsletter, .ad-slot { display: none !important; }
  body { background: #fff; color: #000; }
  .results-panel { border: none; }
  .results-header { background: none !important; color: #10181C !important; padding-inline: 0; }
  .export-bar { display: none !important; }
  .report-preview { border: none; padding: 0; }
  .report-preview-chrome { display: none !important; }
  /* Without this, browsers are free to mute, desaturate, or substitute
     colors in print/PDF output at their own discretion - this is what
     was silently turning the amber brand color back into something
     duller in printed and PDF-exported reports, with no CSS rule
     anywhere actually specifying a different color. Forcing exact
     color rendering makes the printed brand color match the screen
     color precisely. */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
}

/* Isolated report-only print view, activated briefly by the PDF Report
   export button so the printed/saved-as-PDF output is just the report
   card, not the surrounding page (header, form, sidebar, breadcrumbs).
   Scoped entirely inside @media print so the page looks unaffected on
   screen while the class is briefly present. */
@media print {
  body.ase-print-report-only main > section { display: none !important; }
  body.ase-print-report-only main > section#ase-tool-section { display: block !important; }
  body.ase-print-report-only .site-header, body.ase-print-report-only .site-footer,
  body.ase-print-report-only .breadcrumb, body.ase-print-report-only #ase-back-to-top,
  body.ase-print-report-only .tool-card-body, body.ase-print-report-only .page-sidebar,
  body.ase-print-report-only .quote-request-card { display: none !important; }
  /* hiding the sidebar alone leaves .page-content pinned to its original
     grid-column track (about 70% of the row), so the report still prints
     narrow and left-aligned; the grid itself has to collapse to one
     full-width column for the report to actually fill the page */
  body.ase-print-report-only .page-layout { display: block !important; width: 100% !important; }
  body.ase-print-report-only .page-content { width: 100% !important; max-width: none !important; }
  body.ase-print-report-only .report-preview-wrap { width: 100% !important; max-width: none !important; }
}
