/* ==========================================================================
   CUBE Collective — floating site index (cubecore.pro)  ·  site-rail.css v20261009a
   One panel replaces the five page-local headers and the sub-header chip bar on desktop.
   Donor contract: CUBE OneCare DocumentToc / sticky-aside (card index, aria-current, header-offset
   variable), hardwon PublicSectionRail (rail + scroll-spy), Atlas SectionRail (roving focus).
   Style: OneCare/CUBE dark glass card. No runtime is shared: this is a static asset.
   ========================================================================== */

/* ── Tokens (own fallbacks: the legal/annex pages do not define the investor tokens) ───────────── */
.csr, .csr-fab, .csr-tip, .csr-scrim {
  --csr-bg-a: rgba(14, 35, 58, .94);
  --csr-bg-b: rgba(8, 23, 40, .97);
  --csr-line: rgba(160, 190, 220, .16);
  --csr-line-strong: rgba(73, 211, 207, .38);
  --csr-text: #e9f0f8;
  --csr-muted: #9fb0c3;
  --csr-dim: #93a8bf;
  --csr-cyan: #00b8c2;
  --csr-cyan-soft: #49d3cf;
  --csr-blue: #0078ff;
  --csr-radius: 20px;
  --csr-ease: cubic-bezier(.2, .7, .2, 1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root { --csr-push: 0px; }

/* ── The panel ─────────────────────────────────────────────────────────────────────────────────── */
.csr {
  position: fixed; z-index: 950; top: 16px; left: 16px; bottom: 16px; width: 264px;
  display: none; flex-direction: column; min-height: 0;
  color: var(--csr-text);
  background: linear-gradient(155deg, var(--csr-bg-a), var(--csr-bg-b));
  border: 1px solid var(--csr-line); border-radius: var(--csr-radius);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  overflow: hidden;
  transition: width .24s var(--csr-ease), box-shadow .24s var(--csr-ease);
}
.csr *, .csr *::before, .csr *::after { box-sizing: border-box; }
.csr a { color: inherit; text-decoration: none; }
.csr ol, .csr ul { list-style: none; margin: 0; padding: 0; }
.csr li { margin: 0; padding: 0; }
.csr p { margin: 0; }

.csr-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 12px 12px 16px; border-bottom: 1px solid var(--csr-line); flex: 0 0 auto;
}
.csr-brand {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0; border-radius: 10px;
  font-size: 14px; font-weight: 800; letter-spacing: -.005em; white-space: nowrap;
}
.csr-brand .csr-mark { width: 28px; height: 28px; flex: 0 0 auto; display: block; }
.csr-brand em { font-style: normal; font-weight: 500; color: var(--csr-muted); }

.csr-btn {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto;
  width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0;
  color: var(--csr-muted); background: rgba(255, 255, 255, .04);
  border: 1px solid var(--csr-line); border-radius: 10px; cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.csr-btn:hover { color: #fff; background: rgba(255, 255, 255, .09); border-color: var(--csr-line-strong); }
.csr-btn svg { width: 16px; height: 16px; display: block; transition: transform .24s var(--csr-ease); }
.csr-btn-close { display: none; }

/* Focus ring: visible on the dark glass, never removed. */
.csr a:focus-visible, .csr button:focus-visible, .csr-fab:focus-visible {
  outline: 2px solid var(--csr-cyan-soft); outline-offset: 2px; border-radius: 10px;
}

.csr-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  padding: 10px 10px 18px; scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10px, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 10px, #000 calc(100% - 22px), transparent 100%); scrollbar-color: rgba(160, 190, 220, .25) transparent;
}
.csr-body::-webkit-scrollbar { width: 6px; }
.csr-body::-webkit-scrollbar-thumb { background: rgba(160, 190, 220, .25); border-radius: 6px; }

.csr-group + .csr-group { margin-top: 12px; }
.csr-group-label {
  padding: 4px 10px 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--csr-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Foldable group header (Legal & trust): a real button, label + chevron */
.csr-group-toggle {
  appearance: none; -webkit-appearance: none; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: none; border: 0; border-radius: 8px; cursor: pointer; font-family: inherit; text-align: left;
}
.csr-group-toggle:hover { color: var(--csr-text); background: rgba(255, 255, 255, .04); }
.csr-group-toggle svg { width: 14px; height: 14px; flex: 0 0 auto; transition: transform .2s var(--csr-ease); }
.csr-group-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.csr-group.is-folded .csr-list { display: none; }

/* Page row (donor DocumentToc: numbered circle + label) */
.csr-link {
  display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 4px 10px; border-radius: 12px;
  font-size: 13.5px; font-weight: 600; color: var(--csr-muted);
  transition: background .18s ease, color .18s ease;
}
.csr-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.csr-link:hover .csr-ico { background: rgba(0, 184, 194, .2); }
.csr-ico {
  flex: 0 0 auto; width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 10px;
  color: var(--csr-cyan-soft); background: rgba(0, 184, 194, .1);
  transition: background .18s ease, color .18s ease;
}
.csr-ico svg { width: 16px; height: 16px; display: block; }
.csr-label { min-width: 0; flex: 1 1 auto; }
.csr .csr-clamp {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; overflow-wrap: anywhere; line-height: 1.3;
}
.csr-page.is-current > .csr-link { color: #fff; background: rgba(0, 184, 194, .11); }
.csr-page.is-current > .csr-link .csr-ico { color: #04121e; background: linear-gradient(135deg, var(--csr-cyan), #00d094); }

/* Sections of the page you are on (scroll-spy) */
.csr-sections {
  position: relative; margin: 4px 0 6px 21px; padding-left: 10px; border-left: 1px solid var(--csr-line);
}
.csr-sec {
  position: relative; display: block; padding: 5px 10px; border-radius: 9px;
  font-size: 12.5px; font-weight: 500; line-height: 1.3; color: var(--csr-muted);
  transition: background .18s ease, color .18s ease;
}
.csr-sec:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.csr-sec[aria-current="true"] { color: #fff; font-weight: 700; background: rgba(0, 120, 255, .12); }
.csr-sec[aria-current="true"]::before {
  content: ""; position: absolute; left: -11px; top: 7px; bottom: 7px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--csr-cyan), var(--csr-blue));
}

.csr-foot { flex: 0 0 auto; padding: 10px 12px 12px; border-top: 1px solid var(--csr-line); }
.csr-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 14px;
  border-radius: 12px; font-size: 13px; font-weight: 800; color: #04121e !important; white-space: nowrap;
  background: linear-gradient(135deg, var(--csr-cyan), var(--csr-blue)); box-shadow: 0 8px 22px rgba(0, 120, 255, .22);
  transition: transform .18s ease, box-shadow .18s ease;
}
.csr-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0, 120, 255, .32); }
.csr-cta svg { width: 14px; height: 14px; flex: 0 0 auto; }
.csr-cta-text { overflow: hidden; text-overflow: ellipsis; }

/* ── Collapsed (icon rail): the labels stay in the accessibility tree, only the pixels go ─────── */
.csr-collapsed .csr { width: 56px; }
.csr-collapsed .csr-head { flex-direction: column; padding: 12px 0 10px; gap: 10px; }
.csr-collapsed .csr-btn-collapse svg { transform: rotate(180deg); }
.csr-collapsed .csr-body { padding: 10px 0 18px; }
.csr-collapsed .csr-group-label { display: none; }
.csr-collapsed .csr-group.is-folded .csr-list { display: block; }
.csr-collapsed .csr-btn-collapse { color: var(--csr-cyan-soft); border-color: var(--csr-line-strong); background: rgba(0, 184, 194, .1); }
.csr-collapsed .csr-group + .csr-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--csr-line); }
.csr-collapsed .csr-link { justify-content: center; padding: 6px 0; margin: 0 8px; gap: 0; }
.csr-collapsed .csr-sections { display: none; }
.csr-collapsed .csr-foot { padding: 10px 8px 12px; }
.csr-collapsed .csr-cta { padding: 0; }
.csr-collapsed .csr-brand span,
.csr-collapsed .csr-label,
.csr-collapsed .csr-cta-text {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ── Visual tooltip (collapsed labels + truncated labels). The name is already in the link: aria-hidden ── */
.csr-tip {
  position: fixed; z-index: 1300; max-width: 300px; padding: 8px 12px; border-radius: 10px;
  font-size: 12.5px; font-weight: 600; line-height: 1.35; color: var(--csr-text);
  background: #0c1c2f; border: 1px solid var(--csr-line-strong); box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transition: opacity .14s ease; pointer-events: auto;
}
.csr-tip.is-on { opacity: 1; visibility: visible; }

/* ── Floating button + scrim (below 1024 px only) ─────────────────────────────────────────────── */
.csr-fab, .csr-scrim { display: none; }

/* ── Desktop: the panel replaces the headers ───────────────────────────────────────────────────── */
@media (min-width: 1024px) {
  html.csr-on { --csr-push: 96px; }
  /* Right gutter keeps the analyst tab (44 px, fixed to the right edge) clear of the content. */
  html.csr-on body { padding-left: var(--csr-push); padding-right: 60px; }
  html.csr-on .csr { display: flex; }

  /* The five page-local headers, the investor sub-header chips and the legal tab strip are now one panel. */
  html.csr-on .site-nav,
  html.csr-on .section-rail,
  html.csr-on .hub-nav,
  html.csr-on .legal-header,
  html.csr-on body > nav.nav { display: none !important; }

  /* Anchors land near the top: there is no sticky header to clear any more. */
  html.csr-on section[id], html.csr-on .section, html.csr-on header[id], html.csr-on h2[id], html.csr-on .deck-slide { scroll-margin-top: 28px; }

  /* Full-bleed bands are centred on the viewport, not on the padded body (the home <main> clipped them to its own box). */
  html.csr-on .corp-main { overflow-x: visible; }
  html.csr-on .section-light::before,
  html.csr-on .section-light::after { left: calc(50% - (var(--csr-push) - 60px) / 2); }

  /* Story deck keeps its presentation controls: they sit beside the panel. */
  html.csr-on .deck-nav, html.csr-on .deck-progress { left: var(--csr-push); }
  html.csr-on .deck-brand, html.csr-on .deck-controls a.deck-home-btn, html.csr-on .deck-controls a { display: none !important; } /* brand, Home and Investors live in the index */
  html.csr-on .slide-number { right: max(24px, calc((100vw - var(--csr-push) - 60px - var(--max, 1180px)) / 2)); }

  /* Consent notice centres on the content, not on the whole window. */
  html.csr-on .cube-privacy-notice { left: calc(var(--csr-push) + 1rem); width: min(1040px, calc(100% - var(--csr-push) - 2rem)); margin-inline: 0; }
}
@media (min-width: 1280px) {
  html.csr-on:not(.csr-collapsed) { --csr-push: 296px; }
}
/* 1024–1279: the open panel floats over the page instead of pushing it. */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  html.csr-on:not(.csr-collapsed) .csr { box-shadow: 0 30px 90px rgba(0, 0, 0, .6), 0 0 0 1px var(--csr-line-strong); }
}

