/* CTMC · Mapa minero. Usa las variables del sitio (rediseño La veta). */
.mm-head { background: var(--bg-alt); }
.mm-head .wrap { gap: 1rem; }
.mm-head h1 { max-width: 20ch; }
.mm-corte { font: 600 .85rem var(--f-body); color: var(--fg-soft); }
.mm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: .6rem; max-width: 820px; }
.mm-stat { background: var(--surface); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.mm-stat strong { font: 800 1.7rem/1 var(--f-display); color: var(--fg); letter-spacing: -.02em; }
.mm-stat span { font-size: .82rem; line-height: 1.3; color: var(--fg-soft); }
.mm-sec { padding: clamp(24px, 4vw, 40px) 16px clamp(56px, 7vw, 96px); }
.mm-box { max-width: 1260px; margin: 0 auto; }
.mm-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 22px; background: var(--surface); border-radius: 26px; padding: 18px 22px; box-shadow: var(--shadow); margin-bottom: 14px; }
.mm-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mm-f > span { font: 700 .74rem var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-soft); }
.mm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mm-chip { font: 600 .88rem/1.2 var(--f-body); padding: 8px 13px; border-radius: 999px; border: 1.5px solid rgba(11, 34, 69, .22); background: var(--surface); color: #0B2245; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.mm-chip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.mm-chip[aria-pressed="false"] { opacity: .5; }
.mm-chip[aria-pressed="true"] { border-color: #0B2245; }
.mm-f select { font: 600 1rem var(--f-body); color: #0B2245; padding: 9px 12px; border-radius: 14px; border: 1.5px solid rgba(11, 34, 69, .22); background: var(--surface); max-width: 240px; }
.mm-count { margin-left: auto; font: 700 .9rem var(--f-display); color: var(--accent); align-self: center; }
.mm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 14px; align-items: stretch; }
.mm-mapwrap { position: relative; z-index: 0; isolation: isolate; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); background: #EFE6D6; min-height: 640px; }
#mm-map { position: absolute; inset: 0; background: #EFE6D6; font-family: var(--f-body); }
.mm-legend { position: absolute; left: 14px; bottom: 14px; z-index: 500; background: rgba(255, 255, 255, .94); border-radius: 16px; padding: 10px 14px; font-size: .78rem; line-height: 1.5; color: #0B2245; box-shadow: var(--shadow); pointer-events: none; }
.mm-legend b { display: block; font-family: var(--f-display); font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-soft); }
.mm-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.mm-legend .op { border-radius: 50%; background: #0B2245; box-shadow: 0 0 0 3px #F9A21B; margin-left: 2px; margin-right: 9px; width: 8px; height: 8px; }
.mm-mlabel { font: 600 10.5px/1 var(--f-body); color: rgba(11, 34, 69, .62); white-space: nowrap; text-shadow: 0 0 3px #EFE6D6, 0 0 3px #EFE6D6; pointer-events: none; }
.mm-op { width: 18px; height: 18px; border-radius: 50%; background: #0B2245; border: 3px solid #fff; box-shadow: 0 0 0 4px #F9A21B, 0 6px 14px rgba(11, 34, 69, .5); }
.mm-oplabel { font: 800 12px/1 var(--f-display); color: #0B2245; background: #fff; padding: 5px 9px; border-radius: 999px; box-shadow: var(--shadow); white-space: nowrap; }
.leaflet-container { background: #EFE6D6; }
.leaflet-bar a { color: #0B2245; }
.mm-panel { background: var(--surface); border-radius: 28px; box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column; gap: 14px; max-height: 640px; overflow: auto; scroll-margin-top: 90px; }
.mm-panel h2 { font-size: 1.45rem; line-height: 1.12; }
.mm-panel .eyebrow { color: var(--accent); }
.mm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mm-tag { font: 700 .76rem var(--f-display); padding: .3rem .7rem; border-radius: 999px; background: var(--chip); color: #0B2245; }
.mm-tag.e0 { background: #FBE3D2; color: #8A3306; } .mm-tag.e1 { background: #FCEBC4; color: #7A5200; } .mm-tag.e2 { background: #DCEBF3; color: #1B4F6E; } .mm-tag.sus { background: #E6E3DD; color: #555; }
.mm-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: .93rem; }
.mm-dl dt { color: var(--fg-soft); font-weight: 600; }
.mm-dl dd { margin: 0; color: var(--fg); }
.mm-block { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.mm-block h3 { font: 700 .78rem var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-soft); }
.mm-block p, .mm-block li { font-size: .93rem; line-height: 1.5; }
.mm-block ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.mm-block a { color: var(--accent); font-weight: 600; text-decoration: none; }
.mm-block a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mm-src { font-size: .78rem; color: var(--fg-soft); }
.mm-empty { background: var(--bg-alt); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.mm-empty strong { font-family: var(--f-display); }
.mm-empty .btn { align-self: flex-start; padding: .7rem 1.1rem; font-size: .88rem; }
.mm-tlist { display: flex; flex-wrap: wrap; gap: 6px; }
.mm-tlist button { font: 600 .82rem var(--f-body); padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: #0B2245; cursor: pointer; }
.mm-tlist button:hover { border-color: #0B2245; }
.mm-note { max-width: 1260px; margin: 18px auto 0; font-size: .85rem; line-height: 1.55; color: var(--fg-soft); }
@media (max-width: 980px) {
  .mm-grid { grid-template-columns: 1fr; }
  .mm-mapwrap { min-height: 0; height: 68vh; }
  .mm-panel { max-height: none; }
  .mm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mm-count { margin-left: 0; width: 100%; }
  .mm-f select { max-width: 100%; }
}

/* Vista por municipio: regalías (17 nov 2026) */
.mm-modo .mm-chip[aria-pressed="false"] { opacity: 1; background: var(--surface); color: #0B2245; }
.mm-modo .mm-chip[aria-pressed="true"] { background: #0B2245; color: #fff; border-color: #0B2245; }
.mm-big { display: flex; flex-direction: column; gap: 4px; background: var(--bg-alt); border-radius: 18px; padding: 14px 16px; }
.mm-big strong { font: 800 1.9rem/1.05 var(--f-display); color: #7A2E08; letter-spacing: -.02em; }
.mm-big span { font-size: .9rem; line-height: 1.4; color: var(--fg-soft); }
.mm-panel .mm-sub { font-size: .93rem; color: var(--fg-soft); margin: 0; }
.mm-bars { width: 100%; height: auto; display: block; }
.mm-bars-t { font: 600 10px var(--f-body); fill: rgba(11, 34, 69, .62); }
.mm-bars-max { fill: #7A2E08; font-weight: 700; }
.mm-minlist li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.mm-minlist li:last-child { border-bottom: 0; padding-bottom: 0; }
.mm-minlist b { font-weight: 700; color: var(--fg); }
.mm-minlist span { color: var(--fg-soft); }
.mm-link { font: inherit; color: var(--accent); font-weight: 700; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.mm-f[hidden], .mm-legend[hidden] { display: none; }

/* Detalle al tocar las barras de regalías (17 nov 2026) */
.mm-bar-hit { cursor: pointer; outline: none; }
.mm-bar-hit:hover, .mm-bar-hit:focus-visible { fill-opacity: .07; }
.mm-bar-det { display: flex; flex-direction: column; gap: 2px; background: var(--bg-alt); border-radius: 12px; padding: 9px 13px; margin-top: 8px; }
.mm-bar-det strong { font: 700 1.02rem/1.25 var(--f-display); color: #7A2E08; }
.mm-bar-det span { font-size: .8rem; line-height: 1.4; color: var(--fg-soft); }

/* Radiografía de la operación (17 nov 2026) */
.mm-rx { border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); }
.mm-rx-h strong { font: 800 1.05rem/1.2 var(--f-display); color: var(--fg); }
.mm-rx-h span { display: block; font-size: .78rem; line-height: 1.45; color: var(--fg-soft); margin-top: 4px; }
.mm-rx-sec h3 { font: 700 .74rem var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.mm-rx-dl { margin: 0; display: flex; flex-direction: column; gap: 9px; }
.mm-rx-dl dt { font-size: .8rem; font-weight: 600; color: var(--fg-soft); }
.mm-rx-dl dd { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.mm-rx-v { font-size: .95rem; line-height: 1.35; font-weight: 700; color: var(--fg); }
.mm-rx-np { font-weight: 600; font-style: italic; color: var(--fg-soft); }
.mm-rx-src { font-size: .72rem; line-height: 1.35; color: var(--fg-soft); }
.mm-rx-src a { color: var(--accent); text-decoration: none; }
.mm-rx-src a:hover { text-decoration: underline; text-underline-offset: 2px; }
.mm-rx-tipo { display: inline-block; font-size: .64rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 6px; margin-right: 6px; vertical-align: 1px; }
.mm-rx-empresa { background: #E8EEF7; color: #0B2245; }
.mm-rx-matriz { background: #EEE8F7; color: #3A2466; }
.mm-rx-estado { background: #FBEBDD; color: #7A2E08; }

/* Vista Obras con regalías (29 nov 2026) */
.mm-o-leg { max-width: 235px; }
.mm-o-sec { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.mm-o-sl { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .86rem; line-height: 1.3; text-align: left; }
.mm-o-sl b { font-weight: 700; color: #0B2245; }
.mm-o-sl span { color: var(--fg-soft); text-align: right; flex: none; }
.mm-o-track { height: 8px; background: var(--bg-alt); border-radius: 99px; overflow: hidden; }
.mm-o-track i { display: block; height: 100%; background: #3F87AE; border-radius: 99px; }
.mm-o-list { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.mm-o-p { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--bg-alt); text-align: left; }
.mm-o-p strong { font: 700 .9rem/1.3 var(--f-body); color: #0B2245; overflow-wrap: anywhere; }
.mm-o-m { font-size: .82rem; line-height: 1.35; color: var(--fg-soft); }
.mm-o-e { font-size: .82rem; font-weight: 600; color: #1B4F6E; }
.mm-o-e.mm-o-ok { color: #2F6B3A; }
.mm-o-b { font-size: .72rem; color: var(--fg-soft); }
.mm-o-more { align-self: flex-start; font: 600 .84rem var(--f-body); padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: #0B2245; cursor: pointer; }
.mm-o-more:hover { border-color: #0B2245; }
.mm-o-min { font-size: .9rem; line-height: 1.45; text-align: left; }