/* ==========================================================================
   ToggleShop Design System
   Handcrafted semantic tokens — Warm Alabaster (Light) & Layered Obsidian Cyber (Dark)
   ========================================================================== */

:root {
  /* Surface hierarchy */
  --bg-canvas: #f7f6f3;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f0eb;
  --bg-elevated: #ffffff;
  --bg-console: #14161c;
  --bg-console-row: rgba(255, 255, 255, 0.03);

  /* Text hierarchy */
  --text-primary: #141413;
  --text-secondary: #52514d;
  --text-muted: #76756f;
  --text-on-accent: #ffffff;
  --text-console-primary: #eef0f6;
  --text-console-muted: #8b93a7;

  /* Brand & semantic accents */
  --brand: #1d4ed8;
  --brand-hover: #1e40af;
  --brand-soft: #eff4ff;
  --brand-border: #c7d7fe;

  --status-ok: #15803d;
  --status-ok-bg: #eefbf3;
  --status-ok-border: #bbf7d0;

  --status-warn: #b45309;
  --status-warn-bg: #fffbeb;
  --status-warn-border: #fde68a;

  --status-err: #b91c1c;
  --status-err-bg: #fef2f2;
  --status-err-border: #fecaca;

  /* Borders & dividers */
  --border-subtle: #e7e5df;
  --border-default: #dcdad3;
  --border-strong: #c5c2b9;
  --border-console: #262a36;

  /* Banner */
  --banner-bg: #18181b;
  --banner-text: #f4f4f5;
  --banner-accent: #60a5fa;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(20, 20, 19, 0.04);
  --shadow-sm: 0 2px 8px rgba(20, 20, 19, 0.05), 0 1px 2px rgba(20, 20, 19, 0.04);
  --shadow-md: 0 12px 28px rgba(20, 20, 19, 0.08), 0 2px 6px rgba(20, 20, 19, 0.04);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 140ms;
  --dur-med: 220ms;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', ui-monospace, SFMono-Regular, monospace;

  /* Highlight flash for live flag updates */
  --flash-ring: rgba(29, 78, 216, 0.22);
}

/* Dark / Cyber Mode activated by `dark_mode_neon` feature flag */
body.neon {
  --bg-canvas: #0b0d13;
  --bg-surface: #12151f;
  --bg-subtle: #181c29;
  --bg-elevated: #161a26;
  --bg-console: #0d1018;
  --bg-console-row: rgba(56, 189, 248, 0.04);

  --text-primary: #f1f5f9;
  --text-secondary: #a1acc4;
  --text-muted: #707b96;
  --text-on-accent: #07111e;

  --brand: #38bdf8;
  --brand-hover: #7dd3fc;
  --brand-soft: rgba(56, 189, 248, 0.1);
  --brand-border: rgba(56, 189, 248, 0.34);

  --status-ok: #34d399;
  --status-ok-bg: rgba(16, 185, 129, 0.12);
  --status-ok-border: rgba(52, 211, 153, 0.32);

  --status-warn: #fbbf24;
  --status-warn-bg: rgba(245, 158, 11, 0.12);
  --status-warn-border: rgba(251, 191, 36, 0.32);

  --status-err: #f87171;
  --status-err-bg: rgba(239, 68, 68, 0.12);
  --status-err-border: rgba(248, 113, 113, 0.32);

  --border-subtle: #1f2536;
  --border-default: #293147;
  --border-strong: #3b4664;
  --border-console: #232a3d;

  --banner-bg: #101726;
  --banner-text: #e2e8f0;
  --banner-accent: #38bdf8;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(56, 189, 248, 0.06);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(56, 189, 248, 0.08);

  --flash-ring: rgba(56, 189, 248, 0.32);
}

/* Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
}

body.neon {
  background-image: radial-gradient(70% 40% at 50% 0%, rgba(56, 189, 248, 0.08), transparent 65%);
}

/* Focus Accessibility (WCAG 2.2 AA) */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.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;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

