/*
 * Quark 2 — Helios-inspired documentation skin
 * ------------------------------------------------------------
 * This is an original implementation built on top of Quark 2.
 * It recreates the visual structure of a modern three-column docs theme
 * without including code or assets from the premium Helios theme.
 */

:root,
:root[data-theme="light"] {
  --hd-bg: #ffffff;
  --hd-surface: #fbfcfe;
  --hd-sidebar: #f8f9fb;
  --hd-border: #e8ebf0;
  --hd-border-strong: #dce1e8;
  --hd-text: #17191d;
  --hd-muted: #707782;
  --hd-subtle: #9aa1ab;
  --hd-hover: #f0f3f8;
  --hd-active: #eaf0ff;
  --hd-active-text: #355fd6;
  --hd-code-bg: #f6f7f9;
  --hd-sidebar-width: 286px;
  --hd-toc-width: 232px;
  --hd-topbar-height: 58px;
  --hd-content-max: 860px;
  --hd-radius: 8px;
  --hd-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

:root[data-theme="dark"] {
  --hd-bg: #151619;
  --hd-surface: #181a1e;
  --hd-sidebar: #121316;
  --hd-border: #282b31;
  --hd-border-strong: #343840;
  --hd-text: #f0f1f3;
  --hd-muted: #a0a6af;
  --hd-subtle: #747b85;
  --hd-hover: #202329;
  --hd-active: #20273a;
  --hd-active-text: #8ba8ff;
  --hd-code-bg: #1c1e23;
  --hd-shadow: none;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hd-topbar-height) + 22px);
  background: var(--hd-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  display: block;
  background: var(--hd-bg);
  color: var(--hd-text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.72;
}

#page-wrapper,
#footer,
.mobile-menu,
.mobile-container,
#header {
  display: none !important;
}

.helios-app {
  min-height: 100vh;
  background: var(--hd-bg);
}

/* Left navigation --------------------------------------------------------- */
.helios-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--hd-sidebar-width);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--hd-sidebar);
  border-right: 1px solid var(--hd-border);
}

.helios-sidebar-head {
  height: var(--hd-topbar-height);
  flex: 0 0 var(--hd-topbar-height);
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--hd-border);
}

.helios-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.helios-brand .navbar-brand {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 26px;
}

.helios-brand .navbar-brand svg,
.helios-brand .navbar-brand img {
  width: 25px;
  height: 25px;
  display: block;
}

