/* ══════════════════════════════════════════════════════════
   Aircon Energy Savings — Design System
   Palette: deep teal bg, cyan as the "cold" accent,
   amber/warm for "current state" / heat.
   Signature: condensation-droplet micro-animation on the
   Minimal Effort row (same device as the calculator).
   Fonts: Bricolage Grotesque (display) · Inter (body)
          IBM Plex Mono (data/code)
   ══════════════════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────────────── */
:root {
  --bg:          #0C2327;
  --bg-panel:    #102C31;
  --bg-panel-2:  #143338;
  --bg-panel-3:  #183D43;
  --cool:        #5EEAD4;
  --cool-dim:    #2A6B63;
  --cool-glow:   rgba(94,234,212,0.18);
  --warm:        #FB923C;
  --warm-dim:    #7A4520;
  --warm-glow:   rgba(251,146,60,0.14);
  --text:        #EEF4F3;
  --text-muted:  #8DB5B1;
  --text-faint:  #4E7874;
  --droplet:     #A7F3D0;
  --line:        rgba(238,244,243,0.08);
  --radius-sm:   10px;
  --radius-md:   14px;
  --radius-lg:   18px;

  /* IAB slot heights — keep in sync with site-config.js */
  --ad-h-rect:   250px;  /* 300×250 medium rectangle */
  --ad-h-banner: 50px;   /* 320×50 mobile banner / 90px desktop */
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80vw 40vh at 10% -5%, rgba(94,234,212,.09), transparent 55%),
    radial-gradient(ellipse 60vw 50vh at 110%  8%, rgba(251,146,60,.07), transparent 55%);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ──────────────────────────────────────────── */
.wrap     { max-width: 720px; margin: 0 auto; padding: 0 20px 72px; }
.wrap--lg { max-width: 920px; margin: 0 auto; padding: 0 20px 72px; }

/* ── Typography ──────────────────────────────────────── */
.display {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}
h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 3.5vw, 26px);
  line-height: 1.2;
  margin: 40px 0 14px;
  color: var(--text);
}
h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  font-size: 18px;
  margin: 28px 0 10px;
}
p  { font-size: 15.5px; line-height: 1.75; color: var(--text-muted); margin-bottom: 16px; }
p strong { color: var(--text); }
a  { color: var(--cool); text-underline-offset: 3px; }
a:hover { opacity: .85; }
li { font-size: 15px; line-height: 1.7; color: var(--text-muted); margin-bottom: 6px; }
ul, ol { padding-left: 22px; margin-bottom: 16px; }

/* ── Mono ─────────────────────────────────────────────── */
.mono { font-family: 'IBM Plex Mono', monospace; }

/* ── Eyebrow ─────────────────────────────────────────── */
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cool);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-top: 36px;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cool);
  box-shadow: 0 0 8px 2px rgba(94,234,212,.6);
  flex-shrink: 0;
}

/* ── Nav ─────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(12,35,39,.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}
#site-nav {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 0;
}
#site-nav .nav-brand {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  padding: 14px 20px 14px 0;
  margin-right: 8px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
#site-nav a:not(.nav-brand) {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--text-faint);
  text-decoration: none;
  padding: 14px 16px;
  transition: color .15s;
}
#site-nav a:not(.nav-brand):hover { color: var(--cool); }
#site-nav a.current { color: var(--cool); }

/* ── Panels ──────────────────────────────────────────── */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.panel--cool {
  background: linear-gradient(135deg, rgba(94,234,212,.1), transparent 60%);
  border-color: var(--cool-dim);
}
.panel--warm {
  background: linear-gradient(135deg, rgba(251,146,60,.1), transparent 60%);
  border-color: var(--warm-dim);
}

/* ── Chips / pills ───────────────────────────────────── */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  flex: 1; min-width: 48px;
  text-align: center;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--cool-dim); color: var(--text); }
.chip.active {
  background: var(--cool-glow);
  border-color: var(--cool);
  color: var(--cool);
}

/* ── Sliders ─────────────────────────────────────────── */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%; height: 4px;
  border-radius: 2px;
  background: var(--line);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--cool);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1.5px var(--cool);
  cursor: pointer;
  margin-top: -7px;
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--cool);
  border: 3px solid var(--bg);
  cursor: pointer;
}