/* Subtle highlight when a feature flag updates a UI region live */
.region-flash {
  animation: regionFlash 850ms var(--ease-out);
}
@keyframes regionFlash {
  0% {
    box-shadow: 0 0 0 3px var(--flash-ring);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

/* ==========================================================================
   Promotional Announcement Bar (`promo_banner_copy`)
   ========================================================================== */
.promo-bar {
  background: var(--banner-bg);
  color: var(--banner-text);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  display: none;
}
.promo-bar.visible {
  display: block;
}
.promo-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 9px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.promo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--banner-accent);
  flex-shrink: 0;
}

/* ==========================================================================
   Top Navigation Header
   ========================================================================== */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 30;
  transition: background-color var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
}

.header-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 28px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.025em;
}
.brand-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--brand);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
  border-left: 1px solid var(--border-subtle);
  padding-left: 18px;
}
.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.env-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}

.sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.sync-indicator.live {
  background: var(--status-ok-bg);
  border-color: var(--status-ok-border);
  color: var(--status-ok);
}
.sync-indicator.offline {
  background: var(--status-warn-bg);
  border-color: var(--status-warn-border);
  color: var(--status-warn);
}
.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* ==========================================================================
   Main Application Container & Page Heading
   ========================================================================== */
.app-container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 36px 28px 72px;
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-subtle);
}

.page-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
}

.page-subtitle {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-secondary);
}

.demo-notice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.demo-notice svg {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Two-Column Checkout Grid */
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(340px, 0.98fr);
  gap: 32px;
  align-items: start;
}

/* ==========================================================================
   Left Column — Primary Checkout Surface (Purposeful Dividers, Not Box Soup)
   ========================================================================== */
.checkout-surface {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
}

.checkout-section {
  padding: 26px 28px;
  border-bottom: 1px solid var(--border-subtle);
}
.checkout-section:last-child {
  border-bottom: none;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.section-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Express Payment Method List */
.payment-list {
  display: grid;
  gap: 10px;
}

.payment-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.payment-option:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}
.payment-option[aria-checked='true'] {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 1px var(--brand);
}

.payment-option-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.radio-ring {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: border-color var(--dur-fast) ease;
}
.payment-option[aria-checked='true'] .radio-ring {
  border-color: var(--brand);
}
.radio-ring::after {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  transform: scale(0);
  transition: transform var(--dur-fast) var(--ease-out);
}
.payment-option[aria-checked='true'] .radio-ring::after {
  transform: scale(1);
}

.card-mark {
  width: 42px;
  height: 28px;
  border-radius: 5px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.payment-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
}
.payment-sub {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}
.payment-tag {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

/* Inline New Card Sub-Form */
.new-card-fields {
  margin-top: 14px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}

/* Classic Multi-Step Progress Header (`new_checkout = OFF`) */
.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.step-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-fast) ease;
}
.step-btn.active {
  background: var(--brand-soft);
  border-color: var(--brand-border);
  color: var(--brand);
  font-weight: 600;
}
.step-btn.done {
  color: var(--status-ok);
  border-color: var(--status-ok-border);
  background: var(--status-ok-bg);
}
.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Form Controls */
.form-stack {
  display: grid;
  gap: 16px;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.field input:hover {
  border-color: var(--border-strong);
}
.field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.field-hint {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* Order Summary & Payment Action */
.order-lines {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.order-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}
.order-line.savings {
  color: var(--status-ok);
}
.order-line.total {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
}
.total-amount {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.action-row {
  display: grid;
  gap: 10px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--brand);
  color: var(--text-on-accent);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color var(--dur-fast) ease, transform var(--dur-fast) ease, opacity var(--dur-fast) ease;
}
.btn-primary:hover:not(:disabled) {
  background: var(--brand-hover);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}
.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.btn-secondary:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.checkout-footnote {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
}

/* Simulated Receipt Confirmation State */
.receipt-panel {
  padding: 32px 28px;
  text-align: left;
}
.receipt-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--status-ok-bg);
  border: 1px solid var(--status-ok-border);
  color: var(--status-ok);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.receipt-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.receipt-sub {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-secondary);
}
.receipt-meta {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  font-size: 13px;
}
.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* Spinner */
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 650ms linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Right Column — Subscription Summary + Developer Telemetry Console
   ========================================================================== */
