/* energyhomeplan — design B2: light page, dark result card, green accent.
   Plus Jakarta Sans (self-hosted, OFL) for headings and numbers; system UI for body. */
@font-face {
  font-family: "Jakarta";
  src: url("/assets/jakarta-latin.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
}
:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #475569;
  --faint: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #ffffff;
  --soft: #f8fafc;
  --tint: #f0fdf4;
  --green: #22c55e;
  --green-ink: #15803d;
  --green-deep: #14532d;
  --green-bright: #4ade80;
  --card: #0f172a;
  --card-2: #1e293b;
  --card-text: #cbd5e1;
  --radius: 20px;
  --head: "Jakarta", ui-sans-serif, system-ui, sans-serif;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: #0f766e; }
a:hover { color: #115e59; }
:focus-visible { outline: 3px solid #0ea5e9; outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: #fff; padding: 8px 12px; }
h1, h2, h3, .num-big, .brand { font-family: var(--head); }
h1 { font-weight: 800; font-size: clamp(32px, 5vw, 48px); line-height: 1.08; letter-spacing: -.025em; margin: 0; }
h2 { font-weight: 700; letter-spacing: -.01em; }

/* header */
header.site { border-bottom: 1px solid var(--line); background: #fff; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink); text-decoration: none; }
nav.main { display: flex; flex-wrap: wrap; gap: 4px; }
nav.main a { text-decoration: none; color: var(--muted); font-weight: 500; padding: 8px 12px; border-radius: 10px; transition: background .15s, color .15s; }
nav.main a:hover { background: var(--soft); color: var(--ink); }
nav.main a[aria-current="page"] { background: #f1f5f9; color: var(--ink); }

/* hero */
.hero { background: linear-gradient(180deg, var(--tint) 0%, #fff 100%); padding: 44px 0 28px; }
.hero-in { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: flex-end; justify-content: space-between; }
.hero-text { flex: 1 1 560px; min-width: 0; }
.kicker { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--green-ink); }
.lead { margin: 14px 0 0; font-size: 19px; color: var(--muted); max-width: 640px; }
.checks { flex: 0 1 320px; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--ink-2); }
.checks li { display: flex; gap: 8px; align-items: center; }

/* calculator */
.calc { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; padding-top: 8px; padding-bottom: 40px; scroll-margin-top: 16px; }
form.calc-form { flex: 999 1 480px; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 26px; background: #fff; }
.step { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.step legend { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 19px; margin-bottom: 4px; padding: 0; }
.step-no { width: 28px; height: 28px; border-radius: 999px; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex: none; }
label.field-label { font-weight: 600; }
.unit-input { display: flex; align-items: baseline; gap: 10px; }
.unit-input input { width: 170px; min-height: 56px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 12px; font: 700 26px var(--head); color: var(--ink); }
.unit-input span { font-size: 18px; color: var(--muted); }
.prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.prices label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.prices input { min-height: 48px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; font: 600 17px var(--head); width: 100%; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
label.choice { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 14px 14px 44px; border: 1px solid var(--line-2); border-radius: 14px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s, box-shadow .15s, transform .1s; }
label.choice:hover { border-color: #94a3b8; }
label.choice:active { transform: scale(.985); }
label.choice input { position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
label.choice .t { font-weight: 600; }
label.choice .s { font-size: 13px; color: var(--faint); }
label.choice:has(input:checked) { border: 2px solid var(--ink); padding: 13px 13px 13px 43px; background: var(--soft); box-shadow: 0 4px 12px rgba(15, 23, 42, .06); }
label.choice:has(input:focus-visible) { outline: 3px solid #0ea5e9; outline-offset: 2px; }
.hint { font-size: 14px; color: var(--faint); margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 24px; border: 0; border-radius: 14px; background: var(--ink); color: #fff; font: 700 17px var(--head); cursor: pointer; text-decoration: none; transition: transform .15s var(--ease-out), box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15, 23, 42, .18); color: #fff; }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.btn-green { background: var(--green-bright); color: #052e16; }
.btn-green:hover { color: #052e16; }

/* result card */
aside.result { flex: 1 1 440px; min-width: 0; background: var(--card); color: #fff; border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 16px; }
aside.result a { color: var(--green-bright); }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.verdict { margin: 0; font-family: var(--head); font-weight: 800; font-size: 26px; line-height: 1.15; }
.badge { padding: 4px 10px; border-radius: 999px; background: var(--green-deep); color: #bbf7d0; font-size: 13px; font-weight: 600; }
.badge.warn { background: #713f12; color: #fde68a; }
.why { margin: 0; color: var(--card-text); }
.num-big { margin: 0; font-weight: 800; font-size: 46px; line-height: 1; color: var(--green-bright); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.num-big small { font-size: 17px; font-weight: 600; color: var(--card-text); letter-spacing: 0; }
.chart { margin: 0; }
.chart figcaption { font-size: 13px; font-weight: 600; color: var(--card-text); margin-bottom: 10px; }
.bars { position: relative; display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 3px; align-items: end; height: 120px; }
.bars i { display: block; border-radius: 3px; background: #334155; }
.bars i.paid { background: var(--green-bright); }
.bars .goal { position: absolute; left: 0; right: 0; border-top: 2px dashed #fbbf24; }
.bars .goal span { position: absolute; left: 0; top: -24px; padding: 1px 6px; border-radius: 6px; background: var(--card); font-size: 12px; color: #fde68a; }
.axis { display: flex; justify-content: space-between; font-size: 12px; color: #94a3b8; margin-top: 6px; }
dl.facts { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 15px; font-variant-numeric: tabular-nums; border-top: 1px solid var(--card-2); padding-top: 14px; }
dl.facts dt { color: var(--card-text); }
dl.facts dd { margin: 0; font-weight: 600; text-align: right; }
dd.plus { color: var(--green-bright); }
.alt { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--card-2); font-size: 14px; color: var(--card-text); }
.cta-soon { padding: 14px; border-radius: 14px; border: 1px dashed #475569; text-align: center; color: var(--card-text); font-size: 15px; }
.cta-soon strong { display: block; color: #fff; font-family: var(--head); font-size: 17px; margin-bottom: 2px; }
.disclose { margin: 0; font-size: 13px; color: #94a3b8; }

aside.empty { flex: 1 1 380px; min-width: 0; border-radius: var(--radius); padding: 28px; background: var(--soft); border: 1px solid var(--line); }
aside.empty h2 { margin: 0 0 12px; font-size: 20px; }
aside.empty ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }

/* trust strip, prose, cards, tables */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--soft); }
.trust-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; padding-top: 28px; padding-bottom: 28px; }
.trust p { margin: 0; }
.trust .n { font-family: var(--head); font-weight: 800; font-size: 26px; }
.trust .l { font-size: 14px; color: var(--muted); }
.prose { padding-top: 24px; padding-bottom: 48px; }
.prose > p, .prose > ul, .prose > ol, .prose > h1, .prose > h2 { max-width: 780px; }
.prose li { margin-bottom: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding-top: 8px; padding-bottom: 48px; }
.card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; color: var(--ink); text-decoration: none; transition: transform .2s var(--ease-out), box-shadow .2s, border-color .2s; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 23, 42, .08); border-color: var(--line-2); color: var(--ink); }
.card h2 { margin: 0 0 6px; font-size: 20px; }
.card p { margin: 0; color: var(--muted); }
.card.soon { background: var(--soft); }
.card.soon p { color: var(--faint); }
form.search { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 12px 16px; align-items: end; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 8px 0 16px; }
form.search .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-weight: 600; }
form.search input[type=search], form.search select { min-height: 48px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; font: inherit; background: #fff; width: 100%; }
.count { color: var(--muted); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin: 8px 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--soft); font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfdfc; }
code { font-size: 13px; }

footer.site { background: var(--card); color: var(--card-text); font-size: 14px; padding: 32px 0; margin-top: 24px; }
footer.site a { color: #fff; }
.foot { display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; }
.foot p { margin: 0; max-width: 620px; }

@media (max-width: 640px) {
  form.search { grid-template-columns: 1fr; }
  .prices { grid-template-columns: 1fr; }
  form.calc-form, aside.result { padding: 20px; }
}

/* motion: only for people who haven't asked for less */
@media (prefers-reduced-motion: no-preference) {
  aside.result { animation: rise .45s var(--ease-out) both; }
  .bars i { transform-origin: bottom; animation: grow .55s var(--ease-out) both; animation-delay: calc(var(--i) * 35ms + 200ms); }
  .bars .goal { animation: fade .4s ease-out both; animation-delay: .75s; }
  .hero-text, .checks { animation: rise .5s var(--ease-out) both; }
  .checks { animation-delay: .08s; }
  .checks li svg { animation: pop .35s var(--ease-out) both; animation-delay: calc(var(--i) * 90ms + 250ms); }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
