/* ==========================================================================
   ELYRAON Data Foundry — Commercial Frontend Stylesheet
   Retro-futurist engineering, cosmic telemetry, accessible & responsive.
   Strict CSP style-src 'self' compliant (zero inline styles).
   ========================================================================== */

/* ---------- Container & Layout ---------- */
.foundry-container {
  width: min(var(--wrap, 1180px), calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 80px;
}

/* ---------- Telemetry Badges & Pills ---------- */
.foundry-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.foundry-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
}

.foundry-badge-cyan {
  background: rgba(239,185,51,0.12);
  color: var(--cyan, #EFB933);
  border: 1px solid rgba(239,185,51,0.35);
}

.foundry-badge-gold {
  background: rgba(239,185,51,0.12);
  color: var(--starlight, #EFB933);
  border: 1px solid rgba(239,185,51,0.35);
}

.foundry-badge-emerald {
  background: rgba(46,158,107,0.12);
  color: #2E9E6B;
  border: 1px solid rgba(46,158,107,0.35);
}

.foundry-badge-violet {
  background: rgba(182,194,212,0.14);
  color: var(--violet-soft, #B6C2D4);
  border: 1px solid rgba(182,194,212,0.35);
}

.foundry-badge-pink {
  background: rgba(198,56,55,0.14);
  color: var(--pink, #C63837);
  border: 1px solid rgba(198,56,55,0.35);
}

.foundry-badge-danger {
  background: rgba(198,56,55,0.14);
  color: #C63837;
  border: 1px solid rgba(198,56,55,0.35);
}

.foundry-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: telemetry-pulse 2s infinite ease-in-out;
}

@keyframes telemetry-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ---------- Hero Section ---------- */
.foundry-hero {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--line-soft, rgba(182,194,212,0.09));
}

.foundry-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.foundry-hero h1 {
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin: 0 0 18px;
  text-wrap: balance;
}

.foundry-hero-lead {
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted, #F4F6F9);
  margin: 0 0 28px;
  max-width: 620px;
}

.foundry-hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* ---------- Quick Telemetry Metric Strip ---------- */
.foundry-telemetry-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px 0 0;
  padding: 20px 24px;
  background: rgba(7,19,38,0.6);
  border: 1px solid var(--line-soft, rgba(182,194,212,0.09));
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.telemetry-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.telemetry-label {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint, #B6C2D4);
}

.telemetry-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink, #FFFFFF);
  letter-spacing: -0.02em;
}

.telemetry-sub {
  font-size: 11px;
  color: var(--muted, #F4F6F9);
}

/* ---------- Interactive Nav / Tab Switcher ---------- */
.foundry-nav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin: 32px 0 40px;
  background: rgba(7,19,38,0.8);
  border: 1px solid var(--line, rgba(182,194,212,0.14));
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 92px;
  z-index: 40;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.foundry-nav-bar::-webkit-scrollbar {
  display: none;
}

.foundry-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted, #F4F6F9);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.foundry-tab-btn:hover {
  color: var(--ink, #FFFFFF);
  background: rgba(255, 255, 255, 0.05);
}

.foundry-tab-btn.active {
  background: var(--grad-candy);
  color: #071326;
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(198,56,55,0.35);
}

.foundry-tab-btn .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
}

/* ---------- View Panels ---------- */
.foundry-view-panel {
  display: none;
  animation: panel-fade-in 0.25s ease-out;
}

.foundry-view-panel.active {
  display: block;
}

@keyframes panel-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Section Typography ---------- */
.foundry-section-heading {
  margin-bottom: 32px;
}

.foundry-section-heading h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.foundry-section-lead {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted, #F4F6F9);
  max-width: 720px;
  margin: 0;
}

/* ---------- Cards & Panels ---------- */
.foundry-card {
  background: rgba(7,19,38,0.7);
  border: 1px solid var(--line, rgba(182,194,212,0.14));
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-card, 0 18px 46px rgba(7,19,38,0.5));
  position: relative;
  overflow: hidden;
}

.foundry-card-glow {
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(239,185,51,0.4), rgba(198,56,55,0.2), transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Architecture Grid (Pillars) ---------- */
.foundry-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 36px 0;
}

