.site-reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 2px;
  pointer-events: none;
  background: rgba(45, 212, 191, 0.08);
}

.site-reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--accent, #2dd4bf);
  opacity: 0.72;
}

.site-back-to-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 30px);
  z-index: 30;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.15));
  border-radius: 50%;
  background: rgba(8, 16, 22, 0.88);
  color: var(--accent, #2dd4bf);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.site-back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.site-back-to-top:hover { border-color: var(--accent, #2dd4bf); background: rgba(13, 29, 36, 0.96); }
.site-back-to-top:focus-visible { outline: 3px solid var(--network-focus, rgba(45, 212, 191, 0.55)); outline-offset: 3px; }
.site-back-to-top span { font-size: 1.35rem; line-height: 1; }

.site-header.is-compact .network-strip { display: none; }
.site-header.is-compact .nav { min-height: 52px; }

.has-heading-anchor { scroll-margin-top: 88px; }
.heading-anchor {
  margin-left: 0.5em;
  color: var(--accent, #2dd4bf);
  font-size: 0.72em;
  font-weight: 700;
  opacity: 0;
  text-decoration: none;
  transition: opacity 140ms ease;
}
.has-heading-anchor:hover .heading-anchor,
.heading-anchor:focus-visible { opacity: 0.85; }

.site-section-nav {
  position: sticky;
  top: 74px;
  z-index: 5;
  max-width: 1180px;
  margin: 0 auto 24px;
  padding: 10px 16px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
  background: rgba(8, 16, 22, 0.86);
  backdrop-filter: blur(14px);
}
.site-section-nav strong { display: block; margin-bottom: 6px; color: var(--text, #f5f7fb); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.site-section-nav div { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.site-section-nav a { color: var(--muted, #a7b4c7); font-size: 0.86rem; text-decoration: none; }
.site-section-nav a:hover, .site-section-nav a:focus-visible, .site-section-nav a.is-active { color: var(--accent, #2dd4bf); }

@media (max-width: 640px) {
  .site-back-to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
  .site-header.is-compact .brand span { display: none; }
  .site-section-nav { top: 52px; margin: 0 16px 18px; }
  .site-section-nav div { display: block; max-height: 0; overflow: hidden; transition: max-height 180ms ease; }
  .site-section-nav:focus-within div, .site-section-nav:hover div { max-height: 12rem; }
  .site-section-nav a { display: block; padding: 3px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .site-back-to-top, .heading-anchor, .site-section-nav div { transition: none; }
  .site-back-to-top { transform: none; }
}

@media print {
  .site-back-to-top, .site-reading-progress, .site-section-nav, .heading-anchor { display: none !important; }
}
