:root {
  color-scheme: light;
  --bg: #f3f7fb;
  --panel: #ffffff;
  --ink: #171b22;
  --muted: #5f6673;
  --line: #d5e0eb;
  --blue: #0f6ea8;
  --cyan: #13b8cf;
  --green: #426f62;
  --rose: #a33b4f;
  --amber: #9a672f;
  --accent: #13b8cf;
  --accent-dark: #0f6ea8;
  --shadow: 0 18px 44px rgba(23, 27, 34, 0.11);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(19, 184, 207, 0.12), transparent 32rem),
    linear-gradient(45deg, rgba(15, 110, 168, 0.11), transparent 34rem),
    var(--bg);
}

main {
  background:
    linear-gradient(180deg, #eef3f7 0%, #e7edf3 48%, #dde5ec 100%);
  margin-top: 0;
  padding-bottom: 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #e7f6fb;
  padding: 0.16rem 0.36rem;
  color: #0f6ea8;
  font-size: 0.92em;
}

.hero {
  min-height: 92vh;
  padding: 22px clamp(18px, 4vw, 56px) 58px;
  background: #111414;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 22, 0.62);
  z-index: 1;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(to top, rgba(238, 243, 247, 1), rgba(238, 243, 247, 0));
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #101d24, #0f6ea8);
  border: 2px solid #20d3e6;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: rgba(255, 255, 255, 0.68);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(19, 184, 207, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(19, 184, 207, 0.16);
  color: #fff;
}

.nav-links .nav-cta {
  background: #13b8cf;
  color: #06151b;
}

.nav-links .nav-cta:hover,
.nav-links .nav-cta:focus-visible {
  background: #ffffff;
  color: #0b2238;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 1240px;
  min-height: calc(92vh - 80px);
  margin: 0 auto;
  padding-top: 54px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-kurs {
  margin: 0 0 4px;
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.hero-copy h1 {
  font-size: clamp(1.6rem, 4vw, 3.2rem);
  font-weight: 700;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
}

.hero-course-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 0 28px;
  padding: 14px 24px;
  border: 1px solid rgba(32, 211, 230, 0.28);
  border-radius: var(--radius);
  background: rgba(32, 211, 230, 0.07);
  backdrop-filter: blur(8px);
}

.hcs-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 20px;
}

.hcs-item strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: #20d3e6;
  line-height: 1;
}

.hcs-item span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
}

.hcs-sep {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .hero-course-stats {
    padding: 12px 16px;
  }
  .hcs-item {
    padding: 0 12px;
  }
  .hcs-item strong {
    font-size: 1.2rem;
  }
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #20d3e6;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  font-size: clamp(3rem, 8vw, 6.8rem);
  font-weight: 900;
}

.lead {
  max-width: 720px;
  margin: 24px 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.05rem, 2vw, 1.34rem);
  line-height: 1.7;
}

.teacher {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 26px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.teacher span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
}

.teacher strong {
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-weight: 800;
}

.button.primary {
  background: #13b8cf;
  color: #06151b;
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
}

.signal-panel {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  overflow: hidden;
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.signal-panel:hover {
  transform: translateY(-6px);
  border-color: rgba(32, 211, 230, 0.5);
  box-shadow: 0 26px 68px rgba(0, 0, 0, 0.26), 0 0 48px rgba(19, 184, 207, 0.18);
}

.pulse-orbit {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 0.82;
  background:
    radial-gradient(circle at center, rgba(19, 184, 207, 0.2), transparent 8rem),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 34px 34px;
}

.pulse-orbit::before {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 999px;
  border: 1px solid rgba(32, 211, 230, 0.26);
  opacity: 0.75;
  animation: orbitSpin 18s linear infinite;
}

.pulse-orbit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0 42%, rgba(32, 211, 230, 0.13) 50%, transparent 58% 100%);
  transform: translateX(-120%);
  animation: panelSweep 5.4s ease-in-out infinite;
}

.scan-ring {
  position: absolute;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(32, 211, 230, 0.3);
  border-radius: 999px;
  opacity: 0;
  animation: radarPulse 3.6s ease-out infinite;
}

.ring-two {
  animation-delay: 1.4s;
}

