/* FAQ de la CRA. Sin fuentes ni scripts externos. */
:root { --tinta: #1d2733; --azul: #1f3864; --suave: #4f5b6b; --linea: #d5dbe3; --fondo-cab: #e8eef6; --aviso: #fff1cc; --orient: #fff6e0; --foco: #b3470a; }
* { box-sizing: border-box; }
html { font-size: 17px; scroll-behavior: smooth; }
body { margin: 0; color: var(--tinta); background: #fff; font-family: system-ui, -apple-system, "Segoe UI", "Fira Sans", "DejaVu Sans", sans-serif; line-height: 1.5; }
main { max-width: 52rem; margin: 0 auto; padding: 1.5rem 1.2rem 2rem; }
h1 { color: var(--azul); font-size: 1.9rem; line-height: 1.2; margin: 0 0 .8rem; }
h2 { color: var(--azul); font-size: 1.35rem; margin: 2.4rem 0 .6rem; border-bottom: 2px solid var(--azul); padding-bottom: .2rem; scroll-margin-top: 1rem; }
h3 { color: var(--azul); font-size: 1.1rem; line-height: 1.3; margin: 0 0 .6rem; }
.n { font-variant-numeric: tabular-nums; color: var(--suave); font-weight: 600; margin-right: .2rem; }
a { color: #1a4f9c; overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; background: #f1f3f6; padding: 0 .2em; }
.salto { position: absolute; left: -9999px; }
.salto:focus { left: .5rem; top: .5rem; background: #fff; padding: .4rem .7rem; border: 2px solid var(--azul); z-index: 10; }

.aviso { background: var(--aviso); border-left: 5px solid #c98a00; padding: .6rem .8rem; margin: 0 0 1rem; }
.ficha { display: grid; grid-template-columns: 11rem 1fr; gap: .3rem .9rem; font-size: .92rem; margin: 1rem 0; padding: .8rem; background: var(--fondo-cab); border-radius: 6px; }
.ficha dt { font-weight: 600; color: var(--azul); }
.ficha dd { margin: 0; overflow-wrap: anywhere; }
.descarga a { display: inline-block; margin: .4rem 0; padding: .6rem .9rem; border: 2px solid var(--azul); border-radius: 6px; font-weight: 600; text-decoration: none; color: var(--azul); }

.indice details { border-bottom: 1px solid var(--linea); padding: .35rem 0; }
.indice summary { cursor: pointer; font-weight: 600; color: var(--azul); padding: .25rem 0; }
.indice .cuenta { font-weight: 400; color: var(--suave); }
.indice ul { margin: .3rem 0 .5rem; padding-left: 1.2rem; list-style: none; }
.indice li { padding: .12rem 0; }

.tabla { overflow-x: auto; margin: 0 0 1rem; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { border: 1px solid var(--linea); padding: .45rem .55rem; vertical-align: top; text-align: left; }
th { background: var(--fondo-cab); color: var(--azul); }
td:first-child { font-weight: 600; }

.pregunta { border: 1px solid var(--linea); border-left: 5px solid var(--azul); border-radius: 6px; padding: .8rem 1rem .5rem; margin: 1rem 0; scroll-margin-top: 1rem; }
.pregunta p { margin: 0 0 .7rem; }
.pregunta ul, .pregunta ol { margin: 0 0 .7rem; padding-left: 1.3rem; }
.corta { background: #f1f5fa; padding: .45rem .6rem; border-radius: 4px; }
.orientativa { background: var(--orient); border: 1px solid #e0b64d; border-left: 5px solid #c98a00; padding: .45rem .6rem; border-radius: 4px; font-weight: 600; }
.casilla { display: flex; gap: .7rem; align-items: flex-start; background: #f6f7f9; border: 1px solid var(--linea); border-radius: 6px; padding: .55rem .7rem; }
.casilla input { flex: 0 0 auto; width: 1.5rem; height: 1.5rem; margin: .05rem 0 0; accent-color: var(--azul); cursor: pointer; }
.casilla label { cursor: pointer; }
.acciones { margin: .8rem 0; }
button { font: inherit; padding: .5rem .9rem; border: 2px solid var(--azul); border-radius: 6px; background: #fff; color: var(--azul); font-weight: 600; cursor: pointer; }
.contador { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; position: sticky; top: 0; background: #fff; border-bottom: 2px solid var(--azul); padding: .4rem 0; margin: 0 0 .8rem; font-weight: 600; z-index: 5; }
.contador small { font-weight: 400; color: var(--suave); }
.contador p { margin: 0; }
.contador button, .resumen-acciones button { font: inherit; font-weight: 600; padding: .4rem .8rem; border: 2px solid var(--azul); background: #fff; color: var(--azul); border-radius: 4px; cursor: pointer; }
.contador button:hover, .resumen-acciones button:hover, .contador button:focus-visible, .resumen-acciones button:focus-visible { background: var(--azul); color: #fff; }
[hidden] { display: none !important; }
#resumen { border: 2px solid var(--azul); border-radius: 6px; padding: 1rem; margin: 1.5rem 0; }
#resumen:not([hidden]) { display: block; }
.resumen-acciones { display: flex; flex-wrap: wrap; gap: .5rem; }
.resumen-estado { min-height: 1.4em; margin: .3rem 0; }
#resumen .aviso { background: #fff1cc; padding: .6rem .8rem; font-weight: 600; border-radius: 4px; }
#resumen .peq, .orientativa-nota { font-size: .85rem; }
.orientativa-nota { font-weight: 600; }
#resumen ul { padding-left: 1.2rem; }
#resumen li { margin: 0 0 .7rem; }
textarea.copia { width: 100%; box-sizing: border-box; font: inherit; }
footer { max-width: 52rem; margin: 0 auto; padding: 1rem 1.2rem 3rem; border-top: 2px solid var(--linea); font-size: .88rem; color: var(--suave); }

@media (max-width: 700px) {
  html { font-size: 16px; }
  .ficha { grid-template-columns: 1fr; }
  .ficha dt { margin-top: .4rem; }
  .pregunta { padding: .7rem .7rem .4rem; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; left: -9999px; }
  tr { border: 1px solid var(--linea); border-radius: 6px; margin: 0 0 .8rem; padding: .3rem .2rem; }
  td { border: 0; padding: .2rem .5rem; }
  td::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 600; color: var(--suave); text-transform: uppercase; letter-spacing: .03em; }
}

@media print {
  @page { size: A4; margin: 14mm 13mm 20mm; }
  html { font-size: 9.5pt; scroll-behavior: auto; }
  body { font-family: "Fira Sans", "DejaVu Sans", Helvetica, Arial, sans-serif; }
  main { max-width: none; padding: 0; }
  footer { max-width: none; padding: 1rem 0 0; }
  .salto, .descarga, .acciones, .contador, #resumen { display: none !important; }
  .ficha { grid-template-columns: 9rem 1fr; }
  a { color: inherit; text-decoration: none; }
  a[href^="https://creativecommons.org"]::after, footer a[href*="linkedin.com"]::after { content: " (" attr(href) ")"; }
  h2 { break-after: avoid; }
  section.bloque > h2 { break-before: page; margin-top: 0; }
  h3 { break-after: avoid; }
  .pregunta { break-inside: auto; border-left-width: 3px; }
  .corta, .orientativa, .casilla, tr { break-inside: avoid; }
  .casilla { background: #fff; border: 1px solid #000; }
  .casilla input { appearance: none; -webkit-appearance: none; width: 5mm; height: 5mm; border: 1.5px solid #000; border-radius: 0; background: #fff; margin-top: .1rem; }
  .casilla input:checked { background: #000; }
  .indice summary { list-style: none; }
  .indice summary::-webkit-details-marker { display: none; }
  .indice ul { column-count: 1; }
  .indice li { font-size: 8.5pt; padding: 0; }
  .indice details { break-inside: avoid; }
}

/* Fechas clave (vídeo y tabla) y glosario */
.fechas { border: 1px solid var(--linea); border-radius: 6px; margin: 0 0 1rem; }
.fechas summary { cursor: pointer; font-weight: 600; color: var(--azul); padding: .6rem .8rem; }
.fechas .cuenta { font-weight: 400; color: var(--suave); }
.fechas-cuerpo { padding: 0 .8rem .4rem; }
.video { margin: .2rem 0 1rem; max-width: 16rem; }
.video video { display: block; width: 100%; height: auto; background: var(--tinta); border-radius: 4px; }
.video figcaption, .nota-fechas { font-size: .85rem; color: var(--suave); margin-top: .3rem; }
a.gl { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
a.gl:hover, a.gl:focus-visible { text-decoration-style: solid; }
.glosario { margin: 0; }
.termino { border-bottom: 1px solid var(--linea); padding: .6rem .4rem; scroll-margin-top: 4rem; }
.termino dt { font-weight: 700; color: var(--azul); }
.termino .desarrollo { font-weight: 400; color: var(--suave); }
.termino dd { margin: .2rem 0 0; }
.termino dd p { margin: .2rem 0; }
.termino .donde { font-size: .88rem; color: var(--suave); }
.termino .donde span { font-weight: 600; }
.termino:target { background: var(--fondo-cab); }
@media print {
  .solo-web { display: none; }
  .fechas { break-inside: avoid; }
  .fechas summary { list-style: none; }
  .fechas summary::-webkit-details-marker { display: none; }
  #glosario { break-before: page; }
  #glosario > h2 { margin-top: 0; }
  .termino { break-inside: avoid; padding: .3rem 0; }
  a.gl { text-decoration: none; }
}
.fechas td[data-label="Fecha"] { white-space: nowrap; }
@media (min-width: 701px) {
  .fechas table { table-layout: fixed; }
  .fechas th:nth-child(1) { width: 9rem; }
  .fechas th:nth-child(2) { width: 38%; }
}

.marca-lj { max-width: 52rem; margin: 0 auto; padding: .6rem 1.2rem 0; }
.marca-lj a { display: inline-flex; align-items: center; min-height: 44px; }
.lj-mark { display: block; width: auto; height: 1.8rem; }
.lj-b { fill: var(--azul); }
.lj-t { fill: var(--tinta); }
.lj-s { stroke: var(--azul); }
@media print { .marca-lj { display: none; } }
