/* /maquinas-fiscales/ y /facturacion-digital/. Se apoya en contribuyente.css
   (test, veredicto, invitación, índice, tablas, mitos, preguntas). Móvil primero. */

/* Respuesta corta: lo que Google puede tomar como fragmento destacado. */
.ac-fx-answer {
  max-width: 54ch;
  margin: 14px auto 0;
  padding: 12px 14px;
  border-left: 3px solid var(--ac-rose);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 253, 248, 0.75);
  color: var(--ac-rose-ink);
  font-size: 0.98rem;
  line-height: 1.5;
}

.ac-fx-answer a,
.ac-fx-count a,
.ac-fx-lead a {
  color: var(--ac-rose);
}

/* Cuenta regresiva ------------------------------------------------------- */
.ac-fx-count {
  max-width: 520px;
  margin: 16px auto 0;
  padding: 16px 18px;
  border-radius: 12px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(154, 47, 99, 0.5) 0%, rgba(42, 15, 30, 0) 60%),
    var(--ac-plum);
  color: rgba(247, 242, 232, 0.85);
}

.ac-fx-count p {
  margin: 0;
}

.ac-fx-count__n {
  color: var(--ac-paper);
  font: 400 1.2rem/1 var(--ac-serif);
}

.ac-fx-count__n strong {
  margin-right: 6px;
  color: var(--ac-gold-light);
  font: 400 3rem/1 var(--ac-serif);
  font-variant-numeric: tabular-nums;
}

.ac-fx-count__label {
  margin-top: 4px !important;
  font: 700 0.66rem/1.2 var(--ac-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ac-fx-count__bar {
  height: 8px;
  margin-top: 14px;
  border-radius: 8px;
  background: rgba(247, 242, 232, 0.16);
  overflow: hidden;
}

.ac-fx-count__bar span {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--ac-gold), var(--ac-gold-light));
}

.ac-fx-count__ends {
  display: flex;
  justify-content: space-between;
  margin-top: 6px !important;
  font-size: 0.74rem;
}

.ac-fx-count__note {
  margin-top: 10px !important;
  font-size: 0.84rem;
  line-height: 1.45;
}

.ac-fx-count a {
  color: var(--ac-gold-light);
}

.ac-fx-jumps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 14px 0 0;
}

.ac-fx-jumps a {
  color: var(--ac-rose);
  font-weight: 700;
  font-size: 0.92rem;
}

/* Selector: chips de medios y lista de pasos ------------------------------ */
.ac-fx-test .ac-ce-step__n {
  letter-spacing: 0.08em;
}

.ac-fx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.ac-fx-chips li {
  padding: 6px 12px;
  border: 1.5px solid var(--ac-rose);
  border-radius: 999px;
  background: var(--ac-white);
  color: var(--ac-rose-ink);
  font: 700 0.84rem/1.2 var(--ac-sans);
}

.ac-fx-steps__head {
  margin: 18px 0 8px;
  color: var(--ac-muted);
  font: 700 0.66rem/1 var(--ac-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ac-fx-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: fx;
}

.ac-fx-steps li {
  position: relative;
  padding: 10px 12px 10px 42px;
  border-radius: 10px;
  background: var(--ac-white);
  color: var(--ac-rose-ink);
  font-size: 0.92rem;
  line-height: 1.45;
  counter-increment: fx;
}

.ac-fx-steps li::before {
  position: absolute;
  top: 9px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ac-rose);
  color: var(--ac-paper);
  font: 700 0.72rem/1 var(--ac-sans);
  content: counter(fx);
}

.ac-fx-steps a {
  color: var(--ac-rose);
  font-size: 0.82rem;
  white-space: nowrap;
}

/* Cuerpo --------------------------------------------------------------- */
.ac-fx-lead {
  font-size: 1.04rem;
}

.ac-fx-before-after {
  display: grid;
  gap: 10px;
  align-items: center;
  margin: 16px 0;
}

.ac-fx-before-after > div {
  padding: 16px;
  border: 1px solid var(--ac-line);
  border-radius: 12px;
  background: var(--ac-white);
}

.ac-fx-before-after > div.is-new {
  border-color: var(--ac-rose);
  box-shadow: inset 0 0 0 1px var(--ac-rose);
}

.ac-fx-before-after > span {
  justify-self: center;
  color: var(--ac-rose);
  font-size: 1.4rem;
  transform: rotate(90deg);
}