.scan-line {
  position: absolute;
  width: 2px;
  height: 44%;
  top: 6%;
  left: 50%;
  transform-origin: 50% 100%;
  background: linear-gradient(to top, rgba(32, 211, 230, 0.68), transparent);
  filter: drop-shadow(0 0 8px rgba(19, 184, 207, 0.38));
  animation: scanRotate 6s linear infinite;
}

.chip-core {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e8fbff, #20d3e6);
  color: #0f172a;
  font-size: 2.2rem;
  font-weight: 900;
  box-shadow: 0 0 0 16px rgba(255, 255, 255, 0.07), 0 0 58px rgba(19, 184, 207, 0.34);
  animation: coreBreath 3.2s ease-in-out infinite;
}

.orbit-item {
  z-index: 3;
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
  font-size: 0.74rem;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  transition: transform 220ms ease, background 220ms ease, color 220ms ease;
  animation: floatLabel 4s ease-in-out infinite;
}

.signal-panel:hover .orbit-item {
  background: #20d3e6;
  color: #0b2238;
  transform: translate(-50%, -50%) scale(1.08);
}

.orbit-llm {
  left: 79%;
  top: 48%;
  animation-delay: 0.2s;
}

.orbit-rag {
  left: 50%;
  top: 17%;
  animation-delay: 0.9s;
}

.orbit-n8n {
  left: 22%;
  top: 48%;
  animation-delay: 1.6s;
}

.orbit-ollama {
  left: 50%;
  top: 80%;
  animation-delay: 2.3s;
}

.orbit-mcp {
  left: 28%;
  top: 25%;
  animation-delay: 0.5s;
}

.orbit-vps {
  left: 72%;
  top: 25%;
  animation-delay: 1.1s;
}

.orbit-gpt {
  left: 34%;
  top: 72%;
  animation-delay: 1.8s;
}

.orbit-docker {
  left: 69%;
  top: 72%;
  animation-delay: 2.6s;
}

.orbit-codex {
  left: 15%;
  top: 69%;
  animation-delay: 3.1s;
}

.orbit-claude {
  left: 86%;
  top: 31%;
  animation-delay: 3.6s;
}

.orbit-gemini {
  left: 84%;
  top: 67%;
  animation-delay: 4.1s;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.stats article {
  padding: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  transition: background 220ms ease;
}

.stats article:hover {
  background: rgba(19, 184, 207, 0.1);
}

.stats article:last-child {
  border-right: 0;
}

.stats strong,
.stats span {
  display: block;
}

.stats strong {
  font-size: 1.55rem;
}

.stats span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
}

@keyframes coreBreath {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 16px rgba(255, 255, 255, 0.07), 0 0 58px rgba(19, 184, 207, 0.34);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 20px rgba(32, 211, 230, 0.1), 0 0 78px rgba(19, 184, 207, 0.4);
  }
}

@keyframes radarPulse {
  0% {
    transform: scale(0.52);
    opacity: 0;
  }
  20% {
    opacity: 0.65;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes scanRotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes panelSweep {
  0%,
  45% {
    transform: translateX(-120%);
  }
  75%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes orbitSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes floatLabel {
  0%,
  100% {
    margin-top: 0;
  }
  50% {
    margin-top: -8px;
  }
}

.section {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 82px 0 0;
  scroll-margin-top: 24px;
}

.quick-nav {
  position: fixed;
  z-index: 20;
  right: 18px;
  top: 50%;
  display: grid;
  gap: 8px;
  transform: translateY(-50%);
}

.quick-nav a {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 8px;
  align-items: center;
  min-width: 128px;
  min-height: 42px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 36px rgba(21, 30, 49, 0.12);
  backdrop-filter: blur(14px);
  padding: 6px 10px 6px 6px;
  color: #243044;
  font-size: 0.84rem;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.quick-nav a:hover,
.quick-nav a:focus-visible {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
  transform: translateX(-4px);
}

.quick-nav span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #e7f6fb;
  color: #0f6ea8;
  font-size: 0.7rem;
}

.quick-nav a:hover span,
.quick-nav a:focus-visible span {
  background: #20d3e6;
  color: #0b2238;
}

.intro-strip {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) 1fr;
  gap: 28px;
  align-items: center;
  padding: 34px;
  margin-top: -18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 3;
}

.intro-strip h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.intro-strip p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

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

.definition-card,
.topic-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 36px rgba(21, 30, 49, 0.08);
}

.definition-card {
  padding: 22px;
}

.definition-card h3 {
  font-size: 1.1rem;
}

.definition-card p {
  color: var(--muted);
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e7f6fb;
  color: #0f6ea8;
  font-size: 0.78rem;
  font-weight: 800;
}

.tools-section {
  width: 100%;
  max-width: none;
  padding: 82px max(18px, calc((100vw - 1240px) / 2)) 0;
  background:
    linear-gradient(180deg, transparent 0, rgba(255, 255, 255, 0.28) 10%, rgba(255, 255, 255, 0.28) 92%, transparent 100%);
}

.tool-controls {
  margin-bottom: 18px;
}

.search {
  display: grid;
  gap: 8px;
  max-width: 460px;
  color: var(--muted);
  font-weight: 700;
}

.search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
  outline: 0;
}

