/* Electrify Check — Unit 17: global rules the Tailwind CDN doesn't cover (smooth scroll,
   Inter body font, [hidden] guard, keyboard-hide utility, focus ring, range sliders,
   readout pills). Layout/type is Tailwind utilities in index.html. Keep under 300 lines. */

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, sans-serif;
  min-height: 100vh;
}

[hidden] { display: none !important; }

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

/* Keyboard-accessible hide (clip), never display:none. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* --- Range sliders (emerald accent, big touch target) --- */

.range-input {
  width: 100%;
  height: 2rem;
  margin: 0;
  accent-color: var(--ec-emerald-600);
  cursor: pointer;
  background: transparent;
}

/* --- Readout pills next to slider labels --- */

.readout-pill {
  display: inline-block;
  min-width: 4.5rem;
  text-align: center;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  border: 1px solid #a7f3d0;
  background: var(--ec-emerald-50);
  color: #065f46;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Unit 32: hero art stays short on phones (svg illustration, cropped); the tighter hero
   padding keeps the postcode box inside the 844px phone fold. */
@media (max-width: 639px) {
  #hero { padding-bottom: 2rem; }
  #hero img {
    max-height: 180px;
    width: 100%;
    object-fit: cover;
  }
}

/* Unit 39.1: hero H1 is exactly two lines from 360px to 1440px — the clamp keeps it
   ≥28px on phones and ≤40px on desktop so the natural wrap stays at two lines. */
.ec-hero-title { font-size: clamp(28px, calc(20px + 2.2vw), 40px); }

/* --- Unit 36.5: "Suggested" marker on the solar/battery sliders ---
   Unit 37.8: sits in a reserved gap above the track so it never touches the thumb or the label. */
