/* Hallmark · KRL · editorial motorsport · league directory and race records */
/* Shared surfaces frame the sporting content. Country flags carry the calendar. */
:root {
  --backgroundcolor: #151d22;
  --surface: #202c33;
  --surface-raised: #2a3940;
  --paper: #f0eee6;
  --muted: #bcc8c9;
  --stroke: #526369;
  --accent: #a2d5c8;
  --focus-ring: #f3cc80;
  --grid-mark: #697e7a;
  --flag-shade: rgb(12 21 26 / 74%);
  --flag-mid: rgb(12 21 26 / 18%);
  --flag-base: rgb(12 21 26 / 87%);
}
html.christmas-on {
  --backgroundcolor: #142320;
  --surface: #20332f;
  --surface-raised: #2c413b;
  --accent: #e0c58d;
  --grid-mark: #887c60;
}
html, body { overflow-x: clip; }
html body, html.christmas-on body { color: var(--paper); background: var(--backgroundcolor); }
html .navbar, html.christmas-on .navbar, html .footer, html.christmas-on .footer {
  background: var(--surface);
  border-color: var(--stroke);
  box-shadow: none;
}
.navbar .nav-links :is(a,button) { letter-spacing: normal; }
.navbar .dropdown-content { background: var(--surface); border-color: var(--stroke); }
.footer a:hover, .footer a:focus-visible { color: var(--accent); text-decoration-thickness: 2px; }
html body :focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
main :is(h1,h2,h3) { min-width: 0; overflow-wrap: break-word; text-shadow: none; }
main :is(.eyebrow,.help-card-label,.section-label) { letter-spacing: normal; text-transform: none; }
html main :is(.rdn-hero,.icons-hero,.icons-hero-badge,.help-hero,.e-hero,.e-join,.wdl-hero,.lmu-hero,.manager-hero,.krl-history,.log,.regelwerk,.regelwerk-nav,.legal-page,.advent-explainer article),
html main :is(.help-card,.regel-block,.icon-profile,.team-card,.e-contact,.wdl-contact,.manager-team-card,.history-detail,.rdn-document-heading,.home-lmu,.home-endurance,.feature-item,.admin-card,.admin-card2) {
  background: var(--surface);
  border-color: var(--stroke);
  box-shadow: none;
}
html main :is(.help-card,.grid-actions a,.class-button) {
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
html main :is(.help-card,.class-button):is(:hover,:focus-visible) {
  border-color: var(--accent);
  box-shadow: none;
}
main :is(.log,.legal-page,.regel-block,.history-detail) :is(p,li) { line-height: 1.65; }
main :is(.log,.legal-page,.regel-block) p { max-inline-size: 76ch; }
.regelwerk-nav #regelSuche, main :is(input,textarea,select):not([type=checkbox],[type=radio],[type=range]) {
  background: var(--surface-raised);
  color: var(--paper);
  border: 1px solid var(--muted);
  border-radius: .35rem;
  min-height: 2.75rem;
}
main input::placeholder { color: var(--muted); opacity: 1; }
main :is(table,.punkte-item,.manager-drivers,.e-event-grid) { font-variant-numeric: tabular-nums; }
main :is(th,td) { padding: .65rem .85rem; border-bottom: 1px solid var(--stroke); }
main th { background: var(--surface-raised); color: var(--paper); }
main td { background: var(--surface); color: var(--paper); }
html.christmas-on .christmas-bulb { animation: none; box-shadow: none; }
html.christmas-on .christmas-snow { opacity: .45; }
.homepage .grid-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(76rem, calc(100% - 2rem));
  margin: clamp(1.5rem,4vw,3.5rem) auto;
  padding: clamp(1.5rem,5vw,4.5rem);
  border-block: 1px solid var(--stroke);
  background: var(--surface);
  text-align: left;
}
.grid-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 12% 6% 12% auto;
  width: min(21%,16rem);
  transform: skewX(-16deg);
  border-inline: clamp(4px,1vw,14px) double var(--grid-mark);
  pointer-events: none;
}
.homepage .grid-hero h1 {
  margin: 0;
  padding: 0;
  color: var(--paper);
  font-size: clamp(2.65rem,7.2vw,6.2rem);
  font-weight: 760;
  letter-spacing: -.055em;
  line-height: .98;
  text-align: left;
  text-transform: none;
}
.grid-hero p { margin: 1.3rem 0; max-width: 43ch; color: var(--muted); }
.grid-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.grid-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .6rem 1.15rem;
  border: 1px solid var(--stroke);
  border-radius: .3rem;
  color: var(--paper);
  text-decoration: none;
  font-weight: 650;
}
.grid-actions a:first-child { background: var(--accent); border-color: var(--accent); color: var(--backgroundcolor); }
.grid-actions a:is(:hover,:focus-visible) { text-decoration: underline; text-underline-offset: .22em; }
@media (max-width: 45rem) {
  .grid-hero::after { inset-inline-end: .75rem; width: .7rem; }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    main :is(.help-card,.icon-profile,.e-contact,.manager-race-card) {
      animation: krl-enter linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 85%;
    }
    @keyframes krl-enter {
      from { opacity: .9; translate: 0 .35rem; }
      to { opacity: 1; translate: 0 0; }
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html main *, html main *::before, html main *::after { transition-duration: 0s; }
}

/* The active result sets the frame height through its intrinsic dimensions. */
.f1-results .top-carousels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 72rem);
}
.f1-results .carousel-box { width: 100%; }
.f1-results .middle-carousel { width: min(100%, 38rem); }
.f1-results .carousel-box .carousel, .f1-results .middle-carousel .carousel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-items: center;
  gap: .65rem;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
}
.f1-results .carousel .carousel-track-container {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.f1-results .carousel-track { display: block; width: 100%; height: auto; }
.f1-results .carousel .carousel-track img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  border: 0;
}
.f1-results .carousel .carousel-track img[hidden] { display: none; }
.f1-results .carousel .carousel-btn {
  grid-row: 2;
  position: static;
  transform: none;
  margin: 0;
}
.f1-results .carousel-btn.prev { grid-column: 1; justify-self: end; }
.f1-results .carousel-btn.next { grid-column: 2; justify-self: start; }
.features .feature-item .lmu-broadcast-icon { width: 2.5rem; height: 2.5rem; }
html:has(main.homepage) { scroll-behavior: auto; }
.home-opening-image {
  width: 100%;
  height: 100%;
  size: cover;
  object-fit: cover;
  object-position: center top;
}
@media (max-aspect-ratio: 1/1) {
  .home-opening-image { object-position: 15% center; }
}
body:has(main.homepage) .christmas-flight { display: none; }
@media (max-width: 48rem) {
  .f1-results .top-carousels { grid-template-columns: minmax(0, 1fr); }
}
