:root {
  --ink: #1A1714;
  --saffron: #C9842A;
  --clay: #8A5A28;
  --paper: #F6F1E8;
  --sheet: #FFFCF7;
  --muted: #6B6156;
  --line: #E4D8C6;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a {
  color: var(--clay);
  text-decoration: none;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--sheet);
  border-radius: 8px;
}

.skip:focus {
  top: 10px;
}

.bar {
  padding-top: var(--safe-top);
  background: var(--sheet);
  border-bottom: 1px solid var(--line);
}

.bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(448px, 100%);
  margin: 0 auto;
  padding: 14px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}

.wallet-mark {
  display: block;
  flex-shrink: 0;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
}

.age {
  min-width: 40px;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--paper);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.intro,
.desk,
.notes,
.how,
.faq,
.foot,
.legal-hero,
.legal-wrap {
  width: min(448px, 100%);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.intro {
  padding-top: 22px;
  padding-bottom: 8px;
}

.kicker {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay);
}

.intro h1,
.legal-hero h1,
.how h2,
.faq h2 {
  font-size: clamp(1.45rem, 6.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.intro-text {
  margin-top: 8px;
  color: var(--muted);
}

.desk {
  margin-top: 16px;
  margin-bottom: 28px;
  padding: 20px 16px 18px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(26, 23, 20, 0.05);
}

.lbl {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--clay);
}

.lbl + .stepper + input + .ends + .lbl {
  margin-top: 18px;
}

.stepper {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.step {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
}

.step:disabled {
  opacity: 0.45;
}

.figure {
  margin: 0;
  font-size: clamp(1.35rem, 6.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  white-space: nowrap;
}

.figure-sm {
  font-size: clamp(1.15rem, 5.2vw, 1.45rem);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--saffron) var(--progress, 22%), var(--line) var(--progress, 22%));
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--sheet);
  box-shadow: 0 0 0 1px var(--saffron);
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 99px;
  background: var(--line);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid var(--sheet);
  background: var(--ink);
}

.ends {
  display: flex;
  justify-content: space-between;
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.note {
  margin: 16px 0 14px;
  font-size: 0.88rem;
  color: var(--muted);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}

.btn-ink {
  background: var(--ink);
  color: var(--sheet);
}

.btn-line {
  margin-top: 8px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn:disabled {
  opacity: 0.5;
}

.load {
  text-align: center;
  padding: 28px 8px 18px;
}

.sheet-spin {
  width: 42px;
  height: 52px;
  margin: 0 auto 14px;
  border: 2px solid var(--ink);
  border-radius: 3px 8px 3px 3px;
  background: var(--paper);
  position: relative;
  animation: flip 1.1s ease-in-out infinite;
}

.sheet-spin::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 12px;
  height: 2px;
  background: var(--saffron);
  box-shadow: 0 8px 0 var(--line), 0 16px 0 var(--line);
}

@keyframes flip {
  50% { transform: rotateY(180deg); }
}

.load-t {
  font-weight: 800;
}

.load-s {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.slip {
  text-align: center;
}

.slip-k {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clay);
}

.code {
  margin: 6px 0 14px;
  font-size: clamp(2.2rem, 12vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  padding-left: 0.16em;
  text-align: center;
}

.slip-rows {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.slip-rows p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.slip-rows span {
  color: var(--muted);
}

.notes {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.notes article {
  padding: 14px 16px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.notes h2,
.how h2,
.faq h2 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.notes p,
.how p {
  color: var(--muted);
  font-size: 0.92rem;
}

.how {
  margin-bottom: 28px;
}

.how ol {
  list-style: none;
  display: grid;
  gap: 12px;
}

.how li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: start;
}

.how span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--sheet);
  font-weight: 800;
}

.faq {
  margin-bottom: 12px;
}

.faq-item {
  margin-bottom: 8px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.faq-q {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.faq-a {
  display: none;
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.faq-item.is-open .faq-a {
  display: block;
}

.foot {
  padding: 24px 16px calc(36px + var(--safe-bottom));
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.foot-brand {
  margin-bottom: 8px;
  font-weight: 800;
  color: var(--ink);
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px;
  margin-top: 14px;
}

.legal-page {
  background: var(--paper);
}

.legal-hero {
  padding-top: 22px;
}

.back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--clay);
}

.legal-wrap {
  padding-bottom: 48px;
}

.legal-paper {
  padding: 22px 18px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.legal-paper h2 {
  margin: 22px 0 8px;
  font-size: 17px;
}

.legal-paper p,
.legal-paper li {
  color: var(--muted);
}

.legal-paper p + p,
.legal-paper ul {
  margin-top: 10px;
}

.legal-paper ul {
  padding-left: 18px;
}

@media (prefers-reduced-motion: reduce) {
  .sheet-spin {
    animation: none;
  }
}
