/* Birth Scribe Portal — Design System */

:root {
  --bg: #f5f5f9;
  --card: #ffffff;
  --fg: #1a1a2e;
  --muted: #6b6b80;
  --accent: #C33363;
  --accent-hover: #a82955;
  --accent-light: #fdf0f4;
  --accent-soft: linear-gradient(135deg, #fdf0f4 0%, #f0f2fc 100%);
  --success: #2b8a3e;
  --success-light: #edfcf0;
  --warning: #e67700;
  --warning-light: #fff8e6;
  --danger: #c92a2a;
  --danger-light: #fff0f0;
  --border: #e9ecef;
  --radius: 12px;
  --radius-pill: 999px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Menlo', 'Consolas', monospace;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.08);
  --max-w: 1120px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Inter — self-hosted */
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-ExtraBold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); color: var(--fg); background: var(--bg); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }

/* Layout */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page-body { flex: 1; padding: 48px 0; }

/* Header */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); padding: 16px 0; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-header .logo { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 18px; color: var(--fg); }
.site-header .logo img { width: 32px; height: auto; }
.site-header nav { display: flex; align-items: center; gap: 24px; }
.site-header nav a { color: var(--muted); font-size: 14px; font-weight: 500; }
.site-header nav a:hover { color: var(--accent); }
.site-header .nav-icon { display: flex; align-items: center; color: var(--muted); }
.site-header .nav-icon:hover { color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: auto; }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.site-footer .copyright { color: var(--muted); font-size: 14px; }
.site-footer .links { display: flex; gap: 24px; }
.site-footer .links a { color: var(--muted); font-size: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 28px; border-radius: var(--radius-pill); font-size: 15px; font-weight: 600; font-family: var(--font-body); cursor: pointer; border: 2px solid transparent; transition: all .15s ease; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent-light); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--fg); background: var(--border); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { opacity: .9; }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-loading-wrap { position: relative; }
.btn-text-hidden { visibility: hidden; }
.btn-spinner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.card-body { color: var(--muted); font-size: 15px; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--fg); }
.form-input { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 15px; font-family: var(--font-body); background: var(--card); color: var(--fg); transition: border-color .15s; }
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.form-input.error { border-color: var(--danger); }
.form-error { color: var(--danger); font-size: 13px; margin-top: 4px; }

/* Alerts */
.alert { padding: 14px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 500; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; }
.alert-success { background: var(--success-light); color: var(--success); }
.alert-warning { background: var(--warning-light); color: var(--warning); }
.alert-danger { background: var(--danger-light); color: var(--danger); }
.btn-dismiss { background: none; border: none; font-size: 20px; cursor: pointer; color: inherit; padding: 0 0 0 12px; line-height: 1; opacity: .6; }
.btn-dismiss:hover { opacity: 1; }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 32px; }
.tab { padding: 12px 24px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; background: none; border-top: none; border-left: none; border-right: none; font-family: var(--font-body); }
.tab:hover { color: var(--accent); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
td { color: var(--fg); }

/* Badge */
.badge { display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-muted { background: var(--border); color: var(--muted); }

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-sm { font-size: 14px; }
.text-lg { font-size: 18px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.mb-sm { margin-bottom: 4px; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.hidden { display: none; }

/* Responsive */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .page-body { padding: 24px 0; }
  .site-header nav { gap: 16px; }
  .btn { padding: 10px 20px; font-size: 14px; }
  h1 { font-size: 26px !important; }
  h2 { font-size: 22px !important; }
}

/* Phone Mockup */
.phone-mockup {
  width: 260px;
  height: 380px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  margin: 0 auto;
}

.phone-mockup .phone-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 2px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  height: 28px;
}

.phone-mockup .phone-topbar svg { width: 14px; height: 14px; }

.phone-mockup .phone-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 8px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .5px;
}

.phone-mockup .phone-divider::before,
.phone-mockup .phone-divider::after {
  content: '';
  flex: 1;
  height: .5px;
  background: var(--border);
}

.phone-mockup .phone-event {
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  font-size: 10px;
  align-items: flex-start;
}

.phone-mockup .phone-event:nth-child(odd) { background: var(--bg); }

.phone-mockup .phone-event-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 32px;
}

.phone-mockup .phone-event-icon svg { width: 10px; height: 10px; }

.phone-mockup .phone-event-time {
  font-size: 7px;
  font-family: var(--font-mono);
  color: var(--muted);
}

.phone-mockup .phone-event-text { font-size: 10px; line-height: 1.3; }
.phone-mockup .phone-event-type { font-size: 8px; font-weight: 600; color: var(--accent); }

