/* impuestosauto.es · estilos. Móvil primero. */
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("fonts/ahn-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("fonts/ahn-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("fonts/ahn-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/bc-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/bc-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --fondo: #eceff2;
  --superficie: #ffffff;
  --tinta: #15202b;
  --tinta-suave: #4a5866;
  --linea: #c9d1d8;
  --linea-fuerte: #8795a3;
  --azul: #0a3d91;
  --azul-claro: #e4ecf8;
  --verde: #0b6e4f;
  --ambar: #f2a900;
  --ambar-fondo: #fff6dc;
  --error: #b3261e;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --texto: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radio: 8px;
  --gutter: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 1.0625rem;
  line-height: 1.5;
}

a { color: var(--azul); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

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

.contenedor { width: 100%; max-width: 44rem; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Cabecera ---------- */
.cabecera { background: var(--superficie); border-bottom: 1px solid var(--linea); }
.cabecera .contenedor { display: flex; align-items: center; justify-content: space-between; min-height: 3.5rem; }
.marca {
  font-family: var(--display); font-weight: 700; font-size: 1.6rem; letter-spacing: 0.01em;
  color: var(--tinta); text-decoration: none; line-height: 1;
}
.marca b { color: var(--azul); font-weight: 700; }
.cabecera-nota { font-size: 0.875rem; color: var(--tinta-suave); }

/* ---------- Presentación ---------- */
.intro { padding: 2rem 0 1.25rem; }
.intro h1 {
  font-family: var(--display); font-weight: 700; font-size: clamp(2.1rem, 8.5vw, 3.4rem);
  line-height: 1.02; letter-spacing: -0.005em; margin: 0 0 0.75rem; max-width: 24ch;
}
.intro p { margin: 0; max-width: 38rem; color: var(--tinta-suave); }

/* ---------- Pasos del formulario ---------- */
.paso { border: 0; border-top: 1px solid var(--linea); margin: 0; padding: 1.5rem 0; min-width: 0; }
.paso:first-of-type { border-top: 0; padding-top: 0.5rem; }
.paso > h2, .paso > legend {
  font-family: var(--display); font-weight: 600; font-size: 1.65rem; line-height: 1.1; margin: 0 0 0.75rem; padding: 0;
}
.ayuda { margin: 0.4rem 0 0; font-size: 0.9375rem; color: var(--tinta-suave); }
.estado { margin: 0.6rem 0 0; font-size: 0.9375rem; min-height: 1.4em; }
.estado.mal { color: var(--error); }
.estado.bien { color: var(--verde); font-weight: 600; }

label.campo, p.campo { display: block; font-weight: 600; margin: 1rem 0 0.35rem; }
label.campo:first-child { margin-top: 0; }
.paso p.campo.sep2 { margin-top: 1.25rem; }
.campo-fila { display: grid; gap: 0.75rem; }

input[type="text"], input[type="search"], input[type="number"], input[type="tel"], select {
  width: 100%; min-height: 3rem; padding: 0.55rem 0.8rem; font: inherit; color: var(--tinta);
  background: var(--superficie); border: 1.5px solid var(--linea-fuerte); border-radius: var(--radio);
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--tinta) 50%), linear-gradient(135deg, var(--tinta) 50%, transparent 50%); background-position: calc(100% - 1.15rem) 52%, calc(100% - 0.8rem) 52%; background-size: 0.35rem 0.35rem; background-repeat: no-repeat; padding-right: 2.2rem; }
input:focus, select:focus { outline: 3px solid var(--azul); outline-offset: 1px; border-color: var(--azul); }
input::placeholder { color: #7a8794; }

/* Conmutadores (coche/moto, particular/profesional...) */
.seg { display: inline-flex; max-width: 100%; border: 1.5px solid var(--linea-fuerte); border-radius: var(--radio); background: var(--superficie); overflow: hidden; }
.seg > label, .seg > button {
  flex: 1 1 auto; margin: 0; position: relative; cursor: pointer;
}
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.seg span, .seg > button {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 3rem; padding: 0.4rem 1.1rem; font: inherit; font-weight: 600; color: var(--tinta); background: transparent; border: 0;
}
.seg > label + label span, .seg > button + button { border-left: 1.5px solid var(--linea-fuerte); }
.seg input:checked + span, .seg > button[aria-pressed="true"] { background: var(--tinta); color: #fff; }
.seg input:focus-visible + span, .seg > button:focus-visible { outline: 3px solid var(--azul); outline-offset: -3px; }
.seg-ancho { display: flex; }

/* ---------- La matrícula ---------- */
.matricula {
  display: flex; align-items: stretch; width: 100%; max-width: 27rem; margin: 0.25rem 0 0;
  background: #fff; border: 3px solid #1a1a1a; border-radius: 10px; overflow: hidden;
  box-shadow: inset 0 0 0 2px #fff, 0 1px 0 rgba(0,0,0,.25), 0 14px 22px -16px rgba(10, 40, 90, .55);
}
.matricula:focus-within { outline: 3px solid var(--azul); outline-offset: 3px; }
.matricula .eu {
  flex: 0 0 3.5rem; background: var(--azul); color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: space-between; padding: 0.4rem 0 0.4rem;
}
.matricula .eu svg { width: 1.9rem; height: 1.9rem; display: block; }
.matricula .eu b { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1; }
.matricula input[type="text"] {
  flex: 1 1 auto; min-width: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  font-family: var(--display); font-weight: 700; font-size: clamp(2.3rem, 12.5vw, 3.4rem); line-height: 1.25;
  letter-spacing: 0.07em; text-align: center; text-transform: uppercase; color: #141414; padding: 0.15rem 0.3rem; min-height: 4.2rem;
}
.matricula input[type="text"]:focus { outline: 0; }
.matricula input::placeholder { color: #c3c9cf; }

.cambiar-modo { margin-top: 0.9rem; }
.enlace-boton {
  background: none; border: 0; padding: 0.25rem 0; font: inherit; color: var(--azul);
  text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; min-height: 2.5rem;
}

.fecha-grid { display: grid; grid-template-columns: 1fr 1.6fr 1.3fr; gap: 0.6rem; }
.fecha-grid label { font-weight: 600; font-size: 0.9375rem; display: block; margin-bottom: 0.3rem; }

/* ---------- Listas de resultados de búsqueda ---------- */
.lista { margin: 0.5rem 0 0; border: 1.5px solid var(--linea-fuerte); border-radius: var(--radio); background: var(--superficie); max-height: 20rem; overflow-y: auto; }
.opcion {
  display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: none;
  border: 0; border-bottom: 1px solid var(--linea); padding: 0.7rem 0.85rem; cursor: pointer; min-height: 3rem;
}
.opcion:last-child { border-bottom: 0; }
.opcion:hover { background: var(--azul-claro); }
.opcion:focus-visible { outline: 3px solid var(--azul); outline-offset: -3px; }
.opcion strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.opcion small { display: block; color: var(--tinta-suave); font-size: 0.875rem; }
.lista-nota { padding: 0.6rem 0.85rem; font-size: 0.9rem; color: var(--tinta-suave); background: #f6f8fa; }

.elegido {
  display: flex; gap: 0.75rem; align-items: flex-start; justify-content: space-between;
  margin-top: 0.75rem; padding: 0.8rem 0.9rem; background: var(--azul-claro); border-left: 5px solid var(--azul); border-radius: 0 var(--radio) var(--radio) 0;
}
.elegido strong { display: block; overflow-wrap: anywhere; }
.elegido small { color: var(--tinta-suave); }
.elegido .enlace-boton { flex: 0 0 auto; }

.check { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.75rem; min-height: 2.5rem; font-size: 0.9375rem; }
.check input { width: 1.4rem; height: 1.4rem; margin: 0.15rem 0 0; flex: 0 0 auto; accent-color: var(--azul); }

.con-unidad { position: relative; }
.con-unidad input { padding-right: 3.2rem; }
.con-unidad .unidad { position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--tinta-suave); font-weight: 600; pointer-events: none; }

details.mas { margin-top: 1rem; }
details.mas summary { cursor: pointer; font-weight: 600; min-height: 2.5rem; display: flex; align-items: center; }

/* ---------- Resultado ---------- */
.resultado { margin: 1.5rem 0 0; background: var(--superficie); border: 1px solid var(--linea); border-top: 6px solid var(--verde); border-radius: 0 0 var(--radio) var(--radio); padding: 1.25rem 1rem 1.5rem; }
.resultado h2 { font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1.05; margin: 0 0 0.35rem; }
.resumen { margin: 0 0 1.25rem; color: var(--tinta-suave); font-size: 0.9375rem; overflow-wrap: anywhere; }
.bloque + .bloque { margin-top: 1.5rem; }
.bloque h3 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; margin: 0 0 0.5rem; padding-bottom: 0.35rem; border-bottom: 2px solid var(--tinta); }
dl.liq { margin: 0; }
dl.liq .l { display: flex; align-items: baseline; gap: 0.75rem; padding: 0.3rem 0; }
dl.liq dt { display: flex; flex: 1 1 auto; align-items: baseline; gap: 0.5rem; min-width: 0; color: var(--tinta); }
dl.liq dt::after { content: ""; flex: 1 1 1rem; min-width: 1rem; border-bottom: 2px dotted var(--linea-fuerte); transform: translateY(-0.28em); }
dl.liq dd { margin: 0; flex: 0 0 auto; text-align: right; font-family: var(--display); font-weight: 600; font-size: 1.25rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
dl.liq .l.sub dt { color: var(--tinta-suave); padding-left: 0.9rem; font-size: 0.9375rem; }
dl.liq .l.total { margin-top: 0.35rem; padding-top: 0.6rem; border-top: 2px solid var(--tinta); }
dl.liq .l.total dt { font-weight: 700; }
dl.liq .l.total dd { font-size: 2.1rem; font-weight: 700; color: var(--verde); line-height: 1; }
dl.liq .l.total dt::after { display: none; }
dl.liq .l.total:first-child { margin-top: 0; padding-top: 0.3rem; border-top: 0; }
.pendiente { color: var(--tinta-suave); font-style: italic; }

.avisos { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.avisos li { position: relative; margin: 0.5rem 0 0; padding: 0.6rem 0.8rem 0.6rem 0.9rem; font-size: 0.9375rem; background: #f4f6f8; border-left: 4px solid var(--linea-fuerte); }
.avisos li.atencion { background: var(--ambar-fondo); border-left-color: var(--ambar); }

.como { margin-top: 1.25rem; border-top: 1px solid var(--linea); padding-top: 0.5rem; }
.como summary { cursor: pointer; font-weight: 600; min-height: 2.75rem; display: flex; align-items: center; }
.como ol, .como ul { padding-left: 1.25rem; }
.como li { margin: 0.4rem 0; }
.como p { margin: 0.5rem 0; }

/* ---------- Texto informativo ---------- */
.informacion { padding: 2.5rem 0 1rem; }
.informacion h2 { font-family: var(--display); font-weight: 700; font-size: 1.9rem; line-height: 1.1; margin: 2rem 0 0.5rem; }
.informacion h2:first-child { margin-top: 0; }
.informacion p { max-width: 38rem; margin: 0.5rem 0; }
.informacion details { max-width: 38rem; border-top: 1px solid var(--linea); }
.informacion details:last-of-type { border-bottom: 1px solid var(--linea); }
.informacion summary { cursor: pointer; font-weight: 600; padding: 0.8rem 0; min-height: 3rem; }
.informacion details p { margin: 0 0 0.9rem; }

.pie { margin-top: 2rem; padding: 1.75rem 0 2.5rem; background: var(--tinta); color: #dbe3ea; font-size: 0.9375rem; }
.pie a { color: #fff; }
.pie p { margin: 0 0 0.6rem; max-width: 40rem; }

.cargando { color: var(--tinta-suave); padding: 0.6rem 0; }

@media (min-width: 40rem) {
  :root { --gutter: 24px; }
  body { font-size: 1.125rem; }
  .campo-fila.dos { grid-template-columns: 1fr 1fr; }
  .resultado { padding: 1.75rem 1.75rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.sep{margin-top:1rem}
.sep2{margin-top:1.1rem}
