/* Puentes 2027: cada puente es un billete. Cielo, tinta azul marino, papel, naranja y fosforito. */
:root {
  color-scheme: light;
  --cielo: #CFE0F7;
  --tinta: #0F1B3D;
  --papel: #FFF8EC;
  --naranja: #D2410F;
  --amarillo: #FFD84D;
  --gris: #5B6478;
  --troquel: #C9C2B3;
  --melocoton: #FFD9CC;
  --tinta-suave: #B8C3DC;
  --troquel-oscuro: #3A4870;
  --mono: 'DM Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--cielo); color: var(--tinta); font: 500 16px/1.5 Archivo, system-ui, sans-serif; }
a { color: var(--tinta); }
a:hover { color: var(--naranja); }
:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }
.pagina { max-width: 74rem; margin: 0 auto; padding: 0 1rem 4rem; }
@media (min-width: 40rem) { .pagina { padding-inline: 1.5rem; } }

.mini { font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.02em; color: var(--gris); }
.seccion { margin: 2.5rem 0 0.75rem; font: 500 0.8125rem/1.3 var(--mono); }

/* Barra de arriba */
.arriba { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 1rem 0; }
.marca { font-weight: 900; font-size: 1.25rem; letter-spacing: -0.02em; text-decoration: none; }
.marca span { color: var(--naranja); }
.menu { display: flex; gap: 0.25rem; font-weight: 700; font-size: 0.875rem; }
.menu a { min-height: 44px; display: flex; align-items: center; padding: 0 1rem; border-radius: 999px; text-decoration: none; }
.menu a[aria-current] { background: var(--tinta); color: #FFFFFF; }

/* Cabecera y formulario */
.cabecera { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: flex-end; padding: 1.5rem 0 0.5rem; }
.cabecera h1 { flex: 1 1 30rem; margin: 0; font-weight: 900; font-size: clamp(2.75rem, 8vw, 5.5rem); line-height: 0.92; letter-spacing: -0.04em; }
.acento { color: var(--naranja); }
.datos { flex: 1 1 20rem; display: flex; gap: 0.75rem; background: var(--tinta); border-radius: 18px; padding: 1rem; }
.datos label { flex: 1 1 10rem; display: flex; flex-direction: column; gap: 0.375rem; }
.datos label.corto { flex: 0 0 6rem; }
.datos .mini { color: var(--tinta-suave); }
.datos select, .datos input { width: 100%; height: 46px; border: 0; border-radius: 10px; padding: 0 0.75rem; font: 700 1rem Archivo, sans-serif; color: var(--tinta); background: #FFFFFF; }

/* Billete */
.billetes { display: flex; flex-direction: column; gap: 1.125rem; }
.billete { display: flex; flex-wrap: wrap; background: var(--papel); border-radius: 18px; }
.tramo { flex: 999 1 32rem; min-width: 0; padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.ruta { display: flex; flex-wrap: wrap; gap: 1rem 2.25rem; align-items: center; }
.punto { display: flex; flex-direction: column; gap: 0.125rem; }
.punto strong { font-weight: 800; font-size: clamp(1.375rem, 3vw, 1.75rem); letter-spacing: -0.02em; line-height: 1.1; }
.punto.pide { margin-left: auto; }
.flecha { width: 56px; height: 20px; fill: none; stroke: var(--naranja); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
mark { font: 500 1rem var(--mono); background: var(--amarillo); color: var(--tinta); padding: 0.125rem 0.5rem; border-radius: 6px; }
.sello { align-self: flex-start; font: 500 0.75rem var(--mono); background: var(--naranja); color: #FFFFFF; border-radius: 6px; padding: 0.2rem 0.5rem; }
.talon { flex: 1 1 16rem; border-left: 2px dashed var(--troquel); padding: 1.25rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.libres { display: block; font-weight: 900; font-size: 2.75rem; line-height: 0.9; color: var(--naranja); }
.botones { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.boton { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 1rem; border-radius: 10px; background: var(--tinta); color: #FFFFFF; font-weight: 700; font-size: 0.875rem; text-decoration: none; }
.boton:hover { color: #FFFFFF; background: #1E2D5C; }
.boton.borde { background: transparent; color: var(--tinta); box-shadow: inset 0 0 0 2px var(--tinta); }
.boton.naranja { background: var(--naranja); }
.boton.naranja:hover { background: #B2360B; }

/* Billete oscuro (Navidades) */
.billete.oscuro { background: var(--tinta); color: #FFFFFF; }
.oscuro .mini { color: var(--tinta-suave); }
.oscuro .flecha { stroke: var(--amarillo); }
.oscuro .talon { border-color: var(--troquel-oscuro); }
.oscuro .libres { color: var(--amarillo); }
.oscuro .boton { background: var(--naranja); }
.oscuro .boton.borde { background: transparent; color: #FFFFFF; box-shadow: inset 0 0 0 2px #FFFFFF; }

/* Destinos */
.destinos { flex: 1 1 100%; min-width: 0; border-top: 2px dashed var(--troquel); padding: 1.125rem 1.5rem 1.375rem; }
.destinos .mini { margin: 0 0 0.75rem; }
.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.75rem; }
.destino { background: #FFFFFF; border: 2px solid var(--tinta); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.foto { height: 6rem; background: var(--cielo); display: flex; align-items: flex-end; justify-content: space-between; padding: 0.5rem 0.75rem; border-bottom: 2px dashed var(--tinta); }
.foto::before { content: 'DESTINO'; font: 500 0.6875rem var(--mono); align-self: flex-start; }
.codigo { font-weight: 900; font-size: 2.75rem; line-height: 0.9; letter-spacing: -0.02em; }
.destino .texto { padding: 0.75rem; display: flex; flex-direction: column; gap: 0.625rem; flex: 1; }
.destino strong { display: block; font-weight: 800; font-size: 1.125rem; letter-spacing: -0.01em; }
.destino .tipo { font-size: 0.8125rem; color: var(--gris); }
.destino .boton { flex: 1 1 auto; font-size: 0.8125rem; }
.destino .boton:first-child { background: var(--naranja); }

.nota { margin: 1rem 0 0; color: var(--gris); }
.nota:empty { display: none; }
.acciones { margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; font-weight: 700; }
.acciones .boton { min-height: 48px; padding: 0 1.375rem; border-radius: 999px; font-weight: 800; font-size: 0.9375rem; }
footer { margin-top: 3rem; font-size: 0.8125rem; line-height: 1.55; }
footer p { margin: 0 0 0.5rem; max-width: 46rem; }

/* Calendario */
.resumen { margin-top: 1.5rem; }
.chips { margin: 0; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.chips mark { font-size: 0.9375rem; }
.leyenda { margin: 1.25rem 0 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font: 500 0.8125rem var(--mono); }
.leyenda span { display: flex; align-items: center; gap: 0.5rem; }
.leyenda .d { width: 16px; height: 16px; border-radius: 5px; }
.meses { display: grid; grid-template-columns: repeat(auto-fill, minmax(16.25rem, 1fr)); gap: 0.875rem; }
.mes { background: var(--papel); border-radius: 16px; overflow: hidden; }
.mes h3 { margin: 0; padding: 0.75rem 1rem; border-bottom: 2px dashed var(--troquel); display: flex; justify-content: space-between; font: 500 0.875rem var(--mono); }
.mes h3 span { color: var(--gris); }
.rejilla { padding: 0.75rem 0.875rem 1rem; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.25rem; justify-items: center; }
.rejilla .cab { font: 500 0.6875rem var(--mono); color: var(--gris); }
.d { width: 100%; max-width: 2.375rem; aspect-ratio: 1; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.8125rem; font-weight: 500; }
.d.finde { color: var(--gris); }
.d.libre { background: var(--melocoton); font-weight: 600; }
.d.pedir { background: var(--amarillo); font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--tinta); }
.d.festivo { background: var(--tinta); color: #FFFFFF; font-weight: 800; }
.d.autonomico { box-shadow: inset 0 0 0 2px var(--tinta); font-weight: 800; }

/* Móvil: el talón va debajo y los destinos se deslizan */
@media (max-width: 40rem) {
  .talon { border-left: 0; border-top: 2px dashed var(--troquel); padding: 1rem 1.125rem; }
  .oscuro .talon { border-top-color: var(--troquel-oscuro); }
  .tramo { padding: 1.125rem; }
  .ruta { gap: 0.75rem 1rem; justify-content: space-between; }
  .punto.pide { margin-left: 0; flex-basis: 100%; }
  .flecha { width: 32px; }
  .destinos { padding: 1rem 0 1.125rem; }
  .destinos .mini { margin-inline: 1.125rem; }
  .tarjetas { display: flex; overflow-x: auto; padding: 0 1.125rem; scroll-snap-type: x mandatory; }
  .destino { flex: 0 0 14.75rem; scroll-snap-align: start; }
  .acciones .boton { flex: 1 1 100%; }
}
.talon .mini, .boton { white-space: nowrap; }
svg[hidden] { display: none; }
