/* ========================================
   Sabatelli Systems — Mission Control UI
   Dark theme · Desktop-first · Responsive
   ======================================== */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Palette — Backgrounds */
  --bg-body:        #090c14;
  --bg-surface:     #0f1320;
  --bg-card:        #141926;
  --bg-card-hover:  #1a2033;
  --bg-section-alt: #0d1019;
  --bg-nav:         rgba(9, 12, 20, 0.92);
  --bg-input:       #111624;
  --bg-panel:       #10141f;

  /* Palette — Accent */
  --accent:         #0ea5e9;
  --accent-hover:   #38bdf8;
  --accent-glow:    rgba(14, 165, 233, 0.18);
  --accent-soft:    rgba(14, 165, 233, 0.12);

  /* Palette — Semantic */
  --green:          #22c55e;
  --green-soft:     rgba(34, 197, 94, 0.15);
  --yellow:         #eab308;
  --yellow-soft:    rgba(234, 179, 8, 0.15);
  --red:            #ef4444;
  --red-soft:       rgba(239, 68, 68, 0.15);

  /* Palette — Text */
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --text-dim:       #475569;

  /* Palette — Borders */
  --border:         #1e293b;
  --border-card:    #1e293b;
  --border-hover:   var(--accent);
  --border-subtle:  rgba(30, 41, 59, 0.5);

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

  /* Spacing */
  --sp-2xs: 0.25rem;
  --sp-xs:  0.5rem;
  --sp-sm:  1rem;
  --sp-md:  1.5rem;
  --sp-lg:  2.5rem;
  --sp-xl:  4rem;
  --sp-2xl: 6rem;

  /* Layout */
  --max-width:   1200px;
  --nav-height:  60px;
  --sidebar-w:   280px;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-pill:  9999px;

  /* Motion */
  --ease-fast: 150ms ease;
  --ease-base: 250ms ease;
  --ease-slow: 400ms ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
table { border-collapse: collapse; }

/* ---------- CONTAINER ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background var(--ease-base);
}

.nav--scrolled {
  background: rgba(9, 12, 20, 0.98);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav__logo .accent { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  list-style: none;
}

.nav__links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--ease-fast);
}

.nav__links a:hover,
.nav__links a.active { color: var(--accent); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease-fast);
  border: 2px solid transparent;
  white-space: nowrap;
  font-family: inherit;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn--secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn--secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg-card-hover);
}

.btn--outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn--outline:hover {
  background: var(--accent-soft);
  border-color: var(--accent-hover);
  color: var(--accent-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn--ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.btn--danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn--danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

.btn--sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn--lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn--block { width: 100%; }

/* ---------- SECTION UTILITIES ---------- */
.section {
  padding: var(--sp-2xl) 0;
}

.section--alt {
  background: var(--bg-section-alt);
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--sp-xl);
  letter-spacing: -0.02em;
}

.section-sub {
  text-align: center;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--sp-lg);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ---------- HERO ---------- */
.hero {
  padding-top: calc(var(--nav-height) + var(--sp-2xl));
  padding-bottom: var(--sp-2xl);
  text-align: center;
}

.hero__headline {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--sp-md);
}

.hero__sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto var(--sp-lg);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: var(--sp-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- CARD GRID ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
}

.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }
.card-grid--auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card-grid--auto-sm { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--sp-md);
  transition: transform var(--ease-base), border-color var(--ease-base), box-shadow var(--ease-base);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 4px 24px var(--accent-glow);
}

.card--flat:hover {
  transform: none;
  box-shadow: none;
}

.card__icon {
  color: var(--accent);
  margin-bottom: var(--sp-sm);
  line-height: 1;
}

.card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: var(--sp-xs);
}

.card__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: var(--sp-sm);
}

.card__header-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card__footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

/* ---------- BUILDER PANEL ---------- */
.panel-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: var(--sp-md);
  min-height: 600px;
}

.panel-sidebar {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-md);
  overflow-y: auto;
}

.panel-sidebar__title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--sp-sm);
}

.panel-sidebar__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--ease-fast), color var(--ease-fast);
}

.panel-sidebar__item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.panel-sidebar__item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.panel-main {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  overflow-y: auto;
}

/* ---------- TABLES ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.tbl th {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.tbl td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.tbl tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.tbl td.mono {
  font-family: var(--font-mono);
}

/* ---------- CHIPS / BADGES ---------- */
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.5;
}

