/* Misma identidad que las webs hermanas (dof-mx, auditmx, yxz666): zinc solo
   oscuro + Inter; el color solo aparece como señal (tip / ojo / vigente). */

:root {
  --z50: #fafafa; --z100: #f4f4f5; --z200: #e4e4e7; --z300: #d4d4d8;
  --z400: #a1a1aa; --z500: #71717a; --z600: #52525b; --z700: #3f3f46;
  --z800: #27272a; --z900: #18181b; --z950: #09090b;

  --ok: #34a065;
  --aviso: #f2b84b;
  --mal: #e5484d;
  --serie-a: #3987e5;  /* gráficas: validado contra #18181b (dataviz) */
  --serie-b: #d95926;
  --radius: 12px;

  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  font: 400 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--z50);
  background: var(--z950);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--z50); outline-offset: 2px; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }

h1, h2, h3 { font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h1 span { color: var(--z400); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: 1.1rem; margin-bottom: .4rem; letter-spacing: -.01em; }

.eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--z500); margin-bottom: .75rem;
}
.eyebrow--light { color: var(--z400); }
.lead { font-size: 1.12rem; color: var(--z400); margin: 1.25rem 0 1.75rem; max-width: 34rem; }
.muted { color: var(--z400); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.25rem; border-radius: 8px; border: 1px solid var(--z50);
  background: var(--z50); color: var(--z900); font: 600 .95rem Inter, sans-serif;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--z200); border-color: var(--z200); }
.btn--ghost { background: transparent; color: var(--z50); border-color: var(--z700); }
.btn--ghost:hover { background: var(--z900); border-color: var(--z600); }
.btn--sm { padding: .45rem .9rem; font-size: .88rem; }
.btn--block { width: 100%; }

/* Barra superior */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 9, 11, .85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--z800);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand__mark {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  background: var(--z50); color: var(--z950); font: 700 1.05rem Inter, sans-serif;
}
.brand__text { font: 600 1.1rem Inter, sans-serif; letter-spacing: -.02em; }
.brand__text em { font-style: normal; color: var(--z400); font-weight: 500; }
.nav__links { display: flex; align-items: center; gap: .25rem; }
.nav__links a:not(.btn) {
  text-decoration: none; font-weight: 500; font-size: .92rem; color: var(--z200);
  padding: .5rem .7rem; border-radius: 8px;
}
.nav__links a:not(.btn):hover { background: var(--z900); }
.nav__links a[aria-current="page"] { background: var(--z900); color: var(--z50); }
.nav__links .btn { margin-left: .5rem; }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--z50); margin: 5px 0; transition: .2s; }

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: center; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__checks { list-style: none; margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.hero__checks li { color: var(--z400); font-size: .93rem; }
.hero__checks li::before { content: "✓"; color: var(--z50); font-weight: 700; margin-right: .4rem; }

.hero__card { position: relative; }
.hero__card::before {
  content: ""; position: absolute; inset: -40px -40px -40px 0; z-index: -1;
  background: radial-gradient(circle at 60% 40%, rgba(250,250,250,.06), transparent 65%);
}
.ledger {
  background: var(--z900); border: 1px solid var(--z800); border-radius: 16px; padding: 1.5rem;
}
.ledger__head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 1rem; }
.pill { font-size: .72rem; font-weight: 600; background: var(--z800); color: var(--z200); padding: .25rem .65rem; border-radius: 999px; }
.ledger__row {
  display: flex; justify-content: space-between; padding: .7rem 0; border-bottom: 1px dashed var(--z800);
  font-size: .93rem; color: var(--z400);
}
.ledger__row b { color: var(--z50); }
.ledger__row b.ok { background: var(--z50); color: var(--z950); padding: 0 .5rem; border-radius: 6px; font-size: .8rem; }
.ledger__bar { height: 6px; background: var(--z800); border-radius: 99px; margin-top: 1.2rem; overflow: hidden; }
.ledger__bar i { display: block; height: 100%; background: var(--z50); border-radius: 99px; }
.ledger__foot { font-size: .8rem; color: var(--z500); margin-top: .6rem; }

