/* DataShield · sitio estático. Sin fuentes ni recursos externos. */

:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #121821;
  --muted: #4a5565;
  --border: #d9dee6;
  --accent: #0a6c74;
  --accent-ink: #ffffff;
  --cta: #14213d;
  --cta-ink: #ffffff;
  --cta-hover: #0a6c74;
  --code-bg: #0f1722;
  --code-ink: #e4eaf3;
  --focus: #1d5fd1;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 8px 24px rgb(16 24 40 / 6%);
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #151b24;
  --surface-2: #1c2430;
  --text: #e8ecf2;
  --muted: #aab4c3;
  --border: #29323f;
  --accent: #5ad1c8;
  --accent-ink: #06201e;
  --cta: #5ad1c8;
  --cta-ink: #06201e;
  --cta-hover: #8fe6df;
  --code-bg: #0a0f16;
  --code-ink: #e4eaf3;
  --focus: #8ab4ff;
  --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 35%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117;
    --surface: #151b24;
    --surface-2: #1c2430;
    --text: #e8ecf2;
    --muted: #aab4c3;
    --border: #29323f;
    --accent: #5ad1c8;
    --accent-ink: #06201e;
    --cta: #5ad1c8;
    --cta-ink: #06201e;
    --cta-hover: #8fe6df;
    --code-bg: #0a0f16;
    --code-ink: #e4eaf3;
    --focus: #8ab4ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 35%);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* Idioma: se muestra solo el bloque del idioma activo (sin JS: español). */
html[data-lang="es"] [data-l="en"],
html[data-lang="en"] [data-l="es"] {
  display: none !important;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--cta);
  color: var(--cta-ink);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  z-index: 100;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- barra superior ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
}

.brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
  white-space: nowrap;
}

.brand svg {
  width: 1.5rem;
  height: 1.5rem;
}

.nav {
  display: none;
  gap: 1.1rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--text);
}

@media (min-width: 860px) {
  .nav {
    display: flex;
  }
}

.seg {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}

.seg button,
.icon-btn {
  font: inherit;
  font-size: 0.85rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  min-height: 2.25rem;
}

.seg button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.icon-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* ---------- hero ---------- */
.hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 1.1rem auto 0.9rem;
  max-width: 18ch;
}

.lead {
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--muted);
  max-width: 62ch;
  margin: 0 auto 1.8rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  padding: 0.95rem 1.6rem;
  border-radius: 12px;
  min-height: 3.25rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

.btn svg {
  width: 1.3rem;
  height: 1.3rem;
}

.btn-primary {
  background: var(--cta);
  color: var(--cta-ink);
  font-size: 1.1rem;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
}

.badges {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 0;
  list-style: none;
}

.badges li {
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

/* ---------- secciones ---------- */
section {
  padding: 2.5rem 0;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.015em;
  margin: 0 0 0.6rem;
}

.section-lead {
  color: var(--muted);
  max-width: 70ch;
  margin: 0 0 1.6rem;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

.step-n {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

/* ---------- ejemplo ---------- */
.example {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.example-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .example-grid {
    grid-template-columns: 1fr 1fr;
  }
  .example-grid > .pane + .pane {
    border-left: 1px solid var(--border);
  }
}

.pane {
  padding: 1rem 1.1rem 1.2rem;
  min-width: 0;
}

.pane + .pane {
  border-top: 1px solid var(--border);
}

@media (min-width: 900px) {
  .pane + .pane {
    border-top: 0;
  }
}

.pane-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--muted);
}

pre.sample {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
}

pre.sample[hidden] {
  display: none;
}

mark.e {
  color: inherit;
  padding: 0.08em 0.3em;
  border-radius: 5px;
  border-bottom: 2px solid transparent;
}

mark.e-NOMBRE {
  background: rgb(139 92 246 / 22%);
  border-color: rgb(139 92 246 / 80%);
}
mark.e-CEDULA,
mark.e-CEDULA_EXTRANJERIA {
  background: rgb(236 72 153 / 20%);
  border-color: rgb(236 72 153 / 80%);
}
mark.e-NIT {
  background: rgb(234 179 8 / 25%);
  border-color: rgb(202 138 4 / 90%);
}
mark.e-DIRECCION {
  background: rgb(34 197 94 / 22%);
  border-color: rgb(22 163 74 / 85%);
}
mark.e-TELEFONO {
  background: rgb(59 130 246 / 22%);
  border-color: rgb(37 99 235 / 85%);
}
mark.e-CORREO {
  background: rgb(249 115 22 / 22%);
  border-color: rgb(234 88 12 / 85%);
}
mark.e-PLACA {
  background: rgb(20 184 166 / 22%);
  border-color: rgb(13 148 136 / 85%);
}
mark.e-PASAPORTE,
mark.e-CUENTA_BANCARIA {
  background: rgb(148 163 184 / 28%);
  border-color: rgb(100 116 139 / 85%);
}

.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tabs button {
  font: inherit;
  font-size: 0.82rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  min-height: 2.1rem;
  cursor: pointer;
}

.tabs button[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.8rem 1.1rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.8rem;
}

.legend mark.e {
  font-family: var(--mono);
  font-size: 0.75rem;
}

/* ---------- código ---------- */
.code {
  position: relative;
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 0 0 1rem;
  overflow-x: auto;
}

.code pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre;
}

