:root{
  --blue-900:#082032;
  --blue-800:#0b3a52;
  --blue-700:#0f5c78;
  --teal-500:#12a594;
  --teal-400:#2ec4b6;
  --sand-100:#fbf7ee;
  --sand-200:#f2ead8;
  --coral-500:#ff6f59;
  --sun-400:#ffb703;
  --ink-900:#0d1b1e;
  --ink-600:#3d5257;
  --ink-400:#617579;
  --white:#ffffff;
  --radius:18px;
  --max-w:1180px;
  --transition-theme: background .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease;

  /* semantic theme tokens — light (default) */
  --bg:var(--sand-100);
  --bg-alt:var(--sand-200);
  --surface:#ffffff;
  --text:var(--ink-900);
  --text-muted:var(--ink-600);
  --text-dim:var(--ink-400);
  --border:rgba(8,32,50,.08);
  --border-strong:rgba(8,32,50,.14);
  --shadow-sm: 0 2px 10px rgba(8,32,50,.08);
  --shadow-md: 0 10px 30px rgba(8,32,50,.12);
  --callout-bg:#fff3e0;
  --callout-border:#ffd699;
  --callout-text:#5c3d00;
  --heading-accent:var(--blue-800);
  --chip-plazo-bg:rgba(255,183,3,.18);
  --chip-plazo-text:#946400;
  /* AA-safe teal for small/normal text on light surfaces (plain teal-500 fails 4.5:1 on white) */
  --link-accent:#0a6f62;
}

[data-theme="dark"]{
  --bg:#0d1526;
  --bg-alt:#111d33;
  --surface:#16213d;
  --text:#e8eaf0;
  --text-muted:#a3b3cc;
  --text-dim:#7c8db0;
  --border:rgba(255,255,255,.09);
  --border-strong:rgba(255,255,255,.16);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.35);
  --shadow-md: 0 10px 30px rgba(0,0,0,.45);
  --callout-bg:#2a2210;
  --callout-border:#5c4a1a;
  --callout-text:#f5d597;
  --heading-accent:#8fc4f2;
  --chip-plazo-bg:rgba(255,183,3,.16);
  --chip-plazo-text:#ffcf5c;
  --link-accent:var(--teal-400);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *{animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important;}
}
body{
  margin:0;
  font-family:'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.55;
  transition:var(--transition-theme);
}
h1,h2,h3,h4{font-family:'Georgia', 'Segoe UI', serif; line-height:1.15; margin:0 0 .5em;}
p{margin:0 0 1em}
a{color:inherit}
img{max-width:100%;display:block}
.container{max-width:var(--max-w); margin:0 auto; padding:0 24px;}
.container.narrow{max-width:820px; text-align:center;}

/* ---------- accessibility utilities ---------- */
.visually-hidden{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
  table-layout:fixed; /* las tablas ignoran width:1px sin esto */
}
/* <caption> no se acota con table-layout:fixed: su ancho intrínseco
   sigue empujando la caja de la tabla aunque el texto no se muestre. */
.visually-hidden caption{
  white-space:normal; max-width:1px; overflow-wrap:anywhere;
}
.skip-link{
  position:absolute; left:12px; top:-60px; z-index:100;
  background:#0c8074; color:#fff; padding:10px 18px; border-radius:8px;
  text-decoration:none; font-weight:700; font-size:.9rem; transition:top .2s ease;
}
.skip-link:focus{top:12px;}
a:focus-visible, button:focus-visible, [tabindex]:focus-visible{
  outline:3px solid var(--sun-400); outline-offset:3px; border-radius:4px;
}
.sector-card:focus-visible{outline:3px solid var(--sun-400); outline-offset:2px;}

