/* ==========================================================================
   COMPONENTS · NAMEPLATE — the global running head of the periodical of record.
   One identity, learned once: identical on every page, the mark is always home
   (→ the map). A slim dateline strip carries the standing line + edition + sign
   in; the main bar carries the nameplate, the six destinations (Methodology set
   apart as the trust anchor), a quiet persistent Search, and Subscribe as the
   one permitted emphasis. Closes with THE single rubric hairline. Plus its
   mobile form: a search + a hamburger that open a full-screen index menu.

   This is the GLOBAL chrome. It never competes with the per-issue .op-masthead
   (the cover treatment of a country/factor page) — that title is the largest
   serif on the page; this nameplate is small-caps furniture + the wordmark.
   Composes .op-mark, .op-nav__link, .op-btn, .op-kicker.
   ========================================================================== */

.op-nameplate {
  background: var(--surface);
}

/* — The dateline: a slim strip above the bar, the periodical's standing line — */
.op-nameplate__dateline {
  border-bottom: 1px solid var(--rule-faint);
}
.op-nameplate__dateline-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-3xs);
}
.op-nameplate__standing {
  font-family: var(--font-furniture);
  font-size: var(--text-3xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}
.op-nameplate__dateline-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.op-nameplate__edition {
  font-family: var(--font-data);
  font-size: var(--text-3xs);
  letter-spacing: var(--tracking-wide);
  font-variant-numeric: tabular-nums lining-nums;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* — The light/dark edition switch — quiet dateline furniture, never an accent.
     One button carries both glyphs; the cascade reveals the one matching the
     EFFECTIVE theme (explicit [data-theme], else the OS preference). It offers
     the lamp when lit, the moon when dark — current state, not the inverse. — */
.op-nameplate__edition-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xs);
  margin: calc(-1 * var(--space-3xs)) 0; /* keep the visual line, grow the hit area */
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-standard);
}
.op-nameplate__edition-toggle:hover { color: var(--accent); }
.op-nameplate__edition-toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.op-theme-icon { display: block; width: 0.9rem; height: 0.9rem; }

/* Default + explicit light: the moon is on offer (we are lit). */
.op-theme-icon--sun  { display: none; }
.op-theme-icon--moon { display: block; }

/* Effective dark — via the OS preference (unless explicitly forced light)… */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .op-theme-icon--sun  { display: block; }
  :root:not([data-theme="light"]) .op-theme-icon--moon { display: none; }
}
/* …or via an explicit dark choice (wins over the OS in either direction). */
:root[data-theme="dark"] .op-theme-icon--sun  { display: block; }
:root[data-theme="dark"] .op-theme-icon--moon { display: none; }

/* — The main bar: the sticky running head — */
.op-nameplate__bar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: color-mix(in oklab, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.1) blur(7px);
  backdrop-filter: saturate(1.1) blur(7px);
  border-bottom: 2px solid var(--accent);   /* THE single rubric rule */
}
.op-nameplate__bar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding-block: var(--space-xs);
}

/* The nameplate wordmark — the publication's signature, always home */
.op-nameplate__brand { flex: none; }
.op-nameplate__brand .op-mark__name {
  font-size: var(--text-md);
  letter-spacing: var(--tracking-caps);
}

/* The destination bar, centred between brand and actions */
.op-nameplate__nav { margin-inline: auto; }
.op-nameplate__list {
  display: flex;
  align-items: center;
  /* The first flex item's line box carries an extra font-metric strut, which
     lifts the leading "Map" link a few px above the rest under centre alignment
     and breaks the line. Collapsing the list's own font-size to zero removes that
     phantom strut so every label centres on one line; the links restore their
     size just below. (The em-based Methodology tick and the rem-based gap are
     unaffected — both resolve against the link / root font-size, not the list.) */
  font-size: 0;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}
.op-nameplate__list .op-nav__link { font-size: var(--text-xs); }

/* A vertical hairline that sets a group apart */
.op-nameplate__sep {
  align-self: stretch;
  inline-size: 1px;
  background: var(--rule);
  margin-block: var(--space-3xs);
}

/* Methodology — the trust anchor, set apart with a leading rubric register tick */
.op-nameplate__anchor { position: relative; }
.op-nameplate__anchor::before {
  content: "";
  display: inline-block;
  inline-size: 0.85em;
  block-size: 2px;
  margin-inline-end: 0.5em;
  vertical-align: middle;
  background: var(--accent);
}

/* — The actions cluster — */
.op-nameplate__actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* The quiet, persistent search entry — an icon button, no fill */
.op-nameplate__search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.1em;
  block-size: 2.1em;
  padding: 0;
  color: var(--text-secondary);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition-ink);
}
.op-nameplate__search:hover { color: var(--accent); border-color: var(--rule); }
.op-nameplate__search:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.op-nameplate__search svg { inline-size: 1.05em; block-size: 1.05em; }

/* The hamburger — hidden until the bar collapses */
.op-nameplate__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  inline-size: 2.3em;
  block-size: 2.3em;
  padding: 0;
  color: var(--text);
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius-xs);
  cursor: pointer;
}
.op-nameplate__toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.op-nameplate__toggle svg { inline-size: 1.2em; block-size: 1.2em; }

/* ==========================================================================
   THE MOBILE MENU — a full index, opened from the hamburger. Large serif
   destinations, the trust cluster set apart, search at the top, the one
   Subscribe emphasis pinned at the foot.
   ========================================================================== */
.op-nameplate__menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  overflow-y: auto;
  padding: var(--space-md) var(--gutter) var(--space-lg);
}
.op-nameplate__menu[hidden] { display: none; }

.op-nameplate__menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--accent);
}
.op-nameplate__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.3em;
  block-size: 2.3em;
  font-family: var(--font-data);
  font-size: var(--text-md);
  color: var(--text);
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius-xs);
  cursor: pointer;
}
.op-nameplate__close:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.op-nameplate__menu-search {
  margin-block: var(--space-md);
}

.op-nameplate__menu-section + .op-nameplate__menu-section {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--rule);
}
.op-nameplate__menu-label {
  font-family: var(--font-furniture);
  font-size: var(--text-3xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}
.op-nameplate__menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.op-nameplate__menu-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-block: var(--space-xs);
  font-family: var(--font-reading);
  font-weight: var(--weight-semibold);
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-faint);
}
.op-nameplate__menu-link[aria-current="page"] { color: var(--accent); }
.op-nameplate__menu-link:hover { color: var(--accent); }
.op-nameplate__menu-link .op-nameplate__menu-note {
  font-family: var(--font-furniture);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}
/* The trust cluster reads quieter — furniture, not the big serif */
.op-nameplate__menu-list--trust .op-nameplate__menu-link {
  font-family: var(--font-furniture);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.op-nameplate__menu-foot {
  margin-top: auto;
  padding-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ==========================================================================
   RESPONSIVE — below the md breakpoint (900px) the destinations collapse into
   the menu; the bar keeps only the brand, the quiet search, and the hamburger.
   ========================================================================== */
@media (max-width: 56.25rem) {
  .op-nameplate__dateline { display: none; }
  .op-nameplate__nav,
  .op-nameplate__subscribe { display: none; }
  .op-nameplate__toggle { display: inline-flex; }
  .op-nameplate__brand .op-mark__name { font-size: var(--text-sm); }
}

/* On true desktop the menu is never shown even if left open */
@media (min-width: 56.3125rem) {
  .op-nameplate__menu { display: none !important; }
}
