* {
  box-sizing: border-box;
}

:root {
  --bg: #061624;
  --panel: rgba(12, 24, 39, 0.82);
  --panel-strong: rgba(18, 31, 48, 0.94);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f7fbff;
  --muted: rgba(231, 241, 252, 0.72);
  --soft: rgba(231, 241, 252, 0.56);
  --cyan: #6ee7ff;
  --accent: #f7941d;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body.course-summary-page {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "Inter", "Poppins", Arial, sans-serif;
  background:
    linear-gradient(115deg, rgba(6, 22, 36, 0.98), rgba(10, 17, 31, 0.96) 48%, rgba(15, 12, 24, 0.98)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 96px);
  overflow-x: hidden;
}

a {
  color: inherit;
}

.summary-topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
  padding: 0 clamp(18px, 4vw, 58px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 16, 27, 0.76);
  backdrop-filter: blur(18px);
}

.summary-brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
}

.summary-brand img {
  display: block;
  width: clamp(118px, 15vw, 176px);
  height: auto;
}

.summary-brand::after {
  content: "";
  width: 1px;
  height: 34px;
  background: rgba(255, 255, 255, 0.38);
}

.summary-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 18px);
  margin-left: auto;
}

.summary-nav a,
.summary-login {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.summary-nav a {
  padding: 0 6px;
  color: rgba(255, 255, 255, 0.78);
}

.summary-nav a:hover,
.summary-nav a:focus-visible {
  color: #ffffff;
  transform: translateY(-1px);
  outline: none;
}

.summary-login {
  margin-left: 4px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  background: #ffffff;
  color: #123152;
}

.summary-nav .summary-login {
  color: #123152;
}

.summary-login:hover,
.summary-login:focus-visible {
  background: rgba(255, 255, 255, 0.9);
  color: #123152;
  outline: none;
  transform: translateY(-1px);
}

.course-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - clamp(32px, 8vw, 96px)));
  margin: 0 auto;
  padding: clamp(32px, 6vw, 62px) 0 72px;
}

.course-return {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.course-return::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 48%, transparent);
}

.course-return:hover,
.course-return:focus-visible {
  color: #ffffff;
  outline: none;
}

.course-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 340px);
  gap: clamp(28px, 5vw, 58px);
  align-items: center;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 14%, rgba(19, 36, 55, 0.86)), rgba(11, 20, 34, 0.92) 62%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.course-copy,
.course-hero > * {
  min-width: 0;
}

.course-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--cyan), transparent);
  box-shadow: 0 0 28px color-mix(in srgb, var(--accent) 48%, transparent);
}

.course-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: color-mix(in srgb, var(--accent) 82%, white 18%);
  font-family: "Poppins", "Inter", Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.course-kicker::before {
  content: attr(data-code);
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 64%, rgba(255, 255, 255, 0.2));
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 24%, rgba(255, 255, 255, 0.06));
  color: #ffffff;
  letter-spacing: 0;
}

.course-title {
  max-width: 760px;
  margin: 0;
  color: #ffffff;
  font-family: "Montserrat", "Inter", Arial, sans-serif;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.course-title span {
  color: color-mix(in srgb, var(--accent) 72%, white 28%);
}

.course-lead {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 600;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.course-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.summary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.summary-button.primary {
  border-color: color-mix(in srgb, var(--accent) 72%, rgba(255, 255, 255, 0.36));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 88%, white 12%), var(--accent));
  color: #ffffff;
  box-shadow: 0 18px 38px color-mix(in srgb, var(--accent) 22%, transparent);
}

.summary-button.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
}

.summary-button:hover,
.summary-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.58);
  outline: none;
  transform: translateY(-2px);
}

.course-cover {
  position: relative;
  justify-self: end;
  width: min(100%, 318px);
}

.course-cover::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 44%, transparent);
  border-radius: 8px;
  transform: translate(16px, -16px);
}

.course-cover picture,
.course-cover img {
  display: block;
}

.course-cover img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.42);
}

.course-cover--badge img {
  padding: 28px;
  background: rgba(6, 16, 28, 0.78);
  object-fit: contain;
}

.course-video-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  align-items: stretch;
  margin-top: 26px;
}

.video-panel,
.course-info-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.3);
}

.video-panel {
  overflow: hidden;
}

.video-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(18px, 3vw, 28px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.video-heading p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.video-heading strong {
  color: color-mix(in srgb, var(--accent) 76%, white 24%);
  font-size: 14px;
  font-weight: 900;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #02070d;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.course-info-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: clamp(22px, 3vw, 30px);
}

.info-block {
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-block:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.info-block h2 {
  margin: 0 0 10px;
  color: #ffffff;
  font-family: "Poppins", "Inter", Arial, sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.info-block p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.62;
}

.track-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 58%, rgba(255, 255, 255, 0.18));
  background: color-mix(in srgb, var(--accent) 18%, rgba(255, 255, 255, 0.06));
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 920px) {
  .summary-topbar {
    flex-wrap: wrap;
    padding-block: 14px;
  }

  .summary-brand::after {
    display: none;
  }

  .summary-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

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

  .course-cover {
    justify-self: start;
    width: min(100%, 280px);
  }
}

@media (max-width: 560px) {
  .summary-topbar {
    gap: 14px;
  }

  .summary-login {
    min-height: 38px;
    padding: 0 14px;
  }

  .course-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 24px;
  }

  .course-hero {
    padding: 24px 18px;
  }

  .course-title {
    max-width: min(100%, 330px);
    font-size: clamp(24px, 7.2vw, 28px);
    line-height: 1.06;
    text-wrap: auto;
    white-space: normal;
  }

  .course-title span {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .course-lead,
  .course-actions {
    max-width: min(100%, 330px);
  }

  .course-actions {
    flex-direction: column;
  }

  .summary-button {
    width: 100%;
  }

  .video-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