.pillar-card {
  background: rgba(7,19,38,0.6);
  border: 1px solid var(--line-soft, rgba(182,194,212,0.09));
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pillar-card:hover {
  transform: translateY(-2px);
  border-color: rgba(239,185,51,0.4);
}

.pillar-icon {
  font-size: 24px;
}

.pillar-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}

.pillar-card p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted, #F4F6F9);
  margin: 0;
}

/* ---------- Lifecycle Flow Steps ---------- */
.lifecycle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 28px 0 40px;
}

.lifecycle-card {
  background: rgba(7,19,38,0.7);
  border: 1px solid var(--line-soft, rgba(182,194,212,0.09));
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.lifecycle-step-num {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--starlight, #EFB933);
  font-weight: 700;
}

.lifecycle-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.lifecycle-card p {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted, #F4F6F9);
  margin: 0;
}

/* ---------- Code Snippets & Query Carousel ---------- */
.query-example-box {
  background: #071326;
  border: 1px solid var(--line, rgba(182,194,212,0.14));
  border-radius: 14px;
  overflow: hidden;
  margin: 24px 0;
}

.query-example-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line-soft, rgba(182,194,212,0.09));
}

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

.query-snippet-tab {
  padding: 4px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted, #F4F6F9);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.query-snippet-tab.active {
  background: rgba(239,185,51,0.15);
  border-color: rgba(239,185,51,0.35);
  color: var(--cyan, #EFB933);
  font-weight: 700;
}

.query-code-pre {
  margin: 0;
  padding: 18px 20px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: #B6C2D4;
  overflow-x: auto;
}

/* ---------- Live Dataset Explorer ---------- */
.explorer-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.explorer-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 14px;
  background: rgba(7,19,38,0.7);
  border: 1px solid var(--line-soft, rgba(182,194,212,0.09));
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #F4F6F9);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  color: var(--ink, #FFFFFF);
  border-color: var(--line, rgba(182,194,212,0.2));
}

