/* Shared, in-flow shell. Deliberately scoped: FitTracker keeps its app styling. */
.site-header, .site-footer {
  --shell-surface: #10222c;
  --shell-text: #f3ead5;
  --shell-muted: #b9c8c9;
  --shell-accent: #a6d9c0;
  --shell-gold: #efd394;
  --shell-border: #506b70;
  background: var(--shell-surface);
  color: var(--shell-text);
  font: 400 15px/1.5 "Exo 2", sans-serif;
  text-align: left;
}
[data-theme="light"] :is(.site-header, .site-footer) {
  --shell-surface: #f9f4e5; --shell-text: #173337; --shell-muted: #466061;
  --shell-accent: #225e50; --shell-gold: #79541d; --shell-border: #859589;
}
body.site-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.site-shell > :is(main, article, section) { flex: 1 0 auto; }
.site-shell .site-fit-content { width: 100%; }
.site-header *, .site-footer * { box-sizing: border-box; }
.site-header [hidden] { display: none !important; }
html .topbar.site-header { position: relative; top: auto; flex: none; z-index: 40; border-bottom: 1px solid var(--shell-border); box-shadow: none; background: var(--shell-surface); }
.site-header__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; width: 100%; max-width: 1600px; min-height: 72px; margin: 0 auto; padding: 8px clamp(16px, 3.5vw, 64px); }
.site-header a, .site-footer a { color: inherit; text-decoration: none; }
.site-header .site-brand { display: inline-flex; align-items: center; justify-self: start; gap: 10px; min-height: 44px; font: 11px/1.6 "Press Start 2P", monospace; white-space: nowrap; }
.site-brand > svg { width: 23px; height: 23px; flex: none; color: var(--shell-accent); }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { display: inline-flex; align-items: center; position: relative; min-height: 44px; color: var(--shell-muted); }
.site-nav a[aria-current] { color: var(--shell-text); }
.site-nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--shell-gold); }
.site-header__tools { display: flex; align-items: center; justify-self: end; gap: 4px; }
html .site-header .site-control, .site-menu > summary { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; min-height: 44px; padding: 10px; border: 1px solid transparent; border-radius: 0; box-shadow: none; background: none; color: var(--shell-muted); cursor: pointer; }
.site-header .site-control > svg, .site-menu > summary > svg { width: 22px; height: 22px; }
.site-header .site-control:disabled { cursor: default; opacity: .6; }
.site-header :is(a, button, summary):hover, .site-footer a:hover { color: var(--shell-accent); }
.site-header :is(a, button, summary):focus-visible, .site-footer a:focus-visible { outline: 2px solid var(--shell-gold); outline-offset: 2px; }
.site-theme__moon, .site-motion__play { display: none; }
[data-theme="light"] .site-theme__sun, .site-motion[aria-pressed="true"] .site-motion__pause { display: none; }
[data-theme="light"] .site-theme__moon, .site-motion[aria-pressed="true"] .site-motion__play { display: block; }
.site-menu { display: block; }
.site-menu > summary { width: auto; min-width: 44px; gap: 8px; padding-inline: 12px; list-style: none; border-color: var(--shell-border); }
.site-menu > summary::-webkit-details-marker { display: none; }
.site-menu__panel { position: absolute; right: clamp(16px, 3.5vw, 64px); top: calc(100% - 1px); width: min(288px, calc(100vw - 32px)); max-height: calc(100dvh - 80px); overflow-y: auto; padding: 8px 16px; border: 1px solid var(--shell-border); background: var(--shell-surface); box-shadow: 4px 4px 0 #07121955; }
.site-menu .site-menu__heading { margin: 8px 8px 4px; padding-top: 8px; color: var(--shell-muted); font: 10px/1.6 "JetBrains Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }
.site-menu__panel a { display: flex; align-items: center; min-height: 48px; padding: 8px; }
.site-menu__panel a[aria-current] { color: var(--shell-gold); }
.site-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.site-shell > .site-footer { position: static; flex: none; margin-top: auto; border-top: 1px solid var(--shell-border); padding-bottom: env(safe-area-inset-bottom, 0px); }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 24px; max-width: 1600px; min-height: 64px; padding: 10px clamp(16px, 3.5vw, 64px); margin: 0 auto; }
.site-footer .site-footer__credit { margin: 0; color: var(--shell-muted); font: 400 13px/1.5 "Exo 2", sans-serif; }
.site-footer__townhall { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: 13px; }
.site-footer__townhall svg { width: 20px; height: 20px; color: var(--shell-gold); }
.site-footer__context { display: flex; flex-wrap: wrap; gap: 0 24px; flex-basis: 100%; border-bottom: 1px solid var(--shell-border); margin-bottom: 8px; }
.site-footer__context a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--shell-muted); }
.site-shell > .site-skip { position: fixed; left: 16px; top: -100px; z-index: 1000; padding: 12px 20px; background: var(--bg-raised); color: var(--text); }
.site-shell > .site-skip:focus { top: 12px; }
@media (max-width: 767px) {
  .site-header__inner { grid-template-columns: minmax(0, 1fr) auto; min-height: 64px; padding-block: 8px; gap: 8px; }
  .site-header .site-brand { font-size: 9px; gap: 8px; }
  .site-brand > svg { width: 20px; height: 20px; }
  .site-header__tools { gap: 0; }
  .site-nav { display: none; }
  .site-menu > summary { width: 44px; padding-inline: 10px; }
  .site-menu__label { display: none; }
  .site-footer__place { display: none; }
  .site-footer__inner { gap: 0 12px; }
}
@media print { .site-header, .site-footer { display: none; } body.site-shell { display: block; } }
