/* ==========================================================================
   XLabs Hub — Design Skills & Style Lab (Single-Route Interactive Workbench)
   WCAG 2.1/2.2 AA · Responsive 320px–1440px+ · Zero Horizontal Overflow
   ========================================================================== */

:root {
  --shell-bg: #0a0d14;
  --shell-surface: #111622;
  --shell-elevated: #171e2e;
  --shell-border: rgba(226, 232, 240, 0.12);
  --shell-border-strong: rgba(226, 232, 240, 0.24);
  --shell-ink: #f1f5f9;
  --shell-muted: #9aa7bc;
  --shell-accent: #38bdf8;
  --shell-accent-ink: #04131c;
  --shell-success: #34d399;
  --shell-warn: #fbbf24;
  --shell-radius: 14px;
  --shell-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --shell-serif: 'Instrument Serif', Georgia, serif;
  --shell-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --max-w: 1320px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--shell-bg);
  color: var(--shell-ink);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--shell-font);
  line-height: 1.55;
  background:
    radial-gradient(circle at 12% 0%, rgba(56, 189, 248, 0.08), transparent 36%),
    radial-gradient(circle at 88% 8%, rgba(16, 185, 129, 0.06), transparent 34%),
    var(--shell-bg);
  color: var(--shell-ink);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
select,
input {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--shell-accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--shell-accent);
  color: var(--shell-accent-ink);
  padding: 0.75rem 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

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

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

/* ---------- Sticky Top Header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 13, 20, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--shell-border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 64px;
  padding: 0.5rem 0;
  flex-wrap: wrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  min-width: 0;
}

.brand-cube {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #38bdf8, #10b981);
  color: #04131c;
  font-weight: 800;
  font-family: var(--shell-mono);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-weight: 800;
  font-size: 0.96rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--shell-muted);
  font-family: var(--shell-mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--shell-muted);
  padding: 0.48rem 0.75rem;
  border-radius: 8px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--shell-ink);
}

.nav-cta {
  background: var(--shell-accent) !important;
  color: var(--shell-accent-ink) !important;
  font-weight: 700 !important;
}

/* ---------- Hero Overview ---------- */
.lab-hero {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--shell-border);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--shell-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--shell-accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.lab-hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.85rem, 4.2vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 900px;
}

.lab-hero h1 em {
  font-family: var(--shell-serif);
  font-style: italic;
  font-weight: 400;
  color: #7dd3fc;
}

.hero-summary {
  margin: 0 0 1.5rem;
  max-width: 780px;
  color: var(--shell-muted);
  font-size: 1rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.75rem;
}

.stat-card {
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.stat-val {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--shell-ink);
  line-height: 1.2;
}

.stat-lbl {
  display: block;
  font-size: 0.78rem;
  color: var(--shell-muted);
  margin-top: 0.2rem;
}

/* ---------- Generic Sections ---------- */
.section {
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--shell-border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
}

.section-kicker {
  font-family: var(--shell-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--shell-accent);
  margin: 0 0 0.35rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.section-desc {
  margin: 0.45rem 0 0;
  color: var(--shell-muted);
  max-width: 720px;
  font-size: 0.95rem;
}

/* ---------- Filter Pills ---------- */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.pill-btn {
  appearance: none;
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  color: var(--shell-muted);
  padding: 0.5rem 0.9rem;
  min-height: 40px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.pill-btn:hover {
  border-color: var(--shell-border-strong);
  color: var(--shell-ink);
}

.pill-btn[aria-pressed='true'] {
  background: var(--shell-accent);
  border-color: var(--shell-accent);
  color: var(--shell-accent-ink);
  font-weight: 700;
}

/* ---------- Section 1: Ecosystem Grid ---------- */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr));
  gap: 0.85rem;
}