/* ── Below 1024: the legacy mobile header stays; the index opens as a drawer ─────────────────── */
@media (max-width: 1023.98px) {
  html.csr-on .csr {
    display: flex; top: 0; bottom: 0; left: 0; width: min(84vw, 320px); border-radius: 0 var(--csr-radius) var(--csr-radius) 0;
    z-index: 11060; transform: translateX(-104%); visibility: hidden;
    transition: transform .28s var(--csr-ease), visibility 0s linear .28s;
    padding-top: env(safe-area-inset-top, 0px);
  }
  html.csr-on.csr-open .csr { transform: none; visibility: visible; transition: transform .28s var(--csr-ease), visibility 0s; }
  .csr-btn-collapse { display: none; }
  .csr-btn-close { display: inline-grid; }
  .csr-link { min-height: 44px; }
  .csr-sec { padding: 10px 10px; }
  /* The icon-rail state never applies to the drawer. */
  .csr-collapsed .csr { width: min(84vw, 320px); }
  .csr-collapsed .csr-head { flex-direction: row; padding: 14px 12px 12px 16px; gap: 8px; }
  .csr-collapsed .csr-group-label { display: block; }
  .csr-collapsed .csr-group-label.csr-group-toggle { display: flex; }
  .csr-collapsed .csr-group.is-folded .csr-list { display: none; }
  .csr-collapsed .csr-body { padding: 10px 10px 18px; }
  .csr-collapsed .csr-group + .csr-group { margin-top: 14px; padding-top: 0; border-top: 0; }
  .csr-collapsed .csr-link { justify-content: flex-start; padding: 6px 10px; margin: 0; gap: 11px; }
  .csr-collapsed .csr-sections { display: block; }
  .csr-collapsed .csr-foot { padding: 10px 12px 12px; }
  .csr-collapsed .csr-cta { padding: 0 14px; }
  .csr-collapsed .csr-brand span,
  .csr-collapsed .csr-label,
  .csr-collapsed .csr-cta-text { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; clip-path: none; white-space: normal; }
  .csr-collapsed .csr-brand span { white-space: nowrap; }
  .csr-collapsed .csr-cta-text { white-space: nowrap; overflow: hidden; }

  html.csr-on .csr-scrim {
    display: block; position: fixed; inset: 0; z-index: 11055; background: rgba(4, 10, 18, .62);
    opacity: 0; visibility: hidden; transition: opacity .24s ease, visibility 0s linear .24s;
  }
  html.csr-on.csr-open .csr-scrim { opacity: 1; visibility: visible; transition: opacity .24s ease, visibility 0s; }
  html.csr-on.csr-open { overflow: hidden; }

  html.csr-on .csr-fab {
    position: fixed; z-index: 11030; left: 14px; bottom: max(14px, env(safe-area-inset-bottom, 0px));
    width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0; cursor: pointer;
    color: var(--csr-text); background: linear-gradient(155deg, var(--csr-bg-a), var(--csr-bg-b));
    border: 1px solid var(--csr-line-strong); border-radius: 16px; box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
  .csr-fab svg { width: 22px; height: 22px; display: block; }
  html.csr-on .csr-fab { transition: transform .22s var(--csr-ease), opacity .22s ease; }
  html.csr-on .csr-fab.is-away { transform: translateY(80px); opacity: 0; }
  html.csr-open .csr-fab { visibility: hidden; }
  .csr-tip { display: none; }

  /* Legacy mobile headers, tightened: a long menu scrolls inside the viewport instead of running off it, and the
     story deck keeps Previous / Next / Share on one row (Home, Investors and Full screen live in the index / are desktop-only). */
  html.csr-on .deck-controls a, html.csr-on .deck-controls a.deck-home-btn, html.csr-on #fullscreenDeck { display: none !important; }
}

@media (max-width: 959.98px) {
  html.csr-on .nav-links { max-height: calc(100dvh - var(--nav-h, 64px) - 16px); overflow-y: auto; overscroll-behavior: contain; }
}

@media (prefers-reduced-motion: reduce) {
  .csr, .csr *, .csr-scrim, .csr-fab, .csr-tip { transition: none !important; animation: none !important; }
}
@media print {
  .csr, .csr-fab, .csr-scrim, .csr-tip { display: none !important; }
  html.csr-on body { padding-left: 0 !important; padding-right: 0 !important; }
}
