/* ============================================================
   fundid — shared design system (v1 app subset of mockups/fundid.css)
   "a friendly mechanic, never a charity, a bank, or a pet"
   Warm workshop palette · serif headlines · mono ledgers.
   Light + dark via prefers-color-scheme, manual override via
   :root[data-theme="light|dark"].
   Trimmed to what the jar page, hibernation page and terms page use.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  /* light (workshop daylight) */
  --bg: #f6efe1;
  --bg-2: #efe5d1;
  --paper: #fdf9f0;
  --paper-2: #f9f2e3;
  --ink: #33291c;
  --ink-2: #6d5d45;
  --ink-3: #a19070;
  --line: #e0d3ba;
  --line-2: #cdbd9e;

  --fuel: #ec8410;      /* the brand amber */
  --fuel-2: #d05f0a;
  --fuel-soft: #fbe9d0;

  --green: #37855a;
  --green-2: #256844;
  --green-soft: #e2eedd;

  --amber: #c98a10;
  --amber-2: #a86e08;
  --amber-soft: #f7ecce;

  --ember: #d9541f;
  --ember-2: #b53c10;
  --ember-soft: #f9e2d2;

  --moon: #5c609c;
  --moon-2: #464a85;
  --moon-soft: #e4e3f2;

  --sprout: #4a9e56;

  /* night palette — hibernation sections keep this in BOTH themes */
  --night: #181a2e;
  --night-2: #23264a;
  --night-3: #2e315c;
  --night-ink: #d8daf2;
  --night-ink-2: #9599c9;
  --night-line: #35396b;

  --glass: #ece1c9;
  --shadow: 0 1px 2px rgba(51,41,28,.06), 0 8px 28px -12px rgba(51,41,28,.18);
  --shadow-lg: 0 2px 4px rgba(51,41,28,.07), 0 20px 50px -20px rgba(51,41,28,.30);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, "Segoe UI", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, Menlo, monospace;

  --r-sm: 8px; --r: 14px; --r-lg: 22px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171310;
    --bg-2: #100d0a;
    --paper: #211b15;
    --paper-2: #281f17;
    --ink: #f0e6d3;
    --ink-2: #b7a685;
    --ink-3: #806f52;
    --line: #382d20;
    --line-2: #4d3f2c;

    --fuel: #f29a2e;
    --fuel-2: #e0731a;
    --fuel-soft: #3a2a14;

    --green: #57ab77;
    --green-2: #7cc596;
    --green-soft: #1d2e1f;

    --amber: #dfa62e;
    --amber-2: #ecc25e;
    --amber-soft: #352a10;

    --ember: #ef7038;
    --ember-2: #f68f5c;
    --ember-soft: #3b2114;

    --moon: #8b8fd0;
    --moon-2: #a7abe6;
    --moon-soft: #23244a;

    --sprout: #6cc078;

    --glass: #322a1e;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -12px rgba(0,0,0,.5);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.45), 0 24px 60px -20px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}

