/* =================================================================
   Octologic Health — Navigation (Public Header + Legacy Nav)
   Cascade: base.css → base-navbar.css
   ================================================================= */

/* ===================================================================
   Octologic Health — Public Header + Sidebar
   Loaded on public pages (index, about, services, etc.)
   =================================================================== */

/* --pub-* vars alias global design tokens from base.css.
   Changing the global tokens automatically updates the public nav.
   --pub-text-muted has no global equivalent (it's lighter than --color-muted). */
:root {
  --pub-teal:       var(--color-accent);
  --pub-teal-dark:  var(--color-accent-hover);
  --pub-teal-light: var(--color-accent-tint);
  --pub-navy:       var(--color-primary);
  --pub-text:       var(--color-text);
  --pub-text-sec:   var(--color-muted);
  --pub-text-muted: var(--text-muted);   /* base.css #8a95a3 */
  --pub-border:     var(--color-border);
  --pub-bg-light:   var(--color-bg);
  --pub-header-h:   64px;
  --pub-sidebar-w:  340px;
}

/* ─── Header ──────────────────────────────────────────────── */
.pub-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--pub-header-h);
  background: var(--bg-surface, #fff);
  border-bottom: 1px solid var(--pub-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 500;
}

.pub-header-left {
  display: flex;
  align-items: center;
}

.pub-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.pub-logo:hover { opacity: 0.8; }

.pub-logo-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.pub-logo-icon img {
  width: 36px; height: 36px;
  object-fit: contain;
}

.pub-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--pub-text);
  letter-spacing: -0.3px;
}

.pub-logo-text span {
  font-weight: 400;
  color: var(--pub-text-sec);
}

/* Centered nav links */
.pub-header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
}

.pub-nav-link {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pub-text-sec);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
  cursor: pointer;
}

.pub-nav-link:hover { color: var(--pub-text); background: rgba(0,0,0,0.07); }
.pub-nav-link.active { color: var(--pub-teal); }

.pub-nav-cta {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-on-dark, #fff);
  background: var(--pub-teal);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
  margin-left: 8px;
  font-family: inherit;
}

.pub-nav-cta:hover {
  background: var(--pub-teal-dark);
  transform: translateY(-1px);
  color: var(--text-on-dark, #fff);
}

/* Right side */
.pub-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1; /* Stay above absolute-positioned .pub-header-center */
  flex-shrink: 0;
}

.pub-login-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--pub-text-sec);
  cursor: pointer;
  padding: 8px 12px;
  text-decoration: none;
  transition: color 0.2s;
}

.pub-login-link:hover { color: var(--pub-text); }

.pub-open-sidebar {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.2s;
  background: none;
  border: none;
}

.pub-open-sidebar:hover { background: rgba(0,0,0,0.07); }

.pub-user-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--pub-teal);
  color: var(--text-on-dark, #fff);
  font-size: 12px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

.pub-hamburger {
  width: 32px; height: 32px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
}

.pub-hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--pub-text-sec);
  border-radius: 1px;
  transition: background 0.2s;
}

/* ─── Sidebar overlay ─────────────────────────────────────── */
.pub-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 850;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s, visibility 0s 0.3s;
}

.pub-sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transition: opacity 0.3s, visibility 0s;
}

/* ─── Sidebar ─────────────────────────────────────────────── */
.pub-sidebar {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: var(--pub-sidebar-w);
  background: var(--bg-surface, #fff);
  z-index: 900;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.3s;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
}

.pub-sidebar.open { transform: translateX(0); visibility: visible; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s; }

.pub-sidebar-header {
  height: var(--pub-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--pub-border);
  flex-shrink: 0;
}

.pub-sidebar-logo {
  font-size: 15px;
  font-weight: 700;
  color: var(--pub-text);
  letter-spacing: -0.2px;
}

.pub-sidebar-logo span { font-weight: 400; color: var(--pub-text-sec); }

.pub-sidebar-close {
  background: none; border: none;
  color: var(--pub-text-muted);
  font-size: 22px;
  cursor: pointer;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.pub-sidebar-close:hover {
  background: rgba(0,0,0,0.07);
  color: var(--pub-text);
}

.pub-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* User section */
.pub-sidebar-user {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--pub-border);
}

.pub-sidebar-user-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--pub-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pub-sidebar-user-email {
  font-size: 13px;
  color: var(--pub-text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pub-sidebar-user-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 10px;
  padding-bottom: 2px;
}

.pub-sidebar-user-actions a {
  font-size: 13px;
  font-weight: 500;
  color: var(--pub-teal);
  text-decoration: none;
  transition: color 0.15s;
}

.pub-sidebar-user-actions a:hover { color: var(--pub-teal-dark); }

.pub-sidebar-user-actions a.pub-logout,
.pub-sidebar-user-actions button.pub-logout {
  color: var(--btn-danger-bg);
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.pub-sidebar-user-actions a.pub-logout:hover,
.pub-sidebar-user-actions button.pub-logout:hover { color: var(--btn-danger-bg-hover); }

.pub-sidebar-divider {
  height: 1px;
  background: var(--pub-border);
  margin: 4px 0;
}

.pub-sidebar-user-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 -20px -16px;
  padding-top: 12px;
  border-top: 1px solid var(--pub-border);
}

.pub-sidebar-user-link {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pub-text);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  line-height: 1.3;
}

.pub-sidebar-user-link:hover {
  background: rgba(0,0,0,0.06);
  color: var(--pub-text);
}

/* Section label */
.pub-sidebar-section {
  padding: 20px 20px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--pub-text-muted);
}