.helios-brand-title {
  min-width: 0;
  overflow: hidden;
  color: var(--hd-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.helios-sidebar-tools {
  padding: 14px 14px 6px;
}

.helios-search form,
.helios-search .search-wrapper {
  margin: 0 0 14px;
}

.helios-search input[type="search"],
.helios-search input[type="text"] {
  width: 100%;
  height: 38px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--hd-border-strong);
  border-radius: 7px;
  outline: none;
  background: var(--hd-bg);
  color: var(--hd-text);
  box-shadow: var(--hd-shadow);
  font-size: 13px;
}

.helios-search input:focus {
  border-color: color-mix(in srgb, var(--q2-accent, #6d8cff) 55%, var(--hd-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--q2-accent, #6d8cff) 14%, transparent);
}

.helios-section-label {
  padding: 0 8px;
  color: var(--hd-subtle);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.helios-tree {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4px 10px 22px;
  scrollbar-width: thin;
  scrollbar-color: var(--hd-border-strong) transparent;
}

.helios-tree ul.navigation,
.helios-tree ul.navigation ul,
.helios-tree ul.tree,
.helios-tree ul.tree ul {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

.helios-tree li {
  position: relative;
  display: block;
  margin: 1px 0;
  padding: 0;
}

.helios-tree li > a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 34px;
  margin: 0;
  padding: 7px 30px 7px 10px;
  border-radius: 6px;
  color: var(--hd-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.helios-tree li > a:hover {
  background: var(--hd-hover);
  color: var(--hd-text);
}

.helios-tree li > a.active {
  background: var(--hd-active);
  color: var(--hd-active-text);
  font-weight: 600;
}

.helios-tree li > a i {
  width: 17px;
  margin-right: 7px;
  color: var(--hd-subtle);
  font-size: 12px;
  text-align: center;
}

.helios-tree li > ul {
  position: static !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  width: auto !important;
  min-width: 0 !important;
  padding-left: 13px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.helios-tree li.has-children > ul {
  display: none !important;
}

.helios-tree li.has-children.tree-open > ul {
  display: block !important;
}

.helios-tree li.has-children > ul::before {
  content: "";
  position: absolute;
  top: 34px;
  bottom: 6px;
  left: 16px;
  width: 1px;
  background: var(--hd-border);
}

.helios-tree li li > a {
  min-height: 31px;
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 12.5px;
}

.helios-tree-toggle {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--hd-subtle);
  box-shadow: none;
  cursor: pointer;
}

.helios-tree-toggle:hover {
  background: var(--hd-hover);
  color: var(--hd-text);
}

.helios-tree-toggle span {
  display: block;
  font-size: 14px;
  line-height: 1;
  transform: rotate(-90deg);
  transition: transform .15s ease;
}

.tree-open > .helios-tree-toggle span {
  transform: rotate(0deg);
}

.helios-sidebar-foot {
  flex: 0 0 auto;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--hd-border);
  color: var(--hd-subtle);
  font-size: 11px;
}

.helios-sidebar-foot a {
  margin-left: 3px;
  color: var(--hd-muted);
  font-weight: 600;
  text-decoration: none;
}

/* Stage + header ---------------------------------------------------------- */
.helios-stage {
  min-height: 100vh;
  margin-left: var(--hd-sidebar-width);
}

.helios-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--hd-topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--hd-border);
  background: color-mix(in srgb, var(--hd-bg) 94%, transparent);
  backdrop-filter: blur(12px);
}

.helios-topbar-context {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--hd-muted);
  font-size: 12px;
}

.helios-home-link {
  color: var(--hd-muted);
  text-decoration: none;
}

.helios-home-link:hover { color: var(--hd-text); }
.helios-topbar-divider { color: var(--hd-border-strong); }
.helios-current-page {
  overflow: hidden;
  color: var(--hd-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.helios-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.helios-topbar .theme-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--hd-muted);
  box-shadow: none;
}

.helios-topbar .theme-toggle:hover {
  border-color: var(--hd-border);
  background: var(--hd-hover);
  color: var(--hd-text);
}

.helios-mobile-toggle { display: none; }

/* Main documentation layout --------------------------------------------- */
.helios-page-stage {
  min-width: 0;
}

.helios-doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--hd-toc-width);
  align-items: start;
  gap: 52px;
  width: min(100%, calc(var(--hd-content-max) + var(--hd-toc-width) + 130px));
  margin: 0 auto;
  padding: 44px 42px 80px;
}

.helios-content-column {
  min-width: 0;
  width: 100%;
  max-width: var(--hd-content-max);
}

.helios-breadcrumbs {
  margin-bottom: 22px;
}

.helios-breadcrumbs .breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--hd-subtle);
  font-size: 11px;
}

.helios-breadcrumbs .breadcrumbs li {
  display: flex;
  align-items: center;
}

.helios-breadcrumbs .breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin: 0 7px;
  color: var(--hd-border-strong);
}

.helios-breadcrumbs a {
  color: var(--hd-muted);
  text-decoration: none;
}

.helios-article,
.helios-article article {
  background: transparent;
}

.helios-article-header {
  margin: 0 0 34px;
  padding: 0 0 30px;
  border-bottom: 1px solid var(--hd-border);
}

.helios-article-header h1,
.helios-article-body h1,
.helios-article-body h2,
.helios-article-body h3,
.helios-article-body h4,
.helios-article-body h5,
.helios-article-body h6 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--hd-text);
  letter-spacing: -.025em;
}

.helios-article-header h1 {
  margin: 0;
  color: var(--hd-text);
  font-size: clamp(2rem, 3vw, 2.55rem);
  font-weight: 720;
  line-height: 1.12;
}

.helios-lead {
  max-width: 700px;
  margin: 13px 0 0;
  color: var(--hd-muted);
  font-size: 16px;
  line-height: 1.65;
}

.helios-article-body {
  color: var(--hd-muted);
  font-size: 15px;
  line-height: 1.78;
}

.helios-article-body > :first-child { margin-top: 0; }

.helios-article-body h1 {
  margin: 2.4em 0 .7em;
  font-size: 2rem;
  font-weight: 700;
}

.helios-article-body h2 {
  margin: 2.35em 0 .72em;
  padding: 0;
  color: var(--hd-text);
  font-size: 1.55rem;
  font-weight: 690;
  line-height: 1.25;
}

.helios-article-body h2::before { display: none; }

