/* Puentes y Garitas · Diseño v2 (editorial, aprobado 2026-11-24)
   Se carga DESPUÉS de estilos.css y lo redefine. Piloto: Eagle Pass (index.html) y páginas por ciudad.
   Tokens:  Hueso #FAF9F6 · Carbón #141614 · Verde aduana #16302A · Acento ámbar #E9A81E
            Semáforo (solo datos): fluido #2F6B47 · moderado #94600E · lento #A63A2E
   Tipos:   Instrument Serif (títulos, −0.03em) · Plus Jakarta Sans (texto) · JetBrains Mono (números y etiquetas)
   Bordes:  1px sólidos de bajo contraste · radios 0 (estructura) / 4px (controles) / 6px (tarjetas) · sin sombras */

@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(fuentes/instrument-serif-normal-400.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(fuentes/instrument-serif-italic-400.woff2) format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fuentes/plus-jakarta-sans-normal-400-700.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fuentes/jetbrains-mono-normal-400-800.woff2) format('woff2'); }

:root {
  --bg: #FAF9F6; --surface: #F4F2ED; --surface-2: #ECE9E2; --line: #E3E0D8; --line-2: #D9D6CE; --line-3: #C9C5BB;
  --ink: #141614; --ink-2: #3D403C; --ink-3: #5C5F5A;
  --board: #16302A; --board-2: #1C3A33; --board-ink: #F2F0EA; --board-dim: rgba(242,240,234,.66); --board-line: rgba(242,240,234,.16);
  --accent: #E9A81E; --accent-ink: #2A1D00;
  --prono: #94600E;
  --go: #2F6B47; --go-bg: #E4ECE5;
  --slow: #94600E; --slow-bg: #F2E9D8;
  --stop: #A63A2E; --stop-bg: #F3E1DD;
  --none: #6B6E69; --none-bg: #ECEAE4;
  --b-go: #8FCFA5; --b-slow: #E9C27A; --b-stop: #EE9A90;
  --warn: #E9A81E; --warn-ink: #2A1D00;
  --focus: #141614;
  --r: 6px; --r-ctl: 4px;
  --f-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --f-text: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --f-display: var(--f-mono);   /* en estilos.css "display" se usa sobre todo para cifras: ahora son monoespaciadas */
  --t: .3s ease;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0C0E; --surface: #131316; --surface-2: #1A1A1E; --line: #222327; --line-2: #2C2D32; --line-3: #3A3B41;
    --ink: #F2F0EA; --ink-2: #C9C7C0; --ink-3: #9A9A94;
    --board: #101F1A; --board-2: #16291F;
    --prono: #E5B567;
    --go: #7CCB98; --go-bg: #13231A; --slow: #E5B567; --slow-bg: #261E10; --stop: #F0928A; --stop-bg: #2A1714;
    --none: #9A9A94; --none-bg: #1C1C20; --focus: #E9A81E;
  }
}
:root[data-theme="dark"] {
  --bg: #0C0C0E; --surface: #131316; --surface-2: #1A1A1E; --line: #222327; --line-2: #2C2D32; --line-3: #3A3B41;
  --ink: #F2F0EA; --ink-2: #C9C7C0; --ink-3: #9A9A94;
  --board: #101F1A; --board-2: #16291F;
  --prono: #E5B567;
  --go: #7CCB98; --go-bg: #13231A; --slow: #E5B567; --slow-bg: #261E10; --stop: #F0928A; --stop-bg: #2A1714;
  --none: #9A9A94; --none-bg: #1C1C20; --focus: #E9A81E;
}

/* ---------- Base ---------- */
body { font: 400 16px/1.55 var(--f-text); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1200px; padding-left: 24px; padding-right: 24px; }
@media (max-width: 640px) { .wrap { padding-left: 16px; padding-right: 16px; } }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.top :focus-visible, .accion-movil :focus-visible { outline-color: var(--accent); }
main a { text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-thickness var(--t), color var(--t); }
main a:hover { text-decoration-thickness: 2px; }
.num, .grande b, .pl-min b, .dc b, .kpi b, .carr-num b, .otros dd, .cd-vivo b, .fr-pt b, .fr-ol li > b { font-variant-numeric: tabular-nums; }

