:root{
  --green:#1d4ed8;
  --dark:#1e3a8a;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e2e8f0;
  --bg:#f8fafc;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--bg);color:var(--text);
  font:15px/1.6 system-ui,-apple-system,BlinkMacSystemFont,
  "Segoe UI",sans-serif
}
a{color:var(--green)}
.shell{width:min(1240px,92%);margin:auto}
.nav{background:white;border-bottom:1px solid var(--border)}
.nav-inner{
  min-height:76px;display:flex;align-items:center;
  justify-content:space-between;gap:18px
}
.brand{
  font-size:22px;font-weight:750;color:var(--dark);
  text-decoration:none;display:flex;align-items:center;gap:12px
}
.brand-icon{
  color:white;background:var(--green);border-radius:13px;
  width:43px;height:43px;display:grid;place-items:center
}
nav{display:flex;gap:24px;flex-wrap:wrap}
nav a{text-decoration:none;color:var(--text);font-weight:600}
.hero{
  color:white;padding:85px 0 100px;
  background:radial-gradient(ellipse at top right,#2563eb,transparent 65%),
  linear-gradient(120deg,#172554,#1d4ed8)
}
.hero h1{
  font-size:clamp(36px,5vw,68px);
  line-height:1.1;letter-spacing:-2px;margin:20px 0
}
.hero p{max-width:690px;color:#dbeafe;font-size:19px}
.eyebrow{font-size:11px;font-weight:800;letter-spacing:1.6px}
.green{color:var(--green)}
.button{
  display:inline-block;text-decoration:none;
  border-radius:9px;padding:12px 20px;font-weight:700;
  margin:10px 8px 0 0
}
.primary{background:#facc15;color:var(--dark)}
.ghost{border:1px solid #93c5fd;color:white}
.dark{background:var(--green);color:white}
.metrics{
  display:grid;grid-template-columns:repeat(4,1fr);
  gap:16px;margin-top:-40px;position:relative
}
.metric,.panel{
  background:white;border:1px solid var(--border);
  border-radius:16px;padding:24px;
  box-shadow:0 6px 20px #0f172a06
}
.metric span,.metric small{color:var(--muted);display:block}
.metric strong{
  font-size:clamp(26px,4vw,40px);
  color:var(--dark);display:block;line-height:1.5
}
.section{padding-top:48px;padding-bottom:20px}
h2{font-size:30px;line-height:1.2;letter-spacing:-.8px}
h3{margin-top:0}
.muted{color:var(--muted)}
.filters{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;margin:24px 0
}
label{font-size:13px;font-weight:700}
select{
  width:100%;display:block;margin-top:7px;
  border:1px solid #cbd5e1;border-radius:8px;
  background:white;color:var(--text);
  padding:12px;font:inherit
}
.workspace{
  display:grid;grid-template-columns:1.15fr 1fr;gap:18px
}
.big-number{
  font-size:58px;font-weight:800;color:var(--green);
  letter-spacing:-2px;line-height:1.2
}
#map{
  width:100%;background:#eff6ff;border-radius:12px;
  border:1px solid var(--border)
}
.map-point{cursor:pointer}
.map-point circle{fill:#1d4ed8;stroke:white;stroke-width:2}
.map-point.active circle{fill:#facc15;stroke:#1e3a8a;stroke-width:3}
.map-point text{font-size:11px;fill:#1e3a8a;font-weight:600}
.map-grid{stroke:#bfdbfe;stroke-width:1}
.map-caption{font-size:12px;fill:#64748b}
.bar-row{
  display:grid;grid-template-columns:minmax(110px,1fr) 1fr 48px;
  gap:10px;align-items:center;font-size:12px;margin:12px 0
}
.bar{
  height:9px;border-radius:10px;
  background:#e2e8f0;overflow:hidden
}
.bar-fill{height:100%;background:var(--green);border-radius:10px}
.value{text-align:right;font-weight:700;font-variant-numeric:tabular-nums}
.comparison{margin-top:18px}
.data-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
dt{font-size:12px;color:var(--muted);margin-top:12px}
dd{margin:0;font-weight:650}
.notice{
  margin-top:20px;padding:18px;background:#eff6ff;
  border-left:3px solid var(--green);border-radius:7px;
  font-size:13px;color:#334155
}
hr{border:0;border-top:1px solid var(--border);margin:22px 0}
footer{margin-top:40px;background:var(--dark);color:white;padding:35px 0}
footer a{color:#facc15}
:focus-visible{outline:3px solid #facc15;outline-offset:3px}
[hidden]{display:none!important}
@media(max-width:850px){
  .metrics,.filters{grid-template-columns:1fr 1fr}
  .workspace,.data-grid{grid-template-columns:1fr}
  .hero{padding:60px 0 75px}
}
@media(max-width:520px){
  .nav-inner{align-items:flex-start;flex-direction:column;padding:15px 0}
  nav{gap:15px;font-size:13px}
  .metrics{gap:9px}
  .metric,.panel{padding:16px}
  .filters{grid-template-columns:1fr}
  .hero h1{letter-spacing:-1px}
}


/* MARKET MAULE - MAPA CARTOGRAFICO */

#geo-map {
    width:100%;
    height:clamp(420px,48vw,650px);
    border:1px solid #e2e8f0;
    border-radius:12px;
    background:#eff6ff;
    z-index:1;
}

.map-toolbar {
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin:12px 0;
}

.map-toolbar button {
    font:inherit;
    font-size:13px;
    font-weight:650;
    cursor:pointer;
    background:#f8fafc;
    color:#1e3a8a;
    border:1px solid #cbd5e1;
    border-radius:8px;
    padding:9px 13px;
}

.map-toolbar button:hover {
    background:#dbeafe;
}

.map-status {
    font-size:12px;
    color:#64748b;
    margin:8px 0;
}

.leaflet-container {
    font-family:inherit;
}

.leaflet-popup-content {
    font-size:14px;
    line-height:1.6;
}

.leaflet-tooltip {
    border-radius:7px;
    font-weight:650;
}

@media(max-width:520px) {
    #geo-map {
        height:430px;
    }
}


/* MARKET MAULE - IDENTIDAD CORPORATIVA */

body {
    font-family:"Manrope",system-ui,-apple-system,
                "Segoe UI",sans-serif;
}

.nav {
    background:#1e3a8a;
    border-bottom:1px solid #1d4ed8;
}

.nav-inner {
    min-height:82px;
}

.brand {
    color:#ffffff;
    min-width:0;
}

.market-logo {
    display:block;
    width:auto;
    height:54px;
    max-width:240px;
    object-fit:contain;
}

nav a {
    color:#ffffff;
    font-weight:650;
}

nav a:hover {
    color:#facc15;
}

.hero {
    background:
      radial-gradient(
        ellipse at top right,#2563eb,transparent 65%
      ),
      linear-gradient(120deg,#172554,#1d4ed8);
}

.hero h1 {
    font-weight:800;
}

.hero p {
    color:#dbeafe;
}

.primary {
    background:#facc15;
    color:#172554;
}

.primary:hover {
    background:#fde047;
}

.dark {
    background:#2563eb;
    color:#ffffff;
}

.dark:hover {
    background:#1d4ed8;
}

.ghost {
    border-color:#93c5fd;
    color:#ffffff;
}

.metric strong {
    color:#1d4ed8;
}

.bar-fill {
    background:#2563eb;
}

.big-number {
    color:#1d4ed8;
}

select:focus {
    border-color:#2563eb;
}

.notice {
    background:#eff6ff;
    color:#334155;
    border-left-color:#2563eb;
}

footer {
    background:#1e3a8a;
}

footer a {
    color:#bfdbfe;
}

.map-toolbar button {
    background:#eff6ff;
    color:#1d4ed8;
    border-color:#bfdbfe;
}

.map-toolbar button:hover {
    background:#dbeafe;
}

.leaflet-tooltip {
    color:#1e3a8a;
}

@media(max-width:520px) {
    .market-logo {
        height:44px;
        max-width:210px;
    }
}

