/* ─── Header: the ink bar — red "M" tile, chapter menu with colour squares,
   yellow subscribe button ─────────────────────────────────────────────── */

.hdr {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--on-color);
}
.admin-bar .hdr { top: 32px; }
.hdr-row { display: flex; align-items: center; gap: 28px; height: var(--hdr-h); }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 1.3rem;
  letter-spacing: -.01em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--on-color);
}
.logo img { width: 100%; height: auto; }
.lg-sq {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: var(--on-color);
  font-weight: 900;
  font-size: 1.1rem;
}

.nav { margin-left: auto; }
.nav-list { display: flex; gap: 2px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  text-decoration: none;
  font-size: .84rem;
  font-weight: 600;
  color: var(--on-color);
  position: relative;
}
.nav a i { flex: none; width: 9px; height: 9px; background: var(--c, var(--mark)); }
.nav a::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 0;
  height: 3px;
  background: var(--c, var(--mark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav a:hover::after,
.nav .current-menu-item > a::after,
.nav a[aria-current=page]::after { transform: none; }
.nav-x { display: none; }

.hdr .btn { background: var(--mark); color: var(--ink); border-color: var(--mark); }
.hdr .btn:hover { background: var(--on-color); border-color: var(--on-color); color: var(--ink); }

.burger { display: none; flex: none; width: 44px; height: 44px; border: 2px solid var(--on-color); position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--on-color); transition: transform .3s; }
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 24px; }
.burger[aria-expanded=true] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded=true] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 1199.98px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink);
    padding: 8px var(--gutter) 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .25s, transform .25s, visibility .25s;
    max-height: calc(100vh - var(--hdr-h));
    overflow-y: auto;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav-list { flex-direction: column; }
  .nav a {
    padding: 12px 0;
    font-family: var(--serif);
    font-weight: 800;
    font-size: 1.6rem;
    border-bottom: 1px solid var(--ink-80);
  }
  .nav a i { width: 14px; height: 14px; }
  .nav a::after { display: none; }
  .nav-x { display: block; }
  .hdr-cta { margin-left: auto; }
  .burger { display: block; }
}

@media (max-width: 782px) {
  .admin-bar .hdr { top: 46px; }
}

@media (max-width: 639.98px) {
  .hdr-row { gap: 10px; }
  .logo { font-size: 1.05rem; gap: 8px; }
  .lg-sq { width: 30px; height: 30px; }
  .hdr .btn { padding: 8px 10px; font-size: .74rem; }
}

@media (max-width: 379.98px) {
  .hdr-cta { display: none; }
  .burger { margin-left: auto; }
}
