:root {
  --bg: #03060a;
  --panel: rgba(7, 14, 24, 0.94);
  --panel-solid: #07101a;
  --panel-raised: #0c1725;
  --line: rgba(218, 226, 238, 0.18);
  --text: #edf3f6;
  --muted: #9aa8b8;
  --gold: #d9ad45;
  --gold-soft: #f1cf76;
  --green: #0f8f62;
  --petroleum: #083d35;
  --blue: #3b82f6;
  --orange: #e28a2e;
  --red: #c94141;
  --yellow: #f7cf4f;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.54);
  --soft-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --radius: 10px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(255, 214, 0, 0.035), rgba(0, 43, 127, 0.035), rgba(206, 17, 38, 0.035)),
    linear-gradient(135deg, rgba(217, 173, 69, 0.07), transparent 24%, rgba(13, 88, 78, 0.08) 62%, transparent),
    radial-gradient(circle at 28% 20%, rgba(12, 83, 72, 0.28), transparent 34%),
    #05080d;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

button,
select,
input,
.control-panel,
.detail-panel,
.national-card,
.value-card,
.finance-card,
.incentive-card,
.executive-note,
.executive-profile,
.institutional-drawer,
.institutional-card,
.language-picker,
.map-kpi-strip article,
.detail-grid div,
.finance-output div,
.finance-principal > div,
.finance-principal label,
.credit-terms div,
.amortization-wrap,
.division-models article,
.consortium-chart div,
.subblock-view,
.subblock-card,
.book-card,
.amazon-cta,
.inline-whatsapp,
.whatsapp-mini,
.whatsapp-button,
.quick-grid button,
.action-grid button,
.status-pill,
.leaflet-popup-content-wrapper,
.leaflet-tooltip,
.block-click-label,
.infra-marker {
  border-radius: var(--radius);
}

.app-shell { min-height: 100%; display: flex; flex-direction: column; }

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.12);
  background: linear-gradient(180deg, #fffdf7, #f8f5ec);
  backdrop-filter: blur(22px);
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.08);
  position: sticky;
  top: 0;
  z-index: 900;
}

.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(217, 173, 69, 0.46);
  background: #fffdf7;
  box-shadow: 0 0 0 4px rgba(157, 119, 36, 0.08), 0 16px 34px rgba(17,24,39,0.14);
}

.eyebrow {
  margin: 0 0 7px;
  color: #8b681b;
  font-size: clamp(0.95rem, 1.5vw, 1.18rem);
  text-transform: none;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.25;
}

h1, h2, p { margin-top: 0; }