.sidebar-stack {
  display: grid;
  gap: 24px;
  position: sticky;
  top: 86px;
}

.summary-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px 26px;
}

.plan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.plan-kicker {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.plan-heading {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.variant-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  color: var(--brand);
  white-space: nowrap;
}

/* Cadence Comparison Selector (`pricing_ab_test`) */
.cadence-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.cadence-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.cadence-card.recommended {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 1px var(--brand);
}

.cadence-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.save-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--status-ok);
  background: var(--status-ok-bg);
  border: 1px solid var(--status-ok-border);
  padding: 1px 7px;
  border-radius: var(--radius-sm);
}
.cadence-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.cadence-price {
  text-align: right;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.cadence-price span {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-muted);
}

.plan-features {
  list-style: none;
  padding: 16px 0 0;
  margin: 0 0 18px;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.plan-features svg {
  width: 15px;
  height: 15px;
  color: var(--status-ok);
  flex-shrink: 0;
}

/* Expandable Plan Comparison Table */
.compare-drawer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.compare-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 4px;
  border-bottom: 1px solid var(--border-subtle);
}
.compare-table td {
  padding: 7px 4px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.compare-table tr:last-child td {
  border-bottom: none;
}
.compare-table .col-pro {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================================================
   Developer Telemetry Console (Theme-Harmonized Inspector)
   ========================================================================== */
.telemetry-console {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
}

.console-header {
  width: 100%;
  padding: 15px 22px;
  background: var(--bg-subtle);
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: background-color var(--dur-fast) ease;
}
.console-header:hover {
  background: var(--bg-canvas);
}

.console-title-group {
  display: flex;
  align-items: center;
  gap: 9px;
}
.console-title-group svg {
  color: var(--text-muted);
}
.console-title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.console-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.console-chevron {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  transition: transform var(--dur-fast) ease;
}
.telemetry-console.collapsed .console-chevron {
  transform: rotate(-90deg);
}
.telemetry-console.collapsed .console-header {
  border-bottom-color: transparent;
}

.console-body {
  padding: 14px 22px 18px;
}

.console-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}
.console-state-confirmed {
  color: var(--status-ok);
  font-weight: 500;
}
.console-state-cached {
  color: var(--status-warn);
  font-weight: 500;
}

.flag-rows {
  display: grid;
}

.flag-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  transition: background-color 300ms ease;
}
.flag-row:last-child {
  border-bottom: none;
}
.flag-row.changed {
  background: var(--brand-soft);
  border-radius: var(--radius-sm);
  padding-left: 8px;
  padding-right: 8px;
}
.flag-row.interactive {
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding-left: 6px;
  padding-right: 6px;
}
.flag-row.interactive:hover {
  background: var(--bg-subtle);
}

.flag-row-name {
  color: var(--text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flag-row-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.flag-row-val {
  font-size: 11.5px;
  color: var(--text-muted);
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flag-state-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  min-width: 34px;
  justify-content: flex-end;
}
.flag-state-pill.on {
  color: var(--status-ok);
}
.flag-state-pill.off {
  color: var(--text-muted);
}
.flag-state-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.console-log {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  display: grid;
  gap: 4px;
}
.console-log-entry {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Toast Status Announcement
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: #14161c;
  color: #f8fafc;
  border: 1px solid #2c3140;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out);
  z-index: 60;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints (1280 / 1024 / 768 / 390 / 360)
   ========================================================================== */
@media (max-width: 1024px) {
  .checkout-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.95fr);
    gap: 24px;
  }
}

@media (max-width: 860px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
  .sidebar-stack {
    position: static;
  }
  .page-intro {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .header-inner {
    padding: 0 16px;
    height: 56px;
  }
  .breadcrumb,
  .env-indicator {
    display: none;
  }
  .app-container {
    padding: 24px 16px 56px;
  }
  .page-title {
    font-size: 22px;
  }
  .checkout-section {
    padding: 20px 18px;
  }
  .summary-panel {
    padding: 20px 18px;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .demo-notice {
    white-space: normal;
  }
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