/* manual override (theme toggle) */
:root[data-theme="light"] {
  --bg:#f6efe1; --bg-2:#efe5d1; --paper:#fdf9f0; --paper-2:#f9f2e3;
  --ink:#33291c; --ink-2:#6d5d45; --ink-3:#a19070; --line:#e0d3ba; --line-2:#cdbd9e;
  --fuel:#ec8410; --fuel-2:#d05f0a; --fuel-soft:#fbe9d0;
  --green:#37855a; --green-2:#256844; --green-soft:#e2eedd;
  --amber:#c98a10; --amber-2:#a86e08; --amber-soft:#f7ecce;
  --ember:#d9541f; --ember-2:#b53c10; --ember-soft:#f9e2d2;
  --moon:#5c609c; --moon-2:#464a85; --moon-soft:#e4e3f2;
  --sprout:#4a9e56; --glass:#ece1c9;
  --shadow: 0 1px 2px rgba(51,41,28,.06), 0 8px 28px -12px rgba(51,41,28,.18);
  --shadow-lg: 0 2px 4px rgba(51,41,28,.07), 0 20px 50px -20px rgba(51,41,28,.30);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg:#171310; --bg-2:#100d0a; --paper:#211b15; --paper-2:#281f17;
  --ink:#f0e6d3; --ink-2:#b7a685; --ink-3:#806f52; --line:#382d20; --line-2:#4d3f2c;
  --fuel:#f29a2e; --fuel-2:#e0731a; --fuel-soft:#3a2a14;
  --green:#57ab77; --green-2:#7cc596; --green-soft:#1d2e1f;
  --amber:#dfa62e; --amber-2:#ecc25e; --amber-soft:#352a10;
  --ember:#ef7038; --ember-2:#f68f5c; --ember-soft:#3b2114;
  --moon:#8b8fd0; --moon-2:#a7abe6; --moon-soft:#23244a;
  --sprout:#6cc078; --glass:#322a1e;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -12px rgba(0,0,0,.5);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.45), 0 24px 60px -20px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id] { scroll-margin-top: 24px; }
::selection { background: color-mix(in srgb, var(--fuel) 30%, transparent); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
}
/* paper grain */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

h1,h2,h3,h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p { margin: .4rem 0 1rem; }
a { color: var(--fuel-2); text-decoration-color: color-mix(in srgb, var(--fuel) 45%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--fuel); }
strong { font-weight: 650; }
small, .small { font-size: .84rem; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: .86em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.wrap--narrow { max-width: 780px; }

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(20px, 4vw, 44px);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--serif); font-weight: 700; font-size: 1.35rem;
  letter-spacing: -.02em; color: var(--ink); text-decoration: none;
}
.wordmark .flame { width: 20px; height: 24px; flex: none; }
.wordmark em { font-style: normal; color: var(--fuel); }
.topbar .crumb {
  color: var(--ink-3); font-size: .9rem;
  flex: 0 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar .spacer, .footer .spacer { flex: 1; }
.topnav { display: flex; gap: 4px; }
.topnav a, .footnav a {
  color: var(--ink-2); text-decoration: none;
  font-size: .88rem; padding: 4px 8px; border-radius: 8px;
}
.topnav a:hover, .footnav a:hover { color: var(--fuel-2); background: var(--paper-2); }
.theme-toggle {
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink-2);
  border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .82rem;
  cursor: pointer; white-space: nowrap;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-3); }
@media (max-width: 560px) { .topbar .crumb { display: none; } }

.footer {
  margin-top: clamp(40px, 7vw, 80px);
  border-top: 1px solid var(--line);
  padding: 22px 0 40px;
  color: var(--ink-3); font-size: .86rem;
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline;
}
.footer .tag { font-family: var(--serif); font-style: italic; color: var(--ink-2); }
.footnav { display: flex; flex-wrap: wrap; gap: 2px 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem;
  border-radius: 999px; padding: 11px 22px;
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none; color: var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(160deg, var(--fuel), var(--fuel-2));
  color: #fff8ec;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 18px -6px color-mix(in srgb, var(--fuel-2) 60%, transparent);
  text-shadow: 0 1px 0 rgba(0,0,0,.12);
}
.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 24px -8px color-mix(in srgb, var(--fuel-2) 70%, transparent);
}
.btn-quiet {
  background: var(--paper); border-color: var(--line-2); color: var(--ink-2);
}
.btn-quiet:hover { color: var(--ink); border-color: var(--ink-3); transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .btn-primary:hover, .btn-quiet:hover { transform: none; }
}
.btn-night {
  background: linear-gradient(160deg, var(--fuel), var(--fuel-2));
  color: #fff8ec; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 10px 30px -8px rgba(236,132,16,.55);
}
.btn-lg { font-size: 1.05rem; padding: 14px 28px; }

/* ---------- cards & panels ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 28px);
}
.card--flat { box-shadow: none; }
.note {
  background: var(--paper-2); border: 1px dashed var(--line-2);
  border-radius: var(--r); padding: 12px 16px; font-size: .9rem; color: var(--ink-2);
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  border-radius: 999px; padding: 3px 11px;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2);
}
.pill--moon  { background: var(--moon-soft);  border-color: transparent; color: var(--moon-2); }

/* ============================================================
   THE FUEL GAUGE — the brand mark.
   States: g-healthy · g-low · g-critical · g-hib · g-reviving
   Fill level: inline style="--fill:.82"
   ============================================================ */
