/*
    Portal público de Portal Mercados. Mismas variables de marca que el portal privado
    (verde de competición y lima de Aston Martin), en una hoja pequeña y sin dependencias.
*/

:root {
  color-scheme: light;
  --verde: #00594f;
  --verde-fuerte: #00352f;
  --lima: #cedc00;
  --fondo: #f3f5f4;
  --tarjeta: #fcfcfb;
  --texto: #0b0b0b;
  --texto-2: #52514e;
  --borde: #e1e0d9;
  --bueno: #006300;
  --critico: #b02a2a;
  --aviso-fondo: #fdf1d4;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --verde: #1f8f7e;
  --fondo: #0d0d0d;
  --tarjeta: #1a1a19;
  --texto: #f0efec;
  --texto-2: #c3c2b7;
  --borde: #2c2c2a;
  --bueno: #0ca30c;
  --critico: #e66767;
  --aviso-fondo: #33270a;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.ancho { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

.cabecera { background: linear-gradient(160deg, #00352f 0%, #00594f 70%, #0a6e61 100%); color: #fff; padding-bottom: 3.5rem; }
.barra { display: flex; align-items: center; gap: .75rem; padding-top: 1rem; padding-bottom: 1rem; }
.marca { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.1rem; }
.ala { width: 32px; height: 32px; border-radius: 8px; background: var(--lima); color: #0b0b0b; display: grid; place-items: center; }
.hueco { flex: 1; }
.btn-tema { width: 38px; height: 38px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: #fff; cursor: pointer; font-size: 1rem; }

.heroe { padding-top: 3rem; }
.heroe h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin: 0; line-height: 1.15; max-width: 16ch; }
.heroe p { max-width: 60ch; font-size: 1.08rem; opacity: .92; margin: 0 0 1.5rem; }
.linea-lima { width: 64px; height: 4px; border-radius: 2px; background: var(--lima); margin: 1.2rem 0; }

.boton { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1rem; border-radius: 8px; font-weight: 600; text-decoration: none; }
.boton.acento { background: var(--lima); color: #0b0b0b; }
.boton.grande { padding: .8rem 1.5rem; font-size: 1.05rem; }
.boton:hover { filter: brightness(1.06); }

main { margin-top: -2rem; padding-bottom: 2rem; }

.cinta { background: var(--aviso-fondo); border: 1px solid var(--borde); border-radius: 8px; padding: .5rem .9rem; font-size: .88rem; margin: 0 0 1rem; }

.rejilla { display: grid; gap: 1rem; margin-bottom: 1rem; }
.rejilla.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rejilla.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 1.3rem 1.4rem; }
.tarjeta h2 { margin: 0 0 .6rem; font-size: 1.1rem; }
.tarjeta p { margin: 0; color: var(--texto-2); }
.tarjeta .icono { font-size: 1.6rem; color: var(--verde); display: block; margin-bottom: .6rem; }

table { width: 100%; border-collapse: collapse; }
td { padding: .5rem 0; border-bottom: 1px solid var(--borde); }
tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--texto-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 1rem; }
.sube { color: var(--bueno); }
.baja { color: var(--critico); }
.plano, .nota { color: var(--texto-2); }

.noticia { padding: .6rem 0; border-bottom: 1px solid var(--borde); }
.noticia:last-child { border-bottom: 0; }
.noticia small { display: block; color: var(--texto-2); }

.pie { color: var(--texto-2); font-size: .8rem; padding-top: 1rem; padding-bottom: 2rem; }
.pie strong { color: var(--texto); }

@media (max-width: 800px) {
  .rejilla.c3, .rejilla.c2 { grid-template-columns: minmax(0, 1fr); }
}
