/* The final chrome layer. Keep these rules after legacy page themes. IDs and
   targeted !important declarations resolve their existing header overrides;
   trade ticket, order, and chart styles remain owned by their own stylesheets. */
body.hl-site {
  --site-font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
  --site-bg: #0f1a1f;
  --site-surface: #1b2429;
  --site-raised: #273035;
  --site-border: #293940;
  --site-text: #f6fefd;
  --site-muted: #949e9c;
  --site-accent: #50d2c1;
  --site-nav-active: #97fce4;
  --site-header-height: 56px;
  --nav-h: var(--site-header-height);
  font-family: var(--site-font-sans);
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
}
body.hl-site.models-terminal-route { --terminal-nav-height: var(--site-header-height); }
body.hl-site:not(.models-terminal-route) { overflow: visible !important; min-width: 0; }
body.hl-site:not(.models-terminal-route) #main { min-width: 0; max-width: 100%; }
.site-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
body.hl-site #nav.site-nav,
body.hl-site #siteSearch { box-sizing: border-box; font-family: var(--site-font-sans); }
body.hl-site #nav.site-nav *,
body.hl-site #siteSearch * { box-sizing: border-box; }
body.hl-site #nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  gap: 24px !important;
  width: 100%;
  height: var(--site-header-height) !important;
  min-height: var(--site-header-height) !important;
  max-height: none !important;
  margin: 0;
  padding: 0 20px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--site-border) !important;
  background: var(--site-bg) !important;
  color: var(--site-text) !important;
  box-shadow: none !important;
  overflow: visible;
}
body.hl-site #nav .brand {
  order: 0;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 0;
  color: var(--site-text) !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  letter-spacing: -.15px;
}
body.hl-site #nav .brand > svg { display: block; flex: none; width: 22px; height: 22px; }
body.hl-site #nav .brand > svg path { stroke: var(--site-accent); }
body.hl-site #nav .brand > span { display: inline; overflow: visible; font-size: inherit; white-space: nowrap; text-overflow: clip; }
body.hl-site #nav .brand b { color: var(--site-text) !important; font-weight: 500; }
body.hl-site #nav #navToggle { display: none !important; }
body.hl-site #nav #navLinks {
  order: 1;
  position: static;
  display: flex !important;
  flex: 1 1 auto;
  flex-flow: row nowrap !important;
  align-items: center;
  gap: 4px;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
