:root {
  --night: #070d18;
  --card: rgba(7, 13, 24, 0.93);
  --card-solid: #0a1220;
  --ink: #eaf6fc;
  --muted: #91a9b9;
  --faint: #637b8b;
  --line: #25445d;
  --cyan: #46e8ff;
  --cyan-soft: #bff4ff;
  --blue: #42b9f3;
  --orange: #ff9b4a;
  --danger: #ffb07d;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html,
body,
#app { width: 100%; height: 100%; margin: 0; overflow: hidden; }

body {
  overflow: hidden;
  color: var(--ink);
  background: var(--night);
  font: 15px/1.45 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

.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;
}

#map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0a1020;
}

#map::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 8, 17, 0.42) 0, transparent 26%),
    linear-gradient(0deg, rgba(3, 8, 17, 0.18) 0, transparent 42%);
}

#map .leaflet-tile-pane { filter: saturate(0.78) brightness(0.83) contrast(1.08); }

#heatFx {
  position: absolute;
  inset: 0;
  z-index: 640;
  pointer-events: none;
}

.brand {
  position: absolute;
  z-index: 900;
  top: max(16px, env(safe-area-inset-top));
  left: 18px;
  width: 230px;
  pointer-events: none;
  text-shadow: 0 2px 14px #030914;
}

.brand h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.035em;
}

.brand h1 span {
  display: inline-block;
  margin-left: 2px;
  color: var(--cyan);
  font-size: 14px;
  vertical-align: top;
  filter: drop-shadow(0 0 7px var(--cyan));
}

.brand p {
  max-width: 215px;
  margin: 7px 0 0;
  color: #c9dbe7;
  font-size: 13px;
}

.search {
  position: absolute;
  z-index: 1000;
  top: max(14px, env(safe-area-inset-top));
  right: 16px;
  display: flex;
  width: min(430px, calc(100vw - 300px));
  min-width: 300px;
  overflow: hidden;
  background: #0a1322;
  border: 0;
  border-radius: 25px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}

.search:focus-within { box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45), 0 0 0 1.5px rgba(70, 232, 255, 0.55); }

