/* SPUTNIK #1 - LK design system.
   Loaded after Tailwind Play CDN runtime so tokens + base components
   override Tailwind's defaults where they overlap.

   Hard rules:
   - Short hyphen `-` only, never `-` (em-dash).
   - Self-hosted Manrope (body) + Fraunces (display) - no external font hosts.
   - Public class-name surface used by pages MUST stay stable:
     .btn-primary .btn-secondary .input .field-label .field-stack
     .card .tariff-card.is-selected .tab.is-active .alert-error
     .alert-success .alert-info .spinner .code-block
*/

/* ========================================================================= */
/* Fonts (self-hosted from Fontsource, subsetted woff2)                      */
/* ========================================================================= */

/* Manrope - Latin + Cyrillic, weights 300-800 */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/manrope-cyrillic-300.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/manrope-latin-300.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/manrope-cyrillic-400.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/manrope-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/manrope-cyrillic-500.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/manrope-latin-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/manrope-cyrillic-600.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/manrope-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/manrope-cyrillic-700.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/manrope-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/manrope-cyrillic-800.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/manrope-latin-800.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Fraunces - Latin only, for display headlines (LK is primarily Russian
   so we use Manrope cyrillic for body; the display utility is Latin-safe). */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin-500-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin-600-italic.woff2') format('woff2');
}

/* ========================================================================= */
/* Tokens - ported verbatim from the landing                                 */
/* ========================================================================= */

:root {
  /* surfaces */
  --bg: #0a0a0c;
  --bg-elev: #111114;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-hover: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-red: rgba(230, 57, 70, 0.45);

  /* brand red */
  --red: #e63946;
  --red-bright: #ff5666;
  --red-deep: #c1121f;
  --red-glow: rgba(230, 57, 70, 0.22);
  --red-glow-soft: rgba(230, 57, 70, 0.10);

  /* text */
  --text: #fafaf9;
  --text-secondary: #c2c2bd;
  --text-muted: #8a8a86;
  --text-faint: #5a5a57;

  /* status hues - desaturated to fit the dark palette */
  --green: #6ee7a0;
  --green-soft: rgba(110, 231, 160, 0.10);
  --green-border: rgba(110, 231, 160, 0.35);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.10);
  --amber-border: rgba(251, 191, 36, 0.35);

  /* shadows */
  --shadow-soft: 0 1px 0 rgba(255,255,255,0.04) inset, 0 30px 60px -30px rgba(0,0,0,0.6);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.05) inset, 0 24px 60px -28px rgba(0,0,0,0.7);
  --shadow-cta: 0 12px 40px -12px rgba(230,57,70,0.55), 0 0 0 1px rgba(255,255,255,0.08) inset;
  --shadow-cta-hover: 0 20px 60px -14px rgba(230,57,70,0.75), 0 0 0 1px rgba(255,255,255,0.14) inset;

  /* motion */
  --easing: cubic-bezier(0.32, 0.72, 0, 1);
  --easing-out: cubic-bezier(0.16, 1, 0.3, 1);
  --easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* focus */
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--red-bright);

  /* layout */
  --container: 1080px;
  --reading: 640px;
}

/* ========================================================================= */
/* Base                                                                       */
/* ========================================================================= */

html {
  color-scheme: dark;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.005em;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
}

/* Ambient radial gradient mirroring the landing's body::before. Anchored to
   fixed viewport so it stays put while content scrolls. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 50% 35% at 50% 0%, var(--red-glow-soft), transparent 60%),
    radial-gradient(ellipse 80% 40% at 90% 110%, rgba(230,57,70,0.06), transparent 60%);
}

/* All app content sits above the ambient layer. */
#app { position: relative; z-index: 1; }

/* Reasonable defaults for native elements Tailwind preflight does not cover
   on Play CDN runtime (most are covered, but explicit beats implicit). */
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; height: auto; }

/* ========================================================================= */
/* Focus                                                                      */
/* ========================================================================= */

:where(a, button, input, select, textarea, [tabindex]):focus {
  outline: none;
}
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 10px;
}
/* Pill buttons keep their full rounded ring. */
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  border-radius: 999px;
}

/* ========================================================================= */
/* Typography utilities                                                       */
/* ========================================================================= */

.display {
  font-family: 'Fraunces', 'Manrope', serif;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--red-bright);
  letter-spacing: -0.012em;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: -0.005em;
}

.small { font-size: 14px; color: var(--text-muted); }

/* Tabular numerals for monetary + traffic figures. */
.tabular { font-feature-settings: 'tnum' 1, 'cv02', 'cv03', 'cv04', 'cv11'; }