body.hl-site #nav #navLinks > a,
body.hl-site #nav #moreBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  height: 44px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent !important;
  color: var(--site-text) !important;
  font: 400 12px/15px var(--site-font-sans);
  white-space: nowrap;
  text-decoration: none;
  box-shadow: none !important;
  cursor: pointer;
}
body.hl-site #nav #navLinks > a:is(.active, [aria-current="page"]),
body.hl-site #nav #moreBtn.active { color: var(--site-nav-active) !important; }
body.hl-site #nav #navLinks > a:hover,
body.hl-site #nav #moreBtn:hover { color: var(--site-nav-active) !important; }
body.hl-site #nav :is(button, a):focus-visible,
body.hl-site #siteSearch :is(button, a, input):focus-visible {
  outline: 2px solid var(--site-accent);
  outline-offset: 2px;
}
body.hl-site #nav :is(button, a),
body.hl-site #siteSearch :is(button, a) { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
body.hl-site #nav .more { position: relative; flex: none; width: auto; }
body.hl-site #nav #moreMenu {
  position: absolute !important;
  top: calc(100% + 7px);
  left: -8px;
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 248px;
  min-width: 248px !important;
  max-width: calc(100vw - 24px);
  margin: 0;
  padding: 6px !important;
  background: var(--site-bg) !important;
  border: 1px solid var(--site-border) !important;
  border-radius: 6px;
  box-shadow: 0 12px 36px #0006;
}
body.hl-site #nav #moreMenu[hidden] { display: none !important; }
body.hl-site #nav #moreMenu a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 12px;
  width: 100%;
  min-height: 40px;
  height: auto;
  padding: 9px 10px;
  border: 0;
  border-radius: 4px;
  color: var(--site-text) !important;
  background: transparent !important;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  text-decoration: none;
  box-shadow: none;
}
body.hl-site #nav #moreMenu a:hover { background: var(--site-raised) !important; }
body.hl-site #nav #moreMenu a[aria-current="page"] { color: var(--site-accent) !important; }
body.hl-site #nav #moreMenu a > small { flex: 0 0 100%; color: var(--site-muted); font-size: 12px; line-height: 1.4; }
body.hl-site #nav #moreMenu a > [aria-hidden="true"] { color: var(--site-muted); }
body.hl-site #nav .site-more-label { display: none; }
body.hl-site #nav .nav-right {
  order: 2;
  display: flex;
  flex: 0 0 auto;
  flex-flow: row nowrap !important;
  align-items: center;
  gap: 12px !important;
  min-width: 0;
  margin-left: auto;
}
body.hl-site #nav .site-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 200px;
  min-height: 33px;
  height: 33px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--site-border);
  border-radius: 5px;
  background: var(--site-surface);
  color: var(--site-muted);
  font: 400 12px/15px var(--site-font-sans);
  white-space: nowrap;
  cursor: pointer;
}
body.hl-site #nav .site-search-trigger:hover { border-color: #617986; color: var(--site-text); }
body.hl-site #nav .site-search-trigger > svg { flex: none; }
body.hl-site #nav .site-search-trigger kbd { margin-left: auto; padding: 2px 3px; border: 1px solid var(--site-border); border-radius: 3px; font: 400 10px/1.2 var(--site-font-sans); background: transparent; color: var(--site-muted); }
body.hl-site #nav #connectBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: none;
  min-width: 82px;
  max-width: 196px;
  min-height: 33px !important;
  height: 33px !important;
  margin: 0;
  padding: 0 14px !important;
  border-radius: 5px !important;
  font: 500 12px/15px var(--site-font-sans) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.hl-site #nav .acct { flex: none; min-width: 0; }
body.hl-site #nav .acct-menu { top: calc(100% + 10px); right: 0; left: auto; z-index: 115; max-width: calc(100vw - 24px); }
/* Publisher authentication has its own contextual entry in Publish. */
body.hl-site #nav #publisherLoginBtn { display: none !important; }

