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

:root {
  --blue:      #004a97;
  --accent:    #3a7fd5;
  --rule:      rgba(0, 74, 151, 0.12);
  --rule-mid:  rgba(0, 74, 151, 0.22);
  --dark:      #0f1923;
  --mid:       rgba(15, 25, 35, 0.88);
  --dim:       rgba(15, 25, 35, 0.72);
  --mono:      'Courier New', Courier, monospace;
  --topbar-h:  48px;
  --botbar-h:  28px;
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
}

html, body { height: 100%; overflow: hidden; }

body {
  background-color: #001a3a;
  background-image:
    linear-gradient(rgba(58,127,213,0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58,127,213,0.18) 1px, transparent 1px),
    linear-gradient(rgba(58,127,213,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58,127,213,0.07) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

/* ── App shell ── */
.app-shell {
  position: fixed;
  inset: 5vh 5vw;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Top bar ── */
.topbar {
  flex-shrink: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--rule-mid);
  font-family: var(--mono);
  font-size: 0.57rem;
  letter-spacing: 0.12em;
  color: var(--mid);
}

.sys-id { color: var(--blue); font-weight: bold; letter-spacing: 0.14em; font-size: 0.75rem; }
.sys-ver { display: flex; align-items: center; gap: 7px; font-size: 0.72rem; }

nav { display: flex; gap: 1.8rem; }
nav a {
  color: var(--mid);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: #ff6a00;
  transform: scaleX(0);
  transition: transform 0.25s var(--ease);
}
nav a:hover  { color: #ff6a00; }
nav a.active { color: #ff6a00; }
nav a.active::after { transform: scaleX(1); }

.status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #00b86b;
  box-shadow: 0 0 6px #00b86b;
  flex-shrink: 0;
}

/* ── Dashboard grid ── */
.dashboard {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 20vw 1fr 20vw;
  transition: grid-template-columns 0.6s var(--ease);
}

/* ── Side panels ── */
.panel {
  position: relative;
  overflow: hidden;
}
.panel-left  { border-right: 1px solid var(--rule-mid); }
.panel-right { border-left: 1px solid var(--rule-mid); display: flex; flex-direction: column; }

/* ── Panel content blocks (stacked, one visible at a time) ── */
.panel-content {
  position: absolute;
  inset: 0;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.panel-content.active {
  opacity: 1;
  pointer-events: auto;
}
.panel-content::-webkit-scrollbar { width: 3px; }
.panel-content::-webkit-scrollbar-thumb { background: var(--rule-mid); }

/* Narrow panel (collapsed sidebar) */
.panel-narrow {
  align-items: center;
  justify-content: center;
  padding: 0;
}
.vertical-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  white-space: nowrap;
}

/* ── Shared panel typography ── */
.zone-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  flex-shrink: 0;
}
.headline-block h1 {
  font-size: clamp(1.4rem, 2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--dark);
}
.headline-block p {
  margin-top: 0.5rem;
  font-size: 0.73rem;
  color: var(--mid);
  line-height: 1.65;
}
.h-rule { height: 1px; background: var(--rule); flex-shrink: 0; }

.data-rows { display: flex; flex-direction: column; gap: 7px; }
.data-row  { display: flex; justify-content: space-between; align-items: baseline; }
.data-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--dim);
}
.data-value {
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--blue);
  letter-spacing: 0.04em;
}

.spec-block { display: flex; flex-direction: column; gap: 5px; }
.spec-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.09em;
  color: var(--dim);
}
.spec-row span:last-child { color: var(--mid); }

.alloc-diagram {
  width: 100%;
  flex-shrink: 0;
}
.alloc-diagram svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.asset-list { display: flex; flex-direction: column; gap: 7px; }
.asset-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--mid);
}
.asset-tag { margin-left: auto; color: var(--dim); font-size: 0.58rem; }

.diagram { width: 100%; flex-shrink: 0; }

.annotation-list { display: flex; flex-direction: column; gap: 5px; }
.annotation {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  color: var(--dim);
  padding-left: 8px;
  border-left: 1px solid rgba(0,74,151,0.3);
  line-height: 1.6;
}