.gauge {
  --fill: .5;
  --liquid: var(--green);
  --liquid-2: var(--green-2);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 9px 12px 9px 14px;
  box-shadow: var(--shadow);
  max-width: 620px;
  min-width: 0;
  font-size: .92rem;
}
.gauge .g-ico { flex: none; width: 21px; height: 25px; display: block; }
.gauge .g-ico .jar-glass { stroke: var(--ink-3); fill: none; stroke-width: 1.5; }
.gauge .g-ico .jar-lid { fill: var(--ink-3); }
.gauge .g-ico .jar-fill {
  fill: var(--liquid);
  transform: scaleY(var(--fill));
  transform-origin: bottom; transform-box: fill-box;
}
/* the tube */
.gauge .g-track {
  position: relative; flex: 1 1 120px; min-width: 90px; height: 12px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), var(--line-2) calc(10% - 1px) 10%),
    var(--glass);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.18);
  overflow: hidden;
}
.gauge .g-liquid {
  position: absolute; inset: 0 auto 0 0;
  width: calc(var(--fill) * 100%);
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--liquid) 70%, white 30%) 0%, var(--liquid) 45%, var(--liquid-2) 100%);
  box-shadow: inset 0 -2px 3px rgba(0,0,0,.15);
}
/* ghost extension (preview of a pending top-up) */
.gauge .g-ghost {
  position: absolute; inset: 0 auto 0 0;
  left: calc(var(--fill) * 100%);
  width: calc(var(--ghost, 0) * 100%);
  background: repeating-linear-gradient(135deg,
    color-mix(in srgb, var(--liquid) 42%, transparent) 0 5px, transparent 5px 9px);
  border-radius: 0 999px 999px 0;
  transition: width .35s cubic-bezier(.3,1.2,.4,1);
}
.gauge .g-label { flex: 2 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 7px; align-items: baseline; line-height: 1.3; }
.gauge .g-label strong { font-weight: 650; white-space: nowrap; }
.gauge .g-sub { color: var(--ink-3); font-size: .82rem; white-space: nowrap; }
.gauge .g-cta {
  flex: none; font: inherit; font-size: .8rem; font-weight: 650;
  border-radius: 999px; padding: 5px 13px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--paper-2); color: var(--ink-2);
  text-decoration: none; white-space: nowrap;
}
.gauge .g-cta:hover { color: var(--ink); border-color: var(--ink-3); }

/* state: healthy — furniture. never animates, never asks loudly */
.g-healthy { --liquid: var(--green); --liquid-2: var(--green-2); }

/* state: low — the color change IS the broadcast */
.g-low { --liquid: var(--amber); --liquid-2: var(--amber-2); }
.g-low .g-label strong { color: var(--amber-2); }

/* state: critical — a real clock, gently glowing */
.g-critical { --liquid: var(--ember); --liquid-2: var(--ember-2); border-color: color-mix(in srgb, var(--ember) 45%, var(--line)); }
.g-critical .g-label strong { color: var(--ember-2); }
.g-critical .g-liquid { animation: emberGlow 2.6s ease-in-out infinite; }
.g-critical .g-cta { border-color: color-mix(in srgb, var(--ember) 50%, var(--line-2)); color: var(--ember-2); }
@keyframes emberGlow {
  0%,100% { box-shadow: inset 0 -2px 3px rgba(0,0,0,.15); filter: none; }
  50% { filter: brightness(1.12); }
}

/* state: hibernating — moon, stars, nearly-empty tube */
.g-hib { --liquid: var(--moon); --liquid-2: var(--moon-2); background: var(--moon-soft); border-color: color-mix(in srgb, var(--moon) 30%, var(--line)); }
.g-hib .g-track {
  background:
    radial-gradient(circle at 22% 45%, var(--moon-2) 0 1px, transparent 1.5px),
    radial-gradient(circle at 55% 30%, var(--moon-2) 0 1px, transparent 1.5px),
    radial-gradient(circle at 80% 60%, var(--moon-2) 0 1px, transparent 1.5px),
    var(--glass);
}
.g-hib .g-label strong { color: var(--moon-2); }
.g-hib .g-moon { flex: none; width: 20px; height: 20px; }
.g-hib .g-moon path { fill: var(--moon); }

/* state: reviving — the pour. honest boot theater */
.g-reviving { --liquid: var(--fuel); --liquid-2: var(--fuel-2); }
.g-reviving .g-liquid { animation: pour 3.2s cubic-bezier(.25,.8,.35,1) infinite; }
.g-reviving .g-label strong { color: var(--fuel-2); }
@keyframes pour {
  0%   { width: 4%; }
  55%  { width: calc(var(--fill) * 100%); }
  78%  { width: calc(var(--fill) * 100% - 4px); }
  100% { width: calc(var(--fill) * 100%); }
}