/* Secciones */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; border-top: 1px solid var(--z800); }
.section--tint { background: #0e0e10; }
.section--dark { background: var(--z900); }
.section--dark p { color: var(--z400); margin-bottom: 1rem; }
.section--top0 { padding-top: 0; border-top: 0; }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.section__head h2 { margin-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.card {
  background: var(--z900); border: 1px solid var(--z800); border-radius: var(--radius); padding: 1.5rem;
  transition: border-color .2s;
}
.card:hover { border-color: var(--z600); }
.card__icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--z800);
  display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 1rem; filter: grayscale(1);
}
.card p { color: var(--z400); font-size: .95rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li {
  background: var(--z900); border: 1px solid var(--z800); border-radius: 999px;
  padding: .5rem 1rem; font-weight: 500; font-size: .92rem; color: var(--z200);
}

.avatar {
  aspect-ratio: 1; max-width: 360px; width: 100%; justify-self: center; border-radius: 20px;
  background: var(--z950); border: 1px solid var(--z800);
  display: grid; place-items: center;
}
.avatar span { font: 700 8rem Inter, sans-serif; color: var(--z50); letter-spacing: -.04em; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.5rem; }
.values div { border-left: 2px solid var(--z700); padding-left: .8rem; }
.values b { display: block; color: var(--z50); }
.values span { font-size: .87rem; color: var(--z400); }

/* Contacto */
.contact-list { list-style: none; margin-top: 1.5rem; }
.contact-list li { display: flex; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--z800); color: var(--z400); }
.contact-list span { width: 100px; flex-shrink: 0; font-weight: 600; color: var(--z50); }
.contact-list a { color: var(--z50); font-weight: 500; }

.form {
  background: var(--z900); border: 1px solid var(--z800); border-radius: 16px; padding: 1.5rem;
  display: grid; gap: 1rem;
}
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .88rem; color: var(--z200); }
.form input, .form select, .form textarea {
  font: 400 1rem Inter, sans-serif; padding: .7rem .85rem; border: 1px solid var(--z700);
  border-radius: 8px; background: var(--z950); color: var(--z50); width: 100%;
}
.form input::placeholder, .form textarea::placeholder { color: var(--z500); }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--z50); border-color: transparent; }
.form__note { font-size: .8rem; color: var(--z500); text-align: center; }

.footer { border-top: 1px solid var(--z800); color: var(--z500); padding: 2rem 0; font-size: .88rem; }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer .brand__text { color: var(--z50); }

.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 54px; height: 54px; border-radius: 50%;
  background: var(--z50); color: var(--z950); display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5); transition: transform .2s;
}
.wa-float:hover { transform: scale(1.06); }