/* Nav items */
.pub-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pub-text);
  transition: background 0.12s;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
}

.pub-sidebar-item::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: var(--pub-teal);
  border-radius: 2px;
  flex-shrink: 0;
}

.pub-sidebar-item:hover {
  background: rgba(0,0,0,0.06);
  color: var(--pub-text);
}

.pub-sidebar-item:hover::before {
  background: var(--pub-teal-dark);
}

/* Tags */
.pub-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.pub-tag-purchased { background: #EFF6FF; color: var(--brand-edu, #2563EB); font-weight: 600; border: 1px solid rgba(37,99,235,.15); }
.pub-tag-free      { background: var(--tag-info-bg); color: var(--tag-info-text-aa, #4a57a4); /* darkened from --tag-info-text for AA contrast (4.8:1 on #eaf0fb) */ }
.pub-tag-wip       {
  background: var(--tag-warning-bg); color: var(--tag-warning-text);
  font-style: italic;
  text-transform: none;
  font-weight: 400;
}

/* Sidebar footer */
.pub-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--pub-border);
  flex-shrink: 0;
  text-align: center;
}

.pub-sidebar-footer p {
  font-size: 12px;
  color: var(--pub-text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}

.pub-sidebar-ticket-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pub-teal);
  border: 1px solid var(--pub-teal);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.pub-sidebar-ticket-btn:hover {
  background: var(--pub-teal);
  color: var(--text-on-dark, #fff);
}

/* ─── Visibility helpers ──────────────────────────────────── */
.pub-logged-in  { display: none; }  /* shown by JS when logged in  */
.pub-logged-out { display: none; }  /* shown by JS when logged out */
body.pub-state-in  .pub-logged-in  { display: flex; }
body.pub-state-in  .pub-logged-out { display: none; }
body.pub-state-out .pub-logged-out { display: flex; }
body.pub-state-out .pub-logged-in  { display: none; }
/* User section must stack vertically — override display:flex from .pub-logged-in */
body.pub-state-in .pub-sidebar-user.pub-logged-in { display: block; }

/* ─── Contact Modal ──────────────────────────────────────── */
.pub-contact-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0s 0.2s;
}

.pub-contact-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transition: opacity 0.2s, visibility 0s;
}

.pub-contact-modal {
  background: var(--bg-surface, #fff);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.18);
  overflow: hidden;
  transform: translateY(12px);
  transition: transform 0.2s;
}

.pub-contact-overlay.open .pub-contact-modal {
  transform: translateY(0);
}

.pub-contact-header {
  padding: 24px 28px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pub-contact-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--pub-navy);
  letter-spacing: -0.3px;
  font-family: 'Playfair Display', serif;
}

.pub-contact-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--pub-text-muted);
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.12s, background 0.12s;
  flex-shrink: 0;
  margin-top: 2px;
}

.pub-contact-close:hover { color: var(--pub-text); background: rgba(0,0,0,0.06); }

.pub-contact-body {
  padding: 16px 28px 28px;
}

.pub-contact-intro {
  font-size: 14px;
  color: var(--pub-text-sec);
  line-height: 1.6;
  margin-bottom: 20px;
}

.pub-contact-field {
  margin-bottom: 14px;
}

.pub-contact-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--pub-text);
  margin-bottom: 5px;
}

.pub-contact-required {
  color: var(--text-error, #DC2626);
  margin-left: 2px;
}

.pub-contact-field input,
.pub-contact-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--pub-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-body, 'Google Sans Flex', system-ui, sans-serif);
  color: var(--pub-text);
  background: var(--bg-surface, #fff);
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.pub-contact-field textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}

.pub-contact-field input:focus,
.pub-contact-field textarea:focus {
  outline: 2px solid var(--pub-teal);
  outline-offset: 2px;
  border-color: var(--pub-teal);
}