.code .copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font: inherit;
  font-size: 0.78rem;
  color: var(--code-ink);
  background: rgb(255 255 255 / 10%);
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 8px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}

.code .copy:hover {
  background: rgb(255 255 255 / 20%);
}

.code .label {
  display: block;
  font-size: 0.75rem;
  color: #9fb0c6;
  margin-bottom: 0.4rem;
  font-family: var(--font);
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}

/* ---------- tipos ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chips li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.92rem;
}

.chips small {
  color: var(--muted);
}

/* ---------- aviso ---------- */
.notice {
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}

.notice h3 {
  margin: 0 0 0.35rem;
}

.notice ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.cta-final {
  text-align: center;
  padding: 3rem 0 3.5rem;
}

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.visually-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 520px) {
  .icon-btn [data-l] {
    display: none !important;
  }
  .topbar .wrap {
    gap: 0.5rem;
  }
}

/* =====================================================================
   v0.2 · componentes nuevos (hero ilustrado, casos, demo, gráficas…)
   ===================================================================== */

:root {
  --violet: #7c3aed;
  --chart-old: #9aa6b8;
  --chart-new: var(--accent);
  --chart-mid: rgb(10 108 116 / 45%);
  --art-doc: #ffffff;
  --art-line: #d5dbe5;
  --hero-glow: rgb(10 108 116 / 14%);
}

:root[data-theme="dark"] {
  --chart-old: #4b5668;
  --chart-mid: rgb(90 209 200 / 45%);
  --art-doc: #1b2330;
  --art-line: #334052;
  --hero-glow: rgb(90 209 200 / 12%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --chart-old: #4b5668;
    --chart-mid: rgb(90 209 200 / 45%);
    --art-doc: #1b2330;
    --art-line: #334052;
    --hero-glow: rgb(90 209 200 / 12%);
  }
}

section.alt {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

section {
  padding: 4rem 0;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 1rem 0 0;
  max-width: 75ch;
}

/* ---------- hero ---------- */
.hero {
  text-align: left;
  padding: 3.5rem 0 2rem;
  background:
    radial-gradient(60% 70% at 85% 30%, var(--hero-glow), transparent 70%),
    radial-gradient(40% 50% at 5% 0%, var(--hero-glow), transparent 70%);
}

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

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.05fr 1fr;
  }
}

