/* ── Synthology Shared Help System ─────────────────────────────────
   Served by Synthology.Shared.Web RCL at host root: /synth-help.css
   Consumed by: Router, VNA family x5, IPE, SRE, ME, SynthQMS.
   Styling intentionally inherits host CSS vars (--accent, --bg, --surface,
   --text, --muted, --border) so every product stays visually distinct.
─────────────────────────────────────────────────────────────────── */

/* Contextual ? button used inline next to labels */
.help-ctx-btn {
  display:inline-flex;align-items:center;justify-content:center;
  width:20px;height:20px;border-radius:50%;border:1.5px solid var(--accent);
  background:transparent;color:var(--accent);font-size:12px;font-weight:700;
  cursor:pointer;flex-shrink:0;transition:all .15s;line-height:1;
  font-family:'Segoe UI',system-ui,sans-serif;
}
.help-ctx-btn:hover { background:var(--accent);color:#fff; }

/* Main layout — two columns TOC + body */
.synth-help-layout { display:flex;gap:0;height:calc(100vh - 140px);min-height:500px; }
.synth-help-layout .help-toc {
  width:240px;flex-shrink:0;border-right:1px solid var(--border);
  overflow-y:auto;padding:12px 0;background:var(--surface);border-radius:8px 0 0 8px;
}
.synth-help-layout .help-toc-group {
  font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.8px;
  color:var(--muted);padding:10px 16px 4px;margin-top:6px;
}
.synth-help-layout .help-toc-item {
  display:block;padding:5px 16px 5px 24px;font-size:12px;color:var(--text);
  cursor:pointer;border-left:3px solid transparent;text-decoration:none;transition:all .12s;
}
.synth-help-layout .help-toc-item:hover { background:rgba(79,142,247,.08);color:var(--accent); }
.synth-help-layout .help-toc-item.active {
  border-left-color:var(--accent);color:var(--accent);
  background:rgba(79,142,247,.1);font-weight:600;
}
.synth-help-layout .help-body {
  flex:1;overflow-y:auto;padding:24px 32px;background:var(--bg);border-radius:0 8px 8px 0;
}

/* Overview card grid */
.synth-help-layout .help-cards {
  display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px;margin-top:8px;
}
.synth-help-layout .help-card {
  background:var(--surface);border:1px solid var(--border);border-radius:8px;
  padding:16px 18px;cursor:pointer;transition:all .15s;position:relative;
}
.synth-help-layout .help-card:hover {
  border-color:var(--accent);transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,.15);
}
.synth-help-layout .help-card h3 { font-size:14px;font-weight:700;margin:0 0 6px;color:var(--text); }
.synth-help-layout .help-card p { font-size:12px;line-height:1.5;color:var(--muted);margin:0 0 10px; }
.synth-help-layout .help-card-link { font-size:11px;color:var(--accent);font-weight:600;text-decoration:none; }
.synth-help-layout .help-card-icon { position:absolute;top:14px;right:16px;font-size:20px;opacity:.5; }
.synth-help-layout .help-card-origin {
  position:absolute;bottom:8px;right:10px;font-size:9px;color:var(--muted);
  text-transform:uppercase;letter-spacing:.5px;opacity:.55;
}
.synth-help-layout .help-group-hdr {
  font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:1px;
  color:var(--accent);margin:20px 0 8px;padding-bottom:6px;border-bottom:1px solid var(--border);
}
.synth-help-layout .help-group-hdr:first-child { margin-top:0; }