/* Guías: tarjetas */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.post {
  display: flex; flex-direction: column; gap: .5rem; text-decoration: none;
  background: var(--z900); border: 1px solid var(--z800); border-radius: var(--radius); padding: 1.3rem 1.4rem;
  transition: border-color .2s, background .2s;
}
.post[hidden] { display: none; }
.post:hover { border-color: var(--z600); background: #1c1c1f; }
.post h3 { font-size: 1.08rem; }
.post p { color: var(--z400); font-size: .93rem; flex: 1; }
.post__meta { display: flex; align-items: center; gap: .6rem; font-size: .8rem; font-weight: 500; color: var(--z400); }
.post__foot { display: flex; justify-content: space-between; gap: .5rem; font-size: .8rem; color: var(--z500); border-top: 1px solid var(--z800); padding-top: .7rem; margin-top: .3rem; }
.chip { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: .18rem .55rem; border-radius: 6px; }
.chip--guia { background: var(--z800); color: var(--z200); }
.chip--tutorial { background: var(--z50); color: var(--z950); }
.vacio { color: var(--z400); padding: 2rem 0; }
.vacio a { color: var(--z50); }

/* Listado */
.page-head { padding: clamp(2.5rem, 6vw, 4rem) 0 2rem; }
.page-head .lead { margin-bottom: 1.5rem; }
.buscador input {
  width: 100%; max-width: 560px; font: 400 1rem Inter, sans-serif; padding: .8rem 1rem;
  border: 1px solid var(--z700); border-radius: 8px; background: var(--z900); color: var(--z50);
}
.buscador input::placeholder { color: var(--z500); }
.buscador input:focus { outline: 2px solid var(--z50); border-color: transparent; }
.filtros { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.filtros--tipo { margin-top: .5rem; }
.filtro {
  font: 500 .88rem Inter, sans-serif; padding: .4rem .85rem; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--z800); background: transparent; color: var(--z400);
}
.filtro:hover { color: var(--z50); border-color: var(--z600); }
.filtro.is-on { background: var(--z50); border-color: var(--z50); color: var(--z950); }

/* Artículo */
.articulo { padding: clamp(2rem, 5vw, 3.5rem) 0 3rem; }
.articulo__head { margin-bottom: 2rem; }
.articulo__head h1 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); margin-top: .8rem; }
.articulo__head .lead { margin: 1rem 0; max-width: none; }
.articulo__meta { font-size: .88rem; color: var(--z500); }
.volver { display: inline-block; font-size: .9rem; font-weight: 500; color: var(--z400); text-decoration: none; margin-bottom: 1rem; }
.volver:hover { color: var(--z50); }

.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; margin-bottom: 2rem; border: 1px solid var(--z800); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.toc { background: var(--z900); border: 1px solid var(--z800); border-radius: var(--radius); padding: 1.1rem 1.4rem; margin-bottom: 2rem; }
.toc b { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--z500); }
.toc ol { margin: .5rem 0 0 1.2rem; color: var(--z500); }
.toc li { padding: .15rem 0; }
.toc a { color: var(--z200); text-decoration: none; }
.toc a:hover { color: var(--z50); text-decoration: underline; }

.prosa { font-size: 1.05rem; line-height: 1.75; color: var(--z200); }
.prosa > * + * { margin-top: 1.1rem; }
.prosa h2 { font-size: 1.5rem; margin-top: 2.6rem; margin-bottom: 0; color: var(--z50); }
.prosa h3 { font-size: 1.2rem; margin-top: 2rem; margin-bottom: 0; color: var(--z50); }
.prosa strong { color: var(--z50); }
.prosa a { color: var(--z50); font-weight: 500; text-underline-offset: 3px; }
.prosa ul, .prosa ol { padding-left: 1.4rem; }
.prosa li + li { margin-top: .35rem; }
.prosa li::marker { color: var(--z500); font-weight: 600; }
.prosa img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--z800); margin-inline: auto; }
.prosa code { font: .9em ui-monospace, Consolas, monospace; background: var(--z800); color: var(--z50); padding: .12rem .4rem; border-radius: 6px; }
.prosa pre { background: var(--z900); border: 1px solid var(--z800); padding: 1rem 1.2rem; border-radius: 10px; overflow-x: auto; }
.prosa pre code { background: none; padding: 0; font-size: .9rem; }
.prosa blockquote { border-left: 2px solid var(--z700); padding: .3rem 0 .3rem 1.1rem; color: var(--z400); }
.prosa .nota { border: 1px solid var(--z800); border-left: 3px solid; border-radius: 8px; padding: .9rem 1.1rem; background: var(--z900); color: var(--z200); }
.prosa .nota > * + * { margin-top: .5rem; }
.prosa .nota--tip { border-left-color: var(--ok); }
.prosa .nota--tip strong:first-child { color: var(--ok); }
.prosa .nota--ojo { border-left-color: var(--aviso); }
.prosa .nota--ojo strong:first-child { color: var(--aviso); }
.prosa table { width: 100%; border-collapse: collapse; font-size: .93rem; display: block; overflow-x: auto; }
.prosa th, .prosa td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--z800); }
.prosa th { background: var(--z900); font-weight: 600; color: var(--z50); }
.prosa hr { border: 0; border-top: 1px solid var(--z800); margin: 2.5rem 0; }