.christocentric-line {
  margin: 0 0 8px;
  color: #111827;
  font-size: clamp(1rem, 1.55vw, 1.24rem);
  font-weight: 820;
  line-height: 1.28;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.icon-button, .close-panel, #drawerClose {
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: linear-gradient(180deg, #ffffff, #f8f5ec);
  color: #111827;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.whatsapp-mini, .whatsapp-button, .action-grid button, .quick-grid button {
  border: 1px solid rgba(217, 173, 69, 0.34);
  background: linear-gradient(180deg, rgba(217, 173, 69, 0.24), rgba(217, 173, 69, 0.075));
  color: var(--text);
  cursor: pointer;
}

.whatsapp-mini { padding: 10px 12px; font-size: 0.84rem; }
.whatsapp-mini, .whatsapp-button {
  border-color: rgba(37, 211, 102, 0.65);
  background: linear-gradient(180deg, #25D366, #169d4a);
  color: #041008;
  font-weight: 850;
}
.whatsapp-mini:hover, .whatsapp-button:hover {
  border-color: #128C4A;
  background: linear-gradient(180deg, #1fb95a, #128C4A);
  color: #fff;
}
.whatsapp-mini:hover, .whatsapp-button:hover, .action-grid button:hover, .quick-grid button:hover {
  border-color: rgba(241, 207, 118, 0.7);
  box-shadow: 0 0 0 1px rgba(217, 173, 69, 0.12), 0 14px 34px rgba(0, 0, 0, 0.28);
}

.language-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  padding: 8px 10px;
  background: #fffdf7;
}

#languageFlag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 20px;
  flex: 0 0 auto;
  color: #8b681b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

#languageFlag img {
  width: 30px;
  height: 20px;
  display: block;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(17,24,39,0.16);
}

.language-picker select {
  color: #111827;
  background: #fffdf7;
  border: 0;
  outline: 0;
  max-width: 190px;
}

.workspace {
  flex: 1;
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: 320px minmax(420px, 1fr) 430px;
}

.hero-manifesto {
  border-bottom: 1px solid rgba(17, 24, 39, 0.12);
  background:
    linear-gradient(90deg, rgba(217, 173, 69, 0.14), transparent 34%),
    linear-gradient(180deg, #fffdf7, #f8f5ec);
  padding: 26px 22px;
}

.hero-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  padding: 28px;
  border: 1px solid rgba(157, 119, 36, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 20px 46px rgba(17, 24, 39, 0.08);
  text-align: left;
}

.hero-title {
  display: flex;
  align-items: baseline;
  gap: 0;
  flex-wrap: nowrap;
  margin: 0 0 22px;
  color: #111827;
  font-size: clamp(2.25rem, 5vw, 5rem);
  line-height: 0.98;
  font-weight: 880;
  letter-spacing: 0;
  text-shadow: none;
}

.hero-flag {
  display: inline-block;
  flex: 0 0 auto;
  width: auto;
  height: clamp(28px, 3.2vw, 36px);
  margin-right: 0.3em;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(17,24,39,0.18), 0 10px 22px rgba(17,24,39,0.12);
}

.hero-inner p {
  max-width: 980px;
  margin: 0 0 14px;
  color: #1f2937;
  line-height: 1.62;
  font-size: clamp(0.98rem, 1.5vw, 1.14rem);
}

.hero-inner p:last-child { margin-bottom: 0; }
.hero-inner strong {
  color: inherit;
  font-weight: 800;
}

.control-panel, .detail-panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent 22%),
    var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
  z-index: 500;
  overflow: auto;
}

.control-panel {
  border-right: 1px solid var(--line);
  padding: 20px;
}

.detail-panel {
  border-left: 1px solid var(--line);
  padding: 22px;
}

.control-panel section, .block-detail section { margin-bottom: 22px; }

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text);
  font-weight: 800;
}

.section-title small { color: var(--muted); font-weight: 600; font-size: 0.72rem; text-align: right; }

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: #dbe4ea;
  cursor: pointer;
}

input[type="checkbox"] {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
}

.legend { display: grid; gap: 8px; }
.legend span { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.9rem; }
.legend b { font-weight: 650; color: #dbe4ea; }

.swatch { width: 12px; height: 12px; display: inline-block; box-shadow: 0 0 18px currentColor; }
.available { background: var(--green); color: var(--green); }
.awarded { background: var(--blue); color: var(--blue); }
.negotiation { background: var(--orange); color: var(--orange); }
.reserved { background: var(--red); color: var(--red); }
.strategic { background: var(--gold); color: var(--gold); }

.national-card, .value-card, .finance-card, .incentive-card, .executive-note, .executive-profile {
  border: 1px solid rgba(217, 173, 69, 0.22);
  background:
    linear-gradient(145deg, rgba(217, 173, 69, 0.13), rgba(6, 15, 24, 0.86)),
    var(--panel-raised);
  padding: 18px;
  box-shadow: var(--soft-shadow);
}

.national-card {
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(217, 173, 69, 0.2), rgba(12, 64, 55, 0.18) 44%, rgba(6, 15, 24, 0.92)),
    var(--panel-raised);
}

