:root {
  color-scheme: light;
  --canvas: #f8fafc;
  --surface: #ffffff;
  --sunken: #f1f5f9;
  --line: #e2e8f0;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #475569;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --brand-soft: #f0fdfa;
  --brand-wash: #ccfbf1;
  --on-brand: #ffffff;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", system-ui, sans-serif;
  --shadow: 0 1px 2px rgb(15 23 42 / 6%), 0 12px 32px rgb(15 23 42 / 6%);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --canvas: #0c1222;
    --surface: #162033;
    --sunken: #243247;
    --line: #2c3e58;
    --ink: #f1f5f9;
    --ink-soft: #e2e8f0;
    --muted: #94a3b8;
    --brand: #2dd4bf;
    --brand-dark: #5eead4;
    --brand-soft: #042f2e;
    --brand-wash: #115e59;
    --on-brand: #042f2e;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px rgb(0 0 0 / 28%);
  }
}

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

html {
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--brand-dark);
}

a:hover {
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 16px;
  top: 8px;
  z-index: 2;
  transform: translateY(-150%);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
}

.skip:focus {
  transform: none;
}

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin-inline: auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
}

.button,
.link-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.button {
  background: var(--brand);
  color: var(--on-brand);
}

.button:hover {
  background: var(--brand-dark);
}

.link-quiet {
  color: var(--ink-soft);
}

.link-quiet:hover {
  color: var(--ink);
}

.button-ghost {
  background: transparent;
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px var(--line);
}

.button-ghost:hover {
  background: var(--brand-soft);
}

.hero {
  padding: 64px 0 32px;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, var(--brand-wash), transparent 55%),
    var(--canvas);
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.kicker {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
.amount {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  text-wrap: balance;
}

.lead,
.section p,
.limits p,
.closing p {
  color: var(--ink-soft);
  text-wrap: pretty;
}

.lead {
  margin: 20px 0 0;
  font-size: 1.2rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.fine {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.screen {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--sunken);
  box-shadow: var(--shadow);
}

.card {
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
  outline: 1px solid var(--line);
}

.card + .card {
  margin-top: 12px;
}

.card-label,
.rows dt,
.progress-note {
  color: var(--muted);
  font-size: 0.875rem;
}

.month {
  margin: 0 0 8px;
  font-weight: 600;
}

.card-label {
  margin: 0;
}

.amount {
  margin: 4px 0 12px;
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.bar span {
  display: block;
  width: 60%;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.progress-note {
  margin: 8px 0 0;
}

.rows {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  margin: 12px 0 0;
}

.rows dt {
  font-weight: 400;
}

.rows div {
  display: contents;
}

.rows dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.rows .total dt,
.rows .total dd {
  color: var(--ink);
  font-weight: 700;
}

.caption {
  margin: 12px 4px 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.band {
  padding: 64px 0;
}

.band-sunken {
  background: var(--sunken);
}

h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  text-wrap: balance;
}

.section-intro {
  max-width: 40rem;
  margin: 12px 0 0;
}

.steps {
  display: grid;
  gap: 20px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

section[id] {
  scroll-margin-top: 88px;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  align-content: start;
}

.steps span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 700;
}

.steps h3 {
  margin: 6px 0 4px;
  font-size: 1.125rem;
}

.steps p,
.points p {
  margin: 0;
}

.points {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}

.points h3 {
  margin: 0 0 6px;
  font-size: 1.125rem;
}

.limits {
  padding-bottom: 32px;
}

.note {
  margin-top: 20px;
  padding: 20px;
  border-radius: 16px;
  background: var(--brand-soft);
}

.note p {
  margin: 0;
}

.note p + p {
  margin-top: 12px;
}

.closing {
  padding: 32px 0 72px;
}

.closing .wrap {
  padding: 32px 24px;
  border-radius: 24px;
  background: var(--brand-soft);
}

.closing h2 {
  max-width: 18ch;
}

.foot {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.foot a {
  color: var(--ink-soft);
}

.missing {
  padding: 72px 0 96px;
}

.missing h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

@media (min-width: 800px) {
  .hero {
    padding: 88px 0 48px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 64px;
  }

  .steps,
  .points {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps li {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .wrap {
    width: min(1080px, calc(100% - 24px));
  }

  .nav {
    gap: 8px;
  }

  .brand {
    gap: 8px;
    font-size: 0.95rem;
  }

  .nav .button,
  .nav .link-quiet {
    padding-inline: 10px;
  }
}

@media (max-width: 340px) {
  .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (forced-colors: active) {
  .button,
  .card,
  .screen,
  .note {
    border: 1px solid ButtonText;
  }
}