.cta-box {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-top: 3rem; padding: 1.3rem 1.4rem; border-radius: var(--radius);
  background: var(--z900); border: 1px solid var(--z800);
}
.cta-box b { display: block; font-size: 1.08rem; }
.cta-box span { font-size: .9rem; color: var(--z400); }
.cta-box__acciones { display: flex; gap: .5rem; }

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero__grid, .split { grid-template-columns: 1fr; }
  .hero__card { max-width: 440px; }
  .cards, .posts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--z950); border-bottom: 1px solid var(--z800); padding: .5rem 16px 1rem;
    display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a:not(.btn) { padding: .8rem .2rem; border-radius: 0; border-bottom: 1px solid var(--z800); }
  .nav__links .btn { margin: .8rem 0 0; width: 100%; }
  .cards, .posts, .values { grid-template-columns: 1fr; }
  .avatar { max-width: 220px; }
  .avatar span { font-size: 5.5rem; }
  .prosa { font-size: 1rem; }
}

/* Herramienta XML a Excel */
.sellos { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.sellos li { font-size: .85rem; font-weight: 500; color: var(--z200); border: 1px solid var(--z800); border-radius: 999px; padding: .3rem .8rem; }
.sellos li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.herramienta { display: grid; gap: 1.25rem; }
.herramienta > *, .masivo > * { min-width: 0; }
.zona {
  display: grid; justify-items: center; gap: .5rem; text-align: center;
  padding: clamp(2rem, 6vw, 3.5rem) 1rem; border: 2px dashed var(--z700); border-radius: var(--radius);
  background: var(--z900); color: var(--z400); transition: border-color .15s, background .15s;
}
.zona b { color: var(--z50); font-size: 1.1rem; font-weight: 600; }
.zona.is-sobre { border-color: var(--z50); background: #1c1c1f; }
.zona__botones { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .75rem; }
.campo { display: grid; gap: .35rem; max-width: 420px; }
.campo span { font-weight: 600; font-size: .92rem; }
.campo em { font-style: normal; color: var(--z500); font-weight: 400; }
.campo input {
  font: 500 1rem ui-monospace, Consolas, monospace; letter-spacing: .05em; padding: .7rem .9rem;
  border: 1px solid var(--z700); border-radius: 8px; background: var(--z900); color: var(--z50); text-transform: uppercase;
}
.campo input:focus { outline: 2px solid var(--z50); border-color: transparent; }
.campo small { font-size: .82rem; }
.aviso { color: var(--aviso); }
.progreso[hidden] { display: none; }
.progreso { display: grid; gap: .4rem; font-size: .88rem; color: var(--z400); }
.progreso div { height: 6px; background: var(--z800); border-radius: 99px; overflow: hidden; }
.progreso i { display: block; height: 100%; width: 0; background: var(--z50); transition: width .15s; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.kpis div { background: var(--z900); border: 1px solid var(--z800); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: .2rem; }
.kpis b { font-size: 1.45rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpis b.k-chico { font-size: 1rem; padding-top: .35rem; }
.kpis span { font-size: .8rem; color: var(--z500); }
.acciones { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.25rem 0; }
.acciones[hidden] { display: none; }
.acciones__nota { font-size: .85rem; }
.tabla-wrap { overflow-x: auto; border: 1px solid var(--z800); border-radius: var(--radius); }
.tabla { width: 100%; border-collapse: collapse; font-size: .86rem; white-space: nowrap; }
.tabla th, .tabla td { padding: .55rem .8rem; text-align: left; border-bottom: 1px solid var(--z800); }
.tabla th { background: var(--z900); font-weight: 600; color: var(--z200); position: sticky; top: 0; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; }
.tabla .uuid { font-family: ui-monospace, Consolas, monospace; color: var(--z500); }
.mas-filas { font-size: .85rem; margin-top: .6rem; }
.errores { margin-top: 1rem; font-size: .88rem; color: var(--z400); }
.errores summary { cursor: pointer; color: var(--aviso); font-weight: 500; }
.errores ul { margin: .6rem 0 0 1.2rem; max-height: 240px; overflow: auto; }
.errores b { color: var(--z200); font-weight: 500; }
.que-trae { margin-top: 2.5rem; }
.que-trae .cards { grid-template-columns: repeat(2, 1fr); margin-top: 1rem; }
.nota-simple { margin-top: 1.25rem; border: 1px solid var(--z800); border-left: 3px solid var(--aviso); border-radius: 8px; padding: .9rem 1.1rem; background: var(--z900); color: var(--z200); font-size: .93rem; }
.nota-simple b { color: var(--aviso); }
@media (max-width: 720px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .que-trae .cards { grid-template-columns: 1fr; }
}

/* Herramienta lista 69-B */
.buscador--grande input { max-width: none; font-size: 1.15rem; padding: 1rem 1.2rem; }
.h2-chico { font-size: 1.35rem; margin: 1.5rem 0 0; }
.masivo { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.masivo textarea {
  width: 100%; min-height: 170px; resize: vertical; font: 500 .95rem ui-monospace, Consolas, monospace;
  padding: .9rem 1rem; border: 1px solid var(--z700); border-radius: var(--radius); background: var(--z900); color: var(--z50);
}
.masivo textarea:focus { outline: 2px solid var(--z50); border-color: transparent; }
.zona--chica { padding: 1.5rem 1rem; align-content: center; }
.zona--chica b { font-size: 1rem; }
.check { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; color: var(--z300); cursor: pointer; }
.kpis .kpi--mal { border-color: color-mix(in srgb, var(--mal) 45%, var(--z800)); }
.kpis .kpi--mal b { color: var(--mal); }
.kpis .kpi--aviso { border-color: color-mix(in srgb, var(--aviso) 40%, var(--z800)); }
.kpis .kpi--aviso b { color: var(--aviso); }
.sit { display: inline-block; font-size: .74rem; font-weight: 600; padding: .15rem .55rem; border-radius: 6px; white-space: nowrap; }
.sit--mal { background: color-mix(in srgb, var(--mal) 20%, transparent); color: #ff8a8e; }
.sit--aviso { background: color-mix(in srgb, var(--aviso) 18%, transparent); color: var(--aviso); }
.sit--ok { background: color-mix(in srgb, var(--ok) 20%, transparent); color: #6fd39b; }
.sit--limpio { background: var(--z800); color: var(--z400); }
.tabla .nombre { white-space: normal; min-width: 240px; }
.fila-link { cursor: pointer; }
.fila-link:hover td { background: var(--z900); }
.ficha {
  display: grid; gap: .5rem; padding: 1.2rem 1.4rem; border-radius: var(--radius);
  background: var(--z900); border: 1px solid var(--z800); border-left: 4px solid var(--z600);
}
.ficha b { font-size: 1.15rem; font-weight: 600; }
.ficha--mal { border-left-color: var(--mal); }
.ficha--aviso { border-left-color: var(--aviso); }
.ficha--ok, .ficha--limpio { border-left-color: var(--ok); }
.ficha--limpio span { color: var(--z400); font-size: .9rem; }
.ficha__top { display: flex; align-items: center; gap: .6rem; }
.ficha__top code { font: 600 .95rem ui-monospace, Consolas, monospace; color: var(--z300); }
.linea { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-size: .9rem; }
.linea span { display: block; font-size: .75rem; color: var(--z500); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .5rem; vertical-align: middle; }
.dot--mal { background: var(--mal); }
.dot--aviso { background: var(--aviso); }
.dot--ok { background: var(--ok); }
@media (max-width: 720px) {
  .masivo { grid-template-columns: 1fr; }
}

/* Sección de herramientas */
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.tool {
  display: flex; flex-direction: column; gap: .55rem; text-decoration: none;
  background: var(--z900); border: 1px solid var(--z800); border-radius: var(--radius); padding: 1.4rem;
  transition: border-color .2s, background .2s, transform .2s;
}
.tool:hover { border-color: var(--z600); background: #1c1c1f; transform: translateY(-2px); }
.tool__icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--z50); color: var(--z950); margin-bottom: .35rem; }
.tool__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 500; color: var(--z400); }
.tool h3 { font-size: 1.2rem; margin: 0; }
.tool p { color: var(--z400); font-size: .93rem; }
.tool__puntos { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; flex: 1; align-content: flex-start; }
.tool__puntos li { font-size: .78rem; color: var(--z300); border: 1px solid var(--z800); border-radius: 999px; padding: .15rem .6rem; }
.tool__abrir { font-weight: 600; font-size: .9rem; color: var(--z50); border-top: 1px solid var(--z800); padding-top: .8rem; margin-top: .3rem; }
.otras-herramientas .tools { margin-top: 1rem; }
@media (max-width: 900px) { .tools { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .tools { grid-template-columns: 1fr; } }

/* Tablero de facturas */
.panel { background: var(--z900); border: 1px solid var(--z800); border-radius: var(--radius); padding: 1.3rem 1.4rem; margin-top: 1rem; }
.panel .h2-chico { margin: 0 0 .8rem; font-size: 1.15rem; }
.panel__cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; }
.panel__cab .filtros { margin: 0 0 .8rem; }
.leyenda { display: flex; gap: 1rem; font-size: .85rem; color: var(--z300); margin-bottom: .8rem; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .4rem; vertical-align: -1px; }
.sw--a { background: var(--serie-a); }
.sw--b { background: var(--serie-b); }
.grafica svg { width: 100%; height: auto; display: block; }
.g-a { fill: var(--serie-a); }
.g-b { fill: var(--serie-b); }
.g-rejilla { stroke: var(--z800); stroke-width: 1; }
.g-eje { fill: var(--z500); font: 500 12px Inter, sans-serif; }
.g-hit { fill: transparent; cursor: crosshair; }
.g-hit:hover { fill: rgba(255, 255, 255, .04); }
.tabla-vista { margin-top: .6rem; font-size: .88rem; color: var(--z400); }
.tabla-vista summary { cursor: pointer; }
.tabla-vista .tabla-wrap { margin-top: .6rem; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.dos > * { min-width: 0; }
.barras-h { display: grid; gap: .9rem; }
.bh__txt { display: flex; justify-content: space-between; gap: .8rem; font-size: .9rem; }
.bh__txt span { color: var(--z200); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh__txt b { font-weight: 600; font-variant-numeric: tabular-nums; }
.bh__pista { height: 10px; background: var(--z800); border-radius: 4px; margin: .35rem 0 .15rem; overflow: hidden; }
.bh__pista i { display: block; height: 100%; border-radius: 4px; }
.g-a-bg { background: var(--serie-a); }
.g-b-bg { background: var(--serie-b); }
.bh small { color: var(--z500); font-size: .78rem; }
.ppd-nota { font-size: .88rem; margin-bottom: .8rem; }
.tip {
  position: fixed; z-index: 80; pointer-events: none; display: grid; gap: .2rem;
  background: var(--z950); border: 1px solid var(--z700); border-radius: 8px; padding: .55rem .75rem; font-size: .85rem; color: var(--z200);
}
.tip[hidden] { display: none; }
@media (max-width: 720px) { .dos { grid-template-columns: 1fr; } }

/* Renombrar facturas */
.cod { font: 500 .88em ui-monospace, Consolas, monospace; background: var(--z800); color: var(--z50); padding: .1rem .45rem; border-radius: 6px; overflow-wrap: anywhere; }
.opciones { display: grid; gap: 1.1rem; background: var(--z900); border: 1px solid var(--z800); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.opcion { display: grid; gap: .45rem; }
.opcion__tit { font-weight: 600; font-size: .92rem; }
.opcion .filtros { margin-top: 0; }
.opciones .campo input { background: var(--z950); }
.ejemplo { font-size: .95rem; border-top: 1px solid var(--z800); padding-top: 1rem; }
.tabla .flecha { color: var(--z600); padding: 0 .2rem; }
.tabla .ruta { color: var(--z500); }
.tabla td b { font-weight: 600; color: var(--z50); }

/* Validar ante el SAT */
.privacidad { font-size: .9rem; color: var(--z400); border: 1px solid var(--z800); border-radius: 8px; padding: .8rem 1rem; background: var(--z900); }
.privacidad b { color: var(--z200); }
.alerta-efos { margin-top: 1rem; color: var(--aviso); font-weight: 500; }
.alerta-efos[hidden] { display: none; }
#filtro { margin: 0 0 1rem; }
.dot:not([class*="dot--"]) { background: var(--z500); }

.btn[hidden] { display: none; }

/* Redes sin enlace todavía */
.tool--pronto { opacity: .6; cursor: default; }
.tool--pronto:hover { transform: none; background: inherit; border-color: inherit; }
#redes > .container > .muted { max-width: 60ch; }

/* Video demo en cada herramienta (scripts/insertar_demos.py) */
.video video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.demo__inner { max-width: 960px; }
.demo .video { margin-bottom: 0; }
.demo-enlace { display: inline-block; margin-top: 1rem; font-size: .9rem; font-weight: 600; color: var(--z50); text-decoration: none; border: 1px solid var(--z700); border-radius: 999px; padding: .4rem .95rem; }
.demo-enlace:hover { background: var(--z800); }
/* DIOT */
.campos-diot { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.campos-diot .campo { max-width: none; }
.campos-diot select, .tabla-diot select {
  font: 500 .95rem Inter, system-ui, sans-serif; padding: .68rem .8rem; border: 1px solid var(--z700); border-radius: 8px;
  background: var(--z900); color: var(--z50); max-width: 100%;
}
.campos-diot #proporcion { text-transform: none; }
.tabla-diot select { padding: .35rem .5rem; font-size: .82rem; width: 175px; }
.tabla-diot .nombre { min-width: 250px; }
.tabla-diot th, .tabla-diot td { padding-left: .6rem; padding-right: .6rem; }
.checks-diot { display: grid; gap: .45rem; font-size: .9rem; color: var(--z300); }
.checks-diot label { display: flex; gap: .55rem; align-items: flex-start; }
.checks-diot input { margin-top: .2rem; accent-color: var(--z50); }
.avisos-diot { list-style: none; display: grid; gap: .4rem; margin: 1rem 0 0; padding: 0; font-size: .9rem; }
.avisos-diot li { border-left: 3px solid var(--aviso); background: var(--z900); padding: .55rem .9rem; border-radius: 6px; }
.avisos-diot li.mal { border-left-color: var(--mal); }
.avisos-diot li.muted { border-left-color: var(--z700); }
.tabla-diot td { vertical-align: top; }
.tabla-diot .fila-mal td { background: color-mix(in srgb, var(--mal) 8%, transparent); }
.fila-notas { margin: .35rem 0 0; padding-left: 1rem; font-size: .8rem; color: var(--aviso); white-space: normal; }
.fila-notas .mal { color: var(--mal); }
.chip69 { white-space: nowrap; font-size: .7rem; font-weight: 600; padding: .1rem .45rem; border-radius: 5px; margin-left: .3rem; background: var(--z800); color: var(--z200); }
.chip69--D { background: color-mix(in srgb, var(--mal) 25%, var(--z900)); color: var(--z50); }
.chip69--P { background: color-mix(in srgb, var(--aviso) 25%, var(--z900)); color: var(--z50); }
.pasos-sat ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; color: var(--z300); font-size: .92rem; }