.filter-chip.active {
  background: rgba(239,185,51,0.18);
  border-color: var(--cyan, #EFB933);
  color: var(--cyan, #EFB933);
  font-weight: 700;
}

.explorer-search-input {
  width: 100%;
  max-width: 480px;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(7,19,38,0.9);
  border: 1px solid var(--line, rgba(182,194,212,0.14));
  color: var(--ink, #FFFFFF);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.explorer-search-input:focus {
  border-color: var(--cyan, #EFB933);
  box-shadow: 0 0 12px rgba(239,185,51,0.25);
}

.datasets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.dataset-card {
  background: rgba(7,19,38,0.75);
  border: 1px solid var(--line-soft, rgba(182,194,212,0.09));
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dataset-card:hover {
  transform: translateY(-2px);
  border-color: var(--line, rgba(182,194,212,0.22));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.dataset-card-restricted {
  border-color: rgba(198,56,55,0.3);
  background: rgba(198,56,55,0.6);
}

.dataset-card-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dataset-badges-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dataset-card h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin: 4px 0 0;
  color: var(--ink, #FFFFFF);
}

.dataset-slug-tag {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--cyan, #EFB933);
  margin-bottom: 6px;
}

.dataset-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted, #F4F6F9);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dataset-specs-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.dataset-spec-pill {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--faint, #B6C2D4);
  border: 1px solid var(--line-soft, rgba(182,194,212,0.08));
}

.dataset-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft, rgba(182,194,212,0.07));
}

/* ---------- Checkout Section ---------- */
.checkout-wrapper {
  max-width: 860px;
  margin: 0 auto;
}

.pricing-card-spotlight {
  background: linear-gradient(180deg, rgba(14,39,76,0.85) 0%, rgba(7,19,38,0.95) 100%);
  border: 2px solid rgba(239,185,51,0.4);
  border-radius: 24px;
  padding: 36px;
  position: relative;
  box-shadow: 0 20px 60px rgba(239,185,51,0.12), 0 0 40px rgba(198,56,55,0.08);
}

.pricing-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.pricing-hero-cost {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  color: var(--starlight, #EFB933);
  letter-spacing: -0.04em;
}

.pricing-hero-cost span {
  font-size: 20px;
  font-weight: 500;
  color: var(--muted, #F4F6F9);
}

.pricing-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0;
  padding: 24px 0;
  border-top: 1px solid var(--line-soft, rgba(182,194,212,0.12));
  border-bottom: 1px solid var(--line-soft, rgba(182,194,212,0.12));
}

.pricing-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink, #FFFFFF);
}

.pricing-check-icon {
  color: #2E9E6B;
  font-weight: 800;
  flex: none;
}

.checkout-status-alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkout-status-success {
  background: rgba(46,158,107,0.12);
  border: 1px solid rgba(46,158,107,0.4);
  color: #2E9E6B;
}

.checkout-status-cancelled {
  background: rgba(239,185,51,0.12);
  border: 1px solid rgba(239,185,51,0.4);
  color: #EFB933;
}

.checkout-status-error {
  background: rgba(198,56,55,0.12);
  border: 1px solid rgba(198,56,55,0.4);
  color: #C63837;
}

.checkout-status-pending {
  background: rgba(239,185,51,0.12);
  border: 1px solid rgba(239,185,51,0.4);
  color: #F4F6F9;
}

/* Modal Auth Tabs */
.auth-tab-bar {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 8px;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  color: var(--starlight-faint);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.auth-tab-btn:hover {
  color: var(--starlight);
  background: rgba(255, 255, 255, 0.04);
}

.auth-tab-btn.active {
  color: var(--cyan);
  background: rgba(239,185,51,0.12);
  border: 1px solid rgba(239,185,51,0.3);
}

.auth-tab-panel {
  display: block;
}

.auth-tab-panel[hidden] {
  display: none !important;
}

/* ---------- 5-Step Guided Onboarding ---------- */
.onboarding-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 36px;
  position: relative;
}

.onboarding-stepper::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: var(--line-soft, rgba(182,194,212,0.12));
  z-index: 1;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--muted, #F4F6F9);
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  background: var(--space-1, #071326);
  border: 2px solid var(--line, rgba(182,194,212,0.2));
  color: var(--muted, #F4F6F9);
  transition: all 0.2s ease;
}

.step-indicator.active .step-circle {
  border-color: var(--cyan, #EFB933);
  background: var(--space-2, #071326);
  color: var(--cyan, #EFB933);
  box-shadow: 0 0 16px rgba(239,185,51,0.4);
}

.step-indicator.completed .step-circle {
  border-color: #2E9E6B;
  background: #2E9E6B;
  color: #071326;
}

.step-title {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.onboarding-step-body {
  display: none;
  animation: panel-fade-in 0.2s ease-out;
}

.onboarding-step-body.active {
  display: block;
}

.step-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft, rgba(182,194,212,0.09));
}

/* ---------- Customer Dashboard ---------- */
.dashboard-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px 24px;
  background: rgba(7,19,38,0.85);
  border: 1px solid var(--line, rgba(182,194,212,0.14));
  border-radius: 16px;
  margin-bottom: 28px;
}

.dashboard-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--grad-candy);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  color: #071326;
}

.dashboard-stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-metric-card {
  background: rgba(7,19,38,0.7);
  border: 1px solid var(--line-soft, rgba(182,194,212,0.1));
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-metric-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--starlight, #EFB933);
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--grad-warm);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ---------- Tables: Keys, Usage, Receipts ---------- */
.foundry-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line-soft, rgba(182,194,212,0.09));
  margin: 16px 0;
}

.foundry-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.foundry-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 16px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint, #B6C2D4);
  border-bottom: 1px solid var(--line-soft, rgba(182,194,212,0.09));
}

.foundry-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft, rgba(182,194,212,0.06));
  color: var(--ink, #FFFFFF);
}

.foundry-table tr:last-child td {
  border-bottom: 0;
}

.foundry-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.key-code-pill {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  background: rgba(239,185,51,0.1);
  color: var(--cyan, #EFB933);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(239,185,51,0.2);
}

/* ---------- Modals & Overlays ---------- */
.foundry-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,19,38,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  place-items: center;
  z-index: 100;
  padding: 24px;
}

.foundry-modal-overlay.active {
  display: grid;
}

