/* TOHOL: one sticky section menu for every page. 27 September 2026.
   Loaded after page styles. Existing headers, content and image viewers are unchanged. */
:root {
  --section-header-height: 89px;
  --section-nav-height: 54px;
  --section-anchor-offset: calc(var(--section-header-height) + var(--section-nav-height) + 20px);
}
html { scroll-padding-top: var(--section-anchor-offset); }
/* The root scroll padding is the single source of truth. Do not add legacy
   per-card offsets on top of the two sticky navigation bars. */
body main [id] { scroll-margin-top: 0; }
.section-nav {
  position: -webkit-sticky;
  position: sticky;
  top: var(--section-header-height);
  z-index: 90;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #dce5f0;
  transition: box-shadow .18s ease;
}
.section-nav.is-stuck { box-shadow: 0 4px 14px rgb(7 30 74 / 6%); }
.section-nav .section-nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}
.section-nav .section-nav-rail {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  gap: 30px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.section-nav.is-enhanced .section-nav-rail { scrollbar-width: none; }
.section-nav.is-enhanced .section-nav-rail::-webkit-scrollbar { display: none; }
.section-nav .section-nav-rail > a {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 54px;
  padding: 16px 0;
  white-space: nowrap;
  font-size: .81rem;
  line-height: 1.5;
  font-weight: 650;
  color: #526680;
  text-decoration: none;
  transition: color .16s ease;
}
.section-nav .section-nav-rail > a:hover,
.section-nav .section-nav-rail > a[aria-current="location"] { color: #0758c1; }
.section-nav .section-nav-rail > a::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: #0864d9;
  border-radius: 3px 3px 0 0;
  opacity: 0;
}
.section-nav .section-nav-rail > a[aria-current="location"]::after { opacity: 1; }
.section-nav .section-nav-rail > a:focus-visible {
  outline: 2px solid #0864d9;
  outline-offset: -2px;
  border-radius: 4px;
}
.section-nav .section-nav-status {
  padding: 2px 6px;
  border-radius: 4px;
  background: #fff1f1;
  color: #9d2530;
  font-size: .61rem;
  line-height: 1.5;
  font-weight: 650;
}
.section-nav .section-nav-scroll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 44px;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #0864d9;
  cursor: pointer;
}
.section-nav .section-nav-scroll svg { width: 20px; height: 20px; }
.section-nav .section-nav-scroll--prev { margin-right: 6px; }
.section-nav .section-nav-scroll--next { margin-left: 6px; }
.section-nav .section-nav-scroll:disabled { opacity: .3; cursor: default; }
.section-nav .section-nav-scroll:not(:disabled):hover { background: #f0f6fd; }
.section-nav .section-nav-scroll:focus-visible { outline: 2px solid #0864d9; outline-offset: -2px; }
@media (max-width: 1180px) { :root { --section-header-height: 79px; } }
@media (max-width: 540px) {
  :root { --section-header-height: 75px; }
  .section-nav .section-nav-rail { gap: 22px; }
  .section-nav .section-nav-rail > a { font-size: .77rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .section-nav, .section-nav * { transition: none !important; scroll-behavior: auto; }
}
@media print {
  .section-nav { display: none !important; }
  html { scroll-padding-top: 0; }
}
