/* Space Grotesk, auto-hospedada en static/fonts/ (SIL OFL, ver static/fonts/OFL.txt) — sin
   dependencia de Google Fonts en runtime, mismo criterio que htmx vendorizado. Un solo archivo
   variable (500–700) cubre negrita/seminegrita de títulos; el cuerpo del texto sigue en la
   fuente del sistema (legibilidad y carga instantánea en tablas/formularios del portal). */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/static/fonts/space-grotesk-variable.woff2') format('woff2');
}

:root {
  --primary: #0f172a;
  --brand: #006bbb; /* del logo real (assets/notificert-icon.svg) */
  --brand-dark: #00487e;
  --brand-light: #ebf3fa;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --text-dark: #1e293b;
  --text-gray: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.5;
}

/* Evita palabras huérfanas sueltas en la última línea de un título */
h1, h2 { text-wrap: pretty; font-family: var(--font-display); }

.container { max-width: 960px; margin: 0 auto; padding: 0 24px 48px; }
@media (max-width: 480px) {
  .container { padding: 0 16px 40px; }
}

/* Hero / brand header — mismo header en TODAS las páginas (dashboard, login, enviar...), no
   solo la landing: fondo claro con una grilla técnica sutil, en vez del gradiente oscuro
   genérico de antes. Es la base del rebranding, por eso vive acá y no bajo body.landing. */
