:root {
  color-scheme: dark;
  --ink: #f4f1ec;
  --ink-2: #b9b3c9;
  --line: rgba(255, 255, 255, 0.14);
  --amber: #ffb347;
  --ember: #ff7a3c;
  --cyan: #7fe0ff;
  --bad: #ff8a8a;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; min-height: 100%; background: #070b1e; color: var(--ink); overflow-x: clip; }
html:has(body.site) { scroll-padding-top: 76px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:has(body.site) { scroll-behavior: auto; } }

/* ---------- scene ---------- */
.scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.veil {
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 78% 45%, rgba(7, 11, 30, 0.55), transparent 70%),
    linear-gradient(90deg, rgba(7, 11, 30, 0.55) 0%, rgba(7, 11, 30, 0) 45%);
}

.stars circle { animation: twinkle 4s ease-in-out infinite; }
.stars circle:nth-child(3n) { animation-delay: -1.3s; }
.stars circle:nth-child(3n+1) { animation-delay: -2.6s; }
@keyframes twinkle { 0%, 100% { opacity: .9; } 50% { opacity: .25; } }

.lamp { animation: lamp 3.2s ease-in-out infinite; }
.lamp.l2 { animation-delay: -1.1s; } .lamp.l3 { animation-delay: -2.2s; }
@keyframes lamp { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.beacon { animation: beacon 2.4s steps(1) infinite; }
@keyframes beacon { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .15; } }

.flare { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 1.1s ease-in-out infinite alternate; }
@keyframes flicker { 0% { transform: scale(.85, .8); opacity: .85; } 100% { transform: scale(1.08, 1.15); opacity: 1; } }

.smoke circle { transform-box: fill-box; transform-origin: center; animation: drift 9s ease-in-out infinite; }
.smoke circle:nth-child(2) { animation-delay: -3s; } .smoke circle:nth-child(3) { animation-delay: -6s; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(14px, -10px) scale(1.15); } }

.pulse { stroke-dasharray: 18 260; animation: flow 5s linear infinite; filter: drop-shadow(0 0 4px currentColor); }
.pulse.p2 { animation-duration: 6.5s; animation-delay: -2s; }
@keyframes flow { to { stroke-dashoffset: -1100; } }

.shimmer path { animation: shimmer 5s ease-in-out infinite; }
@keyframes shimmer { 0%, 100% { opacity: .55; transform: translateX(0); } 50% { opacity: .2; transform: translateX(10px); } }

/* ---------- layout ---------- */
.wrap {
  position: relative; z-index: 1; min-height: 100%;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, 420px);
  align-items: center; gap: 48px;
  padding: clamp(24px, 6vw, 88px);
}

.hero { align-self: start; padding-top: 4vh; max-width: 620px; }
.eyebrow { margin: 0 0 14px; color: var(--amber); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; }
.hero h2 { text-wrap: balance; margin: 0 0 26px; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; text-shadow: 0 2px 24px rgba(0, 0, 0, .45); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; }
.chips li {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink);
  background: rgba(10, 14, 34, .45); backdrop-filter: blur(8px);
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.c1 { background: var(--amber); } .c2 { background: var(--cyan); } .c3 { background: #9b8cff; } .c4 { background: #5fd38a; }

/* ---------- card ---------- */
.card {
  justify-self: end; width: 100%;
  padding: 36px 32px 26px; border-radius: 20px;
  background: linear-gradient(160deg, rgba(22, 28, 58, .78), rgba(10, 13, 30, .82));
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(18px) saturate(140%);
  animation: rise .6s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise { from { transform: translateY(14px); } to { transform: none; } }

.logo {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--amber), var(--ember));
  box-shadow: 0 8px 26px rgba(255, 122, 60, .45);
}
.logo svg { width: 26px; height: 26px; fill: #1a0f05; }
.card h1 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.sub { margin: 6px 0 22px; color: var(--ink-2); font-size: 14px; }

.err {
  margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; font-size: 13px;
  color: var(--bad); background: rgba(255, 90, 90, .1); border: 1px solid rgba(255, 120, 120, .3);
}

form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field > span:first-child { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--ink-2); text-transform: uppercase; }
.input {
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(5, 8, 22, .55);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus-within { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(255, 179, 71, .16); }
.input svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; }
.input input {
  flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent;
  color: var(--ink); font: inherit; font-size: 15px;
}
.input input:-webkit-autofill { -webkit-text-fill-color: var(--ink); transition: background-color 9999s; }
.reveal {
  border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; padding: 6px 2px; letter-spacing: .03em;
}
.reveal:hover, .reveal:focus-visible { color: var(--amber); }

