.kn-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 8px 40px;
  color: #0f172a;
}

.kn-hero {
  background: #fff;
  color: #0f172a;
  border: 1px solid #dbe3ef;
  border-left: 6px solid #1d4ed8;
  border-radius: 16px;
  padding: 28px 28px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.kn-kicker {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 800;
  color: #1d4ed8;
  margin: 0 0 8px;
}

.kn-hero h1 {
  font-weight: 800;
  font-size: clamp(1.55rem, 2.8vw, 2.05rem);
  color: #0f172a;
  line-height: 1.2;
  margin: 0 0 12px;
}

.kn-lede {
  max-width: 46rem;
  color: #1e293b;
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 16px;
  line-height: 1.55;
}

.kn-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kn-hero-meta span {
  display: inline-block;
  background: #1e3a8a;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
}

.kn-board {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.kn-score-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 18px;
}

.kn-score-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.kn-score-card p {
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.55;
}

.kn-ring {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 12px;
}

.kn-ring svg {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
}

.kn-ring-track,
.kn-ring-value {
  fill: none;
  stroke-width: 10;
}

.kn-ring-track {
  stroke: #e2e8f0;
}

.kn-ring-value {
  stroke: #2563eb;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

.kn-ring.is-ready .kn-ring-value {
  stroke: #059669;
}

.kn-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.kn-ring-label strong {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
}

.kn-ring-label span {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.kn-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  margin: 6px 8px 0 0;
}

.kn-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.kn-btn-gold {
  background: linear-gradient(135deg, #b45309, #f59e0b);
  color: #111827;
}

.kn-btn-primary {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
}

.kn-btn-ghost {
  background: #f1f5f9;
  color: #334155;
}

.kn-graphic {
  background:
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.08), transparent 55%),
    #0b1220;
  border-radius: 16px;
  overflow: hidden;
  min-height: 420px;
}

.kn-graphic svg {
  width: 100%;
  height: auto;
  display: block;
}

.kn-orbit {
  fill: none;
  stroke: #334155;
  stroke-width: 1;
}

.kn-orbit-a {
  stroke-dasharray: 3 8;
}

.kn-node {
  cursor: pointer;
}

.kn-node-disk {
  fill: #1e293b;
  stroke: #64748b;
  stroke-width: 2;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.kn-node-label,
.kn-node-icon {
  fill: #e2e8f0;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 700;
  pointer-events: none;
}

.kn-node-label {
  font-size: 11px;
}

.kn-node:hover .kn-node-disk,
.kn-node.is-open .kn-node-disk {
  fill: #1d4ed8;
  stroke: #93c5fd;
}

.kn-node.is-done .kn-node-disk {
  fill: #047857;
  stroke: #6ee7b7;
}

.kn-node.is-fail .kn-node-disk {
  fill: #9a3412;
  stroke: #fdba74;
}

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

.kn-source {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 600;
  margin: 0 0 12px;
}

.kn-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  min-height: 118px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.kn-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
}

.kn-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 6px 0 4px;
}

.kn-card p {
  color: #64748b;
  font-size: 0.82rem;
  margin: 0;
}

.kn-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kn-pill {
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
  background: #e2e8f0;
  color: #334155;
}

.kn-card.is-done {
  border-color: #6ee7b7;
  background: #f0fdf4;
}

.kn-card.is-done .kn-pill {
  background: #d1fae5;
  color: #065f46;
}

.kn-card.is-fail {
  border-color: #fdba74;
  background: #fff7ed;
}

.kn-card.is-fail .kn-pill {
  background: #ffedd5;
  color: #9a3412;
}

.kn-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1rem;
}

.kn-disclaimer {
  margin-top: 18px;
  font-size: 0.8rem;
  color: #64748b;
}

body.kn-modal-open {
  overflow: hidden !important;
}

body.kn-modal-open .back-to-top,
body.kn-modal-open .chat-widget-container,
body.kn-modal-open #chat-widget-container {
  display: none !important;
}