body.hl-site.site-search-open { overflow: hidden !important; }
body.hl-site #siteSearch {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  overscroll-behavior: contain;
  padding: max(84px, 10vh) 20px 32px;
  background: #02090db3;
  color: var(--site-text);
}
body.hl-site #siteSearch[hidden],
body.hl-site #siteSearch [hidden] { display: none !important; }
body.hl-site #siteSearch .site-search-panel {
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  min-width: 0;
  max-height: calc(100dvh - max(84px, 10vh) - 32px);
  border: 1px solid #3b4c53;
  border-radius: 8px;
  background: var(--site-bg);
  box-shadow: 0 20px 70px #0008;
  overflow: hidden;
}
body.hl-site #siteSearch .site-search-input-row {
  display: flex;
  align-items: center;
  flex: none;
  gap: 12px;
  padding: 8px 12px 8px 18px;
  border-bottom: 1px solid var(--site-border);
}
body.hl-site #siteSearch .site-search-input-row > svg { flex: none; color: var(--site-muted); }
body.hl-site #siteSearchInput {
  display: block;
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 33px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline-offset: 0;
  background: transparent;
  color: var(--site-text);
  font: 400 12px/1.4 var(--site-font-sans);
  box-shadow: none;
}
body.hl-site #siteSearchInput::placeholder { color: var(--site-muted); opacity: 1; }
body.hl-site #siteSearch .site-search-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  min-height: 33px;
  height: 33px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--site-muted);
  font: 400 12px/1 var(--site-font-sans);
  cursor: pointer;
}
body.hl-site #siteSearch .site-search-close:hover { background: var(--site-raised); color: var(--site-text); }
body.hl-site #siteSearch .site-search-close > svg { display: none; }
body.hl-site #siteSearch .site-search-escape { padding: 4px 5px; border: 1px solid var(--site-border); border-radius: 3px; }
body.hl-site #siteSearch .site-search-heading { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 6px; color: var(--site-muted); font-size: 12px; }
body.hl-site #siteSearch .site-search-results { flex: 1 1 auto; min-height: 0; margin: 0; padding: 4px 6px 8px; list-style: none; overflow: auto; overscroll-behavior: contain; }
body.hl-site #siteSearch .site-search-result { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 0; padding: 7px 12px; border-radius: 4px; cursor: pointer; }
body.hl-site #siteSearch .site-search-result:is(:hover, [aria-selected="true"]) { background: var(--site-raised); }
body.hl-site #siteSearch .site-search-result-copy { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
body.hl-site #siteSearch .site-search-result-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--site-text); font-size: 12px; font-weight: 500; line-height: 1.35; }
body.hl-site #siteSearch .site-search-result-meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--site-muted); font-size: 11px; line-height: 1.35; }
body.hl-site #siteSearch .site-search-result-arrow { flex: none; color: var(--site-muted); font-size: 16px; }
body.hl-site #siteSearch .site-search-empty { margin: 0; padding: 28px 18px 36px; color: var(--site-muted); text-align: center; font-size: 14px; line-height: 1.5; }
body.hl-site #siteSearch .site-search-actions { display: flex; flex: none; align-items: stretch; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--site-border); }
body.hl-site #siteSearch .site-search-actions a { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 8px; border-radius: 4px; color: var(--site-accent); font-size: 13px; text-decoration: none; }
body.hl-site #siteSearch .site-search-actions a:hover { background: var(--site-raised); }
body.hl-site #siteSearch .site-search-hint { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 0 18px 12px; color: var(--site-muted); font-size: 11px; line-height: 1.5; }