/* gauge on night sections */
.night .gauge { background: var(--night-2); border-color: var(--night-line); color: var(--night-ink); box-shadow: none; }
.night .gauge .g-track { background:
    radial-gradient(circle at 22% 45%, var(--night-ink-2) 0 1px, transparent 1.5px),
    radial-gradient(circle at 55% 30%, var(--night-ink-2) 0 1px, transparent 1.5px),
    radial-gradient(circle at 82% 60%, var(--night-ink-2) 0 1px, transparent 1.5px),
    var(--night-3);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.4); }
.night .gauge .g-sub { color: var(--night-ink-2); }
.night .gauge .g-label strong { color: var(--night-ink); }

/* reduced motion: everything holds still */
@media (prefers-reduced-motion: reduce) {
  .g-critical .g-liquid, .g-reviving .g-liquid { animation: none; }
}

/* ---------- the big jar (jar-page hero / checkout card) ---------- */
.bigjar { display: block; width: min(150px, 34vw); height: auto; margin: 0 auto; }
.bigjar .jar-glass { stroke: var(--ink-3); stroke-width: 2.5; fill: color-mix(in srgb, var(--paper) 60%, transparent); }
.bigjar .jar-lid { fill: var(--ink-3); }
.bigjar .jar-fill { fill: url(#liquidGrad); transform: scaleY(var(--fill, .78)); transform-origin: bottom; transform-box: fill-box; }
.bigjar .jar-tick { stroke: var(--line-2); stroke-width: 1.5; }
.bigjar .jar-bubble { fill: color-mix(in srgb, white 55%, transparent); }

/* ---------- goal-gradient bar (the gap, not the void) ---------- */
/* takes the state's color: --gb / --gb-2 default to ember (critical);
   .goalbar--low re-tints to amber so the bar always matches the gauge */
.goalbar { --gb: var(--ember); --gb-2: var(--ember-2); margin: 10px 0 4px; }
.goalbar--low { --gb: var(--amber); --gb-2: var(--amber-2); }
.goalbar .gb-track {
  position: relative; height: 16px; border-radius: 999px;
  background: var(--glass);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.16);
  overflow: hidden;
}
.goalbar .gb-fill {
  position: absolute; inset: 0 auto 0 0; width: var(--pct, 66%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--gb) 65%, white) 0%, var(--gb) 45%, var(--gb-2) 100%);
  border-radius: 999px;
}
.goalbar .gb-flag {
  position: absolute; top: -4px; bottom: -4px; left: calc(var(--goal, 100%) - 1px);
  width: 2px; background: var(--ink-2);
}
.goalbar .gb-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; margin-top: 7px; gap: 2px 12px; }
.goalbar .gb-gap { font-weight: 650; color: var(--gb-2); }
.goalbar .gb-goal { font-size: .82rem; color: var(--ink-3); }

/* ---------- ledger ---------- */
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 2px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: .86rem;
}
.ledger li:last-child { border-bottom: 0; }
.ledger .who { font-weight: 600; color: var(--ink); min-width: 5.5em; max-width: 12em; overflow-wrap: anywhere; }
.ledger .what { color: var(--ink-2); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ledger .when { color: var(--ink-3); font-size: .78rem; white-space: nowrap; }
.ledger .ev { flex: none; width: 1.3em; text-align: center; }
.ledger li.ev-revival {
  background: linear-gradient(90deg, var(--fuel-soft), transparent 75%);
  border-radius: var(--r-sm); border-bottom-color: transparent;
  padding-left: 8px; margin: 2px -6px;
}
.ledger li.ev-revival .who, .ledger li.ev-revival .what { color: var(--fuel-2); }
.ledger .sprout { color: var(--sprout); }

/* ---------- presets (time-denominated) ---------- */
.presets { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.preset {
  flex: 1 1 110px; text-align: center; cursor: pointer;
  border: 1.5px solid var(--line-2); border-radius: var(--r);
  background: var(--paper); padding: 12px 8px 10px;
  font: inherit; transition: border-color .12s, background .12s, transform .12s;
}
.preset:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.preset .p-amt { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; }
.preset .p-time { display: block; font-size: .82rem; color: var(--fuel-2); font-weight: 650; margin-top: 2px; }
.preset[aria-pressed="true"] {
  border-color: var(--fuel); background: var(--fuel-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fuel) 18%, transparent);
}

/* ---------- form bits ---------- */
.field { margin: 12px 0; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field input[type="text"], .field input[type="email"] {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--paper-2); border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm); padding: 10px 12px;
}
.field input:focus { outline: 2px solid color-mix(in srgb, var(--fuel) 55%, transparent); outline-offset: 1px; border-color: var(--fuel); }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: .88rem; color: var(--ink-2); margin: 12px 0; }
.check input { accent-color: var(--fuel-2); margin-top: 3px; }

