/* Plan Génesis · Volumen II — Chart Deck base styles
   Designed for: full-page chart, A4/Letter portrait, print-ready at 1800x2400.
   Brand: navy #181c40, gold #b58a3f, paper #f5f1e6, ink #0c0e1f.
*/

:root {
  --navy: #181c40;
  --navy-deep: #0c0e1f;
  --navy-mid: #232855;
  --gold: #b58a3f;
  --gold-soft: #d4a85a;
  --paper: #f5f1e6;
  --paper-warm: #ede7d6;
  --ink: #0c0e1f;
  --ink-soft: #3a3f5a;
  --gray: #8c8c96;
  --line: rgba(181, 138, 63, 0.35);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }

.page {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 48px 56px 64px;
  background: var(--paper);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 28px;
}

.brand-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  text-transform: uppercase;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.brand-band .left { color: var(--gold); font-weight: 600; }
.brand-band .right { color: var(--ink-soft); }

.header h1 {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.12;
  margin: 0 0 4px 0;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.header .eyebrow {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 6px;
}
.header .deck {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.45;
  max-width: 760px;
  font-family: var(--sans);
}

.chart-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  min-height: 380px;
}
.chart-area svg { width: 100%; height: auto; max-width: 820px; }

/* === Notes footer === */
.notes {
  border-top: 1.5px solid var(--gold);
  padding-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 32px;
}
.notes h3 {
  font-family: var(--serif);
  font-size: 13px;
  margin: 0 0 6px;
  color: var(--navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.notes p { margin: 0; font-size: 11.5px; line-height: 1.55; color: var(--ink-soft); }
.notes .lede { grid-column: 1 / -1; font-size: 12.5px; line-height: 1.6; color: var(--ink); font-family: var(--serif); }
.notes .footer-meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
  padding-top: 12px;
  margin-top: 6px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* === Reusable table === */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
}
.tbl thead th {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1.5px solid var(--navy);
  background: rgba(24, 28, 64, 0.04);
}
.tbl tbody td {
  font-size: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  color: var(--ink);
}
.tbl tbody tr:nth-child(even) { background: rgba(24, 28, 64, 0.025); }
.tbl tbody td.num { font-variant-numeric: tabular-nums; text-align: right; font-family: var(--mono); font-size: 11px; }
.tbl tbody td.strong { font-weight: 600; color: var(--navy); }
.tbl tbody tr.total td { font-weight: 700; color: var(--navy); border-top: 2px solid var(--navy); background: rgba(181, 138, 63, 0.12); }

/* === Dark variant for hero/title cards === */
.page.dark { background: var(--navy-deep); color: var(--paper); }
.page.dark .header h1 { color: var(--paper); }
.page.dark .header .deck { color: rgba(245, 241, 230, 0.78); }
.page.dark .brand-band { color: rgba(245, 241, 230, 0.55); border-color: rgba(181, 138, 63, 0.3); }
.page.dark .brand-band .right { color: rgba(245, 241, 230, 0.55); }
.page.dark .notes { border-color: var(--gold); }
.page.dark .notes h3 { color: var(--gold); }
.page.dark .notes p { color: rgba(245, 241, 230, 0.82); }
.page.dark .notes .lede { color: var(--paper); }
.page.dark .notes .footer-meta { color: rgba(245, 241, 230, 0.45); border-color: rgba(255,255,255,0.08); }
.page.dark .tbl thead th { color: var(--gold-soft); border-bottom-color: var(--gold); background: rgba(255,255,255,0.04); }
.page.dark .tbl tbody td { color: rgba(245, 241, 230, 0.88); border-bottom-color: rgba(255,255,255,0.07); }
.page.dark .tbl tbody tr:nth-child(even) { background: rgba(255,255,255,0.025); }
.page.dark .tbl tbody tr.total td { background: rgba(181, 138, 63, 0.18); color: var(--paper); border-top-color: var(--gold); }

/* === Chart helpers === */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 8px 0 20px; }
.kpi { padding: 14px 16px; background: rgba(24, 28, 64, 0.04); border-left: 3px solid var(--gold); }
.kpi .label { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }
.kpi .value { font-family: var(--serif); font-size: 24px; color: var(--navy); font-weight: 600; line-height: 1.1; margin-top: 4px; }
.kpi .unit { font-size: 11px; color: var(--gray); margin-top: 2px; }
.page.dark .kpi { background: rgba(255,255,255,0.04); }
.page.dark .kpi .value { color: var(--paper); }
.page.dark .kpi .label { color: rgba(245,241,230,0.65); }
.page.dark .kpi .unit { color: rgba(245,241,230,0.5); }

/* === Index gallery === */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.gallery a {
  display: block;
  padding: 22px;
  background: white;
  border: 1px solid rgba(0,0,0,0.06);
  text-decoration: none;
  color: var(--ink);
  transition: all 0.2s;
  border-top: 3px solid var(--gold);
}
.gallery a:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(24,28,64,0.08); border-top-color: var(--navy); }
.gallery .gtype { font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.gallery h2 { font-family: var(--serif); font-size: 17px; margin: 6px 0 8px; color: var(--navy); font-weight: 600; line-height: 1.25; }
.gallery .gdesc { font-size: 12px; line-height: 1.5; color: var(--ink-soft); }