/* Detail view */
.synth-help-layout .help-detail { animation:synthHelpFadeIn .2s ease; }
@keyframes synthHelpFadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
.synth-help-layout .help-breadcrumb {
  font-size:11px;color:var(--muted);margin-bottom:16px;display:flex;align-items:center;gap:6px;
}
.synth-help-layout .help-breadcrumb a { color:var(--accent);text-decoration:none;cursor:pointer; }
.synth-help-layout .help-breadcrumb a:hover { text-decoration:underline; }
.synth-help-layout .help-detail-title {
  font-size:22px;font-weight:700;color:var(--text);margin:0 0 4px;
}
.synth-help-layout .help-detail-subtitle { font-size:12px;color:var(--muted);margin-bottom:20px; }
.synth-help-layout .help-detail h3 {
  font-size:15px;font-weight:700;margin:22px 0 8px;color:var(--accent);
  padding-bottom:4px;border-bottom:1px solid rgba(79,142,247,.15);
}
.synth-help-layout .help-detail p { font-size:13px;line-height:1.7;color:var(--text);margin:0 0 12px; }
.synth-help-layout .help-detail ul,
.synth-help-layout .help-detail ol { margin:8px 0 14px 20px;padding:0; }
.synth-help-layout .help-detail li { font-size:13px;line-height:1.65;color:var(--text);margin-bottom:5px; }
.synth-help-layout .help-detail code {
  background:rgba(79,142,247,.1);padding:1px 5px;border-radius:3px;font-size:11px;color:var(--accent);
}
.synth-help-layout .help-tip {
  background:rgba(79,142,247,.06);border-left:3px solid var(--accent);
  padding:10px 14px;border-radius:0 5px 5px 0;margin:14px 0;font-size:12px;color:var(--text);line-height:1.6;
}
.synth-help-layout .help-warn {
  background:rgba(245,158,11,.06);border-left:3px solid #F59E0B;
  padding:10px 14px;border-radius:0 5px 5px 0;margin:14px 0;font-size:12px;color:var(--text);line-height:1.6;
}
.synth-help-layout .help-reg {
  background:rgba(239,68,68,.06);border-left:3px solid #EF4444;
  padding:10px 14px;border-radius:0 5px 5px 0;margin:14px 0;font-size:12px;color:var(--text);line-height:1.6;
}
.synth-help-layout .help-reg strong { color:#EF4444; }
.synth-help-layout .help-step-list { counter-reset:synthhelpstep;list-style:none;margin:12px 0 16px;padding:0; }
.synth-help-layout .help-step-list li {
  counter-increment:synthhelpstep;position:relative;padding:10px 12px 10px 44px;margin-bottom:8px;
  background:var(--surface);border:1px solid var(--border);border-radius:6px;
  font-size:12px;line-height:1.6;color:var(--text);
}
.synth-help-layout .help-step-list li::before {
  content:counter(synthhelpstep);position:absolute;left:12px;top:10px;
  width:22px;height:22px;border-radius:50%;background:var(--accent);color:#fff;
  font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;
}
.synth-help-layout .help-cfg-table { width:100%;border-collapse:collapse;margin:12px 0 16px;font-size:12px; }
.synth-help-layout .help-cfg-table th {
  text-align:left;padding:8px 12px;background:var(--surface);
  border:1px solid var(--border);font-weight:700;color:var(--accent);font-size:11px;text-transform:uppercase;
}
.synth-help-layout .help-cfg-table td { padding:8px 12px;border:1px solid var(--border);color:var(--text);vertical-align:top; }
.synth-help-layout .help-cfg-table tr:hover td { background:rgba(79,142,247,.03); }
.synth-help-layout .help-diagram {
  margin:16px 0;padding:20px;background:var(--surface);border:1px solid var(--border);
  border-radius:8px;text-align:center;overflow-x:auto;
}
.synth-help-layout .help-diagram svg { max-width:100%; }
.synth-help-layout .help-related { margin-top:24px;padding-top:16px;border-top:1px solid var(--border); }
.synth-help-layout .help-related-title {
  font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;margin-bottom:8px;
}
.synth-help-layout .help-related a {
  display:inline-block;padding:4px 12px;margin:3px 4px 3px 0;font-size:12px;
  background:var(--surface);border:1px solid var(--border);border-radius:16px;
  color:var(--accent);text-decoration:none;cursor:pointer;transition:all .12s;
}
.synth-help-layout .help-related a:hover { border-color:var(--accent);background:rgba(79,142,247,.08); }
.synth-help-layout .help-back-btn {
  display:inline-flex;align-items:center;gap:4px;padding:6px 14px;font-size:12px;
  background:var(--surface);border:1px solid var(--border);border-radius:6px;
  color:var(--accent);cursor:pointer;transition:all .12s;margin-bottom:16px;
}
.synth-help-layout .help-back-btn:hover { border-color:var(--accent);background:rgba(79,142,247,.08); }

/* License badge shown in detail view header */
.synth-help-layout .help-license-badge {
  margin-bottom:16px;padding:8px 12px;background:rgba(139,92,246,.08);
  border:1px solid rgba(139,92,246,.2);border-radius:6px;font-size:11px;
  display:flex;align-items:center;gap:8px;
}
.synth-help-layout .help-license-badge strong { color:#8B5CF6; }

/* Source stamp at bottom of each detail article */
.synth-help-layout .help-source-stamp {
  margin-top:20px;padding-top:12px;border-top:1px dashed var(--border);
  font-size:10px;color:var(--muted);letter-spacing:.3px;
}
.synth-help-layout .help-source-stamp code {
  background:transparent;color:var(--muted);padding:0;font-size:10px;
}

/* Load-bearing badge — shown in-place on regulatory-posture topics */
.synth-help-layout .help-loadbearing-badge {
  display:inline-block;padding:2px 7px;margin-left:8px;font-size:9px;font-weight:700;
  text-transform:uppercase;letter-spacing:.5px;
  background:rgba(239,68,68,.12);color:#EF4444;border:1px solid rgba(239,68,68,.3);
  border-radius:3px;vertical-align:middle;
}

/* Search box */
.synth-help-layout #help-search {
  width:100%;padding:8px 12px 8px 32px;font-size:12px;border:1px solid var(--border);
  border-radius:6px;background:var(--bg);color:var(--text);box-sizing:border-box;
}
.synth-help-layout #help-search:focus { outline:none;border-color:var(--accent); }
.synth-help-layout .help-search-wrap { position:relative;padding:8px 14px;border-bottom:1px solid var(--border); }
.synth-help-layout .help-search-wrap::before {
  content:'🔍';position:absolute;left:22px;top:50%;transform:translateY(-50%);font-size:12px;
}

/* Responsive — stack on narrow */
@media (max-width:900px) {
  .synth-help-layout { flex-direction:column;height:auto; }
  .synth-help-layout .help-toc { width:100%;max-height:200px;border-right:none;border-bottom:1px solid var(--border); }
  .synth-help-layout .help-body { padding:16px; }
  .synth-help-layout .help-cards { grid-template-columns:1fr; }
}