/* ---------- fairness timeline ---------- */
.timeline { list-style: none; margin: 14px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--night-line); border-radius: 2px; }
.timeline li { position: relative; padding: 0 0 14px 30px; color: var(--night-ink-2); font-size: .9rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--night-2); border: 2px solid var(--night-ink-2);
}
.timeline li strong { color: var(--night-ink); font-weight: 650; }
.timeline li.tl-moon::before { background: var(--moon); border-color: var(--moon); }

/* ---------- night sections (hibernation) ---------- */
.night {
  background:
    radial-gradient(1100px 500px at 75% -10%, var(--night-3), transparent 60%),
    var(--night);
  color: var(--night-ink);
  border-radius: var(--r-lg);
  position: relative; overflow: hidden;
}
.night .muted { color: var(--night-ink-2); }
.night a { color: color-mix(in srgb, var(--fuel) 80%, white); }
/* stars */
.night .stars { position: absolute; inset: 0; pointer-events: none; opacity: .8; }
.night .stars i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: var(--night-ink-2);
}
/* still, but not uniform — depth without motion */
.night .stars i:nth-child(3n) { width: 1.5px; height: 1.5px; opacity: .6; }
.night .stars i:nth-child(4n) { width: 2.5px; height: 2.5px; }

/* ---------- app screenshot frames ---------- */
.appshot {
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow);
  background: var(--paper);
}
.appshot img { display: block; width: 100%; height: auto; }
.appshot .as-bar { display: flex; gap: 6px; align-items: center; padding: 8px 12px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.appshot .as-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.appshot .as-bar span { font-family: var(--mono); font-size: .72rem; color: var(--ink-3); margin-left: 6px; }
.appshot .as-body { padding: 14px; display: grid; gap: 8px; }
.appshot .as-line { height: 10px; border-radius: 5px; background: var(--line); }
.appshot .as-line.w60 { width: 60%; } .appshot .as-line.w80 { width: 80%; } .appshot .as-line.w40 { width: 40%; }
.appshot--dim { filter: saturate(.25) brightness(.72); }

/* ---------- two-column helpers ---------- */
.cols { display: grid; gap: clamp(16px, 3vw, 32px); }
.cols > * { min-width: 0; }
.cols--sidebar { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
@media (max-width: 820px) { .cols--sidebar { grid-template-columns: 1fr; } }

/* ---------- stat blocks ---------- */
.stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 10px 0; }
.stat .s-num { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; display: block; line-height: 1.1; }
.stat .s-lbl { font-size: .78rem; color: var(--ink-3); }

/* ---------- section headers ---------- */
.kicker {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: .76rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--fuel-2);
  margin: 0 0 8px;
}
.kicker::before {
  content: ""; flex: none; width: 18px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--fuel), color-mix(in srgb, var(--fuel) 25%, transparent));
}

/* ---------- misc ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============================================================
   page-specific layout (moved here from the mockups' inline
   <style> blocks so SSR templates stay markup-only)
   ============================================================ */

/* jar page hero */
.jarhero { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); gap: clamp(20px,4vw,44px); align-items: center; }
.jarhero > * { min-width: 0; }
@media (max-width: 820px) { .jarhero { grid-template-columns: minmax(0, 1fr); } }
.previewdate { font-family: var(--serif); font-size: 1.05rem; color: var(--green-2); min-height: 1.6em; }

/* post-checkout toast: "+1 month. Nice." */
.pourtoast {
  display: none; margin: 12px 0 0; border-radius: var(--r);
  background: linear-gradient(150deg, var(--fuel), var(--fuel-2));
  color: #fff8ec; padding: 12px 18px; font-family: var(--serif); font-size: 1.15rem;
  box-shadow: 0 14px 40px -12px rgba(236,132,16,.55);
}
.pourtoast.show { display: block; }