.ac-fx-ba__when {
  margin: 0;
  color: var(--ac-muted);
  font: 700 0.66rem/1.2 var(--ac-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ac-fx-ba__what {
  margin: 6px 0 0;
  color: var(--ac-rose-ink);
  font: 400 1.12rem/1.3 var(--ac-serif);
}

.ac-fx-exceptions {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ac-fx-exceptions li {
  padding: 12px 14px 12px 40px;
  border: 1px solid rgba(184, 137, 62, 0.5);
  border-radius: 10px;
  background: rgba(217, 178, 106, 0.12);
  position: relative;
}

.ac-fx-exceptions li::before {
  position: absolute;
  top: 11px;
  left: 14px;
  color: #a06d1f;
  font-weight: 800;
  content: "!";
}

/* Tabla de modelos e imprentas ------------------------------------------- */
.ac-fx-search {
  display: grid;
  gap: 6px;
  margin: 14px 0 10px;
}

.ac-fx-search label {
  color: var(--ac-rose-ink);
  font-weight: 700;
  font-size: 0.9rem;
}

.ac-fx-search input {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  border: 1.5px solid var(--ac-line-strong);
  border-radius: 10px;
  background: var(--ac-white);
  color: var(--ac-rose-ink);
  font: 600 1.05rem/1.2 var(--ac-sans);
}

.ac-fx-brands {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.ac-fx-brands a {
  padding: 4px 10px;
  border: 1px solid var(--ac-line-strong);
  border-radius: 999px;
  color: var(--ac-rose-ink) !important;
  font-size: 0.82rem;
  text-decoration: none;
}

.ac-fx .ac-ce-table td {
  font: 400 0.95rem/1.35 var(--ac-sans);
}

.ac-fx-brandrow th {
  background: rgba(154, 47, 99, 0.06);
  color: var(--ac-rose);
  font: 700 0.74rem/1 var(--ac-sans) !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  scroll-margin-top: calc(var(--ac-header-h, 72px) + 60px);
}

.ac-fx-status {
  padding: 3px 8px;
  border-radius: 999px;
  font: 700 0.74rem/1 var(--ac-sans);
}

.ac-fx-status--autorizada {
  background: rgba(46, 155, 95, 0.12);
  color: #1f6e43;
}

.ac-fx-status--revocada {
  background: rgba(163, 35, 61, 0.1);
  color: #a3233d;
}

.ac-fx-pending {
  padding: 16px 18px;
  border: 1px dashed var(--ac-line-strong);
  border-radius: 12px;
  background: var(--ac-white);
}

.ac-fx-pending p {
  margin: 0;
}

/* Tarjetas de deberes y casos de contingencia ---------------------------- */
.ac-fx-cards,
.ac-fx-contingency {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ac-fx-cards li {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--ac-line);
  border-top: 3px solid var(--ac-rose);
  border-radius: 10px;
  background: var(--ac-white);
}

.ac-fx-cards strong {
  color: var(--ac-rose-ink);
  font: 700 1.1rem/1.2 var(--ac-serif);
}

.ac-fx-cards a {
  justify-self: start;
  margin-top: 4px;
  color: var(--ac-rose);
  font-size: 0.82rem;
}

.ac-fx-mail {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--ac-gold);
  border-radius: 0 8px 8px 0;
  background: rgba(217, 178, 106, 0.14);
  color: var(--ac-rose-ink);
}

.ac-fx-retention li.is-key {
  border-color: var(--ac-rose);
  box-shadow: inset 0 0 0 1px var(--ac-rose);
  font-weight: 700;
}

.ac-fx-contingency li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--ac-white);
  border: 1px solid var(--ac-line);
  color: var(--ac-rose-ink);
}

.ac-fx-contingency span {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ac-plum);
  color: var(--ac-gold-light);
  font: 400 0.95rem/1 var(--ac-serif);
}

.ac-fx-cross {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(154, 47, 99, 0.07);
  font-weight: 600;
}

/* Línea de tiempo ------------------------------------------------------- */
.ac-fx-time {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ac-fx-time__item {
  position: relative;
  padding: 0 0 18px 28px;
  border-left: 2px solid var(--ac-line-strong);
  margin-left: 8px;
}

.ac-fx-time__item::before {
  position: absolute;
  top: 2px;
  left: -9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ac-paper);
  border: 3px solid var(--ac-line-strong);
  content: "";
}

.ac-fx-time__item--clave::before {
  background: var(--ac-rose);
  border-color: var(--ac-rose);
  box-shadow: 0 0 0 4px rgba(154, 47, 99, 0.18);
}

.ac-fx-time__item--anuncio::before {
  border-style: dashed;
}

.ac-fx-time__item p {
  margin: 0;
}