/* ---------- header ---------- */
.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(8,32,50,.92);
  backdrop-filter: blur(6px);
}
.navbar{
  max-width:var(--max-w); margin:0 auto; padding:14px 24px;
  display:flex; align-items:center; justify-content:space-between;
}
.brand{display:flex; align-items:center; gap:12px; text-decoration:none; color:#fff; font-weight:700; font-size:1.1rem;}
.brand-icon{color:var(--teal-400); display:flex;}
.brand-icon .icon-svg{width:28px; height:28px;}
.brand-text{display:flex; flex-direction:column; line-height:1.15;}
.brand-text small{display:block; font-weight:600; font-size:.62rem; letter-spacing:.12em; color:var(--teal-400); text-transform:uppercase;}
.nav-links{list-style:none; display:flex; gap:28px; margin:0; padding:0;}
.nav-links a{color:#e7f3f2; text-decoration:none; font-size:.95rem; font-weight:500; transition:color .2s;}
.nav-links a:hover{color:var(--teal-400)}
.nav-right{display:flex; align-items:center; gap:14px;}
.nav-toggle{display:none; flex-direction:column; gap:5px; background:none; border:0; cursor:pointer; padding:6px;}
.nav-toggle span{width:24px; height:2px; background:#fff; display:block;}

/* ---------- theme toggle (pattern shared with jctechpr.com) ---------- */
#themeToggle{
  position:relative; width:52px; height:28px; border-radius:999px; padding:0; margin:0;
  border:0; cursor:pointer; display:flex; align-items:center; overflow:hidden;
  background:rgba(255,255,255,.14); flex-shrink:0;
  transition:background .3s ease;
}
#themeToggle:hover{opacity:.9;}
#themeToggle .tt-thumb{
  position:absolute; left:3px; top:3px; width:22px; height:22px; border-radius:50%;
  background:rgba(255,255,255,.9); color:var(--blue-800);
  display:flex; align-items:center; justify-content:center;
  transition:transform .3s cubic-bezier(.4,0,.2,1), background .3s ease;
}
[data-theme="dark"] #themeToggle .tt-thumb{transform:translateX(24px); background:#0d1526; color:var(--sun-400);}
#themeToggle .tt-thumb svg{width:14px; height:14px;}

/* ---------- hero ---------- */
.hero{
  position:relative;
  min-height:88vh;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center;
  color:#fff;
  padding:80px 24px 60px;
  overflow:hidden;
}
.hero-bg{
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 15% 20%, rgba(46,196,182,.35), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(255,183,3,.25), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(255,111,89,.25), transparent 45%),
    linear-gradient(160deg, var(--blue-900), var(--blue-800) 55%, var(--blue-700));
  z-index:0;
}
.hero-content{position:relative; z-index:1; max-width:820px;}
.eyebrow{
  display:inline-block; padding:6px 16px; border-radius:999px;
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.25);
  font-size:.78rem; letter-spacing:.08em; text-transform:uppercase; margin-bottom:22px;
}
.hero h1{font-size:clamp(2rem, 4.6vw, 3.4rem); margin-bottom:20px;}
.highlight{color:var(--teal-400)}
.hero-sub{font-size:1.15rem; color:#dceeec; max-width:640px; margin:0 auto 34px;}
.hero-cta{display:flex; gap:16px; justify-content:center; flex-wrap:wrap; margin-bottom:56px;}
.btn{
  padding:14px 28px; border-radius:999px; text-decoration:none; font-weight:600; font-size:.98rem;
  transition:transform .15s ease, box-shadow .15s ease;
  display:inline-block;
}
.btn:hover{transform:translateY(-2px)}
.btn-primary{background:#0c8074; color:#fff; box-shadow:0 8px 24px rgba(18,165,148,.4);}
.btn-ghost{background:transparent; color:#fff; border:1.5px solid rgba(255,255,255,.5);}
.hero-stats{
  display:flex; gap:36px; justify-content:center; flex-wrap:wrap;
  border-top:1px solid rgba(255,255,255,.2); padding-top:28px;
}
.hero-stat{display:flex; flex-direction:column; align-items:center;}
.hero-stat strong{font-size:1.8rem; color:var(--teal-400); font-family:Georgia,serif;}
.hero-stat span{font-size:.78rem; color:#cfe6e3; text-transform:uppercase; letter-spacing:.06em;}
.scroll-cue{
  position:absolute; bottom:22px; left:50%; transform:translateX(-50%);
  color:#fff; text-decoration:none; font-size:1.4rem; opacity:.7;
  animation:bounce 2s infinite;
}
@keyframes bounce{0%,100%{transform:translate(-50%,0)}50%{transform:translate(-50%,8px)}}

/* ---------- sections ---------- */
.section{padding:96px 0;}
.section-alt{background:var(--bg-alt);}
.tag{
  display:inline-block; background:rgba(18,165,148,.12); color:var(--link-accent);
  padding:5px 14px; border-radius:999px; font-size:.78rem; font-weight:700;
  letter-spacing:.08em; text-transform:uppercase; margin-bottom:14px;
}
.section h2{font-size:clamp(1.7rem, 3.2vw, 2.5rem); max-width:800px;}
.lead{font-size:1.1rem; color:var(--text-muted); max-width:760px; margin-bottom:44px;}

/* pillars */
.pillars{display:grid; grid-template-columns:repeat(3,1fr); gap:24px; margin-bottom:56px;}
.pillar-card{
  background:var(--surface); border-radius:var(--radius); padding:32px 26px; box-shadow:var(--shadow-sm);
  border:1px solid var(--border);
}
.pillar-icon{font-size:2rem; margin-bottom:14px;}
.pillar-card h3{font-size:1.25rem; margin-bottom:10px;}
.pillar-card p{color:var(--text-muted); font-size:.95rem; margin:0;}

.info-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:20px;}
.info-box{
  background:var(--surface); border-left:4px solid var(--teal-500); border-radius:12px;
  padding:20px 22px; box-shadow:var(--shadow-sm);
}
.info-box h4{font-size:1rem; margin-bottom:8px; color:var(--heading-accent);}
.info-box p{font-size:.88rem; color:var(--text-muted); margin:0;}

/* stat cards */
.stat-cards{display:grid; grid-template-columns:repeat(4,1fr); gap:20px; margin-bottom:56px;}
.stat-card{
  background:linear-gradient(160deg,var(--blue-900),var(--blue-700));
  color:#fff; border-radius:var(--radius); padding:28px 22px;
  box-shadow:var(--shadow-md);
}
.stat-number{display:block; font-family:Georgia,serif; font-size:2.4rem; color:var(--sun-400); margin-bottom:10px;}
.stat-label{font-size:.86rem; color:#dceeec; line-height:1.5;}

.chart-grid{display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-bottom:24px;}
.chart-card{
  background:var(--surface); border-radius:var(--radius); padding:26px; box-shadow:var(--shadow-sm);
  border:1px solid var(--border); min-width:0; /* si no, el ancho intrínseco del canvas desborda la celda del grid */
}
.chart-card h3{font-size:1.1rem; margin-bottom:4px;}
.chart-note{font-size:.82rem; color:var(--text-dim); margin-bottom:16px;}
.chart-card canvas{max-width:100%; max-height:280px;}

.embalse-controls{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:18px;}
.embalse-controls label{font-weight:700; font-size:.9rem;}
.embalse-controls select{
  border:1px solid var(--border-strong); border-radius:9px; padding:9px 12px;
  font-size:.9rem; font-family:inherit; background:var(--bg); color:var(--text);
  max-width:100%;
}
.embalse-status{font-size:.85rem; color:var(--text-muted); margin-top:10px; text-align:center;}
.embalse-status.err{color:#c23c2a;}
.embalse-note{font-size:.8rem; color:var(--text-dim); margin-top:14px;}
.embalse-note a{color:var(--link-accent); font-weight:600;}

.chart-fallback-table{
  display:block;
  overflow-x:auto;
  max-width:100%;
  font-size:.82rem;
  -webkit-overflow-scrolling:touch;
}

.callout{
  background:var(--callout-bg); border:1px solid var(--callout-border); border-radius:var(--radius);
  padding:22px 26px; margin-top:12px; font-size:.95rem; color:var(--callout-text);
}
.callout p{margin:0}

/* sectors */
.sector-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:18px;}
.sector-card{
  background:var(--surface); border-radius:16px; padding:22px 20px; box-shadow:var(--shadow-sm);
  border:1px solid var(--border); cursor:pointer; transition:transform .18s, box-shadow .18s;
  display:block; text-decoration:none; color:inherit;
}
.sector-card:hover{transform:translateY(-4px); box-shadow:var(--shadow-md);}
.sector-icon{font-size:1.8rem; margin-bottom:10px;}
.sector-card h4{font-size:1rem; margin-bottom:8px; color:var(--heading-accent);}
.sector-card p{font-size:.85rem; color:var(--text-muted); margin:0;}
.sector-stat{
  display:inline-block; margin-top:10px; font-size:.75rem; font-weight:700;
  color:var(--link-accent); background:rgba(18,165,148,.1); padding:3px 10px; border-radius:999px;
}
.sector-card.open p{display:block}
.sector-detail{display:none; margin-top:10px; font-size:.83rem; color:var(--text-muted); border-top:1px dashed var(--border-strong); padding-top:10px;}
.sector-card.open .sector-detail{display:block}

/* acciones */
.coa-explainer{display:flex; align-items:stretch; gap:14px; margin-bottom:56px; flex-wrap:wrap;}
.coa-step{
  flex:1; min-width:180px; background:var(--surface); border-radius:16px; padding:24px 20px;
  text-align:center; box-shadow:var(--shadow-sm); border:1px solid var(--border);
}
.coa-num{
  display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px;
  border-radius:50%; background:#0c8074; color:#fff; font-weight:700; margin-bottom:12px;
}
.coa-step h4{font-size:1rem; margin-bottom:6px;}
.coa-step p{font-size:.85rem; color:var(--text-muted); margin:0;}
.coa-arrow{display:flex; align-items:center; font-size:1.4rem; color:var(--text-dim);}

.two-col{display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-bottom:48px;}
.col-card{background:var(--surface); border-radius:var(--radius); padding:30px; box-shadow:var(--shadow-sm); border-top:4px solid var(--coral-500);}
.col-card:last-child{border-top-color:var(--teal-500);}
.col-card h3{margin-bottom:12px;}
.col-card p{color:var(--text-muted); margin:0;}

.sub-h{margin-top:8px; margin-bottom:20px; font-size:1.4rem;}
.reco-list{margin:0 0 56px; padding-left:20px; color:var(--text-muted);}
.reco-list li{margin-bottom:10px; font-size:.98rem;}

.timeline-track{display:flex; gap:0; position:relative;}
.tl-step{flex:1; position:relative; padding:0 18px 0 0; text-align:left;}
.tl-dot{
  display:block; width:16px; height:16px; border-radius:50%; background:var(--teal-500);
  margin-bottom:14px; position:relative; z-index:1;
}
.tl-step::before{
  content:""; position:absolute; top:7px; left:16px; right:-18px; height:2px; background:var(--border-strong);
}
.tl-step:last-child::before{display:none}
.tl-step strong{display:block; margin-bottom:6px; font-size:1.02rem;}
.tl-step p{font-size:.85rem; color:var(--text-muted); margin:0;}

/* participa */
.participa-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:22px; margin-top:36px;}
.participa-card{background:var(--surface); border-radius:16px; padding:26px; box-shadow:var(--shadow-sm);}
.participa-card h4{color:var(--link-accent); margin-bottom:10px;}
.participa-card p{color:var(--text-muted); font-size:.92rem; margin:0;}

/* footer */
.site-footer{background:var(--blue-900); color:#cfe6e3; padding:56px 0 30px; margin-top:40px;}
.footer-grid{display:grid; grid-template-columns:1fr 1fr; gap:40px; margin-bottom:30px;}
.site-footer h4{color:#fff; margin-bottom:10px; font-size:1rem;}
.site-footer p{font-size:.86rem; color:#a9c7c3;}
.footer-note{border-top:1px solid rgba(255,255,255,.12); padding-top:20px; font-size:.78rem; color:#7fa19c; text-align:center;}

/* ============ SECTOR PAGES ============ */
.breadcrumb{
  font-size:.85rem; color:var(--text-dim); margin:22px 0 0; display:flex; gap:8px; align-items:center; flex-wrap:wrap;
}
.breadcrumb a{color:var(--link-accent); text-decoration:none; font-weight:600;}
.breadcrumb a:hover{text-decoration:underline;}

.sector-hero{
  position:relative; color:#fff; padding:64px 0 54px; overflow:hidden;
  background:linear-gradient(150deg, var(--blue-900), var(--blue-700) 70%);
}
.sector-hero .container{position:relative; z-index:1;}
.sector-hero-icon{font-size:2.6rem; margin-bottom:14px;}
.sector-hero h1{font-size:clamp(1.8rem,4vw,2.8rem); margin-bottom:14px; max-width:760px;}
.sector-hero p{color:#dceeec; max-width:680px; font-size:1.05rem; margin-bottom:0;}
.sector-badges{display:flex; gap:10px; flex-wrap:wrap; margin-top:24px;}
.sector-badge{
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.25);
  padding:6px 14px; border-radius:999px; font-size:.8rem; color:#eafaf8;
}

.sector-nav{
  background:var(--surface); border-bottom:1px solid var(--border);
  position:sticky; top:64px; z-index:40;
}
.sector-nav .container{display:flex; gap:26px; padding:12px 24px; overflow-x:auto;}
.sector-nav a{
  font-size:.85rem; font-weight:600; color:var(--text-muted); text-decoration:none;
  white-space:nowrap; padding:4px 0; border-bottom:2px solid transparent;
}
.sector-nav a:hover{color:var(--link-accent); border-color:var(--teal-400);}

.meta-badges{display:flex; gap:14px; flex-wrap:wrap; margin:26px 0 40px;}
.meta-badge{
  background:var(--surface); border:1px solid var(--border); border-radius:14px;
  padding:16px 20px; box-shadow:var(--shadow-sm); min-width:150px;
}
.meta-badge strong{display:block; font-size:1.5rem; font-family:Georgia,serif; color:var(--heading-accent);}
.meta-badge span{font-size:.78rem; color:var(--text-dim);}

.diag-columns{display:grid; grid-template-columns:1.1fr .9fr; gap:36px; align-items:start;}
.diag-columns p{color:var(--text-muted);}
.diag-list{margin:0; padding-left:20px; color:var(--text-muted);}
.diag-list li{margin-bottom:8px; font-size:.95rem;}

.goal-track{
  background:var(--surface); border-radius:var(--radius); padding:26px; box-shadow:var(--shadow-sm);
  border:1px solid var(--border); margin-top:20px;
}
.goal-track canvas{max-height:260px;}

/* COA cards */
.coa-intro{max-width:760px; color:var(--text-muted); margin-bottom:34px;}
.coa-block{
  background:var(--surface); border-radius:var(--radius); box-shadow:var(--shadow-sm);
  border:1px solid var(--border); margin-bottom:26px; overflow:hidden;
}
.coa-block-head{
  padding:22px 28px; background:linear-gradient(120deg, rgba(18,165,148,.08), rgba(15,92,120,.05));
  border-bottom:1px solid var(--border);
}
.coa-block-head .coa-letter{
  display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px;
  border-radius:8px; background:#0c8074; color:#fff; font-weight:700; margin-right:10px; font-size:.9rem;
}
.coa-block-head h3{display:inline; font-size:1.15rem; vertical-align:middle;}
.coa-block-head p{margin:10px 0 0; color:var(--text-muted); font-size:.92rem;}
.coa-body{padding:24px 28px;}
.coa-objective{margin-bottom:22px; padding-bottom:20px; border-bottom:1px dashed var(--border);}
.coa-objective:last-child{border-bottom:none; margin-bottom:0; padding-bottom:0;}
.coa-objective h4{font-size:1rem; color:var(--heading-accent); margin-bottom:10px;}
.coa-strategies{margin:0 0 14px; padding-left:20px; color:var(--text-muted); font-size:.92rem;}
.coa-strategies li{margin-bottom:6px;}
.coa-meta{display:flex; gap:10px; flex-wrap:wrap;}
.coa-chip{
  font-size:.76rem; font-weight:600; padding:5px 12px; border-radius:999px;
  background:var(--bg-alt); color:var(--text-muted);
}
.coa-chip.resp{background:rgba(15,92,120,.14); color:var(--heading-accent);}
.coa-chip.plazo{background:var(--chip-plazo-bg); color:var(--chip-plazo-text);}
.coa-chip.result{background:rgba(18,165,148,.12); color:var(--link-accent);}

.source-box{
  background:var(--bg-alt); border-radius:var(--radius); padding:26px 28px; margin-top:50px;
  font-size:.85rem; color:var(--text-muted);
}
.source-box h4{color:var(--heading-accent); margin-bottom:10px;}
.source-box ul{margin:0; padding-left:18px;}
.source-box li{margin-bottom:4px;}

.sector-pager{
  display:flex; justify-content:space-between; gap:20px; margin-top:50px; flex-wrap:wrap;
}
.pager-link{
  flex:1; min-width:220px; background:var(--surface); border:1px solid var(--border); border-radius:14px;
  padding:18px 20px; text-decoration:none; color:var(--text); box-shadow:var(--shadow-sm);
  transition:transform .15s;
}
.pager-link:hover{transform:translateY(-3px);}
.pager-link span{display:block; font-size:.75rem; color:var(--text-dim); text-transform:uppercase; letter-spacing:.06em; margin-bottom:4px;}
.pager-link strong{color:var(--link-accent);}
.pager-link.next{text-align:right;}

@media (max-width:900px){
  .diag-columns{grid-template-columns:1fr;}
}

/* ---------- responsive ---------- */
@media (max-width:960px){
  .pillars{grid-template-columns:1fr;}
  .info-grid{grid-template-columns:1fr 1fr;}
  .stat-cards{grid-template-columns:1fr 1fr;}
  .chart-grid{grid-template-columns:1fr;}
  .sector-grid{grid-template-columns:1fr 1fr;}
  .two-col{grid-template-columns:1fr;}
  .footer-grid{grid-template-columns:1fr;}
  .timeline-track{flex-direction:column; gap:24px;}
  .tl-step::before{display:none;}
}
@media (max-width:720px){
  .nav-links{
    position:absolute; top:100%; left:0; right:0; background:var(--blue-900);
    flex-direction:column; padding:20px 24px; gap:18px; display:none;
  }
  .nav-links.open{display:flex;}
  .nav-toggle{display:flex;}
  .info-grid{grid-template-columns:1fr;}
  .stat-cards{grid-template-columns:1fr;}
  .sector-grid{grid-template-columns:1fr;}
  .participa-grid{grid-template-columns:1fr;}
  .coa-explainer{flex-direction:column;}
  .coa-arrow{transform:rotate(90deg); justify-content:center;}
}

/* ============================================================
   MOBILE-FIRST REFINEMENTS — hero, sections, tap targets, safe areas
   (added for: "la página debe verse perfecta en móvil")
   ============================================================ */
@media (max-width:600px){
  .navbar{padding:12px 16px;}
  .brand{gap:8px;}
  .brand-text{font-size:.98rem;}
  .brand-icon .icon-svg{width:24px; height:24px;}
  .nav-right{gap:8px;}
  .container{padding:0 18px;}
  .hero{min-height:auto; padding:52px 18px 44px;}
  .hero h1{font-size:clamp(1.6rem,7vw,2.2rem); line-height:1.2;}
  .hero-sub{font-size:1rem;}
  .hero-cta{flex-direction:column; width:100%; gap:12px;}
  .hero-cta .btn{width:100%; text-align:center; padding:14px 20px;}
  .hero-stats{gap:20px 28px;}
  .hero-stat strong{font-size:1.4rem;}
  .scroll-cue{display:none;}
  .section{padding:56px 0;}
  .section h2{font-size:clamp(1.4rem,6vw,1.9rem);}
  .lead{font-size:1rem; margin-bottom:30px;}
  .stat-card{padding:22px 18px;}
  .stat-number{font-size:1.9rem;}
  .chart-card{padding:18px;}
  .chart-card canvas{max-height:220px;}
  .coa-block-head{padding:18px 20px;}
  .coa-body{padding:18px 20px;}
  .coa-block-head h3{display:block; margin-top:8px;}
  .sector-hero{padding:44px 0 36px;}
  .sector-hero h1{font-size:clamp(1.5rem,7vw,2rem);}
  .sector-hero p{font-size:.98rem;}
  .sector-nav{top:56px;}
  .sector-nav .container{gap:18px; padding:10px 18px;}
  .meta-badge{padding:14px 16px; min-width:130px; flex:1 1 calc(50% - 7px);}
  .sector-pager{flex-direction:column;}
  .pager-link.next{text-align:left;}
  .participa-card, .col-card, .pillar-card{padding:22px 18px;}
  #themeToggle{width:46px; height:26px;}
  #themeToggle .tt-thumb{width:20px; height:20px;}
  [data-theme="dark"] #themeToggle .tt-thumb{transform:translateX(20px);}
}
@media (max-width:380px){
  .hero-stats{gap:16px 20px;}
  .hero-stat{min-width:40%;}
  .meta-badge{flex:1 1 100%;}
}
/* generous tap targets on touch devices */
@media (hover:none) and (pointer:coarse){
  .nav-links a, .sector-nav a, .btn, .pager-link, #themeToggle, .nav-toggle, .report-fab, .sector-card{min-height:44px;}
  .nav-links a{padding:10px 0;}
}
/* iOS safe-area support */
.report-fab{
  margin-bottom:env(safe-area-inset-bottom, 0px);
}

/* ============================================================
   ENTITY BADGES — original typographic monograms (not agency logos)
   ============================================================ */
.entity-badges{display:flex; flex-wrap:wrap; gap:10px 12px; margin:18px 0 6px;}
.entity-chip{
  display:inline-flex; align-items:center; gap:8px;
  background:var(--surface); border:1px solid var(--border); border-radius:999px;
  padding:6px 14px 6px 6px; font-size:.82rem; color:var(--text-muted); box-shadow:var(--shadow-sm);
}
.entity-mono{
  display:inline-flex; align-items:center; justify-content:center;
  width:26px; height:26px; border-radius:50%; flex-shrink:0;
  font-size:.62rem; font-weight:800; letter-spacing:-.02em; color:#fff;
  font-family:'Segoe UI', system-ui, sans-serif;
}
.entity-chip strong{color:var(--text); font-weight:700;}
.e-aee .entity-mono{background:#0f5c78;}
.e-luma .entity-mono{background:#0c8074;}
.e-genera .entity-mono{background:#b7412e;}
.e-nepr .entity-mono{background:#6a4fb8;}
.e-ddec .entity-mono{background:#0c8074;}
.e-aaa .entity-mono{background:#1565c0;}
.e-doe .entity-mono{background:#3d5257;}
.e-jp .entity-mono{background:#946400;}
.e-ceacc .entity-mono{background:#082032;}
.e-drna .entity-mono{background:#2e7d32;}
.e-upr .entity-mono{background:#00838f;}
.e-coral .entity-mono{background:#c2185b;}

/* ============================================================
   PHOTO SECTIONS — hero photo overlay + full-bleed banner divider
   ============================================================ */
.hero-photo{
  position:absolute; inset:0; z-index:0;
  background-size:cover; background-position:center;
}
.hero-photo::after{
  content:""; position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(8,32,50,.72) 0%, rgba(8,32,50,.55) 45%, rgba(8,32,50,.88) 100%);
}
.photo-credit{
  position:absolute; right:10px; bottom:8px; z-index:2;
  font-size:.66rem; color:rgba(255,255,255,.7); text-decoration:none; letter-spacing:.02em;
}
.photo-credit:hover{color:#fff;}

.photo-banner{
  position:relative; min-height:220px; display:flex; align-items:center;
  background-size:cover; background-position:center; overflow:hidden;
}
.photo-banner::before{
  content:""; position:absolute; inset:0; background:rgba(8,32,50,.5);
}
.photo-banner .container{position:relative; z-index:1;}
.photo-banner-text{max-width:620px; color:#fff;}
.photo-banner-text span{
  display:inline-block; font-size:.75rem; text-transform:uppercase; letter-spacing:.1em;
  color:var(--teal-400); font-weight:700; margin-bottom:8px;
}
.photo-banner-text p{color:#eafaf8; font-size:1rem; margin:0;}
@media (max-width:600px){
  .photo-banner{min-height:180px; padding:32px 0;}
}

/* icon (svg) replacing emoji — sizing helper */
.icon-svg{width:1em; height:1em; display:inline-block; vertical-align:-0.12em; stroke:currentColor;}
.pillar-icon svg, .sector-hero-icon svg{width:1em; height:1em;}

/* ============================================================
   AI DISCLOSURE + REPORT-AN-ERROR (footer, floating button, modal)
   ============================================================ */
.ai-disclosure{
  display:flex; gap:12px; align-items:flex-start;
  background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1);
  border-radius:14px; padding:16px 18px; margin:26px 0; font-size:.82rem; color:#bcdcd8;
}
.ai-disclosure svg{flex-shrink:0; margin-top:2px; color:var(--teal-400);}
.ai-disclosure strong{color:#fff;}
.footer-report-link{
  color:var(--teal-400); font-weight:700; text-decoration:underline; cursor:pointer; background:none; border:0; padding:0; font:inherit;
}

.report-fab{
  position:fixed; right:18px; bottom:18px; z-index:60;
  display:inline-flex; align-items:center; gap:8px;
  background:#0c8074; color:#fff; border:0; border-radius:999px;
  padding:13px 18px; font-size:.86rem; font-weight:700; cursor:pointer;
  box-shadow:0 8px 24px rgba(8,32,50,.35); transition:transform .15s ease;
}
.report-fab:hover{transform:translateY(-2px);}
.report-fab svg{width:16px; height:16px; flex-shrink:0;}
@media (max-width:600px){
  .report-fab{right:12px; bottom:12px; padding:12px 16px; font-size:.8rem;}
  .report-fab .fab-label{display:none;}
}

.modal-overlay{
  position:fixed; inset:0; background:rgba(8,32,50,.6); z-index:100;
  display:none; align-items:flex-end; justify-content:center; padding:0;
}
.modal-overlay.open{display:flex;}
@media (min-width:640px){
  .modal-overlay{align-items:center; padding:24px;}
}
.modal-card{
  background:var(--surface); color:var(--text); width:100%; max-width:520px;
  border-radius:20px 20px 0 0; max-height:92vh; overflow-y:auto;
  padding:26px 22px calc(26px + env(safe-area-inset-bottom, 0px));
  box-shadow:var(--shadow-md);
}
@media (min-width:640px){
  .modal-card{border-radius:20px; padding:30px 30px 30px;}
}
.modal-head{display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:6px;}
.modal-head h3{margin:0; font-size:1.2rem;}
.modal-close{
  background:var(--bg-alt); border:0; border-radius:50%; width:32px; height:32px; flex-shrink:0;
  font-size:1.1rem; cursor:pointer; color:var(--text-muted); line-height:1;
}
.type-toggle{display:flex; gap:8px; margin-bottom:16px;}
.type-btn{
  flex:1; border:1px solid var(--border-strong); background:var(--bg); color:var(--text-muted);
  border-radius:10px; padding:9px 10px; font-size:.82rem; font-weight:700; cursor:pointer;
  font-family:inherit; transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.type-btn.active{background:#0c8074; border-color:#0c8074; color:#fff;}
.modal-sub{font-size:.85rem; color:var(--text-muted); margin-bottom:20px;}
.form-field{margin-bottom:14px;}
.form-field label{display:block; font-size:.82rem; font-weight:700; margin-bottom:6px; color:var(--text);}
.form-field input, .form-field textarea{
  width:100%; border:1px solid var(--border-strong); border-radius:10px; padding:11px 13px;
  font-size:.95rem; font-family:inherit; background:var(--bg); color:var(--text);
}
.form-field textarea{resize:vertical; min-height:90px;}
.form-field input:focus, .form-field textarea:focus{outline:2px solid var(--teal-400); outline-offset:1px;}
.form-hint{font-size:.75rem; color:var(--text-dim); margin-top:4px;}
.honeypot{position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden;}
.modal-submit{
  width:100%; background:#0c8074; color:#fff; border:0; border-radius:12px; padding:13px 18px;
  font-size:.95rem; font-weight:700; cursor:pointer; margin-top:6px;
}
.modal-submit:disabled{opacity:.6; cursor:default;}
.modal-status{font-size:.85rem; margin-top:12px; padding:10px 12px; border-radius:10px; display:none;}
.modal-status.show{display:block;}
.modal-status.ok{background:rgba(18,165,148,.14); color:var(--link-accent);}
.modal-status.err{background:rgba(255,111,89,.14); color:#c23c2a;}

/* ============================================================
   RIESGO / ACCIÓN callout pair (páginas de sector)
   ============================================================ */
.callout-risk{margin-top:28px;}
.callout-action{
  background:var(--callout2-bg); border-color:var(--callout2-border); color:var(--callout2-text);
  margin-top:14px;
}
:root{
  --callout2-bg:#e4f5f2; --callout2-border:#9fd9d0; --callout2-text:#084f46;
}
[data-theme="dark"]{
  --callout2-bg:#0f2f2a; --callout2-border:#1d5a51; --callout2-text:#8fe0d4;
}
.diag-prose{max-width:860px;}
.diag-prose p{color:var(--text-muted);}

/* ============================================================
   HERO PHOTO as responsive <img> (srcset) — reemplaza background fijo
   ============================================================ */
.hero-photo img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
}
.hero-photo{background:none;}
.photo-banner-img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0;
}
.photo-banner{position:relative;}
.photo-banner::before{z-index:1;}
.photo-banner .container{z-index:2;}
.photo-banner .photo-credit{z-index:2;}

/* ============================================================
   GLOSARIO
   ============================================================ */
.glossary{margin:0; display:grid; gap:16px;}
.gloss-item{
  background:var(--surface); border:1px solid var(--border); border-radius:14px;
  padding:18px 22px; box-shadow:var(--shadow-sm); scroll-margin-top:90px;
}
.gloss-item dt{font-weight:700; font-family:Georgia,serif; font-size:1.05rem; color:var(--heading-accent); margin-bottom:6px;}
.gloss-item dd{margin:0; color:var(--text-muted); font-size:.94rem;}

/* ============================================================
   BACK TO TOP + scroll-spy del sub-nav de sector
   ============================================================ */
.back-to-top{
  position:fixed; right:18px; bottom:76px; z-index:59;
  width:42px; height:42px; border-radius:50%; border:0; cursor:pointer;
  background:var(--surface); color:var(--text-muted); box-shadow:var(--shadow-md);
  display:none; align-items:center; justify-content:center; font-size:1.1rem;
  border:1px solid var(--border);
}
.back-to-top.show{display:inline-flex;}
@media (max-width:600px){
  .back-to-top{right:12px; bottom:70px; width:40px; height:40px;}
}
.sector-nav a.active{color:var(--link-accent); border-color:var(--teal-400);}

/* ============================================================
   VISOR DEL PLAN (PDF.js)
   ============================================================ */
.viewer-section{padding-top:40px;}
.viewer-bar{
  display:flex; flex-wrap:wrap; gap:12px 18px; align-items:center;
  background:var(--surface); border:1px solid var(--border); border-radius:14px;
  padding:12px 16px; box-shadow:var(--shadow-sm); margin-bottom:18px;
  position:sticky; top:64px; z-index:30;
}
.viewer-group{display:flex; align-items:center; gap:8px;}
.viewer-bar select, .viewer-bar input{
  border:1px solid var(--border-strong); border-radius:9px; padding:9px 10px;
  font-size:.9rem; font-family:inherit; background:var(--bg); color:var(--text);
}
.viewer-bar input#pageInput{width:76px; text-align:center;}
.viewer-bar button{
  border:1px solid var(--border-strong); background:var(--bg); color:var(--text);
  border-radius:9px; width:40px; height:40px; font-size:1rem; cursor:pointer;
}
.viewer-bar button:disabled{opacity:.4; cursor:default;}
.viewer-range{font-size:.8rem; color:var(--text-dim); white-space:nowrap;}
.viewer-links{margin-left:auto; gap:14px;}
.viewer-links a{font-size:.82rem; font-weight:600; color:var(--link-accent); text-decoration:none;}
.viewer-links a:hover{text-decoration:underline;}
.viewer-stage{
  background:var(--bg-alt); border:1px solid var(--border); border-radius:14px;
  padding:18px; display:flex; flex-direction:column; align-items:center; min-height:420px;
}
#pdfCanvas{max-width:100%; box-shadow:var(--shadow-md); border-radius:4px; background:#fff;}
.viewer-status{
  font-size:.9rem; color:var(--text-muted); padding:14px 18px; text-align:center;
}
.viewer-hint{font-size:.8rem; color:var(--text-dim); margin-top:14px;}
.ver-plan{
  font-weight:700; color:var(--link-accent); text-decoration:none; white-space:nowrap;
}
.ver-plan:hover{text-decoration:underline;}
@media (max-width:600px){
  .viewer-bar{top:56px; padding:10px 12px; gap:10px;}
  .viewer-links{margin-left:0; width:100%; justify-content:space-between;}
  .viewer-stage{padding:10px;}
}