/* hibernation page */
.hib { padding: clamp(26px, 5vw, 56px); }
.hib-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: clamp(22px,4vw,48px); align-items: start; position: relative; }
@media (max-width: 860px) { .hib-grid { grid-template-columns: 1fr; } }
.hib h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); color: var(--night-ink); }
.hib .proof { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; color: var(--night-ink-2); margin: 14px 0 4px; }
.hib .proof b { color: var(--night-ink); font-weight: 650; }
.hib .proof i { font-style: normal; opacity: .5; }
.exits { display: grid; gap: 10px; margin-top: 14px; }
.exit {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--r);
  padding: 13px 16px; color: var(--night-ink-2); font-size: .9rem;
}
.exit b { color: var(--night-ink); font-weight: 650; display: block; }
.exit .moonico { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.exit .moonico path { fill: var(--moon); }
.exit input[type="email"] {
  font: inherit; background: var(--night-3); color: var(--night-ink);
  border: 1px solid var(--night-line); border-radius: 8px; padding: 7px 10px; width: 100%; margin-top: 8px;
}
.exit .btn { margin-top: 8px; }
.night-panel { background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--r); padding: 16px 18px; }
.night-panel h4 { color: var(--night-ink); margin-bottom: .4rem; }

/* terms */
.terms li { margin: 8px 0; }

/* ============================================================
   PUBLIC FACE — landing, explorer, docs (web/landing.mjs)
   Same token system; both themes come along for free.
   ============================================================ */

/* focus is part of the craft bar, everywhere */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, [role="tab"]:focus-visible {
  outline: 2px solid var(--fuel);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- landing rhythm ---------- */
.land-sec { margin-top: clamp(52px, 9vw, 110px); }

.hero { position: relative; padding-top: clamp(8px, 3vw, 36px); }
/* a soft lamp-glow behind the headline — atmosphere, not decoration */
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: -120px 0 auto -80px; height: 420px;
  background: radial-gradient(620px 300px at 22% 30%, color-mix(in srgb, var(--fuel) 13%, transparent), transparent 70%);
}
.hero-h {
  font-size: clamp(2.25rem, 6.4vw, 4.1rem);
  max-width: 17ch;
  letter-spacing: -.02em;
  margin-bottom: .6rem;
}
.hero-h .hh-fuel {
  font-style: italic;
  color: var(--fuel-2);
  background: linear-gradient(0deg, var(--fuel-soft) 0 38%, transparent 38%);
  border-radius: 4px;
  padding: 0 .08em;
}
.hero-sub {
  font-size: clamp(1rem, 2.1vw, 1.2rem);
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0 0 20px;
}
.hero .selfjar { display: grid; gap: 10px; max-width: 640px; margin: 6px 0 4px; }
.hero .selfjar > * { min-width: 0; }
.hero .selfline { margin: 0; }
.selfnap {
  background: var(--moon-soft);
  border: 1px dashed color-mix(in srgb, var(--moon) 55%, var(--line-2));
  color: var(--ink-2);
}
.hero--nap .hero-h, .hero--nap .hero-sub { opacity: .82; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 14px; }
.herostats {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .03em;
  color: var(--ink-3);
  margin: 0;
}

/* ---------- the shelf (landing strip + explorer page) ---------- */
.jarshelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr));
  gap: 14px;
  margin-top: 18px;
  padding-bottom: 14px;
  border-bottom: 3px double var(--line-2); /* the shelf plank */
}
.jarshelf--page { border-bottom: 0; padding-bottom: 0; }
.jarcard {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px 16px 14px;
  display: grid;
  gap: 9px;
  align-content: start;
  min-width: 0;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
/* grid items default to min-width:auto — force them shrinkable so a long
   label can never push content past the card edge */
.jarcard > * { min-width: 0; }
.jarcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-2);
}
@media (prefers-reduced-motion: reduce) { .jarcard, .jarcard:hover { transition: none; transform: none; } }
.jarcard--critical { border-color: color-mix(in srgb, var(--ember) 45%, var(--line)); }
.jarcard--critical:hover { border-color: color-mix(in srgb, var(--ember) 65%, var(--line)); }
.jarcard--hibernating {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--moon) 40%, var(--line));
  background: color-mix(in srgb, var(--moon-soft) 32%, var(--paper));
}
.jc-name { font-size: 1.08rem; margin: 0; overflow-wrap: anywhere; }
.jc-name a { color: var(--ink); text-decoration: none; }
/* the whole card is the link */
.jc-name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.jc-name a:hover { color: var(--fuel-2); }
.jc-tag { margin: -4px 0 0; font-size: .84rem; color: var(--ink-3); font-style: italic; overflow-wrap: anywhere; }
.jc-meta { margin: 0; font-family: var(--mono); font-size: .74rem; color: var(--ink-3); overflow-wrap: anywhere; }