.national-card p, .value-card p { color: #d5dee7; margin-bottom: 12px; }
.national-card p {
  font-size: 0.94rem;
  line-height: 1.35;
  font-weight: 800;
}
.national-value-group {
  margin: 10px 0 18px;
}

.national-card .metric-main {
  display: block;
  color: var(--gold-soft);
  font-size: clamp(1.75rem, 2.25vw, 2.4rem);
  line-height: 1.05;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  max-width: 100%;
  overflow: visible;
  text-overflow: unset;
  text-shadow: 0 18px 36px rgba(217, 173, 69, 0.12);
}

.national-value-group > span {
  display: block;
  color: rgba(220, 229, 236, 0.72);
  font-size: clamp(0.92rem, 1.4vw, 1.08rem);
  line-height: 1.25;
  font-weight: 700;
  overflow-wrap: break-word;
}

.national-validation {
  display: grid;
  gap: 8px;
  margin: 14px 0 16px;
}

.national-validation span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(217, 173, 69, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
}

.national-validation em {
  color: #d5dee7;
  font-style: normal;
  font-size: 0.78rem;
  line-height: 1.25;
}

.national-validation b {
  color: #fff8dc;
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
}
.value-card strong { color: var(--gold); font-size: 1.18rem; }

.national-metrics {
  display: grid;
  gap: 9px;
  margin: 0 0 18px;
}

.national-metrics span {
  display: block;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.045);
  color: #edf3f7;
  font-size: 0.91rem;
  line-height: 1.35;
  font-weight: 740;
}

.national-fund {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(217, 173, 69, 0.22);
}

.national-fund span {
  display: block;
  color: #c3cfda;
  font-size: 0.86rem;
  line-height: 1.45;
  margin-bottom: 8px;
}

.national-fund b {
  display: block;
  color: var(--gold-soft);
  font-size: clamp(1.1rem, 2vw, 1.38rem);
  line-height: 1.18;
  font-weight: 880;
}

.executive-note h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  line-height: 1.35;
}

.executive-note p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.88rem;
}

.mini-bars { display: grid; gap: 6px; margin-top: 14px; }
.mini-bars span { height: 4px; width: var(--w); background: linear-gradient(90deg, var(--gold), var(--green)); }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-grid button { padding: 9px; font-size: 0.78rem; text-align: left; min-height: 38px; }

.map-stage { position: relative; min-height: 760px; }
#map { position: absolute; inset: 0; background: #07101a; }

.leaflet-container {
  background: #07101a;
  font-family: inherit;
  overflow: hidden;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.leaflet-container img,
.leaflet-container .leaflet-tile {
  max-width: none !important;
  max-height: none !important;
}

.leaflet-tile {
  filter: contrast(1.05) saturate(0.78) brightness(0.72);
}

.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }

.leaflet-control {
  position: relative;
  z-index: 800;
  pointer-events: auto;
}

.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }

.leaflet-control-zoom {
  border: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.74);
}