/* ---------- Encabezado: tablero verde aduana, sin cinta de peligro ---------- */
.top::after { height: 1px; background: var(--board-line); }
.top::before { content: ""; position: absolute; left: 0; bottom: 0; width: 96px; height: 2px; background: var(--accent); z-index: 1; }
.top .wrap { padding-top: 16px; padding-bottom: 40px; }
.marca .logo { border-width: 1px; border-radius: var(--r-ctl); }
.marca b { font-family: var(--f-serif); font-weight: 400; font-size: 1.6rem; letter-spacing: -.02em; }
.marca span { font-size: .64rem; letter-spacing: .08em; }
.envivo { border-radius: var(--r-ctl); font-weight: 500; font-size: .64rem; }
.envivo::before { animation: latido 2.4s ease-in-out infinite; }
@keyframes latido { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .envivo::before { animation: none; } }
.tema { border-radius: var(--r-ctl); transition: border-color var(--t); }

/* Hero editorial 7/5 */
.hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 18px 48px; margin: 40px 0 28px; }
.hero > nav { justify-self: end; }
.kicker { font-size: .68rem; letter-spacing: .1em; margin-bottom: 16px; }
.titular { font-family: var(--f-serif); font-weight: 400; font-size: clamp(2.9rem, 7.6vw, 5.8rem); line-height: .98; letter-spacing: -.03em; max-width: 16ch; }
.titular em { font-style: italic; color: inherit; }
.reco-det { font-size: 1.02rem; margin-top: 16px; }
.reco-det b { font-weight: 600; }
.ventana-hero { border-radius: var(--r-ctl); margin-top: 20px; }
.ventana-hero .vh-k { border-radius: var(--r-ctl) 0 0 var(--r-ctl); font-weight: 500; }
.tabs { border-radius: var(--r-ctl); padding: 3px; gap: 2px; }
.tabs a { font-family: var(--f-text); font-weight: 500; font-size: .9rem; letter-spacing: 0; text-transform: none; padding: 8px 14px; border-radius: 3px;
  transition: background-color var(--t), color var(--t); }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr; margin-top: 26px; } .hero > nav { justify-self: start; } }
@media (max-width: 440px) { .tabs a { padding: 8px 10px; font-size: .86rem; } }
.meta { font-size: .64rem; }

/* Tablero bento: líneas de 1px por la separación de la cuadrícula; la mejor opción con regla ámbar a la izquierda */
.tablero { gap: 1px; background: var(--board-line); border: 1px solid var(--board-line); border-radius: var(--r); overflow: hidden; }
.placa, .placa + .placa { border: 0; background: var(--board); transition: background-color var(--t); }
.placa:hover { background: var(--board-2); }
.placa.mejor, .placa.prin.mejor { background: var(--board-2); box-shadow: none; border: 0; border-radius: 0; }
.placa.mejor::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); }
.pl-nom { font-family: var(--f-text); font-weight: 600; font-size: 1.02rem; letter-spacing: -.01em; text-transform: none; }
.pl-idx { font-size: .68rem; }
.pl-mejor { font-weight: 500; font-size: .62rem; border-radius: 0 0 var(--r-ctl) var(--r-ctl); }
.pl-min b { font-weight: 500; letter-spacing: -.045em; font-size: clamp(2.6rem, 6vw, 3.8rem); }
.placa.prin .pl-min b { font-size: clamp(4rem, 11vw, 7.2rem); }
.pl-min small { font-family: var(--f-text); font-weight: 500; font-size: 1.05rem; letter-spacing: 0; }
.pl-min.cerr b { font-size: 1.8rem !important; letter-spacing: -.02em; }
.pl-est .chip { font-weight: 500; font-size: .66rem; }
.pl-flecha { stroke-width: 2; }
@media (min-width: 641px) {
  .tablero.n3 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .tablero.n3 > .placa { grid-column: span 5; }
  .tablero.n3 > .placa.prin { grid-column: span 7; grid-row: span 2; }
  .tablero.n4 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .tablero.n4 > .placa { grid-column: span 3; }
  .tablero.n4 > .placa.prin { grid-column: span 6; grid-row: span 2; }
  .tablero.n4 > .placa:nth-child(4) { grid-column: span 6; }
}
@media (max-width: 640px) { .placa + .placa { border-top: 0; } }

/* Carriles */
.carr { border-radius: var(--r-ctl); border-color: var(--line-2); }
.carr-num b { font-weight: 600; font-size: 2.1rem; letter-spacing: -.04em; }
.carr-num span { font-family: var(--f-text); font-weight: 500; font-size: .95rem; }
.carr-pips i { width: 7px; height: 18px; border-radius: 1px; box-shadow: inset 0 0 0 1px var(--line-3); }
.pl-carr { border-radius: var(--r-ctl); }
.pl-carr .carr-pips i { width: 7px; height: 16px; box-shadow: inset 0 0 0 1px var(--board-line); }
.pl-carr .carr-num b { font-size: 1.7rem; }
.placa.prin .pl-carr .carr-num b { font-size: 2rem; }

