/* Masthead and in-flow category navigation, shared by every page. */
html { scroll-padding-top: 20px; }
.utility-inner { min-height: 28px; }
.masthead {
  height: 96px;
  gap: 32px;
}
.brand { min-width: 0; gap: 28px; }
.brand-copy { font-size: 15px; line-height:1.85; padding-left: 27px; }
.brand-copy small { color: #516c84; letter-spacing: 1.6px; margin-top: 7px; }
.header-actions { gap: 12px; flex-shrink: 0; }
.header-actions .icon-button {
  width: auto;
  height: 44px;
  min-width: 44px;
  padding: 0 15px;
  gap: 9px;
  border-radius: 8px;
  font-size: 12px;
  line-height:1.85;
  transition: background .18s, border-color .18s;
}
.header-actions .icon-button svg { width: 18px; height: 18px; flex-shrink: 0; }
.header-actions .saved-button {
  display: inline-flex;
  background: white;
  border-color: var(--line);
  color: var(--ink);
}
.header-actions .saved-button:hover { background: var(--soft); border-color: #afbfcd; }
.header-actions .saved-button .action-label {
  position: static;
  width: auto;
  height: auto;
  min-width: 0;
  color: inherit;
  background: none;
  border-radius: 0;
  font: inherit;
}
.header-actions #saved-count {
  position: static;
  display: inline-block;
  min-width: 21px;
  width: auto;
  height: 21px;
  padding: 0 5px;
  border-radius: 5px;
  font: 10px/21px Arial,sans-serif;
  background: var(--red);
  color: white;
  text-align: center;
}
.header-actions .search-trigger { color: var(--ink); background: white; border-color: var(--line); }
.header-actions .search-trigger:hover { color: var(--navy); background: var(--soft); border-color: #afbfcd; }
.header-actions .search-trigger[aria-expanded=true] { color: var(--navy); background: var(--soft); border-color: var(--navy); }

.nav-wrap {
  position: static;
  top: auto;
  z-index: auto;
  background: var(--navy);
  border-top: 4px solid var(--red);
  border-bottom: 0;
  box-shadow: 0 5px 15px #122f4912;
}
.main-nav {
  display: grid;
  grid-template-columns: .8fr 1.25fr 1.45fr 1.35fr 1.45fr .8fr 1.45fr .9fr;
  align-items: stretch;
  gap: 7px;
  height: 52px;
  padding: 0;
  overflow: visible;
}
.main-nav a {
  min-width: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 0;
  color: white;
  font-size: 15px;
  font-weight: 600;
  line-height: 2;
  white-space: nowrap;
  transition: background .18s, color .18s;
}
.main-nav a:hover { color: white; background: #ffffff18; }
.main-nav a.active {
  color: var(--gold);
  background: transparent;
  box-shadow: none;
}
.main-nav a.active:after { display: block; content: ''; position: absolute; bottom: 0; left: 10px; right: 10px; height: 4px; background: var(--gold); }
.main-nav .nav-home svg { width: 16px; height: 16px; margin-right: 0; }
.main-nav .journal-nav { background: transparent; color: white; border: 1px solid transparent; }
.main-nav .journal-nav:hover { background: #ffffff18; }
.main-nav .journal-nav.active { background: transparent; color: var(--gold); border-color: transparent; }
.main-nav .journal-nav svg { width: 17px; height: 17px; }
.mobile-nav-summary { display: none; }
.category-menu-button { width: auto; height: auto; flex-shrink: 0; border: 0; font: inherit; }

@media(min-width:1101px) and (max-width:1250px) {
  .main-nav { gap: 4px; }
  .main-nav a { font-size: 14px; padding: 0 7px; }
}
@media(max-width:1100px) {
  .masthead { height: 90px; gap: 24px; }
  .brand { gap: 23px; }
  .brand-copy { font-size: 13px; padding-left: 23px; }
  .header-actions .icon-button { padding: 0 12px; }
  .header-actions .action-label { display: none; }
  .mobile-nav-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 52px; }
  .category-menu-button {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-height: 43px;
    padding: 9px 14px;
    border: 1px solid #ffffff55;
    border-radius: 7px;
    color: white;
    background: #ffffff12;
    font-size: 15px;
    line-height: 2;
    font-weight: 600;
  }
  .category-menu-button > svg { width: 17px; height: 17px; }
  .category-menu-button .menu-chevron { width: 15px; height: 15px; color: #dce7f0; margin-left: 8px; transition: transform .18s; }
  .category-menu-button[aria-expanded=true] { color: var(--navy); border-color: var(--gold); background: white; }
  .category-menu-button[aria-expanded=true] .menu-chevron { transform: rotate(180deg); color: var(--navy); }
  .mobile-journal-shortcut { display: flex; align-items: center; gap: 9px; font-size: 15px; line-height: 2; color: white; padding: 9px 0 9px 9px; }
  .mobile-journal-shortcut > svg { width: 18px; height: 18px; }
  .mobile-journal-shortcut > span { font-size: 14px; color: #dce7f0; }
  .main-nav { display: none; }
  .nav-wrap.mobile-open .main-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    height: auto;
    padding: 2px 0 16px;
    overflow: visible;
  }
  .nav-wrap.mobile-open .main-nav a {
    justify-content: flex-start;
    height: auto;
    min-height: 51px;
    padding: 11px 15px;
    white-space: normal;
    font-size: 15px;
    line-height: 2;
    border: 1px solid #ffffff30;
    background: #ffffff0d;
  }
  .nav-wrap.mobile-open .main-nav a.active { color: var(--gold); background: #ffffff0d; border-color: #d4ab6099; }
  .nav-wrap.mobile-open .main-nav a.active:after { bottom: 0; left: 12px; right: 12px; height: 3px; }
}
@media(max-width:680px) {
  .masthead { height: 80px; gap: 16px; }
  .brand { gap: 0; }
  .brand-copy { display: none; }
  .brand-mark { font-size: 51px; letter-spacing: -3px; }
  .brand-mark > span { font-size: 27px; letter-spacing: -1.5px; margin-left: 6px; }
  .brand-mark > i { height: 4px; width: 26px; bottom: -10px; }
  .header-actions { gap: 9px; }
  .header-actions .icon-button { width: 43px; height: 43px; min-width: 43px; padding: 0; }
  .header-actions #saved-count {
    position: absolute;
    top: -6px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--red);
    color: white;
    font-size: 9px;
    line-height: 17px;
    border: 2px solid white;
    box-sizing: content-box;
  }
  .mobile-nav-summary { min-height: 52px; }
  .category-menu-button { font-size: 14px; gap: 9px; padding: 9px 12px; }
  .mobile-journal-shortcut { font-size: 14px; gap: 8px; }
  .nav-wrap.mobile-open .main-nav a { font-size: 14px; padding: 12px 13px; }
}
@media(max-width:359px) {
  .masthead { height: 76px; gap: 12px; }
  .brand-mark { font-size: 45px; }
  .brand-mark > span { font-size: 24px; margin-left: 5px; }
  .header-actions { gap: 8px; }
  .header-actions .icon-button { width: 40px; height: 42px; min-width: 40px; }
  .nav-wrap.mobile-open .main-nav a { padding: 11px 10px; font-size: 13px; }
}
@media(prefers-reduced-motion:reduce) {
  .header-actions .icon-button,.main-nav a,.category-menu-button .menu-chevron { transition: none; }
}
@media print {
  .nav-wrap,.header-actions { display: none!important; }
}
