/* =============================================================================
   Payment collection page — shared stylesheet (mobile first, no framework)
   ============================================================================= */

:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --accent-purple: #7c3aed;
  --accent-pink: #db2777;
  --accent-pink-soft: #fdf2f8;
  --accent-teal: #0d9488;
  --accent-teal-soft: #f0fdfa;
  --accent-orange: #ea580c;
  --accent-orange-soft: #fff7ed;
  --grad-brand: linear-gradient(135deg, #4f46e5, #7c3aed 45%, #db2777);
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --success: #047857;
  --success-soft: #ecfdf5;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --info: #1d4ed8;
  --info-soft: #eff6ff;
  --neutral: #4b5563;
  --neutral-soft: #f3f4f6;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px -12px rgba(16, 24, 40, .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .75rem; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
p { margin: 0 0 1rem; }
code { font-family: var(--mono); font-size: .9em; background: var(--neutral-soft); padding: .1em .35em; border-radius: 4px; word-break: break-all; }
[hidden] { display: none !important; }

/* Layout --------------------------------------------------------------------- */
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 1rem; }
.container.narrow { max-width: 560px; }
.site-main { flex: 1; padding: 1.5rem 0 3rem; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; flex-wrap: wrap; padding-top: .5rem; padding-bottom: .5rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.05rem; }
.brand__mark { width: 28px; height: 28px; flex: none; display: block; }
.brand__tag { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); background: var(--primary-soft); padding: .15rem .45rem; border-radius: 999px; }
.admin-nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.admin-nav a { text-decoration: none; color: var(--text-muted); font-weight: 500; padding: .4rem .7rem; border-radius: var(--radius-sm); }
.admin-nav a:hover, .admin-nav a.is-active { color: var(--text); background: var(--neutral-soft); }
.inline-form { display: inline; margin: 0; }

.site-footer { border-top: 1px solid var(--border); padding: 1.25rem 0; font-size: .85rem; color: var(--text-muted); text-align: center; }
.site-footer p { margin: 0; }

