body.f1 {
  --f1-paper: #f4f0ec;
  --f1-surface: #fff;
  --ff-ink: #24141a;
  --ff-soft: #5a4a4f;
  --ff-line: #e5dcd8;
  --ff-field: #fff;
  --ff-chip: #f7f3f1;
  --ff-accent: #8a1538;
  --ff-on-accent: #fff;
  --ff-radius: 10px;
  --f1-hover: #6e0f2c;
  --f1-selection: #f8e8ed;
  --f1-veil: #f6f1ed;
  --f1-veil-start: 84%;
  --f1-veil-end: 24%;
  --f1-shadow: 0 10px 32px #3a1a2414, 0 2px 6px #3a1a240b;
  --app-ink: var(--ff-ink);
  --app-soft: var(--ff-soft);
  --app-faint: #6f5f64;
  --app-line: var(--ff-line);
  margin: 0;
  background: var(--f1-paper);
  color: var(--ff-ink);
  font: 400 16px/1.5 "Inter", system-ui, sans-serif;
  color-scheme: light;
}
[data-f1-theme="dark"] body.f1 {
  --f1-paper: #15121a;
  --f1-surface: #221c27;
  --ff-ink: #f6f0f2;
  --ff-soft: #cbbfc4;
  --ff-line: #43393f;
  --ff-field: #1a151e;
  --ff-chip: #2e2530;
  --ff-accent: #f0a8bd;
  --ff-on-accent: #3a0b1b;
  --f1-hover: #f7c4d3;
  --f1-selection: #4a2433;
  --f1-veil: #15121a;
  --f1-veil-start: 79%;
  --f1-veil-end: 7%;
  --f1-shadow: 0 12px 36px #0a060c54;
  --app-faint: #b4a6ac;
  color-scheme: dark;
}
.f1 * { box-sizing: border-box; }
.f1-intro h1, .f1-intro p, .f1-launch h2, .f1-foot p { margin: 0; }
.f1 :where(a, button):focus-visible { outline: 2px solid var(--ff-accent); outline-offset: 3px; }
.f1 button, .f1 a { -webkit-tap-highlight-color: transparent; }
.f1-backdrop { --f1-art-position: 84%; position: fixed; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; }
.f1 { isolation: isolate; }
.f1-backdrop > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--f1-art-position) center; }
.f1-backdrop canvas { image-rendering: pixelated; }
.f1-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--f1-veil) 80%, transparent), transparent 220px),
    linear-gradient(90deg, color-mix(in srgb, var(--f1-veil) var(--f1-veil-start), transparent), color-mix(in srgb, var(--f1-veil) var(--f1-veil-end), transparent) 72%),
    linear-gradient(0deg, var(--f1-paper), transparent 30%);
}
[data-f1-theme="light"] [data-f1-art="dark"],
[data-f1-theme="dark"] [data-f1-art="light"] { display: none; }

