@font-face {
  font-family: Museo;
  src: url("museo.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #101217;
  --surface: #191e28;
  --inset: #131720;
  --ink: #f0f3f8;
  --muted: #aeb9ca;
  --rule: #363f50;
  --control: #64748b;
  --accent: #b5c9f1;
  --on-accent: #151f32;
  --error: #ffb5b2;
  --paid: #a8d7ba;
  font: 100%/1.5 Museo, "Segoe UI", sans-serif;
  background: var(--canvas);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }

body { margin: 0; }
[hidden] { display: none !important; }
h1, h2, p, dl, dd { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }

.shell {
  width: min(100% - clamp(32px, 7vw, 64px), 816px);
  margin-inline: auto;
}

.skip {
  position: fixed;
  top: 8px;
  inset-inline-start: 8px;
  padding: 8px 16px;
  background: var(--surface);
  transform: translateY(-150%);
}
.skip:focus { transform: translateY(0); }

.header, .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 68px;
}

.header { border-bottom: 1px solid var(--rule); }
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -.035em;
  text-decoration: none;
}
.wordmark span { color: var(--accent); }
.help {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
}
.help:hover { color: var(--ink); text-decoration: underline; }

main { padding-block: clamp(28px, 6vw, 56px) clamp(36px, 7vw, 72px); }
.intro { margin-bottom: 32px; }
.intro h1 {
  font-size: clamp(2rem, 1.42rem + 3vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.intro p { color: var(--muted); margin-top: 8px; }

.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 5vw, 40px);
}

.product-choice { grid-column: 1 / -1; }
.product-choice .method-label { margin-top: 0; }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend, h2 {
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 700;
  padding: 0;
  margin-bottom: 12px;
}

.icon-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.checkout-icon { flex: none; width: 20px; height: 20px; }
.icon-label .checkout-icon { color: var(--accent); }

.plans {
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.plan {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  min-height: 56px;
  cursor: pointer;
}
.plan:first-child { border-radius: 7px 7px 0 0; }
.plan:last-child { border-radius: 0 0 7px 7px; }
.plan + .plan { border-top: 1px solid var(--rule); }
.plan:has(:checked) { background: var(--surface); }
.plan input, .consent input {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.plan-price, dd { font-variant-numeric: tabular-nums; }
.plan-price { color: var(--muted); text-align: end; white-space: nowrap; }
.plan:has(:checked) .plan-price { color: var(--accent); }

.primary, .secondary, .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
}

.secondary {
  background: transparent;
  border-color: var(--control);
  color: var(--ink);
}
.text-button { background: transparent; color: var(--accent); padding-inline: 0; }
.text-button:hover { text-decoration: underline; }
.primary { background: var(--accent); color: var(--on-accent); font-weight: 700; }

.receipt {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 24px;
}
.receipt h2 { margin-bottom: 16px; }
.summary div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
dt { color: var(--muted); flex: none; }
dd { text-align: end; min-width: 0; }

.amount {
  display: block;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 1.5rem + 2.3vw, 2.75rem);
  letter-spacing: -.035em;
  line-height: 1.12;
}
.fine, .consent p, .footer { color: var(--muted); font-size: .875rem; }
.fine { margin-top: 8px; }
.method-label { display: block; margin: 16px 0 6px; font-size: .875rem; }
#method, #product {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--control);
  border-radius: 6px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.consent { border-top: 1px solid var(--rule); margin-block: 18px 12px; padding-top: 12px; }
.consent label { display: flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; }
.consent input { flex: none; }
.consent p { margin-inline-start: 28px; }
#create { width: 100%; }
.primary { gap: 12px; }
@media (hover: hover) and (pointer: fine) {
  .plan:hover { background: var(--surface); }
  .secondary:hover { background: var(--surface); border-color: var(--accent); }
  .primary:hover { background: #d2dffa; }
}

.invoice { width: min(100%, 460px); }
.invoice[hidden] { display: none; }
.invoice-status {
  border-bottom: 1px solid var(--rule);
  margin-bottom: 12px;
  padding-bottom: 12px;
}
.invoice[data-state="PAID"] .invoice-status,
.invoice[data-state="CLAIMED"] .invoice-status { color: var(--paid); }

@media (prefers-reduced-motion: no-preference) {
  .plan, .primary, .secondary { transition: background-color 140ms ease-out, border-color 140ms ease-out; }
  .primary:active, .secondary:active { transform: scale(.99); }
  .invoice:not([hidden]) { animation: receipt-in 180ms cubic-bezier(.2,.7,.2,1) both; }
  @keyframes receipt-in {
    from { opacity: .75; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
.order-id { overflow-wrap: anywhere; font-size: .875rem; }
.invoice-actions { display: grid; gap: 8px; margin-top: 16px; }
.error { color: var(--error); }
.error:not(:empty) { margin-top: 12px; }
.activation-guide {
  margin-top: clamp(28px, 5vw, 48px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.activation-guide h2 { margin-bottom: 16px; text-wrap: balance; }
.activation-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding-inline-start: 0;
  list-style: none;
  counter-reset: activation-step;
}
.activation-steps li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-content: start;
  align-items: baseline;
  gap: 4px 8px;
  counter-increment: activation-step;
}
.activation-steps li::before {
  content: counter(activation-step) ".";
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.activation-steps p {
  grid-column: 2;
  color: var(--muted);
  font-size: .9375rem;
}
.activation-steps p strong { color: var(--ink); }
.activation-complete {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--inset);
  color: var(--muted);
  font-size: .9375rem;
}
.activation-complete .checkout-icon,
.activation-complete strong { color: var(--paid); }
.footer { border-top: 1px solid var(--rule); }
.internal-prices { margin-block: 16px; font-variant-numeric: tabular-nums; }
.internal-prices dd { overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .checkout { grid-template-columns: minmax(0, 1fr); }
  .activation-steps { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

@media (max-width: 420px) {
  .header, .footer { min-height: 56px; }
  .receipt { padding: 16px; }
}

@media (max-width: 460px) {
  .summary div:last-child { flex-direction: column; gap: 4px; }
  .internal-prices div:last-child { flex-direction: row; gap: 12px; }
  .order-id { text-align: start; }
}
