/* PDFModule unified site chrome — shared top menu + context strip */

.sc {
  --sc-ink: #0f1419;
  --sc-mute: #5c6775;
  --sc-line: #e2e7ee;
  --sc-bg: rgba(255, 255, 255, 0.92);
  --sc-bg-solid: #ffffff;
  --sc-accent: #2f6fe0;
  --sc-accent-ink: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sc--overlay {
  --sc-ink: #ffffff;
  --sc-mute: rgba(255, 255, 255, 0.72);
  --sc-line: rgba(255, 255, 255, 0.12);
  --sc-bg: rgba(10, 12, 15, 0.72);
  --sc-bg-solid: #0a0c0f;
  --sc-accent: #ffffff;
  --sc-accent-ink: #0a0c0f;
}

.sc__bar {
  background: var(--sc-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--sc-line);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.sc.is-scrolled .sc__bar {
  background: var(--sc-bg-solid);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.sc--overlay.is-scrolled .sc__bar {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.sc__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.sc__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--sc-ink);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.sc__brand:hover {
  text-decoration: none;
  color: var(--sc-ink);
}

.sc__mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: block;
}

.sc__brand-sub {
  font-weight: 500;
  color: var(--sc-mute);
  font-size: 14px;
  margin-left: 2px;
}

.sc__primary {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.sc__primary a {
  color: var(--sc-mute);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.sc__primary a:hover {
  color: var(--sc-ink);
  background: rgba(15, 20, 25, 0.05);
  text-decoration: none;
}

.sc--overlay .sc__primary a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sc__primary a.is-active {
  color: var(--sc-ink);
  font-weight: 600;
  background: rgba(47, 111, 224, 0.1);
}

.sc--overlay .sc__primary a.is-active {
  background: rgba(255, 255, 255, 0.12);
}

.sc__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.sc__link {
  color: var(--sc-mute);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
}

.sc__link:hover {
  color: var(--sc-ink);
  text-decoration: none;
}

.sc__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, background 0.15s;
}

.sc__btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.sc__btn--primary {
  background: var(--sc-accent);
  color: var(--sc-accent-ink);
}

.sc--overlay .sc__btn--primary {
  background: #fff;
  color: #0a0c0f;
}

.sc:not(.sc--overlay) .sc__btn--primary {
  background: #0f1419;
  color: #fff;
}

.sc:not(.sc--overlay) .sc__btn--primary:hover {
  background: #1b2430;
  color: #fff;
}

.sc__btn--ghost {
  background: transparent;
  color: var(--sc-ink);
  border: 1px solid var(--sc-line);
}

.sc__toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.sc__toggle span {
  display: block;
  height: 2px;
  background: var(--sc-ink);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Context strip — changes per section */
.sc__context {
  background: var(--sc-bg-solid);
  border-bottom: 1px solid var(--sc-line);
  min-height: 42px;
}

.sc__context-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sc__context-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sc-mute);
  margin-right: 10px;
  flex-shrink: 0;
}

.sc__context a {
  color: var(--sc-mute);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.sc__context a:hover {
  color: var(--sc-ink);
  background: rgba(15, 20, 25, 0.05);
  text-decoration: none;
}

.sc__context a.is-active {
  color: var(--sc-accent);
  background: rgba(47, 111, 224, 0.1);
  font-weight: 600;
}

.sc--overlay .sc__context {
  background: rgba(10, 12, 15, 0.95);
}

.sc--overlay .sc__context a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* Mobile drawer */
@media (max-width: 860px) {
  .sc__toggle {
    display: flex;
    margin-left: auto;
  }

  .sc__primary,
  .sc__actions {
    display: none;
  }

  .sc.is-open .sc__primary,
  .sc.is-open .sc__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    background: var(--sc-bg-solid);
    border-bottom: 1px solid var(--sc-line);
    padding: 12px 16px 16px;
    gap: 4px;
    z-index: 1001;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  }

  .sc.is-open .sc__actions {
    top: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    box-shadow: none;
    border: 0;
    padding: 8px 0 0;
    margin-top: 8px;
  }

  .sc.is-open .sc__primary {
    /* primary panel includes actions as sibling — structure: both open */
  }

  /* Stack primary + actions in one panel via grid on open */
  .sc.is-open .sc__inner {
    flex-wrap: wrap;
    height: auto;
    min-height: 64px;
    padding-bottom: 0;
  }

  .sc.is-open .sc__primary {
    order: 10;
    width: 100%;
    position: static;
    box-shadow: none;
  }

  .sc.is-open .sc__actions {
    order: 11;
    width: 100%;
    position: static;
    justify-content: stretch;
  }

  .sc.is-open .sc__actions .sc__btn {
    flex: 1;
  }

  .sc.is-open .sc__toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .sc.is-open .sc__toggle span:nth-child(2) {
    opacity: 0;
  }
  .sc.is-open .sc__toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Body offset helper when pages had fixed old nav */
body.has-site-chrome {
  /* sticky chrome needs no padding unless page assumed fixed nav */
}