/* compact gauge for cards: icon + tube on top, label on its own line below.
   Everything wraps — a card gauge must never be able to widen its card. */
.gauge--mini { font-size: .78rem; gap: 5px 8px; padding: 8px 10px; box-shadow: none; max-width: none; }
.gauge--mini .g-ico { width: 16px; height: 19px; }
.gauge--mini .g-moon { width: 15px; height: 15px; }
.gauge--mini .g-track { flex: 1 1 56px; min-width: 44px; height: 9px; }
.gauge--mini .g-label { flex-basis: 100%; order: 3; }
.gauge--mini .g-label strong { white-space: normal; overflow-wrap: anywhere; }
.gauge--mini .g-sub { font-size: .72rem; white-space: normal; overflow-wrap: anywhere; }
.gauge--mini .g-cta { font-size: .7rem; padding: 3px 9px; }

/* ---------- how it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: clamp(16px, 3vw, 28px);
  margin-top: 20px;
}
.step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 20px 12px;
  box-shadow: var(--shadow);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  font-family: var(--serif); font-weight: 700; font-size: 1.5rem;
  color: var(--fuel-2); background: var(--fuel-soft);
  border: 1px solid color-mix(in srgb, var(--fuel) 35%, var(--line));
  margin-bottom: 12px;
}
.step h3 { font-size: 1.12rem; }
.step p { font-size: .92rem; }

/* ---------- specimen board (gauge states) ---------- */
.statedemo {
  margin-top: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: clamp(16px, 3vw, 26px);
}
.sd-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.sd-tab {
  font: inherit; font-size: .84rem; font-weight: 650;
  border-radius: 999px; padding: 6px 15px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--paper-2); color: var(--ink-2);
  transition: border-color .12s, background .12s, color .12s;
}
.sd-tab:hover { color: var(--ink); border-color: var(--ink-3); }
.sd-tab[aria-selected="true"] {
  background: var(--fuel-soft); border-color: var(--fuel); color: var(--fuel-2);
}
.sd-panel { display: grid; gap: 12px; margin-top: 18px; min-width: 0; }
.sd-panel > * { min-width: 0; }
.sd-when {
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0;
}
.sd-panel .gauge { max-width: 640px; }
.sd-story { max-width: 62ch; margin: 0; color: var(--ink-2); font-size: .95rem; }
.sd-caption { margin: 16px 0 0; }

.promises { margin-top: 18px; }
.promises ul { list-style: none; margin: 0; padding: 0; }
.promises li {
  position: relative; padding: 7px 0 7px 30px; color: var(--ink-2); font-size: .95rem;
  border-bottom: 1px dashed var(--line);
}
.promises li:last-child { border-bottom: 0; }
.promises li::before {
  content: ""; position: absolute; left: 4px; top: 14px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--green-soft); border: 2px solid var(--green);
}

/* ---------- code boxes ---------- */
.codebox {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  margin: 14px 0;
  overflow: hidden;
}
.cb-label {
  margin: 0; padding: 10px 16px 0;
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--fuel-2);
}
.cb-body { position: relative; }
.cb-body pre {
  margin: 0; padding: 14px 90px 14px 16px;
  overflow-x: auto;
  font-family: var(--mono); font-size: .82rem; line-height: 1.55;
  color: var(--ink);
  scrollbar-width: thin;
}
.cb-body code { font-family: inherit; }
.copybtn {
  position: absolute; top: 9px; right: 10px;
  font: inherit; font-family: var(--mono); font-size: .72rem; font-weight: 600;
  border-radius: 999px; padding: 4px 12px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--paper-2); color: var(--ink-2);
}
.copybtn:hover { color: var(--ink); border-color: var(--ink-3); }
.cb-returns {
  margin: 0; padding: 10px 16px 12px;
  border-top: 1px dashed var(--line);
  font-size: .82rem; color: var(--ink-2);
  overflow-wrap: anywhere;
}
.cb-returns .faint { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; margin-right: 6px; }

/* ---------- honest numbers ---------- */
.numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 14px; margin-top: 18px;
}
.num-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 18px 8px; box-shadow: var(--shadow);
}
.num-big {
  display: block; font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.5rem); color: var(--fuel-2); line-height: 1.1;
  margin-bottom: 6px;
}