/* ── Effort ladder ───────────────────────────────────── */
.ladder-step {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  margin-bottom: 10px;
  transition: border-color .2s;
}
.ladder-step.hl-cool {
  background: linear-gradient(100deg, rgba(94,234,212,.12), rgba(94,234,212,.02));
  border-color: var(--cool-dim);
}
.ladder-step.hl-warm {
  background: linear-gradient(100deg, rgba(251,146,60,.1), transparent);
  border-color: var(--warm-dim);
}
.effort-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 4px;
}
.effort-tag.zero    { background: rgba(78,120,116,.2); color: var(--text-muted); }
.effort-tag.minimal { background: rgba(94,234,212,.14); color: var(--cool); }
.effort-tag.low     { background: rgba(167,243,208,.12); color: var(--droplet); }
.effort-tag.little  { background: rgba(251,146,60,.14); color: var(--warm); }
.ladder-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.45; }
.ladder-pct {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 30px;
  line-height: 1;
  white-space: nowrap;
}
.ladder-dollar { font-size: 11px; color: var(--text-faint); font-family: 'IBM Plex Mono', monospace; margin-top: 3px; }

/* ── Droplets (signature animation) ─────────────────── */
.droplets {
  position: absolute;
  top: 12px; right: 14px;
  display: flex; gap: 5px;
  pointer-events: none;
}
.drop {
  width: 6px; height: 8px;
  border-radius: 50% 50% 50% 0;
  background: var(--droplet);
  opacity: 0;
  transform: translateY(-4px) rotate(45deg) scale(.3);
  transition: all .5s cubic-bezier(.34,1.56,.64,1);
}
.ladder-step.formed .drop { opacity: .85; transform: translateY(0) rotate(45deg) scale(1); }
.ladder-step.formed .drop:nth-child(2) { transition-delay: .1s; }
.ladder-step.formed .drop:nth-child(3) { transition-delay: .2s; }

