/* Plain CSS with no build step and no JavaScript. The light/dark switch is
 * prefers-color-scheme only, since there is no script to drive a toggle.
 * Fonts fall back to the system stack. */

:root {
  color-scheme: light dark;

  --neutral-1: #fcfdfe;
  --neutral-2: #f8f9fa;
  --neutral-3: #eef0f3;
  --neutral-4: #e3e7ea;
  --neutral-7: #bbc1c7;
  --neutral-9: #788088;
  --neutral-10: #6a727a;
  --neutral-11: #5b6269;
  --neutral-12: #303438;
  --gold-8: #c4a749;
  --gold-10: #896e00;
  --gold-11: #765e00;

  --category-forest-deep: #3d7538;
  --category-forest-base: #67a461;
  --category-forest-light: #a9d6a4;
  --category-plum-deep: #532150;
  --category-plum-base: #7f467a;
  --category-plum-light: #ab7fa6;
  --category-copper-deep: #743900;
  --category-copper-base: #b25a00;
  --category-copper-light: #da976a;
  --category-jade-deep: #006958;
  --category-jade-base: #009b83;
  --category-jade-light: #7dcbb8;
  --category-brass-deep: #806a00;
  --category-brass-base: #b39612;
  --category-brass-light: #e2cd82;
  --category-cyan-deep: #006165;
  --category-cyan-base: #009197;
  --category-cyan-light: #79c2c5;
  --category-rust-deep: #963f2a;
  --category-rust-base: #cb6a52;
  --category-rust-light: #f4a996;
  --category-lapis-deep: #3774ae;
  --category-lapis-base: #61a2e2;
  --category-lapis-light: #b1d7ff;
  --category-teal-deep: #006a7c;
  --category-teal-base: #009ab4;
  --category-teal-light: #7fccdf;

  --color-bg-canvas: var(--neutral-2);
  --color-bg-sidebar: var(--neutral-3);
  --color-surface: #ffffff;
  --color-text: var(--neutral-12);
  --color-text-muted: var(--neutral-11);
  --color-border: var(--neutral-4);
  --color-border-strong: var(--neutral-7);
  --color-border-control: var(--neutral-9);
  --color-brand: #8f7400;
  --color-brand-hover: #83690a;
  --color-brand-text: var(--gold-11);
  --color-ring: var(--gold-10);

  --elevation-2:
    0 1px 1.5px rgb(38 43 51 / 0.05), 0 3px 6px -2px rgb(38 43 51 / 0.055),
    0 8px 18px -6px rgb(38 43 51 / 0.07);

  --font-sans: "Switzer", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius-xs: 0.25rem;
  --radius-md: 0.5rem;
  --radius-xl: 0.875rem;

  --rail-w: 26px;
  --rail-gap: 38px;
  --measure: 672px;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.025 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --neutral-1: #141517;
    --neutral-2: #1a1b1d;
    --neutral-3: #25282c;
    --neutral-4: #2d3238;
    --neutral-7: #515860;
    --neutral-9: #76808b;
    --neutral-10: #87919c;
    --neutral-11: #aeb5be;
    --neutral-12: #dee2e7;
    --gold-8: #876d00;
    --gold-11: #ccb366;

    --color-bg-canvas: var(--neutral-1);
    --color-bg-sidebar: var(--neutral-2);
    --color-surface: var(--neutral-2);
    --color-text-muted: var(--neutral-10);
    --color-brand: #ac8b00;
    --color-brand-hover: var(--gold-11);
    --color-ring: var(--gold-8);
    --elevation-2: none;

    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)'/%3E%3C/svg%3E");
  }
}