@media (min-width: 981px) and (max-width: 1149px) {
  body.hl-site #nav.site-nav { gap: 14px !important; padding-right: 14px !important; padding-left: 14px !important; }
  body.hl-site #nav #navLinks { gap: 0; }
  body.hl-site #nav #navLinks > a, body.hl-site #nav #moreBtn { padding-right: 8px; padding-left: 8px; }
  body.hl-site #nav .site-search-trigger { width: 178px; }
  body.hl-site #nav .nav-right { gap: 8px !important; }
}
@media (max-width: 980px) {
  body.hl-site {
    --site-header-height: calc(56px + env(safe-area-inset-top, 0px));
    --terminal-nav-height: var(--site-header-height);
  }
  body.hl-site.models-terminal-route,
  body.hl-site.terminal-mobile-active { --terminal-nav-height: var(--site-header-height); }
  body.hl-site #nav.site-nav {
    gap: 8px !important;
    padding: env(safe-area-inset-top, 0px) max(10px, env(safe-area-inset-right, 0px)) 0 max(10px, env(safe-area-inset-left, 0px)) !important;
  }
  body.hl-site #nav #navToggle {
    order: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    height: 44px !important;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 4px;
    background: transparent !important;
    color: var(--site-text) !important;
    font-size: 14px !important;
  }
  body.hl-site #nav #navToggle::before { display: none; content: none; }
  body.hl-site #nav #navToggle[aria-expanded="true"] { background: var(--site-raised) !important; }
  body.hl-site #nav .brand { order: 1; flex: 1 1 auto; gap: 6px; min-height: 44px; font-size: 15px; }
  body.hl-site #nav .brand b { display: none; }
  body.hl-site #nav .brand > span { display: block; font-size: 15px; white-space: nowrap; }
  body.hl-site #nav .nav-right { order: 2; gap: 4px !important; }
  body.hl-site #nav .site-search-trigger { width: 44px; min-width: 44px; height: 44px; min-height: 44px; justify-content: center; padding: 0; border: 0; background: transparent; color: var(--site-text); }
  body.hl-site #nav .site-search-trigger > span,
  body.hl-site #nav .site-search-trigger > kbd { display: none; }
  body.hl-site #nav #connectBtn { min-width: 80px; max-width: min(34vw, 164px); min-height: 44px !important; height: 44px !important; padding: 0 10px !important; font-size: 14px !important; }
  body.hl-site #nav #navLinks { display: none !important; }
  body.hl-site #nav #navLinks.open {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 105;
    display: flex !important;
    flex: none;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0;
    width: 100% !important;
    max-height: calc(100dvh - var(--site-header-height));
    margin: 0;
    padding: 8px max(12px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    border: 0;
    border-bottom: 1px solid var(--site-border);
    background: var(--site-bg);
    box-shadow: 0 16px 32px #0006;
    overflow: auto;
    overscroll-behavior: contain;
  }
  body.hl-site #nav #navLinks > a { justify-content: flex-start; min-height: 48px; height: 48px; padding: 0 12px; font-size: 16px; }
  body.hl-site #nav #navLinks > a[aria-current="page"] { background: #16332f !important; }
  body.hl-site #nav .more { width: 100%; }
  body.hl-site #nav #moreBtn { display: none; }
  body.hl-site #nav #moreMenu {
    position: static !important;
    width: 100%;
    min-width: 0 !important;
    max-width: none;
    margin: 8px 0 0;
    padding: 8px 0 0 !important;
    border: 0 !important;
    border-top: 1px solid var(--site-border) !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
  }
  body.hl-site #nav .site-more-label { display: block; padding: 8px 12px 4px; color: var(--site-muted); font-size: 12px; }
  body.hl-site #nav #moreMenu a { min-height: 44px; padding: 10px 12px; font-size: 14px; }
  body.hl-site #nav #moreMenu a > small { font-size: 12px; }
  body.hl-site #siteSearch { inset: var(--site-search-top, 0px) 0 auto; height: var(--site-search-height, 100dvh); padding: 0; background: var(--site-bg); }
  body.hl-site #siteSearch .site-search-panel { width: 100%; min-height: 100%; height: 100%; max-height: 100%; padding-top: env(safe-area-inset-top, 0px); border: 0; border-radius: 0; box-shadow: none; }
  body.hl-site #siteSearch .site-search-input-row { gap: 10px; padding: 6px 10px 6px max(16px, env(safe-area-inset-left, 0px)); }
  body.hl-site #siteSearchInput { height: 44px; font-size: 16px; }
  body.hl-site #siteSearch .site-search-close { min-height: 44px; height: 44px; }
  body.hl-site #siteSearch .site-search-close > svg { display: block; }
  body.hl-site #siteSearch .site-search-escape { display: none; }
  body.hl-site #siteSearch .site-search-heading { padding-right: 16px; padding-left: 16px; }
  body.hl-site #siteSearch .site-search-results { padding-right: 4px; padding-left: 4px; }
  body.hl-site #siteSearch .site-search-result { min-height: 66px; }
  body.hl-site #siteSearch .site-search-result-name { font-size: 14px; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  body.hl-site #siteSearch .site-search-result-meta { font-size: 12px; }
  body.hl-site #siteSearch .site-search-actions { flex-direction: column; flex-shrink: 0; gap: 0; padding: 6px 8px max(8px, env(safe-area-inset-bottom, 0px)); }
  body.hl-site #siteSearch .site-search-actions a { flex: none; min-height: 44px; font-size: 14px; }
  body.hl-site #siteSearch .site-search-hint { display: none; }
}
@media (max-width: 359px) {
  body.hl-site #nav.site-nav { gap: 4px !important; padding-right: 8px !important; padding-left: 6px !important; }
  body.hl-site #nav .brand { gap: 4px; }
  body.hl-site #nav .brand > svg { width: 20px; height: 20px; }
  body.hl-site #nav .brand > span { font-size: 13px; }
  body.hl-site #nav #connectBtn { min-width: 76px; max-width: 100px; }
}