.ac-fx-time__date {
  color: var(--ac-muted);
  font: 700 0.68rem/1.2 var(--ac-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ac-fx-time__title {
  margin-top: 2px !important;
  color: var(--ac-rose-ink);
  font: 400 1.15rem/1.25 var(--ac-serif);
}

.ac-fx-time__item--clave .ac-fx-time__title {
  color: var(--ac-rose);
}

.ac-fx-time__title em {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(217, 178, 106, 0.25);
  color: #8a5d14;
  font: 700 0.62rem/1 var(--ac-sans);
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
}

.ac-fx-time__text {
  margin-top: 4px !important;
  font-size: 0.92rem;
}

/* Los 3 caminos --------------------------------------------------------- */
.ac-fx-medios {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ac-fx-medio {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--ac-line);
  border-radius: 12px;
  background: var(--ac-white);
}

.ac-fx-medio h3 {
  margin: 0;
  color: var(--ac-rose-ink);
  font: 700 1.3rem/1.2 var(--ac-serif);
}

.ac-fx-medio dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.ac-fx-medio dl div {
  display: grid;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px dashed var(--ac-line);
}

.ac-fx-medio dt {
  color: var(--ac-muted);
  font: 700 0.62rem/1.2 var(--ac-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ac-fx-medio dd {
  margin: 0;
  color: var(--ac-rose-ink);
  font-size: 0.94rem;
}

.ac-fx-medio--portal {
  border-top: 4px solid #2e9b5f;
}

.ac-fx-medio--imprenta {
  border-top: 4px solid var(--ac-rose);
}

.ac-fx-medio--maquina {
  border-top: 4px solid var(--ac-gold);
}

/* Top de software ------------------------------------------------------- */
.ac-fx-top {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ac-fx-top__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--ac-line);
  border-radius: 14px;
  background: var(--ac-white);
  box-shadow: 0 18px 36px -32px rgba(42, 15, 30, 0.6);
}

.ac-fx-top__item.is-official {
  border-color: rgba(46, 155, 95, 0.5);
}

.ac-fx-top__rank {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.ac-fx-top__rank b {
  color: var(--ac-rose);
  font: 400 2.2rem/1 var(--ac-serif);
}

.ac-fx-top__rank img {
  width: 64px;
  height: auto;
}

.ac-fx-top__kind {
  margin: 0;
  color: var(--ac-muted);
  font: 700 0.64rem/1.2 var(--ac-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ac-fx-top__item h3 {
  margin: 4px 0 6px;
  color: var(--ac-rose-ink);
  font: 400 1.35rem/1.2 var(--ac-serif);
}

.ac-fx-top__item p {
  margin: 0;
}

.ac-fx-top__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 10px !important;
}

.ac-fx-top__price strong {
  color: #1f6e43;
  font: 400 1.4rem/1 var(--ac-serif);
}

.ac-fx-top__price span {
  color: var(--ac-muted);
  font-size: 0.84rem;
}

.ac-fx-method {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(154, 47, 99, 0.06);
  font-size: 0.92rem;
}

.ac-fx-method p {
  margin: 0 0 6px;
}

.ac-fx-method ul {
  margin: 0;
  padding-left: 18px;
}

/* Factura que se toca -------------------------------------------------- */
.ac-fx-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}

.ac-fx-tabs button {
  min-height: 42px;
  padding: 8px 14px;
  border: 1.5px solid var(--ac-line-strong);
  border-radius: 999px;
  background: var(--ac-white);
  color: var(--ac-rose-ink);
  font: 700 0.86rem/1 var(--ac-sans);
  cursor: pointer;
}

.ac-fx-tabs button[aria-selected="true"] {
  border-color: var(--ac-rose);
  background: var(--ac-rose);
  color: var(--ac-paper);
}

.ac-fx-invoice {
  display: grid;
  gap: 16px;
}

.ac-fx-paper {
  position: relative;
  padding: 20px 18px 18px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(42, 15, 30, 0.04) 27px 28px),
    #fffdf8;
  box-shadow: 0 1px 0 var(--ac-line), 0 24px 44px -30px rgba(42, 15, 30, 0.55);
  color: #3b2a33;
  font: 500 0.82rem/1.5 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.ac-fx-paper::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 8px;
  background: radial-gradient(circle at 6px -2px, transparent 6px, #fffdf8 7px) repeat-x;
  background-size: 12px 8px;
  content: "";
}

.ac-fx-paper__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 10px;
  padding: 4px 0;
}

.ac-fx-paper__row--head {
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(42, 15, 30, 0.25);
}

.ac-fx-paper__title {
  font: 400 1.35rem/1 var(--ac-serif);
  color: var(--ac-rose-ink);
  letter-spacing: 0.06em;
}

.ac-fx-paper__lines {
  margin: 8px 0;
  padding: 6px 0;
  border-top: 1px dashed rgba(42, 15, 30, 0.25);
  border-bottom: 1px dashed rgba(42, 15, 30, 0.25);
}

.ac-fx-paper__foot {
  margin-top: 10px;
  color: #6b5560;
  font-size: 0.74rem;
}

.ac-fx-pin {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  margin-right: 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ac-rose);
  color: var(--ac-paper);
  font: 800 0.72rem/1 var(--ac-sans);
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(154, 47, 99, 0.45);
  animation: ac-fx-pulse 2.6s ease-out infinite;
  vertical-align: middle;
}

.ac-fx-pin[aria-pressed="true"] {
  background: var(--ac-plum);
  color: var(--ac-gold-light);
  animation: none;
  box-shadow: 0 0 0 3px var(--ac-gold-light);
}

@keyframes ac-fx-pulse {
  0% { box-shadow: 0 0 0 0 rgba(154, 47, 99, 0.4); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(154, 47, 99, 0); }
}

.ac-fx-note {
  align-self: start;
  padding: 18px;
  border-radius: 12px;
  background: var(--ac-plum);
  color: rgba(247, 242, 232, 0.88);
}

.ac-fx-note p {
  margin: 0;
}

.ac-fx-note__n {
  color: var(--ac-gold-light);
  font: 700 0.66rem/1 var(--ac-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ac-fx-note__title {
  margin-top: 6px !important;
  color: var(--ac-paper);
  font: 400 1.35rem/1.2 var(--ac-serif);
}

.ac-fx-note__text {
  margin-top: 8px !important;
  line-height: 1.55;
}

.ac-fx-note a {
  display: inline-block;
  margin-top: 10px;
  color: var(--ac-gold-light) !important;
  font-weight: 700;
}

.ac-fx-hint {
  color: var(--ac-muted);
  font-size: 0.86rem;
  margin: 0 0 10px;
}

.ac-fx-retention {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rt;
}

.ac-fx-retention li {
  position: relative;
  padding: 10px 12px 10px 44px;
  border: 1px solid var(--ac-line);
  border-radius: 10px;
  background: var(--ac-white);
  counter-increment: rt;
}

.ac-fx-retention li::before {
  position: absolute;
  top: 9px;
  left: 12px;
  color: var(--ac-rose);
  font: 400 1.1rem/1 var(--ac-serif);
  content: counter(rt, decimal-leading-zero);
}

.ac-fx-code {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 14px;
  font: 700 1.2rem/1 ui-monospace, Menlo, Consolas, monospace;
}

.ac-fx-code span {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--ac-white);
  border: 1px solid var(--ac-line-strong);
  color: var(--ac-rose-ink);
}

.ac-fx-code small {
  display: block;
  margin-top: 4px;
  color: var(--ac-muted);
  font: 700 0.58rem/1 var(--ac-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

/* Video y norma relacionada -------------------------------------------- */
.ac-fx-video {
  display: grid;
  gap: 16px;
}

.ac-fx-video__copy p {
  margin: 0 0 10px;
}

.ac-fx-related-law {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--ac-line);
  border-radius: 12px;
  background: var(--ac-white);
}

.ac-fx-related-law p {
  margin: 0;
}

/* Escritorio ----------------------------------------------------------- */
@media (min-width: 720px) {
  .ac-fx-before-after {
    grid-template-columns: 1fr auto 1fr;
  }

  .ac-fx-before-after > span {
    transform: none;
  }

  .ac-fx-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ac-fx-contingency {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ac-fx-medios {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ac-fx-steps5 {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  }

  .ac-fx-invoice {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: start;
  }

  .ac-fx-note {
    position: sticky;
    top: calc(var(--ac-header-h, 72px) + 64px);
  }

  .ac-fx-video {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
  }
}

@media (min-width: 980px) {
  .ac-fx-answer,
  .ac-fx-count {
    margin-inline: 0;
  }

  .ac-fx-jumps {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ac-fx-pin {
    animation: none;
  }
}

.ac-fx-subhead {
  margin: 28px 0 8px;
  color: var(--ac-rose-ink);
  font: 400 1.35rem/1.2 var(--ac-serif);
  scroll-margin-top: calc(var(--ac-header-h, 72px) + 60px);
}

.ac-fx-notes {
  min-width: 0;
}

.ac-fx-medio > a {
  color: var(--ac-rose);
  font-size: 0.85rem;
}

[data-fx-panel] {
  scroll-margin-top: calc(var(--ac-header-h, 72px) + 60px);
}

/* Paginación de modelos */
.ac-fx-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin-top: 1rem;
}

.ac-fx-pages .ac-ce-hint {
  margin: 0;
  margin-inline-end: auto;
}

#modelos [hidden] {
  display: none;
}
