@font-face {
  font-family: Catamaran;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fuentes/catamaran-400.woff2") format("woff2");
}
@font-face {
  font-family: Catamaran;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fuentes/catamaran-600.woff2") format("woff2");
}
@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fuentes/montserrat-400.woff2") format("woff2");
}
@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fuentes/montserrat-600.woff2") format("woff2");
}
@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fuentes/montserrat-700.woff2") format("woff2");
}

:root {
  --azul: #023368;
  --granate: #860A08;
  --acento: #BE4C1B;
  --tinta: #1A1A1A;
  --papel: #F7F5F2;
  --ficha: #FFFFFF;
  --linea: #E4E0DA;
  --error: #9F1239;
  --interno: #E7EEF5;
}

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

html { background: var(--papel); }

body {
  margin: 0;
  color: var(--tinta);
  background: var(--papel);
  font-family: Catamaran, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: 1.75rem; }

img, input, textarea, select, table { max-width: 100%; }

a { color: var(--azul); }

.saltar {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  transform: translateY(-150%);
  background: var(--ficha);
  padding: 0.5rem 0.8rem;
}

.saltar:focus { transform: none; }

header, main, footer, .pasos {
  width: min(40rem, calc(100% - 2rem));
  margin-inline: auto;
}

main.ancho,
header.ancho,
body:has(main.ancho) header,
body:has(main.ancho) footer {
  width: min(64rem, calc(100% - 2rem));
}

header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--linea);
}

.marca { line-height: 0; }

.logo { width: min(220px, 100%); height: auto; }

nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }

nav a, .boton, button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 600;
}

.boton, button {
  background: var(--azul);
  color: #fff;
  border: 0;
  padding: 0.55rem 1rem;
  text-decoration: none;
  cursor: pointer;
}

.boton--llano {
  background: transparent;
  color: var(--azul);
  border: 1px solid var(--azul);
}

.acciones { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.25rem; }

.pasos {
  display: flex;
  gap: 0.75rem;
  list-style: none;
  padding: 0.75rem 0 0;
}

.pasos li[aria-current="step"] {
  color: var(--acento);
  font-weight: 700;
  border-bottom: 2px solid var(--acento);
}

.tarjeta, .tramite, form, .entrega, .aviso {
  background: var(--ficha);
  border: 1px solid var(--linea);
  padding: 1rem;
}

.tarjeta { max-width: 28rem; margin: 2rem auto; }

.precio, .panel-lateral__precio {
  color: var(--acento);
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
}

.entrega { font-size: 1.35rem; }
.entrega p { margin: 0.4rem 0; }

label { display: block; font-weight: 600; margin-top: 0.9rem; }

input, textarea, select {
  width: 100%;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--linea);
  background: #fff;
  font: inherit;
  color: inherit;
}

.error, .errorlist { color: var(--error); font-weight: 600; }

.ayuda { color: #5c564e; font-weight: 400; margin: 0.25rem 0 0; }

.ok { background: #ecfdf5; padding: 0.75rem 1rem; }

.interno {
  background: var(--interno);
  border-left: 4px solid var(--azul);
  padding: 0.9rem 1rem;
  margin: 1rem 0;
}

.aviso { background: #fef3c7; }

.visor img { max-width: 100%; height: auto; background: #fff; }
.visor .pasos { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.plazo-vencido { color: var(--granate); font-weight: 700; }
.plazo-hoy, .plazo-urgente { color: var(--acento); font-weight: 700; }
.plazo-proximo { color: var(--acento); }

table.fichas { width: 100%; border-collapse: collapse; background: var(--ficha); }
table.fichas th, table.fichas td {
  text-align: left;
  padding: 0.6rem;
  border-bottom: 1px solid var(--linea);
  vertical-align: top;
}

.ficha-columnas { display: block; }
.panel-lateral { background: var(--ficha); border: 1px solid var(--linea); padding: 1rem; margin-top: 1rem; }

footer {
  padding: 1.5rem 0 2rem;
  color: var(--granate);
  font-size: 0.95rem;
}

.lista { list-style: none; padding: 0; display: grid; gap: 1rem; }

:focus-visible {
  outline: 2px solid var(--azul);
  outline-offset: 3px;
}

@media (max-width: 40rem) {
  .boton, button { width: 100%; }
  table.fichas thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  table.fichas, table.fichas tbody, table.fichas tr, table.fichas td { display: block; width: auto; }
  table.fichas tr {
    border: 1px solid var(--linea);
    margin: 0 0 1rem;
    padding: 0.4rem 0;
  }
  table.fichas td { border: 0; }
  table.fichas td::before {
    content: attr(data-etiqueta);
    display: block;
    font-weight: 600;
    color: var(--azul);
  }
}

@media (min-width: 40rem) {
  header { flex-direction: row; align-items: center; justify-content: space-between; }
  .acciones { flex-direction: row; }
  .boton, button { width: auto; }
  .ficha-columnas {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.8fr);
    gap: 1.5rem;
    align-items: start;
  }
  .panel-lateral { position: sticky; top: 1rem; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