/* ── Expandable ──────────────────────────────────────── */
.expand-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 15px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 0;
  transition: border-color .15s;
}
.expand-toggle:hover { border-color: var(--cool-dim); }
.expand-toggle .chev { font-family: 'IBM Plex Mono',monospace; color: var(--cool); transition: transform .25s; }
.expand-toggle.open .chev { transform: rotate(180deg); }
.expand-body { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.expand-body.open { max-height: 3000px; }
.expand-inner {
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 22px;
  background: rgba(0,0,0,.12);
  margin-bottom: 28px;
}

/* ── Comfort toggle ──────────────────────────────────── */
.comfort-card {
  background: var(--bg-panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 20px 0;
}
.comfort-card h4 { font-size: 15px; margin-bottom: 6px; }
.comfort-desc { font-size: 13px; color: var(--text-faint); margin-bottom: 12px; line-height: 1.5; }
.comfort-pills { display: flex; gap: 8px; margin-bottom: 14px; }
.comfort-pill {
  flex: 1; text-align: center; padding: 10px 8px;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: transparent; color: var(--text-muted); font-size: 13px;
  cursor: pointer; transition: all .15s; line-height: 1.35;
}
.comfort-pill.active { background: var(--cool-glow); border-color: var(--cool); color: var(--cool); }
.feels-like {
  display: flex; align-items: baseline; justify-content: space-between;
  background: rgba(94,234,212,.06); border-radius: var(--radius-sm); padding: 12px 16px;
}
.fl-label { font-size: 12px; color: var(--text-muted); }
.fl-cost  { font-size: 11px; color: var(--text-faint); display: block; margin-top: 2px; }
.fl-temp  { font-family: 'IBM Plex Mono',monospace; font-weight: 600; font-size: 22px; color: var(--droplet); }

/* ── Rate input ──────────────────────────────────────── */
.rate-toggle {
  font-size: 12.5px; color: var(--text-muted);
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  margin-top: 2px;
}
.rate-toggle:hover { color: var(--cool); }
.rate-row { display: none; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.rate-row.open { display: flex; }
.rate-row input[type="text"] {
  flex: 0 1 110px; min-width: 90px;
  background: var(--bg-panel-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 10px;
  color: var(--text); font-family: 'IBM Plex Mono',monospace; font-size: 13px;
}
.rate-preset {
  background: var(--bg-panel-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 12px;
  color: var(--text-muted); font-size: 12px; cursor: pointer; white-space: nowrap;
}
.rate-preset:hover { border-color: var(--cool-dim); color: var(--cool); }

/* ── City reference ──────────────────────────────────── */
.city-select {
  width: 100%;
  background: var(--bg-panel-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px;
  color: var(--text); font-family: 'Inter',sans-serif; font-size: 14px;
}
.city-note {
  font-size: 11.5px; color: var(--text-faint); margin-top: 6px; line-height: 1.5;
}
.city-note a { color: var(--text-muted); }

/* ── System tabs (secondary page) ───────────────────── */
.sys-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.sys-tab {
  flex: 1; text-align: center; padding: 12px 0;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--bg-panel); color: var(--text-muted);
  font-family: 'IBM Plex Mono',monospace; font-size: 14px;
  cursor: pointer; transition: all .15s;
}
.sys-tab.active { background: var(--cool-glow); border-color: var(--cool); color: var(--cool); }
.sys-hero { padding: 28px 24px; }
.sys-avg { font-family: 'IBM Plex Mono',monospace; font-weight: 600; font-size: 42px; line-height: 1; color: var(--text); }
.sys-avg span { font-size: 16px; color: var(--text-muted); font-family: 'Inter',sans-serif; font-weight: 400; }
.sys-range { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.dry-tip { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--droplet); display: flex; gap: 10px; line-height: 1.5; }
.dry-tip .tip-link { color: var(--cool); text-decoration: underline; cursor: pointer; }

/* ── CTA block ───────────────────────────────────────── */
.cta-block {
  display: block; text-align: center;
  background: linear-gradient(90deg, rgba(94,234,212,.16), rgba(94,234,212,.03));
  border: 1px solid var(--cool-dim); border-radius: var(--radius-lg);
  padding: 24px; margin: 36px 0; text-decoration: none;
  transition: border-color .15s;
}
.cta-block:hover { border-color: var(--cool); }
.cta-block .cta-h { font-family: 'Bricolage Grotesque',sans-serif; font-size: 18px; color: var(--text); margin-bottom: 4px; }
.cta-block .cta-s { font-size: 13px; color: var(--cool); }

/* ── City highlight (article pages) ─────────────────── */
.city-highlight {
  background: rgba(94,234,212,.07); border: 1px solid var(--cool-dim);
  border-radius: var(--radius-md); padding: 16px 20px;
  font-size: 14px; line-height: 1.6; color: var(--text-muted); margin-bottom: 36px;
}
.city-highlight b { color: var(--cool); }

/* ── Hub card ────────────────────────────────────────── */
.hub-card {
  display: block; background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 20px 22px; margin-bottom: 12px;
  text-decoration: none; transition: border-color .15s;
}
.hub-card:hover { border-color: var(--cool-dim); }
.hub-card .hc-tag { font-family: 'IBM Plex Mono',monospace; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--cool); margin-bottom: 6px; display: block; }
.hub-card h3 { font-family: 'Bricolage Grotesque',sans-serif; font-size: 18px; color: var(--text); margin-bottom: 6px; }
.hub-card p  { font-size: 13.5px; color: var(--text-muted); line-height: 1.55; margin: 0; }
.hub-card .status { font-family: 'IBM Plex Mono',monospace; font-size: 9.5px; padding: 2px 7px; border-radius: 20px; margin-left: 6px; vertical-align: middle; }
.status.live { background: rgba(94,234,212,.14); color: var(--cool); }
.hub-card.dim { opacity: .55; pointer-events: none; }

/* ── Table ───────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 20px 0; }
th { font-family: 'IBM Plex Mono',monospace; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); padding: 0 10px 10px; border-bottom: 1px solid var(--line); text-align: left; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); color: var(--text-muted); }
td.hl { color: var(--cool); font-family: 'IBM Plex Mono',monospace; }
tr:last-child td { border-bottom: none; }

/* ── Callout ─────────────────────────────────────────── */
.callout {
  background: rgba(251,146,60,.07); border-left: 3px solid var(--warm);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px; margin: 20px 0;
  font-size: 14px; line-height: 1.65; color: var(--text-muted);
}
.callout b { color: var(--warm); }
.callout--cool { background: rgba(94,234,212,.07); border-left-color: var(--cool); }
.callout--cool b { color: var(--cool); }

/* ── Stat row ────────────────────────────────────────── */
.stat-row { display: flex; gap: 12px; margin: 22px 0; flex-wrap: wrap; }
.stat-card { flex: 1; min-width: 130px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; }
.stat-num { font-family: 'IBM Plex Mono',monospace; font-weight: 600; font-size: 26px; color: var(--droplet); line-height: 1; }
.stat-lbl { font-size: 12px; color: var(--text-faint); margin-top: 4px; }

/* ── Sources list ────────────────────────────────────── */
.sources { border-top: 1px solid var(--line); margin-top: 44px; padding-top: 22px; }
.sources-h { font-family: 'IBM Plex Mono',monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); margin-bottom: 14px; }
.sources ol { margin: 0; padding-left: 18px; }
.sources li { font-size: 12.5px; line-height: 1.7; color: var(--text-faint); margin-bottom: 8px; }
.sources a { color: var(--text-muted); }

/* ── Disclaimer bar ──────────────────────────────────── */
.headline-disclaimer {
  font-size: 12px; color: var(--text-faint); text-align: center;
  margin: 12px 0 28px; line-height: 1.55;
}
.headline-disclaimer a { color: var(--text-muted); }
.disclaimers-footer { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 36px; }
.disclaimers-footer p { font-size: 12px; line-height: 1.6; color: var(--text-faint); margin-bottom: 8px; }
.disclaimers-footer b { color: var(--text-muted); }

/* ── Control row ─────────────────────────────────────── */
.control-row { margin-bottom: 20px; }
.control-row:last-child { margin-bottom: 0; }
.control-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.control-label .val { font-family: 'IBM Plex Mono',monospace; color: var(--text); font-size: 13px; }

/* ── Reset button ────────────────────────────────────── */
.btn-reset { font-size: 11.5px; color: var(--text-faint); cursor: pointer; background: none; border: none; padding: 4px 0; text-align: right; display: block; width: 100%; }
.btn-reset:hover { color: var(--cool); }

/* ── Ad slots ────────────────────────────────────────── */
[data-slot] {
  display: none;          /* invisible by default — nothing configured */
  margin: 20px auto;
  text-align: center;
}
[data-slot].ad-live  { display: block; }
[data-slot].ad-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--text-faint);
  border-radius: var(--radius-sm);
  min-height: var(--ad-h-rect);
}
.ad-label { font-family: 'IBM Plex Mono',monospace; font-size: 10px; color: var(--text-faint); line-height: 1.5; }

/* Desktop slot sizing */
@media (min-width: 700px) {
  [data-slot="calculator-result"].ad-preview,
  [data-slot="secondary-below"].ad-preview,
  [data-slot="article-top"].ad-preview,
  [data-slot="article-mid"].ad-preview,
  [data-slot="article-bottom"].ad-preview,
  [data-slot="footer-global"].ad-preview { min-height: 90px; max-width: 728px; }
}

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 24px 20px 36px;
  font-size: 12px;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
}
.site-footer a { color: var(--text-faint); }
.site-footer a:hover { color: var(--cool); }

/* ── Dev-only admin toggle ───────────────────────────── */
#dev-toggle {
  position: fixed; bottom: 16px; right: 16px;
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 14px;
  font-family: 'IBM Plex Mono',monospace; font-size: 10.5px;
  color: var(--text-muted); cursor: pointer; z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
#dev-toggle:hover { color: var(--cool); border-color: var(--cool-dim); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 480px) {
  .stat-row { gap: 8px; }
  .stat-card { min-width: 100px; }
  .sys-avg { font-size: 32px; }
  .ladder-pct { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
