/* Page frame, top bar, type. Reused by every screen. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.35;
  overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: var(--rule); background: var(--f1-red); z-index: 50; }
button, select, input { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.big { font-style: italic; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 40; background: var(--bg);
  padding: var(--rule) var(--gutter) 0; border-bottom: 1px solid var(--hair);
  display: flex; align-items: stretch; gap: 20px; min-height: var(--bar-h);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding-right: 6px; }
.brand b { font-style: italic; font-weight: 900; font-size: 20px; letter-spacing: 0.02em; text-transform: uppercase; }
.brand b span { color: var(--f1-red); }
.session-switch { display: flex; align-items: center; gap: 8px; }
.session-switch .label { display: none; }
.tabs { display: flex; align-items: stretch; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: flex; align-items: center; padding: 0 12px; text-decoration: none; white-space: nowrap;
  font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  position: relative;
}
.tab:hover { color: var(--text); }
.tab.stub { color: var(--faint); }
.tab[aria-current="page"] { color: var(--text); }
.tab[aria-current="page"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--f1-red);
  transform: skewX(-20deg);
}

/* page frame */
#view { padding: 20px var(--gutter) 48px; max-width: 1440px; margin: 0 auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 14px; }
.page-head .sub { color: var(--muted); font-size: 14px; }
.page-head .spacer { flex: 1; }
.loading, .error { padding: 60px 0; text-align: center; color: var(--muted); }
.error { color: var(--loss); }

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 0 12px; padding-bottom: 0; position: static; }
  .brand { height: 44px; }
  .session-switch { height: 44px; flex: 1; min-width: 0; }
  .session-switch select { width: 100%; }
  .tabs { order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0 8px; border-top: 1px solid var(--hair); }
  .tab { height: 40px; }
  #view { padding-top: 14px; }
}

/* skip link: first tab stop, visible only when focused */
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--text); color: var(--bg); padding: 10px 14px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 8px; outline: 2px solid var(--f1-red); outline-offset: 2px; }
#view:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 520px) {
  /* give the session picker the room the F1 25 tag was using */
  .brand .tag { display: none; }
}
@media (max-width: 900px) {
  /* thumb-sized targets on phones and tablets */
  .btn, .seg button, select.pick, input, .btn--sm { min-height: 44px !important; }
  .btn--sm { padding: 8px 12px !important; }
  .tab { height: 44px; }
  .tl-link { display: inline-block; padding: 12px 8px; margin: -12px -4px; }
}
