/* NETWORKING LAB · tablas: barra «Ampliar / Descargar» y tarjetas en móvil (el tipo lo asigna nl-tablas.js) */
.nl-tabla { margin: 1.1rem 0; }
.nl-tabla > .md-typeset__scrollwrap, .nl-tabla > table { margin: 0; }
.nl-tabla__tools { display: flex; justify-content: flex-end; gap: .4rem; margin: 0 0 .4rem; }
.nl-tabla__btn { height: 40px; min-width: 40px; }
.nl-tabla .nl-fig__btn span { display: inline; }            /* en móvil también se lee la etiqueta */
.nl-visor__bar { flex-wrap: wrap; }
.nl-visor__bar .nl-fig__btn span { display: inline; }       /* PNG / SVG / Tema / Cerrar con etiqueta también en móvil */

@media (max-width: 40em) {
  /* ---------- tarjetas: sin franja de encabezado y sin scroll lateral ---------- */
  /* Todas las líneas miden exactamente 1 px (marco exterior y separadores): grosor uniforme en cualquier pantalla.
     Tema claro: cebra con tinte morado. Tema oscuro: cebra neutra lavanda muy tenue y separadores lavanda, sin bloques morados. */
  .md-typeset .nl-tabla table[data-nl-tipo] { --tb-edge: color-mix(in srgb, var(--nl-brand) 45%, var(--nl-line)); --tb-sep: color-mix(in srgb, var(--nl-brand) 28%, var(--nl-line)); --tb-b: color-mix(in srgb, var(--nl-brand) 8%, var(--nl-panel)); --tb-term: var(--nl-h1, var(--nl-brand)); }
  [data-md-color-scheme="slate"] .md-typeset .nl-tabla table[data-nl-tipo] { --tb-edge: rgba(213, 198, 220, .42); --tb-sep: rgba(213, 198, 220, .20); --tb-b: rgba(213, 198, 220, .075); --tb-term: #f1eaf6; }
  /* el contenedor de nl-flow.css dibuja su propio marco (2 px, sombra, brillo al tocar): en tarjetas el único marco es el de la tabla */
  .md-typeset .nl-tabla .md-typeset__table { border: 0; border-radius: 0; box-shadow: none; background: transparent; margin: 0; overflow: visible; }
  .md-typeset .nl-tabla .md-typeset__table::before { display: none; }
  .md-typeset .nl-tabla table[data-nl-tipo] { display: block; width: 100%; font-size: .92em; border-radius: 12px; border: 1px solid var(--tb-edge); background: var(--nl-panel); overflow: hidden; }
  .md-typeset .nl-tabla table[data-nl-tipo] thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .md-typeset .nl-tabla table[data-nl-tipo] tbody { display: block; }
  .md-typeset .nl-tabla table[data-nl-tipo] tbody tr { display: block; padding: .1em 0 .3em; border: 0; border-top: 1px solid var(--tb-sep); background: transparent; box-shadow: none; }
  .md-typeset .nl-tabla table[data-nl-tipo] tbody tr:first-child { border-top: 0; }
  .md-typeset .nl-tabla table[data-nl-tipo] tbody tr:nth-child(even) { background: var(--tb-b); }
  .md-typeset .nl-tabla table[data-nl-tipo] tbody tr:nth-child(n) td { display: block; width: auto; border: 0; background: transparent; padding: .3em .9em; }
  .md-typeset .nl-tabla table[data-nl-tipo] tbody tr:nth-child(n) td:first-child { padding-top: .6em; font: 700 1.02em/1.3 var(--nl-f-head); color: var(--tb-term); box-shadow: none; }

  /* defs (2 columnas): término + descripción */
  .md-typeset .nl-tabla table[data-nl-tipo="defs"] tbody tr:nth-child(n) td:first-child { padding-bottom: .05em; }
  .md-typeset .nl-tabla table[data-nl-tipo="defs"] tbody tr:nth-child(n) td:last-child { padding-top: .1em; padding-bottom: .65em; }

  /* cmp (3 o más columnas): título de fila + cada valor con su etiqueta */
  .md-typeset .nl-tabla table[data-nl-tipo="cmp"] tbody tr:nth-child(n) td:first-child { box-shadow: inset 0 -1px 0 var(--tb-sep); margin-bottom: .15em; }
  .md-typeset .nl-tabla table[data-nl-tipo="cmp"] tbody tr:nth-child(n) td:not(:first-child)::before { content: attr(data-label); display: block; margin-bottom: .05em; font: 600 .8em/1.3 var(--nl-f-head); letter-spacing: .02em; color: var(--nl-soft, var(--nl-brand)); }
  .md-typeset .nl-tabla table[data-nl-tipo="cmp"] tbody tr:nth-child(n) td[data-label=""]::before { display: none; }
  .md-typeset .nl-tabla table[data-nl-tipo="cmp"] tbody tr:nth-child(n) td:last-child { padding-bottom: .7em; }
}