/* ---------- Secciones ---------- */
.sec-titulo { border-top-width: 1px; margin: 72px 0 24px; padding-top: 14px; }
@media (min-width: 561px) { .sec-titulo { grid-template-columns: 64px minmax(0, 1fr); } }
@media (max-width: 560px) { .sec-titulo { margin-top: 56px; } }
.sec-titulo .idx { font-size: .7rem; letter-spacing: .06em; }
.sec-titulo h2 { font-family: var(--f-serif); font-weight: 400; font-size: clamp(2.1rem, 4.4vw, 3.2rem); line-height: 1; letter-spacing: -.03em; text-transform: none; }
.sec-titulo p { font-size: .98rem; margin-top: 10px; }
h3 { font-family: var(--f-text); font-weight: 600; font-size: 1.1rem; letter-spacing: -.01em; text-transform: none; line-height: 1.2; }
.migas { margin-top: 28px; }

/* Datos clave: cuadrícula de reglas finas */
.datos-clave { border-top: 1px solid var(--ink); margin-top: 40px; }
.dc { padding: 14px 22px 18px 0; border-bottom-color: var(--line-2); }
.dc b { font-weight: 500; font-size: clamp(1.8rem, 3.4vw, 2.3rem); letter-spacing: -.04em; }
.dc-tit { font-size: .66rem; }

/* Detalle por cruce */
.puente { border-bottom-color: var(--line-2); padding-bottom: 36px; margin-bottom: 36px; }
.escudo { font-family: var(--f-serif); font-weight: 400; font-style: italic; font-size: 5.6rem; letter-spacing: -.04em; }
@media (max-width: 760px) { .escudo { font-size: 3.4rem; } }
.p-head { border-right-width: 2px; }
@media (max-width: 760px) { .p-head { border-left-width: 2px; } }
.p-head h2, .p-head .p-h { font-family: var(--f-serif); font-weight: 400; font-size: 2rem; line-height: 1; letter-spacing: -.03em; text-transform: none; }
.p-head .badge { font-weight: 500; border-radius: var(--r-ctl); }
.grande b { font-weight: 500; font-size: clamp(3.6rem, 9vw, 5.4rem); letter-spacing: -.045em; }
.grande small { font-family: var(--f-text); font-weight: 500; font-size: 1.15rem; }
.grande.cerrado b { font-size: 2.4rem; letter-spacing: -.02em; }
.estado { font-weight: 500; font-size: .66rem; border-radius: var(--r-ctl); }
.otros dd { font-weight: 500; font-size: 1.35rem; letter-spacing: -.03em; }
.otros dd.ab { font-weight: 500; }
.graf .normal { fill: var(--surface-2); stroke: var(--line-3); }
.graf .hoy { stroke-width: 2; }
.graf .prono-l { stroke-width: 2; }
.graf .best { stroke-width: 1; }
.fuente { border-top-style: solid; border-top-color: var(--line); }

/* Horas pico */
.picos { border-top-color: var(--line-2); }
.pk-seg, .seg { border-radius: var(--r-ctl); border-color: var(--line-2); }
.pk-seg button { font-weight: 500; transition: background-color var(--t), color var(--t); }
.pk-barras { border-bottom-width: 1px; }
.pk-barras i { border-radius: 1px 1px 0 0; }
.pk-barras button.sel i { outline-width: 1px; }
.pk-res { border-left-width: 2px; }
.pk-res dd { font-weight: 500; font-size: 1.3rem; letter-spacing: -.03em; }
.pk-semana span.peor { box-shadow: inset 0 0 0 1px var(--ink); }