.submit {
  margin-top: 6px; height: 48px; border: 0; border-radius: 12px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-size: 15px; font-weight: 700; color: #1a0f05;
  background: linear-gradient(135deg, var(--amber), var(--ember));
  box-shadow: 0 10px 28px rgba(255, 122, 60, .35);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.submit:hover { filter: brightness(1.06); box-shadow: 0 14px 34px rgba(255, 122, 60, .45); }
.submit:hover svg { transform: translateX(3px); }
.submit:active { transform: translateY(1px); }
.submit:focus-visible, .reveal:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.submit[disabled] { opacity: .7; cursor: progress; }

.foot { margin: 22px 0 0; text-align: center; font-size: 12px; color: var(--ink-2); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .wrap { grid-template-columns: 1fr; gap: 24px; align-content: center; }
  .hero { padding-top: 0; text-align: center; justify-self: center; }
  .hero h2 { font-size: 26px; }
  .chips { justify-content: center; }
  .card { justify-self: center; max-width: 420px; }
  .veil { background: rgba(7, 11, 30, .45); }
}
@media (max-width: 520px) {
  .hero .chips, .hero h2 { display: none; }
  .card { padding: 28px 22px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- form extras ---------- */
.err[data-msg=""] { display: none; }
a.logo { text-decoration: none; }
.field > span:first-child em { font-style: normal; font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .75; margin-left: 6px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.consent input { margin-top: 3px; accent-color: var(--amber); width: 16px; height: 16px; flex: none; }
.consent a, .alt a, .prose a, .site-foot a, .fine a { color: var(--amber); }
.alt { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--ink-2); }
.alt[hidden] { display: none; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 520px; text-align: left; }
.hero .ticks { margin: 0 auto 0 0; }
@media (max-width: 900px) { .hero .ticks { margin: 0 auto; } }
.ticks li { position: relative; padding-left: 28px; font-size: 15px; line-height: 1.45; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255, 179, 71, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23ffb347' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }

/* ---------- public site ---------- */
.site-head {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(18px, 5vw, 64px); background: rgba(7, 11, 30, .72); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, var(--amber), var(--ember)); }
.brand .mark svg { width: 16px; height: 16px; fill: #1a0f05; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.site-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 11px; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; border: 0; font-family: inherit;
}
.btn.primary { color: #1a0f05; background: linear-gradient(135deg, var(--amber), var(--ember)); box-shadow: 0 8px 22px rgba(255, 122, 60, .3); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { color: var(--ink); background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.site-nav .btn.primary { height: 38px; color: #1a0f05; }

.landing-hero { position: relative; z-index: 1; min-height: calc(100vh - 67px); display: grid; align-content: center; padding: 6vh clamp(18px, 6vw, 88px) 18vh; }
.landing-hero h1 { margin: 0 0 18px; max-width: 760px; font-size: clamp(34px, 5vw, 62px); line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; text-shadow: 0 2px 30px rgba(0, 0, 0, .5); }
.landing-hero .lede { max-width: 600px; margin: 0 0 28px; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; color: #d9d3e6; text-shadow: 0 1px 16px rgba(0, 0, 0, .6); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-row .note { color: var(--ink-2); font-size: 13px; }

.band { position: relative; z-index: 1; background: #0a0f26; border-top: 1px solid var(--line); padding: clamp(48px, 8vw, 96px) clamp(18px, 6vw, 88px); }
.band.alt-bg { background: #0d1330; }
.band h2 { margin: 0 0 10px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.02em; }
.band .kicker { margin: 0 0 8px; color: var(--amber); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.band .intro { margin: 0 0 32px; max-width: 680px; color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feat { padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.feat .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; background: rgba(255, 179, 71, .12); }
.feat .ic svg { width: 22px; height: 22px; fill: none; stroke: var(--amber); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feat h3 { margin: 0 0 6px; font-size: 16px; }
.feat p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 26px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.plan.best { border-color: var(--amber); background: linear-gradient(160deg, rgba(255, 179, 71, .1), rgba(255, 122, 60, .04)); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.plan .tag { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #1a0f05; background: var(--amber); padding: 4px 8px; border-radius: 6px; margin-bottom: 12px; }
.plan h3 { margin: 0; font-size: 18px; }
.plan .price { margin: 12px 0 2px; font-size: 38px; font-weight: 800; letter-spacing: -.02em; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.plan .per { margin: 0 0 18px; color: var(--ink-2); font-size: 13px; }
.plan .ticks { margin-bottom: 22px; flex: 1; align-content: start; }
.plan .ticks li { font-size: 14px; }
.fine { margin: 18px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.55; max-width: 760px; }

.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; background: rgba(255, 255, 255, .03); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 10px 0 0; color: var(--ink-2); line-height: 1.6; font-size: 14px; }

.site-foot { position: relative; z-index: 1; background: #070b1e; border-top: 1px solid var(--line); padding: 32px clamp(18px, 6vw, 88px); color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.site-foot .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-foot nav a { color: var(--ink-2); text-decoration: none; }
.site-foot nav a:hover { color: var(--ink); }
.site-foot .disc { margin: 16px 0 0; max-width: 900px; }

/* legal / content pages */
.page { position: relative; z-index: 1; background: #0a0f26; min-height: calc(100vh - 67px); padding: clamp(32px, 6vw, 72px) clamp(18px, 6vw, 88px); }
.prose { max-width: 760px; margin: 0 auto; line-height: 1.7; font-size: 15px; color: #dcd6e8; }
.prose h1 { color: var(--ink); font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -.02em; margin: 0 0 6px; line-height: 1.15; }
.prose h2 { color: var(--ink); font-size: 19px; margin: 32px 0 8px; }
.prose .updated { color: var(--ink-2); font-size: 13px; margin: 0 0 28px; }
.prose .note { border: 1px solid rgba(255, 179, 71, .35); background: rgba(255, 179, 71, .08); border-radius: 12px; padding: 12px 16px; font-size: 14px; }
.prose ul { padding-left: 20px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 8px 0; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink); }

/* account */
.acct { max-width: 860px; margin: 0 auto; display: grid; gap: 16px; }
.acct h1 { margin: 0 0 4px; font-size: 28px; }
.panel { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: rgba(255, 255, 255, .03); }
.panel h2 { margin: 0 0 12px; font-size: 17px; }
.panel p { color: var(--ink-2); font-size: 14px; line-height: 1.55; margin: 0 0 14px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.pro { background: var(--amber); color: #1a0f05; } .pill.free { background: rgba(255, 255, 255, .1); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stack { display: grid; gap: 10px; max-width: 360px; }
.msg { font-size: 13px; margin: 10px 0 0; min-height: 1em; } .msg.ok { color: #7fe3a0; } .msg.bad { color: var(--bad); }
.panel.danger { border-color: rgba(255, 120, 120, .35); }
.btn.danger-btn { color: #fff; background: #c2413b; }

@media (max-width: 900px) {
  .grid3, .plans { grid-template-columns: 1fr; }
  .site-nav a.hide-sm { display: none; }
  .kv { grid-template-columns: 1fr; }
}

.input select option { background: #0d1330; color: var(--ink); }
.input select:focus { outline: none; }

/* data tables (public Today page) */
.tablewrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
table.data td.num, table.data th.num { text-align: right; }
table.data tr:last-child td { border-bottom: 0; }
table.data.wrap th, table.data.wrap td { white-space: normal; }
table.data.wrap td { vertical-align: top; }

/* Energy Desk panels (energy-panels.js) */
.ep-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ep-badge { font-size: 12px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.ep-badge.stale { color: #ffcf8a; border-color: rgba(255, 179, 71, .45); }
.ep-stale .ep-items { opacity: .6; }
.ep-items td { white-space: normal; }
.ep-items td.num b { font-size: 15px; }
.ep-unit, .ep-sub, .ep-when { color: var(--ink-2); font-size: 12px; }
.ep-note { color: var(--ink-2); font-size: 13px; margin: 4px 0 8px; }
.ep-review { color: #ffcf8a; }
.ep-attr { font-size: 12.5px; color: var(--ink-2); margin: 10px 0 0; }
.ep-attr a { color: var(--amber); }
.ep-quality { display: inline-block; font-size: 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; text-decoration: none; }
.ep-grid { display: grid; gap: 16px; }
