@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #F1F4F6;
  --paper: #FFFFFF;
  --ink: #102033;
  --muted: #4F5D6E;
  --line: #D5DCE3;
  --solar: #F2B200;
  --battery: #13866F;
  --grid: #6F7F95;
  --focus: #F2B200;
  --ok: #13866F;
  --err: #B3261E;
  --shadow: 0 1px 0 rgba(16, 32, 51, .06), 0 18px 40px -18px rgba(16, 32, 51, .35);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1824;
    --paper: #182434;
    --ink: #E9EFF5;
    --muted: #A5B2C2;
    --line: #2C3A4D;
    --battery: #2FB396;
    --grid: #8796AB;
    --ok: #2FB396;
    --err: #FF8A80;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 "Schibsted Grotesk", system-ui, sans-serif;
}
/* No tabular-nums: this font widens punctuation with it. Prices are right-aligned instead. */
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* Page frame */
.top, main > section, .foot { width: min(1120px, 100% - 32px); margin-inline: auto; }

.top { display: flex; align-items: center; justify-content: space-between; padding-block: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.125rem; text-decoration: none; letter-spacing: -0.01em; }
.mark { display: inline-grid; grid-template-columns: 5px 8px 11px; gap: 2px; height: 18px; align-items: end; }
.mark i { display: block; border-radius: 2px; }
.mark .s { height: 9px; background: var(--solar); }
.mark .b { height: 13px; background: var(--battery); }
.mark .g { height: 18px; background: var(--grid); }
.top-link { font-weight: 600; text-underline-offset: 4px; }

.button {
  display: inline-block;
  font: inherit; font-weight: 700;
  background: var(--ink); color: var(--bg);
  border: 0; border-radius: 10px;
  padding: 14px 22px;
  text-decoration: none; cursor: pointer;
}
.button:hover { background: color-mix(in srgb, var(--ink) 86%, var(--battery)); }
.button[disabled] { opacity: .6; cursor: progress; }
.fine { color: var(--muted); font-size: .9375rem; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding-block: clamp(32px, 7vw, 96px) clamp(48px, 8vw, 112px);
}
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.75rem); font-weight: 800; max-width: 12ch; }
.lede { margin-top: 24px; font-size: 1.1875rem; max-width: 34em; color: var(--muted); }
.hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.hero-actions .fine { max-width: 22em; }

/* The receipt: the one memorable thing on the page */
.receipt-wrap { margin: 0; position: relative; justify-self: center; width: min(380px, 100%); }
.slot {
  height: 14px; margin-inline: -14px;
  background: var(--ink); border-radius: 8px;
  position: relative; z-index: 2;
}
.receipt {
  position: relative; z-index: 1;
  margin: -6px 0 0; padding: 30px 26px 40px;
  background: var(--paper);
  box-shadow: var(--shadow);
  --zz: 10px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zz)) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zz)) 100%;
  transform-origin: top center;
}
.receipt { animation: print 1.4s cubic-bezier(.3, .7, .2, 1) .25s both; }
@keyframes print {
  from { clip-path: inset(0 0 100% 0); transform: translateY(-24px); }
  to   { clip-path: inset(0 0 0 0); transform: none; }
}
.r-head { padding-bottom: 16px; border-bottom: 2px dashed var(--line); }
.r-title { font-weight: 800; font-size: 1.25rem; }
.r-when { color: var(--muted); font-size: .9375rem; margin-top: 2px; }
.r-lines { margin: 0; padding: 16px 0; display: grid; gap: 14px; }
.r-lines div, .r-total div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.r-lines dt { font-weight: 600; }
.r-lines dt small { display: block; font-weight: 400; color: var(--muted); font-size: .875rem; }
.r-lines dd, .r-total dd { margin: 0; font-weight: 700; }

