* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.45;
}

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: var(--signal-text); }

#app { min-height: 100dvh; }

.app {
  width: min(100%, 32rem);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.skip {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  transform: translateY(-200%);
  background: var(--card);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-s);
  z-index: 5;
}

.skip:focus { transform: none; }

.tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.tabs a {
  flex: 1;
  min-height: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  padding: 0.35rem 0.25rem 0.4rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}

.tabs a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--signal);
}

.icon { width: 1.375rem; height: 1.375rem; display: block; }

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  padding: var(--space-l) var(--space-m) var(--space-xxl);
}

h1, h2, p { margin: 0; }

h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1.display { font-size: clamp(1.75rem, 8vw, 2.125rem); }

h2 {
  font-family: var(--font-text);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--signal-text);
}

.muted { color: var(--text-muted); font-size: 0.8125rem; line-height: 1.4; }

.amount {
  font-family: var(--font-display);
  font-size: clamp(2rem, 10vw, 2.125rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.rate {
  font-family: var(--font-display);
  font-size: clamp(2rem, 10vw, 2.125rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: var(--space-m);
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.actions { display: flex; flex-direction: column; gap: var(--space-s); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary { background: var(--signal); color: var(--on-signal); }

.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }

.btn-text {
  background: transparent;
  color: var(--signal-text);
  min-height: 3rem;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.btn-inline { width: auto; min-height: 3rem; padding-inline: 1rem; }

.field { display: flex; flex-direction: column; gap: var(--space-s); }

.field > span { font-weight: 600; }

input, select, textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--card);
  color: var(--ink);
}

textarea { min-height: 6rem; resize: vertical; }

.note, .banner {
  background: var(--paper2);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 0.85rem 1rem;
}

.banner[data-kind="ok"] { border-color: var(--success); }

.illu {
  background: var(--paper2);
  border-radius: var(--radius-l);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.illu-wide { aspect-ratio: 4 / 3; width: 100%; }

.illu-square { aspect-ratio: 1 / 1; width: min(100%, 12.5rem); }

.dots {
  display: flex;
  justify-content: center;
  gap: 0;
}

.dot {
  width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
}

.dot::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--line);
}

.dot[aria-current="step"]::before {
  width: 1.35rem;
  background: var(--signal);
}

.group { display: flex; flex-direction: column; gap: var(--space-s); }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  min-height: 3.25rem;
  padding: 0.85rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  color: inherit;
  text-decoration: none;
}

.row b { font-weight: 600; }

.row .end {
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-align: right;
}

.pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 1.75rem;
  padding: 0.15rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--paper2);
  color: var(--ink);
}

.pill-signal { background: color-mix(in srgb, var(--signal) 32%, var(--card)); color: var(--ink); }

.pill-success { background: color-mix(in srgb, var(--success) 22%, var(--card)); color: var(--success); }

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

.toggle {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  min-height: 3rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.toggle input {
  width: 1.35rem;
  height: 1.35rem;
  min-height: 1.35rem;
  margin-top: 0.15rem;
  accent-color: var(--signal);
}

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }

.timeline li {
  display: grid;
  grid-template-columns: 1rem 1fr;
  column-gap: 0.75rem;
}

.timeline .mark {
  width: 0.75rem;
  height: 0.75rem;
  margin-top: 0.3rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--card);
}

.timeline .body { padding-bottom: 1rem; }

details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 0.35rem 1rem 0.85rem;
}

summary {
  min-height: 3rem;
  display: flex;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}

.letter {
  white-space: pre-wrap;
  font-family: var(--font-text);
  font-size: 0.95rem;
}

.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; overflow-wrap: anywhere; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--signal-text);
  outline-offset: 2px;
}

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

/* Login: the "check your email" and "signed in" blocks. */
.stack { display: flex; flex-direction: column; gap: var(--space-m); }