.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(19, 184, 207, 0.16);
}

.tool-grid {
  display: grid;
  gap: 10px;
}

.tool-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(230px, auto);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  padding: 14px;
  box-shadow: 0 10px 28px rgba(21, 30, 49, 0.06);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.tool-card:hover {
  border-color: rgba(19, 184, 207, 0.36);
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(21, 30, 49, 0.1);
}

.tool-id {
  display: grid;
  grid-template-columns: 28px 50px;
  gap: 10px;
  align-items: center;
}

.tool-number {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: right;
}

.tool-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  background: #f8fafc;
  border: 1px solid var(--line);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 900;
  overflow: hidden;
}

.tool-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.tool-icon span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0b0f17, #0f6ea8);
  color: #fff;
}

.tool-main h3 {
  margin-bottom: 5px;
  font-size: 1.04rem;
}

.tool-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.tool-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.tool-modules {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.tool-card .tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: var(--radius);
  background: #0f6ea8;
  padding: 0 13px;
  color: #fff;
  font-weight: 900;
}

.topic-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filter {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 14px;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.filter.active,
.filter:hover {
  border-color: transparent;
  background: #171b22;
  color: #fff;
}

.topics-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.topic-index {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
}

.index-link {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 9px;
  align-items: center;
  padding: 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.index-link span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #e7f6fb;
  color: #0f6ea8;
}

.index-link:hover {
  background: #eaf8fb;
  color: var(--ink);
}

.topic-list {
  display: grid;
  gap: 18px;
}

.topic-card {
  overflow: hidden;
}

.topic-media {
  min-height: 235px;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(15, 110, 168, 0.82)),
    linear-gradient(45deg, rgba(255, 255, 255, 0.18) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.18) 50% 75%, transparent 75%);
  background-size: cover, 34px 34px;
  position: relative;
  color: #fff;
}

.topic-media img {
  width: 100%;
  height: 100%;
  min-height: 235px;
  object-fit: cover;
  display: block;
}

.image-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  text-align: center;
}

.image-fallback[hidden] {
  display: none;
}

.image-fallback strong {
  display: block;
  font-size: 4rem;
  line-height: 1;
}

.image-fallback span {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.topic-body {
  padding: clamp(20px, 4vw, 34px);
}

.topic-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.topic-number,
.category {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 11px;
  font-size: 0.78rem;
  font-weight: 900;
}

.topic-number {
  background: #171b22;
  color: #fff;
}

.category {
  background: #e7f6fb;
  color: #0f6ea8;
}

.topic-card h3 {
  font-size: clamp(1.4rem, 3vw, 2.4rem);
}

.topic-card p {
  color: var(--muted);
  line-height: 1.75;
}

.topic-actions,
.used-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.material-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0 14px;
  background: #e7f6fb;
  color: #0f6ea8;
  font-weight: 900;
}

.material-link.word {
  background: #edf5fb;
  color: #0f6ea8;
}

.material-link.app {
  background: #eef1f4;
  color: #1f3347;
}

.tool-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: #353b45;
  font-size: 0.82rem;
  font-weight: 800;
}

.quiz-section {
  width: min(1040px, calc(100% - 36px));
}

.quiz-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.quiz-toolbar,
.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background: #f8fafc;
}

.quiz-toolbar strong {
  display: block;
  font-size: 1.5rem;
}

.quiz-toolbar span {
  color: var(--muted);
  font-weight: 700;
}

