/* ==============================================================================
   HMI V3 HELP & TECHNICAL DOCUMENTATION VIEWER STYLES
   High-contrast, industrial theme compatible with Dark & Light (Xylem) modes
   ============================================================================== */

/* Base Layout Container */
.help-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  height: calc(100vh - 54px);
  overflow: hidden;
  background: var(--bg-app, #0b0f19);
  color: var(--text-main, #e2e8f0);
}

/* ==============================================================================
   1. LEFT SIDEBAR: DOCUMENT CATALOG & SEARCH
   ============================================================================== */
.help-sidebar {
  border-right: 1px solid var(--border-color, #1e293b);
  background: var(--bg-panel, #0f172a);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.help-sidebar-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color, #1e293b);
  background: var(--bg-header, #1e293b);
}

.help-search-input {
  width: 100%;
  padding: 9px 13px;
  background: var(--bg-app, #0b0f19);
  border: 1px solid var(--border-color, #334155);
  border-radius: 6px;
  color: var(--text-main, #f8fafc);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.help-search-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25);
}

.help-cat-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color, #1e293b);
  background: var(--bg-panel, #0f172a);
  scrollbar-width: none;
}

.help-cat-chips::-webkit-scrollbar {
  display: none;
}

.help-chip {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 12px;
  background: var(--bg-app, #0b0f19);
  color: var(--text-label, #94a3b8);
  border: 1px solid var(--border-color, #334155);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.help-chip:hover {
  border-color: #0284c7;
  color: var(--text-main, #f8fafc);
}

.help-chip.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

.help-doc-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.help-doc-item {
  padding: 11px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  border: 1px solid var(--border-color, #1e293b);
  background: var(--bg-app, #0b0f19);
  transition: all 0.15s ease;
}

.help-doc-item:hover {
  border-color: #0284c7;
  transform: translateX(3px);
  background: rgba(2, 132, 199, 0.08);
}

.help-doc-item.active {
  background: rgba(2, 132, 199, 0.16);
  border-color: #0284c7;
  box-shadow: inset 3px 0 0 #0284c7;
}

.help-doc-category-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #38bdf8;
  letter-spacing: 0.6px;
  display: block;
  margin-bottom: 4px;
}

.help-doc-item-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  line-height: 1.35;
  display: block;
}

.help-doc-item-desc {
  font-size: 11px;
  color: var(--text-label, #94a3b8);
  margin-top: 4px;
  display: block;
  line-height: 1.35;
}

/* ==============================================================================
   2. RIGHT PANE: DOCUMENT VIEWER & TOOLBAR
   ============================================================================== */
.help-content-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-app, #0b0f19);
}

.help-content-toolbar {
  padding: 10px 24px;
  border-bottom: 1px solid var(--border-color, #1e293b);
  background: var(--bg-panel, #0f172a);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.help-breadcrumb {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-label, #94a3b8);
}

.help-breadcrumb span {
  color: #38bdf8;
}

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

.help-btn {
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
  background: var(--bg-app, #0b0f19);
  color: var(--text-main, #f8fafc);
  border: 1px solid var(--border-color, #334155);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.help-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.help-article-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 28px 36px 80px 36px;
}

/* ==============================================================================
   3. MARKDOWN ARTICLE BODY (TYPOGRAPHY & CONTENT)
   ============================================================================== */
.help-markdown-body {
  max-width: 980px;
  margin: 0 auto;
  color: var(--text-main, #e2e8f0);
  line-height: 1.7;
  font-size: 14px;
}

.help-markdown-body h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main, #f8fafc);
  border-bottom: 2.5px solid #0284c7;
  padding-bottom: 10px;
  margin-top: 0;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

.help-markdown-body h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main, #f8fafc);
  border-left: 4px solid #0284c7;
  padding-left: 12px;
  margin-top: 30px;
  margin-bottom: 14px;
  letter-spacing: -0.2px;
}

.help-markdown-body h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  margin-top: 22px;
  margin-bottom: 10px;
}

.help-markdown-body h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  margin-top: 18px;
  margin-bottom: 8px;
}

.help-markdown-body p {
  margin-bottom: 14px;
  color: var(--text-main, #e2e8f0);
}

.help-markdown-body strong {
  font-weight: 800;
  color: var(--text-main, #ffffff);
}

.help-markdown-body em {
  font-style: italic;
  color: var(--text-label, #cbd5e1);
}

.help-markdown-body ul, .help-markdown-body ol {
  padding-left: 26px;
  margin-bottom: 16px;
}

.help-markdown-body li {
  margin-bottom: 6px;
  color: var(--text-main, #e2e8f0);
}

.help-markdown-body hr {
  border: 0;
  border-top: 1px solid var(--border-color, #334155);
  margin: 24px 0;
}

.help-markdown-body blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  border-left: 4px solid #0284c7;
  background: rgba(2, 132, 199, 0.1);
  border-radius: 0 6px 6px 0;
  color: #bae6fd;
  font-size: 13.5px;
  line-height: 1.6;
}

.help-markdown-body blockquote p {
  margin-bottom: 0;
}

/* Pre & Code blocks */
.help-markdown-body pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px 18px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  border: 1px solid #334155;
  margin: 16px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.help-markdown-body code {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 12px;
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.help-markdown-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border: none;
  font-size: inherit;
}

/* ==============================================================================
   4. RESPONSIVE GFM TABLES (100% PARSED)
   ============================================================================== */
.help-table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0 28px 0;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.help-table-responsive table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.help-table-responsive th {
  background: #1e293b;
  color: #f8fafc !important;
  font-weight: 800;
  padding: 12px 16px;
  border-bottom: 2px solid #475569;
  border-right: 1px solid #334155;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.help-table-responsive th:last-child {
  border-right: none;
}

.help-table-responsive td {
  padding: 10px 16px;
  border-bottom: 1px solid #1e293b;
  border-right: 1px solid #1e293b;
  color: #cbd5e1;
  line-height: 1.55;
}

.help-table-responsive td:last-child {
  border-right: none;
}

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

.help-table-responsive tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.help-table-responsive tr:hover td {
  background: rgba(2, 132, 199, 0.08);
}

/* ==============================================================================
   5. ARCHIFY INTERACTIVE DIAGRAMS
   ============================================================================== */
.archify-diagram-card {
  margin: 26px 0 32px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #334155;
  background: #0f172a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.archify-diagram-card:hover {
  border-color: #0284c7;
  box-shadow: 0 12px 32px rgba(2, 132, 199, 0.25);
}

.archify-diagram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  flex-wrap: wrap;
  gap: 10px;
}

.archify-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 220px;
}

.archify-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.archify-diagram-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.4;
}

.archify-fullscreen-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.4);
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.archify-fullscreen-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: translateY(-1px);
}

.archify-iframe-wrapper {
  position: relative;
  width: 100%;
  height: 540px;
  background: #0b0f19;
}

.archify-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Collapsible Details for Classic ASCII Schematics */
.help-markdown-body details {
  margin: 16px 0 24px 0;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed #334155;
}

.help-markdown-body details summary {
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}

.help-markdown-body details summary:hover {
  color: #7dd3fc;
}

.help-markdown-body details[open] summary {
  margin-bottom: 12px;
  border-bottom: 1px dashed #334155;
  padding-bottom: 8px;
}

/* ==============================================================================
   6. KATEX & MATHEMATICAL FORMULAS (DISPLAY & INLINE)
   ============================================================================== */
.help-math-block,
.katex-display,
.math-display {
  display: block;
  margin: 18px 0;
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 8px;
  overflow-x: auto;
  text-align: center;
  font-family: 'KaTeX_Main', 'Cambria Math', 'Times New Roman', serif;
  font-size: 1.15em;
  color: #f8fafc;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.help-math-inline,
.katex,
.math-inline {
  font-family: 'KaTeX_Main', 'Cambria Math', 'Times New Roman', serif;
  font-size: 1.05em;
  color: #38bdf8;
  padding: 0 2px;
}

.math-frac {
  display: inline-flex;
  flex-direction: column;
  vertical-align: middle;
  text-align: center;
  margin: 0 3px;
  font-size: 0.9em;
  line-height: 1.1;
}

.math-num {
  display: block;
  border-bottom: 1.5px solid currentColor;
  padding: 1px 4px 2px 4px;
  text-align: center;
}

.math-den {
  display: block;
  padding: 2px 4px 1px 4px;
  text-align: center;
}

.math-text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-style: normal;
  font-size: 0.9em;
  padding: 0 2px;
}

.math-sqrt {
  display: inline-flex;
  align-items: center;
  margin: 0 2px;
}

.math-radicand {
  border-top: 1.2px solid currentColor;
  padding-top: 1px;
  margin-left: 1px;
}

.help-markdown-body sub,
.math-display sub,
.math-inline sub {
  font-size: 0.72em;
  vertical-align: sub;
  line-height: 0;
}

.help-markdown-body sup,
.math-display sup,
.math-inline sup {
  font-size: 0.72em;
  vertical-align: super;
  line-height: 0;
}

/* ==============================================================================
   7. EXPLICIT LIGHT MODE OVERRIDES
   Matches [data-theme="xylem-light"], [data-theme="light"], and .light-theme
   ============================================================================== */
[data-theme="xylem-light"] .help-layout,
[data-theme="light"] .help-layout,
body.light-theme .help-layout {
  background: #f8fafc;
  color: #0f172a;
}

[data-theme="xylem-light"] .help-sidebar,
[data-theme="light"] .help-sidebar,
body.light-theme .help-sidebar {
  background: #ffffff;
  border-right-color: #cbd5e1;
}

[data-theme="xylem-light"] .help-sidebar-header,
[data-theme="light"] .help-sidebar-header,
body.light-theme .help-sidebar-header {
  background: #f1f5f9;
  border-bottom-color: #cbd5e1;
}

[data-theme="xylem-light"] .help-search-input,
[data-theme="light"] .help-search-input,
body.light-theme .help-search-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="xylem-light"] .help-search-input:focus,
[data-theme="light"] .help-search-input:focus,
body.light-theme .help-search-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

[data-theme="xylem-light"] .help-cat-chips,
[data-theme="light"] .help-cat-chips,
body.light-theme .help-cat-chips {
  background: #ffffff;
  border-bottom-color: #e2e8f0;
}

[data-theme="xylem-light"] .help-chip,
[data-theme="light"] .help-chip,
body.light-theme .help-chip {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

[data-theme="xylem-light"] .help-chip:hover,
[data-theme="light"] .help-chip:hover,
body.light-theme .help-chip:hover {
  border-color: #0284c7;
  color: #0f172a;
}

[data-theme="xylem-light"] .help-chip.active,
[data-theme="light"] .help-chip.active,
body.light-theme .help-chip.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

[data-theme="xylem-light"] .help-doc-item,
[data-theme="light"] .help-doc-item,
body.light-theme .help-doc-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="xylem-light"] .help-doc-item:hover,
[data-theme="light"] .help-doc-item:hover,
body.light-theme .help-doc-item:hover {
  background: #f1f5f9;
  border-color: #0284c7;
}

[data-theme="xylem-light"] .help-doc-item.active,
[data-theme="light"] .help-doc-item.active,
body.light-theme .help-doc-item.active {
  background: #e0f2fe;
  border-color: #0284c7;
  box-shadow: inset 3px 0 0 #0284c7;
}

[data-theme="xylem-light"] .help-doc-category-badge,
[data-theme="light"] .help-doc-category-badge,
body.light-theme .help-doc-category-badge {
  color: #0284c7;
}

[data-theme="xylem-light"] .help-doc-item-title,
[data-theme="light"] .help-doc-item-title,
body.light-theme .help-doc-item-title {
  color: #0f172a;
}

[data-theme="xylem-light"] .help-doc-item-desc,
[data-theme="light"] .help-doc-item-desc,
body.light-theme .help-doc-item-desc {
  color: #475569;
}

[data-theme="xylem-light"] .help-content-pane,
[data-theme="light"] .help-content-pane,
body.light-theme .help-content-pane {
  background: #f8fafc;
}

[data-theme="xylem-light"] .help-content-toolbar,
[data-theme="light"] .help-content-toolbar,
body.light-theme .help-content-toolbar {
  background: #ffffff;
  border-bottom-color: #cbd5e1;
}

[data-theme="xylem-light"] .help-breadcrumb,
[data-theme="light"] .help-breadcrumb,
body.light-theme .help-breadcrumb {
  color: #475569;
}

[data-theme="xylem-light"] .help-breadcrumb span,
[data-theme="light"] .help-breadcrumb span,
body.light-theme .help-breadcrumb span {
  color: #0284c7;
}

[data-theme="xylem-light"] .help-btn,
[data-theme="light"] .help-btn,
body.light-theme .help-btn {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

[data-theme="xylem-light"] .help-btn:hover,
[data-theme="light"] .help-btn:hover,
body.light-theme .help-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

[data-theme="xylem-light"] .help-markdown-body,
[data-theme="light"] .help-markdown-body,
body.light-theme .help-markdown-body {
  color: #1e293b;
}

[data-theme="xylem-light"] .help-markdown-body h1,
[data-theme="light"] .help-markdown-body h1,
body.light-theme .help-markdown-body h1 {
  color: #0f172a;
  border-bottom-color: #0284c7;
}

[data-theme="xylem-light"] .help-markdown-body h2,
[data-theme="light"] .help-markdown-body h2,
body.light-theme .help-markdown-body h2 {
  color: #0f172a;
  border-left-color: #0284c7;
}

[data-theme="xylem-light"] .help-markdown-body h3,
[data-theme="light"] .help-markdown-body h3,
body.light-theme .help-markdown-body h3,
[data-theme="xylem-light"] .help-markdown-body h4,
[data-theme="light"] .help-markdown-body h4,
body.light-theme .help-markdown-body h4 {
  color: #0f172a;
}

[data-theme="xylem-light"] .help-markdown-body p,
[data-theme="light"] .help-markdown-body p,
body.light-theme .help-markdown-body p {
  color: #334155;
}

[data-theme="xylem-light"] .help-markdown-body strong,
[data-theme="light"] .help-markdown-body strong,
body.light-theme .help-markdown-body strong {
  color: #0f172a;
}

[data-theme="xylem-light"] .help-markdown-body em,
[data-theme="light"] .help-markdown-body em,
body.light-theme .help-markdown-body em {
  color: #475569;
}

[data-theme="xylem-light"] .help-markdown-body li,
[data-theme="light"] .help-markdown-body li,
body.light-theme .help-markdown-body li {
  color: #334155;
}

[data-theme="xylem-light"] .help-markdown-body hr,
[data-theme="light"] .help-markdown-body hr,
body.light-theme .help-markdown-body hr {
  border-top-color: #cbd5e1;
}

[data-theme="xylem-light"] .help-markdown-body blockquote,
[data-theme="light"] .help-markdown-body blockquote,
body.light-theme .help-markdown-body blockquote {
  background: #e0f2fe;
  border-left-color: #0284c7;
  color: #0c4a6e;
}

[data-theme="xylem-light"] .help-markdown-body pre,
[data-theme="light"] .help-markdown-body pre,
body.light-theme .help-markdown-body pre {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="xylem-light"] .help-markdown-body code,
[data-theme="light"] .help-markdown-body code,
body.light-theme .help-markdown-body code {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

[data-theme="xylem-light"] .help-markdown-body pre code,
[data-theme="light"] .help-markdown-body pre code,
body.light-theme .help-markdown-body pre code {
  background: transparent;
  color: inherit;
  border: none;
}

/* Light Mode Tables */
[data-theme="xylem-light"] .help-table-responsive,
[data-theme="light"] .help-table-responsive,
body.light-theme .help-table-responsive {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

[data-theme="xylem-light"] .help-table-responsive th,
[data-theme="light"] .help-table-responsive th,
body.light-theme .help-table-responsive th {
  background: #f1f5f9;
  color: #0f172a !important;
  border-bottom-color: #cbd5e1;
  border-right-color: #e2e8f0;
}

[data-theme="xylem-light"] .help-table-responsive td,
[data-theme="light"] .help-table-responsive td,
body.light-theme .help-table-responsive td {
  border-bottom-color: #f1f5f9;
  border-right-color: #f1f5f9;
  color: #334155;
}

[data-theme="xylem-light"] .help-table-responsive tr:nth-child(even),
[data-theme="light"] .help-table-responsive tr:nth-child(even),
body.light-theme .help-table-responsive tr:nth-child(even) {
  background: #f8fafc;
}

[data-theme="xylem-light"] .help-table-responsive tr:hover td,
[data-theme="light"] .help-table-responsive tr:hover td,
body.light-theme .help-table-responsive tr:hover td {
  background: #e0f2fe;
}

/* Light Mode Archify Card */
[data-theme="xylem-light"] .archify-diagram-card,
[data-theme="light"] .archify-diagram-card,
body.light-theme .archify-diagram-card {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

[data-theme="xylem-light"] .archify-diagram-card:hover,
[data-theme="light"] .archify-diagram-card:hover,
body.light-theme .archify-diagram-card:hover {
  border-color: #0284c7;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.15);
}

[data-theme="xylem-light"] .archify-diagram-header,
[data-theme="light"] .archify-diagram-header,
body.light-theme .archify-diagram-header {
  background: #f1f5f9;
  border-bottom-color: #cbd5e1;
}

[data-theme="xylem-light"] .archify-diagram-title,
[data-theme="light"] .archify-diagram-title,
body.light-theme .archify-diagram-title {
  color: #0f172a;
}

[data-theme="xylem-light"] .archify-fullscreen-btn,
[data-theme="light"] .archify-fullscreen-btn,
body.light-theme .archify-fullscreen-btn {
  color: #0284c7;
  background: #e0f2fe;
  border-color: #bae6fd;
}

[data-theme="xylem-light"] .archify-fullscreen-btn:hover,
[data-theme="light"] .archify-fullscreen-btn:hover,
body.light-theme .archify-fullscreen-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

[data-theme="xylem-light"] .archify-iframe-wrapper,
[data-theme="light"] .archify-iframe-wrapper,
body.light-theme .archify-iframe-wrapper {
  background: #f8fafc;
}

/* Light Mode Details */
[data-theme="xylem-light"] .help-markdown-body details,
[data-theme="light"] .help-markdown-body details,
body.light-theme .help-markdown-body details {
  background: #f8fafc;
  border-color: #cbd5e1;
}

[data-theme="xylem-light"] .help-markdown-body details summary,
[data-theme="light"] .help-markdown-body details summary,
body.light-theme .help-markdown-body details summary {
  color: #0284c7;
}

[data-theme="xylem-light"] .help-markdown-body details summary:hover,
[data-theme="light"] .help-markdown-body details summary:hover,
body.light-theme .help-markdown-body details summary:hover {
  color: #0369a1;
}

[data-theme="xylem-light"] .help-markdown-body details[open] summary,
[data-theme="light"] .help-markdown-body details[open] summary,
body.light-theme .help-markdown-body details[open] summary {
  border-bottom-color: #cbd5e1;
}

/* Light Mode Math Formulas */
[data-theme="xylem-light"] .help-math-block,
[data-theme="xylem-light"] .katex-display,
[data-theme="xylem-light"] .math-display,
[data-theme="light"] .help-math-block,
[data-theme="light"] .katex-display,
[data-theme="light"] .math-display,
body.light-theme .help-math-block,
body.light-theme .katex-display,
body.light-theme .math-display {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="xylem-light"] .help-math-inline,
[data-theme="xylem-light"] .katex,
[data-theme="xylem-light"] .math-inline,
[data-theme="light"] .help-math-inline,
[data-theme="light"] .katex,
[data-theme="light"] .math-inline,
body.light-theme .help-math-inline,
body.light-theme .katex,
body.light-theme .math-inline {
  color: #0284c7;
}


/* ==============================================================================
   MOBILE RESPONSIVE HELP TAB (HP <= 820px)
   ============================================================================== */
@media (max-width: 820px) {
  .help-layout {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto 1fr !important;
    height: auto !important;
    min-height: 100% !important;
    overflow: visible !important;
  }
  .help-sidebar {
    border-right: none !important;
    border-bottom: 1.5px solid var(--border-color, #1e293b) !important;
    max-height: 240px !important;
    overflow-y: auto !important;
  }
  .help-main,
  .help-content-area {
    overflow: visible !important;
    height: auto !important;
  }
  .help-article-body {
    padding: 12px !important;
  }
  .help-article-body iframe {
    min-height: 300px !important;
  }
}
