/* header and footer of every page, the online guide included (which has its own styles: class names only,
   no custom properties of site.css) — markup: scripts/build-site.mjs */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px 18px; padding: 12px clamp(16px, 3vw, 40px);
  background: rgba(11, 20, 55, 0.94); backdrop-filter: blur(6px); color: #fff; font: 16px/1.5 system-ui, 'Segoe UI', 'Microsoft JhengHei', 'PingFang TC', sans-serif; }
.top [data-lang][hidden], .foot [data-lang][hidden] { display: none !important; }
.top .brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 800 20px/1 system-ui, 'Segoe UI', sans-serif; letter-spacing: 1px; }
.top .brand img { width: 32px; height: 32px; border-radius: 8px; margin: 0; border: 0; box-shadow: none; }
.top .nav { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-left: auto; }
.top .nav a { padding: 4px 9px; border-radius: 8px; color: #cbd5e1; text-decoration: none; font-size: 15px; white-space: nowrap; }
.top .nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.top .nav a[aria-current] { color: #fff; background: rgba(56, 189, 248, 0.22); }
.top .lang { display: inline-flex; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 999px; overflow: hidden; }
.top .lang button { border: 0; background: transparent; color: #e2e8f0; padding: 4px 12px; font: 600 13px system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.top .lang button.on { background: #fff; color: #0b1437; }
.foot { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: center; padding: 24px 16px; border-top: 1px solid #e2e8f0; color: #5b6b86; font: 14px/1.5 system-ui, 'Segoe UI', 'Microsoft JhengHei', 'PingFang TC', sans-serif; }
.foot img { width: 28px; height: 28px; border-radius: 6px; }
.foot a:not(.sponsor) { color: #5b6b86; }
.foot .muted { color: #94a3b8; }
.textlink { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.textlink:focus-visible, .consent button:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; border-radius: 6px; }
/* the cookie bar (consent.js): at the bottom, over nothing but the space it adds to the page */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 12px 28px; padding: 14px clamp(16px, 4vw, 48px);
  background: #0b1437; color: #dbeafe; border-top: 2px solid #38bdf8; box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.35); font: 15px/1.55 system-ui, 'Segoe UI', 'Microsoft JhengHei', 'PingFang TC', sans-serif; }
.consent [data-lang][hidden] { display: none !important; }
.consent-text { max-width: 820px; } .consent-text b { color: #fff; } .consent-text a { color: #7dd3fc; white-space: nowrap; }
.consent-actions { flex: none; display: flex; gap: 10px; }
.consent-btn { min-width: 104px; padding: 9px 18px; border: 0; border-radius: 10px; background: #38bdf8; color: #0b1437; font: inherit; font-weight: 700; cursor: pointer; }
.consent-btn:hover { filter: brightness(1.08); }
.consent-close { flex: none; padding: 2px 10px; border: 0; background: none; color: #cbd5e1; font: 24px/1 system-ui, sans-serif; cursor: pointer; }
@media (max-width: 760px) {
  .consent { flex-wrap: wrap; justify-content: flex-start; padding: 12px 16px; font-size: 14px; }
  .consent-text { flex: 1 1 100%; } .consent-close { position: absolute; top: 6px; right: 6px; }
  .consent:has(.consent-close) .consent-text { padding-right: 26px; }
  .consent-actions { width: 100%; } .consent-btn { flex: 1; }
}
@media (max-width: 1080px) {
  .top { flex-wrap: wrap; }
  .top .nav { order: 3; width: 100%; margin: 0; }
  .top .sponsor { margin-left: auto !important; }
}
@media (max-width: 640px) {
  .top { position: static; }
  .top .nav { display: grid; grid-template-columns: repeat(3, 1fr); }
  .top .nav a { text-align: center; padding: 4px 2px; background: rgba(255, 255, 255, 0.06); font-size: 14px; }
  .top .sponsor { padding: 5px 10px !important; }
  .top .sponsor span { display: none; } /* the can alone; the link keeps its title */
}
@media print { .top, .foot, .consent { display: none; } }