/* ---- base ---- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-bg-canvas);
  background-image: var(--grain);
  background-size: 140px 140px;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 40;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.muted {
  color: var(--color-text-muted);
}

.band {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}

.wrap {
  max-width: calc(var(--rail-w) + var(--rail-gap) + var(--measure));
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---- type scale ---- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.vlabel {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.headline {
  max-width: 22ch;
  font-size: clamp(2.2rem, 1.1rem + 4.1vw, 3.85rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.card-title {
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.021em;
  text-wrap: balance;
}

.finale-heading {
  max-width: 20ch;
  font-size: clamp(1.7rem, 1rem + 2.6vw, 2.55rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.026em;
  text-wrap: balance;
}

.lede {
  max-width: 48ch;
  font-size: 1.1875rem;
  line-height: 1.55;
}

.reassure {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.reassure a {
  text-underline-offset: 3px;
}
.reassure i {
  width: 3px;
  height: 3px;
  border-radius: 9999px;
  background: currentColor;
  opacity: 0.6;
}

/* ---- buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding-inline: 32px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 200ms cubic-bezier(0.2, 0, 0, 1);
}
.btn-primary {
  background: var(--color-brand);
  color: var(--color-surface);
}
.btn-primary:hover {
  background: var(--color-brand-hover);
}
.btn-ghost {
  height: 40px;
  padding-inline: 16px;
  color: var(--color-text);
}
.btn-ghost:hover {
  background: var(--color-bg-sidebar);
}

/* ---- launch-notification form ---- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.notify {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: 480px;
}
.field {
  flex: 1 1 220px;
  min-width: 0;
  height: 44px;
  padding-inline: 14px;
  border: 1px solid var(--color-border-control);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 15px;
}
.field::placeholder {
  color: var(--color-text-muted);
  opacity: 0.8;
}
.notify .btn {
  flex: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

/* Honeypot: off screen, out of the tab order and hidden from assistive tech,
 * so only bots fill it. Not display:none, which some bots skip. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- header ---- */

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg-canvas) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.top .band {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: 10px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.mk {
  flex: none;
  width: 19px;
  height: 19px;
  border: 1.5px solid var(--color-brand);
  border-radius: var(--radius-xs);
}

/* ---- hero ---- */

.hero {
  display: grid;
  align-items: center;
  gap: 32px;
  padding-block: 40px;
}
.pitch {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.pitch .eyebrow {
  color: var(--color-brand-text);
}
.vignettes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    padding-block: 64px;
  }
}

.vignette {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--elevation-2);
}
.vhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.fig {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 1.1rem + 2vw, 2.6rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
}
.fig sub {
  font-size: 0.5em;
  vertical-align: baseline;
  color: var(--color-text-muted);
}

.stack {
  display: flex;
  height: 17px;
  gap: 1.5px;
  overflow: hidden;
  border-radius: 9999px;
}
.stack span:nth-child(1) {
  flex: 52;
  background: var(--category-forest-base);
}
.stack span:nth-child(2) {
  flex: 26;
  background: var(--category-jade-base);
}
.stack span:nth-child(3) {
  flex: 14;
  background: var(--category-copper-base);
}
.stack span:nth-child(4) {
  flex: 8;
  background: var(--category-plum-base);
}

.legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.legend li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--color-text-muted);
}
.legend em {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 3px;
}
.legend li:nth-child(1) em {
  background: var(--category-forest-base);
}
.legend li:nth-child(2) em {
  background: var(--category-jade-base);
}
.legend li:nth-child(3) em {
  background: var(--category-copper-base);
}
.legend li:nth-child(4) em {
  background: var(--category-plum-base);
}
.legend b,
.rbar b {
  margin-left: auto;
  font-family: var(--font-mono);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}
.legend span,
.rbar span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rbars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rbar {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--color-text-muted);
}
.rbtrack {
  height: 7px;
  overflow: hidden;
  border-radius: 9999px;
  background: var(--color-border);
}
.rbtrack span {
  display: block;
  height: 100%;
  border-radius: 9999px;
  background: var(--color-brand);
}
.rbar b {
  text-align: right;
}

.localonly {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  font-size: 11.5px;
  color: var(--color-text-muted);
}
.localonly svg {
  flex: none;
  width: 13px;
  height: 13px;
  color: var(--color-brand);
}

/* ---- the stratified rail ---- */

.slot {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  column-gap: var(--rail-gap);
}
.rail {
  grid-column: 1;
  background: var(--band);
}
.card {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-block: 24px 32px;
}
.card .eyebrow {
  color: var(--ink);
}
.card .body {
  max-width: 58ch;
  font-size: 15.5px;
  color: var(--color-text-muted);
}

[data-hue="copper"] {
  --ink: var(--category-copper-deep);
  --band: var(--category-copper-base);
}
[data-hue="lapis"] {
  --ink: var(--category-lapis-deep);
  --band: var(--category-lapis-base);
}
[data-hue="forest"] {
  --ink: var(--category-forest-deep);
  --band: var(--category-forest-base);
}
[data-hue="teal"] {
  --ink: var(--category-teal-deep);
  --band: var(--category-teal-base);
}
[data-hue="brass"] {
  --ink: var(--category-brass-deep);
  --band: var(--category-brass-base);
}
[data-hue="cyan"] {
  --ink: var(--category-cyan-deep);
  --band: var(--category-cyan-base);
}
[data-hue="plum"] {
  --ink: var(--category-plum-deep);
  --band: var(--category-plum-base);
}
[data-hue="rust"] {
  --ink: var(--category-rust-deep);
  --band: var(--category-rust-base);
}
[data-hue="jade"] {
  --ink: var(--category-jade-deep);
  --band: var(--category-jade-base);
}