.hero h1 {
  margin-left: 0;
  max-width: 16ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero .lead {
  margin-left: 0;
  max-width: 56ch;
}

.hero .cta-row {
  justify-content: flex-start;
}

.hero-art {
  margin: 0;
}

.hero-art svg {
  width: 100%;
  height: auto;
  display: block;
}

.hero-art figcaption {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

.art-doc {
  fill: var(--art-doc);
  stroke: var(--border);
  stroke-width: 1.5;
  filter: drop-shadow(0 10px 18px rgb(16 24 40 / 14%));
}

.art-line {
  fill: var(--art-line);
}

.art-hl {
  opacity: 0.85;
}

.art-hl-1 { fill: rgb(139 92 246 / 45%); }
.art-hl-2 { fill: rgb(236 72 153 / 45%); }
.art-hl-3 { fill: rgb(59 130 246 / 45%); }
.art-hl-4 { fill: rgb(34 197 94 / 45%); }
.art-hl-5 { fill: rgb(249 115 22 / 45%); }

.art-tag {
  fill: var(--accent);
}

.art-tag-t {
  fill: var(--accent-ink);
  font: 700 9.5px var(--mono);
  text-anchor: middle;
  letter-spacing: 0.04em;
}

.art-flow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-dasharray: 2 7;
  stroke-linecap: round;
}

.art-halo {
  fill: var(--hero-glow);
}

.art-shield {
  fill: var(--accent);
}

.art-check {
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- estadísticas ---------- */
.stats {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 800px) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stats li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.stats strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

/* ---------- casos de uso ---------- */
.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.case h3 {
  margin: 0.6rem 0 0.35rem;
}

.case p {
  margin: 0;
  color: var(--muted);
}

.case-ico {
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: 12px;
  background: var(--hero-glow);
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- demo ---------- */
.tabs-scenario {
  display: flex;
  gap: 0.4rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.tabs-scenario button {
  font-size: 0.9rem;
  padding: 0.4rem 1rem;
}

.demo-scenario[hidden] {
  display: none;
}

.demo-scenario pre.sample {
  min-height: 9.5rem;
}

mark.e-TARJETA_CREDITO {
  background: rgb(220 38 38 / 18%);
  border-color: rgb(220 38 38 / 80%);
}
mark.e-DIRECCION_IP {
  background: rgb(14 165 233 / 20%);
  border-color: rgb(2 132 199 / 85%);
}
mark.e-FECHA_NACIMIENTO {
  background: rgb(132 204 22 / 24%);
  border-color: rgb(101 163 13 / 90%);
}
mark.e-CUENTA_BANCARIA {
  background: rgb(168 85 247 / 14%);
  border-color: rgb(126 34 206 / 70%);
}

/* ---------- CSV ---------- */
.code-inline pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.csv-compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: center;
}



.csv-arrow {
  font-size: 1.8rem;
  color: var(--accent);
  text-align: center;
  font-weight: 700;
}

.csv-arrow {
  transform: rotate(90deg);
  line-height: 1;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
}

caption {
  text-align: left;
  padding: 0.7rem 0.9rem;
  font-weight: 700;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

th,
td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

thead th {
  background: var(--surface-2);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

table.csv td {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
}

/* ---------- diagrama ---------- */
.pipeline {
  margin: 0 0 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.pipeline svg {
  width: 100%;
  height: auto;
  display: block;
  min-width: 0;
}

.pipeline figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.8rem;
}

.pipe-step rect {
  fill: var(--surface-2);
  stroke: var(--border);
  stroke-width: 1.5;
}

.pipe-final rect {
  fill: var(--hero-glow);
  stroke: var(--accent);
}

.pipe-n {
  fill: var(--accent);
  font: 800 22px var(--font);
  text-anchor: middle;
}

.pipe-t {
  fill: var(--text);
  font: 700 16px var(--font);
  text-anchor: middle;
}

.pipe-s {
  fill: var(--muted);
  font: 12px var(--mono);
  text-anchor: middle;
}

.pipe-arrows path,
.pipe-table path {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  fill: none;
  marker-end: none;
}

.pipe-table rect {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-dasharray: 4 4;
}

.pipe-table text {
  fill: var(--muted);
  font: 12px var(--mono);
  text-anchor: middle;
}

/* ---------- tipos ---------- */
.types {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

@media (min-width: 640px) {
  .types {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .types {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.type {
  display: grid;
  gap: 0.3rem;
  justify-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  position: relative;
}

.type mark.e {
  font: 700 0.72rem var(--mono);
  letter-spacing: 0.03em;
}

.type code {
  font-size: 0.85rem;
  background: transparent;
  padding: 0;
}

.type small {
  color: var(--muted);
}

.type-new::after {
  content: attr(data-new);
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  font: 700 0.68rem var(--mono);
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

/* ---------- gráficas ---------- */
.charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 900px) {
  .charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .chart-wide {
    grid-column: 1 / -1;
  }
}

.chart-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}

.chart-card figcaption {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.chart-card figcaption strong {
  color: var(--text);
  font-size: 1rem;
}

svg.chart {
  width: 100%;
  height: auto;
  display: block;
}

.chart-wide svg.chart {
  max-width: 760px;
}

.ch-grid {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.ch-axis line {
  stroke: var(--muted);
  stroke-width: 1;
}

.ch-tick {
  fill: var(--muted);
  font: 11px var(--mono);
  text-anchor: middle;
}

svg.chart .ch-tick {
  text-anchor: end;
}

.chart-wide .ch-tick {
  text-anchor: middle;
}

.ch-label {
  fill: var(--text);
  font: 12px var(--mono);
  text-anchor: end;
}

.ch-strong {
  font-weight: 800;
}

.ch-track {
  fill: var(--surface-2);
}

.ch-bar,
.ch-new {
  fill: var(--chart-new);
}

.ch-total {
  fill: var(--violet);
}

.ch-old {
  fill: var(--chart-old);
}

.ch-value {
  fill: var(--text);
  font: 12px var(--mono);
}

svg.chart rect + text.ch-value,
.ch-value {
  text-anchor: start;
}

.chart-card:not(.chart-wide) .ch-value {
  text-anchor: middle;
}

.ch-n {
  fill: var(--muted);
  font: 11px var(--mono);
}

.ch-cat {
  fill: var(--text);
  font: 600 12px var(--font);
  text-anchor: middle;
}

.ch-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.sw {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 3px;
}

.sw-old {
  background: var(--chart-old);
}

.sw-new {
  background: var(--chart-new);
}

.sw-mid {
  background: var(--chart-mid);
}

.ch-mid {
  fill: var(--chart-mid);
}

.ch-note {
  flex-basis: 100%;
}

/* ---------- comparación ---------- */
table.compare th[scope="row"] {
  font-weight: 600;
  max-width: 22rem;
}

table.compare td,
table.compare th {
  font-size: 0.9rem;
}

table.compare .us {
  background: var(--hero-glow);
  font-weight: 700;
}

table.compare td.good::before,
table.compare td.bad::before {
  display: inline-block;
  width: 1.2em;
  font-weight: 800;
}

table.compare td.good::before {
  content: "✓";
  color: #16a34a;
}

table.compare td.bad::before {
  content: "✕";
  color: #dc2626;
}

@media print {
  .topbar,
  .tabs,
  .copy {
    display: none;
  }
  .demo-scenario[hidden],
  pre.sample[hidden] {
    display: block;
  }
}

/* ---------- herramienta: probar con tu archivo ---------- */
.tool-section {
  background: linear-gradient(180deg, var(--hero-glow), transparent 70%);
  border-top: 1px solid var(--border);
}

.tool {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
}

.drop {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  text-align: center;
  padding: 2.2rem 1rem;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--hero-glow);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.drop:hover,
.drop.is-over {
  background: rgb(10 108 116 / 22%);
  transform: scale(1.005);
}

.drop:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.drop svg {
  width: 52px;
  height: 52px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drop strong {
  font-size: 1.1rem;
}

.drop small {
  color: var(--muted);
  font-family: var(--mono);
}

.tool-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  align-items: flex-start;
}

.tool-options fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}

.tool-options legend {
  font-weight: 700;
  margin-bottom: 0.3rem;
  width: 100%;
}

.tool-options label {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  cursor: pointer;
}

.tool-options .check {
  max-width: 34rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.tool-status:empty {
  display: none;
}

.tool-status {
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: var(--surface-2);
  font-weight: 600;
}

.tool-status.is-busy::before {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.5rem;
  vertical-align: -0.1em;
  border: 2px solid var(--accent);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.tool-status.is-error {
  background: rgb(220 38 38 / 12%);
  color: inherit;
  border-left: 4px solid #dc2626;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.tool-result {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.tool-result[hidden] {
  display: none;
}

.tool-result h3 {
  margin: 0 0 0.6rem;
}

.tool-result .chips li {
  font-family: var(--mono);
  font-size: 0.85rem;
}

.tool-warn {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.tool-warn:empty {
  display: none;
}

.tool-result .cta-row {
  justify-content: flex-start;
  margin-top: 1rem;
}

.btn-download {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}

.btn-download:hover {
  filter: brightness(1.08);
}

[hidden].btn {
  display: none;
}

.paste summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
}

.paste textarea {
  display: block;
  width: 100%;
  margin: 0.7rem 0;
  font: inherit;
  font-family: var(--mono);
  font-size: 0.9rem;
  padding: 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.paste-out {
  margin-top: 0.8rem !important;
  padding: 0.8rem;
  border-radius: 10px;
  background: var(--surface-2);
}

.paste-out[hidden] {
  display: none;
}