.split { display: flex; height: 34px; border-radius: 6px; overflow: hidden; font-size: .8125rem; font-weight: 700; }
.seg { width: var(--w); display: flex; align-items: center; padding-inline: 8px; white-space: nowrap; overflow: hidden; }
.seg.b { background: var(--battery); color: #fff; }
.seg.g { background: var(--grid); color: #fff; }

.r-total { margin: 18px 0 0; padding-top: 16px; border-top: 2px dashed var(--line); display: grid; gap: 6px; }
.r-total dt { font-weight: 600; }
.r-total div:first-child dd { font-size: 1.75rem; font-weight: 800; }
.r-mile dd { color: var(--battery); }
.r-gas { margin-top: 10px; color: var(--muted); font-size: .9375rem; }
.receipt-wrap figcaption { margin-top: 14px; text-align: center; color: var(--muted); font-size: .8125rem; }

/* Bill check */
.bill {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px); align-items: center;
  padding-block: clamp(48px, 8vw, 104px);
  border-top: 1px solid var(--line);
}
.bill h2, .how h2, .join h2 { font-size: clamp(1.875rem, 3.6vw, 2.75rem); font-weight: 800; }
.bill-copy p { margin-top: 18px; max-width: 34em; }
.bill-copy p + p { color: var(--muted); }

.bill-card { background: var(--paper); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); }
.bc-head { font-weight: 800; margin-bottom: 18px; }
.bc-row { display: grid; grid-template-columns: 7.5em 1fr auto; align-items: center; gap: 12px; margin-bottom: 10px; }
.bc-label { color: var(--muted); font-size: .9375rem; }
.bc-bar { height: 14px; background: color-mix(in srgb, var(--line) 60%, transparent); border-radius: 7px; overflow: hidden; }
.bc-bar i { display: block; height: 100%; width: var(--w); background: var(--grid); border-radius: 7px; }
.bc-bar.is-bill i { background: var(--ink); }
.bc-num { font-weight: 700; }
.bc-verdict { margin: 16px 0 20px; }
.bc-verdict strong { color: var(--ok); }
.bc-share { display: flex; height: 40px; border-radius: 8px; overflow: hidden; font-size: .8125rem; font-weight: 700; }
.bc-share span { display: flex; align-items: center; padding-inline: 10px; white-space: nowrap; overflow: hidden; }
.bc-share .car { width: var(--w); background: var(--solar); color: #102033; }
.bc-share .home { flex: 1; background: color-mix(in srgb, var(--line) 70%, transparent); color: var(--ink); }

/* How it works: a real sequence, so numbers are earned */
.how { padding-block: clamp(48px, 8vw, 104px); border-top: 1px solid var(--line); }
.steps { list-style: none; counter-reset: step; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--ink); font-weight: 800; margin-bottom: 14px;
}
.steps h3 { font-size: 1.1875rem; font-weight: 750; }
.steps p { margin-top: 8px; color: var(--muted); max-width: 28em; }
.honest { margin-top: 36px; font-weight: 600; }

/* Waitlist */
.join {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  padding: clamp(32px, 5vw, 56px);
  margin-block: 8px clamp(48px, 8vw, 96px);
  background: var(--paper); border-radius: 20px; box-shadow: var(--shadow);
  scroll-margin-top: 24px;
}
.join-copy p { margin-top: 16px; max-width: 32em; }
.join-form { display: grid; gap: 8px; align-content: start; }
.join-form label { font-weight: 600; margin-top: 8px; }
.opt { font-weight: 400; color: var(--muted); }
.join-form input, .join-form select {
  font: inherit; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 14px; width: 100%;
}
.join-form input:focus-visible, .join-form select:focus-visible { border-color: var(--ink); outline-offset: 1px; }
.join-form input[aria-invalid="true"] { border-color: var(--err); }
.join-form .button { margin-top: 12px; justify-self: start; }
.status { min-height: 1.5em; font-weight: 600; }
.status.is-ok { color: var(--ok); }
.status.is-error { color: var(--err); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.foot { padding-block: 32px 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; display: grid; gap: 10px; }
.foot p:last-child { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Privacy page */
.doc { width: min(720px, 100% - 32px); margin: 0 auto; padding-block: 24px 72px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
.doc h2 { font-size: 1.375rem; font-weight: 750; margin-top: 36px; }
.doc p, .doc ul { margin-top: 12px; }
.doc li + li { margin-top: 6px; }
.doc .updated { color: var(--muted); margin-top: 10px; }
.doc .join-form { margin-top: 16px; max-width: 420px; }

@media (max-width: 860px) {
  .hero, .bill, .join { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero h1 { max-width: 14ch; }
}
@media (max-width: 420px) {
  .receipt { padding-inline: 18px; }
  .bc-row { grid-template-columns: 6.5em 1fr auto; gap: 8px; }
  .top-link { font-size: .9375rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .receipt { animation: none; }
}

/* Example-data widths (classes, so the strict CSP needs no inline styles) */
.w42 { --w: 42%; } .w58 { --w: 58%; } .w29 { --w: 29%; } .w988 { --w: 98.8%; } .w100 { --w: 100%; }