/* ---------- FAQ ---------- */
.faq { margin-top: 10px; max-width: 720px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 14px 36px 14px 0;
  font-family: var(--serif); font-weight: 600; font-size: 1.06rem;
}
.faq summary:hover { color: var(--fuel-2); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono); font-size: 1.1rem; color: var(--fuel-2);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 16px; max-width: 60ch; font-size: .93rem; }

/* ---------- waitlist ---------- */
.waitcard { max-width: 560px; }
.waitform { display: grid; gap: 2px; margin-top: 6px; }
.waitform .btn { justify-self: start; margin-top: 6px; }
.wl-done {
  color: var(--green-2); font-weight: 650;
  background: var(--green-soft); border-radius: var(--r-sm);
  padding: 10px 14px;
}

/* ---------- docs ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.apitable { border-collapse: collapse; width: 100%; min-width: 560px; }
.apitable th {
  text-align: left; font-family: var(--mono); font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3);
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.apitable td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.apitable tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--paper-2) 55%, transparent); }
.apitable tr:last-child td { border-bottom: 0; }
.apitable td.mono { white-space: nowrap; font-size: .8rem; }
.bringlist { padding-left: 1.2em; }
.bringlist li { margin: 10px 0; color: var(--ink-2); }
.bringlist li strong { color: var(--ink); }
.limits { list-style: none; margin: 0; padding: 0; }
.limits li {
  position: relative; padding: 8px 0 8px 26px; color: var(--ink-2); font-size: .93rem;
  border-bottom: 1px dashed var(--line);
}
.limits li:last-child { border-bottom: 0; }
.limits li::before {
  content: ""; position: absolute; left: 4px; top: 16px;
  width: 10px; height: 10px; border-radius: 2px;
  background: var(--fuel-soft); border: 1.5px solid var(--fuel-2);
}
.limits li strong { color: var(--ink); }

/* ---------- small screens: no horizontal scroll, ever ---------- */
@media (max-width: 420px) {
  .hero-cta .btn { flex: 1 1 100%; }
  .gauge .g-label { flex-basis: 100%; order: 3; }
  .gauge .g-label strong, .gauge .g-sub { white-space: normal; overflow-wrap: anywhere; }
}

/* reduced motion: the public face holds still too */
@media (prefers-reduced-motion: reduce) {
  .btn, .sd-tab, .copybtn, .preset { transition: none; }
}

/* ============================================================
   transparency layer (docs/design/transparency.md)
   the honest bill + the host card — appended, never edited above
   ============================================================ */

/* ---------- the honest bill ("where your fuel goes") ---------- */
.bill { padding: 0; }
.bill summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px;
}
.bill summary::-webkit-details-marker { display: none; }
.bill summary .b-title {
  font-family: var(--serif); font-size: 1.02rem; font-weight: 700; color: var(--ink);
}
.bill summary .b-sub { font-size: .8rem; color: var(--ink-3); }
.bill summary::after {
  content: "+"; margin-left: auto; color: var(--ink-3);
  font-family: var(--mono); font-size: 1rem; line-height: 1;
}
.bill[open] summary::after { content: "\2212"; }
.bill[open] summary { border-bottom: 1px dashed var(--line); }
.bill-body { padding: 6px 18px 16px; }
.bill-group { margin-top: 10px; }
.bill-group h5 {
  margin: 0 0 4px; font-family: var(--sans); font-size: .72rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
}
.bill-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 5px 0 1px;
}
.bill-row .b-what { font-size: .93rem; color: var(--ink); }
.bill-row .b-amt {
  font-family: var(--mono); font-size: .85rem; color: var(--fuel-2); white-space: nowrap;
}
.bill .b-note { margin: 0 0 6px; max-width: 44ch; }
.bill .b-foot { margin: 12px 0 0; border-top: 1px dashed var(--line); padding-top: 10px; }

/* ---------- the host card ("runs on") ---------- */
.hostcard .hc-who { margin: 0 0 6px; font-size: .95rem; color: var(--ink); }
.hostcard .hc-who code {
  font-family: var(--mono); font-size: .82rem; color: var(--ink-2);
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 5px;
}
.hostcard .hc-state {
  display: inline-block; margin: 0; padding: 3px 10px;
  border-radius: 999px; font-size: .78rem; font-family: var(--mono);
}
.hostcard .hc-run {
  color: var(--green-2); background: var(--green-soft);
  border: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
}
.hostcard .hc-stop {
  color: var(--moon-2); background: var(--moon-soft);
  border: 1px solid color-mix(in srgb, var(--moon) 40%, transparent);
}