.leaflet-control-zoom a {
  display: block;
  width: 34px;
  height: 34px;
  line-height: 32px;
  text-align: center;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.leaflet-control-zoom a:last-child { border-bottom: 0; }

.leaflet-interactive {
  cursor: pointer;
  pointer-events: auto;
}

.leaflet-control-attribution { background: rgba(5, 8, 13, 0.72) !important; color: var(--muted) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #0a121d; color: var(--text); border: 1px solid var(--line); }
.leaflet-tooltip.block-tooltip,
.leaflet-tooltip.basin-tooltip {
  border: 1px solid rgba(217, 173, 69, 0.38);
  background: rgba(5, 10, 17, 0.94);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 0;
  pointer-events: none;
}

.leaflet-tooltip.block-tooltip-minimal {
  padding: 7px 10px;
  background: rgba(255, 253, 247, 0.96);
  color: #111827;
  font-weight: 850;
  text-align: center;
  border-color: rgba(157, 119, 36, 0.35);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
}

.petroleum-block-path,
.leaflet-interactive.block-pointer {
  cursor: pointer;
}

.map-tooltip {
  width: 245px;
  padding: 12px;
}

.map-tooltip strong {
  display: block;
  color: var(--gold-soft);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.map-tooltip span {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 6px;
  margin-top: 6px;
  color: #cbd6df;
}

.infra-marker {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.7);
  background: #07101a;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.22), 0 0 24px var(--marker);
  pointer-events: auto;
}

.infra-marker.refinery { --marker:#d9ad45; background:#4b3510; }
.infra-marker.port { --marker:#3b82f6; background:#102d57; }
.infra-marker.terminal { --marker:#e28a2e; background:#4c2a0f; }
.infra-marker.pipeline { --marker:#0f8f62; background:#0b3a2c; }
.infra-marker.upgrader { --marker:#f7cf4f; background:#4b4211; }
.infra-marker.petrochemical { --marker:#0f8f62; background:#0d3d35; }

.map-kpi-strip {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  pointer-events: none;
}

.map-kpi-strip article {
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.78);
  backdrop-filter: blur(14px);
}

.map-kpi-strip span { display: block; color: var(--muted); font-size: 0.74rem; }
.map-kpi-strip strong { color: var(--text); font-size: 1.08rem; }

.empty-state {
  height: 100%;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.empty-state h2 { font-size: 1.15rem; line-height: 1.45; color: #d8e2ea; font-weight: 650; }
.hidden { display: none !important; }

.block-detail { position: relative; }
.close-panel { position: absolute; top: 0; right: 0; font-size: 1.4rem; }
.block-detail h2 { margin: 0 46px 10px 0; font-size: 1.55rem; }

.status-pill {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid currentColor;
  color: var(--gold);
  margin-bottom: 16px;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(255,255,255,0.035);
  box-shadow: inset 0 0 18px rgba(255,255,255,0.025);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-grid div, .finance-output div, .finance-principal > div, .finance-principal label {
  border: 1px solid var(--line);
  padding: 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255,255,255,0.02));
}

.detail-grid span, .finance-output span, .finance-principal span { display: block; color: var(--muted); font-size: 0.73rem; margin-bottom: 5px; }
.detail-grid strong, .finance-output strong, .finance-principal strong { color: #edf3f6; font-size: 0.9rem; }

.national-share {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.09);
  color: var(--muted);
}

.national-share b { color: var(--gold-soft); }

.resource-list { display: grid; gap: 8px; margin-top: 14px; }
.resource-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; color: var(--muted); font-size: 0.86rem; }
.resource-item.zero { opacity: 0.58; }
.resource-item i { grid-column: 1 / -1; height: 4px; background: rgba(255,255,255,0.08); }
.resource-item i::before { content: ""; display: block; width: var(--w); height: 100%; background: linear-gradient(90deg, var(--green), var(--gold)); }

.finance-card label { display: grid; gap: 7px; margin-bottom: 12px; color: var(--muted); }
.credit-copy {
  color: #d9e3eb;
  line-height: 1.55;
  margin-bottom: 14px;
}

.field-help, .table-note {
  color: #b9c7d2;
  line-height: 1.45;
  font-size: 0.82rem;
  margin: -2px 0 12px;
}

.credit-terms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.credit-terms div {
  border: 1px solid rgba(217,173,69,0.18);
  background: rgba(217,173,69,0.06);
  padding: 10px;
}

.credit-terms span { display: block; color: var(--muted); font-size: 0.72rem; margin-bottom: 5px; }
.credit-terms strong { color: var(--text); font-size: 0.82rem; line-height: 1.35; }
input[type="number"] { background: #07101a; color: var(--text); border: 1px solid var(--line); padding: 9px; width: 100%; }
input[type="range"] { accent-color: var(--gold); width: 100%; }
.development-toggle { color: #dce5eb !important; }

.finance-principal, .finance-output { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.simulate-button {
  width: 100%;
  min-height: 42px;
  margin: 2px 0 12px;
  border: 1px solid rgba(241,207,118,0.48);
  color: var(--text);
  background: linear-gradient(180deg, rgba(217,173,69,0.28), rgba(217,173,69,0.08));
  cursor: pointer;
  font-weight: 850;
}

.amortization-wrap {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  margin-top: 12px;
}

.amortization-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.amortization-table th, .amortization-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.075);
  text-align: right;
}

.amortization-table th:first-child, .amortization-table td:first-child { text-align: left; color: var(--gold-soft); }
.amortization-table th { position: sticky; top: 0; background: #0a121d; color: #dce5eb; }

.incentive-card p { color: var(--muted); line-height: 1.5; font-size: 0.88rem; }
.badge-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-grid span {
  padding: 7px 9px;
  border: 1px solid rgba(217, 173, 69, 0.25);
  background: rgba(217, 173, 69, 0.08);
  color: #e8edf2;
  font-size: 0.76rem;
}

.ownership-sim label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.ownership-sim input { width: 96px; padding: 8px; background: #07101a; color: var(--text); border: 1px solid var(--line); }
.ownership-bar { height: 12px; background: rgba(255,255,255,0.08); margin: 12px 0 8px; overflow: hidden; }
.ownership-bar span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--blue), var(--gold)); }

.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.action-grid button { padding: 10px; min-height: 42px; }
.action-note { color: var(--gold); min-height: 24px; margin: 12px 0 0; }
.action-note span { display: block; color: #dbe6ee; line-height: 1.45; }
.inline-whatsapp {
  display: inline-block;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(37, 211, 102, 0.68);
  background: linear-gradient(180deg, #25D366, #169d4a);
  color: #041008;
  font-weight: 850;
}

.division-models {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.division-models article {
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.035);
}

.division-models span { display: block; color: var(--muted); font-size: 0.7rem; }
.division-models strong { display: block; margin-top: 4px; color: var(--text); font-size: 0.82rem; }

.consortium-chart {
  display: grid;
  height: auto;
  gap: 8px;
  overflow: visible;
  border: 0;
  margin-bottom: 14px;
}

.subblock-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(217,173,69,0.26);
  background: rgba(5,10,17,0.64);
}

.subblock-card {
  padding: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(18,185,129,0.18), rgba(255,255,255,0.025));
}

.subblock-card strong { display: block; color: var(--gold-soft); margin-bottom: 8px; }
.subblock-card span { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 0.76rem; margin-top: 5px; }
.subblock-card b { color: var(--text); }

.consortium-chart div {
  position: relative;
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.035);
  overflow: hidden;
}

.consortium-chart div::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: linear-gradient(90deg, var(--c), transparent);
  opacity: 0.58;
}

.consortium-chart span, .consortium-chart b {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 850;
}

.consortium-chart b { color: var(--gold-soft); }

.block-click-label {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.62);
  background: rgba(5,10,17,0.8);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 0 20px rgba(18,185,129,0.42);
  pointer-events: none;
}

.block-label-icon, .block-label-icon * {
  pointer-events: none !important;
}

.institutional-drawer {
  position: fixed;
  top: 92px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  width: min(760px, calc(100% - 30px));
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  display: flex;
  gap: 20px;
  align-items: start;
  justify-content: space-between;
  padding: 28px;
  border: 1px solid rgba(217, 173, 69, 0.32);
  background:
    linear-gradient(145deg, rgba(217, 173, 69, 0.11), transparent 34%),
    rgba(6, 11, 18, 0.97);
  box-shadow: var(--shadow);
  transition: opacity 160ms ease, transform 160ms ease;
}

.institutional-drawer.open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }

.institutional-card {
  width: 100%;
  text-align: left;
  padding: 4px 34px 2px 4px;
}

.institutional-card h2 {
  margin: 0 0 14px;
  color: var(--gold-soft);
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  line-height: 1.15;
}

.institutional-subtitle {
  max-width: 620px;
  margin: 0 0 18px;
  color: #edf3f6;
  font-size: 1.04rem;
  line-height: 1.55;
}

.institutional-author {
  margin: 0 0 12px;
  color: var(--gold-soft);
  font-weight: 850;
  letter-spacing: 0;
}

.institutional-credentials {
  max-width: 660px;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(217, 173, 69, 0.22);
  color: #cbd6df;
  line-height: 1.7;
  font-size: 0.95rem;
}

.bio-mini {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.bio-mini strong { color: var(--gold-soft); }
.bio-mini span { color: #c6d0da; line-height: 1.45; }

.footer {
  border-top: 1px solid rgba(17, 24, 39, 0.12);
  background: #f8f5ec;
  color: #111827;
  padding: 52px 28px;
  text-align: left;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  max-width: 980px;
  margin: 0 auto;
}

.footer-brand img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(217, 173, 69, 0.42);
}

.footer-brand .portrait { width: 86px; height: 86px; }
.footer h2 { margin-bottom: 4px; color: #111827; }
.footer p { color: #374151; }
blockquote { max-width: 960px; margin: 24px auto 12px; color: #e9eef3; line-height: 1.55; font-size: 1.05rem; }
.author { color: var(--gold) !important; font-weight: 800; }
.whatsapp-button { display: inline-block; padding: 12px 18px; margin: 30px 0 34px; }

.footer > .whatsapp-button {
  margin-left: max(0px, calc((100% - 980px) / 2));
}

.executive-profile {
  max-width: 980px;
  margin: 30px auto 0;
  text-align: left;
  background: #fffdf7;
  border-color: rgba(157, 119, 36, 0.28);
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.09);
}
.executive-profile h2 { color: #111827; margin-bottom: 4px; }
.executive-profile .author-role {
  color: #9d7724;
  font-weight: 850;
  margin-bottom: 12px;
}
.executive-profile p { max-width: 760px; margin: 0; line-height: 1.65; color: #374151; }
.executive-profile .data-disclaimer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(157, 119, 36, 0.22);
  font-size: 0.92rem;
  font-weight: 750;
  color: #4b5563;
}
.credential-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.credential-grid span {
  padding: 8px 10px;
  border: 1px solid rgba(217,173,69,0.24);
  background: rgba(217,173,69,0.075);
  color: #dce5ec;
  font-size: 0.84rem;
}

.books { max-width: 980px; margin: 0 auto; }
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.book-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: center;
  gap: 18px;
  text-align: left;
  min-height: 190px;
  padding: 18px;
  border: 1px solid rgba(217, 173, 69, 0.25);
  background:
    linear-gradient(135deg, rgba(217, 173, 69, 0.16), rgba(12, 64, 55, 0.07)),
    #fffdf7;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.09);
}

.book-card .book-lang { color: #9d7724; font-weight: 900; }
.book-card .book-title {
  display: block;
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.35;
  color: #111827;
}
.book-card em {
  color: #4b5563;
  font-style: normal;
  line-height: 1.5;
}
.book-info {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  min-height: 158px;
}
.amazon-cta {
  display: inline-block;
  align-self: flex-start;
  margin-top: 18px;
  padding: 9px 12px;
  border: 1px solid rgba(217,173,69,0.38);
  color: #7a5b18;
  font-size: 0.78rem;
  background: #fff7df;
}

.book-cover {
  width: 112px;
  min-height: 158px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 12px;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 22px 42px rgba(0,0,0,0.35);
}

.book-cover-img {
  width: 112px;
  min-height: 158px;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 22px 42px rgba(0,0,0,0.35);
  border-radius: 8px;
}

.book-cover span { color: #fff; font-size: 0.66rem; }
.book-cover strong { color: #fff; font-size: 0.92rem; line-height: 1.12; margin: 0; }
.book-cover em { color: rgba(255,255,255,0.78); font-size: 0.66rem; }
.spanish-cover { background: linear-gradient(160deg, #121a2a, #6e111c 52%, #c89c37); }
.english-cover { background: linear-gradient(160deg, #07182a, #114b42 55%, #d9ad45); }

body[dir="rtl"] { direction: rtl; }
body[dir="rtl"] .detail-panel { border-left: 0; border-right: 1px solid var(--line); }
body[dir="rtl"] .control-panel { border-right: 0; border-left: 1px solid var(--line); }
body[dir="rtl"] .close-panel { right: auto; left: 0; }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 270px 1fr; }
  .detail-panel {
    position: fixed;
    top: 76px;
    right: 0;
    bottom: 0;
    width: min(410px, 100%);
    transform: translateX(102%);
    transition: transform 180ms ease;
  }
  .detail-panel.open { transform: translateX(0); }
  body[dir="rtl"] .detail-panel { right: auto; left: 0; transform: translateX(-102%); }
  body[dir="rtl"] .detail-panel.open { transform: translateX(0); }
}

@media (max-width: 1200px) {
  .hero-inner { max-width: 100%; }
  .footer, .footer-brand, .executive-profile, .books { max-width: 100%; }
}

@media (max-width: 840px) {
  .topbar { align-items: stretch; flex-direction: column; }
  .topbar-actions { flex-wrap: wrap; }
  .workspace { display: flex; flex-direction: column; }
  .control-panel { order: 2; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .map-stage { order: 1; min-height: 72vh; }
  .map-kpi-strip { grid-template-columns: 1fr 1fr; }
  .detail-panel { top: 0; width: 100%; height: 100vh; z-index: 1300; }
  .finance-principal, .finance-output, .credit-terms, .division-models, .subblock-view { grid-template-columns: 1fr; }
  .book-grid { grid-template-columns: 1fr; }
  .book-card { grid-template-columns: 96px 1fr; }
  .book-cover, .book-cover-img { width: 92px; min-height: 132px; padding: 0; }
}

@media (max-width: 768px) {
  .topbar { padding: 14px 16px; }
  .hero-manifesto { padding: 20px 14px; }
  .hero-inner { padding: 18px; }
  .map-stage { min-height: 68vh; }
  .footer {
    text-align: center;
    padding: 42px 18px;
  }
  .footer > .whatsapp-button {
    margin-left: 0;
  }
  .footer-brand {
    justify-content: center;
    text-align: center;
  }
  .executive-profile {
    text-align: center;
  }
  .book-card {
    grid-template-columns: 92px 1fr;
  }
}

@media (max-width: 560px) {
  .eyebrow { font-size: 0.98rem; }
  .christocentric-line { font-size: 1rem; }
  .hero-title { font-size: clamp(1.9rem, 10vw, 2.85rem); }
  .hero-flag { height: 28px; margin-right: 0.22em; }
  .national-card .metric-main { font-size: clamp(1.65rem, 7.8vw, 2.1rem); }
  .whatsapp-mini { display: none; }
  .language-picker select { max-width: 145px; }
  .control-panel, .detail-panel { padding: 14px; }
  .quick-grid, .detail-grid, .action-grid { grid-template-columns: 1fr; }
  .map-kpi-strip { left: 10px; right: 10px; bottom: 10px; gap: 6px; }
  .map-kpi-strip article { padding: 8px; }
}

@media (max-width: 480px) {
  .brand { align-items: flex-start; }
  .brand-logo { width: 50px; height: 50px; }
  .topbar-actions { gap: 8px; }
  .language-picker { width: 100%; justify-content: space-between; }
  .language-picker select { max-width: min(220px, 70vw); }
  .map-stage { min-height: 62vh; }
  .national-card { padding: 18px; }
  .national-value-group > span { font-size: 0.86rem; }
  .national-validation span {
    align-items: flex-start;
    flex-direction: column;
  }
  .national-validation b {
    white-space: normal;
  }
  .book-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .book-info {
    align-items: center;
    min-height: auto;
  }
  .amazon-cta { align-self: center; }
}