.f1-top, .f1-grid, .f1-foot { width: min(100% - 36px, 1200px); margin-inline: auto; }
.f1-top, .f1-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.f1-top { min-height: 70px; border-bottom: 1px solid color-mix(in srgb, var(--ff-ink) 17%, transparent); }
.f1-top a, .f1-top button, .f1-foot a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; font: 650 14px/1.2 "Inter", sans-serif; white-space: nowrap; }
.f1-top a { text-decoration: none; }
.f1-brand { gap: 10px; letter-spacing: -.045em; }
/* The shared logo's size (design.css .brand-mark), drawn in the page's own colours so the F1 theme switch reaches it. */
.f1-top .f1-brand { font-size: 24px; font-weight: 700; }
.f1-top .ff-mark { gap: 3px; height: 28px; }
.f1-top .ff-mark i { width: 6px; height: 22px; border-radius: 3px; }
.f1-top .ff-mark i:nth-child(2) { height: 28px; }
.f1-top .ff-mark i:nth-child(3) { height: 17px; }
@media (max-width: 760px) { .f1-top .f1-brand { gap: 8px; font-size: 20px; } .f1-top .ff-mark { transform: rotate(-12deg) scale(.85); transform-origin: left center; width: 25px; } }
.f1-brand .ff-mark i:nth-child(2) { background: #0866da; }  /* the logo stays ink, blue, ink whatever the race palette (brand book) */
[data-f1-theme="dark"] .f1-brand .ff-mark i:nth-child(2) { background: #75aeff; }
.f1-top nav { display: flex; align-items: center; gap: 6px; }
.f1-top nav a, .f1-theme { gap: 6px; padding: 0 9px; border-radius: 8px; }
.f1-theme { border: 0; background: transparent; cursor: pointer; }
.f1-theme .icon { width: 17px; height: 17px; }
.f1-theme .f1-sun, [data-f1-theme="dark"] .f1-theme .f1-moon { display: none; }
[data-f1-theme="dark"] .f1-theme .f1-sun { display: inline; }

.f1-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 30px; padding-block: clamp(24px, 4.6vw, 76px) 46px; }
.f1-start { display: flex; align-items: center; gap: 10px; color: var(--ff-soft); font-size: 13px; font-weight: 650; }
.f1-venue { min-width: 0; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; }
.f1-venue img { display: block; }
.f1-lights { cursor: pointer; flex: none; display: flex; gap: 7px; width: fit-content; padding: 7px 9px; border: 1px solid #323d4e; border-radius: 8px; background: #202b3b; box-shadow: var(--f1-shadow); }
.f1-lights i { width: 12px; height: 12px; border-radius: 50%; background: #505d70; }
.f1-lights i.is-lit { background: #e42f3a; box-shadow: 0 0 9px #e42f3a80; }
.f1-intro h1 { margin-top: 18px; font-size: clamp(46px, 11.3vw, 91px); line-height: .98; letter-spacing: -.047em; word-spacing: .025em; font-weight: 715; }
.f1-intro p { max-width: 34ch; margin-top: 15px; color: var(--ff-soft); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.5; }
.f1-launch { margin-top: 25px; padding: clamp(14px, 2vw, 24px); border: 1px solid var(--ff-line); border-radius: 18px; background: var(--f1-surface); box-shadow: var(--f1-shadow); }
.f1-launch h2 { font-size: 22px; line-height: 1.2; font-weight: 720; letter-spacing: -.032em; }
.f1 .f1-pack-description { margin: 6px 0 17px; max-width: 46ch; color: var(--ff-soft); font-size: 14px; }
.f1 .ff { width: 100%; }
.f1 .ff-add { min-height: 48px; padding-inline: 13px; background: var(--ff-chip); }
.f1 .ff-add input { min-height: 44px; font-size: 16px; }
.f1 .ff-add input::-webkit-search-cancel-button { display: revert; }
.f1 .ff-chips { flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; overflow: visible; }
.f1 .ff-chips li, .f1 .ff-lineup li { min-width: 0; max-width: 100%; }
.f1 .ff-chip { max-width: 100%; gap: 6px; padding-inline: 6px 10px; }
.f1 .ff-chip > span:not(.ff-face) { overflow: hidden; text-overflow: ellipsis; }
.f1 .f1-source-name { display: grid; line-height: 1.18; text-align: left; }
.f1-source-name small { margin-top: 2px; color: var(--ff-soft); font-size: 11px; font-weight: 500; }
.f1 .ff-chip .ff-face { width: 26px; height: 26px; }
.f1 .ff-chip[aria-pressed="true"], .f1 .ff-chip.is-on { background: var(--f1-selection); box-shadow: inset 0 0 0 1px var(--ff-accent); color: var(--ff-ink); }
.f1 .ff-tick { color: var(--ff-accent); flex: none; }
.f1 .ff-more { padding-inline: 11px; background: var(--f1-surface); }
.f1 .ff-chips.is-open .ff-more { display: inline-flex; }
.f1 .ff-chips .f1-more-row { order: 1; }
.f1 .ff-chips:not(.is-open) [data-ff-extra]:has([aria-pressed="true"]) { display: list-item; }
.f1 .ff-chips.is-open .f1-more-row { order: -1; flex-basis: 100%; }
.f1 .ff-go { min-height: 48px; gap: 8px; padding-inline: 12px; font-size: 15px; }
.f1 .ff-count { align-self: center; font-size: 13px; }
.f1 .ff-confirm { border: 1px solid var(--ff-line); background: var(--f1-surface); }
.f1 .ff-confirm form { padding: 22px 16px 16px; }
.f1 .ff-stack { flex-wrap: wrap; row-gap: 6px; }
.f1 .ff-found { min-width: 0; overflow-wrap: anywhere; }
.f1 .ff-found span:last-child { flex: none; max-width: 32%; text-align: right; }
@media (hover: hover) {
  .f1 .ff-go:hover { background: var(--f1-hover); }
  .f1 .ff-chip:hover, .f1 .ff-found:hover { box-shadow: inset 0 0 0 1px var(--ff-soft); }
  .f1-top nav :is(a, button):hover { background: var(--f1-selection); }
}

.f1 .ff-preview { gap: 13px; min-width: 0; }
.f1 .ff-preview h2 { justify-self: start; padding: 7px 12px; border-radius: 8px; background: var(--f1-surface); box-shadow: var(--f1-shadow); font-size: 17px; letter-spacing: -.025em; }
.f1 .ff-posts { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px; }
.f1 .ff-posts:not(:has(> :not([hidden]))) { display: none; }
.f1 .public-post { min-width: 0; }
.f1 .public-post .card { box-shadow: var(--f1-shadow); }
@media (min-width: 1100px) {
  .sheet-docked .f1-grid { width: min(calc(100% - 596px), 1200px); margin-left: 18px; grid-template-columns: minmax(0, 1fr); }
  .sheet-docked .f1 .ff-preview { margin-top: 0; }
}
.f1 .f1-preview-empty { padding: 16px; border: 1px solid var(--ff-line); border-radius: 12px; background: var(--f1-surface); box-shadow: var(--f1-shadow); }
.f1 .f1-preview-empty, .f1-foot { color: var(--ff-soft); font-size: 14px; }
.f1-foot { align-items: start; flex-wrap: wrap; border-top: 1px solid var(--ff-line); padding-block: 16px 22px; }
.f1-credits { display: grid; gap: 3px; font-size: 12px; }
.f1 .f1-credits a { display: inline; color: inherit; font-size: inherit; font-weight: 500; white-space: normal; }

@media (max-width: 819px) {
  .f1-launch { margin-top: clamp(32px, 11vw, 62px); }
}
@media (min-width: 820px) {
  .f1-backdrop { --f1-art-position: 50%; }
  .f1-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .85fr); gap: clamp(42px, 8.5vw, 138px); }
  .f1-intro h1 { font-size: clamp(58px, 6.65vw, 90px); }
  .f1-launch { margin-top: 32px; }
  .f1 .ff-preview { margin-top: clamp(110px, 18vw, 260px); }
}
@media (min-width: 1080px) {
  .f1 .ff { grid-template-columns: auto 1fr; align-items: center; }
  .f1 .ff-add, .f1 .ff-results, .f1 .ff-chips, .f1 [data-ff-full] { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .f1-lights { display: none; }
  .f1 .ff-chip, .f1 .ff-go { transform: none; transition: none; }
}

/* Pack pages on this layout (/ai, /youtube): the app's paper and blue, no race art, and the pack by kind below. */
body.f1.pack {
  --f1-paper: #f6f6f4;
  --ff-ink: #15171a;
  --ff-soft: #50555c;
  --ff-line: #e2e3e0;
  --ff-chip: #f1f2ef;
  --ff-accent: #0866da;
  --f1-hover: #0657bb;
  --f1-selection: #e6f0fc;
  --f1-shadow: 0 10px 32px #1a1f2614, 0 2px 6px #1a1f260b;
  --app-faint: #646a72;
}
.pack .ff-preview { margin-top: 0; }
.pack .f1-intro h1 { font-size: clamp(40px, 10vw, 64px); }
.pack-more { width: min(100% - 36px, 1200px); margin: 0 auto 40px; display: grid; gap: 14px; }
.pack-more section { padding: clamp(16px, 2vw, 24px); border: 1px solid var(--ff-line); border-radius: 18px; background: var(--f1-surface); }
.pack-more h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.2; letter-spacing: -.03em; }
.pack-more p, .pack-more ul { margin: 0; max-width: 62ch; color: var(--ff-soft); font-size: 15px; }
.pack-more ul { padding-left: 1.1em; }
.pack-more ul:not(.pack-names) li + li { margin-top: 4px; }
.f1 .pack-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; }
.pack-links a { color: var(--ff-accent); font-weight: 650; }
.f1 .pack-names { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; max-width: none; }
.pack-names li { margin: 0; padding: 5px 10px; border-radius: 999px; background: var(--ff-chip); color: var(--ff-ink); font-size: 14px; }
@media (min-width: 820px) { .pack-more { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pack-more section:first-child { grid-column: 1 / -1; } }