.kn-modal {
  position: fixed !important;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  background: rgba(15, 23, 42, 0.55);
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: hidden;
  overscroll-behavior: none;
  box-sizing: border-box;
}

.kn-modal[hidden] {
  display: none !important;
}

.kn-modal-card {
  background: #fff;
  width: min(680px, 100%);
  height: min(780px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  border-radius: 16px;
  padding: 18px 16px 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
}

#knModalBody {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.kn-lesson,
.kn-quiz,
.kn-result,
.kn-identify {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  height: 100%;
}

.kn-modal-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  flex: 1 1 auto;
  padding-right: 6px;
  padding-bottom: 8px;
}

.kn-modal-actions {
  flex: 0 0 auto;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 12px 0 4px;
  margin-top: 4px;
  z-index: 2;
}

.kn-modal-actions .kn-btn {
  width: 100%;
  justify-content: center;
  margin: 0;
}

.kn-modal-actions-split {
  display: flex;
  gap: 8px;
}

.kn-modal-actions-split .kn-btn {
  width: auto;
  flex: 1;
}

.kn-qnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 16px;
}

.kn-qnav-item {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.kn-qnav-item:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
  transform: translateY(-1px);
}

.kn-qnav-item.is-answered {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e3a8a;
}

.kn-qnav-item.is-current {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff;
}

.kn-qnav-item.is-current:hover:not(:disabled) {
  background: #1d4ed8;
}

.kn-qnav-item:disabled,
.kn-qnav-item.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.kn-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.kn-lesson h2,
.kn-quiz h2,
.kn-result h2,
.kn-identify h2 {
  font-size: 1.35rem;
  font-weight: 800;
}

.kn-lesson .kn-headline {
  color: #1e3a8a;
  font-weight: 700;
  margin: 6px 0 12px;
}

.kn-lesson ul {
  padding-left: 18px;
  margin: 0 0 8px;
}

.kn-lesson li {
  margin-bottom: 8px;
  color: #334155;
  line-height: 1.45;
}

.kn-progress {
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0 16px;
}

.kn-progress > span {
  display: block;
  height: 100%;
  background: #2563eb;
}

.kn-q {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
}

#knChoices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kn-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  line-height: 1.4;
}

.kn-choice-letter {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e2e8f0;
  color: #1e3a8a;
  font-weight: 800;
  font-size: 0.85rem;
}

.kn-choice-text {
  flex: 1 1 auto;
  padding-top: 3px;
}

.kn-choice:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.kn-choice.is-picked {
  border-color: #2563eb;
  background: #eff6ff;
}

.kn-choice.is-picked .kn-choice-letter {
  background: #2563eb;
  color: #fff;
}

.kn-choice.is-right {
  border-color: #059669;
  background: #ecfdf5;
}

.kn-choice.is-wrong {
  border-color: #dc2626;
  background: #fef2f2;
}

.kn-why {
  background: #f8fafc;
  border-left: 4px solid #2563eb;
  padding: 10px 12px;
  margin: 12px 0;
  color: #334155;
}

.kn-result-banner {
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  font-weight: 700;
}

.kn-result-banner.pass {
  background: #d1fae5;
  color: #065f46;
}

.kn-result-banner.fail {
  background: #ffedd5;
  color: #9a3412;
}

.kn-weak {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.kn-who {
  font-size: 0.88rem;
  color: #1e3a8a;
  font-weight: 600;
  margin: 10px 0 0;
}

.kn-field {
  margin-bottom: 12px;
}

.kn-field label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: #0f172a;
}

.kn-field input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1rem;
}

.kn-field input:focus {
  outline: 2px solid #93c5fd;
  border-color: #2563eb;
}

.kn-form-error {
  color: #b91c1c;
  font-size: 0.88rem;
  font-weight: 600;
  min-height: 1.2em;
  margin: 0 0 8px;
}

@media (max-width: 960px) {
  .kn-board {
    grid-template-columns: 1fr;
  }
  .kn-node-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .kn-hero {
    padding: 24px 16px;
  }
  .kn-node-grid {
    grid-template-columns: 1fr;
  }
}