.helios-article-body h3 {
  margin: 1.9em 0 .6em;
  color: var(--hd-text);
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1.35;
}

.helios-article-body h4 {
  margin: 1.6em 0 .55em;
  font-size: 1rem;
  font-weight: 650;
}

.helios-article-body p,
.helios-article-body ul,
.helios-article-body ol,
.helios-article-body blockquote {
  margin-top: 0;
  margin-bottom: 1.15em;
}

.helios-article-body strong { color: var(--hd-text); }

.helios-article-body a {
  color: var(--q2-link, #5578e8);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.helios-article-body a:hover { text-decoration: underline; }

.helios-article-body hr {
  margin: 38px 0;
  border: 0;
  border-top: 1px solid var(--hd-border);
}

.helios-article-body blockquote {
  padding: 13px 17px;
  border-left: 3px solid var(--q2-accent, #6d8cff);
  border-radius: 0 6px 6px 0;
  background: color-mix(in srgb, var(--q2-accent, #6d8cff) 6%, var(--hd-surface));
  color: var(--hd-muted);
}

.helios-article-body code:not(pre code) {
  padding: .15em .4em;
  border: 1px solid var(--hd-border);
  border-radius: 5px;
  background: var(--hd-code-bg);
  color: var(--hd-text);
  font-size: .88em;
}

.helios-article-body pre {
  overflow-x: auto;
  margin: 1.3rem 0 1.6rem;
  padding: 17px 18px;
  border: 1px solid var(--hd-border);
  border-radius: 8px;
  background: var(--hd-code-bg);
  box-shadow: none;
}

.helios-article-body pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--hd-text);
  font-size: 12.5px;
  line-height: 1.7;
}

.helios-article-body table {
  width: 100%;
  margin: 1.3rem 0 1.8rem;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--hd-border);
  border-radius: 8px;
  font-size: 13px;
}

.helios-article-body th,
.helios-article-body td {
  padding: 10px 12px;
  border-right: 0;
  border-bottom: 1px solid var(--hd-border);
}

.helios-article-body tr:last-child td { border-bottom: 0; }
.helios-article-body th {
  background: var(--hd-surface);
  color: var(--hd-text);
  font-weight: 600;
  text-align: left;
}

.helios-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Right TOC --------------------------------------------------------------- */
.helios-toc {
  position: sticky;
  top: calc(var(--hd-topbar-height) + 30px);
  min-width: 0;
  max-height: calc(100vh - var(--hd-topbar-height) - 60px);
  overflow: auto;
}

.helios-toc.is-empty { display: none; }

.helios-toc-inner {
  padding-left: 18px;
  border-left: 1px solid var(--hd-border);
}

.helios-toc-title {
  margin-bottom: 10px;
  color: var(--hd-text);
  font-size: 11px;
  font-weight: 650;
}

.helios-toc nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.helios-toc-link {
  display: block;
  padding: 4px 0;
  color: var(--hd-subtle);
  font-size: 11px;
  line-height: 1.45;
  text-decoration: none;
  transition: color .15s ease;
}

.helios-toc-link:hover,
.helios-toc-link.active {
  color: var(--hd-active-text);
}

.helios-toc-link.level-h3 { padding-left: 10px; }

.helios-page-bottom {
  display: flex;
  justify-content: flex-end;
  margin-top: 58px;
  padding-top: 20px;
  border-top: 1px solid var(--hd-border);
}

.helios-back-top {
  color: var(--hd-muted);
  font-size: 11px;
  text-decoration: none;
}

.helios-back-top:hover { color: var(--hd-text); }

/* Generic/non-default templates ----------------------------------------- */
.helios-generic-page,
.helios-page-stage > #body-wrapper,
.helios-page-stage > .section,
.helios-page-stage .blog-listing {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 42px 80px;
}

.helios-page-stage .container {
  width: 100%;
  max-width: 1180px;
}

/* Mobile ----------------------------------------------------------------- */
.helios-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: none;
  background: rgba(0, 0, 0, .38);
}

@media (max-width: 1180px) {
  .helios-doc-layout {
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 34px;
    padding-left: 34px;
    padding-right: 30px;
  }
}

@media (max-width: 960px) {
  .helios-sidebar {
    z-index: 50;
    width: min(86vw, 300px);
    transform: translateX(-102%);
    box-shadow: 18px 0 50px rgba(0, 0, 0, .15);
    transition: transform .22s ease;
  }

  body.helios-nav-open { overflow: hidden; }
  body.helios-nav-open .helios-sidebar { transform: translateX(0); }
  body.helios-nav-open .helios-mobile-backdrop { display: block; }

  .helios-stage { margin-left: 0; }

  .helios-mobile-toggle {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--hd-border);
    border-radius: 7px;
    background: var(--hd-bg);
    box-shadow: none;
  }

  .helios-mobile-toggle span {
    width: 14px;
    height: 1.5px;
    border-radius: 2px;
    background: var(--hd-text);
  }

  .helios-topbar { padding: 0 16px; }

  .helios-doc-layout {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 820px;
    padding: 34px 26px 70px;
  }

  .helios-toc { display: none; }
  .helios-generic-page,
  .helios-page-stage > #body-wrapper,
  .helios-page-stage > .section,
  .helios-page-stage .blog-listing { padding: 34px 26px 70px; }
}