/* Page-level mount fade. Applied to <main id="page"> on every router render. */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: fadeUp 0.45s var(--easing-out) both; }

/* ========================================================================= */
/* Buttons                                                                    */
/* ========================================================================= */

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  transition:
    transform 0.4s var(--easing-out),
    background 0.3s var(--easing),
    box-shadow 0.5s var(--easing-out),
    border-color 0.3s var(--easing),
    opacity 0.2s linear;
  will-change: transform;
  min-height: 48px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-cta-hover);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  transition-duration: 100ms;
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: none;
}
.btn-secondary:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--border-red);
  transform: translateY(-2px);
}
.btn-secondary:active:not(:disabled) {
  transform: translateY(0);
}
.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
  min-height: 40px;
}

/* When a button needs to fill a column, pages add `w-full` (Tailwind).
   When they add `text-sm`, treat it as size-down. */
.btn-primary.text-sm,
.btn-secondary.text-sm {
  padding: 10px 18px;
  font-size: 13.5px;
  min-height: 40px;
}

/* ========================================================================= */
/* Inputs                                                                     */
/* ========================================================================= */

.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;            /* iOS no-zoom */
  line-height: 1.4;
  letter-spacing: -0.005em;
  min-height: 48px;
  transition: border-color 0.2s var(--easing), box-shadow 0.2s var(--easing), background 0.2s var(--easing);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.input::placeholder { color: var(--text-faint); }
.input:hover:not(:disabled) {
  border-color: rgba(255,255,255,0.22);
}
.input:focus {
  outline: none;
  border-color: var(--red-bright);
  background: var(--surface-hover);
  box-shadow: 0 0 0 4px var(--red-glow-soft);
}
.input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
/* Validate after user has interacted (modern :user-invalid pattern). */
.input:user-invalid {
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 0 3px rgba(248,113,113,0.15);
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.005em;
}

.field-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ========================================================================= */
/* Cards                                                                      */
/* ========================================================================= */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}
@media (max-width: 480px) {
  .card { padding: 20px; }
}

/* Hero card: amplified glow when subscription is active. */
.card-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.card-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 100% at 100% 0%, rgba(110,231,160,0.10), transparent 65%),
    radial-gradient(ellipse 80% 80% at 0% 100%, rgba(230,57,70,0.06), transparent 65%);
  pointer-events: none;
}

/* ========================================================================= */
/* Tariff cards                                                               */
/* ========================================================================= */

.tariff-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: border-color 0.25s var(--easing), background 0.25s var(--easing), box-shadow 0.25s var(--easing), transform 0.25s var(--easing-out);
  min-height: 64px;
}
.tariff-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-1px);
}
.tariff-card.is-selected {
  border-color: var(--red-bright);
  background: linear-gradient(180deg, rgba(230,57,70,0.07), rgba(230,57,70,0.02));
  box-shadow: 0 0 0 1px var(--red-bright), 0 0 28px var(--red-glow-soft);
}
.tariff-card input[type="radio"] {
  accent-color: var(--red);
  width: 18px;
  height: 18px;
  margin-right: 4px;
  cursor: pointer;
}

/* Tariff price - tabular numerals + slight uptick in size. */
.tariff-price {
  font-feature-settings: 'tnum' 1, 'cv02', 'cv03', 'cv04', 'cv11';
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ========================================================================= */
/* Tabs                                                                       */
/* ========================================================================= */

.tab {
  background: transparent;
  color: var(--text-muted);
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s var(--easing), background 0.2s var(--easing), border-color 0.2s var(--easing);
  min-height: 38px;
}
.tab:hover {
  color: var(--text);
  background: var(--surface);
}
.tab.is-active {
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--border-strong);
}

/* ========================================================================= */
/* Alerts                                                                     */
/* ========================================================================= */

.alert-error,
.alert-success,
.alert-info {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14.5px;
  line-height: 1.5;
  border: 1px solid transparent;
}
.alert-error {
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.18);
  border-color: rgba(248, 113, 113, 0.35);
}
.alert-success {
  color: var(--green);
  background: var(--green-soft);
  border-color: var(--green-border);
}
.alert-info {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: var(--amber-border);
}
.alert-success p,
.alert-info p,
.alert-error p { color: inherit; }
.alert-success a,
.alert-info a,
.alert-error a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ========================================================================= */
/* Code block (subscription URL)                                              */
/* ========================================================================= */

.code-block {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 12.5px;
  line-height: 1.5;
  word-break: break-all;
  color: var(--text-secondary);
  user-select: all;
}