.eco-card {
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.eco-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.eco-domain {
  font-family: var(--shell-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: #7dd3fc;
  overflow-wrap: anywhere;
}

.status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  white-space: nowrap;
}

.status-badge.active {
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.status-badge.scale {
  background: rgba(251, 191, 36, 0.14);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.eco-name {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0;
}

.eco-summary {
  font-size: 0.84rem;
  color: var(--shell-muted);
  margin: 0;
  flex: 1;
}

.eco-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.55rem;
  border-top: 1px solid var(--shell-border);
  font-size: 0.73rem;
  color: var(--shell-muted);
  font-family: var(--shell-mono);
  overflow-wrap: anywhere;
}

/* ---------- Progressive Disclosure Box ---------- */
.disclosure-box {
  margin-top: 1.25rem;
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: 12px;
  overflow: hidden;
}

.disclosure-trigger {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0.95rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  text-align: left;
  font-weight: 700;
  font-size: 0.9rem;
  min-height: 48px;
}

.disclosure-trigger:hover {
  background: rgba(255, 255, 255, 0.03);
}

.disclosure-body {
  padding: 0 1.1rem 1.1rem;
  border-top: 1px solid var(--shell-border);
  color: var(--shell-muted);
  font-size: 0.88rem;
}

.disclosure-body[hidden] {
  display: none;
}

.disclosure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.disclosure-item {
  background: var(--shell-elevated);
  border: 1px solid var(--shell-border);
  border-radius: 10px;
  padding: 0.8rem;
}

.disclosure-item strong {
  display: block;
  color: var(--shell-ink);
  font-size: 0.84rem;
  margin-bottom: 0.25rem;
}

/* ---------- Section 2: Vetted Skills Grid ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
}

.skill-card {
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: 14px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.skill-card.recommended {
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.14) inset;
}

.skill-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chip {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  line-height: 1.25;
}

.chip-official {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.32);
}

.chip-verified {
  background: rgba(167, 139, 250, 0.14);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.chip-safe {
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.chip-audit {
  background: rgba(251, 191, 36, 0.14);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.skill-stars {
  font-family: var(--shell-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--shell-ink);
  white-space: nowrap;
}

.skill-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
}

.skill-repo {
  font-family: var(--shell-mono);
  font-size: 0.76rem;
  color: #7dd3fc;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.skill-repo:hover {
  text-decoration: underline;
}

.skill-desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--shell-muted);
}

.skill-fit {
  font-size: 0.8rem;
  color: var(--shell-ink);
  background: var(--shell-elevated);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--shell-border);
}

.skill-fit span {
  color: var(--shell-muted);
  font-weight: 600;
}

.skill-sec-note {
  font-size: 0.77rem;
  color: var(--shell-muted);
  margin: 0;
}

.skill-cmd-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.55rem;
  border-top: 1px solid var(--shell-border);
}

.skill-cmd {
  flex: 1;
  min-width: 0;
  font-family: var(--shell-mono);
  font-size: 0.72rem;
  background: #07090e;
  border: 1px solid var(--shell-border);
  border-radius: 7px;
  padding: 0.45rem 0.6rem;
  color: #cbd5e1;
  overflow-x: auto;
  white-space: nowrap;
}

.mini-btn {
  background: var(--shell-elevated);
  border: 1px solid var(--shell-border-strong);
  color: var(--shell-ink);
  border-radius: 7px;
  padding: 0.42rem 0.68rem;
  min-height: 36px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.mini-btn:hover {
  background: var(--shell-accent);
  color: var(--shell-accent-ink);
  border-color: var(--shell-accent);
}

/* ---------- Section 3: LIVE STYLE DECISION ARENA ---------- */
.arena-controls {
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
}

.control-label {
  font-family: var(--shell-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--shell-muted);
  font-weight: 700;
}

.style-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 155px), 1fr));
  gap: 0.5rem;
}

.style-tab {
  appearance: none;
  background: var(--shell-elevated);
  border: 1px solid var(--shell-border);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  min-height: 48px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.style-tab:hover {
  border-color: var(--shell-border-strong);
  transform: translateY(-1px);
}

.style-tab[aria-pressed='true'] {
  border-color: var(--shell-accent);
  background: rgba(56, 189, 248, 0.14);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35) inset;
}

.style-tab-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--shell-ink);
  line-height: 1.2;
}

.style-tab-sub {
  font-size: 0.7rem;
  color: var(--shell-muted);
  font-family: var(--shell-mono);
}

.arena-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--shell-border);
}

.compare-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.select-control {
  background: var(--shell-elevated);
  border: 1px solid var(--shell-border-strong);
  color: var(--shell-ink);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  min-height: 40px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  font-size: 0.82rem;
  font-weight: 600;
}

@media (min-width: 640px) {
  .compare-controls .select-control {
    width: auto;
    max-width: 320px;
  }
}

/* Preview Stage Layout */
.preview-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

.preview-stage.compare-mode {
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .preview-stage.compare-mode {
    grid-template-columns: 1fr 1fr;
  }
}

.preview-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

/* Style Dossier Bar above preview */
.style-dossier {
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dossier-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dossier-head h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
}

