/**
 * BIM Documentation Builder (/app/herramientas/documentacion-bim) — diseño editorial (oct 2026).
 * El lenguaje de la home nueva sobre fondo blanco: Syne en títulos, Inter en texto, etiquetas y
 * botones; filetes cálidos en vez de sombras; primario durazno en píldora.
 * Va después de module.css: allí todo es de una clase, aquí se antepone body.bdb-body.
 * Tokens --rx-* en assets/css/rum_shell_editorial.css (los carga navbar.php; con fallback si no hay shell).
 */

html:has(body.bdb-body) { background: #ffffff; }
body.bdb-body {
  --surface-soft: var(--rx-paper-2, #FAF7F3);
  --border: var(--rx-rule, #ECE4DA);
  --text: var(--rx-ink, #1C1F26);
  --muted: #6B7079;
  --primary: var(--rx-peach, #F3D2B2);
  --shadow: none;
  background: #ffffff;
  color: var(--rx-ink, #1C1F26);
  font-family: var(--rx-f-sans, "Inter", system-ui, sans-serif);
}
body.bdb-body .bdb-world { display: none; }

/* ---------- Títulos ---------- */
body.bdb-body h1,
body.bdb-body h2,
body.bdb-body h3 {
  font-family: var(--rx-f-display, "Syne", "Inter", sans-serif);
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--rx-ink, #1C1F26);
}
body.bdb-body .eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--rx-terracotta, #B8784C);
}
body.bdb-body .muted,
body.bdb-body .page-header .muted,
body.bdb-body .card .muted,
body.bdb-body .compact-list { color: #6B7079; }

/* ---------- Encabezado de página: sin caja, título grande y un filete ---------- */
body.bdb-body .bdb-page { padding-top: clamp(28px, 4vw, 56px); }
body.bdb-body .bdb-hero {
  margin: 0 0 8px;
  padding: 0 0 26px;
  border: 0;
  border-bottom: 1px solid var(--rx-rule, #ECE4DA);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
body.bdb-body .bdb-hero h1 {
  font-weight: 400;
  font-size: clamp(34px, 4vw, 56px);
  line-height: .98;
  letter-spacing: -.025em;
}
body.bdb-body .bdb-hero__copy { color: #6B7079; font-size: 15px; line-height: 1.6; max-width: 680px; }
body.bdb-body .bdb-hero__actions .button { min-width: 0; }

/* ---------- Tarjetas: filete cálido, sin sombra ---------- */
body.bdb-body .card {
  background: #ffffff;
  border: 1px solid var(--rx-rule, #ECE4DA);
  border-radius: 10px;
  box-shadow: none;
  backdrop-filter: none;
  padding: 24px;
}
body.bdb-body .card h3,
body.bdb-body .page-header h2 { font-size: 20px; }
body.bdb-body .option-card {
  background: #ffffff;
  border: 1px solid var(--rx-rule, #ECE4DA);
  border-radius: 10px;
}

/* Etiquetas de estado */
body.bdb-body .badge,
body.bdb-body .pill {
  padding: 5px 12px;
  background: transparent;
  border: 1px solid var(--rx-rule-strong, #DDD1C3);
  color: var(--rx-terracotta, #B8784C);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---------- Tabla ---------- */
body.bdb-body .table th {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8A8F98;
}
body.bdb-body .table th,
body.bdb-body .table td { border-bottom: 1px solid var(--rx-rule, #ECE4DA); }
body.bdb-body .table tbody tr:hover td { background: var(--rx-paper-2, #FAF7F3); }
body.bdb-body a,
body.bdb-body .table td a { color: var(--rx-ink, #1C1F26); text-decoration-color: var(--rx-terracotta, #B8784C); text-underline-offset: 3px; }

/* ---------- Campos ---------- */
body.bdb-body input[type="text"],
body.bdb-body input[type="date"],
body.bdb-body input[type="number"],
body.bdb-body textarea,
body.bdb-body select {
  border: 1px solid var(--rx-rule-strong, #DDD1C3);
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 14px;
  background: #ffffff;
  color: var(--rx-ink, #1C1F26);
  transition: border-color .2s ease;
}
body.bdb-body input:focus,
body.bdb-body textarea:focus,
body.bdb-body select:focus { border-color: var(--rx-ink, #1C1F26); outline: none; }
body.bdb-body input::placeholder,
body.bdb-body textarea::placeholder { color: #A3A7AE; }
body.bdb-body .form-grid label,
body.bdb-body .question-block { font-size: 13px; color: #4A4F5A; }
body.bdb-body .bdb-project-switcher select { background: #ffffff; }

/* ---------- Botones: píldora Inter en versalitas ---------- */
body.bdb-body .button {
  font-family: var(--rx-f-sans, "Inter", sans-serif);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 20px;
  box-shadow: none;
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}
body.bdb-body .button:hover { transform: none; box-shadow: none; }
body.bdb-body .button.primary {
  background: var(--rx-peach, #F3D2B2);
  border: 1px solid var(--rx-peach, #F3D2B2);
  color: var(--rx-ink, #1C1F26);
}
body.bdb-body .button.primary:hover { background: var(--rx-peach-2, #EEBF95); border-color: var(--rx-peach-2, #EEBF95); }
body.bdb-body .button.secondary {
  background: transparent;
  border: 1px solid var(--rx-rule-strong, #DDD1C3);
  color: var(--rx-ink, #1C1F26);
}
body.bdb-body .button.secondary:hover { border-color: var(--rx-ink, #1C1F26); }
body.bdb-body .button.small { min-height: 32px; padding: 0 14px; font-size: 10.5px; }

/* ---------- Asistente por pasos ---------- */
body.bdb-body .wizard-rail {
  background: #ffffff;
  border: 1px solid var(--rx-rule, #ECE4DA);
  border-radius: 10px;
}
body.bdb-body .wizard-rail-item { border: 1px solid var(--rx-rule, #ECE4DA); border-radius: 8px; }
body.bdb-body .wizard-rail-item.is-active { border-color: var(--rx-ink, #1C1F26); box-shadow: none; }
body.bdb-body .wizard-rail-item.is-done { border-color: var(--rx-rule-strong, #DDD1C3); background: var(--rx-paper-2, #FAF7F3); }
body.bdb-body .wizard-rail-index {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #6B7079;
  background: #ffffff;
  border: 1px solid var(--rx-rule-strong, #DDD1C3);
}
body.bdb-body .wizard-rail-item.is-active .wizard-rail-index { background: var(--rx-ink, #1C1F26); border-color: var(--rx-ink, #1C1F26); color: #ffffff; }
body.bdb-body .wizard-rail-item.is-done .wizard-rail-index { background: var(--rx-peach, #F3D2B2); border-color: var(--rx-peach, #F3D2B2); color: var(--rx-ink, #1C1F26); }
body.bdb-body .wizard-rail-copy strong { color: var(--rx-ink, #1C1F26); font-weight: 600; }
body.bdb-body .wizard-rail-copy small { color: #8A8F98; }
body.bdb-body .wizard-step-header { border-bottom-color: var(--rx-rule, #ECE4DA); }
body.bdb-body .wizard-step-hint {
  border-left: 3px solid var(--rx-peach, #F3D2B2);
  background: var(--rx-paper-2, #FAF7F3);
  color: #4A4F5A;
}
body.bdb-body .progress-bar { background: var(--rx-rule, #ECE4DA); height: 6px; }
body.bdb-body .progress-bar span { background: var(--rx-ink, #1C1F26); }
body.bdb-body .section-editor { border-top: 1px solid var(--rx-rule, #ECE4DA); }
body.bdb-body .sticky-actions { background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 40%); }

/* Validaciones: color sólo en el filete */
body.bdb-body .validation-list li { background: var(--rx-paper-2, #FAF7F3); border-left-width: 3px; border-radius: 8px; }
body.bdb-body .validation-list .severity-warning { background: var(--rx-paper-2, #FAF7F3); border-left-color: #C98A2E; }
body.bdb-body .validation-list .severity-critical { background: var(--rx-paper-2, #FAF7F3); border-left-color: #B4483C; }
body.bdb-body .validation-list .severity-info { border-left-color: var(--rx-rule-strong, #DDD1C3); }
body.bdb-body .error-text { color: #B4483C; }
body.bdb-body code { background: var(--rx-paper-2, #FAF7F3); border: 1px solid var(--rx-rule, #ECE4DA); }

/* Barra y pie propios (sólo cuando no carga el shell global) */
body.bdb-body .bdb-topbar { background: #ffffff; border-bottom: 1px solid var(--rx-rule, #ECE4DA); box-shadow: none; }
body.bdb-body .bdb-topbar__brand { font-family: var(--rx-f-logo, "Baloo 2", sans-serif); color: var(--rx-ink, #1C1F26); }
body.bdb-body .bdb-topbar a { color: var(--rx-ink, #1C1F26); }

/* Etiquetas y botones en un solo renglón */
body.bdb-body .button,
body.bdb-body .badge,
body.bdb-body .pill { white-space: nowrap; }