.slider-field { position: relative; }
.range-input { margin-top: 24px; }
.sugg-mark {
  position: absolute;
  bottom: 34px;
  width: 2px;
  height: 10px;
  margin-left: -1px;
  background: var(--ec-emerald-600);
  border-radius: 1px;
  pointer-events: none;
}
.sugg-mark::after {
  content: "Suggested";
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  line-height: 1;
  color: var(--ec-emerald-700, #047857);
  white-space: nowrap;
}

/* Unit 37.6: inert ad/affiliate placeholder slots (slots.js renders them only when the
   RULES.slots flag or ?slots=preview says so). Hidden in print; never in the report email. */
.ec-slot-mount { display: contents; }
.ec-slot { margin: 1.5rem auto 0; max-width: 30rem; }
.ec-slot-label { font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ec-slate-500); text-align: center; margin-bottom: 0.375rem; }
.ec-slot-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; border-radius: 0.75rem; background: var(--ec-slate-200, #e2e8f0); color: var(--ec-slate-500); font-size: 0.75rem; }
.ec-slot--ad .ec-slot-box { min-height: 15.625rem; }
.ec-slot--affiliate .ec-slot-box { min-height: 6.25rem; }
.ec-slot--preview .ec-slot-box { border: 2px dashed var(--ec-slate-400, #94a3b8); background: transparent; }
.ec-slot-cta { display: inline-flex; align-items: center; justify-content: center; border-radius: 0.75rem; background: var(--ec-emerald-600, #059669); color: #fff; font-weight: 600; font-size: 0.875rem; padding: 0.625rem 1.5rem; opacity: 0.55; cursor: not-allowed; }
@media print { .ec-slot { display: none !important; } }

/* --- Unit 40.1: exact-size sliders — common-size ticks + inline range notes --- */
.range-ticks { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; pointer-events: none; }
.tick-mark { position: absolute; top: 2px; width: 0; }
.tick-mark i { position: absolute; left: 0; top: 0; width: 1px; height: 5px; margin-left: 0; background: var(--ec-slate-400, #94a3b8); }
.tick-mark b { position: absolute; top: 7px; left: 0; transform: translateX(-50%); font-weight: 400; font-size: 10px; line-height: 1; color: var(--ec-slate-500); white-space: nowrap; }
@media (max-width: 639px) { .tick-mark b { display: none; } }
.range-note { margin-top: 26px; font-size: 12px; color: var(--ec-amber-800, #b45309); }

/* --- Unit 76 (owner): brand + logo always visible; the header row never overflows or
   wraps at phone/tablet widths. The logo mark is now always inline-flex (was hidden <640)
   and the brand name no longer truncates, so between the smallest phone (320) and lg (1024)
   — where the inline nav menu is hidden (<md) then shown again (md–lg) and only logo + full
   brand + theme switch + Estimate CTA share the row — we scale the brand text and tighten
   the row/brand/menu gaps, theme-button and CTA padding per band. At >=1024px everything
   falls back to the original Tailwind utilities (row gap-4, menu gap-8, theme 28px, CTA
   px-5, brand 18px); only the brand name needs its 18px restated here because its
   text-base/md:text-lg utilities were removed to give this block one source of truth.
   Numbers were measured with CDP at 320/360/390/430/540/640/667/768/834/932/1023/1024/1280
   (tmp/u76_*): logo stays a 36x36 box, "Electrify Check" shows in full (never clipped) and
   the row scrollWidth never exceeds its clientWidth. --- */
#site-nav .ec-brand-name { white-space: nowrap; }
@media (max-width: 1023.98px) {
  #site-nav .ec-brand { gap: 4px; }
  #site-nav .justify-between { gap: 4px; }
  #site-nav .ec-brand-name { font-size: 10px; }
  #site-nav #theme-switch button { width: 22px; height: 24px; }
  #site-nav #nav-estimate-btn { padding-left: 6px; padding-right: 6px; }
}
@media (min-width: 400px) and (max-width: 1023.98px) {
  #site-nav .ec-brand-name { font-size: 11px; }
  #site-nav .justify-between { gap: 8px; }
  #site-nav #theme-switch button { width: 24px; height: 26px; }
}
@media (min-width: 480px) and (max-width: 1023.98px) {
  #site-nav .ec-brand-name { font-size: 13px; }
  #site-nav .ec-brand { gap: 6px; }
  #site-nav #nav-estimate-btn { padding-left: 12px; padding-right: 12px; }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
  #site-nav .ec-brand-name { font-size: 15px; }
  #site-nav .justify-between { gap: 10px; }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
  #site-nav .ec-brand-name { font-size: 12px; }
  #site-nav .ec-brand { gap: 6px; }
  #site-nav .justify-between { gap: 10px; }
  #site-nav .ec-nav-links { gap: 12px; }
  #site-nav #theme-switch button { width: 24px; height: 26px; }
  #site-nav #nav-estimate-btn { padding-left: 12px; padding-right: 12px; }
}
@media (min-width: 900px) and (max-width: 1023.98px) {
  #site-nav .ec-brand-name { font-size: 15px; }
  #site-nav #nav-estimate-btn { padding-left: 16px; padding-right: 16px; }
}
@media (min-width: 1024px) {
  #site-nav .ec-brand { gap: 10px; }
  #site-nav .ec-brand-name { font-size: 18px; }
}

/* --- Unit 77 (owner): the inline menu items are now EQUALLY spaced at every width where
   the inline menu shows. Before: #site-nav's row relied on justify-between, so ALL leftover
   row width was distributed into the three group gaps — measured brand→Calculator and
   Glossary→theme and theme→CTA were 10px at 768-834, 21.7px at 932, 16px at 1024 and 53px
   at >=1280 (tmp/u77_before.txt) while the links kept their flex gap (12px tablet, 32px
   desktop), so the row read unevenly and the spacing shifted with viewport width. Rule now:
   from md up, #nav-estimate-btn carries margin-left:auto, so the Estimate CTA stays pinned
   to the right edge and absorbs every leftover pixel (a flex auto margin takes all free
   space, which leaves justify-content with nothing to distribute). One menu gap per tier:
   10px between consecutive links through 768-1023 — the same value as the row's group gap,
   so brand→Calculator, every link→link and Glossary→theme are one identical 10px rhythm;
   the 12px Unit 76 tablet link gap drops to 10px to reach that single value — the tablet
   row is exactly packed (measured gaps already equal the 10px row gap at 768/834, zero
   slack), so a larger shared value would overflow. Desktop keeps its original look: links
   at the original gap-8 32px with constant 16px group flanks (row gap-4) — at 1024 the row
   is exactly full, so only a constant flank fits there. CTA spacing rule: the theme→CTA
   gap is the tier's group gap (10/16px) PLUS every remaining free pixel — always the
   largest gap on the row whenever the row has slack (measured ~53px at 932, ~127px at
   1280/1440), i.e. the CTA reads as a separate action; at exactly-packed widths (768/834/
   1024) it sits at its group-gap minimum (10/16px) and the CTA's visual separation from
   the menu stays larger than any menu gap because the theme switch sits between.
   Below 768 nothing changes (the drawer menu is in use; the auto margin is scoped ≥md). --- */
@media (min-width: 768px) and (max-width: 1023.98px) {
  #site-nav .ec-nav-links { gap: 10px; }
}
@media (min-width: 768px) {
  #site-nav #nav-estimate-btn { margin-left: auto; }
}