.dossier-tag {
  font-family: var(--shell-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--shell-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dossier-why {
  margin: 0;
  font-size: 0.85rem;
  color: var(--shell-muted);
}

.dossier-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.meta-pill {
  font-size: 0.74rem;
  font-family: var(--shell-mono);
  background: var(--shell-elevated);
  border: 1px solid var(--shell-border);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  color: #cbd5e1;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.swatch-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #07090e;
  border: 1px solid var(--shell-border);
  border-radius: 999px;
  padding: 0.22rem 0.55rem 0.22rem 0.3rem;
  font-family: var(--shell-mono);
  font-size: 0.7rem;
  color: #cbd5e1;
}

.swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

/* ==========================================================================
   LIVE MOCK LANDING FRAME — ISOLATED SCOPED DESIGN TOKENS PER STYLE
   ========================================================================== */
.browser-chrome {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--shell-border-strong);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
  min-width: 0;
}

.browser-bar {
  background: #141925;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.55rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
}

.browser-url {
  font-family: var(--shell-mono);
  font-size: 0.74rem;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.2rem 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 72%;
}

/* Base preview frame tokens (overridden per data-style) */
.preview-frame {
  --p-canvas: #0b0f17;
  --p-surface: #121826;
  --p-surface-2: #182135;
  --p-ink: #f4f7fb;
  --p-muted: #9aa7bc;
  --p-accent: #38bdf8;
  --p-accent-ink: #04131c;
  --p-accent-2: #10b981;
  --p-border: rgba(255, 255, 255, 0.12);
  --p-radius: 14px;
  --p-btn-radius: 10px;
  --p-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  --p-font-display: 'Instrument Serif', Georgia, serif;
  --p-font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --p-font-mono: 'JetBrains Mono', monospace;
  --p-bg-pattern: radial-gradient(circle at 80% 0%, rgba(56, 189, 248, 0.14), transparent 46%);
  --p-border-w: 1px;

  background-color: var(--p-canvas);
  background-image: var(--p-bg-pattern);
  color: var(--p-ink);
  font-family: var(--p-font-body);
  padding: 1.25rem;
  transition: background-color 0.22s ease, color 0.22s ease;
}

@media (min-width: 640px) {
  .preview-frame {
    padding: 1.75rem;
  }
}

/* 1. XLabs Hybrid Matrix */
.preview-frame[data-style='xlabs-adaptive-matrix'] {
  --p-canvas: #0b0f17;
  --p-surface: #121826;
  --p-surface-2: #182134;
  --p-ink: #f4f7fb;
  --p-muted: #a3b1c6;
  --p-accent: #38bdf8;
  --p-accent-ink: #04131c;
  --p-accent-2: #34d399;
  --p-border: rgba(148, 163, 184, 0.2);
  --p-radius: 14px;
  --p-btn-radius: 10px;
  --p-font-display: 'Instrument Serif', Georgia, serif;
  --p-bg-pattern:
    radial-gradient(circle at 85% 5%, rgba(56, 189, 248, 0.16), transparent 44%),
    radial-gradient(circle at 10% 90%, rgba(16, 185, 129, 0.1), transparent 40%);
}

/* 2. Obsidian Precision (Linear / Vercel) */
.preview-frame[data-style='linear-monolith'] {
  --p-canvas: #09090b;
  --p-surface: #111114;
  --p-surface-2: #18181c;
  --p-ink: #fafafa;
  --p-muted: #a1a1aa;
  --p-accent: #fafafa;
  --p-accent-ink: #09090b;
  --p-accent-2: #60a5fa;
  --p-border: rgba(255, 255, 255, 0.11);
  --p-radius: 10px;
  --p-btn-radius: 8px;
  --p-font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --p-bg-pattern:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* 3. Swiss Ivory Editorial */
.preview-frame[data-style='swiss-ivory-studio'] {
  --p-canvas: #f7f5f0;
  --p-surface: #ffffff;
  --p-surface-2: #efece4;
  --p-ink: #141413;
  --p-muted: #57534e;
  --p-accent: #c84b2a;
  --p-accent-ink: #ffffff;
  --p-accent-2: #1e3a5f;
  --p-border: rgba(20, 20, 19, 0.16);
  --p-radius: 6px;
  --p-btn-radius: 4px;
  --p-shadow: 0 2px 10px rgba(20, 20, 19, 0.04);
  --p-font-display: 'Instrument Serif', Georgia, serif;
  --p-bg-pattern: none;
}

/* 4. Luminous Enterprise SaaS (Stripe) */
.preview-frame[data-style='stripe-luminous-saas'] {
  --p-canvas: #f8faff;
  --p-surface: #ffffff;
  --p-surface-2: #eef3ff;
  --p-ink: #0a2540;
  --p-muted: #425466;
  --p-accent: #0055ff;
  --p-accent-ink: #ffffff;
  --p-accent-2: #059669;
  --p-border: rgba(10, 37, 64, 0.12);
  --p-radius: 12px;
  --p-btn-radius: 999px;
  --p-shadow: 0 12px 32px rgba(10, 37, 64, 0.08);
  --p-font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --p-bg-pattern:
    radial-gradient(circle at 90% 0%, rgba(0, 85, 255, 0.1), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(5, 150, 105, 0.08), transparent 40%);
}

/* 5. Spatial Bento Architecture (Apple / Clinical) */
.preview-frame[data-style='bento-spatial-apple'] {
  --p-canvas: #f2f6fa;
  --p-surface: #ffffff;
  --p-surface-2: #e6f2fa;
  --p-ink: #0f172a;
  --p-muted: #475569;
  --p-accent: #0369a1;
  --p-accent-ink: #ffffff;
  --p-accent-2: #0d9488;
  --p-border: rgba(3, 105, 161, 0.14);
  --p-radius: 22px;
  --p-btn-radius: 999px;
  --p-shadow: 0 18px 36px -14px rgba(3, 105, 161, 0.14);
  --p-font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --p-bg-pattern: none;
}

/* 6. Carbon Telemetry HUD */
.preview-frame[data-style='cyber-telemetry-hud'] {
  --p-canvas: #07090f;
  --p-surface: #101522;
  --p-surface-2: #171f32;
  --p-ink: #f1f5f9;
  --p-muted: #94a3b8;
  --p-accent: #ff5e1a;
  --p-accent-ink: #07090f;
  --p-accent-2: #00e5ff;
  --p-border: rgba(0, 229, 255, 0.22);
  --p-radius: 6px;
  --p-btn-radius: 4px;
  --p-shadow: 0 14px 32px rgba(255, 94, 26, 0.18);
  --p-font-display: 'Syne', sans-serif;
  --p-bg-pattern:
    linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* 7. Quiet Luxury Atelier */
.preview-frame[data-style='quiet-luxury-atelier'] {
  --p-canvas: #faf6f2;
  --p-surface: #ffffff;
  --p-surface-2: #f2ebe3;
  --p-ink: #23191b;
  --p-muted: #6b5e61;
  --p-accent: #8f6422;
  --p-accent-ink: #ffffff;
  --p-accent-2: #9e475b;
  --p-border: rgba(35, 25, 27, 0.14);
  --p-radius: 4px;
  --p-btn-radius: 2px;
  --p-shadow: 0 8px 24px rgba(35, 25, 27, 0.04);
  --p-font-display: 'Cormorant Garamond', Georgia, serif;
  --p-bg-pattern: none;
}

/* 8. Neo-Editorial Kinetic */
.preview-frame[data-style='brutalist-editorial-pop'] {
  --p-canvas: #e9e6df;
  --p-surface: #faf9f6;
  --p-surface-2: #111111;
  --p-ink: #111111;
  --p-muted: #3f3f46;
  --p-accent: #d92020;
  --p-accent-ink: #ffffff;
  --p-accent-2: #b45309;
  --p-border: #111111;
  --p-border-w: 2px;
  --p-radius: 2px;
  --p-btn-radius: 2px;
  --p-shadow: 4px 4px 0 #111111;
  --p-font-display: 'Space Grotesk', sans-serif;
  --p-bg-pattern: none;
}

/* Mock Landing Internals */
.p-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: var(--p-border-w) solid var(--p-border);
  flex-wrap: wrap;
}

.p-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}

.p-brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--p-accent);
  display: inline-block;
}