.phone-mockup .phone-transcript {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--card);
  border-top: 1px solid var(--border);
  font-size: 10px;
}

.phone-mockup .phone-mic-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

.phone-mockup .phone-pause-btn {
  background: var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Onboarding carousel */
.onboarding-carousel { text-align: center; padding: 48px 0; }

.onboarding-steps {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.onboarding-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 280px;
}

.onboarding-step-label {
  font-size: 18px;
  font-weight: 700;
}

.onboarding-step-sub {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}

.onboarding-step-caption {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* Animation keyframes for onboarding */
@keyframes type-word {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-in-right {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slide-in-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slide-in-top {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes swipe-left {
  from { transform: translateX(0); }
  to { transform: translateX(-52px); }
}

.phone-mockup .anim-slide-right {
  animation: slide-in-right .4s ease-out forwards;
}

.phone-mockup .anim-slide-up {
  animation: slide-in-up .4s ease-out forwards;
}

.phone-mockup .anim-slide-top {
  animation: slide-in-top .4s ease-out forwards;
}

/* Birth clock card inside phone */
.birth-clock-card {
  margin: 4px 6px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1.5px solid rgba(201,42,42,.3);
  background: var(--card);
  animation: slide-in-top .4s ease-out forwards;
}

.birth-clock-card .birth-clock-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 8px;
  font-weight: 700;
  color: var(--danger);
}

.birth-clock-card .birth-clock-title svg { width: 8px; height: 8px; }

.birth-clock-card .birth-clock-time {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin: 2px 0;
}

.birth-clock-card .birth-clock-reminders {
  font-size: 8px;
  color: var(--muted);
}

/* TTS notification banner */
.tts-banner {
  position: absolute;
  bottom: 38px;
  left: 6px;
  right: 6px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: slide-in-up .3s ease-out forwards;
}

.tts-banner svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Review screen inside phone */
.phone-review-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 12px;
}

.phone-review-nav .cancel { color: #007aff; }
.phone-review-nav .title { font-weight: 600; }
.phone-review-nav .mark-reviewed { color: #2b8a3e; font-weight: 600; }

.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  margin: 8px 12px;
  background: #fff8e6;
  color: var(--warning);
}

.confidence-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); }

.phone-transcription {
  margin: 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  background: var(--card);
}

.phone-audio-player {
  margin: 12px;
  padding: 8px 12px;
  background: var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.phone-audio-player svg { width: 14px; height: 14px; color: var(--accent); }

/* PDF mockup */
.phone-pdf-doc {
  margin: 10px 20px;
  padding: 12px;
  background: #f8f8f8;
  border-radius: 3px;
  border: .5px solid rgba(0,0,0,.1);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.phone-pdf-bar {
  height: 5px;
  border-radius: 2px;
  margin-bottom: 4px;
}

.phone-pdf-btns {
  display: flex;
  gap: 8px;
  padding: 8px 20px 12px;
}

.phone-pdf-btn {
  flex: 1;
  text-align: center;
  padding: 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.phone-pdf-btn svg { width: 10px; height: 10px; }

/* Swipe reveal */
.swipe-container { position: relative; overflow: hidden; margin: 0 6px; border-radius: 4px; }

.swipe-reveal-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 52px;
  background: var(--accent);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 8px;
  font-weight: 600;
}

.swipe-reveal-bg svg { width: 10px; height: 10px; }

.swipe-content {
  position: relative;
  background: var(--card);
  transition: transform .5s ease;
}

.swipe-content.swiped { transform: translateX(-52px); }

/* Center logo in empty space */
.phone-center-logo {
  display: flex;
  justify-content: center;
  padding: 16px 0;
  opacity: .4;
}

.phone-center-logo img { width: 32px; height: 32px; }

@media (max-width: 640px) {
  .onboarding-steps { flex-direction: column; align-items: center; gap: 40px; }
  .onboarding-step { max-width: 300px; }
}

/* Policy Content (privacy, terms) */
.policy-content { line-height: 1.75; color: var(--fg); }
.policy-content h1 { font-size: 28px; margin-bottom: 4px; }
.policy-content h2 { font-size: 20px; margin-top: 36px; margin-bottom: 12px; color: var(--fg); }
.policy-content h3 { font-size: 17px; margin-top: 24px; margin-bottom: 8px; }
.policy-content p { margin-bottom: 16px; }
.policy-content ul { margin-bottom: 16px; padding-left: 24px; }
.policy-content li { margin-bottom: 6px; }
.policy-content hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.policy-content .table-wrap { margin-bottom: 20px; }
.policy-content table { margin-bottom: 0; font-size: 14px; }
.policy-content th { font-size: 11px; }
.policy-content a { color: var(--accent); }
.policy-content strong { font-weight: 600; }
.policy-content em { font-style: italic; color: var(--muted); }
@media (max-width: 640px) {
  .policy-content h1 { font-size: 22px; }
  .policy-content h2 { font-size: 17px; margin-top: 28px; }
  .policy-content .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: center;
}

.pricing-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  box-shadow: var(--shadow);
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: scale(1.04);
  z-index: 1;
}

.pricing-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.pricing-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}

.pricing-amount {
  font-size: 42px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}

.pricing-original {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}

.pricing-original s {
  color: var(--muted);
  opacity: 0.6;
}

.pricing-discount {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--warning);
  margin-bottom: 8px;
}

.pricing-savings {
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
  margin-bottom: 20px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  font-size: 14px;
  color: var(--muted);
  line-height: 2.2;
  margin-bottom: 28px;
  width: 100%;
  padding: 0;
}

.pricing-features li::before {
  content: '\2713';
  color: var(--success);
  font-weight: 700;
  margin-right: 8px;
}

@media (max-width: 720px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
  .pricing-card.featured {
    transform: none;
  }
}

/* ── Embedded Checkout ── */

.checkout-form {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.checkout-back {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 24px;
}
.checkout-back:hover {
  color: var(--fg);
}

.checkout-plan-summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0 24px;
  text-align: center;
}

.checkout-plan-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
}