@media (max-width: 620px) {
  .helios-topbar-context { gap: 6px; }
  .helios-home-link,
  .helios-topbar-divider { display: none; }
  .helios-current-page { max-width: 52vw; }

  .helios-doc-layout { padding: 26px 19px 58px; }
  .helios-article-header { margin-bottom: 27px; padding-bottom: 24px; }
  .helios-article-header h1 { font-size: 1.9rem; }
  .helios-article-body { font-size: 14.5px; }
  .helios-article-body h2 { font-size: 1.4rem; }

  .helios-generic-page,
  .helios-page-stage > #body-wrapper,
  .helios-page-stage > .section,
  .helios-page-stage .blog-listing { padding: 26px 19px 58px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .helios-sidebar { transition: none; }
}

/* ========================================================================
   Helios fidelity pass — sidebar, search, page navigation and utility UI
   ======================================================================== */
:root,
:root[data-theme="light"] {
  --hd-sidebar-width: 246px;
  --hd-topbar-height: 58px;
  --hd-sidebar: #ffffff;
  --hd-active: #eaf0ff;
  --hd-active-text: #3f5fcf;
  --hd-hover: #f6f7f9;
  --hd-border: #eceef2;
  --hd-border-strong: #dfe3e8;
  --hd-muted: #525866;
  --hd-subtle: #8b92a0;
}

:root[data-theme="dark"] {
  --hd-sidebar: #151619;
  --hd-active: #202a47;
  --hd-active-text: #9cb1ff;
  --hd-hover: #202228;
}

.helios-skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  transform: translateY(-180%);
  padding: 8px 12px;
  border-radius: 7px;
  background: var(--hd-text);
  color: var(--hd-bg);
  font-size: 12px;
  text-decoration: none;
  transition: transform .15s ease;
}
.helios-skip-link:focus { transform: translateY(0); }

/* Sidebar proportions and header closely follow Helios' docs navigation. */
.helios-sidebar {
  background: var(--hd-sidebar);
  border-right: 1px solid var(--hd-border);
}

.helios-sidebar-head {
  height: auto;
  flex: 0 0 auto;
  display: block;
  padding: 26px 16px 11px;
  border-bottom: 0;
}

.helios-brand-title {
  display: block;
  overflow: hidden;
  color: var(--hd-text);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.25;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.helios-version-wrap {
  position: relative;
  margin-top: 15px;
}

.helios-version-button {
  width: 100%;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 3px 2px 3px 0;
  border: 0;
  background: transparent;
  color: var(--hd-muted);
  box-shadow: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 480;
  text-align: left;
  cursor: pointer;
}

.helios-version-button:hover { color: var(--hd-text); }
.helios-version-chevron {
  margin-right: 1px;
  color: var(--hd-subtle);
  font-size: 14px;
  line-height: 1;
  transition: transform .15s ease;
}
.helios-version-wrap.is-open .helios-version-chevron { transform: rotate(180deg); }

.helios-version-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 5px);
  left: -4px;
  right: -4px;
  overflow: hidden;
  padding: 5px;
  border: 1px solid var(--hd-border);
  border-radius: 9px;
  background: var(--hd-bg);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
}
.helios-version-menu[hidden] { display: none !important; }
.helios-version-menu a,
.helios-version-current {
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--hd-muted);
  font-size: 11.5px;
  text-decoration: none;
}
.helios-version-menu a:hover,
.helios-version-menu a.active { background: var(--hd-hover); color: var(--hd-text); }
.helios-version-current small { color: var(--hd-subtle); font-size: 9px; text-transform: uppercase; }