/* ========================================================================= */
/* Spinner                                                                    */
/* ========================================================================= */

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--red-bright);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========================================================================= */
/* Header                                                                     */
/* ========================================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: rgba(10, 10, 12, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--easing), background 0.3s var(--easing);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 10, 12, 0.85);
}
.site-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px clamp(16px, 4vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(230,57,70,0.30));
  transition: transform 0.6s var(--easing-out), filter 0.5s var(--easing-out);
  will-change: transform;
}
.brand:hover .brand-mark {
  transform: rotate(-6deg) scale(1.06);
  filter: drop-shadow(0 4px 14px rgba(255,86,102,0.45));
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  color: var(--text-secondary);
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.2s var(--easing);
  padding: 6px 0;
}
.nav-link:hover { color: var(--text); }

/* Burger button - hidden on desktop, visible <=768. */
.burger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s var(--easing), border-color 0.2s var(--easing);
}
.burger:hover { background: var(--surface); border-color: var(--border-strong); }
.burger-icon {
  position: relative;
  width: 18px;
  height: 14px;
}
.burger-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s var(--easing), opacity 0.2s var(--easing), top 0.3s var(--easing);
}
.burger-icon span:nth-child(1) { top: 0; }
.burger-icon span:nth-child(2) { top: 6px; }
.burger-icon span:nth-child(3) { top: 12px; }
.burger.is-open .burger-icon span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.burger.is-open .burger-icon span:nth-child(2) { opacity: 0; }
.burger.is-open .burger-icon span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Drawer - slides down below the header on mobile. */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--easing), visibility 0.25s var(--easing);
  z-index: 40;
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 64px;
  left: 0; right: 0;
  z-index: 45;
  background: rgba(10, 10, 12, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px clamp(16px, 4vw, 28px) 24px;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s var(--easing), opacity 0.25s var(--easing), visibility 0.3s var(--easing);
}
.drawer.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer-nav a,
.drawer-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: background 0.2s var(--easing), border-color 0.2s var(--easing);
}
.drawer-nav a:hover,
.drawer-nav button:hover {
  background: var(--surface);
  border-color: var(--border);
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .burger { display: inline-flex; }
}

/* Lock body scroll when drawer open. */
body.drawer-open { overflow: hidden; }

/* ========================================================================= */
/* Page outlet + footer                                                       */
/* ========================================================================= */

.site-main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding:
    clamp(24px, 5vw, 40px)
    clamp(16px, 4vw, 24px)
    clamp(40px, 6vw, 64px);
  padding-left:  max(clamp(16px, 4vw, 24px), env(safe-area-inset-left));
  padding-right: max(clamp(16px, 4vw, 24px), env(safe-area-inset-right));
}

.site-footer {
  border-top: 1px solid var(--border);
  padding:
    24px
    clamp(16px, 4vw, 28px)
    calc(28px + env(safe-area-inset-bottom));
  font-size: 13px;
  color: var(--text-muted);
  background: transparent;
}
.site-footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: center;
}
.site-footer a {
  color: var(--text-muted);
  transition: color 0.2s var(--easing);
}
.site-footer a:hover { color: var(--text); }
.site-footer .sep { color: var(--text-faint); }

/* ========================================================================= */
/* Status pill - used by /me hero card                                        */
/* ========================================================================= */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid transparent;
  font-feature-settings: 'tnum' 1;
}
.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.status-pill.is-active {
  color: var(--green);
  background: var(--green-soft);
  border-color: var(--green-border);
}
.status-pill.is-expired {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: var(--amber-border);
}

/* ========================================================================= */
/* Success-check (payment-success page hero)                                  */
/* ========================================================================= */

.success-check {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  color: var(--green);
  box-shadow: 0 0 24px rgba(110,231,160,0.18);
}
.success-check svg { width: 32px; height: 32px; }

/* ========================================================================= */
/* QR frame                                                                   */
/* ========================================================================= */

.qr-frame {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 24px 60px -24px rgba(0,0,0,0.6),
    0 0 0 1px var(--border);
}
.qr-frame img { display: block; border-radius: 4px; }

/* ========================================================================= */
/* Reduced motion                                                             */
/* ========================================================================= */

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

/* ========================================================================= */
/* Print - keep dark text on white for receipts                               */
/* ========================================================================= */

@media print {
  body::before { display: none; }
  body { background: #fff; color: #111; }
  .site-header, .site-footer, .burger, .drawer, .drawer-backdrop { display: none !important; }
  .card { box-shadow: none; border-color: #ddd; }
}