.quiz-reset {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.quiz-list {
  display: grid;
  gap: 0;
}

.quiz-card {
  padding: 22px;
  border-top: 1px solid var(--line);
}

.quiz-question {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.quiz-question span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: #171b22;
  color: #fff;
  font-weight: 900;
}

.quiz-question h3 {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.35;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quiz-option {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.quiz-option:hover {
  border-color: rgba(19, 184, 207, 0.36);
  background: #eaf8fb;
  transform: translateY(-1px);
}

.quiz-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-letter {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #e7f6fb;
  color: #0f6ea8;
  font-weight: 900;
}

.quiz-option:has(input:checked) {
  border-color: var(--accent);
  background: #e8f7fb;
  color: #0b2238;
}

.quiz-feedback {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.quiz-card.correct {
  background: linear-gradient(90deg, rgba(236, 253, 245, 0.9), rgba(255, 255, 255, 0.94));
}

.quiz-card.correct .quiz-feedback {
  color: #24604a;
}

.quiz-card.wrong {
  background: linear-gradient(90deg, rgba(255, 241, 242, 0.92), rgba(255, 255, 255, 0.94));
}

.quiz-card.wrong .quiz-feedback,
.quiz-card.missing .quiz-feedback {
  color: #be123c;
}

.quiz-submit {
  border: 0;
}

.quiz-result {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
  text-align: right;
}

/* ── Opinions section ───────────────────────────────────────── */
.opinions-section {
  background: linear-gradient(135deg, #071a1f 0%, #0a2a35 100%);
  color: #fff;
  padding: 82px clamp(18px, 4vw, 56px) 88px;
  scroll-margin-top: 24px;
}

.opinions-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.opinions-section .eyebrow {
  color: #13b8cf;
}

.opinions-section .section-heading h2 {
  color: #fff;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 48px;
}

.reviews-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 20px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.95rem;
  font-style: italic;
  border: 1px dashed rgba(19, 184, 207, 0.2);
  border-radius: 14px;
}

.review-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(19, 184, 207, 0.22);
  border-radius: 14px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.review-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(19, 184, 207, 0.45);
}

.review-stars {
  color: #f59e0b;
  font-size: 1.05rem;
  letter-spacing: 3px;
}

.review-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.75;
  font-size: 0.96rem;
  font-style: italic;
  flex: 1;
}

.review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.review-name {
  color: #13b8cf;
  font-weight: 700;
  font-size: 0.95rem;
}

.review-date {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.83rem;
}

/* Opinion form */
.opinion-form-wrap {
  max-width: 680px;
  margin: 52px auto 0;
}

.opinion-form-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(19, 184, 207, 0.22);
  border-radius: 16px;
  padding: clamp(24px, 4vw, 40px);
}

.opinion-form-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
}

.opinion-form-header p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 28px;
  line-height: 1.55;
}

.ofg {
  margin-bottom: 18px;
}

.ofg label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: 7px;
}

.ofg label span {
  color: #13b8cf;
}

.ofg input,
.ofg textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(19, 184, 207, 0.28);
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

.ofg input:focus,
.ofg textarea:focus {
  border-color: rgba(19, 184, 207, 0.7);
  background: rgba(255, 255, 255, 0.1);
}

.ofg input::placeholder,
.ofg textarea::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.ofg-hint {
  display: block;
  text-align: right;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 4px;
}

.opinion-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 22px;
}

.opinion-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #13b8cf;
  cursor: pointer;
}

.opinion-consent span {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.55;
}

.opinion-submit {
  width: 100%;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  padding: 14px 24px;
  border: 0;
  cursor: pointer;
}

.opinion-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.opinion-msg {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.93rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.5;
}

.opinion-msg.success {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.opinion-msg.error {
  background: rgba(220, 38, 38, 0.14);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #fca5a5;
}

@media (max-width: 640px) {
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .opinion-form-panel {
    padding: 24px 18px;
  }
}

.quiz-result strong {
  color: var(--ink);
  font-size: 1.35rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  width: min(1240px, calc(100% - 36px));
  margin: 70px auto 0;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer strong {
  color: var(--ink);
}

/* ─── CHAT WIDGET ──────────────────────────────────────────────────────────── */
.chat-widget {
  position: fixed;
  z-index: 100;
  bottom: 24px;
  left: 24px;
}

.chat-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 999px;
  background: var(--accent-dark);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(15, 110, 168, 0.38);
  transition: transform 200ms ease, background 200ms ease;
}

.chat-toggle:hover {
  background: var(--accent);
  transform: scale(1.07);
}

.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  pointer-events: none;
}