/* ── Soluciones-specific ── */
.sol-cards { display: flex; flex-direction: column; gap: 8px; }
.sol-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px;
  border: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s, background 0.2s;
}
.sol-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 74, 151, 0.1);
  border-color: rgba(0, 74, 151, 0.4);
  background: rgba(0, 74, 151, 0.03);
}
.sol-card-link { border-color: rgba(0, 74, 151, 0.2); }
.sol-card-cta {
  border-color: var(--blue);
  background: rgba(0, 74, 151, 0.04);
}
.sol-card-cta:hover {
  background: rgba(0, 74, 151, 0.08);
  box-shadow: 0 6px 24px rgba(0, 74, 151, 0.15);
}
.sol-arrow {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--blue);
  opacity: 0.6;
  align-self: center;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.sol-card:hover .sol-arrow {
  transform: translate(2px, -2px);
  opacity: 1;
}
.sol-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  flex-shrink: 0;
  padding-top: 1px;
}
.sol-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 3px;
}
.sol-desc {
  font-family: var(--mono);
  font-size: 0.63rem;
  color: var(--mid);
  line-height: 1.5;
  letter-spacing: 0.04em;
}
.sector-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.sector-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--blue);
  border: 1px solid var(--rule-mid);
  padding: 2px 6px;
}

/* ── Panel section wrapper ── */
.panel-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Left panel default — 4-section grid layout ── */
[data-panel="left"][data-content="default"] {
  display: grid;
  /* §1 pitch: natural height | §2-§3 sol-shortcut: equal share | §4 alloc: natural height */
  grid-template-rows: auto 1fr 1fr auto;
  gap: 0;
  /* grid items stretch to fill their row by default (align-items: stretch) */
}
/* Separator lines between sections */
[data-panel="left"][data-content="default"] .panel-section + .panel-section {
  border-top: 1px solid var(--rule);
  padding-top: 10px;
}
/* Compact headline so sections balance */
[data-panel="left"][data-content="default"] .headline-block h1 {
  font-size: clamp(1.05rem, 1.5vw, 1.55rem);
  line-height: 1.08;
}
[data-panel="left"][data-content="default"] .headline-block p {
  margin-top: 0.28rem;
  font-size: 0.66rem;
}
/* Section 2 & 3 — readable size */
[data-panel="left"][data-content="default"] .data-label {
  font-size: 0.82rem;
}
[data-panel="left"][data-content="default"] .data-rows {
  gap: 8px;
}
[data-panel="left"][data-content="default"] .spec-row {
  font-size: 0.76rem;
}
[data-panel="left"][data-content="default"] .spec-block {
  gap: 7px;
}

/* ── Center panel ── */
.center-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  transition: padding 0.6s var(--ease);
}

.center-label {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.46rem;
  letter-spacing: 0.18em;
  color: rgba(0,74,151,0.55);
}
.center-label.top    { top: 10px; }
.center-label.bottom { bottom: 10px; }

.panel-logo-wrap {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 12px;
  border-bottom: 1px solid var(--rule-mid);
}
.panel-logo {
  width: 80%;
  height: auto;
  max-height: 90px;
  object-fit: contain;
  opacity: 0.88;
  transition: width 0.6s var(--ease);
}
.panel-content-area {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

#animation-container {
  width: min(460px, 62vh, 80%);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  transition: width 0.6s var(--ease);
  flex-shrink: 0;
}
#animation-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.caption {
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.48rem;
  letter-spacing: 0.2em;
  color: rgba(0,74,151,0.55);
  flex-shrink: 0;
}

/* ── Forum extra content ── */
.forum-extra {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.45s var(--ease) 0.15s, max-height 0.5s var(--ease) 0.1s;
  padding: 0 20px;
}
.forum-extra.visible {
  opacity: 1;
  max-height: 260px;
}
.forum-topics {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
}
.forum-topic {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  font-family: var(--mono);
  transition: border-color 0.2s;
}
.forum-topic:hover { border-color: var(--rule-mid); }
.topic-badge {
  font-size: 0.42rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--rule-mid);
  padding: 1px 5px;
  flex-shrink: 0;
}
.topic-title {
  font-size: 0.58rem;
  color: var(--dark);
  letter-spacing: 0.02em;
  flex: 1;
}
.topic-meta {
  font-size: 0.44rem;
  color: var(--dim);
  flex-shrink: 0;
}

