/* Guía de ayuda — Control de Velocidad */
:root {
  --help-max: 920px;
  --help-nav-w: 260px;
}

body.help-page {
  min-height: 100vh;
  background: var(--bg);
  overflow: auto;
}

.help-shell {
  display: grid;
  grid-template-columns: var(--help-nav-w) 1fr;
  min-height: 100vh;
}

.help-nav {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 16px 32px;
}

.help-nav .brand-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.help-nav .brand-mini h2 {
  margin: 0;
  font-size: 15px;
  color: var(--heading);
}

.help-nav .brand-mini p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.help-nav nav a {
  display: block;
  padding: 8px 10px;
  margin-bottom: 2px;
  border-radius: var(--r-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.35;
}

.help-nav nav a:hover {
  background: var(--surface-3);
  color: var(--primary);
}

.help-nav nav a.active {
  background: rgba(59, 130, 246, .12);
  color: var(--primary-700);
  font-weight: 600;
}

.help-nav .nav-group {
  margin-top: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 10px 6px;
}

.help-main {
  padding: 28px 36px 64px;
  max-width: calc(var(--help-max) + 72px);
}

.help-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.help-topbar h1 {
  margin: 0;
  font-size: 26px;
  color: var(--heading);
}

.help-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.help-section {
  scroll-margin-top: 24px;
  margin-bottom: 48px;
}

.help-section h2 {
  font-size: 20px;
  color: var(--heading);
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.help-section h3 {
  font-size: 16px;
  color: var(--primary-700);
  margin: 24px 0 8px;
}

.help-section p,
.help-section li {
  color: var(--text);
  line-height: 1.65;
}

.help-section ul,
.help-section ol {
  padding-left: 1.25rem;
  margin: 10px 0 16px;
}

.help-section li { margin-bottom: 6px; }

.help-lead {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 68ch;
}

.help-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}

.help-card.tip {
  border-left: 4px solid var(--accent);
  background: linear-gradient(90deg, rgba(59,130,246,.06), var(--surface));
}

.help-card.warn {
  border-left: 4px solid var(--warn);
  background: linear-gradient(90deg, rgba(217,119,6,.08), var(--surface));
}

.help-card strong { color: var(--heading); }

.help-figure {
  margin: 20px 0 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.help-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.help-figure figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

.help-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.help-steps li {
  counter-increment: step;
  position: relative;
  padding: 12px 12px 12px 48px;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.help-steps li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}

.help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.help-table th,
.help-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.help-table th {
  background: var(--surface-3);
  color: var(--heading);
  font-weight: 600;
}

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

.help-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.help-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.help-legend-item span.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
}

.help-legend-item span.dot.ok { background: #16a34a; }
.help-legend-item span.dot.warn { background: #eab308; }
.help-legend-item span.dot.bad { background: #dc2626; }
.help-legend-item span.dot.out { background: #94a3b8; }

@media (max-width: 960px) {
  .help-shell { grid-template-columns: 1fr; }
  .help-nav {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .help-main { padding: 20px 16px 48px; }
}

@media print {
  .help-nav, .help-actions { display: none; }
  .help-shell { display: block; }
  .help-figure { break-inside: avoid; }
}
