:root {
  --bg: #f5f2ea;
  --card: #ffffff;
  --ink: #1f2933;
  --muted: #687385;
  --line: #e7dfd0;
  --accent: #f6a800;
  --accent-dark: #9f161d;
  --gold: #ffcb3d;
  --green: #0d7c59;
  --shadow: 0 20px 50px rgba(32, 24, 12, 0.14);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(216,35,42,.16), transparent 26rem),
    linear-gradient(180deg, #fff9e7 0%, var(--bg) 42%, #eee6d8 100%);
  min-height: 100vh;
}
a { color: inherit; }

.site-hero {
  position: relative;
  overflow: hidden;
  padding: max(18px, env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 44px;
  background: linear-gradient(135deg, #1b1b1f 0%, #f6a800 48%, #151516 100%);
  color: #fff;
}
.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: .13;
  background-image:
    linear-gradient(45deg, #fff 25%, transparent 25%),
    linear-gradient(-45deg, #fff 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #fff 75%),
    linear-gradient(-45deg, transparent 75%, #fff 75%);
  background-size: 34px 34px;
  background-position: 0 0, 0 17px, 17px -17px, -17px 0;
}
.site-hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -86px -8%;
  height: 150px;
  transform: rotate(-3deg);
  background: var(--bg);
}
.topbar, .hero-card { position: relative; z-index: 1; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto 34px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--accent);
  box-shadow: 0 10px 30px rgba(216,35,42,.4);
  font-size: 1.45rem;
}
.brand strong { display: block; font-size: clamp(1.05rem, 2.4vw, 1.45rem); }
.brand small { display: block; color: rgba(255,255,255,.72); margin-top: 2px; }
.top-link {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.22);
  padding: .72rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
}
.hero-card {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(26px, 6vw, 56px);
  border-radius: calc(var(--radius) + 10px);
 background:
    linear-gradient(135deg, #f58823, #f58823),
    linear-gradient(135deg, transparent, rgba(255,255,255,.18));
  box-shadow: var(--shadow);
}
.eyebrow {
  margin: 0 0 .45rem;
  color: #1f2933;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
h1, h2 { margin: 0; line-height: 1.05; }
h1 { font-size: clamp(2.2rem, 7vw, 5.5rem); max-width: 920px; }
.small { margin: 1rem 0 0; color: rgba(255,255,255,.84); font-size: clamp(1rem, 2.4vw, 1.35rem); }

.container {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 32px));
  margin: -22px auto 48px;
}
.navigation-card, .class-block {
  margin-bottom: 22px;
  padding: clamp(18px, 4vw, 30px);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(231,223,208,.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-heading h2, .class-block h2 { font-size: clamp(1.45rem, 3.4vw, 2.25rem); }
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
button, .overview-button {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: .95rem 1rem;
  color: #fff;
  background: #24252b;
  font: inherit;
  font-weight: 400;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
button:hover, .overview-button:hover { 
	transform: translateY(-2px); 
	box-shadow: 0 12px 24px rgba(31,41,51,.16); 
}
button.primary { 
	background: var(--accent); 
}
.overview-button { 
	background: var(--green); 
	margin-bottom: 10px; 
}
.class-block h2 {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 4px solid var(--accent);
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th {
  white-space: nowrap;
  padding: 15px 14px;
  color: #fff;
  background: #1f2025;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: left;
}

td { padding: 14px; border-top: 1px solid var(--line); vertical-align: top; }
tbody tr:nth-child(even) { background: #faf7f0; }
tbody tr:hover { background: #fff3d0; }

td:first-child,
th:first-child {
  width: 90px;
  min-width: 90px;
  text-align: center;
  font-weight: 900;
  color: var(--accent-dark);
  white-space: nowrap;
}

table.results th:first-child {
    color: #fff;
    font-weight: 700;
}

table.results td:first-child {
    color: #000;
    font-weight: 700;
}

td:nth-child(4), td:nth-child(5) { font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.status-dns, .status-dnf, .status-mp, .status-disq { color: var(--muted); background: #f4f5f6 !important; }
.subtext { margin-top: 4px; color: var(--muted); font-size: .88rem; }

footer {
  padding: 28px 16px 40px;
  color: var(--muted);
  text-align: center;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 28px;
}
.footer-inner a { 
	color: var(--accent-dark); 
	font-weight: 400; 
	text-decoration: none; 
}
.footer-logo {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.logo-footer {
	max-width: 1120px;
    width: 100%;
    height: auto;
    display: block;
}

/* Handy Hochformat:
   nur Rang | Name | Zeit anzeigen */
@media (max-width: 767px) and (orientation: portrait) {

    .desktop-col {
        display: none;
    }

    .table-scroll {
        margin-left: -8px;
        margin-right: -8px;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    table.results {
        width: 100%;
        table-layout: fixed;
        font-size: 0.9rem;
    }

    table.results th,
    table.results td {
        padding: 0.4rem 0.25rem;
    }

    /* Rang */
    table.results th:nth-child(1),
    table.results td:nth-child(1) {
        width: 50px;
        white-space: nowrap;
        text-align: center;
    }

    /* Name */
    table.results th:nth-child(2),
    table.results td:nth-child(2) {
        width: auto;
    }

    /* Zeit */
    table.results th:nth-child(4),
    table.results td:nth-child(4) {
        width: 70px;
        white-space: nowrap;
        text-align: right;
    }
}
#categories-navigation button,
button {
  background: #f58823;
  border-color: #f58823;
  color: #fff;
}

button.primary {
  background: #f6a800;
  border-color: #f6a800;
  color: #fff;
}

#categories-navigation button:hover,
button:hover,
button.primary:hover {
  background: #f6a800;
  border-color: #f6a800;
}
table.results {
    table-layout: auto;
}

table.results th:first-child,
table.results td:first-child {
    width: 60px;
    text-align: center;
    white-space: nowrap;
}

table.results th:nth-child(4),
table.results td:nth-child(4) {
    white-space: nowrap;
}
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 9999;
    padding: 20px;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.modal-content p {
    margin: 8px 0;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
}