/* /servicios/facturacion-electronica/ — factura CFDI 4.0 que se escribe sola y se timbra */
.cfd-h1 { font-size: clamp(2.4rem, 6.3vw, 6.8rem); }
.cfd-h2 { font-size: clamp(2rem, 4.4vw, 4.6rem); }

.cfd-doc { background: #fbf8f1; }
.cfd-doc .dev__screen { gap: 1em; padding: 1.4em 1.5em 1.6em; }
.cfd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1em; padding-bottom: .9em; border-bottom: 2px solid var(--ink); }
.cfd-head .m-h { font-size: 1.45em; margin: .2em 0; }
.cfd-folio { text-align: right; }
.cfd-folio .m-big { color: var(--chalk-deep); }
.cfd-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .1em 1.4em; }
.cfd-f { display: grid; gap: .1em; padding: .45em 0; border-bottom: 1px dashed var(--line-strong); min-width: 0; }
.cfd-f b { font-family: var(--f-mono); font-weight: 600; font-size: .92em; min-height: 1.3em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfd-items { display: grid; gap: 0; border: 1px solid var(--line-strong); border-radius: 3px; }
.cfd-item { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) auto; gap: .8em; padding: .5em .7em; border-top: 1px solid var(--line); font-size: .95em; }
.cfd-item span:first-child { font-family: var(--f-mono); font-size: .85em; color: var(--mute); }
.cfd-item span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfd-item b { font-variant-numeric: tabular-nums; }
.cfd-item--h { border-top: 0; background: var(--paper-2); font-family: var(--f-mono); font-size: .7em; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.cfd-item--h span:first-child { font-size: 1em; }
.cfd-sum { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4em; align-items: end; }
.cfd-xml { display: flex; flex-wrap: wrap; gap: .4em; }
.cfd-tot .m-total { font-size: 1.25em; }
.cfd-uuid { word-break: break-all; font-size: .7em; padding-top: .7em; border-top: 1px dashed var(--line-strong); }
.cfd-stamp { position: absolute; left: 1.6em; bottom: 5.4em; font-size: 1.35em; padding: .3em .8em; border-width: 3px; background: rgba(251, 248, 241, .85); }

/* portal de autofacturación */
.cfd-portal { margin-top: clamp(28px, 4vw, 48px); }
.cfd-portal .dev--phone { margin-inline: 0; }
.cfd-portal .dev__screen { min-height: 0; gap: .6em; }
.cfd-portal .m-input .m-s { min-width: 3.6em; }
.cfd-portal .m-btn { align-self: stretch; }
.cfd-ok { display: flex; align-items: center; gap: .5em; padding: .6em .7em; border-radius: 4px; background: #e2f2dc; font-size: .95em; }
.cfd-side { min-width: 0; }
.cfd-side > p + p { margin-top: 1em; }
.cfd-weave-h { margin: clamp(32px, 4vw, 52px) 0 16px; }
.cfd-note { margin-top: clamp(28px, 3vw, 40px); }

@media (max-width: 899px) { .cfd-portal .dev--phone { margin-inline: auto; } }
@media (max-width: 560px) {
  .cfd-doc .dev__screen { padding: 1.1em 1em 1.3em; }
  .cfd-fields { grid-template-columns: 1fr; }
  .cfd-item { grid-template-columns: minmax(0, 1fr) auto; }
  .cfd-item span:first-child { display: none; }
  .cfd-sum { grid-template-columns: 1fr; }
  .cfd-stamp { left: auto; right: .8em; bottom: auto; top: 4.4em; font-size: 1.1em; }
}

/* móvil: marcadores fuera de lugar en maqueta apilada -> sólo leyenda; espacio para la cota */
@media (max-width: 560px) { .cfd-board .pin { display: none; } .cfd-board { padding-top: 32px; } }

