#masthead.ctj-header {
  --ctj-header-bg: #102a40;
  --ctj-header-text: #f5f8fa;
  --ctj-header-accent: #43d0d8;
  --ctj-header-rule: #335368;
  position: relative;
  z-index: 20;
  background: var(--ctj-header-bg);
  color: var(--ctj-header-text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
#masthead.ctj-header *, #masthead.ctj-header *::after { box-sizing: border-box; }
.ctj-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 2.2vw, 36px);
  width: min(100% - 64px, 1440px);
  min-height: 72px;
  margin-inline: auto;
}
#masthead.ctj-header a, #masthead.ctj-header summary {
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}
#masthead.ctj-header a:hover, #masthead.ctj-header summary:hover { color: var(--ctj-header-accent); }
#masthead.ctj-header :is(a, summary):focus-visible {
  outline: 2px solid var(--ctj-header-accent);
  outline-offset: 4px;
}
#masthead.ctj-header ul { list-style: none; padding: 0; margin: 0; }
#masthead.ctj-header summary { list-style: none; }
#masthead.ctj-header summary::-webkit-details-marker { display: none; }
.ctj-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1.15;
  font-size: clamp(1.12rem, 1.6vw, 1.47rem);
  font-weight: 750;
  letter-spacing: -.025em;
}
.ctj-header-brand img { display: block; width: 39px; height: auto; }
.ctj-header-desktop > ul, .ctj-header-actions { display: flex; align-items: center; gap: clamp(15px, 1.9vw, 30px); }
.ctj-header :is(nav, .ctj-header-actions) { font-size: .94rem; font-weight: 650; white-space: nowrap; }
.ctj-header-desktop > ul > li > a, .ctj-header-more > summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}
#masthead.ctj-header [aria-current="page"] { color: var(--ctj-header-accent); }
.ctj-header-desktop > ul > li > [aria-current="page"] { position: relative; }
.ctj-header-desktop > ul > li > [aria-current="page"]::after {
  position: absolute;
  inset: auto 0 1px;
  height: 2px;
  background: var(--ctj-header-accent);
  content: "";
}
.ctj-header-more { position: relative; }
.ctj-header-more > summary { gap: 4px; }
.ctj-header-icon { display: block; width: 24px; height: 24px; }
.ctj-header-icon-chevron { width: 16px; height: 16px; }
.ctj-header-more[open] .ctj-header-icon-chevron { transform: rotate(180deg); }
#masthead .ctj-header-more > ul {
  position: absolute;
  top: calc(100% + 4px);
  right: -12px;
  min-width: 154px;
  padding: 6px;
  border: 1px solid var(--ctj-header-rule);
  border-radius: 8px;
  background: var(--ctj-header-bg);
}
.ctj-header-more li a { display: block; padding: 10px; }
#masthead.ctj-header a.ctj-header-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding-inline: 14px;
  border: 1px solid var(--ctj-header-accent);
  border-radius: 7px;
  color: var(--ctj-header-accent);
}
#masthead.ctj-header a.ctj-header-book:hover { background: #183e53; }
.ctj-header-mobile { display: none; }
.ctj-header :is(.ctj-header-label-open, .ctj-header-label-close) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.ctj-header-mobile:not([open]) :is(.ctj-header-icon-close, .ctj-header-label-close),
.ctj-header-mobile[open] :is(.ctj-header-icon-menu, .ctj-header-label-open) { display: none; }

@media (max-width: 1099px) {
  .ctj-header-row { width: calc(100% - 32px); min-height: 61px; gap: 8px; }
  .ctj-header-desktop, .ctj-header-actions { display: none; }
  .ctj-header-brand { font-size: clamp(1.02rem, 4.5vw, 1.28rem); gap: 7px; }
  .ctj-header-brand img { width: 30px; }
  .ctj-header-mobile { display: block; }
  .ctj-header-mobile > summary { display: grid; min-width: 44px; min-height: 44px; place-items: center; }
  #ctj-header-mobile-nav {
    position: absolute;
    inset: 100% 0 auto;
    max-height: calc(100dvh - 61px);
    overflow-y: auto;
    padding: 12px 20px 18px;
    border-top: 1px solid var(--ctj-header-rule);
    background: var(--ctj-header-bg);
  }
  .ctj-header-mobile li a, .ctj-header-mobile-actions a { display: flex; align-items: center; min-height: 44px; }
  .ctj-header-mobile-actions { display: grid; gap: 5px; padding-top: 10px; }
  #masthead .ctj-header-mobile-actions .ctj-header-book { min-height: 44px; }
}