.pub-contact-submit {
  width: 100%;
  padding: 11px;
  background: var(--pub-teal);
  color: var(--text-on-dark, #fff);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body, 'Google Sans Flex', system-ui, sans-serif);
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
  margin-top: 4px;
}

.pub-contact-submit:hover {
  background: var(--pub-teal-dark);
  transform: translateY(-1px);
}

.pub-contact-email-note {
  font-size: 12px;
  color: var(--pub-text-muted);
  text-align: center;
  margin-top: 14px;
  line-height: 1.5;
}

.pub-contact-email-note a {
  color: var(--pub-teal);
  text-decoration: none;
}

.pub-contact-email-note a:hover { text-decoration: underline; }

.pub-contact-thanks {
  text-align: center;
  padding: 20px 0 8px;
}

.pub-contact-thanks-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.pub-contact-thanks h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--pub-navy);
  font-family: 'Playfair Display', serif;
  margin-bottom: 8px;
}

.pub-contact-thanks p {
  font-size: 14px;
  color: var(--pub-text-sec);
  line-height: 1.6;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .pub-header { padding: 0 16px; }
  .pub-header-center { display: none; }
  .pub-sidebar { width: 100%; }
}

/* ================================================================
   App-mode header (product pages: EduForge, LumeLMS, etc.)
   .pub-header--app extends .pub-header — same white header, but
   sticky so it stays in the document flow for flex-column layouts.
   Left and right edges are identical to the public header.
   The middle zone is contextual — product pages inject their own
   content via OHNav.setLeftContent / setRightContent / setMiddleContent.
   ================================================================ */

.pub-header--app {
  position: sticky;
  top: 0;
  z-index: 9000;
  flex-shrink: 0;
  /* Expose height for EduForge layout calculations (authoring.css) */
  --ohh-height: var(--pub-header-h);
}

/* Contextual middle zone — grows to fill all space between logo and avatar */
.pub-header-middle {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 20px;
  min-width: 0;
  overflow: hidden;
}

/* App breadcrumb: Section / Page */
.pub-app-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 8px;
}

.pub-app-crumb-sep {
  font-size: 14px;
  color: var(--pub-text-muted);
  user-select: none;
}

/* Section label (e.g. "EduForge") */
.pub-app-section {
  font-size: 14px;
  font-weight: 600;
  color: var(--pub-text);
  white-space: nowrap;
  flex-shrink: 0;
}
.pub-app-section-link {
  color: var(--pub-teal);
  text-decoration: none;
  transition: opacity 0.14s;
}
.pub-app-section-link:hover { opacity: 0.75; }