.p-nav-items {
  display: flex;
  gap: 0.85rem;
  font-size: 0.78rem;
  color: var(--p-muted);
  flex-wrap: wrap;
}

.p-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .preview-stage:not(.compare-mode) .p-hero {
    grid-template-columns: 1.35fr 0.85fr;
    align-items: stretch;
  }
}

.p-eyebrow {
  display: inline-block;
  font-family: var(--p-font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--p-accent);
  margin: 0 0 0.55rem;
}

.p-headline {
  margin: 0 0 0.65rem;
  font-family: var(--p-font-display);
  font-size: clamp(1.65rem, 3.2vw, 2.6rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.preview-frame[data-style='xlabs-adaptive-matrix'] .p-headline,
.preview-frame[data-style='swiss-ivory-studio'] .p-headline,
.preview-frame[data-style='quiet-luxury-atelier'] .p-headline {
  font-weight: 400;
  letter-spacing: -0.01em;
}

.p-sub {
  margin: 0 0 1.1rem;
  font-size: 0.9rem;
  color: var(--p-muted);
  max-width: 56ch;
}

.p-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}

.p-btn-primary {
  background: var(--p-accent);
  color: var(--p-accent-ink);
  border: var(--p-border-w) solid var(--p-accent);
  border-radius: var(--p-btn-radius);
  padding: 0.65rem 1.05rem;
  min-height: 44px;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  box-shadow: var(--p-shadow);
}

.p-btn-secondary {
  background: var(--p-surface);
  color: var(--p-ink);
  border: var(--p-border-w) solid var(--p-border);
  border-radius: var(--p-btn-radius);
  padding: 0.65rem 1.05rem;
  min-height: 44px;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
}

.p-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr));
  gap: 0.55rem;
}