.helios-tree {
  padding: 1px 12px 24px;
}

.helios-tree li {
  margin: 2px 0;
}

.helios-tree li > a {
  min-height: 31px;
  padding: 6px 10px;
  border-radius: 6px;
  color: #4f5664;
  font-size: 12px;
  font-weight: 460;
  line-height: 1.38;
}
:root[data-theme="dark"] .helios-tree li > a { color: var(--hd-muted); }

.helios-tree li > a:hover {
  background: var(--hd-hover);
  color: var(--hd-text);
}

.helios-tree li > a.active {
  background: var(--hd-active);
  color: var(--hd-active-text);
  font-weight: 570;
}

.helios-tree li.has-children > a {
  padding-left: 27px;
  font-weight: 520;
  color: var(--hd-muted);
}

.helios-tree li.has-children > a.active {
  background: var(--hd-active);
  color: var(--hd-active-text);
}

.helios-tree-toggle {
  position: absolute;
  z-index: 3;
  top: 3px;
  left: 4px;
  right: auto;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  color: #9aa0aa;
}
.helios-tree-toggle span {
  font-family: Arial, sans-serif;
  font-size: 16px;
  transform: rotate(0deg);
}
.tree-open > .helios-tree-toggle span { transform: rotate(90deg); }

.helios-tree li > ul {
  padding-left: 17px !important;
}
.helios-tree li.has-children > ul::before { display: none; }

.helios-tree li li > a {
  min-height: 29px;
  padding: 5px 9px;
  font-size: 11.5px;
}

/* Divider between initial utility links and the first collapsible docs group. */
.helios-tree > ul > li:not(.has-children) + li.has-children {
  margin-top: 19px;
  padding-top: 16px;
  border-top: 1px solid var(--hd-border);
}
.helios-tree > ul > li:not(.has-children) + li.has-children > .helios-tree-toggle { top: 19px; }

.helios-sidebar-foot {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--hd-border);
  font-size: 10px;
  line-height: 1.6;
}
.helios-sidebar-foot-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 3px; }
.helios-sidebar-foot a { margin-left: 0; font-weight: 520; }

/* Main topbar: page name left, Helios-style search action right. */
.helios-topbar {
  height: var(--hd-topbar-height);
  padding: 0 22px;
  border-bottom: 0;
  background: color-mix(in srgb, var(--hd-bg) 96%, transparent);
}
.helios-current-page {
  color: var(--hd-muted);
  font-size: 11.5px;
  font-weight: 520;
}

.helios-search-trigger {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0 7px 0 9px;
  border: 1px solid var(--hd-border);
  border-radius: 7px;
  background: var(--hd-bg);
  color: var(--hd-muted);
  box-shadow: none;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}
.helios-search-trigger:hover { background: var(--hd-hover); color: var(--hd-text); }
.helios-search-trigger kbd {
  padding: 1px 5px;
  border: 1px solid var(--hd-border);
  border-radius: 4px;
  background: var(--hd-surface);
  color: var(--hd-subtle);
  font-family: inherit;
  font-size: 9px;
  font-weight: 520;
}

/* Search overlay */
.helios-search-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: min(16vh, 130px) 20px 30px;
}
.helios-search-modal.is-open { display: flex; }
.helios-search-backdrop { position: absolute; inset: 0; background: rgba(14, 17, 23, .44); backdrop-filter: blur(3px); }
.helios-search-panel {
  position: relative;
  width: min(660px, 100%);
  overflow: hidden;
  border: 1px solid var(--hd-border);
  border-radius: 12px;
  background: var(--hd-bg);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}
.helios-search-panel-head { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 12px 8px 16px; }
.helios-search-panel-head > i { color: var(--hd-subtle); }
.helios-search-box { flex: 1; min-width: 0; }
.helios-search-box form,
.helios-search-box .search-wrapper { margin: 0 !important; }
.helios-search-box input[type="search"],
.helios-search-box input[type="text"] {
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--hd-text);
  box-shadow: none;
  font-size: 15px;
}
.helios-search-panel-head > button {
  min-width: 40px;
  height: 26px;
  margin: 0;
  padding: 0 7px;
  border: 1px solid var(--hd-border);
  border-radius: 5px;
  background: var(--hd-surface);
  color: var(--hd-subtle);
  box-shadow: none;
  font-size: 9px;
  cursor: pointer;
}
.helios-search-help { padding: 10px 16px; border-top: 1px solid var(--hd-border); color: var(--hd-subtle); font-size: 10px; }
body.helios-search-open { overflow: hidden; }