.badge--accent  { background: var(--accent-soft); color: var(--accent); }
.badge--green   { background: var(--green-soft);  color: var(--green); }
.badge--yellow  { background: var(--yellow-soft); color: var(--yellow); }
.badge--red     { background: var(--red-soft);     color: var(--red); }
.badge--muted   { background: rgba(148, 163, 184, 0.15); color: var(--text-secondary); }

.chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
}

.pill--green  { background: var(--green-soft);  color: var(--green); }
.pill--yellow { background: var(--yellow-soft); color: var(--yellow); }
.pill--red    { background: var(--red-soft);     color: var(--red); }
.pill--muted  { background: rgba(100, 116, 139, 0.15); color: var(--text-muted); }

/* ---------- TABS ---------- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-md);
  overflow-x: auto;
}

.tab {
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--ease-fast), border-color var(--ease-fast);
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

/* ---------- TREND MINI-CHART PLACEHOLDER ---------- */
.sparkline-row {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.mini-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mini-bar__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 80px;
}

.mini-bar__track {
  flex: 1;
  height: 8px;
  background: rgba(148, 163, 184, 0.15);
  border-radius: 4px;
  overflow: hidden;
  min-width: 80px;
}

.mini-bar__fill {
  height: 100%;
  border-radius: 4px;
  transition: width 600ms ease;
}

.mini-bar__fill--accent { background: var(--accent); }
.mini-bar__fill--green  { background: var(--green); }
.mini-bar__fill--yellow { background: var(--yellow); }
.mini-bar__fill--red    { background: var(--red); }

.mini-bar__value {
  font-size: 0.8rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  min-width: 28px;
  text-align: right;
}