.hero {
  background-color: #f4f5f7;
  background-image:
    linear-gradient(90deg, rgba(15,23,42,0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(15,23,42,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--text-dark);
  padding: 40px 24px 56px;
  margin-bottom: -32px;
}
@media (max-width: 480px) {
  .hero { padding: 28px 16px 44px; }
}
.hero-inner { max-width: 960px; margin: 0 auto; }
.brand-logo { height: 30px; width: auto; display: block; flex-shrink: 0; }
/* clamp() en vez de un salto brusco en un solo breakpoint: escala suave entre mobile y
   desktop. line-height apretado en el título grande (leading inverso al tamaño, más suelto
   en el texto de cuerpo) — ver skill apple-design, sección de tipografía. */
.hero h1 {
  color: var(--primary);
  font-size: clamp(24px, 4.2vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
  max-width: 680px;
}
.hero p.lead {
  color: var(--text-gray);
  font-size: clamp(13.5px, 2vw, 15px);
  line-height: 1.55;
  max-width: 560px;
  margin-bottom: 20px;
}
.feature-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid var(--border);
  color: var(--text-dark);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
}

/* Cards */
.card {
  background: white;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 8px 24px rgba(15,23,42,0.06);
  margin-bottom: 24px;
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
  overflow-x: auto;
}
@media (max-width: 480px) {
  .card { padding: 18px; border-radius: 12px; }
}
.card h2 { color: var(--primary); font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.card .card-subtitle { color: var(--text-gray); font-size: 13px; margin-bottom: 20px; }

/* Único lugar del sitio con <ul> sin clase (ver templates/como_usarlo.html) — el reset global
   `* { padding: 0 }` de arriba deja las listas sin sangría para sus viñetas, así que se ven
   desalineadas ahí y en ningún otro lado (el resto usa .field-table o .legal-ref-list, que ya
   trae su propio estilo). Mismo ritmo de espaciado que .legal-ref-list, sin tocarla. */
.card ul:not(.legal-ref-list) { padding-left: 20px; margin-bottom: 16px; }
.card ul:not(.legal-ref-list) li { margin-bottom: 6px; line-height: 1.6; color: var(--text-dark); }
.card ul:not(.legal-ref-list) li:last-child { margin-bottom: 0; }

.card-header-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.card-header-row h2 { margin-bottom: 4px; }

/* Cards que se auto-refrescan por htmx (polling y/o búsqueda/filtro/paginación) se reemplazan
   enteras (hx-swap outerHTML) — sin esto es un teleport instantáneo. Fade corto (categoría
   "tens of times/day" -> reducir al mínimo, no agregar delay). opacity no dispara reflow. */
.live-card { transition: opacity 120ms ease-out; }
.live-card.htmx-swapping, .live-card.htmx-settling { opacity: 0; }

/* Overlay de "trabajando" sobre una card mientras corre un envío síncrono (email + certificado
   + timestamp) que puede tardar varios segundos — sin esto el clic parece no haber hecho nada.
   Sigue el patrón "dim to focus" de materiales de Apple: la card se atenúa y un scrim
   traslúcido con blur se materializa encima (blur+scale juntos, no solo opacity) — ver skill
   apple-design, sección 12. Activado por static/loading-button.js vía data-loading-message. */
.card[data-busy] > *:not(.busy-overlay) {
  opacity: 0.35; filter: blur(1px); transition: opacity 200ms ease, filter 200ms ease;
  pointer-events: none;
}
.busy-overlay {
  position: absolute; inset: 0; z-index: 5; border-radius: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: rgba(255,255,255,0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transform: scale(0.98);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}
.card[data-busy] .busy-overlay { opacity: 1; transform: scale(1); }
.busy-overlay-spinner {
  width: 26px; height: 26px; margin-bottom: 6px;
  border: 3px solid var(--border); border-top-color: var(--brand);
  border-radius: 999px; animation: btn-spin 700ms linear infinite;
}
.busy-overlay-text { font-weight: 700; color: var(--text-dark); font-size: 14.5px; text-align: center; padding: 0 24px; }
.busy-overlay-sub { font-size: 12.5px; color: var(--text-gray); text-align: center; padding: 0 24px; }
@media (prefers-reduced-motion: reduce) {
  .busy-overlay-spinner { animation: btn-spin-pulse 900ms ease-in-out infinite; }
}

/* Destaca la fila recién creada al volver al dashboard tras un envío — sin esto la notificación
   nueva aparece confundida entre las demás, sin ninguna confirmación visual de "esto es lo que
   acabas de mandar". Fade de color (permitido incluso con prefers-reduced-motion: no es
   movimiento, solo color -> ver skill emil-design-eng, categoría accesibilidad). */
@keyframes row-flash { from { background-color: var(--brand-light); } to { background-color: transparent; } }
tr.row-flash td { animation: row-flash 1800ms ease-out both; }

/* Botones de acción (más protagonismo que los .action-link de las tablas) */
.action-button {
  display: inline-block; background: var(--bg); color: var(--text-dark);
  border: 1.5px solid var(--border); padding: 9px 16px; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: transform 140ms var(--ease-out), background-color 140ms ease, border-color 140ms ease;
}
.action-button:hover { text-decoration: none; border-color: var(--brand); background: var(--brand-light); }
.action-button:active { transform: scale(0.97); }
.action-button.primary-button { background: var(--primary); color: white; border-color: var(--primary); }
.action-button.primary-button:hover { background: #1e293b; }

/* Foco visible consistente (accesibilidad de teclado) en todos los elementos interactivos —
   antes solo .btn lo tenía. */
.action-button:focus-visible, button.primary:focus-visible, button.secondary:focus-visible,
.nav-links a:focus-visible, .nav-logout:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}

/* Botones de llamada a la acción (hero, CTAs de landing) */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 8px; font-weight: 700; font-size: 14.5px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 140ms var(--ease-out), background-color 140ms ease, border-color 140ms ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #1e293b; }
.btn-ghost { background: transparent; color: var(--text-dark); border-color: var(--border); }
.btn-ghost:hover { background: white; border-color: var(--primary); }
.btn-sm { padding: 10px 20px; font-weight: 600; font-size: 14px; }
.hero-cta-row { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Estadísticas del dashboard */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.stat-tile {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px;
}
.stat-tile .value {
  font-size: 26px; font-weight: 800; color: var(--primary); line-height: 1.2;
  font-variant-numeric: tabular-nums; /* los dígitos no bailan de ancho al cambiar */
}
.stat-tile .label { font-size: 11px; color: var(--text-gray); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 4px; }

.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.banner {
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13px;
}
.banner-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.banner-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.banner-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; font-weight: 600; }
.banner strong { font-weight: 700; }

/* Iconos de línea inline (reemplazan los emoji ✅❌⚠️📎🔗 sueltos — ver templates/_icons.html) */
.icon { vertical-align: -3px; flex-shrink: 0; }

/* Form */
label { display: block; font-size: 13px; color: #475569; margin-bottom: 5px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 16px; margin-bottom: 14px; font-family: inherit;
  color: var(--text-dark); background: white;
}
/* font-size 16px a propósito: por debajo de eso, Safari/iOS hace zoom automático al enfocar el input */
input:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
textarea { min-height: 110px; resize: vertical; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

/* Sub-pestañas dentro de una página (ej. envío individual: con/sin plantilla) — navegación por
   recarga completa, mismo criterio que el resto del portal (sin swaps de página vía htmx). */
.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.tab-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: 13.5px; font-weight: 600; color: var(--text-gray);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 150ms ease, border-color 150ms ease;
}
.tab-link:hover { text-decoration: none; color: var(--text-dark); }
.tab-link.active { color: var(--primary); border-bottom-color: var(--brand); }
.tab-badge {
  background: var(--brand-light); color: var(--brand-dark); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 999px;
}

.file-drop {
  display: block;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  color: var(--text-gray);
  font-size: 13px;
  margin-bottom: 14px;
  cursor: pointer;
  background: var(--bg);
  transition: border-color .15s, background .15s;
}
.file-drop:hover { border-color: var(--brand); background: var(--brand-light); }
.file-drop input[type=file] { display: none; }
#file-list { font-size: 12.5px; color: var(--text-dark); margin-top: 8px; text-align: left; }
#file-list div { padding: 2px 0; }

button.primary {
  background: var(--primary); color: white; border: none; padding: 13px 24px;
  border-radius: 9px; font-size: 14.5px; font-weight: 600; cursor: pointer;
  width: 100%; transition: transform 140ms var(--ease-out), background-color 140ms ease;
}
button.primary:hover { background: #1e293b; }
button.primary:active { transform: scale(0.98); }

select {
  padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 16px; font-family: inherit; color: var(--text-dark); background: white;
}

/* Estado de carga en botones de submit — el pipeline de envío/certificado corre síncrono
   (ver CLAUDE.md), así que el clic puede quedarse "mudo" varios segundos sin esto. El spinner
   gira (movimiento constante -> linear); bajo prefers-reduced-motion se cambia a un pulso de
   opacidad para no introducir rotación. Activado por static/loading-button.js. */
button.primary[data-loading], button.secondary[data-loading] {
  opacity: 0.75; cursor: progress; pointer-events: none;
}
.btn-spinner {
  display: inline-block; width: 14px; height: 14px; margin-right: 8px;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: currentColor;
  border-radius: 999px; vertical-align: -2px;
  animation: btn-spin 700ms linear infinite;
}
button.secondary .btn-spinner { border-color: rgba(0,107,187,0.25); border-top-color: currentColor; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation: btn-spin-pulse 900ms ease-in-out infinite; border-top-color: rgba(255,255,255,0.4); }
  @keyframes btn-spin-pulse { 50% { opacity: 0.3; } }
}
button.secondary {
  background: white; color: var(--brand); border: 1.5px solid var(--brand);
  padding: 9px 18px; border-radius: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 140ms ease;
}
button.secondary:hover { background: var(--brand-light); }
button.secondary:active { transform: scale(0.97); }

/* Filtros de la lista de notificaciones */
.filter-bar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.filter-bar input[type=text] { flex: 1; min-width: 180px; width: auto; margin-bottom: 0; }
.filter-bar select { flex-shrink: 0; }
.clear-filters { font-size: 13px; color: var(--text-gray); white-space: nowrap; }
@media (max-width: 480px) {
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar input[type=text], .filter-bar select, .filter-bar button.secondary { width: 100%; }
}

/* Paginación */
.pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13.5px;
}
.pagination a { font-weight: 600; }
.pagination .disabled { color: #cbd5e1; font-weight: 600; }
.pagination .page-info { color: var(--text-gray); }

/* Table */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 8px 8px; border-bottom: 2px solid var(--border);
  color: var(--text-gray); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
}
td {
  padding: 11px 8px; border-bottom: 1px solid #f1f5f9; vertical-align: middle;
  overflow-wrap: anywhere;
}
tr:hover td { background: var(--bg); }
a { color: var(--brand); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
.action-link { display: inline-block; padding: 6px 4px; }

/* Tablas -> tarjetas apiladas en mobile, para no depender de scroll horizontal */
@media (max-width: 640px) {
  table.responsive-table thead { display: none; }
  table.responsive-table, table.responsive-table tbody,
  table.responsive-table tr, table.responsive-table td { display: block; width: 100%; }
  table.responsive-table tr {
    border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; padding: 4px 12px;
  }
  table.responsive-table td {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 8px 0; border-bottom: 1px solid #f1f5f9; text-align: right;
  }
  table.responsive-table td:last-child { border-bottom: none; }
  table.responsive-table td::before {
    content: attr(data-label);
    font-weight: 700; color: var(--text-gray); font-size: 10.5px; text-transform: uppercase;
    letter-spacing: 0.05em; flex-shrink: 0; text-align: left;
  }
  table.responsive-table td.rt-no-label { justify-content: flex-end; flex-wrap: wrap; }
  table.responsive-table td.rt-no-label::before { content: none; }
}

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em; color: white;
}
.mono { font-family: 'SF Mono', Consolas, monospace; font-size: 12px; color: var(--text-gray); }
code { font-family: 'SF Mono', Consolas, monospace; font-size: 0.9em; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
.empty-state { text-align: center; color: var(--text-gray); padding: 40px 0; font-size: 13.5px; }

footer.site-footer {
  text-align: center; color: var(--text-gray); font-size: 12px; margin-top: 8px;
}
footer.site-footer a { color: var(--text-gray); text-decoration: underline; }

/* Nav */
.nav-links { display: flex; gap: 16px; margin-left: auto; flex-wrap: wrap; }
.nav-links a {
  color: var(--text-gray); font-size: 13.5px; font-weight: 600; text-decoration: none;
  padding-bottom: 2px; border-bottom: 2px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}
.nav-links a:hover { text-decoration: none; color: var(--primary); }
.nav-links a.active { color: var(--primary); border-bottom-color: var(--brand); }
.nav-user { color: var(--text-gray); font-size: 12.5px; align-self: center; }
.nav-logout {
  background: none; border: none; font-family: inherit; cursor: pointer;
  color: var(--text-gray); font-size: 13.5px; font-weight: 600;
  padding: 0; padding-bottom: 2px; border-bottom: 2px solid transparent;
  transition: color 150ms ease;
}
.nav-logout:hover { color: var(--primary); }

/* Desplegables de nav (Envíos / Documentación) — <details> nativo, sin JS: funciona igual con
   mouse, teclado y touch, y no necesita lógica de abrir/cerrar propia. */
.nav-dropdown { position: relative; }
.nav-dropdown summary {
  display: flex; align-items: center; gap: 3px; list-style: none; cursor: pointer;
  color: var(--text-gray); font-size: 13.5px; font-weight: 600;
  padding-bottom: 2px; border-bottom: 2px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::marker { content: ""; }
.nav-dropdown summary:hover { color: var(--primary); }
.nav-dropdown summary.active { color: var(--primary); border-bottom-color: var(--brand); }
.nav-dropdown summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.nav-dropdown summary svg { transition: transform 150ms ease; }
.nav-dropdown[open] summary svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 30; min-width: 180px;
  display: flex; flex-direction: column; gap: 1px; padding: 6px;
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 8px 24px rgba(15,23,42,0.1);
}
.nav-dropdown-menu a {
  padding: 8px 10px; border-radius: 6px; border-bottom: none;
}
.nav-dropdown-menu a:hover { background: var(--bg); text-decoration: none; }
.nav-dropdown-menu a.active { color: var(--brand); background: var(--brand-light); }
.brand-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px; width: 100%;
  flex-wrap: wrap; row-gap: 10px;
}
@media (max-width: 480px) {
  .nav-links { margin-left: 0; width: 100%; gap: 14px; }
}

/* API docs */
.endpoint-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.endpoint-path { overflow-wrap: anywhere; }
.method {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.03em;
  padding: 2px 8px; border-radius: 5px; color: white; min-width: 46px; text-align: center;
}
.method-get { background: #059669; }
.method-post { background: var(--brand); }
.endpoint-path { font-family: 'SF Mono', Consolas, monospace; font-size: 13.5px; color: var(--text-dark); font-weight: 600; }
.endpoint-desc { color: var(--text-gray); font-size: 13px; margin: 4px 0 18px; }

pre.code-block {
  background: #0f172a; color: #e2e8f0; padding: 16px 18px; border-radius: 10px;
  font-family: 'SF Mono', Consolas, monospace; font-size: 12.5px; line-height: 1.6;
  overflow-x: auto; margin: 10px 0 20px; white-space: pre;
}
pre.code-block .c1 { color: #94a3b8; } /* comentarios */
.docs-toc { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 4px; }
.docs-toc a { font-size: 13px; }
.field-table { width: 100%; font-size: 13px; margin-bottom: 6px; }
.field-table td { padding: 6px 8px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.field-table td:first-child { font-family: 'SF Mono', Consolas, monospace; font-weight: 600; white-space: nowrap; color: var(--brand-dark); }
@media (max-width: 480px) {
  .field-table tr { display: block; padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
  .field-table td { display: block; padding: 1px 0; border-bottom: none; }
  .field-table td:first-child { white-space: normal; font-family: inherit; color: var(--text-gray); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
}

/* Cómo funciona: FAQ (acordeón nativo, sin JS) */
.faq-item {
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px;
  overflow: hidden;
}
.faq-item summary {
  padding: 14px 16px; cursor: pointer; font-weight: 600; font-size: 14px;
  color: var(--text-dark); list-style: none; display: flex; justify-content: space-between;
  align-items: center; gap: 10px; background: var(--bg);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 18px; color: var(--text-gray); flex-shrink: 0; }
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-item .faq-body { padding: 14px 16px; font-size: 13.5px; color: var(--text-dark); line-height: 1.7; }
.faq-item .faq-body p { margin-bottom: 8px; }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* Referencias legales */
.legal-ref-list { list-style: none; }
.legal-ref-list li {
  padding: 12px 0; border-bottom: 1px solid #f1f5f9; display: flex; flex-direction: column; gap: 2px;
}
.legal-ref-list li:last-child { border-bottom: none; }
.legal-ref-list .ref-title { font-weight: 700; color: var(--text-dark); font-size: 13.5px; }
.legal-ref-list .ref-desc { color: var(--text-gray); font-size: 12.5px; }

.disclaimer-box {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 14px 16px;
  font-size: 12.5px; color: #92400e; line-height: 1.6; margin-top: 16px;
}

.compare-table td, .compare-table th { text-align: center; }

/* ============================================================
   Landing pública — piezas exclusivas de esta página (hero-badge, cadena de hash visual, grid
   de "tres formas de usarlo", lista de features editorial, franja de specs). El fondo claro +
   tipografía con carácter + acentos técnicos ya son la base compartida de TODA la app (ver
   sección "Hero / brand header" más arriba) — acá solo van los ajustes específicos de esta
   página (hero más alto por el visual de la cadena, título más grande) y los componentes que
   no existen en ningún otro template.
   ============================================================ */
body.landing .hero { padding-bottom: 64px; }
body.landing .hero h1 { font-size: clamp(28px, 5vw, 44px); max-width: 680px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: white; color: var(--text-dark);
  padding: 6px 14px 6px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  margin-bottom: 18px;
}
.hero-badge-dot {
  width: 7px; height: 7px; border-radius: 999px; background: var(--success); flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(5,150,105,0.15);
}

.btn-ink { background: var(--primary); color: white; }
.btn-ink:hover { background: #1e293b; }
.btn-ghost { background: transparent; color: var(--text-dark); border-color: var(--border); }
.btn-ghost:hover { background: white; border-color: var(--primary); }

/* Visual de la cadena de hash — motivo propio del producto (no una ilustración genérica de
   stock): cuatro nodos conectados representando creación -> envío -> entrega -> certificado. */
.hash-chain-visual { display: flex; align-items: center; margin-top: 48px; flex-wrap: wrap; }
.hash-node { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hash-node-dot { width: 14px; height: 14px; border-radius: 4px; background: white; border: 2px solid var(--primary); }
.hash-node-cert .hash-node-dot { background: var(--brand); border-color: var(--brand); }
.hash-node-label {
  font-family: 'SF Mono', Consolas, monospace; font-size: 11px; color: var(--text-gray);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.hash-link { width: 40px; height: 2px; background: var(--border); margin: 0 4px 22px; }
@media (max-width: 600px) {
  .hash-chain-visual { display: none; } /* se apila mal en mobile y no aporta ahí */
}

/* Grid "tres formas de usarlo" — las tres superficies reales del producto (API, portal, envío
   masivo), con divisores finos en vez de tres tarjetas idénticas con sombra. */
.ways-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border); border-radius: 16px;
  margin-top: -32px; position: relative; z-index: 1; background: white;
  box-shadow: 0 8px 24px rgba(15,23,42,0.06);
}
.way-col { padding: 28px 24px; border-right: 1px solid var(--border); }
.way-col:last-child { border-right: none; }
.way-label {
  display: flex; align-items: center; gap: 6px; font-family: 'SF Mono', Consolas, monospace;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--brand); margin-bottom: 10px;
}
.way-icon { font-size: 9px; }
.way-col h2 { color: var(--primary); font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.way-col p { color: var(--text-gray); font-size: 13.5px; line-height: 1.6; margin-bottom: 16px; }
.chip-cta { display: inline-block; font-size: 13px; font-weight: 700; color: var(--primary); }
.chip-cta:hover { color: var(--brand); }
@media (max-width: 720px) {
  .ways-grid { grid-template-columns: 1fr; margin-top: 24px; }
  .way-col { border-right: none; border-bottom: 1px solid var(--border); }
  .way-col:last-child { border-bottom: none; }
}

/* Lista de features editorial — números en monospace en vez de tarjetas con borde+sombra
   repetidas (el patrón "3 tarjetas iguales" que se ve en cualquier landing genérica de IA). */
.feature-list { margin-top: 56px; }
.feature-row { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 28px 0; border-top: 1px solid var(--border); }
.feature-row:last-child { border-bottom: 1px solid var(--border); }
.feature-num { font-family: 'SF Mono', Consolas, monospace; font-size: 13px; color: var(--text-gray); padding-top: 3px; }
.feature-row h2 { color: var(--primary); font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.feature-row p { color: var(--text-gray); font-size: 13.5px; line-height: 1.65; }
@media (max-width: 600px) {
  .feature-row { grid-template-columns: 32px 1fr; gap: 12px; padding: 20px 0; }
}

/* Franja de especificaciones técnicas */
.proof-strip {
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: center;
  padding: 24px 0; margin-top: 8px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.proof-item {
  display: flex; align-items: center; gap: 7px; font-family: 'SF Mono', Consolas, monospace;
  font-size: 12px; font-weight: 600; color: var(--text-gray); text-transform: uppercase; letter-spacing: 0.04em;
}
.proof-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--brand); flex-shrink: 0; }

.final-cta { text-align: center; margin-top: 40px; }
.final-cta h2 { font-size: 22px; }

/* Entrada de la landing pública — con nombre (fade + leve translateY, en cascada). Solo en
   /  (body.landing), no en .hero-inner en general: esa misma clase es el header compartido de
   TODAS las páginas (dashboard, login, enviar...), y no tiene sentido re-animar el header cada
   vez que un usuario logueado navega entre pantallas — solo aplica al primer vistazo público. */
@media (prefers-reduced-motion: no-preference) {
  body.landing .hero-inner > .brand-row { animation: hero-in 420ms var(--ease-out) both; }
  body.landing .hero-inner > .hero-badge { animation: hero-in 420ms var(--ease-out) 60ms both; }
  body.landing .hero-inner > h1 { animation: hero-in 420ms var(--ease-out) 120ms both; }
  body.landing .hero-inner > p.lead { animation: hero-in 420ms var(--ease-out) 180ms both; }
  body.landing .hero-inner > .hero-cta-row { animation: hero-in 420ms var(--ease-out) 240ms both; }
  body.landing .hero-inner > .hash-chain-visual { animation: hero-in 420ms var(--ease-out) 300ms both; }
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.compare-table td:first-child, .compare-table th:first-child { text-align: left; }
