/* Shared BMX System header tokens. Only the sponsor row is pinned. */
:root{--system-badge-size:44px;--system-header-min-height:76px;--system-gutter:12px;--system-column-gap:8px;--system-support-width:7rem;--site-header-height:76px}
body{padding-top:var(--site-header-height)}
.topbar.site-header{position:fixed;inset:var(--header-viewport-top,0px) 0 auto;z-index:30;display:block;margin:0;padding:env(safe-area-inset-top,0px) 0 0;max-width:none;background:#fafafa;border:0;box-shadow:none}
body:has(.home-layout) .topbar.site-header{padding:env(safe-area-inset-top,0px) 0 0}
body:has(.home-layout) .site-header .header-support{min-height:48px}
.header-grid{max-width:1068px;margin:auto;display:grid;grid-template-columns:var(--system-badge-size) minmax(0,1fr) var(--system-support-width);gap:var(--system-column-gap);align-items:center;min-height:var(--system-header-min-height);padding:8px max(var(--system-gutter),env(safe-area-inset-right,0px)) 8px max(var(--system-gutter),env(safe-area-inset-left,0px))}
.site-header .brand{width:var(--system-badge-size);height:var(--system-badge-size);min-height:44px;display:block;margin:0;padding:0;border-radius:50%}
.site-header .brand-logo{display:block;width:var(--system-badge-size);height:var(--system-badge-size);object-fit:contain}
.sponsor-slot{display:flex;justify-content:center;align-items:center;min-width:0}
.header-sponsor{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;max-width:100%;min-height:60px;padding:0 2px;text-decoration:none;border-radius:6px}
.header-sponsor>span{font-size:.75rem;line-height:.875rem;font-weight:600;color:#616168;letter-spacing:.035em;text-transform:uppercase}
.header-sponsor picture{display:block;line-height:0;width:280px;max-width:100%}
.header-sponsor img{display:block;height:auto;width:100%;max-width:100%;object-fit:contain}
.header-sponsor:hover>span{color:#171717}.header-sponsor:focus-visible{outline:3px solid #d91729;outline-offset:3px}
.site-header .header-support{inline-size:var(--system-support-width);box-sizing:border-box;min-height:48px;margin:0;padding:6px 8px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:0;font-size:.875rem;line-height:1.125rem;font-weight:650;white-space:normal;text-decoration:none;color:#202024;border:1px solid #d9d9de;border-radius:12px;background:#fff;box-shadow:0 1px 2px #00000004}
.site-header .header-support:hover{background:#fff3f4;border-color:#e1b3b8}
.app-identity{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:baseline;gap:0 .3rem;max-width:1068px;width:100%;margin-inline:auto;padding:4px max(var(--system-gutter),env(safe-area-inset-right,0px)) 6px max(var(--system-gutter),env(safe-area-inset-left,0px));min-height:28px;background:#fafafa;color:#64646b;font-size:.8125rem;line-height:1.125rem}
.app-identity strong{font-size:.9375rem;font-weight:750;letter-spacing:-.025em;color:#171717}.identity-light{font-weight:450;margin:0;padding:0}
.tabs{background:#fafafa}.tabs button:focus-visible{outline-offset:-4px}
html{scroll-padding-top:calc(var(--site-header-height) + 12px)}
.workout-category{scroll-margin-top:calc(var(--site-header-height) + 16px)}
.header-reflow{grid-template-columns:44px minmax(0,1fr)}.header-reflow .header-support{grid-column:1/-1;justify-self:end}.header-reflow .sponsor-slot{grid-column:2}
/* The runner has its own scroll container; reserve the actual header height. */
.running-workout{padding-top:0}.running-workout>.topbar.site-header{display:block}
.running-workout #main{top:calc(var(--runner-top,0px) + var(--site-header-height));height:calc(var(--runner-height,100dvh) - var(--site-header-height) - var(--consent-banner-height,0px))}
.runner{grid-template-rows:minmax(0,1fr) auto;max-width:none}
.runner-header,.runner-column,.runner-footer,.runner-scroll>.tabs{max-width:480px;width:100%;margin-inline:auto}
.runner-scroll{scroll-padding-top:12px}.runner-scroll>.app-identity{padding-top:4px;max-width:none;padding-left:max(var(--system-gutter),env(safe-area-inset-left,0px),calc((100vw - 1068px)/2 + 12px))}
.runner-scroll>.tabs{margin:0 auto;padding:0 16px;gap:0 16px;justify-content:space-between;flex-wrap:wrap}
.runner-scroll>.tabs button{font-size:.875rem;min-width:0;padding-top:12px;padding-bottom:12px;white-space:normal;flex:1 1 auto}
.runner-scroll>.tabs span{font-size:.75rem;margin-left:3px}
.runner-header{background:#f4f4f5}.runner-heading h1{font-size:18px}
dialog{margin-top:calc(var(--site-header-height) + 16px);max-height:calc(100dvh - var(--site-header-height) - 32px)}
@media(min-width:761px){:root{--system-support-width:10rem;--system-column-gap:16px}.header-grid{padding-left:12px;padding-right:12px}.header-sponsor{flex-direction:row;gap:10px}.header-sponsor>span{font-size:.8125rem;line-height:1rem}.site-header .header-support{flex-direction:row;gap:.25em}.app-identity{padding-left:12px;padding-right:12px;padding-bottom:8px}}
@media(max-width:359px){.runner-scroll>.tabs{gap:10px;padding:0 12px}.runner-scroll>.tabs button{font-size:.8125rem}}