/* Dark uses the light tier for both ink and plate: base fails contrast on the
 * dark canvas. */
@media (prefers-color-scheme: dark) {
  [data-hue="copper"] {
    --ink: var(--category-copper-light);
    --band: var(--category-copper-light);
  }
  [data-hue="lapis"] {
    --ink: var(--category-lapis-light);
    --band: var(--category-lapis-light);
  }
  [data-hue="forest"] {
    --ink: var(--category-forest-light);
    --band: var(--category-forest-light);
  }
  [data-hue="teal"] {
    --ink: var(--category-teal-light);
    --band: var(--category-teal-light);
  }
  [data-hue="brass"] {
    --ink: var(--category-brass-light);
    --band: var(--category-brass-light);
  }
  [data-hue="cyan"] {
    --ink: var(--category-cyan-light);
    --band: var(--category-cyan-light);
  }
  [data-hue="plum"] {
    --ink: var(--category-plum-light);
    --band: var(--category-plum-light);
  }
  [data-hue="rust"] {
    --ink: var(--category-rust-light);
    --band: var(--category-rust-light);
  }
  [data-hue="jade"] {
    --ink: var(--category-jade-light);
    --band: var(--category-jade-light);
  }
}

/* ---- finale band: fixed gold, identical in both themes ---- */

.finale {
  margin-top: 12px;
  background: #201900;
  color: #f0e2b6;
}
.finale .band {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding-block: 40px;
}
.finale .lede {
  max-width: 46ch;
  opacity: 0.9;
}
.finale .reassure {
  opacity: 0.8;
}
.finale .btn-primary {
  min-height: 52px;
  padding-inline: 28px;
  font-size: 15px;
  background: #ac8b00;
  color: #1a1b1d;
}
.finale .btn-primary:hover {
  background: #ccb366;
}
.finale :focus-visible {
  outline-color: #f0e2b6;
}
.finale .field {
  height: 52px;
  border-color: #8a7a4a;
  background: #161200;
  color: #f0e2b6;
}
.finale .field::placeholder {
  color: #f0e2b6;
  opacity: 0.55;
}

@media (min-width: 768px) {
  .finale {
    margin-top: 28px;
  }
  .finale .band {
    padding-block: 64px;
  }
}

/* ---- footer ---- */

.bottom {
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-muted);
}
.bottom .band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  padding-block: 24px 40px;
}
.bottom .wordmark {
  margin-right: 0;
  font-size: 13px;
}
.bottom a {
  color: var(--color-text-muted);
  text-decoration: none;
  text-underline-offset: 3px;
}
.bottom a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

/* ---- prose pages (privacy, thanks, errors, 404) ---- */

.prose {
  max-width: 720px;
  margin-inline: auto;
  padding: 48px 24px 64px;
}
.prose h1 {
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.026em;
}
.prose h2 {
  margin-top: 36px;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.018em;
}
.prose p,
.prose ul {
  max-width: 64ch;
  margin-top: 12px;
  color: var(--color-text-muted);
}
.prose ul {
  padding-left: 20px;
}
.prose li + li {
  margin-top: 6px;
}
.prose strong {
  color: var(--color-text);
  font-weight: 600;
}
.prose a {
  color: var(--color-brand-text);
  text-underline-offset: 3px;
}
.prose .asof {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- phone width ---- */

@media (max-width: 640px) {
  .band,
  .wrap {
    padding-inline: 16px;
  }
  .prose {
    padding-inline: 16px;
  }
  .slot {
    grid-template-columns: minmax(0, 1fr);
  }
  .rail {
    display: none;
  }
  .card {
    grid-column: 1;
    border-inline-start: 3px solid var(--band);
    padding-inline-start: 14px;
  }
  .btn {
    padding-inline: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}

/* Expense bar widths live here, not in style= attributes, so the CSP can keep
 * style-src to 'self'. */
.rbar:nth-child(1) .rbtrack span {
  width: 100%;
}
.rbar:nth-child(2) .rbtrack span {
  width: 33%;
}
.rbar:nth-child(3) .rbtrack span {
  width: 18%;
}
.rbar:nth-child(4) .rbtrack span {
  width: 7%;
}
