/* ===== V09 · CENTRO DE SIMULADORES — usa los tokens de body.bgsc-home (styles.css) ===== */

body.bgsc-home .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;
}

/* ---------- Encabezado ---------- */
body.bgsc-home .sm-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(260px, 17vw, 330px); display: flex; align-items: center;
  padding: clamp(18px, 1.8vw, 26px) 0 clamp(26px, 2.4vw, 36px);
  background: radial-gradient(60% 90% at 75% 40%, rgba(182,0,255,.28), transparent 70%), var(--bg-2);
}
body.bgsc-home .sm-hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 65% 50%; }
body.bgsc-home .sm-hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(10,8,23,.95) 0%, rgba(10,8,23,.82) 30%, rgba(10,8,23,.3) 56%, rgba(10,8,23,0) 72%),
    linear-gradient(180deg, rgba(10,8,23,.2) 0%, rgba(10,8,23,0) 30%, rgba(10,8,23,0) 72%, var(--bg) 100%);
}
body.bgsc-home .sm-crumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; font-size: .9rem; color: #e4def8; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
body.bgsc-home .sm-crumbs a:hover { color: #fff; }
body.bgsc-home .sm-crumbs [aria-current] { color: var(--violet); }
body.bgsc-home .sm-crumbs span[aria-hidden] { color: var(--dim); }
body.bgsc-home .sm-hero h1 { margin-top: 14px; font-size: clamp(2rem, 3.3vw, 3.2rem); font-weight: 800; line-height: 1.04; letter-spacing: -.035em; text-shadow: 0 2px 22px rgba(0,0,0,.45); }
body.bgsc-home .sm-hero h1 > span { display: block; color: #fff; }
body.bgsc-home .sm-hero h1 em { font-style: normal; background: linear-gradient(90deg, #a35bff, #c47dff); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.bgsc-home .sm-lead { margin-top: 14px; max-width: 640px; color: #ece8fb; font-size: clamp(.98rem, 1.15vw, 1.1rem); text-shadow: 0 1px 12px rgba(0,0,0,.5); }

/* ---------- Tarjetas ---------- */
body.bgsc-home .sm-main { padding: 22px 0 30px; }
body.bgsc-home .sm-h2 { scroll-margin-top: calc(var(--header-h) + 16px); font-size: clamp(1.5rem, 2.1vw, 2rem); font-weight: 800; margin-bottom: 16px; }
body.bgsc-home .sm-h2 span { color: var(--violet); }
body.bgsc-home .sm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
body.bgsc-home .sm-card {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) 120px; gap: 6px 16px; align-items: start;
  padding: 16px 18px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 16, 48, .92), rgba(14, 10, 32, .96));
  transition: border-color .25s, box-shadow .25s;
}
body.bgsc-home .sm-card:hover, body.bgsc-home .sm-card:has(.sm-go.is-active) { border-color: var(--violet); box-shadow: 0 18px 40px -26px rgba(139,61,255,.8); }
body.bgsc-home .sm-ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 12px; border: 1px solid rgba(167,128,255,.3); background: linear-gradient(160deg, rgba(139,61,255,.3), rgba(139,61,255,.08)); color: #c58bff; }
body.bgsc-home .sm-ico .ico { width: 34px; height: 34px; stroke-width: 1.5; }
body.bgsc-home .sm-txt h3 { font-size: 1.2rem; font-weight: 700; }
body.bgsc-home .sm-txt p { margin-top: 6px; font-size: .86rem; color: #d3cceb; line-height: 1.45; }
body.bgsc-home .sm-art { width: 120px; height: 90px; object-fit: contain; }
body.bgsc-home .sm-card-foot {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 8px; padding-top: 12px; border-top: 1px solid rgba(167,128,255,.16);
}
body.bgsc-home .sm-chips { display: inline-flex; align-items: center; padding: 5px 14px; border-radius: 999px; border: 1px solid rgba(167,128,255,.3); font-size: .78rem; color: #e4def8; }
body.bgsc-home .sm-chips span + span::before { content: "·"; margin: 0 10px; color: var(--violet); }
body.bgsc-home .sm-go { display: inline-flex; align-items: center; gap: 8px; color: var(--violet); font-weight: 700; font-size: .92rem; white-space: nowrap; }
body.bgsc-home .sm-go .ico { transition: transform .2s var(--ease); }
body.bgsc-home .sm-card:hover .sm-go .ico { transform: translateX(4px); }
body.bgsc-home .sm-stretch { position: absolute; inset: 0; z-index: 2; }

/* Sin JavaScript no hay cálculo: se avisa en lugar de mostrar formularios muertos */
body.bgsc-home .sm-nojs { margin-top: 14px; padding: 12px 16px; border-radius: 8px; border: 1px dashed rgba(167,128,255,.35); color: var(--muted); font-size: .9rem; }
html.sim-ok body.bgsc-home .sm-nojs { display: none; }
body.bgsc-home .sm-panels { display: none; }
html.sim-ok body.bgsc-home .sm-panels { display: block; }

/* ---------- Paneles ---------- */
body.bgsc-home .sm-panel {
  scroll-margin-top: calc(var(--header-h) + 16px);
  margin-top: 18px; padding: 20px 22px 22px; border-radius: 12px; border: 1px solid var(--violet);
  background: linear-gradient(180deg, rgba(26, 19, 56, .95), rgba(14, 10, 32, .98));
  box-shadow: 0 24px 60px -36px rgba(139,61,255,.9);
}
body.bgsc-home .sm-panel[hidden] { display: none; }
body.bgsc-home .sm-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
body.bgsc-home .sm-panel-head h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(1.3rem, 1.7vw, 1.6rem); font-weight: 800; outline: none; }
body.bgsc-home .sm-panel-head h2 .ico { width: 30px; height: 30px; color: var(--violet); }
body.bgsc-home .sm-close { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .88rem; font-weight: 600; }
body.bgsc-home .sm-close:hover { color: #fff; }
body.bgsc-home .sm-panel-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
body.bgsc-home .sm-panel-body-3 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .9fr); }

body.bgsc-home .sm-form { display: grid; gap: 14px; }
body.bgsc-home .sm-form fieldset, body.bgsc-home .sm-esc { margin: 0; padding: 0; border: 0; display: grid; gap: 12px; }
body.bgsc-home .sm-form legend, body.bgsc-home .sm-esc legend { margin-bottom: 10px; padding: 0; font-weight: 700; font-size: .95rem; color: var(--lav); }
body.bgsc-home .sm-form fieldset + fieldset { margin-top: 8px; }
body.bgsc-home .sm-field { display: grid; gap: 6px; }
body.bgsc-home .sm-field > span:first-child { font-size: .86rem; font-weight: 600; color: #ece7fc; }
body.bgsc-home .sm-field small { font-size: .76rem; color: var(--muted); }
body.bgsc-home .sm-field input, body.bgsc-home .sm-field select {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2);
  background: rgba(10,8,23,.7); color: #fff; font: inherit; font-size: 1rem;
}
body.bgsc-home .sm-field select { appearance: auto; }
body.bgsc-home .sm-field input:focus, body.bgsc-home .sm-field select:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(164,107,255,.2); }
body.bgsc-home .sm-money, body.bgsc-home .sm-pct { position: relative; display: block; }
body.bgsc-home .sm-money em, body.bgsc-home .sm-pct em { position: absolute; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); pointer-events: none; }
body.bgsc-home .sm-money em { left: 14px; }
body.bgsc-home .sm-money input { padding-left: 30px; }
body.bgsc-home .sm-pct em { right: 14px; }
body.bgsc-home .sm-pct input { padding-right: 34px; }

