/* COSYmagazine shell: top bar + footer. Warm linen, forest ink, lamp-yellow focus. */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid #F3C969; outline-offset: 3px; border-radius: 8px; }

.bn { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--cream, #FAF7F2) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border, rgba(74,107,80,.18)); }
.bn-inner { max-width: 1180px; margin: 0 auto; padding: .55rem clamp(1rem, 4vw, 2rem); display: flex; align-items: center; gap: 1.25rem; }
.bn-brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink, #1c1917); font-family: var(--font-serif, Georgia, serif); font-size: 1.15rem; font-weight: 600; white-space: nowrap; }
.bn-brand b { font-weight: 600; }
.bn-brand img { border-radius: 8px; }
.bn-links { display: flex; gap: .15rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.bn-links::-webkit-scrollbar { display: none; }
.bn-links a { padding: .45rem .8rem; border-radius: 999px; color: var(--ink-soft, #44403c); text-decoration: none; font-weight: 600; font-size: .93rem; white-space: nowrap; }
.bn-links a:hover { background: var(--sage-mist, #F0F5F1); }
.bn-links a[aria-current="page"] { background: var(--sage-mist, #F0F5F1); color: var(--cosy-color-primary, #3f6b4b); box-shadow: inset 0 -2px 0 #F3C969; }
.bn-actions { display: flex; align-items: center; gap: .5rem; }

/* The ecosystem entry belongs to the publication name, not the main menu. */
.bn-eco, .gazette-eco { display: none; }
.bn.eco-open .bn-eco,
.gazette-masthead:hover .gazette-eco,
.gazette-masthead:focus-within .gazette-eco { display: inline-flex; }
@media (hover: none) {
  .bn-eco, .gazette-eco { display: inline-flex; }
}
.bn-select, .bn-icon { height: 38px; border-radius: 999px; border: 1px solid var(--border, rgba(74,107,80,.25)); background: var(--warm-white, #fffdf8); color: var(--ink, #1c1917); font: inherit; font-size: .9rem; padding: 0 .75rem; cursor: pointer; }
.bn-icon { width: 38px; padding: 0; font-size: 1.05rem; }

/* The ecosystem map is a top-bar entry, like the hub. The shared strip supplies
   the panel; the magazine keeps one trigger and hides its floating dock. */
[data-ecosystem-strip] { --cosy-topbar-offset: 58px; }
.bn-links .cosy-global-links { display: inline-flex; margin-left: 0; }
.bn-links .cosy-global-ecosystem { padding: .45rem .8rem; border-radius: 999px; color: var(--ink-soft, #44403c); font: inherit; font-size: .93rem; font-weight: 600; line-height: 1.1; }
.bn-links .cosy-global-ecosystem:hover, .bn-links .cosy-global-ecosystem:focus-visible { background: var(--sage-mist, #F0F5F1); opacity: 1; }
.bn-links .cosy-global-link-label { display: inline; }
.bn-links .cosy-global-link-icon { font-size: .95rem; }
body > .cosy-ecosystem-strip.has-topbar-trigger .cosy-eco-dock { display: none; }
.gazette-body [data-ecosystem-strip] { --cosy-topbar-offset: 160px; }
.gazette-masthead-links .cosy-global-ecosystem { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; font-size: var(--blog-text-xs, .75rem); font-weight: 700; color: var(--post-palette-accent, #0d9488); background: var(--blog-paper-card, #fff); border: 1px solid var(--blog-border-delicate, #e7e0d6); border-radius: 999px; min-height: 36px; box-sizing: border-box; }
.gazette-masthead-links .cosy-global-ecosystem:hover, .gazette-masthead-links .cosy-global-ecosystem:focus-visible { background: var(--post-palette-accent, #0d9488); color: #fff; border-color: var(--post-palette-accent, #0d9488); opacity: 1; }
.gazette-masthead-links .cosy-global-link-label { display: inline; }
.gazette-masthead-links .cosy-global-link-icon { font-size: .9rem; }
@media (max-width: 779px) and (min-width: 768px) {
  .gazette-body [data-ecosystem-strip] { --cosy-topbar-offset: 280px; }
}
@media (max-width: 1199px) and (min-width: 780px) {
  .gazette-body [data-ecosystem-strip] { --cosy-topbar-offset: 210px; }
}
@media (max-width: 760px) {
  .bn-inner { flex-wrap: wrap; row-gap: .35rem; }
  .bn-actions { margin-left: auto; }
  .bn-links { order: 3; width: 100%; margin-left: 0; }
  .bn-links .cosy-global-ecosystem { padding: .45rem .65rem; }
}

.bf { margin-top: 4rem; background: var(--sage-mist, #F0F5F1); border-top: 1px solid var(--border, rgba(74,107,80,.18)); color: var(--ink, #1c1917); }
.bf-inner { max-width: 1180px; margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 2rem) 1.5rem; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.bf-brand p { margin: .75rem 0 0; max-width: 32ch; color: var(--ink-muted, #5a5a50); font-size: .95rem; line-height: 1.5; }
.bf-col h2 { font-family: var(--font-sans, system-ui); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted, #5a5a50); margin: 0 0 .6rem; font-weight: 700; }
.bf-col a { display: block; padding: .2rem 0; color: var(--ink, #1c1917); text-decoration: none; font-size: .95rem; }
.bf-col a:hover { text-decoration: underline; text-decoration-color: #F3C969; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.bf-bottom { max-width: 1180px; margin: 0 auto; padding: 1rem clamp(1rem, 4vw, 2rem) 1.75rem; color: var(--ink-muted, #5a5a50); font-size: .85rem; }
@media (max-width: 760px) { .bf-inner { grid-template-columns: 1fr 1fr; } .bf-brand { grid-column: 1 / -1; } }

html[data-theme="dark"] .bn { background: color-mix(in srgb, #141b16 92%, transparent); }
html[data-theme="dark"] .bn-links a:hover, html[data-theme="dark"] .bn-links a[aria-current="page"] { background: #1f2a23; color: #e8f0e9; }
html[data-theme="dark"] .bn-links .cosy-global-ecosystem { color: #e8f0e9; }
html[data-theme="dark"] .bn-links .cosy-global-ecosystem:hover, html[data-theme="dark"] .bn-links .cosy-global-ecosystem:focus-visible { background: #1f2a23; }
html[data-theme="dark"] .bf { background: #121a15; }
html[data-theme="dark"] .bf-col a, html[data-theme="dark"] .bn-brand { color: #e8f0e9; }
html[data-theme="dark"] .bn-select, html[data-theme="dark"] .bn-icon { background: #1f2a23; color: #e8f0e9; border-color: rgba(255,255,255,.14); }

/* The hub's older #cosy-nav rules (fixed height, flex, side padding) must not leak into this bar. */
#cosy-nav.bn { display: block; height: auto; padding: 0; justify-content: initial; gap: 0; top: 0; }
.bn-inner > * { min-width: 0; }
.bn-brand { flex: none; }
.bn-links { flex: 0 1 auto; }
@media (max-width: 760px) { .bn-links { flex: 1 1 100%; } .bn-select { width: 7.5rem; } .bn-brand span { font-size: 1.05rem; } }
