/**
 * Estilos específicos de Calculadora de pendientes, rampas de accesibilidad y desniveles
 * Fijate Tools
 */

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Paleta cromática en tema claro */
  --bg-primary: #f8fafc;
  --bg-card: #ffffff;
  --bg-subcard: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #2563eb;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-accent: #2563eb;

  /* Colores de estado normativo y accesibilidad */
  --color-pass: #16a34a;
  --color-pass-bg: #dcfce7;
  --color-pass-border: #86efac;
  --color-warn: #d97706;
  --color-warn-bg: #fef3c7;
  --color-warn-border: #fcd34d;
  --color-fail: #dc2626;
  --color-fail-bg: #fee2e2;
  --color-fail-border: #fca5a5;
  --color-info: #0284c7;
  --color-info-bg: #e0f2fe;

  /* Canvas SVG interactivo */
  --svg-bg: #0b121e;
  --svg-ground: #1e293b;
  --svg-ramp: #38bdf8;
  --svg-ramp-fill: rgba(56, 189, 248, 0.15);
  --svg-landing: #f59e0b;
  --svg-height: #ef4444;
  --svg-dim-text: #e2e8f0;
  --svg-dim-line: #94a3b8;
  --svg-grid: rgba(255, 255, 255, 0.05);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

/* Tema oscuro */
[data-theme="dark"] {
  --bg-primary: #0b0f17;
  --bg-card: #131b2a;
  --bg-subcard: #1a2538;
  --bg-input: #0f172a;
  --border-color: #24324a;
  --border-focus: #60a5fa;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-accent: #38bdf8;

  --color-pass: #22c55e;
  --color-pass-bg: rgba(34, 197, 94, 0.15);
  --color-pass-border: rgba(34, 197, 94, 0.35);
  --color-warn: #f59e0b;
  --color-warn-bg: rgba(245, 158, 11, 0.15);
  --color-warn-border: rgba(245, 158, 11, 0.35);
  --color-fail: #ef4444;
  --color-fail-bg: rgba(239, 68, 68, 0.15);
  --color-fail-border: rgba(239, 68, 68, 0.35);
  --color-info: #38bdf8;
  --color-info-bg: rgba(56, 189, 248, 0.15);

  --svg-bg: #060911;
  --svg-ground: #162033;
  --svg-ramp: #38bdf8;
  --svg-ramp-fill: rgba(56, 189, 248, 0.2);
  --svg-landing: #fbbf24;
  --svg-height: #f87171;
  --svg-dim-text: #f1f5f9;
  --svg-dim-line: #64748b;
  --svg-grid: rgba(255, 255, 255, 0.04);
}

/* Estilos de contención canónicos */
body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mono {
  font-family: var(--font-mono);
}

.text-center {
  text-align: center;
}

.main-wrapper.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* Barra de herramientas / Presets rápidos */
.preset-toolbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.preset-header {
  margin-bottom: 0.5rem;
}

.preset-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.preset-buttons-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.preset-btn {
  background: var(--bg-subcard);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease-in-out;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
}

.preset-btn:hover {
  background: var(--border-color);
  color: var(--text-accent);
}

.preset-btn.active {
  background: var(--text-accent);
  color: #ffffff;
  border-color: var(--text-accent);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}

/* Tarjetas canónicas de sección */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

.card-header-styled {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-accent);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
  line-height: 1.25;
}

.btn-outline-sm {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 36px;
  transition: all 0.15s ease;
}

.btn-outline-sm:hover {
  background: var(--bg-subcard);
  color: var(--text-main);
  border-color: var(--text-muted);
}

/* Grid principal: formulario + KPIs */
.slope-calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .slope-calculator-grid {
    grid-template-columns: 1fr;
  }
}

/* Formularios y campos de entrada */
.form-group {
  margin-bottom: 1.15rem;
}

.input-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.label-with-unit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.label-with-unit .input-label {
  margin-bottom: 0;
}

