/* The same masthead is embedded in the offline edition and served on every host. */
.hf-mast, .hf-footer {
  --hf-edge: #494949;
  background: #000;
  color: #fff;
  font: 1rem/1.4 "Courier New", monospace;
  box-sizing: border-box;
}
.hf-mast *, .hf-footer * {box-sizing: border-box}
header.hf-mast {border: 0; border-block-end: 1px solid var(--hf-edge)}
.hf-mast .hf-frame, .hf-footer .hf-foot-frame {
  width: min(100%, 91rem);
  max-width: none;
  margin: 0 auto;
  padding: 0 clamp(1.15rem, 4.3vw, 4.9rem);
}
/* Each control opens a native popover, so Escape, outside clicks and focus
   restoration also work in the script-free and offline editions. */
.hf-mast .hf-frame {
  --hf-gutter: clamp(1.15rem, 4.3vw, 4.9rem);
  position: relative; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem 1rem; min-height: 4.7rem; padding-block: .65rem;
}
.hf-mast .hf-brand {
  display: inline-block; color: inherit; white-space: nowrap; text-decoration: none;
  font: bold clamp(1.45rem, 2.2vw, 2rem)/1 "Courier New", monospace;
  letter-spacing: -.075em;
}
.hf-brand span {color: #aaa; font-weight: normal}
.hf-controls {display: flex; align-items: center; justify-content: flex-end; gap: .5rem; max-width: 100%; margin-inline-start: auto}
.hf-controls > div {min-width: 0}
.hf-mast .hf-tools {
  display: flex; flex-wrap: wrap; align-items: baseline; flex-basis: 100%;
  gap: .1rem clamp(.7rem, 2.2vw, 2rem); padding-block-start: .35rem;
  border-block-start: 1px solid var(--hf-edge);
}
.hf-tools > span {color: #aaa; font-weight: bold; overflow-wrap: anywhere}
.hf-mast :is(.hf-tools, .hf-controls) > a {
  display: inline-block; max-width: 100%; padding-block: .4rem; color: inherit;
  font: 1rem/1.35 "Courier New", monospace; text-decoration: none; overflow-wrap: anywhere;
}
.hf-controls > a {margin-inline-end: .4rem}
.hf-mast :is(.hf-tools, .hf-controls) > a:is(:hover, :focus-visible, [aria-current]) {
  text-decoration: underline; text-underline-offset: .22em;
}
.hf-mast .service-languages {position: static; display: block; margin: 0}
.hf-mast .hf-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 2.5rem; max-width: 100%; padding: .45rem .72rem;
  border: 1px solid var(--hf-edge); border-radius: 0; cursor: pointer;
  background: #0b0b0b; color: #fff;
  font: normal .95rem/1.3 "Courier New", monospace;
  text-decoration: none; white-space: normal; overflow-wrap: anywhere;
}
.hf-toggle::after {
  content: ""; flex: 0 0 auto; width: .4rem; height: .4rem; margin-block-start: -.2em;
  border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg);
}
.hf-mast .hf-toggle:hover {border-color: #aaa; background: #171717}
.hf-mast :is(.hf-menu,.hf-locale):has(:popover-open) .hf-toggle {border-color: #eee; background: #171717}
.hf-mast :is(.hf-menu,.hf-locale):has(:popover-open) .hf-toggle::after {transform: rotate(225deg); margin-block-start: .2em}
.hf-mast :is(a, button):focus-visible, .hf-footer a:focus-visible {outline: 2px solid white; outline-offset: 2px}
.hf-mast nav.hf-popup {
  display: none; position: fixed; z-index: 15; inset: auto; top: 4.05rem;
  inset-inline-end: max(var(--hf-gutter), calc((100% - 91rem) / 2 + var(--hf-gutter)));
  max-width: calc(100% - 2 * var(--hf-gutter)); max-height: min(68vh, 31rem);
  max-height: min(68dvh, calc(100dvh - 6.5rem), 31rem);
  margin: 0; padding: .65rem; overflow: auto; overscroll-behavior: contain;
  align-items: start; border: 1px solid #777; background: #101010; color: #fff;
  text-align: start; box-shadow: 0 .6rem 1.25rem #0007;
}
.hf-mast nav.hf-popup:popover-open {display: grid}
.hf-mast .hf-menu-list {
  width: 32rem; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem;
}
.hf-mast .hf-language-list {width: 26rem; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .12rem .65rem}
.hf-menu-group {margin: 0; padding: .2rem; min-width: 0}
.hf-menu-group + .hf-menu-group {border-inline-start: 1px solid #404040; padding-inline-start: .65rem}
.hf-menu-group h2 {
  margin: 0 0 .45rem; padding: .35rem .5rem .55rem; border-bottom: 1px solid #383838;
  color: #aaa; font: bold .87rem/1.35 "Courier New", monospace;
  letter-spacing: normal; overflow-wrap: anywhere;
}
.hf-menu-links {display: grid}
.hf-mast .hf-popup a {
  display: block; margin: 0; border: 0; padding: .5rem; min-width: 0; max-width: 100%;
  color: #eee; font: normal .98rem/1.4 "Courier New", monospace;
  text-decoration: none; overflow-wrap: anywhere;
}
.hf-mast .hf-popup a[aria-current] {font-weight: bold; background: #282828; color: white; box-shadow: inset 2px 0 white}
[dir="rtl"] .hf-mast .hf-popup a[aria-current] {box-shadow: inset -2px 0 white}
.hf-mast .hf-popup a:hover, .hf-mast .hf-popup a:focus-visible {color: white; background: #252525}
.hf-mast .hf-popup a:focus-visible {outline-offset: -2px}
@supports (top: anchor(bottom)) {
  .hf-menu > button {anchor-name: --hf-menu-button}
  .hf-locale button {anchor-name: --hf-language-button}
  .hf-mast nav.hf-menu-list {position-anchor: --hf-menu-button}
  .hf-mast nav.hf-language-list {position-anchor: --hf-language-button}
  .hf-mast nav.hf-popup {top: calc(anchor(bottom) + .4rem)}
}
/* Older browsers can still follow every link by focusing the control. */
@supports not selector(:popover-open) {
  .hf-mast :is(.hf-menu, .service-languages):focus-within > nav.hf-popup {display: grid; position: absolute; top: calc(100% - .2rem)}
}
.hf-footer a {
  display: inline-block; padding: .5rem 0; max-width: 100%; border: 0; color: #c5c5c5;
  font: normal 1rem/1.35 "Courier New", monospace; text-decoration: none; overflow-wrap: anywhere;
}
.hf-mast .vhidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.hf-footer {border: 0; border-block-start: 1px solid var(--hf-edge)}
.hf-footer .hf-foot-frame {display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: .4rem 1.4rem; padding-block: .8rem}
.hf-footer nav {display: flex; flex-wrap: wrap; gap: .35rem 1.5rem}
.hf-footer a:hover {color: white; text-decoration: underline}
@media (max-width: 45rem) {
  .hf-mast .hf-menu-list {grid-template-columns: minmax(0, 1fr); gap: .55rem; width: 27rem}
  .hf-menu-group + .hf-menu-group {border-inline-start: 0; padding-inline-start: .2rem}
  .hf-menu-links {grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .4rem}
}
@media (max-width: 30rem) {
  .hf-mast .hf-frame {gap: .35rem .25rem; min-height: 3.75rem}
  .hf-mast .hf-brand {font-size: clamp(1.06rem, 5.5vw, 1.35rem)}
  .hf-controls {flex-wrap: wrap; gap: .35rem}
  .hf-mast .hf-toggle {gap: .42rem; padding: .4rem .52rem; font-size: .9rem}
}
@media print {.hf-mast, .hf-footer {display: none}}