.search input {
  min-width: 0;
  flex: 1;
  padding: 12px 8px 12px 17px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.search input::placeholder { color: #7f97a7; }

.search button {
  margin: 4px;
  padding: 6px 14px;
  color: #032230;
  background: var(--cyan);
  border: 0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.demo-button {
  position: absolute;
  z-index: 900;
  top: calc(max(14px, env(safe-area-inset-top)) + 58px);
  right: 16px;
  padding: 8px 14px;
  color: #bfd0dc;
  background: #0a1322;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.demo-button:hover,
.demo-button:focus-visible { color: var(--ink); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1.5px rgba(70, 232, 255, 0.55); }

.tap-prompt {
  position: absolute;
  z-index: 850;
  left: 50%;
  bottom: 13%;
  transform: translateX(-50%);
  padding: 12px 24px;
  color: var(--ink);
  background: #0a1322;
  border: 0;
  border-radius: 30px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(70, 232, 255, 0.22);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  pointer-events: none;
}

/* Solid instrument-panel card — no glass. Its signature is the thin
   light-rail across the top, echoing the neon roof outline. */
.result-card {
  position: absolute;
  z-index: 1000;
  left: 14px;
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(410px, calc(100vw - 28px));
  padding: 18px 20px 12px;
  background: #0a1322;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.66);
}

.result-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 24px;
  left: 24px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(70, 232, 255, 0.85), transparent);
  filter: drop-shadow(0 0 9px rgba(70, 232, 255, 0.7));
}

.place-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.place-row i {
  width: 9px;
  height: 9px;
  flex: none;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan);
}

.place-row h2 {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-row span {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}

.card-close {
  width: 26px;
  height: 26px;
  flex: none;
  margin-left: 2px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.card-close:hover,
.card-close:focus-visible { color: var(--ink); }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  padding: 4px 10px;
  color: #9db4c4;
  background: #111f30;
  border: 0;
  border-radius: 8px;
  font-size: 10px;
  line-height: 1.2;
}

button.tag { cursor: pointer; }

.tag.confidence { color: #7fe8fb; background: rgba(70, 232, 255, 0.1); }
.tag.rough { color: var(--danger); background: rgba(255, 155, 74, 0.12); }
.tag.area { color: var(--ink); background: transparent; border: 1px dashed #33506b; }

.status {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.status:empty { display: none; }

.story-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.story-progress span { margin-right: auto; }

.story-progress i {
  width: 18px;
  height: 3px;
  background: #314453;
  border-radius: 3px;
}

.story-progress i.is-active { background: var(--cyan); box-shadow: 0 0 8px rgba(70, 232, 255, 0.45); }
.story-step[hidden] { display: none; }

.story-kicker {
  margin: 20px 0 11px;
  color: var(--cyan);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.step-head .story-kicker { margin: 0; }

.step-glyph,
.benefit-glyph {
  display: grid;
  flex: none;
  place-content: center;
  width: 34px;
  height: 34px;
  color: var(--cyan);
  background: rgba(70, 232, 255, 0.08);
  border-radius: 11px;
}

.step-glyph svg,
.benefit-glyph svg { width: 20px; height: 20px; }

.benefit-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 16px 0 6px;
  padding: 0;
  list-style: none;
}

.benefit-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.benefit-glyph { width: 30px; height: 30px; border-radius: 9px; }
.benefit-glyph svg { width: 17px; height: 17px; }

.benefit-list b { display: block; color: var(--ink); font-size: 13.5px; }

.benefit-list li > div > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.story-lead {
  min-height: 42px;
  margin: 18px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.story-button {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.story-button.primary {
  color: #04131c;
  background: var(--cyan);
  border: 1px solid var(--cyan);
}

.story-button.secondary {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}

.story-step[data-story-step="1"] > .story-button { width: 100%; }
.story-step[data-story-step="1"] > .story-button + .story-button { margin-top: 8px; }

.story-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 16px;
}

.story-nav .primary { margin-left: auto; }

.action-step { padding: 12px 0 5px; }
.action-step h3 { max-width: 310px; margin: 23px 0 12px; color: var(--ink); font-size: 26px; line-height: 1.1; }
.action-step > p:not(.story-kicker) { max-width: 330px; margin: 0 0 55px; color: var(--muted); font-size: 14px; line-height: 1.55; }

.metric-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 25px;
}

.metric-hero span {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.metric-hero strong {
  color: var(--cyan-soft);
  font-family: "Avenir Next Condensed", "Arial Narrow", ui-monospace, monospace;
  font-size: 58px;
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(70, 232, 255, 0.16);
}

.metric-hero em {
  margin-top: 4px;
  color: var(--cyan);
  font-size: 16px;
  font-style: normal;
}

.card-rule {
  height: 1px;
  margin: 18px 0;
  background: var(--line);
}

.moment-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.moment-row strong { color: var(--ink); font-size: 14px; }
.moment-row span { color: var(--muted); font-size: 12px; text-align: right; }

.thermal-profile {
  --solar-level: 0.45;
  --sky-level: 0.75;
  --net-level: 0.35;
  position: relative;
  height: 158px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 48%, rgba(70, 232, 255, 0.075), transparent 36%);
}

.thermal-profile::before {
  position: absolute;
  inset: 10px 50%;
  width: 1px;
  content: "";
  background: linear-gradient(transparent, #27475a 32%, #27475a 68%, transparent);
  opacity: 0.7;
}

.profile-reading {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-reading > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.profile-reading svg { width: 12px; height: 12px; flex: none; opacity: 0.9; }
.sky-reading > span { justify-content: flex-end; }

.profile-reading strong {
  margin-top: 2px;
  color: var(--ink);
  font-family: "Avenir Next Condensed", "Arial Narrow", ui-monospace, monospace;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.025em;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

.solar-reading { top: 7px; left: 8px; }
.solar-reading strong { color: #ffc17f; }
.sky-reading { top: 7px; right: 8px; text-align: right; }
.sky-reading strong { color: var(--cyan-soft); }
.net-reading { right: 0; bottom: 3px; left: 0; align-items: center; text-align: center; }
.net-reading strong { color: var(--cyan-soft); font-size: 22px; text-shadow: 0 0 16px rgba(70, 232, 255, 0.18); }
.result-card[data-direction="heating"] .net-reading strong { color: #ffd0a1; text-shadow: 0 0 16px rgba(255, 155, 74, 0.2); }

.profile-spoke {
  --level: 0.5;
  --spoke: var(--cyan);
  position: absolute;
  z-index: 1;
  top: 66px;
  left: 50%;
  width: 116px;
  height: 12px;
  transform-origin: 0 50%;
}

.profile-spoke::before,
.profile-spoke::after {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  content: "";
  border-radius: 8px;
  background: repeating-linear-gradient(90deg, var(--spoke) 0 8px, transparent 8px 13px);
}

.profile-spoke::before { width: 100%; opacity: 0.12; }
.profile-spoke::after { width: calc(var(--level) * 100%); opacity: 0.95; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--spoke) 65%, transparent)); }
.solar-spoke { --level: var(--solar-level); --spoke: var(--orange); transform: rotate(210deg); }
.sky-spoke { --level: var(--sky-level); transform: rotate(330deg); }
.net-spoke { --level: var(--net-level); --spoke: var(--cyan); width: 58px; transform: rotate(90deg); }
.result-card[data-direction="heating"] .net-spoke { --spoke: var(--orange); }

.roof-core {
  position: absolute;
  z-index: 4;
  top: 40px;
  left: 50%;
  display: grid;
  width: 55px;
  height: 55px;
  place-content: center;
  transform: translateX(-50%) rotate(45deg);
  color: var(--ink);
  background: #0b1a28;
  border: 1px solid #5f8ca0;
  box-shadow: 0 0 0 5px rgba(7, 16, 27, 0.82), 0 0 24px rgba(70, 232, 255, 0.14);
}

.roof-core span,
.roof-core b { transform: rotate(-45deg); text-align: center; }
.roof-core span { color: var(--faint); font-size: 7px; letter-spacing: 0.14em; }
.roof-core b { margin-top: -1px; font-size: 10px; letter-spacing: 0.09em; }

.timeline { margin-top: 9px; }

#spark {
  display: block;
  width: 100%;
  height: 56px;
  border-radius: 8px;
}

#nightSlider {
  width: 100%;
  margin: 2px 0 0;
  accent-color: var(--orange);
  cursor: ew-resize;
}

.timeline-labels {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

.timeline-labels > * { width: 33.333%; }
.timeline-labels > :nth-child(2) { color: var(--orange); text-align: center; }
.timeline-labels > :last-child { text-align: right; }

#selectedTime {
  padding: 0;
  color: var(--orange);
  background: none;
  border: 0;
  font-size: 10px;
  text-decoration: underline dotted rgba(255, 155, 74, 0.65);
  text-underline-offset: 2px;
  cursor: pointer;
}
.timeline-labels b { display: block; color: #dce9f2; font-weight: 650; }
.timeline-labels small { color: var(--faint); font-size: 9px; }

.result-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 5px;
  margin-top: 9px;
  color: #708998;
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
}

.result-footer button {
  padding: 0;
  color: #99b1c0;
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}

.info-button {
  position: absolute;
  z-index: 900;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  width: 40px;
  height: 40px;
  color: var(--muted);
  background: #0a1322;
  border: 0;
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-family: Georgia, serif;
  font-weight: 700;
  cursor: pointer;
}

.modal {
  width: min(540px, calc(100vw - 30px));
  max-height: min(82vh, 720px);
  padding: 0;
  color: var(--muted);
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 21px;
  box-shadow: var(--shadow);
}

.modal::backdrop { background: rgba(3, 8, 17, 0.88); backdrop-filter: blur(4px); }

.modal article,
.modal form {
  position: relative;
  padding: 25px;
  overflow: auto;
}

.modal h2 { margin: 0 0 12px; color: var(--ink); font-size: 21px; }
.modal h3 { margin: 0 0 5px; color: var(--ink); font-size: 14px; }
.modal p { margin: 0 0 12px; }
.modal strong { color: var(--ink); }

.service-card {
  margin: 15px 0;
  padding: 12px 14px;
  background: rgba(70, 232, 255, 0.065);
  border: 1px solid #28546a;
  border-radius: 12px;
}

.service-card p { margin: 0; }
.service-card .service-contact { margin-top: 9px; }
.service-contact a { color: var(--cyan); text-underline-offset: 2px; }

.modal details {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #07101b;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.modal summary { color: var(--ink); font-weight: 700; cursor: pointer; }
.modal ul { margin: 10px 0 2px; padding-left: 19px; }
.modal li { margin-top: 6px; }
.modal .privacy-note { margin: 0; color: var(--faint); font-size: 11px; }

.eyebrow {
  color: var(--cyan) !important;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.modal-close {
  position: absolute;
  top: 13px;
  right: 15px;
  padding: 2px 7px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 24px;
  cursor: pointer;
}

.area-modal { width: min(410px, calc(100vw - 30px)); }
.area-modal label { display: block; margin-top: 18px; color: var(--ink); font-size: 12px; font-weight: 700; }

.area-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 7px;
}

.area-entry input {
  width: 150px;
  padding: 10px 12px;
  color: var(--ink);
  background: #07101b;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}

.area-entry input:focus { border-color: var(--cyan); }
.form-error { min-height: 18px; margin-top: 7px !important; color: var(--danger); font-size: 11px; }

.save-button {
  width: 100%;
  padding: 11px;
  color: #032330;
  background: linear-gradient(90deg, #29b6e6, var(--cyan));
  border: 0;
  border-radius: 11px;
  font-weight: 800;
  cursor: pointer;
}

.toast {
  position: absolute;
  z-index: 1500;
  top: calc(max(14px, env(safe-area-inset-top)) + 60px);
  left: 50%;
  width: min(360px, calc(100vw - 32px));
  padding: 10px 14px;
  transform: translateX(-50%);
  color: #dbeaf2;
  background: #0a1322;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  font-size: 12px;
  text-align: center;
}

.leaflet-control-attribution {
  color: #708392 !important;
  background: rgba(5, 11, 20, 0.86) !important;
  font-size: 9px !important;
}

.leaflet-control-attribution a { color: #62bedf !important; }

.roof-outline {
  stroke: var(--cyan);
  stroke-width: 2.2;
  fill: rgba(70, 232, 255, 0.13);
  filter: drop-shadow(0 0 5px rgba(70, 232, 255, 0.8)) drop-shadow(0 0 14px rgba(70, 232, 255, 0.28));
}

/* the light that chases its tail around the selected roof
   (pathLength is normalised to 100 in app.js) */
.roof-chase {
  fill: none;
  stroke: #eaffff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 12 88;
  animation: roofChase 3.2s linear infinite;
  filter: drop-shadow(0 0 5px #9ff1ff) drop-shadow(0 0 13px rgba(70, 232, 255, 0.65));
}

@keyframes roofChase {
  to { stroke-dashoffset: -100; }
}

.lot-outline {
  stroke: #2c96b5;
  stroke-width: 1.7;
  fill: rgba(20, 91, 115, 0.025);
  stroke-dasharray: 7 5;
  filter: drop-shadow(0 0 4px rgba(44, 150, 181, 0.55));
}

.pv-outline { stroke: #b9e8ff; stroke-width: 1.2; fill: rgba(16, 32, 58, 0.82); }

.leaflet-interactive:focus { outline: none; }

@media (max-width: 720px) {
  .brand { top: max(13px, env(safe-area-inset-top)); left: 14px; }
  .brand h1 { font-size: 23px; }
  .brand p { display: none; }

  .search {
    top: calc(max(13px, env(safe-area-inset-top)) + 44px);
    left: 12px;
    right: 12px;
    width: auto;
    min-width: 0;
  }

  .demo-button { top: max(10px, env(safe-area-inset-top)); right: 12px; font-size: 11px; }
  .tap-prompt { bottom: 19%; }
  .info-button { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }

  .result-card {
    left: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100vw - 16px);
    padding: 14px 14px 10px;
    border-radius: 18px;
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
  }

  .metric-hero { margin-top: 15px; }
  .metric-hero strong { font-size: 52px; }
  .card-rule { margin: 14px 0; }
  .thermal-profile { height: 154px; }
  .profile-spoke { width: min(116px, 31vw); }
  .net-spoke { width: 66px; }
  .place-row span { max-width: 43%; overflow: hidden; text-overflow: ellipsis; }
  .info-button.result-open { display: none; }
  .leaflet-control-attribution { max-width: 78vw; }
  body.card-open .leaflet-control-attribution { display: none; }
}

@media (max-height: 650px) {
  .result-card { padding-top: 11px; }
  .timeline { margin-top: 4px; }
  #spark { height: 42px; }
  .card-rule { margin: 11px 0; }
  .thermal-profile { height: 138px; }
}

/* Desktop: once a roof is selected, the information earns a full-height
   panel — the whole story stacked, no paging. Mobile keeps the steps. */
@media (min-width: 721px) {
  .result-card {
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    left: auto;
    width: 442px;
    overflow-y: auto;
    padding: 20px 24px 14px;
    scrollbar-width: thin;
    scrollbar-color: #24374d transparent;
  }

  .story-progress { display: none; }
  .result-card button[data-story-target] { display: none; }
  .story-step[hidden] { display: block; }

  .story-step {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #14243a;
  }

  .story-step[data-story-step="1"] {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .story-nav { margin-top: 14px; }
  .metric-hero strong { font-size: 64px; }
  #spark { height: 68px; }
  .thermal-profile { height: 172px; }
  .action-step { padding: 18px 0 5px; }

  /* map chrome steps aside for the panel */
  body.card-open .search { right: 486px; }
  body.card-open .demo-button { right: 486px; }
  body.card-open .info-button { display: none; }
  body.card-open .leaflet-bottom.leaflet-right { right: 458px; }
}

/* Narrow desktop: with the panel open there isn't room for the title,
   tagline and a full-width search on one row. */
@media (min-width: 721px) and (max-width: 1180px) {
  body.card-open .brand p { display: none; }
  body.card-open .search {
    top: calc(max(16px, env(safe-area-inset-top)) + 40px);
    left: 18px;
    width: auto;
    min-width: 0;
  }
  body.card-open .demo-button { top: calc(max(16px, env(safe-area-inset-top)) + 98px); }
}

@media (prefers-reduced-motion: reduce) {
  #heatFx { display: none; }
  .roof-chase { display: none; }
}

/* ---- launch fixes: readable small text, no iOS focus-zoom, credits ---- */
.search input,
.area-entry input { font-size: 16px; }
.tag { font-size: 11.5px; padding: 6px 10px; }
.result-footer { font-size: 11px; gap: 4px 6px; }
.result-footer button { font-size: 11px; min-height: 28px; }
.result-footer .credits {
  flex-basis: 100%;
  color: #6c8494;
  font-size: 10.5px;
  line-height: 1.45;
}
.result-footer .credits a,
.modal .privacy-note a,
.modal p a { color: #8fd8ee; text-underline-offset: 2px; }
.metric-hero em {
  max-width: 34ch;
  color: #9fdcef;
  font-size: 13.5px;
  line-height: 1.4;
}
.metric-hero em:empty { display: none; }

/* Sinhala wordmark */
.brand h1 .si {
  margin-left: 4px;
  color: #9fe9f7;
  font-family: "Sinhala Sangam MN", "Noto Sans Sinhala", "Iskoola Pota", sans-serif;
  font-size: 0.62em;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: 0.12em;
  filter: none;
}
.brand p .by { display: block; margin-top: 3px; color: #8fa6b6; font-size: 11.5px; }