.foundry-modal-card {
  width: min(640px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  background: #071326;
  border: 1px solid var(--line, rgba(182,194,212,0.2));
  border-radius: 20px;
  padding: 32px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  animation: modal-pop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.foundry-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  color: var(--muted, #F4F6F9);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 16px;
  transition: all 0.15s ease;
}

.foundry-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink, #FFFFFF);
}

/* ---------- Form Controls ---------- */
.foundry-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.foundry-form-label {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint, #B6C2D4);
}

.foundry-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(7,19,38,0.9);
  border: 1px solid var(--line, rgba(182,194,212,0.14));
  color: var(--ink, #FFFFFF);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.foundry-input:focus {
  border-color: var(--cyan, #EFB933);
}

/* ---------- Toast Notifications ---------- */
.foundry-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #071326;
  border: 1px solid var(--cyan, #EFB933);
  color: var(--ink, #FFFFFF);
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 18px rgba(239,185,51,0.3);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ---------- Utility Classes for Layout (Zero Inline Styles) ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 6px; }
.mb-4 { margin-bottom: 16px; }
.m-0 { margin: 0; }
.my-4 { margin-top: 16px; margin-bottom: 16px; }
.my-5 { margin-top: 20px; margin-bottom: 20px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.gap-12 { gap: 12px; }
.flex-row { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.w-full { width: 100%; }
.max-w-320 { max-width: 320px; }
.break-all { word-break: break-all; }
.font-mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.color-muted { color: var(--muted, #F4F6F9); }
.color-cyan { color: var(--cyan, #EFB933); }
.color-starlight { color: var(--starlight, #EFB933); }
.color-emerald { color: #2E9E6B; }
.color-pink { color: var(--pink, #C63837); }
.color-faint { color: var(--faint, #B6C2D4); }
.cursor-pointer { cursor: pointer; }

/* Font size utilities */
.fs-xs { font-size: 11.5px; }
.fs-sm { font-size: 13px; }
.fs-md { font-size: 14px; }
.fs-18 { font-size: 18px; }
.fs-20 { font-size: 20px; }
.fs-24 { font-size: 24px; }
.fs-26 { font-size: 26px; }
.fs-115 { font-size: 1.15rem; }

/* Code box display */
.code-box-inline {
  background: #071326;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--line, rgba(182,194,212,0.14));
}

.code-box-sm {
  background: #071326;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--line, rgba(182,194,212,0.14));
}

.btn-checkout-hero {
  font-size: 14px;
  min-height: 52px;
  padding: 0 32px;
}

/* Small buttons */
.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 11px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line, rgba(182,194,212,0.16));
  color: var(--ink, #FFFFFF);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid rgba(198,56,55,0.4);
  color: #C63837;
}

.btn-danger-outline:hover {
  background: rgba(198,56,55,0.15);
}

/* ---------- Responsive Design ---------- */
@media (max-width: 900px) {
  .foundry-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .foundry-telemetry-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing-features-grid {
    grid-template-columns: 1fr;
  }
  .onboarding-stepper::before {
    display: none;
  }
  .step-title {
    font-size: 10px;
  }
}

@media (max-width: 640px) {
  .foundry-container {
    width: calc(100% - 32px);
  }
  .foundry-telemetry-strip {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .foundry-badge-row {
    gap: 6px;
  }
  .foundry-tab-btn {
    padding: 8px 14px;
    font-size: 12px;
  }
  .stat-metric-card {
    padding: 16px;
  }
  .pricing-hero-cost {
    font-size: 40px;
  }
  .pricing-card-spotlight {
    padding: 24px 18px;
  }
}

/* ==========================================================================
   ELYRAON Markets Intelligence — Data Discovery & Telemetry Stylesheet
   Strict CSP style-src 'self' compliant.
   ========================================================================== */

.market-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.market-search-box {
  position: relative;
  flex: 1 1 280px;
  max-width: 440px;
}

.market-search-input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  background: rgba(7,19,38,0.7);
  border: 1px solid var(--line-soft, rgba(182,194,212,0.12));
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.market-search-input:focus {
  outline: none;
  border-color: var(--cyan, #EFB933);
  box-shadow: 0 0 0 2px rgba(239,185,51,0.2);
}

.market-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted, #B6C2D4);
  font-size: 14px;
  pointer-events: none;
}

.market-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.market-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-soft, rgba(182,194,212,0.12));
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-muted, #B6C2D4);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.market-chip:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.market-chip.active {
  background: rgba(239,185,51,0.15);
  border-color: var(--cyan, #EFB933);
  color: var(--cyan, #EFB933);
  font-weight: 600;
}

.market-results-count {
  font-size: 12px;
  color: var(--color-muted, #B6C2D4);
  font-family: ui-monospace, "SF Mono", monospace;
  margin-bottom: 12px;
}

/* Explorer Section Tabs */
.explorer-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--line-soft, rgba(182,194,212,0.12));
  margin-bottom: 24px;
  padding-bottom: 4px;
}

.explorer-tab-btn {
  padding: 10px 18px;
  border: none;
  background: none;
  color: var(--color-muted, #B6C2D4);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.explorer-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.explorer-tab-btn.active {
  color: var(--cyan, #EFB933);
  border-bottom: 2px solid var(--cyan, #EFB933);
  background: rgba(239,185,51,0.05);
}

.explorer-view-panel {
  display: block;
}

.explorer-view-panel[hidden] {
  display: none;
}

/* Visual Funding Chart */
.funding-chart-box {
  background: rgba(7,19,38,0.6);
  border: 1px solid var(--line-soft, rgba(182,194,212,0.12));
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot-pos {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #2E9E6B;
}

.legend-dot-neg {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #C63837;
}

.funding-svg-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.funding-svg-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-bar {
  cursor: pointer;
  transition: opacity 0.2s, stroke-width 0.2s;
}

.chart-bar:hover {
  opacity: 0.8;
}

.chart-bar.active {
  stroke: #EFB933;
  stroke-width: 2px;
}

.funding-bar-pos {
  fill: #2E9E6B;
}

.funding-bar-neg {
  fill: #C63837;
}

.funding-axis-line {
  stroke: rgba(182,194,212,0.2);
  stroke-width: 1;
}

.funding-grid-line {
  stroke: rgba(182,194,212,0.06);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.chart-tick-label {
  fill: var(--color-muted, #B6C2D4);
  font-size: 9px;
  font-family: ui-monospace, "SF Mono", monospace;
  text-anchor: middle;
}

/* Detail Box & Micro-metrics */
.funding-detail-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
  padding: 16px;
  background: rgba(7,19,38,0.7);
  border: 1px solid var(--line-soft, rgba(182,194,212,0.08));
  border-radius: 8px;
}

.detail-metric-val {
  font-size: 18px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", monospace;
  margin-top: 4px;
}

.metric-val-pos {
  color: #2E9E6B;
}

.metric-val-neg {
  color: #C63837;
}

/* Copy Code Button */
.code-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.btn-copy-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft, rgba(182,194,212,0.15));
  border-radius: 4px;
  color: var(--color-muted, #B6C2D4);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-code:hover {
  background: rgba(239,185,51,0.15);
  border-color: var(--cyan, #EFB933);
  color: #fff;
}

.btn-copy-code.copied {
  background: rgba(46,158,107,0.2);
  border-color: #2E9E6B;
  color: #2E9E6B;
}

/* Schema Viewer */
.schema-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.schema-field-card {
  padding: 12px 14px;
  background: rgba(7,19,38,0.5);
  border: 1px solid var(--line-soft, rgba(182,194,212,0.08));
  border-radius: 6px;
}

.schema-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.schema-field-name {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.schema-field-type {
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(239,185,51,0.1);
  color: var(--cyan, #EFB933);
  border-radius: 3px;
  font-family: ui-monospace, "SF Mono", monospace;
}

.schema-field-desc {
  font-size: 12px;
  color: var(--color-muted, #B6C2D4);
  line-height: 1.4;
}

/* Empty & Restricted Gated State Cards */
.status-state-card {
  padding: 24px;
  border-radius: 10px;
  background: rgba(7,19,38,0.6);
  border: 1px solid var(--line-soft, rgba(182,194,212,0.12));
  margin-top: 16px;
}

.status-state-card.state-warning {
  border-left: 4px solid var(--gold, #EFB933);
}

.status-state-card.state-blocked {
  border-left: 4px solid #C63837;
}

.status-state-card.state-info {
  border-left: 4px solid var(--cyan, #EFB933);
}

.status-state-card.state-cold {
  border-left: 4px solid #414342;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
  .market-controls-row {
    flex-direction: column;
    align-items: stretch;
  }
  .market-search-box {
    max-width: 100%;
  }
  .funding-detail-card {
    grid-template-columns: 1fr;
  }
  .chart-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
