:root {
  --ink: #101114;
  --ink-soft: #2c2f35;
  --muted: #6b6f78;
  --line: #e2e3e7;
  --surface: #ffffff;
  --canvas: #f2f3f5;
  --black: #0d0e11;
  --red: #e3262e;
  --red-dark: #bd141c;
  --green: #1d7a4a;
  --green-bg: #eaf5ef;
  --minor: #84952b;
  --minor-bg: #f2f6d9;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow: 0 16px 42px rgba(16, 17, 20, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
video {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.report-header {
  position: relative;
  overflow: hidden;
  background: var(--black);
  color: #fff;
  border-bottom: 4px solid var(--red);
}

.report-header::after {
  content: "";
  position: absolute;
  inset: auto -90px -190px auto;
  width: 420px;
  height: 420px;
  border: 70px solid rgba(227, 38, 46, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.report-header__inner,
.page-shell {
  width: min(1320px, calc(100% - 40px));
  margin-inline: auto;
}

.report-header__inner {
  position: relative;
  z-index: 1;
  padding: 34px 0 38px;
}

.report-header__brand {
  margin: 0 0 13px;
  color: #fff;
  font-size: clamp(0.78rem, 1.5vw, 0.92rem);
  font-weight: 850;
  letter-spacing: 0.16em;
}

.report-header__brand::before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 4px;
  margin: 0 11px 3px 0;
  background: var(--red);
}

.report-header__vehicle {
  max-width: 980px;
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 3.85rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 850;
}

.page-shell {
  padding: 24px 0 72px;
}

.overview,
.content-card,
.inspection-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.overview {
  overflow: hidden;
}

.overview__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 28px;
  padding: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.overview__title,
.section-heading__title,
.content-card__title,
.inspection-section__title {
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.overview__title {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.overview__summary {
  max-width: 830px;
  margin: 15px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.72;
}

.overall-result {
  display: flex;
  min-height: 152px;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, #15171c, #24272e);
  border-radius: var(--radius-md);
  border-left: 5px solid var(--red);
}

.overall-result__label {
  color: #b9bdc6;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.overall-result__value {
  margin-top: 7px;
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  font-weight: 850;
  line-height: 1.06;
}

.overview__facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: #fafafb;
}

.fact {
  min-width: 0;
  padding: 19px 22px;
  border-right: 1px solid var(--line);
}

.fact:last-child {
  border-right: 0;
}

.fact__label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact__value {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.94rem;
  font-weight: 750;
}

.section-block {
  margin-top: 30px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 15px;
}

.section-heading__title {
  font-size: clamp(1.35rem, 3vw, 1.95rem);
}

.section-heading__copy {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  text-align: right;
}

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

.video-card {
  overflow: hidden;
  background: #121318;
  border: 1px solid #26282f;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.video-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #090a0c;
}

.video-card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #090a0c;
}

.video-card__meta {
  padding: 15px 17px 17px;
  color: #fff;
}

.video-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.video-card__subtitle {
  margin: 5px 0 0;
  color: #aeb2bc;
  font-size: 0.82rem;
}

.jump-nav {
  position: sticky;
  z-index: 20;
  top: 10px;
  display: flex;
  gap: 8px;
  margin-top: 28px;
  padding: 10px;
  overflow-x: auto;
  background: rgba(13, 14, 17, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(13, 14, 17, 0.16);
  backdrop-filter: blur(12px);
  scrollbar-width: none;
}

.jump-nav::-webkit-scrollbar {
  display: none;
}

.jump-nav a {
  flex: 0 0 auto;
  padding: 10px 14px;
  color: #e8e9ed;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  border-radius: 9px;
  transition: color 0.18s ease, background 0.18s ease;
}

.jump-nav a:hover,
.jump-nav a:focus-visible {
  color: #fff;
  background: var(--red);
  outline: none;
}

.technical-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.content-card {
  padding: 20px;
}

.content-card__title {
  font-size: 1rem;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 21px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 0.42em;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--green-bg);
}

.inspection-section {
  margin-top: 20px;
  overflow: hidden;
  scroll-margin-top: 92px;
}

.inspection-section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: 25px 26px 23px;
  border-bottom: 1px solid var(--line);
}

.inspection-section__title {
  font-size: clamp(1.28rem, 2.5vw, 1.75rem);
}

.inspection-section__description {
  max-width: 890px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.status-pill,
.media-card__note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 999px;
}

.status-pill::before,
.media-card__note::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-pill--ok {
  color: var(--green);
  background: var(--green-bg);
}

.status-pill--ok::before {
  background: var(--green);
}

.status-pill--minor,
.media-card__note {
  color: #66721f;
  background: var(--minor-bg);
  border: 1px solid #dce6a7;
}

.status-pill--minor::before,
.media-card__note::before {
  background: var(--minor);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.media-card {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  background: #f7f7f8;
  border: 1px solid #dedfe3;
  border-radius: 11px;
  cursor: zoom-in;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.media-card:hover,
.media-card:focus-visible {
  z-index: 1;
  transform: translateY(-3px);
  border-color: #c9cbd1;
  box-shadow: 0 14px 30px rgba(16, 17, 20, 0.14);
  outline: none;
}

.media-card__visual {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dfe1e5, #f1f2f4);
}

.media-card__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.media-card:hover .media-card__visual img {
  transform: scale(1.025);
}

.media-card__visual.is-missing::after,
.video-card__media.is-missing::after {
  content: "Plik nie został jeszcze dodany";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #737780;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.45;
  text-align: center;
  background: repeating-linear-gradient(-45deg, #eff0f2, #eff0f2 10px, #e7e8eb 10px, #e7e8eb 20px);
}

.video-card__media.is-missing::after {
  color: #b7bac2;
  background: repeating-linear-gradient(-45deg, #15161a, #15161a 10px, #1b1d22 10px, #1b1d22 20px);
}

.media-card__body {
  display: grid;
  gap: 9px;
  padding: 13px 14px 14px;
}

.media-card__title {
  min-height: 2.55em;
  margin: 0;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.35;
}

.media-card__note {
  width: fit-content;
  padding: 5px 8px;
  font-size: 0.65rem;
}

.lightbox {
  width: min(1180px, calc(100% - 26px));
  max-width: none;
  margin: auto;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
}

.lightbox::backdrop {
  background: rgba(7, 8, 10, 0.94);
  backdrop-filter: blur(8px);
}

.lightbox__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.lightbox__category {
  margin: 0 0 4px;
  color: #ff6b72;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lightbox__title {
  margin: 0;
  font-size: clamp(1rem, 3vw, 1.35rem);
}

.lightbox__close,
.lightbox__nav {
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  cursor: pointer;
}

.lightbox__close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  font-size: 1.5rem;
}

.lightbox__stage {
  position: relative;
  display: grid;
  min-height: min(72vh, 820px);
  place-items: center;
  overflow: hidden;
  background: #090a0c;
  border-radius: 12px;
}

.lightbox__image {
  display: block;
  max-width: 100%;
  max-height: min(72vh, 820px);
  object-fit: contain;
}

.lightbox__nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 46px;
  height: 46px;
  font-size: 2rem;
  transform: translateY(-50%);
}

.lightbox__nav--prev {
  left: 14px;
}

.lightbox__nav--next {
  right: 14px;
}

.lightbox__counter {
  margin: 10px 0 0;
  color: #bec1c9;
  font-size: 0.76rem;
  text-align: center;
}

@media (max-width: 1100px) {
  .technical-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .report-header__inner,
  .page-shell {
    width: min(100% - 28px, 1320px);
  }

  .overview__top {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .overall-result {
    min-height: 120px;
  }

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

  .fact {
    border-bottom: 1px solid var(--line);
  }

  .fact:nth-child(2n) {
    border-right: 0;
  }

  .fact:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .section-heading__copy {
    margin-top: 8px;
    text-align: left;
  }

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

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

@media (max-width: 560px) {
  .report-header__inner {
    padding: 26px 0 29px;
  }

  .page-shell {
    padding-top: 14px;
  }

  .overview__top {
    gap: 20px;
    padding: 18px;
  }

  .overview__facts {
    grid-template-columns: 1fr;
  }

  .fact,
  .fact:nth-child(2n),
  .fact:last-child {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .fact:last-child {
    border-bottom: 0;
  }

  .jump-nav {
    margin-inline: -2px;
    top: 6px;
  }

  .technical-grid,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .inspection-section__head {
    grid-template-columns: 1fr;
    padding: 20px 18px;
  }

  .status-pill {
    width: fit-content;
  }

  .media-grid {
    gap: 12px;
    padding: 12px;
  }

  .media-card__title {
    min-height: 0;
  }

  .lightbox__stage {
    min-height: 66vh;
  }

  .lightbox__nav {
    width: 40px;
    height: 40px;
  }

  .lightbox__nav--prev {
    left: 8px;
  }

  .lightbox__nav--next {
    right: 8px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
