/* Shared by the React homepage, commerce pages and legal pages. */
:root {
  --bb-header-height: 44px;
  --bb-header-bg: rgba(250,250,250,.84);
  --bb-header-ink: #242424;
  --bb-header-line: rgba(92,100,108,.16);
  --bb-header-hover: #ededed;
  --bb-primary: #1d1d1f;
  --bb-primary-hover: #38383a;
  --bb-primary-ink: #fff;
  --bb-link: #303033;
  --bb-header-accent: var(--bb-primary);
  --bb-menu-bg: #fff;
  --bb-menu-selected: #f1f1f1;
}
html[data-theme="night"] {
  --bb-header-bg: rgba(21,22,24,.82);
  --bb-header-ink: #f1f1f1;
  --bb-header-line: rgba(225,233,241,.13);
  --bb-header-hover: #2b2d30;
  --bb-link: #ededed;
  --bb-primary: #f1f1f1;
  --bb-primary-hover: #dcdcdc;
  --bb-primary-ink: #171719;
  --bb-menu-bg: #242528;
  --bb-menu-selected: #343539;
}
.commerce-header, .site-header {
  position: fixed; z-index: 100; top: 0; inset-inline: 0; min-height: 0;
  color: var(--bb-header-ink); background: var(--bb-header-bg);
  border-bottom: 1px solid var(--bb-header-line);
  backdrop-filter: blur(20px) saturate(1.18); -webkit-backdrop-filter: blur(20px) saturate(1.18);
}
.commerce-page { padding-top: var(--bb-header-height); }
html .site { --site-header-height: var(--bb-header-height); }
.boxbox-nav, .boxbox-nav * { box-sizing: border-box; }
.boxbox-nav {
  position: relative; width: min(1440px,100%); height: 43px; margin: 0 auto;
  padding: 4px clamp(20px,4vw,64px); display: flex; align-items: center; gap: 20px;
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue","PingFang SC",sans-serif;
  font-size: 13px; line-height: 1.35; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.boxbox-nav a { color: var(--bb-header-ink); text-decoration: none; }
.boxbox-nav a:focus-visible, .boxbox-nav button:focus-visible, .boxbox-nav select:focus-visible:not([data-pointer-focus]) { outline: 2px solid var(--bb-header-ink); outline-offset: 3px; }
.boxbox-nav select[data-pointer-focus]:focus-visible { outline: none; }
.boxbox-nav .boxbox-brand {
  display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; margin-right: auto;
  color: var(--bb-header-ink); font-size: 18px; font-weight: 690; letter-spacing: -.04em; white-space: nowrap;
}
.boxbox-brand img {
  display: block;
  width: 31px;
  height: 31px;
  border: .5px solid rgba(51, 63, 73, .23);
  border-radius: 23%;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
html[data-theme="night"] .boxbox-brand img { border-color: rgba(238, 244, 248, .24); }
.boxbox-links { display: flex; align-items: center; gap: 22px; white-space: nowrap; }
.boxbox-links a { display: inline-flex; align-items: center; min-height: 34px; font-size: 13px; font-weight: 400; }
.boxbox-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.boxbox-links .boxbox-brand-race {
  position: relative; top: .5px; flex: 0 0 56px; width: 56px; min-width: 44px; min-height: 44px;
  justify-content: center; padding: 0 3px; text-decoration: none;
}
.boxbox-brand-race img { display: block; flex: 0 0 57.5px; width: 57.5px; height: auto; aspect-ratio: 2172 / 724; object-fit: contain; transition: transform 200ms ease-out; }
html[data-theme="night"] .boxbox-brand-race img { filter: brightness(1.45) contrast(1.1); }
.boxbox-links .boxbox-brand-race:hover { text-decoration: none; }
.boxbox-brand-race:is(:hover, :focus-visible) img { transform: translateX(-5px); }
.boxbox-brand-race-label { display: none; }
.boxbox-language { position: relative; display: flex; flex: 0 0 auto; align-items: center; gap: 5px; height: 34px; }
.boxbox-language svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.1; pointer-events: none; }
.boxbox-language select { min-height: 34px; max-width: 110px; border: 0; border-radius: 6px; padding: 0; background: transparent; color: var(--bb-header-ink); font: inherit; font-size: 13px; cursor: pointer; }
.boxbox-language option { color: #242424; background: #fafafa; }
.boxbox-language select[hidden], .boxbox-language-panel[hidden] { display: none; }
.boxbox-language-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 7px; border: 0; border-radius: 7px; background: transparent; color: var(--bb-header-ink); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.boxbox-language-toggle:hover, .boxbox-language-toggle[aria-expanded="true"] { background: var(--bb-header-hover); }
.boxbox-language-chevron { display: block; width: 6px; height: 6px; margin: -3px 1px 0 2px; border-right: 1.3px solid currentColor; border-bottom: 1.3px solid currentColor; transform: rotate(45deg); }
.boxbox-language-panel { position: absolute; z-index: 3; top: calc(100% + 8px); right: -8px; min-width: 154px; padding: 6px; border: 1px solid var(--bb-header-line); border-radius: 12px; background: var(--bb-menu-bg); box-shadow: 0 14px 36px rgba(0,0,0,.15); }
.boxbox-language-panel button { position: relative; display: block; width: 100%; min-height: 36px; padding: 7px 10px 7px 30px; border: 0; border-radius: 7px; background: transparent; color: var(--bb-header-ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.boxbox-language-panel button:hover, .boxbox-language-panel button:focus-visible, .boxbox-language-panel button[aria-checked="true"] { background: var(--bb-menu-selected); }
.boxbox-language-panel button[aria-checked="true"]::before { content: '✓'; position: absolute; left: 11px; }
.boxbox-language-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(1100px,calc(100% - 32px)); box-sizing: border-box; margin: 12px auto 0; padding: 10px 14px; border: 1px solid var(--bb-header-line); border-radius: 10px; background: var(--bb-menu-bg); color: var(--bb-header-ink); font-size: 13px; line-height: 1.5; }
.boxbox-language-status[hidden] { display: none; }
.boxbox-language-status button { flex: 0 0 auto; padding: 5px 10px; border: 1px solid var(--bb-header-line); border-radius: 6px; color: inherit; background: var(--bb-header-hover); font: inherit; cursor: pointer; }
.boxbox-language-status button:focus-visible { outline: 2px solid var(--bb-header-ink); outline-offset: 2px; }
.boxbox-language-status button:disabled { opacity: .6; cursor: wait; }
.boxbox-theme, .boxbox-menu-toggle { display: inline-flex; flex: 0 0 32px; align-items: center; justify-content: center; width: 32px; height: 34px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--bb-header-ink); cursor: pointer; }
.boxbox-theme:hover, .boxbox-menu-toggle:hover { background: var(--bb-header-hover); }
:is(.boxbox-language-toggle, .boxbox-theme, .boxbox-menu-toggle):disabled { opacity: .5; cursor: wait; background: transparent; }
.boxbox-theme svg, .boxbox-menu-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* The icon shows the current appearance; the accessible label states the action. */
.boxbox-theme .theme-sun { display: block; }
.boxbox-theme .theme-moon { display: none; }
html[data-theme="night"] .boxbox-theme .theme-sun { display: none; }
html[data-theme="night"] .boxbox-theme .theme-moon { display: block; }
.boxbox-nav .boxbox-download { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; min-height: 30px; border-radius: 999px; padding: 6px 13px; color: var(--bb-primary-ink); background: var(--bb-header-accent); font-size: 13px; font-weight: 610; line-height: 1.35; white-space: nowrap; text-align: center; text-decoration: none; }
.boxbox-download::before { content: ''; display: inline-block; flex: 0 0 15px; width: 15px; height: 15px; background: currentColor; -webkit-mask: url('/scene-lab/brand/apple.svg') center / contain no-repeat; mask: url('/scene-lab/brand/apple.svg') center / contain no-repeat; }
.boxbox-download::after { content: '↗'; flex: 0 0 auto; }
.boxbox-nav .boxbox-download:hover { background: var(--bb-primary-hover); }
.boxbox-download-short { display: none; }
.boxbox-menu-toggle { display: none; }
.boxbox-menu-close { display: none; }
.boxbox-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1050px) {
  .boxbox-nav { padding-inline: 20px; gap: 12px; }
  .boxbox-links { gap: 14px; }
  .boxbox-download-full { display: none; }
  .boxbox-download-short { display: inline; }
  .boxbox-language { width: 32px; justify-content: center; }
  .boxbox-language select { position: absolute; inset: 0; width: 32px; height: 34px; max-width: none; opacity: 0; font-size: 16px; }
  .boxbox-language-toggle { width: 32px; padding: 0; justify-content: center; }
  .boxbox-language-current, .boxbox-language-chevron { display: none; }
  .boxbox-language:has(select:focus-visible:not([data-pointer-focus])) { outline: 2px solid var(--bb-header-ink); outline-offset: 3px; border-radius: 6px; }
}
@media (max-width: 900px) {
  :root { --bb-header-height: 54px; }
  .boxbox-nav { height: 53px; padding: 6px 10px; gap: 4px; }
  .boxbox-nav .boxbox-brand { font-size: 17px; gap: 6px; }
  .boxbox-nav .boxbox-download { min-height: 32px; padding: 7px 9px; font-size: 12px; gap: 5px; }
  .boxbox-download::after { display: none; }
  .boxbox-download-full { display: none; }
  .boxbox-download-short { display: inline; }
  .boxbox-language, .boxbox-theme, .boxbox-menu-toggle { height: 40px; }
  .boxbox-language select { height: 40px; }
  .boxbox-menu-toggle { display: inline-flex; }
  .boxbox-links { display: none; position: absolute; top: calc(100% + 9px); inset-inline: 12px; z-index: 1; margin: 0; padding: 8px; border: 1px solid var(--bb-header-line); border-radius: 14px; background: var(--bb-menu-bg); box-shadow: 0 10px 32px rgba(0,0,0,.14); }
  .boxbox-nav[data-menu-open="true"] .boxbox-links { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .boxbox-links a { min-height: 44px; padding: 10px 13px; border-radius: 8px; font-size: 15px; }
  .boxbox-links a:hover { background: var(--bb-header-hover); text-decoration: none; }
  .boxbox-links .boxbox-brand-race { width: 100%; justify-content: flex-start; gap: 12px; padding-inline: 13px; }
  .boxbox-brand-race-label { display: inline; }
  .boxbox-nav[data-menu-open="true"] .boxbox-menu-open { display: none; }
  .boxbox-nav[data-menu-open="true"] .boxbox-menu-close { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .boxbox-brand-race img { transition: none; }
  .boxbox-brand-race:is(:hover, :focus-visible) img { transform: none; }
}
@media (max-width: 340px) {
  .boxbox-nav { padding-inline: 6px; gap: 2px; }
  .boxbox-nav .boxbox-download { padding-inline: 7px; }
}