.unit-toggle {
  display: inline-flex;
  background: var(--bg-subcard);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.unit-btn {
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.unit-btn.active {
  background: var(--text-accent);
  color: #ffffff;
}

.select-field {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: 44px;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 40px 0.5rem 0.85rem;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  box-sizing: border-box;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  appearance: none;
  -webkit-appearance: none;
}

.select-field:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input-with-addons {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-field {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  height: 44px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  padding: 0.5rem 0.85rem;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-field:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  z-index: 1;
}

.input-suffix {
  background: var(--bg-subcard);
  border: 1px solid var(--border-color);
  border-left: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 0 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 48px;
}

.field-hint {
  display: block;
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.35;
}

.range-slider {
  width: 100%;
  margin-top: 0.6rem;
  accent-color: var(--text-accent);
  height: 6px;
  cursor: pointer;
}

/* Stepper de peldaños */
.stepper-control {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 44px;
}

.btn-stepper {
  width: 48px;
  background: var(--bg-subcard);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.25rem;
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.btn-stepper:hover {
  background: var(--border-color);
}

#btn-step-minus {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  border-right: none;
}

#btn-step-plus {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-left: none;
}

.stepper-control .input-field {
  border-radius: 0;
}

/* Opciones de accesibilidad */
.accessibility-options-card {
  background: var(--bg-subcard);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

.options-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.75rem 0;
}

.custom-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.35;
}

.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-box {
  width: 18px;
  height: 18px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkbox-box {
  background: var(--text-accent);
  border-color: var(--text-accent);
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkbox-box::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.sub-option {
  margin-top: 0.85rem;
  margin-bottom: 0;
  padding-left: 1.75rem;
}

/* Botones de acción */
.action-buttons-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn-primary {
  flex: 1;
  background: var(--text-accent);
  color: #ffffff;
  border: none;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  transition: filter 0.15s ease, transform 0.1s ease;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}

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

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--bg-subcard);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: var(--border-color);
}

/* Bento Grid de Resultados */
.results-bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.bento-card {
  background: var(--bg-subcard);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.bento-card.bento-primary {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--bg-subcard) 0%, rgba(37, 99, 235, 0.08) 100%);
  border-color: rgba(37, 99, 235, 0.3);
}

.bento-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.bento-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bento-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--color-pass-bg);
  color: var(--color-pass);
  border: 1px solid var(--color-pass-border);
}

.bento-icon-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.bento-value-box {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.bento-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.bento-card.bento-primary .bento-number {
  font-size: 2.35rem;
  color: var(--text-accent);
}

.bento-unit {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
}

.bento-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.3;
}

/* Semáforo y Dictamen CTE DB-SUA 1 */
.cte-verdict-box {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-pass-border);
  background: var(--color-pass-bg);
  padding: 1.15rem;
  transition: all 0.2s ease;
}

.cte-verdict-box.verdict-pass {
  border-color: var(--color-pass-border);
  background: var(--color-pass-bg);
}

.cte-verdict-box.verdict-warn {
  border-color: var(--color-warn-border);
  background: var(--color-warn-bg);
}

.cte-verdict-box.verdict-fail {
  border-color: var(--color-fail-border);
  background: var(--color-fail-bg);
}

.verdict-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.verdict-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: var(--color-pass);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.cte-verdict-box.verdict-warn .verdict-icon-box {
  color: var(--color-warn);
}

.cte-verdict-box.verdict-fail .verdict-icon-box {
  color: var(--color-fail);
}

.verdict-title-box {
  flex: 1;
}

.verdict-heading {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.verdict-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.verdict-explanation {
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0 0 0.85rem 0;
  color: var(--text-main);
}

/* Checklist normativo */
.normative-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.8rem;
}

.check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.check-icon.status-pass {
  background: var(--color-pass-bg);
  color: var(--color-pass);
}