/* ── Section shortcuts (§2 Cobertura, §3 Productos → soluciones) ── */
/* Grid rows fill the full card height; negative h-margins bleed background to panel edges */
.sol-shortcut {
  cursor: pointer;
  margin-left: -14px;
  margin-right: -14px;
  padding-left: 14px;
  padding-right: 14px;
  border-left: 2px solid transparent;
  transition: background 0.2s var(--ease), border-left-color 0.2s;
}
.sol-shortcut:hover {
  background: rgba(0, 74, 151, 0.055);
  border-left-color: var(--blue);
}
.sol-shortcut:hover .sol-shortcut-hint {
  opacity: 1;
  transform: translateX(3px);
}
.sol-shortcut:hover .zone-label,
.sol-shortcut:hover .data-label,
.sol-shortcut:hover .spec-row span:first-child {
  color: var(--blue);
}
.sol-shortcut-hint {
  font-size: 0.6rem;
  color: var(--accent);
  opacity: 0;
  margin-left: 4px;
  display: inline-block;
  transition: opacity 0.18s, transform 0.18s var(--ease);
}

/* ── Capital allocation trigger ── */
.alloc-trigger {
  cursor: pointer;
  border-radius: 0;
  transition: background 0.22s var(--ease), outline-color 0.22s;
  outline: 1px solid transparent;
  padding: 8px;
  /* zero top/bottom margins so the grid auto row is correctly sized;
     keep left/right bleed for hover area */
  margin: 0 -8px;
}
.alloc-trigger:hover {
  background: rgba(0,74,151,0.04);
  outline-color: rgba(0,74,151,0.22);
}
.alloc-trigger:hover .alloc-expand {
  opacity: 1;
  transform: translate(1px,-1px);
}
.alloc-expand {
  font-size: 0.62rem;
  color: var(--accent);
  opacity: 0.4;
  margin-left: 4px;
  display: inline-block;
  transition: opacity 0.2s, transform 0.2s var(--ease);
}

/* ── Capital allocation modal overlay ── */
.alloc-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,15,30,0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease);
}
.alloc-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.alloc-modal-card {
  background: #ffffff;
  width: min(900px, 90vw);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(14px) scale(0.99);
  transition: transform 0.32s var(--ease);
}
.alloc-modal.open .alloc-modal-card {
  transform: translateY(0) scale(1);
}

/* Modal header */
.alloc-modal-head {
  flex-shrink: 0;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  border-bottom: 1px solid var(--rule-mid);
  font-family: var(--mono);
}
.alloc-modal-sys {
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  color: var(--dim);
}
.alloc-modal-title {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  flex: 1;
}
.alloc-modal-close {
  background: none;
  border: 1px solid var(--rule-mid);
  color: var(--dim);
  font-size: 0.7rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.alloc-modal-close:hover { border-color: var(--blue); color: var(--blue); }

/* Modal body: chart + text */
.alloc-modal-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.alloc-modal-chart {
  padding: 28px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--rule);
  overflow: hidden;
}
.alloc-modal-chart svg {
  width: 100%;
  height: auto;
  max-height: 100%;
}