/* Avisos, guía y preguntas */
.aviso { border-left-width: 2px; border-radius: 0; background: transparent; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.rombo { box-shadow: none; }
.guia .bloque + .bloque { border-left-color: var(--line-2); }
.guia h4 { font-family: var(--f-text); font-weight: 600; font-size: 1rem; letter-spacing: -.01em; text-transform: none; }
.faq summary { font-weight: 500; transition: color var(--t); }
.faq summary:hover { color: var(--ink-2); }
footer { border-top-width: 1px; }
.otras-grid { border-top-width: 1px; }
.otras-grid a { font-weight: 500; }

/* Eagle Pass: cámaras, reportes, mapa y bloque para empresas */
.cam-play, .cam iframe, .mapa, .mapa-play { border-radius: var(--r); }
.cam-ph { background: var(--board); }
.cam-btn { box-shadow: none; width: 58px; height: 58px; margin: -29px 0 0 -29px; }
.cam-btn::after { left: 23px; top: 17px; border-width: 12px 0 12px 18px; }
.cam figcaption b { font-family: var(--f-text); font-weight: 600; font-size: 1.05rem; text-transform: none; letter-spacing: -.01em; }
.cam-vivo { border-radius: var(--r-ctl); font-weight: 500; }
.rep-banda { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-top: 2px solid var(--accent); border-radius: 0 0 var(--r) var(--r); }
.rep-banda h3 { color: var(--ink); font-family: var(--f-serif); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -.03em; text-transform: none; }
.rep-banda .sub { color: var(--ink-2); }
.rep button { font-family: var(--f-text); font-weight: 600; font-size: 1rem; letter-spacing: -.01em; text-transform: none; border-radius: var(--r-ctl);
  transition: border-color var(--t), background-color var(--t); }
.rep button:active { transform: none; background: var(--surface-2); }
.panel { border-radius: var(--r); }
.b2b { border: 1px solid var(--line-2); border-radius: var(--r); transition: border-color var(--t); }
.b2b:hover { border-color: var(--ink); }
.b2b h2 { font-family: var(--f-serif); font-weight: 400; font-size: clamp(1.8rem, 3.6vw, 2.5rem); letter-spacing: -.03em; text-transform: none; line-height: 1.02; }
.b2b-btn { border-radius: var(--r-ctl); transition: background-color var(--t); }
.b2b-link { border-radius: var(--r-ctl); transition: background-color var(--t), color var(--t); }
.ef { box-shadow: none !important; border-width: 1px !important; border-radius: var(--r) !important; }
.ef-btn { border-radius: var(--r-ctl); font-family: var(--f-text); font-weight: 700; text-transform: none; font-size: 1.05rem; }
.ef-txt b { font-weight: 500; letter-spacing: -.04em; }

/* Barra inferior en celular */
@media (max-width: 760px) {
  .accion-movil { border-top: 1px solid var(--board-line); }
  .accion-movil::before { content: ""; position: absolute; left: 0; top: -1px; width: 96px; height: 2px; background: var(--accent); }
  .accion-movil a { font-family: var(--f-text); font-weight: 600; font-size: .95rem; letter-spacing: -.01em; text-transform: none; border-radius: var(--r-ctl); }
}
.toast { border-radius: var(--r-ctl); }
.skel { font-size: .74rem; }
.fila-tt { border-left-width: 2px; }

/* ================= v2 · Carga, Mercado y buscador de Ciudades ================= */
/* Indicadores del encabezado (Carga y Mercado) */
.kpis { border-top-color: var(--board-line); margin-top: 28px; }
.kpi { padding: 16px 22px 18px 0; transition: background-color var(--t); }
.kpi span { font-weight: 500; font-size: .64rem; }
.kpi b { font-weight: 500; letter-spacing: -.04em; font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
a.kpi-link:hover { background: var(--board-2); }
/* Índice fijo de secciones */
.indice { background: var(--bg); border-bottom-color: var(--line-2); }
.indice a { border-radius: var(--r-ctl); border-color: var(--line-2); font-weight: 500; transition: border-color var(--t), background-color var(--t); }
.indice a:hover { border-color: var(--ink); }
/* Puertos de carga */
.pt { border-left-width: 2px; padding-top: 20px; padding-bottom: 24px; }
.pt.mejor { background: transparent; }
.pt h3 { font-family: var(--f-serif); font-weight: 400; font-size: 1.9rem; letter-spacing: -.03em; text-transform: none; line-height: 1; }
.pt .badge, .p-head .badge, .fr-n .badge { font-weight: 500; border-radius: var(--r-ctl); }
.pt .grande b { font-size: clamp(2.8rem, 7vw, 4rem); }
.pt-curva path { stroke-width: 1.5; }
.pt-curva line { stroke-width: 2; }
/* Pronóstico */
.pr-tabla thead th { border-bottom-width: 1px; font-weight: 500; }
.pr-tabla td b { font-weight: 500; letter-spacing: -.03em; font-size: 1.3rem; }
/* Eagle Pass para carga */
.cg-grid { border-top-width: 1px; }
.cg-num b { font-weight: 500; letter-spacing: -.045em; }
.cg-num small, .cg-rd { font-family: var(--f-text); font-weight: 500; }
.cg-rd { font-size: 1.15rem; letter-spacing: -.01em; }
.cg-aviso { border-radius: var(--r-ctl); font-weight: 500; }
.cg-pais { border-radius: var(--r-ctl); font-weight: 500; }
.cg-pais.US { box-shadow: none; border: 1px solid var(--line-3); }
.cg-ruta { border-top-style: solid; border-top-color: var(--line); }
/* Planificador (bloque oscuro) */
.plan { background: var(--board); border-radius: var(--r); padding: 28px 30px; }
.plan h2 { font-family: var(--f-serif); font-weight: 400; font-size: clamp(2rem, 4.2vw, 2.8rem); letter-spacing: -.03em; text-transform: none; line-height: 1; }
.plan-tag { font-weight: 500; }
.plan p { color: var(--board-dim); }
.plan-l li { border-color: var(--board-line); border-radius: var(--r-ctl); color: var(--board-dim); }
.plan-l b { color: var(--board-ink); }
/* Mercado de fletes */
.mk-term, .mk-cruces { border-top-width: 1px; }
.mk-estado b { font-family: var(--f-serif); font-weight: 400; font-style: italic; text-transform: none; letter-spacing: -.03em; font-size: clamp(3rem, 8vw, 4.8rem); }
.mk-medidor { gap: 2px; }
.mk-medidor i { height: 8px; border-radius: 0 !important; }
.mk-medidor i.on { outline-width: 1px; outline-offset: 3px; }
.mk-val b { font-weight: 500; letter-spacing: -.04em; }
.mk-spark path { stroke-width: 1.5; }
.mk-h3 { font-family: var(--f-text); font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; text-transform: none; }
.mk-cr-v b { font-weight: 500; letter-spacing: -.03em; }
.mk-bar { height: 8px; border-radius: 0; }
/* Nearshoring */
.ns-aviso { border-left-width: 2px; background: var(--surface); }
.ns-resumen, .ns-lista { border-top-width: 1px; }
.ns-r b { font-weight: 500; letter-spacing: -.035em; font-size: 1.7rem; }
.ns-sel { border-radius: var(--r-ctl); transition: border-color var(--t); }
.ns-sel:hover { border-color: var(--line-3); }
.ns-p { transition: background-color var(--t); }
.ns-p.abierto { background: var(--surface); }
.ns-id h3 { font-family: var(--f-serif); font-weight: 400; font-size: 1.55rem; letter-spacing: -.025em; text-transform: none; line-height: 1.02; }
.ns-score b { font-weight: 500; letter-spacing: -.045em; }
.ns-cap { height: 8px; border-radius: 0; }
.ns-graf path { stroke-width: 1.6; }
.ns-ver, .ns-agregar button { border-radius: var(--r-ctl); font-family: var(--f-text); transition: border-color var(--t), background-color var(--t); }
/* Buscador de Ciudades */
.buscador { box-shadow: none; border: 1px solid var(--accent); border-radius: var(--r); background: var(--board-ink); transition: border-color var(--t); }
.buscador:focus-within { box-shadow: none; border-color: var(--board-ink); outline: 2px solid var(--accent); outline-offset: 2px; }
.buscador input { font-family: var(--f-text); color: #141614; }
.buscador button { border-radius: var(--r-ctl); font-family: var(--f-text); font-weight: 700; text-transform: none; letter-spacing: 0; font-size: .98rem; transition: background-color var(--t); }
.cd-grid { gap: 0; border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); }
.cd { border: 0; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); border-radius: 0; background: transparent; padding: 18px 20px 18px 22px;
  transition: background-color var(--t); }
.cd::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 2px; background: var(--line-3); }
.cd.st-fluido::before { background: var(--go); } .cd.st-moderado::before { background: var(--slow); } .cd.st-lento::before { background: var(--stop); }
.cd:hover { background: var(--surface); }
.cd-top b { font-family: var(--f-serif); font-weight: 400; font-size: 1.8rem; letter-spacing: -.03em; text-transform: none; }
.cd-top small { font-weight: 500; }
.cd-vivo b { font-weight: 500; letter-spacing: -.035em; }
.cd.mia::after { border-radius: 0 0 var(--r-ctl) var(--r-ctl); top: 0; font-weight: 500; }
.fr-rank { border-top-width: 1px; }
.fr-ol li > b { font-weight: 500; letter-spacing: -.03em; }
.fr-linea::before { height: 1px; top: 56px; background: var(--line-3); }
.fr-pt { border-radius: var(--r-ctl); transition: background-color var(--t); }
.fr-pt b { font-weight: 500; letter-spacing: -.03em; font-size: 1.25rem; }
.fr-pt .fig { width: 14px; height: 14px; }
.fr-pt.fav .fig { outline-width: 1px; outline-offset: 4px; outline-color: var(--ink); }
.kpi b { font-family: var(--f-text); font-weight: 600; letter-spacing: -.035em; font-size: clamp(1.5rem, 2.8vw, 2.1rem); line-height: 1.05; }