/* Page/subsection label (e.g. "Untitled Module") */
.pub-app-page {
  font-size: 14px;
  font-weight: 500;
  color: var(--pub-text-sec);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* Left contextual slot — grows to fill remaining space (autosave, etc.) */
.pub-app-ctx-left {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  padding-left: 8px;
}

/* Right contextual slot — action buttons, no grow */
.pub-app-ctx-right {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

/* Active state for sidebar nav items (#1) */
.pub-sidebar-item--active,
.pub-sidebar-item.active {
  color: var(--color-accent);
  font-weight: 600;
}
.pub-sidebar-item.active::before {
  background: var(--color-accent);
  height: 18px;
  width: 4px;
}

/* ─── User avatar in sidebar (#7) ──────────────────────── */
.pub-sidebar-user-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pub-sidebar-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.pub-sidebar-user-info {
  min-width: 0;
  flex: 1;
}

/* ─── Dashboard button distinct from Log Out (#2) ──────── */
.pub-sidebar-user-actions a.pub-sidebar-dash-btn,
.pub-sidebar-user-actions a.pub-sidebar-dash-btn:link,
.pub-sidebar-user-actions a.pub-sidebar-dash-btn:visited {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--brand-deep-teal, #0E6B6B);
  border: 1px solid var(--brand-deep-teal, #0E6B6B);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.pub-sidebar-user-actions a.pub-sidebar-dash-btn:hover,
.pub-sidebar-user-actions a.pub-sidebar-dash-btn:focus-visible {
  background: #0A5252;
  border-color: #0A5252;
  transform: translateY(-1px);
  color: #fff;
}

/* ─── Icons in nav items (#3) ──────────────────────────── */
.pub-sidebar-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

/* ─── Service descriptions (#3) ────────────────────────── */
.pub-sidebar-item--svc {
  flex-wrap: wrap;
  row-gap: 0;
}

.pub-sidebar-svc-name {
  font-weight: 600;
}

.pub-sidebar-svc-desc {
  width: 100%;
  font-size: 11px;
  font-weight: 400;
  color: var(--pub-text-muted);
  margin-left: 13px;
  line-height: 1.3;
  margin-top: -1px;
  order: 3; /* push desc below name+tag row */
}

/* ─── Quick-action sub-links (#4) ──────────────────────── */
.pub-sidebar-quicklinks {
  display: flex;
  gap: 4px;
  padding: 0 20px 6px 33px;
  margin-top: -2px;
}

.pub-sidebar-quicklink {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--pub-teal-light);
  transition: background 0.12s, color 0.12s;
}

.pub-sidebar-quicklink:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ─── Collapsible Free Resources (#5) ──────────────────── */
.pub-sidebar-details {
  border: none;
}

.pub-sidebar-details summary.pub-sidebar-section {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  user-select: none;
}

.pub-sidebar-details summary.pub-sidebar-section::-webkit-details-marker { display: none; }
.pub-sidebar-details summary.pub-sidebar-section::marker { display: none; content: ''; }

.pub-sidebar-section--toggle::after {
  content: '\25B8';
  font-size: 10px;
  color: var(--pub-text-muted);
  transition: transform 0.2s;
  margin-left: auto;
}

.pub-sidebar-details[open] .pub-sidebar-section--toggle::after {
  transform: rotate(90deg);
}

.pub-sidebar-details-body {
  animation: pub-slide-down 0.2s ease-out;
}

@keyframes pub-slide-down {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Contact button in sidebar (styled like a nav item) (#8) */
button.pub-sidebar-contact-btn {
  background: none;
  border: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

/* Legacy divider elements — unused in unified header */
.pub-app-divider,
.pub-app-divider--hidden { display: none; }

/* ---- Action buttons (injected into right slot by product pages) ---- */
.ohh-action {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--bg-surface-alt, #F8FAFC);
  border: none;
  color: var(--pub-text-sec);
  font-size: 13px;
  font-family: inherit;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.ohh-action:hover { background: rgba(0,0,0,0.06); color: var(--pub-text); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

.ohh-action-primary { background: var(--pub-teal) !important; color: var(--text-on-dark, #fff) !important; }
.ohh-action-primary:hover { background: var(--pub-teal-dark) !important; }

.ohh-action-save { color: var(--alert-success-text, #059669); }
.ohh-action-save:hover { background: rgba(5,150,105,0.08) !important; color: var(--alert-success-text, #059669); box-shadow: 0 2px 8px rgba(5,150,105,0.12); }

.ohh-action-load { color: var(--brand-edu, #2563EB); }
.ohh-action-load:hover { background: rgba(37,99,235,0.08) !important; color: var(--brand-edu, #2563EB); box-shadow: 0 2px 8px rgba(37,99,235,0.12); }

.ohh-action-ai { background: var(--brand-lume, #7C3AED) !important; color: var(--text-on-dark, #fff) !important; border-radius: 6px; }
.ohh-action-ai:hover { background: color-mix(in srgb, var(--brand-lume, #7C3AED) 80%, #000) !important; }
.ohh-action-ai.ai-active {
  background: color-mix(in srgb, var(--brand-lume, #7C3AED) 15%, transparent) !important;
  color: var(--brand-lume, #7C3AED) !important;
  animation: ohh-ai-pulse 2s ease-in-out infinite;
}
@keyframes ohh-ai-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.3); }
  50%      { box-shadow: 0 0 0 5px rgba(124,58,237,0); }
}

/* Action label — visible at full width, collapses on narrow screens */
.ohh-action-label {
  display: inline-block;
  white-space: nowrap;
  vertical-align: middle;
  max-width: 100px;
  overflow: hidden;
  opacity: 1;
  margin-left: 4px;
  transition: max-width 0.22s ease, opacity 0.15s ease, margin-left 0.22s ease;
}
@media (max-width: 1280px) {
  .ohh-action-label { max-width: 0; opacity: 0; margin-left: 0; }
  .ohh-action:hover .ohh-action-label,
  .dropdown-wrap.open .ohh-action .ohh-action-label { max-width: 100px; opacity: 1; margin-left: 4px; }
}

/* Circle buttons: ? and ! */
.ohh-action-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--pub-border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: var(--pub-text-sec);
  cursor: pointer;
  background: none;
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
  padding: 0; flex-shrink: 0;
}
.ohh-action-circle:hover { background: rgba(0,0,0,0.06); color: var(--pub-text); }

/* Autosave indicator */
.ohh-autosave {
  font-size: 11px;
  color: var(--pub-text-muted);
  white-space: nowrap;
}
.pub-header--app .autosave-status        { color: var(--pub-text-muted) !important; }
.pub-header--app .autosave-status.saving { color: var(--pub-teal) !important; }
.pub-header--app .autosave-status .autosave-dot        { background: var(--pub-text-muted) !important; }
.pub-header--app .autosave-status.saving .autosave-dot { background: var(--pub-teal) !important; }

/* ── Legacy Navigation (oh-nav) ── */

/* ===================================================================
   Octologic Health — Unified Navigation
   Single header bar for all pages (acquisition + product).
   Pattern: [Menu] [Logo] | [Section] | [Subsection]  ... [User]
   Themeable via CSS vars: --ohh-bg, --ohh-accent, --ohh-text
   =================================================================== */

/* ---- Theme defaults ----
   --ohh-* vars alias global design tokens from site.css.
   oh-nav.js overrides these per-product.
   Brand tokens come from site.css and are overridden at runtime by oh-brand.js.
   ---- */
:root {
  --ohh-bg:         var(--color-surface);
  --ohh-accent:     var(--color-accent);
  --ohh-text:       var(--color-text);
  --ohh-muted:      var(--color-muted);
  --ohh-border:     var(--color-border);
  --ohh-sidebar-bg: var(--bg-dark-mid);   /* dark nav sidebar */
  --ohh-height:     40px;
}

/* ---- Header bar ---- */
#oh-header, #oh-nav {
  position: sticky;
  top: 0;
  z-index: 9000;
  font-family: var(--font-body, 'Google Sans Flex', system-ui, sans-serif);
}

.ohh {
  display: flex;
  align-items: center;
  height: var(--ohh-height);
  background: var(--ohh-bg);
  padding: 0 16px;
  gap: 0;
  border-bottom: 1px solid var(--ohh-border);
}

/* Menu button */
.ohh-btn {
  background: none;
  border: none;
  color: var(--ohh-muted);
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
  margin-right: 4px;
  flex-shrink: 0;
  line-height: 1;
}
.ohh-btn:hover { background: rgba(128,128,128,0.15); color: var(--ohh-text); }
.ohh-btn.open { color: var(--ohh-accent); }

/* Logo zone — natural width, expands with pill on hover */
.ohh-logo-zone {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Logo pill */
.ohh-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  background: transparent;
  padding: 4px 6px;
  border-radius: 99px;
  transition: background 0.2s;
}
.ohh-logo:hover {
  background: rgba(128,128,128,0.15);
}

.ohh-logo-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: url('../assets/branding/logo_circle.png') center / contain no-repeat;
  flex-shrink: 0;
}

/* Text hidden by default — expands smoothly on hover */
.ohh-logo-text {
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
  font-weight: 700;
  font-size: 14px;
  color: var(--ohh-text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  margin-left: 0;
  transition: max-width 0.25s ease, opacity 0.2s ease, margin-left 0.25s ease;
}
.ohh-logo:hover .ohh-logo-text {
  max-width: 155px;
  opacity: 1;
  margin-left: 6px;
}

/* Separator */
.ohh-sep {
  width: 1px;
  height: 16px;
  background: var(--ohh-border);
  flex-shrink: 0;
  margin: 0 10px;
}

/* Section label */
.ohh-section {
  font-size: 13px;
  font-weight: 600;
  color: var(--ohh-accent);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Subsection label */
.ohh-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--ohh-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

/* Right section */
.ohh-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.ohh-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ohh-accent);
  color: var(--text-on-dark, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.ohh-name { font-size: 12px; color: var(--ohh-muted); font-weight: 500; white-space: nowrap; }

.ohh-lo {
  font-size: 11px;
  color: var(--ohh-muted);
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid var(--ohh-border);
  transition: all 0.12s;
}
.ohh-lo:hover { color: var(--ohh-text); border-color: var(--border-default, #c0ccd8); }

.ohh-li {
  font-size: 12px;
  background: var(--ohh-accent);
  color: var(--text-on-dark, #fff);
  padding: 5px 16px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.12s;
}
.ohh-li:hover { opacity: 0.85; }

/* Account dropdown */
.ohh-account { position: relative; }
.ohh-avatar { cursor: pointer; transition: box-shadow 0.12s; }
.ohh-avatar:hover { box-shadow: 0 0 0 2px var(--ohh-accent); }

.ohh-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: var(--bg-surface, #fff);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.06);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 9100;
  overflow: hidden;
}
.ohh-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.ohh-dd-header { padding: 12px 14px 8px; }
.ohh-dd-domain { font-size: 11px; color: var(--text-muted, #596673); font-weight: 500; }
.ohh-dd-user { font-size: 14px; color: var(--text-primary, #1E3A5F); font-weight: 700; margin-top: 2px; }
.ohh-dd-divider { height: 1px; background: var(--border-default, #E2E8F0); margin: 0; }
.ohh-dd-item {
  display: block;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text-primary, #334155);
  text-decoration: none;
  transition: background 0.1s;
}
.ohh-dd-item:hover { background: var(--bg-surface-alt, #F1F5F9); }
.ohh-dd-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted, #596673);
  padding: 8px 14px 4px;
}
.ohh-dd-muted { color: var(--text-muted, #596673); }
.ohh-dd-muted:hover { color: var(--text-primary, #334155); }
/* Owned product links */
.ohh-dd-product { color: var(--text-primary, #334155); }
/* Submit a Ticket — accent color to stand out */
.ohh-dd-ticket { color: var(--ohh-accent, #2D9CDB); font-weight: 600; }
.ohh-dd-ticket:hover { background: color-mix(in srgb, var(--ohh-accent, #2D9CDB) 8%, var(--bg-surface, #fff)); }
/* Log Out */
.ohh-dd-logout { color: var(--text-error, #DC2626); }
.ohh-dd-logout:hover { background: var(--alert-error-bg, #FEF2F2); }


/* ---- Sidebar ---- */
#oh-sidebar-overlay {
  position: fixed;
  inset: 0;
  top: var(--ohh-height);
  background: rgba(0,0,0,0.3);
  z-index: 8998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#oh-sidebar-overlay.open { opacity: 1; pointer-events: auto; }

#oh-sidebar {
  position: fixed;
  top: var(--ohh-height);
  left: 0;
  width: 240px;
  height: calc(100vh - var(--ohh-height));
  background: var(--ohh-sidebar-bg);
  z-index: 8999;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  font-family: 'DM Sans', system-ui, sans-serif;
  display: flex;
  flex-direction: column;
}
#oh-sidebar.open { transform: translateX(0); }

.ohs-inner { padding: 16px 12px; flex: 1; overflow-y: auto; }

/* ---- Ticket footer — pinned at bottom of sidebar ---- */
.ohs-ticket-footer {
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 10px 12px;
}
.ohs-ticket-btn {
  display: block;
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'DM Sans', system-ui, sans-serif;
  text-align: center;
  color: var(--tag-warning-text, #F59E0B);
  background: rgba(245,158,11,0.08);
  border: 1px dashed rgba(245,158,11,0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.ohs-ticket-btn:hover {
  background: rgba(245,158,11,0.15);
  border-color: rgba(245,158,11,0.7);
  color: var(--tag-warning-text-hover, #FBBF24);
}

/* ---- Ticket overlay (inside sidebar) ---- */
.ohs-ticket-overlay {
  position: absolute;
  inset: 0;
  background: var(--ohh-sidebar-bg);
  z-index: 10;
  display: flex;
  align-items: flex-start;
  padding: 20px 14px;
  overflow-y: auto;
}
.ohs-ticket-box { width: 100%; }
.ohs-ticket-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-on-dark, #fff);
  margin-bottom: 14px;
}
.ohs-ticket-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted, #596673);
  margin-bottom: 5px;
}
.ohs-ticket-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: var(--text-on-dark, #fff);
  font-size: 13px;
  font-family: 'DM Sans', system-ui, sans-serif;
  outline: none;
  transition: border-color 0.15s;
}
.ohs-ticket-input:focus { border-color: var(--ohh-accent, #2D9CDB); box-shadow: var(--focus-ring); }
.ohs-ticket-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: var(--text-on-dark, #fff);
  font-size: 12px;
  font-family: 'DM Sans', system-ui, sans-serif;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.15s;
}
.ohs-ticket-textarea:focus { border-color: var(--ohh-accent, #2D9CDB); box-shadow: var(--focus-ring); }
.ohs-ticket-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  justify-content: flex-end;
}
.ohs-ticket-cancel {
  padding: 6px 14px;
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 5px;
  background: none;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  font-family: 'DM Sans', system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.12s;
}
.ohs-ticket-cancel:hover { color: var(--text-on-dark, #fff); border-color: rgba(255,255,255,0.4); }
.ohs-ticket-submit {
  padding: 6px 14px;
  border: none;
  border-radius: 5px;
  background: var(--ohh-accent, #2D9CDB);
  color: var(--text-on-dark, #fff);
  font-size: 12px;
  font-weight: 600;
  font-family: 'DM Sans', system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.12s;
}
.ohs-ticket-submit:hover { background: color-mix(in srgb, var(--ohh-accent, #2D9CDB) 85%, #000); }
.ohs-ticket-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.ohs-ticket-msg {
  margin-top: 10px;
  font-size: 12px;
  border-radius: 5px;
  padding: 6px 10px;
}
.ohs-ticket-msg-ok  { background: rgba(16,185,129,0.15); color: var(--tag-success-text, #6EE7B7); }
.ohs-ticket-msg-err { background: rgba(220,38,38,0.15);  color: var(--alert-error-border, #FCA5A5); }
.ohs-sec { margin-bottom: 16px; }

.ohs-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted, #596673);
  margin-bottom: 6px;
  padding: 0 8px;
}

.ohs-link {
  display: block;
  padding: 7px 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  border-radius: 5px;
  margin-bottom: 1px;
  transition: all 0.12s;
}
.ohs-link:hover { color: var(--text-on-dark, #fff); background: rgba(45,156,219,0.1); }
.ohs-link.active { color: var(--ohh-accent, #2D9CDB); background: rgba(45,156,219,0.12); font-weight: 600; }

.ohs-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 10px 8px; }

.ohs-upsell {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--ohh-accent, #2D9CDB);
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.12s;
}
.ohs-upsell:hover { background: rgba(45,156,219,0.08); }


/* ---- PUBLIC NAV LINKS (About Us | Our Services) ---- */
.ohh-navlinks {
  display: flex;
  align-items: center;
  margin-left: 4px;
}
.ohh-navlink {
  font-size: 13px;
  font-weight: 500;
  color: var(--ohh-muted);
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .12s, background .12s;
}
.ohh-navlink:hover { color: var(--ohh-text); background: rgba(128,128,128,.15); }
.ohh-navlink.active { color: var(--ohh-text); font-weight: 600; }

/* Public mode: hamburger always visible; inline links collapse on narrow screens */
@media (max-width: 680px) {
  .ohh.public-mode .ohh-navlinks { display: none; }
}


/* ---- SCROLL REVEAL ANIMATIONS ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].revealed { opacity: 1; transform: translateY(0); }
[data-reveal="left"]  { opacity: 0; transform: translateX(-40px); }
[data-reveal="left"].revealed  { opacity: 1; transform: translateX(0); }
[data-reveal="right"] { opacity: 0; transform: translateX(40px); }
[data-reveal="right"].revealed { opacity: 1; transform: translateX(0); }
[data-reveal="scale"]  { opacity: 0; transform: scale(0.92); }
[data-reveal="scale"].revealed  { opacity: 1; transform: scale(1); }

/* ===================================================================
   Contextual Slots — injected per-page via OHNav.setLeftContent /
   OHNav.setRightContent
   =================================================================== */

/* Left slot: grows to fill space between breadcrumb and right buttons */
.ohh-left-ctx {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  padding-left: 16px; /* breathing room after module name */
}

/* Right slot: action buttons area */
.ohh-right-ctx {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---- Section as link (when section-href + page name are both set) ---- */
.ohh-section a,
.ohh-section-link {
  color: var(--ohh-accent);
  text-decoration: none;
  transition: opacity 0.14s;
}
.ohh-section a:hover,
.ohh-section-link:hover { opacity: 0.75; }

/* ---- Action buttons (for right slot) ---- */
.ohh-action {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--ohh-muted);
  font-size: 13px;
  font-family: var(--font-body, 'Google Sans Flex', system-ui, sans-serif);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  position: relative;
}
.ohh-action:hover { background: rgba(255,255,255,0.15); color: var(--ohh-text); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }

/* Primary variant (e.g. Preview) — #0E6895 gives ~4.7:1 contrast with white (WCAG AA) */
.ohh-action-primary {
  background: var(--btn-primary-bg, #0E6895) !important;
  color: var(--text-on-dark, #fff) !important;
}
.ohh-action-primary:hover { background: var(--btn-primary-bg-hover, #0A5578) !important; }

/* Save variant — subtle green tint */
.ohh-action-save { color: rgba(110,231,183,0.9); }
.ohh-action-save:hover { background: rgba(110,231,183,0.12) !important; color: var(--alert-success-border, #6EE7B7); }

/* Load variant — subtle blue tint */
.ohh-action-load { color: rgba(147,197,253,0.9); }
.ohh-action-load:hover { background: rgba(147,197,253,0.12) !important; color: var(--brand-edu-light, #93C5FD); }

/* AI Write variant — solid purple fill */
.ohh-action-ai { background: var(--brand-lume, #7C3AED) !important; color: var(--text-on-dark, #fff) !important; border-radius: 6px; }
.ohh-action-ai:hover { background: color-mix(in srgb, var(--brand-lume, #7C3AED) 80%, #000) !important; }
.ohh-action-ai.ai-active {
  background: color-mix(in srgb, var(--brand-lume, #7C3AED) 25%, transparent) !important;
  color: color-mix(in srgb, var(--brand-lume, #7C3AED) 60%, var(--text-on-dark, #fff)) !important;
  animation: ohh-ai-pulse 2s ease-in-out infinite;
}
@keyframes ohh-ai-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(196,181,253,0.4); }
  50%      { box-shadow: 0 0 0 5px rgba(196,181,253,0); }
}

/* Action label — visible at full width, collapses on narrow screens */
.ohh-action-label {
  display: inline-block;
  white-space: nowrap;
  vertical-align: middle;
  max-width: 100px;
  overflow: hidden;
  opacity: 1;
  margin-left: 4px;
  transition: max-width 0.22s ease, opacity 0.15s ease, margin-left 0.22s ease;
}
@media (max-width: 1280px) {
  .ohh-action-label {
    max-width: 0;
    opacity: 0;
    margin-left: 0;
  }
  .ohh-action:hover .ohh-action-label,
  .dropdown-wrap.open .ohh-action .ohh-action-label {
    max-width: 100px;
    opacity: 1;
    margin-left: 4px;
  }
}

/* Circle buttons — ?, ! */
.ohh-action-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--ohh-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ohh-muted);
  cursor: pointer;
  background: none;
  font-family: var(--font-body, 'Google Sans Flex', system-ui, sans-serif);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  padding: 0;
  flex-shrink: 0;
}
.ohh-action-circle:hover {
  background: rgba(128,128,128,0.15);
  color: var(--ohh-text);
  border-color: var(--ohh-border);
}

/* ---- Autosave / left-slot indicators ---- */
.ohh-autosave {
  font-size: 11px;
  color: var(--ohh-muted);
  white-space: nowrap;
}

/* Autosave-status colors inside light nav */
.ohh .autosave-status       { color: var(--ohh-muted) !important; }
.ohh .autosave-status.saving { color: var(--ohh-accent) !important; }
.ohh .autosave-status .autosave-dot { background: var(--ohh-muted) !important; }
.ohh .autosave-status.saving .autosave-dot { background: var(--ohh-accent) !important; }

/* Construction banner removed for launch — 2026-04-08 */

/* ── Dark mode — navbar contrast fixes ────────────────────── */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    /* --pub-text-muted (#64748B) is 3:1 on dark surfaces — lift to text-secondary for readability */
    --pub-text-muted: var(--text-secondary, #94A3B8);
  }

  /* Nav CTA + contact form submit: --pub-teal resolves to #2DD4BF (light teal) in dark mode;
     white text on that is only 1.86:1. Switch to --brand-deep-teal (#0E6B6B, 5.0:1 with white). */
  html:not([data-theme="light"]) .pub-nav-cta,
  html:not([data-theme="light"]) .pub-contact-submit {
    background: var(--brand-deep-teal, #0E6B6B) !important;
    color: #fff;
  }

  /* Sidebar Log In button: same --color-accent issue. Use deep teal bg + white text = 5.0:1. */
  html:not([data-theme="light"]) .pub-sidebar-user-actions a.pub-sidebar-dash-btn {
    background: var(--brand-deep-teal, #0E6B6B) !important;
    color: #fff !important;
  }

  /* Sidebar plain links (Create Account, etc.) on dark sidebar bg:
     use --text-primary (#E2E8F0) for high contrast against near-black sidebar. */
  html:not([data-theme="light"]) .pub-sidebar-user-actions a:not(.pub-sidebar-dash-btn) {
    color: var(--text-primary, #E2E8F0) !important;
  }

  /* pub-tag-free: --tag-info-bg (#eaf0fb) is light and not overridden for dark mode;
     on the dark sidebar the text (#4a57a4) renders at ~1.9:1. Switch to a
     dark-adapted indigo style that works on any dark surface. */
  html:not([data-theme="light"]) .pub-tag-free {
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
  }
}

/* ── Explicit dark mode — navbar overrides (mirrors the @media block above) ── */
html[data-theme="dark"] :root {
  --pub-text-muted: var(--text-secondary, #94A3B8);
}
html[data-theme="dark"] .pub-nav-cta,
html[data-theme="dark"] .pub-contact-submit {
  background: var(--brand-deep-teal, #0E6B6B) !important;
  color: #fff;
}
html[data-theme="dark"] .pub-sidebar-user-actions a.pub-sidebar-dash-btn {
  background: var(--brand-deep-teal, #0E6B6B) !important;
  color: #fff !important;
}
html[data-theme="dark"] .pub-sidebar-user-actions a:not(.pub-sidebar-dash-btn) {
  color: var(--text-primary, #E2E8F0) !important;
}
html[data-theme="dark"] .pub-tag-free {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

/* ── Theme toggle button ── */
.pub-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
  transition: background var(--transition-base, 0.15s ease), border-color 0.15s ease, transform 0.2s ease;
  margin-right: 4px;
}
/* Light mode: bar is white, moon is shown → give moon a dark circle to contrast */
html[data-theme="light"] .pub-theme-toggle,
html:not([data-theme="dark"]) .pub-theme-toggle {
  background: var(--brand-deep-teal, #0E6B6B);
  border-color: var(--brand-deep-teal, #0E6B6B);
  color: #fff;
}
html[data-theme="light"] .pub-theme-toggle:hover,
html:not([data-theme="dark"]) .pub-theme-toggle:hover {
  background: #0A5252;
  border-color: #0A5252;
}
/* Dark mode: bar is teal/dark, sun is shown → give sun a white circle to contrast */
html[data-theme="dark"] .pub-theme-toggle {
  background: #fff;
  border-color: #fff;
  color: var(--brand-deep-teal, #0E6B6B);
}
html[data-theme="dark"] .pub-theme-toggle:hover {
  background: #F1F5F9;
  border-color: #F1F5F9;
}
.pub-theme-toggle:focus-visible { outline: 2px solid var(--focus-ring-color, #1e7a70); outline-offset: 2px; }

/* Show moon in light mode (click = go dark), hide sun */
html[data-theme="light"] .pub-theme-icon--dark,
:root:not([data-theme="dark"]) .pub-theme-icon--dark { display: none; }
html[data-theme="light"] .pub-theme-icon--light,
:root:not([data-theme="dark"]) .pub-theme-icon--light { display: inline; }

/* Show sun in dark mode (click = go light), hide moon */
html[data-theme="dark"] .pub-theme-icon--light { display: none; }
html[data-theme="dark"] .pub-theme-icon--dark  { display: inline; }

