/* Mechanical header CTAs use the same layered cap, socket and rim as the Kit. */
.ukfb-header .ukfb-nav { column-gap:14px; row-gap:11px; overflow:visible; }
.ukfb-header .ukfb-nav a.btn.ukfb-key {
  width:auto;
  justify-self:center;
  height:40px;
  margin-block:0 8px;
  min-height:40px;
  padding:0 12px;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  white-space:nowrap;
  text-decoration:none;
  font:400 8px/16px "UKFB Pixel",var(--mono);
  --u:2px; --d:8px;
  --arc-face-h:40px; --arc-shift:19px;
}
.ukfb-header .ukfb-nav .btn.ukfb-primary {
  --face:#6527c8; --hi:#ba92ff; --lo:#401987; --lip:#2e114e; --line:#160b24;
  color:#fff;
}
.ukfb-header .ukfb-nav .btn.ukfb-contribute {
  --face:#ffd000; --hi:#fff28a; --lo:#d19400; --lip:#865000; --line:#251105;
  color:#180f00;
}
.ukfb-header .ukfb-nav .btn.ukfb-key:hover { background:transparent; }
.ukfb-header .ukfb-nav .btn.ukfb-key[aria-current] > .btn-text {
  text-decoration:underline; text-decoration-color:#00eed1; text-underline-offset:3px;
}
.ukfb-header .ukfb-nav .btn.ukfb-key:focus-visible { outline-offset:8px!important; }
.ukfb-header .ukfb-brand { gap:11px; }
.ukfb-header .ukfb-brand img { width:60px;height:36px; }
.ukfb-header .ukfb-wordmark {
  font-size:clamp(8px,1.12vw,12px);
  line-height:1.5;
  letter-spacing:0;
  white-space:nowrap;
}
.ukfb-header .ukfb-wordmark b { font:inherit;color:#ffdc48; }
.front .hero h1,.route-mast h1,.section h2,.route-card h2 {
  overflow-wrap:normal;
  word-break:normal;
  hyphens:none;
  text-wrap:balance;
}
.front .hero h1 { font-size:clamp(2rem,5.2vw,5.2rem); }
.route-mast h1 { font-size:clamp(2rem,5.7vw,5.4rem); }
body:not(.map-kiosk) .route-mast::after {
  content:""; position:absolute; inset:auto 0 0; height:8px;
  background:url("/assets/ukfb-header-dither.v2.svg") left bottom / 8px 16px repeat-x;
  transform:scaleY(-1); pointer-events:none;
}
@media(max-width:620px) {
  .ukfb-header .ukfb-nav { column-gap:8px; row-gap:9px; }
  .ukfb-header .ukfb-nav a.btn.ukfb-key { font-size:7px; padding-inline:6px; }
}
@media(max-width:390px) {
  .ukfb-header .ukfb-brand img { width:55px;height:33px; }
  .front .hero h1 { font-size:clamp(1.95rem,9.1vw,2.45rem); }
  .route-mast h1 { font-size:clamp(1.9rem,8.5vw,2.35rem); }
  .section h2,.route-card h2 { font-size:clamp(1.52rem,7.3vw,1.88rem); }
}
@media(forced-colors:active) {
  body:not(.map-kiosk) .route-mast::after { display:none; }
}
@media(prefers-reduced-motion:no-preference) {
  .arc-key-entry-ready .ukfb-header .btn.ukfb-key[data-arc-enter="rise"] { transition-duration:.225s; }
}

/* Keep the navigation genuinely centred on wide layouts, not just between unequal wings. */
.ukfb-header.site,.ukfb-header.kiosk-header {
  display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;column-gap:17px;row-gap:6px;
}
.ukfb-header .ukfb-brand {justify-self:start}
.ukfb-header .ukfb-nav {
  display:flex;min-width:0;align-items:center;justify-content:center;
  flex-wrap:nowrap;gap:12px;
}
.ukfb-header .ukfb-social {display:flex;justify-self:end;align-items:center}
.ukfb-header .ukfb-nav .btn.ukfb-nav-neutral {
  --face:#402659;--hi:#8764aa;--lo:#281637;--lip:#291737;--line:#13081e;
  color:#fff;
}
.ukfb-header .ukfb-social .btn.ukfb-discord {
  display:inline-flex;align-items:center;justify-content:center;
  min-height:40px;height:40px;margin:0 4px 8px 0;padding-inline:10px;
  font:400 8px/16px "UKFB Pixel",var(--mono);
  width:auto;white-space:nowrap;border:0;border-radius:0;background:transparent;
  box-shadow:none;text-decoration:none;
  --u:2px;--d:8px;--arc-face-h:40px;--arc-shift:19px;
  --face:#4d59d3;--hi:#a0a7ff;--lo:#333b91;--lip:#292e76;--line:#10143e;
  color:#fff;
}
.ukfb-discord > .btn-text {display:inline-flex;align-items:center;gap:6px}
.ukfb-discord-mark {flex-shrink:0}
.ukfb-header .ukfb-nav a.btn[aria-current] {box-shadow:none}
.ukfb-header .ukfb-social a:focus-visible {
  outline:3px solid #00eed1!important;outline-offset:6px!important;
}
@media(max-width:1240px) {
  .ukfb-header.site,.ukfb-header.kiosk-header {grid-template-columns:minmax(0,1fr) auto}
  .ukfb-header .ukfb-brand {grid-area:1 / 1}
  .ukfb-header .ukfb-social {grid-area:1 / 2}
  .ukfb-header .ukfb-nav {grid-area:2 / 1 / 3 / 3}
}
@media(max-width:620px) {
  .ukfb-header.site,.ukfb-header.kiosk-header {row-gap:7px}
  .ukfb-header .ukfb-nav {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px 12px}
  .ukfb-header .ukfb-nav a.btn.ukfb-key {width:calc(100% - 5px);padding-inline:4px}
}
@media(max-width:360px) {
  .ukfb-header.site,.ukfb-header.kiosk-header {column-gap:6px}
  .ukfb-header .ukfb-brand {gap:5px}
  .ukfb-header .ukfb-brand img {width:49px;height:auto}
  .ukfb-header .ukfb-wordmark {font-size:7px}
  .ukfb-header .ukfb-social .btn.ukfb-discord {padding-inline:5px;font-size:7px}
  .ukfb-header .ukfb-discord-mark {width:14px;height:14px}
  .ukfb-header .ukfb-discord > .btn-text {gap:4px}
}

/* Tuck the long top rim into the pixel corners of the Discord key. */
.ukfb-header .ukfb-discord > .arc-recess-rim {
  clip-path:polygon(14px 0,calc(100% - 14px) 0,calc(100% - 14px) 2px,calc(100% - 8px) 2px,calc(100% - 8px) 4px,calc(100% - 4px) 4px,calc(100% - 4px) 6px,100% 6px,100% 100%,0 100%,0 6px,4px 6px,4px 4px,8px 4px,8px 2px,14px 2px);
}
