:root {
  --help-green: #198754;
  --help-green-dark: #12653f;
  --help-navy: #0c1f3f;
  --help-slate: #4a5568;
  --help-border: #dbe3ec;
}

.help-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: var(--help-green);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(25, 135, 84, .32);
}
.help-btn:hover, .help-btn:focus-visible { background: var(--help-green-dark); outline: 3px solid rgba(25, 135, 84, .25); }
.login-context-help { position: fixed; top: 18px; right: 18px; z-index: 1090; }

.help-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 20, 40, .72);
}
.help-modal {
  width: min(860px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .35);
}
.help-modal-header { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--help-border); }
.help-modal-header h3 { margin: 0; color: var(--help-navy); font-size: 20px; }
.help-modal-header p { margin: 3px 0 0; color: var(--help-slate); font-size: 13px; }
.help-topic-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--help-green); color: #fff; font-weight: 800; }
.help-modal-close { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 8px; background: #eef2f6; font-size: 22px; cursor: pointer; }
.help-modal-tabs { display: flex; gap: 4px; padding: 12px 20px 0; border-bottom: 1px solid var(--help-border); }
.help-mtab { padding: 9px 16px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; background: transparent; color: var(--help-slate); font-weight: 650; cursor: pointer; }
.help-mtab.active { margin-bottom: -1px; background: #fff; border-color: var(--help-border); color: var(--help-green-dark); }
.help-modal-body { min-height: 320px; overflow: auto; padding: 22px 26px; }
.help-written-content { max-width: 760px; }
.help-written-content h4, .help-maneuver-guidance h4 { margin: 18px 0 5px; color: var(--help-navy); font-size: 15px; }
.help-instruction-list { margin: 0; padding-left: 24px; }
.help-instruction-list li { margin-bottom: 16px; padding-left: 5px; }
.help-instruction-list p { margin: 4px 0 0; color: var(--help-slate); line-height: 1.55; }
.help-demonstration video { width: 100%; max-height: 480px; background: #071326; }
.help-transcript { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--help-border); border-radius: 8px; }
.help-transcript p { margin: 8px 0 0; line-height: 1.55; }
.help-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--help-border); color: var(--help-slate); font-size: 12px; }
.help-ext-link { padding: 7px 14px; border: 1px solid var(--help-border); border-radius: 7px; background: #fff; cursor: pointer; }

@media (prefers-reduced-motion: reduce) { .help-btn, .help-modal, .help-modal-overlay { transition: none !important; animation: none !important; } }
@media (max-width: 640px) {
  .help-modal-overlay { padding: 6px; }
  .help-modal { width: 100%; max-height: 98vh; }
  .help-modal-tabs { overflow-x: auto; }
  .help-modal-body { padding: 18px; }
}
