/* Left navigation: dark rail, Optimus wordmark, page gutter (Jeff, 10 Oct 2026).
   Loaded after house.css (base.html), so it wins ties; the rules also carry
   :not(#hs-bump) so they outrank house.css whatever the order. */
/* ---- sidebar: dark rail, after Bastion (Jeff, 10 Oct 2026) ----------------
   "Bastion has a perfect left pane nav... try dark". Same values as Bastion's
   templates/base.html: #15161a rail, #24262c rules, small uppercase labels,
   16px icons, active = a soft gold wash with a gold label, 8px corners. The
   rail is dark in every theme; spacing tightens on desktop only so phones
   keep the bigger tap targets from house-mobile.css. */
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar:not(#hs-bump) {
  background: #15161a !important;
  border-right: 1px solid #24262c !important;
  color: rgba(255, 255, 255, .78) !important;
}
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-header:not(#hs-bump) { border-bottom: 1px solid #24262c !important; }
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-footer:not(#hs-bump) { border-top: 1px solid #24262c !important; background: transparent !important; }
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-footer:not(#hs-bump) * { color: rgba(255, 255, 255, .82) !important; }
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-menu:not(#hs-bump),
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-section-items:not(#hs-bump) {
  border-radius: 0 !important;
  background: transparent !important;
}
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-link:not(#hs-bump),
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-menu a:not(#hs-bump) {
  color: rgba(255, 255, 255, .78) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  gap: 10px !important;
}
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-link:not(#hs-bump) .bi,
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-link:not(#hs-bump) svg {
  font-size: 15px !important;
  width: 18px !important;
  height: auto;
  color: rgba(255, 255, 255, .55) !important;
  text-align: center;
  flex-shrink: 0;
}
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-link:not(#hs-bump):hover {
  background: rgba(255, 255, 255, .06) !important;
  color: #fff !important;
}
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-link.active:not(#hs-bump),
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-menu a.active:not(#hs-bump) {
  background: rgba(244, 225, 74, .14) !important;
  border-color: rgba(244, 225, 74, .38) !important;
  color: #f4e14a !important;
  box-shadow: none !important;
}
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-link.active:not(#hs-bump) .bi,
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-link.active:not(#hs-bump) svg { color: #f4e14a !important; }
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-section-label:not(#hs-bump) {
  color: rgba(255, 255, 255, .38) !important;
  font-size: 10.5px !important;
  font-weight: 640 !important;
  letter-spacing: .07em !important;
}
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-collapse-btn:not(#hs-bump) {
  background: #1f2126 !important;
  border-color: #2c2f36 !important;
  color: rgba(255, 255, 255, .7) !important;
}
@media (min-width: 769px) {
  html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-menu li:not(#hs-bump),
  html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-item:not(#hs-bump) {
    padding: 0 !important;
    margin: 0 0 2px !important;
    border-radius: 0 !important;
  }
  html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-link:not(#hs-bump),
  html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-menu a:not(#hs-bump) {
    padding: 8px 10px !important;
    margin: 0 10px !important;
  }
  /* More air between sections than between the links inside one. */
  html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-section-label:not(#hs-bump) {
    padding: 26px 20px 8px !important;
  }
  /* The first heading sits just under the logo rule, not a section gap away. */
  html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-section--first .sidebar-section-label:not(#hs-bump) {
    padding-top: 14px !important;
  }
  html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-section:not(#hs-bump) {
    margin: 0 !important;
  }
}

/* ---- content area: less padding around the page (Jeff, 10 Oct 2026) -----
   24px on .app-content, and pages like Client Brain added another 24px of
   their own (48px). One gutter now, 24px / 32px; 16/20 was too tight. Desktop only: phones keep house-phone.css spacing. */
@media (min-width: 769px) {
  /* Not the Assistant page: it keeps its own 10px top (assistant.css). */
  html:root[data-design-mode][data-theme][data-palette] body#opt-house:not(.asst-on-page) .app-content:not(#hs-bump) {
    padding: 24px 32px !important;
  }
}

/* ---- Optimus wordmark (Jeff, 10 Oct 2026) ---------------------------------
   The opt wordmark plus "imus" in the display serif, white on the rail, so
   the whole thing reads "optimus". No stray rule beside it: the header's own
   right border was a leftover from the light sidebar. */
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-header:not(#hs-bump) { border-right: 0 !important; }
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-logo:not(#hs-bump) {
  display: inline-flex !important; align-items: baseline; gap: 0; text-decoration: none !important;
}
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar .sidebar-logo-imus {
  font-family: var(--hs-font-display) !important;
  /* Darker grey, so "opt" stays the mark and "imus" completes the word. */
  color: #4b4e57;
  /* Exactly the size of the drawn "o": same top and bottom, measured off the
     rendered wordmark at 4x. A transform rather than top, because top snaps
     to half pixels and lands half a pixel high or low. */
  font-size: 38.9px;
  line-height: 1;
  letter-spacing: -0.01em;
  margin-left: -1px;
  font-weight: 400;
  transform: translateY(-9.5px);
}
html:root[data-design-mode][data-theme][data-palette] body#opt-house .sidebar.collapsed .sidebar-logo-imus,
body.sidebar-collapsed .sidebar-logo-imus { display: none !important; }

/* Top search lines up with the page content below it (Jeff, 11 Oct 2026):
   the header's 24px + the search's 16px margin sat 24px right of the 32px
   content gutter. Desktop only, like the gutter itself. */
@media (min-width: 769px) {
  html:root[data-design-mode][data-theme][data-palette] body#opt-house:not(.asst-on-page) .topbar:not(#hs-bump) { padding-left: 32px !important; padding-right: 32px !important; }
  html:root[data-design-mode][data-theme][data-palette] body#opt-house .topbar .topbar-search:not(#hs-bump) { margin-left: 0 !important; }
}