.chat-panel {
  position: absolute;
  bottom: 64px;
  left: 0;
  width: 340px;
  max-width: calc(100vw - 48px);
  display: none;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-panel.is-open {
  display: flex;
}

.chat-panel.is-minimized .chat-setup,
.chat-panel.is-minimized .chat-body,
.chat-setup[hidden],
.chat-body[hidden] {
  display: none !important;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: var(--accent-dark);
  color: #fff;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}

.chat-header strong {
  font-size: 0.95rem;
  flex: 1;
}

.chat-header-btns {
  display: flex;
  gap: 6px;
}

.chat-hbtn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  line-height: 1;
  transition: background 150ms ease;
}

.chat-hbtn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.chat-setup {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px;
}

.chat-setup p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.chat-setup input,
.chat-compose input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  font: inherit;
  color: var(--ink);
  outline: 0;
  background: #fff;
}

.chat-setup input:focus,
.chat-compose input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(19, 184, 207, 0.16);
}

.chat-setup button {
  min-height: 44px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent-dark);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background 180ms ease;
}

.chat-setup button:hover {
  background: var(--accent);
}

.chat-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  min-height: 220px;
  max-height: 320px;
  overflow-y: auto;
}

.chat-msg {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.chat-msg--instructor {
  background: linear-gradient(135deg, #e0f7fa, #ebf5fb);
  border-color: rgba(19, 184, 207, 0.35);
}

.chat-msg--in {
  animation: msgIn 0.22s ease;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-msg-name {
  display: flex;
  align-items: center;
  gap: 6px;
  grid-column: 1;
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--accent-dark);
}

.chat-msg-role {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-dark);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.chat-msg-time {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}

.chat-msg-text {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.5;
  word-break: break-word;
}

.chat-compose {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
  flex-shrink: 0;
}

.chat-compose input {
  flex: 1;
  min-height: 40px;
}

.chat-compose button {
  min-height: 40px;
  padding: 0 13px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent-dark);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 180ms ease;
}

.chat-compose button:hover {
  background: var(--accent);
}

@media (max-width: 760px) {
  .chat-widget {
    bottom: 80px;
    left: 16px;
  }

  .chat-panel {
    bottom: 62px;
    left: 0;
    width: calc(100vw - 32px);
    max-width: none;
  }
}

/* ─────────────────────────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .hero-grid,
  .intro-strip,
  .topics-layout {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
  }

  .signal-panel {
    max-width: 560px;
  }

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

  .tool-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .tool-meta {
    grid-column: 2;
    justify-content: space-between;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }

  .topic-index {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: auto;
    padding: 16px 18px 44px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 58px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links.open {
    display: flex;
  }

  .hero-grid {
    padding-top: 52px;
  }

  .teacher {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .stats,
  .definition-grid,
  .topic-index {
    grid-template-columns: 1fr;
  }

  .tool-card {
    grid-template-columns: 1fr;
  }

  .tool-id {
    grid-template-columns: 28px 46px;
  }

  .tool-icon {
    width: 46px;
    height: 46px;
  }

  .tool-meta,
  .tool-modules {
    align-items: stretch;
    justify-content: flex-start;
  }

  .tool-meta {
    flex-direction: column;
  }

  .stats article {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .stats article:last-child {
    border-bottom: 0;
  }

  .orbit-item,
  .scan-line {
    display: none;
  }

  .section {
    width: min(100% - 28px, 1240px);
    padding-top: 58px;
  }

  .quick-nav {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    transform: none;
  }

  .quick-nav a {
    grid-template-columns: 1fr;
    justify-items: center;
    min-width: 0;
    min-height: 48px;
    padding: 6px;
    font-size: 0.72rem;
  }

  .quick-nav a:hover,
  .quick-nav a:focus-visible {
    transform: translateY(-2px);
  }

  .quick-nav span {
    width: auto;
    height: auto;
    background: transparent;
    font-size: 0.62rem;
  }

  .intro-strip {
    padding: 22px;
  }

  .footer {
    flex-direction: column;
  }

  .quiz-toolbar,
  .quiz-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .quiz-result {
    text-align: left;
  }
}