/* Heading permalinks */
.helios-heading-anchor {
  margin-left: 7px;
  color: var(--hd-subtle) !important;
  font-size: .72em;
  font-weight: 500;
  opacity: 0;
  text-decoration: none !important;
  transition: opacity .15s ease, color .15s ease;
}
.helios-article-body h2:hover .helios-heading-anchor,
.helios-article-body h3:hover .helios-heading-anchor,
.helios-heading-anchor:focus { opacity: 1; }
.helios-heading-anchor:hover { color: var(--hd-active-text) !important; }

/* Prev / next cards */
.helios-prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 58px;
  padding-top: 22px;
  border-top: 1px solid var(--hd-border);
}
.helios-page-nav-link {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11px 13px;
  border: 1px solid var(--hd-border);
  border-radius: 8px;
  color: var(--hd-text);
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.helios-page-nav-link:hover { border-color: var(--hd-border-strong); background: var(--hd-surface); }
.helios-page-nav-link.next { grid-column: 2; text-align: right; }
.helios-page-nav-kicker { margin-bottom: 2px; color: var(--hd-subtle); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.helios-page-nav-link strong { font-size: 11.5px; font-weight: 580; }
.helios-content-footer { margin-top: 34px; padding-top: 16px; color: var(--hd-subtle); font-size: 10px; }

/* Code block header + copy button */
.helios-code-wrap { overflow: hidden; margin: 1.3rem 0 1.6rem; border: 1px solid var(--hd-border); border-radius: 8px; background: var(--hd-code-bg); }
.helios-code-bar { min-height: 33px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 12px; border-bottom: 1px solid var(--hd-border); color: var(--hd-subtle); font-size: 9px; font-weight: 650; letter-spacing: .06em; }
.helios-code-bar button { margin: 0; padding: 3px 6px; border: 0; border-radius: 5px; background: transparent; color: var(--hd-subtle); box-shadow: none; font-family: inherit; font-size: 9px; cursor: pointer; }
.helios-code-bar button:hover { background: var(--hd-hover); color: var(--hd-text); }
.helios-code-wrap .helios-article-body pre,
.helios-code-wrap pre { margin: 0 !important; border: 0 !important; border-radius: 0 !important; }

/* Common GitHub-style markdown alert classes used by Grav plugins. */
.helios-article-body .markdown-alert,
.helios-article-body .alert {
  margin: 1.25rem 0;
  padding: 12px 14px;
  border: 1px solid var(--hd-border);
  border-left: 3px solid var(--q2-accent, #5b7fe8);
  border-radius: 7px;
  background: var(--hd-surface);
}
.helios-article-body .markdown-alert-title,
.helios-article-body .alert-title { margin-bottom: 6px; color: var(--hd-text); font-size: 12px; font-weight: 650; }
.helios-article-body .markdown-alert > :last-child,
.helios-article-body .alert > :last-child { margin-bottom: 0; }

/* Floating circular Back to top button requested for the right side. */
.helios-floating-top {
  position: fixed;
  z-index: 80;
  right: 26px;
  bottom: 26px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--hd-active-text) 18%, var(--hd-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--hd-active) 76%, var(--hd-bg));
  color: var(--hd-active-text);
  box-shadow: 0 8px 24px rgba(35, 52, 94, .13);
  opacity: 0;
  transform: translateY(10px) scale(.94);
  pointer-events: none;
  cursor: pointer;
  transition: opacity .18s ease, transform .18s ease, background .15s ease;
}
.helios-floating-top:hover { background: color-mix(in srgb, var(--hd-active) 90%, var(--hd-bg)); transform: translateY(-1px) scale(1); }
.helios-floating-top.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.helios-floating-top i { font-size: 13px; }

@media (max-width: 960px) {
  .helios-sidebar-head { padding-top: 22px; }
  .helios-search-trigger span,
  .helios-search-trigger kbd { display: none; }
  .helios-search-trigger { width: 34px; justify-content: center; padding: 0; }
  .helios-floating-top { right: 18px; bottom: 18px; }
}

@media (max-width: 620px) {
  .helios-prev-next { grid-template-columns: 1fr; }
  .helios-page-nav-link.next { grid-column: 1; text-align: left; }
  .helios-floating-top { width: 39px; height: 39px; right: 14px; bottom: 14px; }
}