.checkout-plan-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  margin: 8px 0 4px;
}

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

.payment-element-loading {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  margin-bottom: 24px;
}
.payment-element-loading p {
  margin-top: 12px;
  font-size: 14px;
}

/* Stripe Payment Element iframe styling via appearance API — container gets out of the way */
#payment-element {
  margin-bottom: 24px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.checkout-processing {
  text-align: center;
  padding: 60px 0;
}

.checkout-error {
  text-align: center;
  padding: 60px 0;
}

/* ── Layout Containers ── */

.container-narrow { max-width: 420px; }
.container-sm { max-width: 480px; }
.container-text { max-width: 520px; }
.container-mid { max-width: 560px; }
.container-content { max-width: 640px; }
.container-wide { max-width: 860px; }

/* ── Typography ── */

.heading-xs { font-size: 14px; font-weight: 600; }
.heading-sm { font-size: 16px; font-weight: 600; }
.heading-md { font-size: 20px; font-weight: 700; }
.heading-lg { font-size: 22px; font-weight: 700; }
.heading-xl { font-size: 24px; font-weight: 700; }
.heading-2xl { font-size: 28px; font-weight: 700; }
.heading-hero { font-size: 40px; font-weight: 800; line-height: 1.2; }
.text-xs { font-size: 12px; }
.text-13 { font-size: 13px; }
.text-base { font-size: 15px; }
.text-md { font-size: 16px; }
.text-xl { font-size: 18px; }
.text-2xl { font-size: 20px; }
.text-3xl { font-size: 24px; }
.text-4xl { font-size: 28px; }
.text-hero { font-size: 40px; font-weight: 800; line-height: 1.2; }
.text-line-2 { line-height: 1.5; }
.text-line-16 { line-height: 1.6; }
.text-line-175 { line-height: 1.75; }
.text-line-2-2 { line-height: 2; }
.font-weight-600 { font-weight: 600; }
.font-weight-700 { font-weight: 700; }
.font-weight-800 { font-weight: 800; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-fg { color: var(--fg); }
.text-strike { text-decoration: line-through; }

/* ── Spacing Utilities ── */

.mt-0 { margin-top: 0; } .mt-5 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-5 { margin-bottom: 40px; }
.ml-1 { margin-left: 4px; }
.mr-1 { margin-right: 6px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.pt-section { padding-top: 64px; } .pb-section { padding-bottom: 64px; }
.py-section { padding-top: 64px; padding-bottom: 64px; }
.py-hero { padding-top: 80px; padding-bottom: 80px; }
.gap-0 { gap: 0; } .gap-sm { gap: 4px; } .gap-3 { gap: 24px; } .gap-4 { gap: 32px; } .gap-5 { gap: 40px; }

/* ── Flex Utilities ── */

.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.flex-col-gap-12 { display: flex; flex-direction: column; gap: 12px; }
.flex-center-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* ── Alignment ── */

.text-left { text-align: left; }
.text-right { text-align: right; }

/* ── Background Sections ── */

.bg-card { background: var(--card); }
.bg-accent-light { background: var(--accent-light); }
.bg-hero-gradient { background: linear-gradient(180deg, var(--card) 0%, var(--bg) 100%); }

/* ── Section (homepage) ── */

.section-card { padding: 64px 0; background: var(--card); }
.section-default { padding: 64px 0; }
.section-hero { padding: 80px 0; text-align: center; background: linear-gradient(180deg, var(--card) 0%, var(--bg) 100%); }

/* ── Status Message (subscription mgmt) ── */

.mgmt-status-success { color: var(--success); }
.mgmt-status-error { color: var(--danger); }

/* ── Card Panel (card update / payment form) ── */

.card-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.card-panel-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; }

/* ── Action Row (subscription buttons) ── */

.action-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.action-separator { color: var(--border); margin: 0 4px; }

/* ── Cancel Link (text button) ── */

.btn-cancel-link {
  font-size: 13px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
}

/* ── Badge Row (subscription status badges) ── */

.badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

/* ── Download Row ── */

.download-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── FAQ Accordion ── */

.faq-item { cursor: pointer; }
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-toggle { color: var(--muted); font-size: 20px; }
.faq-answer {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ── Example Card (command examples on homepage) ── */

.example-card { padding: 16px 20px; }
.example-cmd { font-size: 15px; font-weight: 600; color: var(--fg); }
.example-note { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── Beta Step Card ── */

.step-card {
  padding: 20px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.step-title { font-size: 16px; font-weight: 600; }
.step-body { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.btn-block { width: 100%; white-space: nowrap; }

/* ── Quick Reference (beta page) ── */

.quick-ref {
  margin-top: 36px;
  padding: 16px 20px;
  background: var(--accent-light);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.quick-ref-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.quick-ref-body { font-size: 13px; color: var(--muted); line-height: 2; }
.quick-ref-body code { color: var(--fg); }

/* ── Logo Hero (centered logo image) ── */

.logo-hero { width: 80px; height: auto; margin: 0 auto 24px; }
.logo-sm { width: 64px; height: auto; margin: 0 auto 16px; }
.logo-inline { width: 18px; height: 18px; margin-right: 6px; vertical-align: middle; }

/* ── Page Header (centered h1 + subtext) ── */

.page-header { text-align: center; margin-bottom: 32px; }

/* ── Auth Checkbox Label ── */

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] { margin-top: 2px; accent-color: var(--accent); }

/* ── Form Actions ── */

.form-actions { margin-top: 24px; }
.form-actions-top { margin-top: 8px; }

/* ── Plan Change Confirmation ── */

.plan-change-container { max-width: 440px; margin: 0 auto; text-align: center; }
.plan-change-title { font-size: 22px; font-weight: 700; margin-bottom: 16px; text-align: center; }

.plan-change-detail {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.plan-change-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.plan-change-row-bordered {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.plan-change-label { color: var(--muted); font-size: 14px; }
.plan-change-new { color: var(--accent); }

.plan-change-note { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

/* ── Checkout Overlay ── */

.checkout-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.85);
  z-index: 10;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}
.checkout-overlay.visible { display: flex; }
.checkout-overlay-text { margin-top: 12px; font-size: 14px; color: var(--muted); }

.checkout-stripe-note { color: var(--muted); font-size: 13px; margin-top: 12px; }
.checkout-pay-section { margin-top: 24px; }

/* ── Checkout Processing Heading ── */

.checkout-processing h1 { font-size: 20px; font-weight: 700; margin-top: 16px; }

/* ── Checkout Success Image ── */

.checkout-success-logo { width: 64px; height: auto; margin: 0 auto 16px; }
.checkout-success-note { color: var(--muted); font-size: 13px; margin-top: 16px; }

/* ── Checkout/Error State ── */

.checkout-error h1 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--danger); }
.checkout-error p { color: var(--muted); margin-bottom: 24px; }

/* ── Buy Page Heading ── */

.buy-heading { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.buy-subheading { color: var(--muted); margin-bottom: 32px; }
.buy-footer-note { color: var(--muted); font-size: 13px; margin-top: 20px; }

/* ── Pricing Current Plan Badge ── */

.pricing-badge-current { background: var(--muted); color: white; }

/* ── Full-Width Button ── */

.btn-full { width: 100%; }

/* ── Spinner Small ── */

.spinner-sm { width: 20px; height: 20px; }

/* ── Dev Badge (header) ── */

.dev-badge { font-size: 10px; color: #dc2626; margin-left: 4px; font-weight: 700; letter-spacing: 0.5px; }
.logo-dev-filter { filter: sepia(1) saturate(5) hue-rotate(-30deg); }

/* ── Admin Stat Number ── */

.stat-number { font-size: 32px; font-weight: 800; }