.p-kpi {
  background: var(--p-surface);
  border: var(--p-border-w) solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 0.6rem 0.7rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.p-kpi strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.p-kpi span {
  display: block;
  font-size: 0.7rem;
  color: var(--p-muted);
  margin-top: 0.15rem;
}

/* Interactive Side Widget inside Preview */
.p-widget {
  background: var(--p-surface);
  border: var(--p-border-w) solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 1rem;
  box-shadow: var(--p-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
}

.p-widget-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--p-font-mono);
  font-size: 0.7rem;
  color: var(--p-muted);
}

.p-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--p-accent-2);
  font-weight: 700;
}

.p-live-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--p-accent-2);
}

.p-widget-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
}

.p-widget-bar {
  background: var(--p-canvas);
  border: var(--p-border-w) solid var(--p-border);
  border-radius: calc(var(--p-radius) * 0.75);
  padding: 0.65rem 0.75rem;
  font-family: var(--p-font-mono);
  font-size: 0.74rem;
  color: var(--p-ink);
}

.p-widget-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.p-widget-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: var(--p-border-w) solid var(--p-border);
  background: var(--p-canvas);
  color: var(--p-muted);
}

/* Preview Cards Grid */
.p-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 195px), 1fr));
  gap: 0.75rem;
}

.p-card {
  background: var(--p-surface);
  border: var(--p-border-w) solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 0.9rem;
  box-shadow: var(--p-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.p-card-tag {
  font-family: var(--p-font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--p-accent);
  letter-spacing: 0.06em;
}

.p-card h4 {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
}

.p-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--p-muted);
  flex: 1;
}

.p-card-meta {
  font-family: var(--p-font-mono);
  font-size: 0.7rem;
  color: var(--p-muted);
  padding-top: 0.45rem;
  border-top: 1px solid var(--p-border);
}

.p-footer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: var(--p-border-w) solid var(--p-border);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-family: var(--p-font-mono);
  font-size: 0.7rem;
  color: var(--p-muted);
}

/* ---------- Section 4: Decision Builder ---------- */
.decision-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 960px) {
  .decision-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.decision-panel {
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 0;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.field-group > label,
.field-legend {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--shell-ink);
}

.radio-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.check-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: var(--shell-elevated);
  border: 1px solid var(--shell-border);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  min-width: 0;
  overflow-wrap: anywhere;
}

.check-card input {
  margin-top: 0.22rem;
  width: 18px;
  height: 18px;
  accent-color: var(--shell-accent);
  flex-shrink: 0;
}

.check-card span strong {
  display: block;
  font-size: 0.86rem;
}

.check-card span small {
  display: block;
  font-size: 0.78rem;
  color: var(--shell-muted);
}

.skills-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 0.45rem;
}

.output-box {
  background: #06080d;
  border: 1px solid var(--shell-border-strong);
  border-radius: 12px;
  padding: 1rem;
  font-family: var(--shell-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: #e2e8f0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 430px;
  overflow-y: auto;
}

.primary-action-btn {
  width: 100%;
  background: var(--shell-accent);
  color: var(--shell-accent-ink);
  border: 0;
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  min-height: 48px;
  font-weight: 800;
  font-size: 0.94rem;
  cursor: pointer;
  transition: filter 0.16s ease;
}

.primary-action-btn:hover {
  filter: brightness(1.08);
}

.copy-status {
  min-height: 1.4rem;
  font-size: 0.82rem;
  color: var(--shell-success);
  font-weight: 600;
  margin: 0;
}

.site-footer {
  padding: 2rem 0 3rem;
  font-size: 0.82rem;
  color: var(--shell-muted);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-row-tight {
  margin-bottom: 0;
}

.select-full-mt {
  width: 100%;
  margin-top: 0.35rem;
}

.decision-heading {
  margin: 0;
  font-size: 1.1rem;
}

.sr-copy-ta {
  position: fixed;
  left: -9999px;
  top: 0;
}

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