.check-icon.status-warn {
  background: var(--color-warn-bg);
  color: var(--color-warn);
}

.check-icon.status-fail {
  background: var(--color-fail-bg);
  color: var(--color-fail);
}

.check-icon.status-info {
  background: var(--color-info-bg);
  color: var(--color-info);
}

.check-info {
  display: flex;
  flex-direction: column;
}

.check-title {
  font-weight: 600;
  color: var(--text-main);
}

.check-detail {
  color: var(--text-muted);
  font-size: 0.775rem;
}

/* Diagrama SVG interactivo */
.slope-diagram-section {
  padding: 1.5rem;
}

.diagram-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.legend-item {
  font-size: 0.775rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.color-ramp {
  background: var(--svg-ramp);
}

.legend-dot.color-height {
  background: var(--svg-height);
}

.legend-dot.color-landing {
  background: var(--svg-landing);
}

.svg-diagram-wrapper {
  background: var(--svg-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  width: 100%;
  min-height: 280px;
  margin-bottom: 1rem;
}

.slope-canvas {
  width: 100%;
  height: auto;
  display: block;
}

.diagram-footer-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  background: var(--bg-subcard);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

@media (max-width: 650px) {
  .diagram-footer-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.diag-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.diag-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.diag-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Planificador de espacio y obra */
.section-intro-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.planner-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 850px) {
  .planner-options-grid {
    grid-template-columns: 1fr;
  }
}

.planner-card {
  background: var(--bg-subcard);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.planner-card.highlight {
  border-color: var(--text-accent);
  background: linear-gradient(180deg, var(--bg-subcard) 0%, rgba(37, 99, 235, 0.05) 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.planner-card-badge {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--border-color);
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.planner-card-badge.badge-popular {
  background: var(--text-accent);
  color: #ffffff;
}

.planner-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.planner-card-sub {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 0.85rem;
}

.planner-metric {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.planner-metric-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-accent);
}

.planner-metric-unit {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.planner-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 1rem 0;
  flex: 1;
}

.planner-details-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.78rem;
  border-top: 1px dashed var(--border-color);
  padding-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--text-main);
}

/* Guía técnica y formativa */
.guide-content-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-main);
}

.guide-content-text p {
  margin-top: 0;
  margin-bottom: 1.15rem;
}

.guide-subheading {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
  color: var(--text-main);
}

.guide-bullet-list {
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
}

.guide-bullet-list li {
  margin-bottom: 0.6rem;
}

.guide-content-text code {
  background: var(--bg-subcard);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  border: 1px solid var(--border-color);
}

/* Tablas técnicas */
.table-responsive-wrapper {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.technical-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.technical-table th,
.technical-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.technical-table th {
  background: var(--bg-subcard);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
}

.technical-table tr:last-child td {
  border-bottom: none;
}

.technical-table tr:hover td {
  background: var(--bg-subcard);
}

/* Acordeón FAQ */
.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.accordion-item.active {
  border-color: var(--text-accent);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  min-height: 44px;
}

.accordion-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  color: var(--text-muted);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
  color: var(--text-accent);
}

.accordion-content {
  padding: 0 1.25rem 1.25rem 1.25rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.accordion-content p {
  margin: 0;
}

/* Modal accesible (cero window.alert) */
.accessible-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 23, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.accessible-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-icon {
  color: var(--text-accent);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-close-modal:hover {
  background: var(--bg-subcard);
  color: var(--text-main);
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-main);
}

.modal-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  background: var(--bg-subcard);
}

/* Formato del texto preformateado en el modal de informe */
.report-preformatted {
  background: var(--bg-subcard);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-main);
  max-height: 380px;
  overflow-y: auto;
}

/* Estilos de impresión para informe pericial */
@media print {
  .app-header,
  .fijate-footer,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .preset-toolbar-card,
  .action-buttons-group,
  .modal-footer,
  .faq-accordion-card {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .tool-card {
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
}
