:root {
  --bg: #070a10;
  --bg2: #0b1220;
  --text: #eaf2ff;
  --muted: rgba(234, 242, 255, 0.76);
  --accent: #e10600;
  --accent2: #fff;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  font-family: Inter, Arial, sans-serif;
}

body.page-practicum {
  background: var(--bg);
}

img,
svg {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
.table-wrap:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.92);
  outline-offset: 3px;
}

.bg {
  position: fixed;
  z-index: -1;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 10, 16, 0.2), rgba(7, 10, 16, 0.45));
}

.track {
  width: 100%;
  height: 100%;
  max-width: none;
  opacity: 0.32;
  filter: drop-shadow(0 0 12px rgba(225, 6, 0, 0.22));
}

.page-practicum .track {
  opacity: 0.2;
  filter: drop-shadow(0 0 12px rgba(225, 6, 0, 0.18));
}

.container,
.topbar {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.container {
  padding: 18px 0 48px;
}

header {
  position: sticky;
  z-index: 5;
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(7, 10, 16, 0.95) 0%, rgba(7, 10, 16, 0.82) 100%);
  backdrop-filter: blur(10px);
}

.topbar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
}

.brand .tag {
  padding: 3px 8px;
  border: 1px solid rgba(234, 242, 255, 0.18);
  border-radius: 999px;
  color: rgba(234, 242, 255, 0.78);
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand h1 {
  margin: 0;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand h1 span {
  color: var(--accent);
}

nav {
  min-width: 0;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a {
  display: inline-block;
  padding: 9px 12px;
  border: 1px solid rgba(234, 242, 255, 0.1);
  border-radius: 12px;
  color: rgba(234, 242, 255, 0.94);
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

nav a:hover,
nav a[aria-current="page"] {
  border-color: rgba(225, 6, 0, 0.62);
  background: rgba(225, 6, 0, 0.13);
}

nav a:hover {
  transform: translateY(-1px);
}

nav a:active,
.link-chip:active {
  transform: translateY(0);
}

.hud {
  display: flex;
  gap: 12px;
  align-items: center;
  color: rgba(234, 242, 255, 0.74);
  font-size: 12px;
  white-space: nowrap;
}

.hud .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35ff8a;
  box-shadow: 0 0 14px rgba(53, 255, 138, 0.55);
}

.hud .chip {
  padding: 6px 10px;
  border: 1px solid rgba(234, 242, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.hero {
  display: grid;
  gap: 14px;
  padding: 30px 0 18px;
}

.page-practicum .hero {
  gap: 12px;
  padding: 26px 0 10px;
}

.hero h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: clamp(26px, 4vw, 44px);
  letter-spacing: 0.02em;
  line-height: 1.12;
}

.page-practicum .hero h2 {
  font-size: clamp(24px, 4vw, 40px);
}

.hero p {
  max-width: 72ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.page-practicum .hero p {
  max-width: 90ch;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.link-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(234, 242, 255, 0.14);
  border-radius: 999px;
  color: rgba(234, 242, 255, 0.94);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13.5px;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.link-chip:hover {
  border-color: rgba(225, 6, 0, 0.62);
  background: rgba(225, 6, 0, 0.12);
  transform: translateY(-1px);
}

.rule {
  width: 100%;
  height: 2px;
  border-radius: 999px;
  opacity: 0.9;
  background: linear-gradient(90deg, rgba(225, 6, 0, 0.85) 0%, rgba(225, 6, 0, 0) 72%);
}

.card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(234, 242, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.card h3 {
  margin: 0 0 10px;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 19px;
  letter-spacing: 0.02em;
}

.card h4 {
  margin: 0 0 8px;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.card p:last-child {
  margin-bottom: 0;
}

.card a,
footer a {
  color: rgba(234, 242, 255, 0.94);
  text-decoration: none;
  border-bottom: 1px dashed rgba(234, 242, 255, 0.4);
  overflow-wrap: anywhere;
}

.card a:hover,
footer a:hover {
  border-bottom-color: rgba(225, 6, 0, 0.82);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.page-term-one .grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-term-two .grid {
  grid-template-columns: minmax(0, 1fr);
}

.page-term-three .grid {
  grid-template-columns: minmax(0, 1fr);
}

.page-term-two .links {
  columns: 2;
  column-gap: 36px;
}

.page-term-two .links li {
  break-inside: avoid;
}

.links {
  margin: 0;
  padding-left: 20px;
  color: rgba(234, 242, 255, 0.88);
}

.links li {
  margin: 8px 0;
  padding-left: 2px;
  line-height: 1.5;
}

.badges,
.meta,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badges {
  margin-top: 14px;
}

.badge,
.pill {
  padding: 6px 10px;
  border: 1px solid rgba(234, 242, 255, 0.14);
  border-radius: 999px;
  color: rgba(234, 242, 255, 0.85);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
}

.pill {
  white-space: nowrap;
}

.badge.red,
.pill.red {
  border-color: rgba(225, 6, 0, 0.55);
  background: rgba(225, 6, 0, 0.1);
}

/* Home podium */
.podium-wrap {
  position: relative;
  margin-top: 18px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(234, 242, 255, 0.1);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow: var(--shadow);
}

.podium-wrap::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.22;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 24px, transparent 24px 30px, rgba(225, 6, 0, 0.24) 30px 42px, transparent 42px 54px);
  mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 70%, transparent 100%);
}

.podium {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 16px;
  align-items: end;
  padding-top: 10px;
}

.place {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(234, 242, 255, 0.12);
  border-radius: 16px;
  opacity: 1;
  background: rgba(0, 0, 0, 0.28);
  transform: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.place::before {
  position: absolute;
  z-index: 0;
  top: 22px;
  right: 14px;
  content: attr(data-round);
  color: #fff;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 82px;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  opacity: 0.055;
}

.place::after {
  position: absolute;
  right: -32px;
  bottom: -46px;
  width: 150px;
  height: 150px;
  content: "";
  opacity: 0.065;
  pointer-events: none;
  background:
    conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0)
    0 0 / 24px 24px;
  transform: rotate(-10deg);
}

.place > a {
  position: relative;
  z-index: 1;
  display: block;
  min-height: inherit;
  padding: 16px 16px 18px;
  color: inherit;
  text-decoration: none;
}

.place-top {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.place .season-status-light {
  flex: 0 0 auto;
  background: #35ff8a;
  box-shadow: 0 0 13px rgba(53, 255, 138, 0.58);
}

.place.p1 .season-status-light,
.place.p2 .season-status-light {
  background: var(--accent);
  box-shadow: 0 0 13px rgba(225, 6, 0, 0.72);
}

.place .num {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: rgba(234, 242, 255, 0.87);
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.place .num b {
  color: var(--accent2);
  font-size: 28px;
  line-height: 1;
}

.place h3 {
  margin: 10px 0 6px;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 22px;
  letter-spacing: 0.02em;
}

.place p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.place .meta {
  margin-top: 12px;
}

.p2 {
  min-height: 250px;
}

.p1 {
  min-height: 300px;
  border-color: rgba(225, 6, 0, 0.4);
  background: rgba(225, 6, 0, 0.1);
}

.p3 {
  min-height: 220px;
}

.place:hover,
.place:focus-within {
  border-color: rgba(225, 6, 0, 0.62);
  box-shadow: 0 18px 60px rgba(225, 6, 0, 0.12);
}

.place:hover .badge.red,
.place:focus-within .badge.red {
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.12);
}

@keyframes rise {
  from { transform: translateY(10px); }
  to { transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .page-home .place {
    animation: rise 0.45s ease-out both;
  }
}

/* Semester tyre allocation */
.tyre-allocation {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) auto minmax(280px, 1fr);
  gap: 24px;
  align-items: center;
  margin-top: 22px;
  overflow: hidden;
  padding: 20px 22px;
  border: 1px solid rgba(234, 242, 255, 0.11);
  border-radius: var(--radius);
  background:
    linear-gradient(105deg, rgba(225, 6, 0, 0.1), rgba(255, 255, 255, 0.035) 46%, rgba(0, 0, 0, 0.2)),
    rgba(0, 0, 0, 0.25);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

.tyre-allocation::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  content: "";
  background: linear-gradient(180deg, var(--accent), rgba(225, 6, 0, 0.18));
}

.tyre-allocation::after {
  position: absolute;
  right: -30px;
  bottom: -64px;
  width: 170px;
  height: 170px;
  content: "";
  opacity: 0.04;
  pointer-events: none;
  background:
    conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0)
    0 0 / 24px 24px;
  transform: rotate(-10deg);
}

.tyre-allocation > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.tyre-allocation h2 {
  margin: 3px 0 5px;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 23px;
  letter-spacing: 0.02em;
}

.tyre-allocation-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.tyre-counters {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  padding-inline: 22px;
  border-right: 1px solid rgba(234, 242, 255, 0.1);
  border-left: 1px solid rgba(234, 242, 255, 0.1);
}

.tyre-counter {
  display: grid;
  gap: 2px;
  text-align: center;
}

.tyre-counter strong {
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 38px;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.tyre-counter span,
.tyre-progress-label,
.tyre-progress-scale {
  font-family: Rajdhani, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.tyre-counter span {
  color: rgba(234, 242, 255, 0.68);
  font-size: 10px;
}

.tyre-counter-used strong {
  color: #ff625d;
}

.tyre-counter-left strong {
  color: #65ffa3;
}

.tyre-counter-separator {
  color: rgba(234, 242, 255, 0.3);
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 25px;
}

.tyre-progress-label,
.tyre-progress-scale {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  color: rgba(234, 242, 255, 0.68);
  font-size: 10.5px;
}

.tyre-progress-label b {
  color: rgba(234, 242, 255, 0.94);
  font-size: 12px;
}

.tyre-progress {
  display: block;
  width: 100%;
  height: 13px;
  margin: 8px 0 7px;
  overflow: hidden;
  appearance: none;
  border: 1px solid rgba(234, 242, 255, 0.14);
  border-radius: 999px;
  color: var(--accent);
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(8.333% - 1px), rgba(234, 242, 255, 0.13) calc(8.333% - 1px) 8.333%),
    rgba(255, 255, 255, 0.045);
}

.tyre-progress::-webkit-progress-bar {
  border-radius: inherit;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(8.333% - 1px), rgba(234, 242, 255, 0.13) calc(8.333% - 1px) 8.333%),
    rgba(255, 255, 255, 0.045);
}

.tyre-progress::-webkit-progress-value {
  border-radius: inherit;
  background: linear-gradient(90deg, #9e0500, var(--accent), #ff625d);
  box-shadow: 0 0 15px rgba(225, 6, 0, 0.48);
}

.tyre-progress::-moz-progress-bar {
  border-radius: inherit;
  background: linear-gradient(90deg, #9e0500, var(--accent), #ff625d);
  box-shadow: 0 0 15px rgba(225, 6, 0, 0.48);
}

.tyre-progress-scale span:last-child {
  text-align: right;
}

/* Future season starting grid */
.future-seasons {
  margin-top: 34px;
}

.future-seasons-head {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-kicker,
.season-round,
.future-seasons-range {
  font-family: Rajdhani, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.section-kicker {
  color: #ff625d;
  font-size: 12px;
}

.future-seasons h2 {
  margin: 3px 0 0;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.future-seasons-range {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid rgba(225, 6, 0, 0.42);
  border-radius: 999px;
  color: rgba(234, 242, 255, 0.88);
  background: rgba(225, 6, 0, 0.1);
  font-size: 12px;
  white-space: nowrap;
}

.future-seasons-intro {
  max-width: 72ch;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.season-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.season-card {
  position: relative;
  min-width: 0;
  min-height: 210px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(234, 242, 255, 0.11);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018) 62%),
    rgba(0, 0, 0, 0.24);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

.season-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  content: "";
  background: linear-gradient(180deg, var(--accent), rgba(225, 6, 0, 0.18));
}

.season-card::after {
  position: absolute;
  right: -30px;
  bottom: -38px;
  width: 150px;
  height: 150px;
  content: "";
  opacity: 0.065;
  pointer-events: none;
  background:
    conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0)
    0 0 / 24px 24px;
  transform: rotate(-10deg);
}

.season-card > * {
  position: relative;
  z-index: 1;
}

.season-card-top {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.season-round {
  color: rgba(234, 242, 255, 0.72);
  font-size: 12px;
}

.season-status-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffb020;
  box-shadow: 0 0 12px rgba(255, 176, 32, 0.55);
}

.season-number {
  position: absolute;
  z-index: 0;
  top: 24px;
  right: 12px;
  color: #fff;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 78px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  opacity: 0.055;
}

.season-card h3 {
  margin: 32px 0 8px;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 21px;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.season-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.season-card .meta {
  margin-top: 16px;
}

/* Empty third-semester garage */
.semester-placeholder {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  padding: 28px;
  border-color: rgba(225, 6, 0, 0.34);
  background:
    linear-gradient(110deg, rgba(225, 6, 0, 0.13), rgba(255, 255, 255, 0.035) 52%, rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.22);
}

.semester-placeholder::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--accent), rgba(225, 6, 0, 0.12) 72%);
}

.semester-placeholder::after {
  position: absolute;
  right: -34px;
  bottom: -56px;
  width: 240px;
  height: 240px;
  content: "";
  opacity: 0.055;
  pointer-events: none;
  background:
    conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0)
    0 0 / 32px 32px;
  transform: rotate(-12deg);
}

.semester-placeholder > * {
  position: relative;
  z-index: 1;
}

.semester-placeholder-number {
  position: absolute;
  z-index: 0;
  top: 24px;
  right: 28px;
  color: #fff;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: clamp(96px, 17vw, 180px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.8;
  opacity: 0.055;
}

.semester-placeholder h3 {
  max-width: 22ch;
  margin: 46px 0 12px;
  font-size: clamp(24px, 3vw, 32px);
}

.semester-placeholder p {
  max-width: 64ch;
  font-size: 15px;
}

/* Semester garages */
.semester-content-card {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  padding: 22px;
  border-color: rgba(234, 242, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02) 62%),
    rgba(0, 0, 0, 0.25);
}

.semester-content-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--accent), rgba(225, 6, 0, 0.12) 72%);
}

.semester-content-card::after {
  position: absolute;
  right: -44px;
  bottom: -54px;
  width: 190px;
  height: 190px;
  content: "";
  opacity: 0.055;
  pointer-events: none;
  background:
    conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0)
    0 0 / 28px 28px;
  transform: rotate(-11deg);
}

.semester-content-card > * {
  position: relative;
  z-index: 1;
}

.semester-card-number {
  position: absolute;
  z-index: 0;
  top: 34px;
  right: 18px;
  color: #fff;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 96px;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.8;
  opacity: 0.045;
}

.semester-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.semester-card-label,
.semester-card-state {
  color: rgba(234, 242, 255, 0.72);
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.semester-card-state {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.status-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35ff8a;
  box-shadow: 0 0 12px rgba(53, 255, 138, 0.58);
}

.page-term-one .hud .dot,
.page-term-two .hud .dot,
.page-term-one .status-light,
.page-term-two .status-light {
  background: var(--accent);
  box-shadow: 0 0 13px rgba(225, 6, 0, 0.72);
}

.semester-content-card h3 {
  margin: 30px 0 14px;
  font-size: 22px;
}

.semester-content-card .links {
  padding: 0;
  list-style: none;
}

.semester-content-card .links li {
  margin: 8px 0;
  padding: 0;
}

.semester-content-card .links a {
  position: relative;
  display: block;
  padding: 10px 34px 10px 12px;
  border: 1px solid rgba(234, 242, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  line-height: 1.45;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.semester-content-card .links a::after {
  position: absolute;
  top: 50%;
  right: 12px;
  content: "›";
  color: #ff625d;
  font-size: 21px;
  line-height: 1;
  transform: translateY(-52%);
}

.semester-content-card .links a:hover,
.semester-content-card .links a:focus-visible {
  border-color: rgba(225, 6, 0, 0.6);
  background: rgba(225, 6, 0, 0.1);
  transform: translateX(2px);
}

.semester-content-card .badges {
  margin-top: 18px;
}

.semester-practicums-card {
  min-height: 0;
  padding: 28px;
}

.page-term-two .practicum-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  columns: auto;
}

.page-term-two .practicum-list li {
  margin: 0;
}

/* Driver profile */
.page-about .about-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
}

.about-card {
  min-height: 310px;
}

.about-profile-card {
  border-color: rgba(225, 6, 0, 0.34);
  background:
    linear-gradient(115deg, rgba(225, 6, 0, 0.12), rgba(255, 255, 255, 0.035) 54%, rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.24);
}

.about-card-number {
  font-size: 88px;
  letter-spacing: -0.04em;
}

.about-card p {
  max-width: 66ch;
  font-size: 15px;
}

.about-contact-card .contact-label {
  margin-bottom: 7px;
  color: rgba(234, 242, 255, 0.62);
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card .contact-link {
  position: relative;
  display: block;
  padding: 13px 38px 13px 13px;
  border: 1px solid rgba(234, 242, 255, 0.12);
  border-radius: 13px;
  color: rgba(234, 242, 255, 0.94);
  background: rgba(0, 0, 0, 0.22);
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.contact-link span {
  display: block;
  margin-bottom: 3px;
  color: #ff625d;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.contact-link::after {
  position: absolute;
  top: 50%;
  right: 13px;
  content: "›";
  color: #ff625d;
  font-size: 22px;
  transform: translateY(-52%);
}

.card .contact-link:hover,
.card .contact-link:focus-visible {
  border-color: rgba(225, 6, 0, 0.62);
  background: rgba(225, 6, 0, 0.1);
  transform: translateX(2px);
}

/* Reports and practicums */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}

.layout > * {
  min-width: 0;
}

.doc-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.doc-title {
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.doc-meta {
  color: rgba(234, 242, 255, 0.76);
  font-size: 13px;
  line-height: 1.5;
}

.pill-row {
  margin-top: 10px;
}

.section-divider {
  height: 1px;
  margin: 14px 0 8px;
  border: 0;
  background: rgba(234, 242, 255, 0.1);
}

.content h3 {
  margin: 18px 0 8px;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.content h4 {
  margin: 14px 0 8px;
  color: rgba(234, 242, 255, 0.98);
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.content p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.content ul,
.content ol {
  margin: 0 0 12px;
  padding-left: 20px;
  color: rgba(234, 242, 255, 0.88);
  font-size: 14.5px;
  line-height: 1.65;
}

.content li {
  margin: 6px 0;
}

.content p,
.content li,
.content h3,
.content h4,
.content a,
.content code,
.content .doc-meta {
  overflow-wrap: anywhere;
}

.content code,
.content pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.content pre {
  max-width: 100%;
  overflow: auto;
}

.toc {
  position: sticky;
  top: 86px;
}

.toc h4 {
  margin: 0 0 8px;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.toc a {
  display: block;
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid rgba(234, 242, 255, 0.1);
  border-radius: 12px;
  color: rgba(234, 242, 255, 0.9);
  background: rgba(0, 0, 0, 0.18);
  font-size: 13.5px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.toc a:hover {
  border-color: rgba(225, 6, 0, 0.62);
  background: rgba(225, 6, 0, 0.12);
}

.table-wrap {
  max-width: 100%;
  margin: 12px 0 14px;
  overflow-x: auto;
  border: 1px solid rgba(234, 242, 255, 0.12);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-right: 1px solid rgba(234, 242, 255, 0.08);
  border-bottom: 1px solid rgba(234, 242, 255, 0.1);
  color: rgba(234, 242, 255, 0.88);
  font-size: 13.5px;
  text-align: left;
  white-space: nowrap;
}

th {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

td:last-child,
th:last-child {
  border-right: 0;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

details {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(234, 242, 255, 0.12);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
}

summary {
  cursor: pointer;
  color: rgba(234, 242, 255, 0.92);
  font-weight: 600;
}

.details-body {
  margin-top: 10px;
  color: rgba(234, 242, 255, 0.8);
  font-size: 13.8px;
  line-height: 1.6;
}

.page-figures .figure {
  margin: 16px 0 20px;
  padding: 14px;
  border: 1px solid rgba(234, 242, 255, 0.12);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
}

.page-figures .figure-placeholder {
  display: flex;
  min-height: 240px;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 1.5px dashed rgba(234, 242, 255, 0.22);
  border-radius: 14px;
  color: rgba(234, 242, 255, 0.62);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 100%);
  font-size: 14px;
  text-align: center;
}

.page-figures .figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(234, 242, 255, 0.08);
  border-radius: 12px;
}

.caption {
  margin-top: 10px;
  color: rgba(234, 242, 255, 0.8);
  font-size: 13.5px;
  line-height: 1.5;
}

.highlight-box {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(225, 6, 0, 0.22);
  border-radius: 16px;
  background: rgba(225, 6, 0, 0.08);
}

.highlight-box p:last-child,
.content ul:last-child {
  margin-bottom: 0;
}

.page-review .figure {
  margin: 14px 0;
  overflow: visible;
  border: 1px solid rgba(234, 242, 255, 0.12);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
}

.page-review .figure svg,
.page-review .figure img {
  display: block;
  width: 100%;
  height: auto;
}

.figcap {
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(234, 242, 255, 0.1);
  color: rgba(234, 242, 255, 0.78);
  font-size: 12.5px;
  line-height: 1.5;
}

.image-panel {
  margin: 12px 0 14px;
  padding: 22px;
  border: 1px dashed rgba(234, 242, 255, 0.24);
  border-radius: 16px;
  color: rgba(234, 242, 255, 0.76);
  background: rgba(0, 0, 0, 0.18);
  text-align: center;
}

.image-panel img {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
}

.report-figure {
  margin: 12px 0 14px;
  padding: 14px;
  border: 1px solid rgba(234, 242, 255, 0.12);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
}

.report-figure img {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  margin-inline: auto;
  border-radius: 12px;
}

.report-figure figcaption {
  margin-top: 10px;
  color: rgba(234, 242, 255, 0.74);
  font-size: 13.5px;
  line-height: 1.55;
}

.back-to-top {
  margin-top: 14px;
}

.back-to-top a {
  display: inline-block;
  padding: 10px 12px;
  border: 1px solid rgba(234, 242, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

footer {
  margin-top: 26px;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(234, 242, 255, 0.1);
  color: rgba(234, 242, 255, 0.74);
  font-size: 13px;
  line-height: 1.5;
}

.copyright {
  margin-top: 8px;
}

@media (max-width: 1080px) {
  .hud {
    display: none;
  }
}

@media (max-width: 880px) {
  .podium,
  .grid,
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-term-one .grid,
  .page-term-two .grid,
  .page-term-three .grid,
  .page-about .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .season-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tyre-allocation {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tyre-progress-wrap {
    grid-column: 1 / -1;
  }

  .p1,
  .p2,
  .p3 {
    min-height: auto;
  }

  .toc {
    position: relative;
    top: 0;
  }

  table {
    min-width: 520px;
  }

  .page-term-two .links {
    columns: 1;
  }
}

@media (max-width: 620px) {
  .topbar {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  nav {
    width: 100%;
  }

  nav ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  nav a {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    text-align: center;
  }

  nav li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .hero {
    padding-top: 24px;
  }

  .podium-wrap {
    padding: 14px;
  }

  .future-seasons-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .tyre-allocation {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
  }

  .tyre-counters {
    justify-content: flex-start;
    padding: 15px 0;
    border-top: 1px solid rgba(234, 242, 255, 0.1);
    border-right: 0;
    border-bottom: 1px solid rgba(234, 242, 255, 0.1);
    border-left: 0;
  }

  .tyre-progress-wrap {
    grid-column: auto;
  }

  .season-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .season-card {
    min-height: 195px;
  }

  .page-term-two .practicum-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .card {
    padding: 14px;
  }

  .semester-placeholder {
    min-height: 250px;
    padding: 22px;
  }

  .page-figures .figure-placeholder {
    min-height: 180px;
  }
}

@media (max-width: 380px) {
  .container,
  .topbar {
    width: min(1120px, calc(100% - 24px));
  }

  .brand {
    gap: 7px;
  }

  .brand .tag {
    padding-inline: 6px;
    font-size: 11px;
  }

  .brand h1 {
    font-size: 20px;
  }

  .hero h2,
  .page-practicum .hero h2 {
    font-size: 25px;
  }

  .badge,
  .pill {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }
}
