:root {
  /* Brand tokens (same as the website, see design-system/verbapilot-ai/MASTER.md) */
  --bg: #fafaf8;
  --card: #ffffff;
  --text: #121316;
  --muted: #5c606b;
  --border: #e4e4df;
  --accent: #2457e6;
  --accent-text: #ffffff;
  --error: #b42318;
  --error-bg: #fdecea;
  color-scheme: light;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-latin-wght-normal.woff2') format('woff2');
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background-image:
    linear-gradient(to bottom, rgba(250, 250, 248, 0) 0%, #fafaf8 70%),
    linear-gradient(#e4e4df 1px, transparent 1px),
    linear-gradient(90deg, #e4e4df 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 32px 32px;
}

.card {
  width: 100%;
  max-width: 400px;
  padding: 32px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(18, 19, 22, 0.06), 0 12px 32px -16px rgba(18, 19, 22, 0.2);
}

.brand {
  display: inline-block;
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand span {
  color: var(--accent);
}

h1 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.sub {
  margin: 0 0 20px;
  color: var(--muted);
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 500;
  font-size: 14px;
}

label small {
  font-weight: 400;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

button,
.button {
  display: inline-block;
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--accent-text);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: progress;
}

button.secondary {
  width: auto;
  color: var(--text);
  background: transparent;
  border-color: var(--border);
}

.links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 0;
  font-size: 14px;
}

a {
  color: var(--accent);
  cursor: pointer;
}

.error {
  margin: 16px 0 0;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--error);
  background: var(--error-bg);
  border-radius: 8px;
}

.fallback {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}

.fallback summary {
  cursor: pointer;
}

.code-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.code-row code {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  font-size: 12.5px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 0 0 20px;
  font-size: 14px;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* --- Checkout --- */
.card.wide {
  max-width: 460px;
}

h2 {
  margin: 22px 0 10px;
  font-size: 16px;
}

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.plan {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.plan.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.plan input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.plan-name {
  font-size: 13px;
  color: var(--muted);
}

.plan-price {
  font-size: 19px;
  font-weight: 700;
}

.plan-note {
  font-size: 12.5px;
  color: var(--muted);
}

.perks {
  margin: 0 0 4px;
  padding-left: 20px;
  font-size: 14px;
  color: var(--muted);
}

.steps {
  padding-left: 20px;
  line-height: 1.9;
}

.steps code {
  padding: 1px 6px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.test-mode {
  margin: -10px 0 16px;
  padding: 6px 10px;
  font-size: 13px;
  color: #8a5a00;
  background: #fff4d6;
  border-radius: 6px;
}

@media (prefers-color-scheme: dark) {
  .test-mode {
    color: #ffd27a;
    background: #3a2f12;
  }
}

.small {
  font-size: 13px;
}

.spinner {
  width: 36px;
  height: 36px;
  margin: 8px 0 16px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 3s;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.or-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.or-heading::before,
.or-heading::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  font-weight: 400;
  cursor: pointer;
}

.check input {
  width: auto;
  margin-top: 3px;
}

.paypal-buttons {
  min-height: 50px;
}

.subs {
  margin: 0 0 16px;
  padding: 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.history {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
}

.history li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.history li span:last-child {
  color: var(--muted);
}

[hidden] {
  display: none !important;
}