/* Right-side explanation */
.alloc-modal-text {
  padding: 24px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.alloc-modal-text::-webkit-scrollbar { width: 3px; }
.alloc-modal-text::-webkit-scrollbar-thumb { background: var(--rule-mid); }

.alloc-section { display: flex; flex-direction: column; gap: 6px; }
.alloc-section-label {
  font-family: var(--mono);
  font-size: 0.60rem;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.alloc-section-body {
  font-size: 0.72rem;
  line-height: 1.65;
  color: var(--mid);
}
.alloc-section-body em {
  font-style: normal;
  color: var(--blue);
  font-weight: 600;
}
.alloc-rule {
  height: 1px;
  background: var(--rule);
  flex-shrink: 0;
}
.alloc-section-cta { gap: 10px; }
.alloc-cta-btn {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blue);
  border: none;
  padding: 8px 18px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.15s var(--ease);
}
.alloc-cta-btn:hover {
  background: #003a7a;
  transform: translateY(-1px);
}

/* ── PHLEET links ── */
.phleet-link {
  color: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.phleet-link:hover { color: var(--blue); }

/* ── Bottom bar ── */
.bottombar {
  flex-shrink: 0;
  height: var(--botbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-top: 1px solid var(--rule-mid);
  font-family: var(--mono);
  font-size: 0.48rem;
  letter-spacing: 0.12em;
  color: var(--dim);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET  (≤ 900px)
   ═══════════════════════════════════════════════════════════ */
/* Hamburger + mobile menu: always hidden on desktop */
.hamburger-btn        { display: none; }
.mobile-menu          { display: none; }
/* Mobile-only elements: hidden on desktop */
.mobile-scroll-section { display: none; }
.mobile-section        { display: none; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE / TABLET  (≤ 900px)
   Layout: full-screen hero → scrollable content cards
   Navigation: hamburger button top-right → bottom-sheet menu
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {

  /* ── Allow page to scroll ── */
  html, body { overflow: auto; height: auto; }

  /* White body on mobile so canvas transparent bg shows white */
  body { background: #fff; background-image: none; }

  /* ── App shell: edge-to-edge, scrollable column ── */
  .app-shell {
    position: relative;
    inset: unset;
    width: 100%;
    min-height: 100dvh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: visible;
    padding-bottom: 0;
  }

  /* ── Top bar: sticky brand strip ── */
  .topbar {
    position: sticky;
    top: 0;
    z-index: 150;
    background: #fff;
    height: 44px;
    min-height: unset;
    padding: 0 60px 0 18px; /* right padding leaves room for hamburger */
    flex-wrap: nowrap;
    border-bottom: 1px solid var(--rule-mid);
    box-shadow: 0 1px 0 var(--rule);
  }
  .sys-id { font-size: 0.7rem; letter-spacing: 0.14em; }
  .sys-ver { display: none; }

  /* ── Desktop nav: hidden on mobile (hamburger replaces it) ── */
  nav { display: none !important; }

  /* ─────────────────────────────────────────────────────────
     HAMBURGER BUTTON
     ───────────────────────────────────────────────────────── */
  .hamburger-btn {
    display: flex;
    position: fixed;
    top: 8px;
    right: 14px;
    z-index: 300;
    width: 36px;
    height: 36px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.96);
    border: 1px solid var(--rule-mid);
    cursor: pointer;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,74,151,0.08);
  }
  .hamburger-btn span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--blue);
    transition: transform 0.22s var(--ease), opacity 0.18s;
  }
  .hamburger-btn.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .hamburger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger-btn.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* ─────────────────────────────────────────────────────────
     MOBILE MENU — bottom sheet overlay
     ───────────────────────────────────────────────────────── */
  .mobile-menu {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 250;
    background: rgba(1,10,22,0.60);
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease);
  }
  .mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-menu-card {
    width: 100%;
    background: #fff;
    padding: 28px 24px 44px;
    display: flex;
    flex-direction: column;
    transform: translateY(28px);
    transition: transform 0.3s var(--ease);
  }
  .mobile-menu.open .mobile-menu-card { transform: translateY(0); }
  .mobile-menu-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 4px;
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    color: var(--blue);
  }
  .mobile-menu-head button {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--mid);
    cursor: pointer;
    padding: 0;
    line-height: 1;
  }
  .mobile-menu-link {
    display: block;
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--dark);
    text-decoration: none;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    transition: color 0.18s;
  }
  .mobile-menu-link:hover,
  .mobile-menu-link.active { color: #ff6a00; }
  .mobile-menu-cta {
    display: block;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: #fff;
    background: var(--blue);
    text-decoration: none;
    padding: 13px 20px;
    text-align: center;
    margin-top: 20px;
    transition: background 0.2s;
  }
  .mobile-menu-cta:hover { background: #003a7a; }

  /* ─────────────────────────────────────────────────────────
     DASHBOARD — hidden on mobile (dedicated sections replace it)
     ───────────────────────────────────────────────────────── */
  .dashboard { display: none !important; }

  /* ─────────────────────────────────────────────────────────
     MOBILE SCROLL HERO — white background, scroll-driven
     ───────────────────────────────────────────────────────── */
  .mobile-scroll-section {
    display: block;
    height: 120vh;        /* 20vh of scroll distance — just enough for the spread */
    position: relative;
    background: #fff;
  }
  .mobile-scroll-sticky {
    position: sticky;
    top: 44px;
    height: calc(100vh - 44px);
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    overflow: visible;
    padding-bottom: 48px;
    z-index: 20;              /* heading ABOVE canvas (z-index: 10) */
  }
  .mobile-scroll-heading {
    flex-shrink: 0;
    padding: 5vh 16px 0;
    text-align: center;
    width: 100%;
    will-change: opacity, transform;
  }
  .mobile-scroll-heading h1 {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: clamp(1.6rem, 7.5vw, 2.4rem);
    font-weight: 700;
    color: var(--dark);
    line-height: 1.1;
    letter-spacing: 0.04em;
    margin-bottom: 0.55rem;
  }
  .mobile-scroll-heading p {
    font-size: 0.78rem;
    color: var(--mid);
    line-height: 1.6;
    max-width: 38ch;
    margin: 0 auto;
    font-family: 'Segoe UI', system-ui, sans-serif;
  }
  .mobile-scroll-anim {
    display: none; /* canvas is no longer placed here — it's fixed on body */
  }
  .mobile-scroll-hint {
    position: absolute;
    bottom: 14px;
    font-family: var(--mono);
    font-size: 0.44rem;
    letter-spacing: 0.22em;
    color: var(--dim);
    will-change: opacity;
    animation: mob-bounce 2s ease-in-out infinite;
  }
  @keyframes mob-bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(5px); }
  }

  /* Animation canvas: fixed ABOVE section content so particles bleed into next section.
     Sections (z-index: 2) are below this; canvas transparency reveals them underneath. */
  #animation-container {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    overflow: visible !important;
    box-shadow: none !important;
    transform: translateY(14vh) !important; /* push form into lower half, away from heading */
    z-index: 10;
    pointer-events: none;
  }

  /* ─────────────────────────────────────────────────────────
     OLD DARK HERO — hidden on mobile (canvas moved to scroll section)
     ───────────────────────────────────────────────────────── */
  .center-panel {
    display: none !important;
  }
  /* Keep old rules below as no-op fallback */
  .center-panel-unused {
    order: -1;
    border: none;
    background: #030d1a;
    background-image:
      linear-gradient(rgba(58,127,213,0.12) 1px, transparent 1px),
      linear-gradient(90deg, rgba(58,127,213,0.12) 1px, transparent 1px);
    background-size: 32px 32px;
    min-height: calc(100dvh - 44px);
    min-height: calc(100vh - 44px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0 24px;
    border-bottom: 1px solid rgba(58,127,213,0.25);
  }
  .center-label {
    display: block;
    color: rgba(58, 127, 213, 0.45);
    font-size: 0.38rem;
    letter-spacing: 0.20em;
  }
  .caption {
    color: rgba(58, 127, 213, 0.5);
    font-size: 0.4rem;
    letter-spacing: 0.14em;
  }
  /* Forum content */
  .forum-extra { padding: 0 18px; width: 100%; }
  .forum-extra .h-rule { background: rgba(58,127,213,0.18); }
  .forum-extra .zone-label { color: rgba(58,127,213,0.6); }
  .forum-topics { flex-direction: column; gap: 8px; padding: 0; max-height: none; }
  .forum-topic { padding: 10px 12px; background: rgba(58,127,213,0.06); border: 1px solid rgba(58,127,213,0.18); }
  .forum-extra.visible { max-height: none; }

  /* ─────────────────────────────────────────────────────────
     SIDE PANELS — full-width stacked content cards
     ───────────────────────────────────────────────────────── */
  .panel-left, .panel-right {
    width: 100%;
    border: none;
  }
  .panel-left  { border-bottom: 1px solid var(--rule-mid); }
  .panel-right { border-top: 1px solid var(--rule-mid); display: block; }

  .panel-content {
    position: static;
    inset: unset;
    height: auto;
    opacity: 1;
    pointer-events: auto;
    overflow-y: visible;
    padding: 24px 18px;
  }
  .panel-content:not(.active) { display: none; }
  [data-content="narrow"] { display: none !important; }

  [data-panel="left"][data-content="default"] {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: auto;
  }
  [data-panel="left"][data-content="default"] .headline-block h1 {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
  }

  .sol-shortcut {
    margin-left: -18px;
    margin-right: -18px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .panel-logo-wrap { display: none; }
  .panel-content-area { position: static; overflow: visible; height: auto; }

  .sol-cards { gap: 10px; }
  .sol-card { padding: 12px 12px; min-height: 48px; }
  .sector-tags { flex-wrap: wrap; gap: 6px; }
  .alloc-diagram { max-width: 100%; }
  svg.diagram { width: 120px; height: auto; align-self: center; }

  /* ─────────────────────────────────────────────────────────
     SCROLL REVEAL — sections fade in as they enter view
     ───────────────────────────────────────────────────────── */
  .scroll-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  }
  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  /* ─────────────────────────────────────────────────────────
     CAPITAL ALLOCATION MODAL — bottom sheet
     ───────────────────────────────────────────────────────── */
  .alloc-modal { align-items: flex-end; padding: 0; }
  .alloc-modal-card {
    width: 100%;
    max-height: 90dvh;
    max-height: 90vh;
    border-radius: 0;
    transform: translateY(40px) scale(1);
  }
  .alloc-modal.open .alloc-modal-card { transform: translateY(0) scale(1); }
  .alloc-modal-body { grid-template-columns: 1fr; overflow-y: auto; }
  .alloc-modal-chart { border-right: none; border-bottom: 1px solid var(--rule); padding: 20px 18px; max-height: 230px; }
  .alloc-modal-text { padding: 18px; }

  .bottombar { display: none; }

  /* ─────────────────────────────────────────────────────────
     MOBILE CONTENT SECTIONS — full-width white cards
     Sit above the fixed canvas (z-index: 1) and naturally cover
     the spread particles as sections scroll into view.
     ───────────────────────────────────────────────────────── */
  .mobile-section {
    display: block;
    background: #fff;
    border-top: 1px solid var(--rule-mid);
    position: relative;
    /* z-index intentionally below canvas (10) so particles bleed over sections.
       Canvas pointer-events: none means interaction still works. */
  }
  #ms-soluciones { border-top: none; }
  .ms-inner {
    padding: 40px 24px 52px;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .ms-label {
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin-bottom: 16px;
  }
  .ms-sublabel {
    font-family: var(--mono);
    font-size: 0.54rem;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin-bottom: 12px;
  }
  .ms-headline h2 {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: clamp(1.9rem, 8vw, 2.6rem);
    font-weight: 700;
    color: var(--dark);
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
  }
  .ms-headline p {
    font-size: 0.88rem;
    color: var(--mid);
    line-height: 1.65;
    max-width: 34ch;
  }
  .ms-rule {
    height: 1px;
    background: var(--rule);
    margin: 24px 0;
  }

  /* Cards (Soluciones) */
  .ms-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0;
  }
  .ms-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px;
    border: 1px solid var(--rule-mid);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s;
  }
  .ms-card:hover { border-color: var(--blue); background: rgba(0,74,151,0.03); }
  .ms-card-link:hover, .ms-card-cta:hover { border-color: var(--blue); }
  .ms-card-cta {
    border-color: var(--blue);
    background: rgba(0,74,151,0.05);
  }
  .ms-card-tag {
    font-family: var(--mono);
    font-size: 0.52rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    flex-shrink: 0;
    padding-top: 2px;
  }
  .ms-card-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark);
    margin-bottom: 4px;
  }
  .ms-card-desc {
    font-family: var(--mono);
    font-size: 0.56rem;
    color: var(--mid);
    line-height: 1.6;
  }

  /* Sector tags */
  .ms-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 20px;
  }
  .ms-tags span {
    font-family: var(--mono);
    font-size: 0.52rem;
    letter-spacing: 0.1em;
    color: var(--blue);
    border: 1px solid var(--rule-mid);
    padding: 4px 9px;
  }

  /* Data rows */
  .ms-data-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .ms-data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--rule);
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }
  .ms-data-row span:first-child { color: var(--dim); }
  .ms-data-row span:last-child  { color: var(--dark); font-weight: 600; }

  /* Graph section */
  .ms-graph-wrap {
    margin-bottom: 20px;
    border: 1px solid var(--rule-mid);
    padding: 16px;
  }
  .ms-modal-btn {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue);
    background: transparent;
    border: 1px solid var(--blue);
    padding: 11px 20px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s, color 0.2s;
  }
  .ms-modal-btn:hover { background: var(--blue); color: #fff; }

  /* Values list */
  .ms-values {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .ms-value {
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    color: var(--mid);
    padding: 9px 0;
    border-bottom: 1px solid var(--rule);
  }
  .ms-value::before {
    content: '— ';
    color: var(--accent);
  }

  /* CTA button (Nosotros) */
  .ms-cta-btn {
    display: block;
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    background: var(--blue);
    text-decoration: none;
    padding: 14px 24px;
    text-align: center;
    transition: background 0.2s;
  }
  .ms-cta-btn:hover { background: #003a7a; }
  .ms-footer {
    margin-top: 32px;
    font-family: var(--mono);
    font-size: 0.44rem;
    letter-spacing: 0.14em;
    color: var(--dim);
    text-align: center;
    opacity: 0.6;
  }
}