body.bgsc-home .sm-out { padding: 18px; border-radius: 10px; border: 1px solid rgba(167,128,255,.22); background: rgba(139,61,255,.07); }
body.bgsc-home .sm-big span { display: block; font-size: .86rem; color: var(--muted); }
body.bgsc-home .sm-big strong { display: block; margin-top: 4px; font-size: clamp(1.8rem, 2.6vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; color: #fff; }
body.bgsc-home .sm-kv { display: grid; gap: 10px; margin: 14px 0 0; }
body.bgsc-home .sm-big + .sm-kv { padding-top: 14px; border-top: 1px solid rgba(167,128,255,.18); }
body.bgsc-home .sm-kv > div { display: flex; justify-content: space-between; gap: 12px; }
body.bgsc-home .sm-kv dt { font-size: .88rem; color: var(--muted); }
body.bgsc-home .sm-kv dd { margin: 0; font-weight: 700; color: #fff; text-align: right; }
body.bgsc-home .sm-alert { margin-top: 14px; padding: 10px 12px; border-radius: 8px; font-size: .84rem; line-height: 1.45; background: rgba(255,120,120,.1); border: 1px solid rgba(255,140,140,.35); color: #ffc2c2; }
body.bgsc-home .sm-alert.is-info { background: rgba(139,61,255,.12); border-color: rgba(167,128,255,.35); color: var(--lav); }
body.bgsc-home .sm-alert[hidden] { display: none; }

/* ---------- Gráficas (SVG) ---------- */
body.bgsc-home .sm-chart { margin-top: 18px; height: 220px; border-radius: 10px; border: 1px solid rgba(167,128,255,.16); background: rgba(10,8,23,.5); padding: 10px; }
body.bgsc-home .sm-chart:empty { display: none; }
body.bgsc-home .sm-chart svg { display: block; width: 100%; height: 100%; }
body.bgsc-home [data-grafica="capacidad"] { height: 140px; }
body.bgsc-home .sm-chart-donut { height: 220px; margin-top: 0; border: 0; background: none; padding: 0; }
body.bgsc-home .sm-chart .g-grid { stroke: rgba(167,128,255,.14); stroke-width: 1; vector-effect: non-scaling-stroke; }
body.bgsc-home .sm-chart .b-cap { fill: #8b3dff; }
body.bgsc-home .sm-chart .b-int { fill: #e070ff; }
body.bgsc-home .sm-chart .b-lim { fill: rgba(167,128,255,.28); }
body.bgsc-home .sm-chart .a-area { fill: rgba(139,61,255,.22); }
body.bgsc-home .sm-chart .l-main { fill: none; stroke: #b98bff; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
body.bgsc-home .sm-chart .l-meta { stroke: #4fd1ff; stroke-width: 2; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
body.bgsc-home .sm-chart .l-a { fill: none; stroke: #b600ff; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
body.bgsc-home .sm-chart .l-b { fill: none; stroke: #4fd1ff; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
body.bgsc-home .sm-chart .d-base { fill: none; stroke: rgba(167,128,255,.15); stroke-width: 28; }
body.bgsc-home .sm-chart .d-seg { fill: none; stroke-width: 28; }
body.bgsc-home .c0 { --c: #8b3dff; } body.bgsc-home .c1 { --c: #b600ff; } body.bgsc-home .c2 { --c: #4fd1ff; }
body.bgsc-home .c3 { --c: #e070ff; } body.bgsc-home .c4 { --c: #ff9f5a; } body.bgsc-home .c5 { --c: #7ee2a8; }
body.bgsc-home .sm-chart .d-seg { stroke: var(--c); }

body.bgsc-home .sm-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: .8rem; color: var(--muted); }
body.bgsc-home .sm-legend span::before, body.bgsc-home .sm-legend-list li::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 3px; vertical-align: middle; background: var(--c, #8b3dff); }
body.bgsc-home .sm-legend .k-cap { --c: #8b3dff; } body.bgsc-home .sm-legend .k-int { --c: #e070ff; } body.bgsc-home .sm-legend .k-lim { --c: rgba(167,128,255,.4); }
body.bgsc-home .sm-legend .k-a { --c: #b600ff; } body.bgsc-home .sm-legend .k-b { --c: #4fd1ff; }
body.bgsc-home .sm-legend-list { display: grid; gap: 6px; margin-top: 8px; }
body.bgsc-home .sm-donut-wrap { display: grid; gap: 6px; }

/* ---------- Tablas ---------- */
body.bgsc-home .sm-table-wrap { margin-top: 16px; max-height: 340px; overflow: auto; border-radius: 10px; border: 1px solid rgba(167,128,255,.16); }
body.bgsc-home .sm-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
body.bgsc-home .sm-table th, body.bgsc-home .sm-table td { padding: 9px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid rgba(167,128,255,.1); }
body.bgsc-home .sm-table th:first-child { text-align: left; }
body.bgsc-home .sm-table thead th { position: sticky; top: 0; background: #1a1338; color: var(--lav); font-weight: 600; }
body.bgsc-home .sm-table tbody th { color: #ece7fc; font-weight: 600; }
body.bgsc-home .sm-table tbody td { color: #fff; }
body.bgsc-home .sm-table-comp { font-size: .92rem; }
body.bgsc-home .sm-table-comp tbody td:last-child { color: var(--lav); }
body.bgsc-home .sm-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
body.bgsc-home .sm-esc { padding: 16px !important; border-radius: 10px !important; border: 1px solid rgba(167,128,255,.22) !important; }
body.bgsc-home .sm-esc-a legend { color: #d58bff; }
body.bgsc-home .sm-esc-b legend { color: #8fe0ff; }

/* ---------- Aviso + ayuda ---------- */
body.bgsc-home .sm-info { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line); background: rgba(22,16,48,.8); font-size: .86rem; color: #e4def8; }
body.bgsc-home .sm-info .ico { width: 22px; height: 22px; color: var(--violet); flex: none; margin-top: 1px; }
body.bgsc-home .sm-band {
  position: relative; isolation: isolate; overflow: hidden; margin-top: 16px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 20px 24px;
  border-radius: 10px; border: 1px solid var(--line); background: linear-gradient(90deg, rgba(26,19,56,.95), rgba(30,18,66,.9));
}
body.bgsc-home .sm-band-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
body.bgsc-home .sm-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(18,13,40,.97) 0%, rgba(18,13,40,.88) 45%, rgba(18,13,40,.55) 75%, rgba(18,13,40,.45) 100%); }
body.bgsc-home .sm-band-ico { width: 60px; height: 60px; color: var(--violet); padding-right: 22px; box-sizing: content-box; border-right: 1px solid rgba(167,128,255,.3); }
body.bgsc-home .sm-band-copy { flex: 1 1 320px; }
body.bgsc-home .sm-band h2 { font-size: clamp(1.15rem, 1.6vw, 1.45rem); font-weight: 800; }
body.bgsc-home .sm-band h2 span { color: var(--violet); }
body.bgsc-home .sm-band p { margin-top: 6px; color: #e4def8; font-size: .9rem; }
body.bgsc-home .sm-band-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
body.bgsc-home .sm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.bgsc-home .sm-panel-body-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
body.bgsc-home .sm-donut-wrap { grid-column: 1 / -1; grid-template-columns: 220px 1fr; align-items: center; }
}
@media (max-width: 900px) {
body.bgsc-home .sm-grid, body.bgsc-home .sm-panel-body, body.bgsc-home .sm-panel-body-3, body.bgsc-home .sm-compare { grid-template-columns: 1fr; }
body.bgsc-home .sm-donut-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
body.bgsc-home .sm-hero-bg { object-position: 72% 50%; }
body.bgsc-home .sm-hero-shade { background: linear-gradient(180deg, rgba(10,8,23,.6) 0%, rgba(10,8,23,.78) 55%, var(--bg) 100%); }
body.bgsc-home .sm-crumbs { font-size: .82rem; }
body.bgsc-home .sm-card { grid-template-columns: auto minmax(0, 1fr); }
body.bgsc-home .sm-art { display: none; }
body.bgsc-home .sm-ico { width: 52px; height: 52px; }
body.bgsc-home .sm-panel { padding: 16px; }
body.bgsc-home .sm-chart { height: 180px; }
body.bgsc-home .sm-band-ico { display: none; }
body.bgsc-home .sm-band-cta .btn { flex: 1 1 100%; }
}