/* Cards ---------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.25rem;
}
.card--center { text-align: center; }
.card--center .summary { text-align: left; }
@media (min-width: 640px) { .card { padding: 2rem; } }

.lead { font-size: 1.05rem; color: #374151; }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }
.text-center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 600; color: var(--text-muted); margin-bottom: .25rem; }
.lock-icon { color: var(--primary); margin-bottom: .5rem; }

/* Summary lists -------------------------------------------------------------- */
.summary { margin: 1.25rem 0; padding: 0; border-top: 1px solid var(--border); }
.summary > div { display: flex; flex-direction: column; gap: .15rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.summary dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; }
.summary dd { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 480px) {
  .summary > div { flex-direction: row; justify-content: space-between; gap: 1.5rem; }
  .summary dt { flex: 0 0 8rem; }
  .summary dd { text-align: right; }
}
.summary--inline { margin: 1rem auto; max-width: 420px; }
.amount { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Payment page --------------------------------------------------------------- */
.pay-card__head { margin-bottom: 1rem; }
.merchant { font-size: 1.35rem; margin: 0; }
.pay-card__amount { display: flex; align-items: baseline; gap: .5rem; padding: .5rem 0 1rem; }
.amount--hero { font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.currency-code { font-size: .85rem; font-weight: 600; color: var(--text-muted); letter-spacing: .05em; }

.payment-form { margin-top: 1.25rem; }
.payment-loading { display: flex; align-items: center; gap: .6rem; color: var(--text-muted); font-size: .95rem; padding: 1rem 0; }
.payment-element { min-height: 40px; margin-bottom: 1rem; }
.secure-note { display: block; text-align: center; font-size: .8rem; color: var(--text-muted); margin: .9rem 0 0; }
.secure-note svg { vertical-align: -2px; margin-right: .25rem; }

/* State screens (pay/success) ------------------------------------------------ */
.state { padding-top: 2rem; }
.state__icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.9rem; font-weight: 700; background: var(--neutral-soft); color: var(--neutral); }
.state .badge { margin-bottom: .75rem; }
.state-paid .state__icon { background: var(--success-soft); color: var(--success); }
.state-paid .state__icon::before { content: "\2713"; }
.state-processing .state__icon { background: var(--info-soft); color: var(--info); }
.state-pending .state__icon { background: var(--warning-soft); color: var(--warning); }
.state-pending .state__icon::before { content: "\25CB"; }
.state-failed .state__icon { background: var(--danger-soft); color: var(--danger); }
.state-failed .state__icon::before { content: "\2715"; }
.state-expired .state__icon { background: var(--neutral-soft); color: var(--neutral); }
.state-expired .state__icon::before { content: "\23F1"; }
.state-canceled .state__icon { background: var(--neutral-soft); color: var(--neutral); }
.state-canceled .state__icon::before { content: "\2298"; }
.state-notfound .state__icon { background: var(--neutral-soft); color: var(--neutral); }
.receipt { max-width: 460px; margin-left: auto; margin-right: auto; }

/* Badges --------------------------------------------------------------------- */
.badge { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .2rem .55rem; border-radius: 999px; line-height: 1.4; white-space: nowrap; background: var(--neutral-soft); color: var(--neutral); }
.badge-pending { background: var(--warning-soft); color: var(--warning); }
.badge-processing { background: var(--info-soft); color: var(--info); }
.badge-paid { background: var(--success-soft); color: var(--success); }
.badge-failed { background: var(--danger-soft); color: var(--danger); }
.badge-expired { background: var(--neutral-soft); color: var(--neutral); }
.badge-canceled { background: #f3f4f6; color: #4b5563; text-decoration: line-through; }

/* Alerts --------------------------------------------------------------------- */
.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid transparent; margin: 0 0 1rem; font-size: .95rem; text-align: left; overflow-wrap: anywhere; }
.alert-error { background: var(--danger-soft); border-color: #fecaca; color: #991b1b; }
.alert-success { background: var(--success-soft); border-color: #a7f3d0; color: #065f46; }
.alert-info { background: var(--info-soft); border-color: #bfdbfe; color: #1e40af; }

/* Buttons -------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; font-size: .95rem;
  padding: .65rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; line-height: 1.2; transition: background .15s, border-color .15s, color .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent-purple)); color: #fff; border: 0; }
.btn-primary:not(:disabled):hover { background: linear-gradient(135deg, var(--primary-hover), #6d28d9); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:not(:disabled):hover { border-color: #cbd5e1; background: #f8fafc; color: var(--text); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #fecaca; }
.btn-danger:not(:disabled):hover { background: var(--danger-soft); color: #991b1b; }
.btn-link { background: transparent; color: var(--primary); padding-left: .5rem; padding-right: .5rem; }
.btn-link:hover { color: var(--primary-hover); text-decoration: underline; }
.btn-small { font-size: .82rem; padding: .4rem .7rem; }
.btn-block { width: 100%; padding: .85rem 1rem; font-size: 1.05rem; }
.btn.is-copied { background: var(--success); border-color: var(--success); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }

.spinner { width: 1em; height: 1em; border: 2px solid rgba(0, 0, 0, .15); border-top-color: currentColor; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; flex: none; }
.btn-primary .spinner { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.spinner--lg { width: 30px; height: 30px; border-width: 3px; }
.redirecting { display: flex; align-items: center; justify-content: center; gap: .5rem; color: var(--muted, #6b7280); margin: 1rem 0 1.25rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Forms ---------------------------------------------------------------------- */
.form { margin-top: .5rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.field input, .field select, .field textarea, .filters input, .filters select, .link-box__input {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid #d1d5db; border-radius: var(--radius-sm); padding: .65rem .8rem;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 5rem; }
.field input:focus, .field select:focus, .field textarea:focus, .filters input:focus, .filters select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .18);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: .85rem; margin: .35rem 0 0; }
.field__hint { color: var(--text-muted); font-size: .85rem; margin: .35rem 0 0; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row .field--narrow { max-width: 10rem; }
  .field-row:has(.field--narrow) { grid-template-columns: 1fr 10rem; }
}

.link-box { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0 1.25rem; }
.link-box__input { font-family: var(--mono); font-size: .9rem; background: var(--neutral-soft); }
@media (min-width: 560px) { .link-box { flex-direction: row; } .link-box .btn { flex: none; } }

/* Dashboard ------------------------------------------------------------------ */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }

.stats { display: grid; grid-template-columns: 1fr; gap: .75rem; margin-bottom: 1.25rem; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .15rem; }
.stat__label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; }
.stat__value { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat__hint { font-size: .8rem; color: var(--text-muted); }

.filters { display: grid; grid-template-columns: 1fr; gap: .5rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .filters { grid-template-columns: 1fr auto auto auto; align-items: center; } .filters select { width: auto; min-width: 10rem; } }

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: .75rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); background: #fafafa; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fcfcfd; }
.table .num { text-align: right; white-space: nowrap; }
.table .actions { text-align: right; }
.table .cell-primary { font-weight: 600; }
.table .cell-desc { max-width: 22rem; }
.table .cell-error { color: var(--danger); }
.table time, .table td .small { white-space: nowrap; }

@media (max-width: 720px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: .5rem 0; border-bottom: 1px solid var(--border); }
  .table tr:last-child { border-bottom: 0; }
  /* Each cell becomes "LABEL …… value"; the value is wrapped in .cell so
     line breaks and inline markup keep working inside the flex row. */
  .table td { border: 0; padding: .35rem .9rem; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; text-align: right; }
  .table td::before { content: attr(data-label); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; text-align: left; flex: 0 0 6rem; padding-top: .15rem; }
  .table td .cell { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
  .table td .small { white-space: normal; }
  .table .cell-desc { max-width: none; }
  .table .actions .row-actions { justify-content: flex-end; }
  .link-box__input { font-size: 1rem; }   /* ≥16px avoids iOS Safari auto-zoom */
}

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.pagination__links { display: flex; gap: .5rem; }
.empty { padding: 2.5rem 1rem; }

/* Print (receipt) ------------------------------------------------------------ */
@media print {
  body { background: #fff; }
  .site-header, .site-footer, .no-print, .btn { display: none !important; }
  .card { box-shadow: none; border: 0; }
}

/* =============================================================================
   Homepage, subscription checkout and legal pages
   ============================================================================= */

/* Public navigation ---------------------------------------------------------- */
.public-nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.public-nav a:not(.btn) { text-decoration: none; color: var(--text-muted); font-weight: 500; padding: .4rem .7rem; border-radius: var(--radius-sm); }
.public-nav a:not(.btn):hover { color: var(--text); background: var(--neutral-soft); }
.public-nav .btn { margin-left: .35rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.1rem; margin-bottom: .6rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-links__admin { opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.btn-lg { padding: .9rem 1.4rem; font-size: 1.05rem; }
.btn-row--center { justify-content: center; }
.section-title { font-size: 1.6rem; text-align: center; margin-bottom: .35rem; }
.section-title::after { content: ""; display: block; width: 56px; height: 4px; margin: .55rem auto 0; border-radius: 2px; background: linear-gradient(90deg, var(--primary), var(--accent-pink)); }
.section-sub { text-align: center; margin-bottom: 1.5rem; }
.page-home .site-main { padding-top: 0; }

/* Hero ----------------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(60% 85% at 12% 18%, rgba(124, 58, 237, .16), transparent 62%),
    radial-gradient(52% 75% at 88% 12%, rgba(219, 39, 119, .13), transparent 60%),
    radial-gradient(55% 80% at 72% 95%, rgba(13, 148, 136, .13), transparent 60%),
    radial-gradient(40% 60% at 35% 100%, rgba(234, 88, 12, .10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border); padding: 3rem 0 2.5rem;
}
.hero .eyebrow { color: var(--accent-pink); }
.hero__inner { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); letter-spacing: -.02em; margin-bottom: 1rem;
  background: linear-gradient(92deg, #312e81, var(--primary) 35%, var(--accent-purple) 65%, var(--accent-pink));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--text); }
.hero .lead { font-size: 1.15rem; max-width: 34rem; }
.hero__note { margin-top: .75rem; }
.hero__card { display: none; }
@media (min-width: 880px) {
  .hero { padding: 4.5rem 0 4rem; }
  .hero__inner { grid-template-columns: 1.3fr 1fr; }
  .hero__card { display: flex; justify-content: center; }
}
.mini-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 1.9rem 1.8rem 1.6rem; min-width: 250px; transform: rotate(-2deg); position: relative; overflow: hidden; }
.mini-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--primary), var(--accent-purple), var(--accent-pink), var(--accent-orange)); }
.mini-card__label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 600; }
.mini-card__price { display: block; font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; margin: .3rem 0 .8rem; }
.mini-card__price small { font-size: 1rem; font-weight: 600; color: var(--text-muted); }
.mini-card__list { list-style: none; padding: 0; margin: 0; }
.mini-card__list li { padding: .3rem 0 .3rem 1.5rem; position: relative; color: #374151; }
.mini-card__list li::before { content: "\2713"; position: absolute; left: 0; color: var(--success); font-weight: 700; }

/* Features ------------------------------------------------------------------- */
.features { display: grid; grid-template-columns: 1fr; gap: 1rem; padding: 2.5rem 1rem; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--primary); border-radius: var(--radius); padding: 1.4rem 1.3rem; }
.feature h2 { font-size: 1.1rem; margin: .8rem 0 .4rem; }
.feature p { margin: 0; color: #4b5563; font-size: .95rem; }
.feature__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.feature:nth-child(2) { border-top-color: var(--accent-pink); }
.feature:nth-child(2) .feature__icon { background: var(--accent-pink-soft); color: var(--accent-pink); }
.feature:nth-child(3) { border-top-color: var(--accent-teal); }
.feature:nth-child(3) .feature__icon { background: var(--accent-teal-soft); color: var(--accent-teal); }
.feature:nth-child(4) { border-top-color: var(--accent-orange); }
.feature:nth-child(4) .feature__icon { background: var(--accent-orange-soft); color: var(--accent-orange); }

/* Pricing -------------------------------------------------------------------- */
.pricing { padding: 1.5rem 0 2.5rem; }
.price-card { border: 2px solid transparent; border-radius: 18px; box-shadow: var(--shadow); padding: 1.8rem 1.4rem;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--primary), var(--accent-pink) 60%, var(--accent-orange)) border-box; }
.badge-pop { background: var(--grad-brand); color: #fff; }
@media (min-width: 640px) { .price-card { padding: 2.2rem 2.4rem; } }
.price-card__head { text-align: center; padding-bottom: 1.2rem; border-bottom: 1px solid var(--border); margin-bottom: 1.2rem; }
.price-card__head h3 { font-size: 1.2rem; margin: .8rem 0 .3rem; }
.price-card__price { display: flex; align-items: baseline; justify-content: center; gap: .4rem; }
.check-list { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.check-list li { padding: .5rem 0 .5rem 1.8rem; position: relative; border-bottom: 1px dashed var(--border); }
.check-list li:last-child { border-bottom: 0; }
.check-list li::before { content: "\2713"; position: absolute; left: .2rem; top: .5rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: .8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* FAQ ------------------------------------------------------------------------ */
.faq { padding: 1rem 1rem 3rem; }
.faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .6rem; padding: 0 1rem; }
.faq__item summary { cursor: pointer; font-weight: 600; padding: .9rem 0; list-style: none; position: relative; padding-right: 2rem; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: .2rem; top: .7rem; font-size: 1.3rem; color: var(--text-muted); }
.faq__item[open] summary::after { content: "\2212"; color: var(--accent-pink); }
.faq__item[open] { border-color: #ddd6fe; }
.faq__item p { margin: 0 0 1rem; color: #374151; }
.cta-strip { text-align: center; margin-top: 2.5rem; padding: 2.2rem 1rem; background: var(--grad-brand); border-radius: var(--radius); }
.cta-strip p { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; color: #fff; }
.btn-cta { background: #fff; color: var(--primary); }
.btn-cta:not(:disabled):hover { background: #eef2ff; color: var(--primary-hover); }

/* Subscribe checkout --------------------------------------------------------- */
.form-step { border: 0; padding: 0; margin: 0 0 .5rem; min-width: 0; }
.field--check label { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .92rem; line-height: 1.45; cursor: pointer; }
.field--check-compact label { align-items: center; }
.field--check-compact input { margin-top: 0; }
.field--check input { width: 1.1rem; height: 1.1rem; margin-top: .2rem; flex: none; }
.step-summary { margin-bottom: .75rem; }
.field--after-gap { margin-bottom: 1.9rem; }
.field--check-compact { margin: .9rem 0 .25rem; }
.field--check-compact label { font-size: .82rem; color: var(--text-muted); }
.field--check-compact a { color: var(--primary); }

/* Legal pages ---------------------------------------------------------------- */
.legal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem 1.25rem 2rem; margin-bottom: 1.5rem; }
@media (min-width: 640px) { .legal { padding: 2.4rem 2.6rem 2.6rem; } }
.legal__head { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.legal h1 { font-size: 1.8rem; }
.legal h2 { font-size: 1.15rem; margin: 1.8rem 0 .5rem; }
.legal p, .legal li { color: #374151; }
.legal ul, .legal ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.legal li { margin-bottom: .35rem; }
.legal .model-text { margin: 1rem 0; padding: .9rem 1rem; background: var(--neutral-soft); border-left: 3px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .92rem; }
.legal .model-text p { margin: 0; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: .5rem 0 1rem; display: block; overflow-x: auto; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: .55rem .6rem; border-bottom: 1px solid var(--border); }
.legal-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); background: #fafafa; }
.legal-summary { margin-top: .5rem; }
.legal-summary dd { text-align: left; }
@media (min-width: 480px) { .legal-summary dd { text-align: right; } }

/* Stripe mode toggle (admin dashboard) --------------------------------------- */
.mode-panel { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1.1rem; margin-bottom: 1.25rem; background: var(--surface); }
.mode-panel--test { border-left: 5px solid var(--warning); }
.mode-panel--live { border-left: 5px solid var(--success); }
.mode-panel__info { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.mode-pill { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .05em; padding: .3rem .7rem; border-radius: 999px; white-space: nowrap; }
.mode-pill--test { background: var(--warning-soft); color: var(--warning); border: 1px solid #fcd34d; }
.mode-pill--live { background: var(--success-soft); color: var(--success); border: 1px solid #6ee7b7; }

/* Subscription checkout — full-bleed split layout ---------------------------- */
.page-subscribe { background: var(--surface); }   /* no grey frame anywhere — true edge-to-edge */
.page-subscribe .site-main { padding: 0; }
.page-subscribe .site-footer { background: var(--surface); }
.checkout { width: 100%; }
.checkout__grid { display: grid; grid-template-columns: 1fr; }
.checkout__summary {
  position: relative; overflow: hidden; color: #fff; padding: 2.2rem 1.6rem 1.8rem;
  background:
    radial-gradient(90% 90% at 85% 10%, rgba(255, 255, 255, .16), transparent 55%),
    radial-gradient(80% 80% at 10% 95%, rgba(234, 88, 12, .35), transparent 55%),
    linear-gradient(150deg, #4f46e5, #7c3aed 55%, #db2777);
  background-size: 200% 200%;
  animation: gradient-aurora 10s ease alternate infinite;
}
@keyframes gradient-aurora {
  0%   { background-position: 0% 50%;   filter: brightness(100%) saturate(100%); }
  25%  { background-position: 50% 0%;   filter: brightness(110%) saturate(120%); }
  50%  { background-position: 100% 50%; filter: brightness(120%) saturate(140%); }
  75%  { background-position: 50% 100%; filter: brightness(110%) saturate(120%); }
  100% { background-position: 0% 50%;   filter: brightness(100%) saturate(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .checkout__summary { animation: none; }
}
/* Back button (the checkout has no navbar) */
.checkout__back { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.6rem; width: fit-content;
  color: #fff; text-decoration: none; font-weight: 600; font-size: 1.05rem;
  padding: .5rem .95rem; margin-left: -.95rem; border: 0; border-radius: 999px; transition: background .15s; }
.checkout__back:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.checkout__back svg { flex: none; }
.checkout__summary > * { max-width: 380px; }   /* keep content readable on very wide screens */
.checkout__eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; font-weight: 600; color: rgba(255, 255, 255, .75); margin: 0 0 .5rem; }
.checkout__brand { font-size: clamp(1.45rem, 7.4vw, 1.9rem); letter-spacing: -.02em; color: #fff; margin: 0 0 1.3rem; white-space: nowrap; max-width: none; }
.checkout__plan { color: rgba(255, 255, 255, .85); margin: 0 0 1.4rem; font-weight: 500; }
.checkout__price { display: flex; align-items: baseline; gap: .45rem; margin-bottom: 1.6rem; }
.checkout__amount { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; line-height: 1; }
.checkout__interval { font-size: .85rem; font-weight: 600; color: rgba(255, 255, 255, .8); }
.checkout__perks { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.checkout__perks li { padding: .38rem 0 .38rem 1.8rem; position: relative; color: rgba(255, 255, 255, .95); }
.checkout__perks li::before { content: "\2713"; position: absolute; left: 0; top: .38rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: rgba(255, 255, 255, .22); font-size: .78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.checkout__note { font-size: .8rem; color: rgba(255, 255, 255, .75); margin: 0; }
.checkout__note a { color: #fff; }
.checkout__form { background: var(--surface); padding: 2.2rem 1.4rem 2.6rem; }
.checkout__form .payment-form { margin-top: 0; }
@media (max-width: 859px) {
  /* Compact summary on mobile: just the plan name and price. */
  .checkout__perks, .checkout__note { display: none; }
  .checkout__price { margin-bottom: 0; }
}
@media (min-width: 860px) {
  .checkout__grid { grid-template-columns: 2fr 3fr; min-height: 100vh; min-height: 100svh; }
  .checkout__summary { padding: 3.2rem clamp(2rem, 4.5vw, 5rem); display: flex; flex-direction: column; }
  .checkout__back { margin-bottom: 3.2rem; }
  .checkout__brand { font-size: clamp(1.7rem, 2vw + .3rem, 2.4rem); }
  .checkout__note { margin-top: auto; }
  .checkout__form { display: grid; place-items: center; padding: 3rem 2.6rem; }
  .checkout__form > form, .checkout__form > .alert { width: 100%; max-width: 480px; }
}
}