.delta {
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.delta--up   { color: var(--red); }
.delta--down { color: var(--green); }
.delta--flat { color: var(--text-muted); }

/* ---------- STAT ROW ---------- */
.stat-row {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.stat-item {
  font-size: 0.75rem;
}

.stat-item__label {
  color: var(--text-muted);
}

.stat-item__value {
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* ---------- DIRECTION ICONS ---------- */
.dir-icon {
  font-size: 1.2rem;
  font-weight: 700;
}

.dir-icon--bullish  { color: var(--green); }
.dir-icon--bearish  { color: var(--red); }
.dir-icon--neutral  { color: var(--text-muted); }

/* ---------- CAPABILITIES ---------- */
.capabilities {
  padding: var(--sp-2xl) 0;
  background: var(--bg-section-alt);
}

/* ---------- DEMO FLOW ---------- */
.demo-flow {
  padding: var(--sp-2xl) 0;
}

.demo-placeholder {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
}

.demo-placeholder__text {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-family: var(--font-mono);
}

/* ---------- CTA SECTION ---------- */
.cta-section {
  padding: var(--sp-2xl) 0;
  background: var(--bg-section-alt);
  text-align: center;
}

.cta-section__headline {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-sm);
}

.cta-section__sub {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto var(--sp-lg);
  line-height: 1.7;
}

.cta-section__actions {
  display: flex;
  gap: var(--sp-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- FOOTER ---------- */
.footer {
  padding: var(--sp-lg) 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- UTILITY CLASSES ---------- */
.text-mono   { font-family: var(--font-mono); }
.text-muted  { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-sm     { font-size: 0.8rem; }
.text-xs     { font-size: 0.7rem; }
.text-center { text-align: center; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.gap-xs       { gap: var(--sp-xs); }
.gap-sm       { gap: var(--sp-sm); }
.mb-xs        { margin-bottom: var(--sp-xs); }
.mb-sm        { margin-bottom: var(--sp-sm); }
.mb-md        { margin-bottom: var(--sp-md); }
.mt-sm        { margin-top: var(--sp-sm); }

/* ---------- LOADING STATE ---------- */
.loading-msg {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.error-msg {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

/* ---------- RESPONSIVE — TABLET (≤ 900px) ---------- */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid--4 { grid-template-columns: repeat(2, 1fr); }

  .panel-layout {
    grid-template-columns: 1fr;
  }

  .panel-sidebar {
    max-height: 240px;
  }
}

/* ---------- RESPONSIVE — MOBILE (≤ 540px) ---------- */
@media (max-width: 540px) {
  :root {
    --sp-md: 1rem;
    --sp-lg: 1.5rem;
    --sp-xl: 2.5rem;
    --sp-2xl: 3.5rem;
  }

  .card-grid,
  .card-grid--2,
  .card-grid--4,
  .card-grid--auto,
  .card-grid--auto-sm { grid-template-columns: 1fr; }

  .hero__actions,
  .cta-section__actions {
    flex-direction: column;
    align-items: center;
  }

  .btn--lg {
    width: 100%;
    max-width: 320px;
  }

  .section-title { font-size: 1.5rem; }

  .tabs { gap: 0; }
  .tab { padding: 0.55rem 0.85rem; font-size: 0.8rem; }

  .nav__links { display: none; }

  .tbl { font-size: 0.78rem; }
  .tbl th, .tbl td { padding: 0.45rem 0.5rem; }
}

/* ========== BUILDER CONFIGURATOR ========== */

.builder {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-lg);
  align-items: start;
}

.builder__main {
  min-width: 0;
}

/* Domain switch */
.builder__domain-switch {
  display: flex;
  gap: var(--sp-xs);
  margin-bottom: var(--sp-lg);
}

.builder__domain-btn {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: all var(--ease-fast, 150ms ease);
}

.builder__domain-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.builder__domain-btn--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Category grid */
.builder__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-md);
}

.builder__category {
  background: var(--bg-card);
  border: 1px solid var(--border-card, var(--border));
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
}

.builder__category-header {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  background: rgba(14, 165, 233, 0.04);
}

.builder__parts-list {
  padding: 0.5rem;
}

/* Individual part option */
.builder__part {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--ease-fast, 150ms ease);
  margin-bottom: 0.25rem;
}

.builder__part:hover {
  background: rgba(14, 165, 233, 0.06);
}

.builder__part--selected {
  border-color: var(--accent);
  background: rgba(14, 165, 233, 0.08);
  box-shadow: 0 0 12px var(--accent-glow, rgba(14, 165, 233, 0.25));
}

.builder__radio {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.builder__part-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.builder__part-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.builder__part-price {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
  flex-shrink: 0;
  margin-left: 0.5rem;
}

/* Summary panel */
.builder__summary {
  background: var(--bg-card);
  border: 1px solid var(--border-card, var(--border));
  border-radius: var(--radius-lg, 12px);
  padding: var(--sp-md);
  position: sticky;
  top: calc(var(--nav-h, 64px) + var(--sp-md));
}

.builder__summary-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--sp-sm);
  color: var(--text-primary);
}

.builder__subtotals {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.builder__subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.builder__subtotal-label {
  color: var(--text-secondary);
}

.builder__subtotal-value {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 500;
}

.builder__divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}

.builder__total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.builder__total-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.builder__total-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* Performance bar */
.builder__perf-section {
  margin: 0.25rem 0;
}

.builder__perf-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.builder__perf-label strong {
  color: var(--text-primary);
}

.builder__perf-bar {
  height: 8px;
  background: rgba(148, 163, 184, 0.15);
  border-radius: 4px;
  overflow: hidden;
}

.builder__perf-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 400ms ease;
}

/* Power draw */
.builder__power-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.builder__power-value {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-weight: 600;
}

/* Warnings */
.builder__warnings {
  margin-top: 0.25rem;
}

.builder__warnings-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.builder__warning-item {
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm, 6px);
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.builder__warning-item--warning {
  background: var(--yellow-soft, rgba(234, 179, 8, 0.12));
  color: var(--yellow, #eab308);
  border-left: 3px solid var(--yellow, #eab308);
}

.builder__warning-item--error {
  background: var(--red-soft, rgba(239, 68, 68, 0.12));
  color: var(--red, #ef4444);
  border-left: 3px solid var(--red, #ef4444);
}

.builder__compat-ok {
  font-size: 0.82rem;
  color: var(--green, #22c55e);
  padding: 0.4rem 0;
}

/* Save / Load */
.builder__save-load {
  display: flex;
  gap: var(--sp-xs);
}

.builder__save-load .btn {
  flex: 1;
}

/* Builder responsive — tablet */
@media (max-width: 900px) {
  .builder {
    grid-template-columns: 1fr;
  }

  .builder__summary {
    position: static;
  }
}

/* Builder responsive — mobile */
@media (max-width: 540px) {
  .builder__grid {
    grid-template-columns: 1fr;
  }
}
