/* ============================================================
   Lighthouse Portal : in-page help ("?")
   Same look and layout as the All is Well help (Classes, 29 Sep 2026),
   in Lighthouse purple. Flat colour, no gradients. Replaces /help/explainer.css.
   ============================================================ */
:root{
  --help-brand:#4C1D6B;--help-brand-deep:#2E1248;--help-accent:#6B2FA0;
  --help-tint:#F1ECF7;--help-tint-2:#E4D9F0;--help-line:#DDD3E8;--help-bg-off:#F7F4FA;
  --help-ink:#1A1426;--help-ink-soft:#475569;
  --warn:#C98A00;--bad:#B3261E;--ok:#1B6B3A;
  --help-font:'Outfit',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}

/* ---- the "?" button ---- */
.help-trigger{
  display:inline-flex;align-items:center;justify-content:center;
  width:22px;height:22px;margin-left:8px;border-radius:50%;
  background:var(--help-tint,#F1ECF7);color:var(--help-brand,#4C1D6B);
  border:1.5px solid var(--help-accent,#6B2FA0);
  font-family:var(--help-font);font-size:13px;font-weight:700;line-height:1;
  cursor:pointer;vertical-align:middle;user-select:none;
  transition:background .15s,transform .15s,border-color .15s;
}
h1 .help-trigger{width:26px;height:26px;font-size:15px;margin-left:10px;position:relative;top:-2px}
.help-trigger:hover{background:var(--help-brand,#4C1D6B);color:#fff;border-color:var(--help-brand,#4C1D6B);transform:scale(1.08)}
.help-trigger:focus-visible{outline:2px solid var(--help-brand,#4C1D6B);outline-offset:2px}

/* ---- the popup ---- */
.help-backdrop{
  position:fixed;inset:0;z-index:10200;  /* above the full-screen chart and Story windows (9990) */
  background:rgba(15,44,92,.35);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);
  display:flex;align-items:center;justify-content:center;padding:20px;
  animation:help-fade .18s ease-out;
}
@keyframes help-fade{from{opacity:0}to{opacity:1}}
.help-modal{
  background:#fff;border-radius:16px;border-top:4px solid var(--help-brand,#4C1D6B);
  width:100%;max-width:680px;max-height:86vh;overflow-y:auto;position:relative;
  box-shadow:0 18px 50px rgba(9,28,61,.28);
  animation:help-rise .22s ease-out;
}
@keyframes help-rise{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}
.help-head{
  position:sticky;top:0;z-index:1;background:#fff;
  display:flex;align-items:center;gap:12px;padding:18px 26px 14px;
  border-bottom:1px solid var(--help-line,#DDD3E8);
}
.help-head .help-icon{
  width:36px;height:36px;flex-shrink:0;border-radius:10px;
  background:var(--help-brand,#4C1D6B);color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:19px;font-weight:700;
}
.help-head h3{flex:1;margin:0;font-size:18px;font-weight:600;letter-spacing:-.01em;color:var(--help-ink,#1A1426);line-height:1.3}
.help-head .help-kicker{display:block;font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--help-ink-soft,#475569);margin-bottom:2px}
.help-close{
  width:32px;height:32px;border-radius:8px;flex-shrink:0;
  background:var(--help-tint,#F1ECF7);border:1px solid var(--help-line,#DDD3E8);
  color:var(--help-ink-soft,#475569);font-size:18px;font-weight:600;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.help-close:hover{background:var(--help-tint-2,#E4D9F0);color:var(--help-brand,#4C1D6B)}
.help-body{padding:18px 26px 24px;font-size:14.5px;line-height:1.65;color:var(--help-ink,#1A1426)}
.help-body h4{
  font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;
  color:var(--help-brand,#4C1D6B);margin:18px 0 6px;
}
.help-body h4:first-child{margin-top:0}
.help-body p{margin:0 0 10px}
.help-body ul,.help-body ol{margin:6px 0 12px 22px}
.help-body li{margin-bottom:5px}
.help-body strong,.help-body b{color:var(--help-ink,#1A1426);font-weight:600}
.help-body code{
  background:var(--help-tint,#F1ECF7);border:1px solid var(--help-line,#DDD3E8);
  padding:1px 6px;border-radius:4px;font-size:12.5px;color:var(--help-brand,#4C1D6B);
}
.help-body .help-callout{
  background:var(--help-tint,#F1ECF7);border-left:3px solid var(--help-brand,#4C1D6B);
  padding:10px 14px;border-radius:0 8px 8px 0;margin:12px 0;font-size:13.5px;
}
.help-body .help-callout.warn{background:#FBF4E6;border-left-color:var(--warn,#C98A00)}
.help-body .help-callout.danger{background:#FCEDEC;border-left-color:var(--bad,#B3261E)}
.help-body .help-callout.ok{background:#EAF6EE;border-left-color:var(--ok,#1B6B3A)}
.help-body table{width:100%;border-collapse:collapse;font-size:13.5px;margin:8px 0 14px}
.help-body th{background:var(--help-brand,#4C1D6B);color:#fff;text-align:left;padding:7px 10px;font-weight:600;font-size:12px;letter-spacing:.04em;text-transform:uppercase}
.help-body td{padding:7px 10px;border-bottom:1px solid var(--help-line,#DDD3E8);vertical-align:top}
.help-body .help-kbd{display:inline-block;border:1px solid var(--help-line);border-bottom-width:2px;border-radius:4px;padding:0 6px;font-size:12px;background:#fff}
.help-foot{
  display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;
  padding:14px 26px 18px;border-top:1px solid var(--help-line,#DDD3E8);background:var(--help-bg-off,#F7F4FA);
  font-size:13px;color:var(--help-ink-soft,#475569);
}
.help-foot a{color:var(--help-brand,#4C1D6B);font-weight:600;text-decoration:none}
.help-foot a:hover{text-decoration:underline}
.help-foot .help-manual-btn{
  display:inline-block;padding:8px 14px;border-radius:8px;background:var(--help-brand,#4C1D6B);color:#fff;font-weight:600;
}
.help-foot .help-manual-btn:hover{background:var(--help-brand-deep,#2E1248);text-decoration:none}

/* ---- floating "Help" button (bottom-right, every tab) ---- */
.help-fab{
  position:fixed;right:18px;bottom:18px;z-index:9000;
  display:inline-flex;align-items:center;gap:8px;
  padding:10px 16px;border-radius:8px;border:none;cursor:pointer;
  background:var(--help-brand,#4C1D6B);color:#fff;font-family:var(--help-font);font-size:14px;font-weight:600;
  box-shadow:0 8px 24px rgba(30,11,48,.30);
}
.help-fab:hover{background:var(--help-brand-deep,#2E1248)}
.help-fab .q{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#fff;color:var(--help-brand,#4C1D6B);font-weight:700;font-size:14px}
@media print{.help-trigger,.help-fab,.help-backdrop{display:none!important}}
@media (max-width:600px){
  .help-modal{border-radius:14px;max-height:92vh}
  .help-head{padding:14px 18px 12px}
  .help-body{padding:16px 18px 20px;font-size:14px}
  .help-fab{right:12px;bottom:12px;padding:9px 13px;font-size:13px}
}

/* ---- how-to videos inside the popup (help/videos.js, 28 Sep 2026) ---- */
.help-trigger{position:relative}
.help-trigger.has-video::after{
  content:"";position:absolute;right:-5px;bottom:-4px;width:12px;height:12px;border-radius:50%;
  background:var(--help-brand,#4C1D6B) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4.5 3.2v5.6L9 6z' fill='%23fff'/%3E%3C/svg%3E") center/100% no-repeat;
  border:1.5px solid #fff;box-sizing:content-box;
}
.help-video{margin:0 0 18px;border:1px solid var(--help-line,#DDD3E8);border-radius:10px;overflow:hidden;background:var(--help-bg-off,#F7F4FA)}
.help-vhead{display:flex;align-items:center;gap:9px;padding:9px 12px;font-size:13.5px}
.help-vhead b{flex:1;font-weight:600;color:var(--help-ink,#1A1426);line-height:1.3}
.help-vnote{font-size:11.5px;color:var(--help-ink-soft,#475569);white-space:nowrap}
.help-vplay{
  flex:none;display:inline-block;width:18px;height:18px;border-radius:50%;
  background:var(--help-brand,#4C1D6B) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4.5 3.2v5.6L9 6z' fill='%23fff'/%3E%3C/svg%3E") center/100% no-repeat;
}
.help-vframe{background:#1E0B30;aspect-ratio:16/9;line-height:0}
.help-vframe video{display:block;width:100%;height:100%;background:#1E0B30}
.help-vmore{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:10px 12px}
.help-vmore > span{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--help-ink-soft,#475569);margin-right:4px}
.help-vchip{
  display:inline-flex;align-items:center;gap:6px;padding:5px 10px 5px 6px;border-radius:6px;cursor:pointer;
  border:1px solid var(--help-line,#DDD3E8);background:#fff;color:var(--help-brand,#4C1D6B);
  font-family:var(--help-font);font-size:12.5px;font-weight:600;line-height:1.2;text-align:left;
}
.help-vchip .help-vplay{width:15px;height:15px;background-color:var(--help-accent,#6B2FA0)}
.help-vchip:hover{background:var(--help-tint,#F1ECF7)}
.help-vchip.on{border-color:var(--help-brand,#4C1D6B);background:var(--help-tint,#F1ECF7)}
.help-vchip.on .help-vplay{background-color:var(--help-brand,#4C1D6B)}


/* ---- additions for the Lighthouse Portal (React app) ---- */
/* an empty marker where there is no heading; help.js puts the "?" inside it */
.help-slot{display:inline-flex;align-items:center;vertical-align:middle}
.help-slot:empty{display:none}
/* corner placement inside a card that is itself a button (Command Center cards) */
.help-slot.corner{position:absolute;top:18px;right:18px;z-index:20}
.help-slot.corner .help-trigger{margin-left:0}
/* on dark headers and menus */
.help-slot.on-dark .help-trigger{background:rgba(255,255,255,.14);color:#fff;border-color:rgba(255,255,255,.55)}
.help-slot.on-dark .help-trigger:hover{background:#fff;color:var(--help-brand);border-color:#fff}
/* a number in a table cell that opens its explanation (Monthly Reports "Auto" lines) */
.help-cell{display:block;width:100%;background:transparent;border:0;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;cursor:help}
.help-cell:focus-visible{outline:2px solid var(--help-brand);outline-offset:2px}
/* the Help button sits bottom-right */
.help-fab{bottom:18px;right:18px}
.help-body .help-callout.tip{background:var(--help-tint)}
@media (max-width:600px){.help-fab{bottom:14px;right:14px}}
/* the portal loads Tailwind, which removes list bullets and numbers: put them back inside the pop-up */
.help-body ul{list-style:disc}
.help-body ol{list-style:decimal}
.help-body li::marker{color:var(--help-brand)}
/* the Help button is not shown on the sign-in screen (it has no help view) */
