/* STOC report viewer chrome: top bar + side navigation injected around the
   fixed-layout (A4) report documents. Loaded with absolute paths so it is
   shared by every report under /reports-html/<slug>/. */

:root {
  --stoc-bar-h: 56px;
  --stoc-nav-w: 272px;
  --stoc-navy: #041e40;
  --stoc-teal: #16333a;
  --stoc-accent: #1275b0;
}

html {
  scroll-behavior: smooth;
}

/* Keep jumped-to pages clear of the fixed top bar. */
.page {
  scroll-margin-top: calc(var(--stoc-bar-h) + 12px);
}

body {
  padding-top: calc(var(--stoc-bar-h) + 13mm) !important;
}

/* ── Top bar ── */
#stoc-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--stoc-bar-h);
  background: var(--stoc-navy);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  z-index: 4000;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
}
#stoc-bar .stoc-bar-logo img {
  height: 30px;
  width: auto;
  display: block;
}
#stoc-bar .stoc-bar-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: center;
}
#stoc-bar a.stoc-bar-back {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
#stoc-bar a.stoc-bar-back:hover {
  color: #fff;
}
#stoc-bar a.stoc-bar-download {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 9999px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}
#stoc-bar a.stoc-bar-download:hover {
  background: rgba(255, 255, 255, 0.15);
}
#stoc-nav-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 9999px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 7px 16px;
  cursor: pointer;
  white-space: nowrap;
}
#stoc-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── Side navigation ── */
#stoc-sidenav {
  position: fixed;
  top: var(--stoc-bar-h);
  left: 0;
  bottom: 0;
  width: var(--stoc-nav-w);
  background: #fff;
  border-right: 1px solid #e2e2e2;
  overflow-y: auto;
  z-index: 3500;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  padding: 18px 0 40px;
}
body.stoc-nav-open #stoc-sidenav {
  transform: translateX(0);
}
#stoc-sidenav .stoc-nav-heading {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5f6b7a;
  padding: 4px 20px 10px;
}
#stoc-sidenav .stoc-nav-group {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9aa4af;
  padding: 14px 20px 4px;
}
#stoc-sidenav button.stoc-nav-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.35;
  color: #22303c;
  padding: 8px 16px 8px 17px;
  cursor: pointer;
}
#stoc-sidenav button.stoc-nav-item:hover {
  background: #f4f6f8;
}
#stoc-sidenav button.stoc-nav-item.active {
  border-left-color: var(--stoc-accent);
  background: #eef4f9;
  color: var(--stoc-navy);
  font-weight: 700;
}
#stoc-sidenav button.stoc-nav-item .stoc-nav-pg {
  margin-left: auto;
  font-size: 10.5px;
  color: #9aa4af;
  flex-shrink: 0;
}

/* Push the document right when the nav is docked (wide screens only). */
@media (min-width: 1360px) {
  body.stoc-nav-open {
    padding-left: var(--stoc-nav-w);
  }
}

/* Overlay backdrop on narrow screens */
#stoc-nav-backdrop {
  display: none;
  position: fixed;
  inset: var(--stoc-bar-h) 0 0 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 3400;
}
@media (max-width: 1359px) {
  body.stoc-nav-open #stoc-nav-backdrop {
    display: block;
  }
}

@media (max-width: 700px) {
  #stoc-bar {
    gap: 10px;
    padding: 0 12px;
  }
  #stoc-bar .stoc-bar-title,
  #stoc-bar a.stoc-bar-back {
    display: none;
  }
  #stoc-bar .stoc-bar-logo {
    margin-right: auto;
  }
}
