.knowledge-user-page {
  --knowledge-ink: #12213a;
  --knowledge-muted: #64748b;
  --knowledge-line: rgba(18, 33, 58, .12);
  --knowledge-soft: #f7fafc;
  --knowledge-hero-radius: 8px;
  --knowledge-panel-radius: 8px;
  --knowledge-card-radius: 8px;
  --knowledge-inner-radius: 8px;
  color: var(--knowledge-ink);
}

.knowledge-list-page,
.knowledge-history-page {
  --knowledge-panel-radius: 20px;
  --knowledge-card-radius: 18px;
  --knowledge-inner-radius: 12px;
}

.knowledge-user-hero,
.knowledge-detail-hero,
.knowledge-room-hero,
.knowledge-history-item,
.knowledge-filter-bar {
  background: #fff;
  border: 1px solid var(--knowledge-line);
  box-shadow: 0 16px 34px rgba(15, 35, 65, .06);
}

.knowledge-user-hero {
  align-items: center;
  border-radius: var(--knowledge-hero-radius);
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .42fr);
  margin-bottom: 18px;
  padding: 32px 34px;
}

.knowledge-user-hero > div:first-child {
  min-width: 0;
}

.knowledge-detail-copy h1,
.knowledge-room-hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.18;
  margin: 6px 0 8px;
}

.knowledge-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 18px 0 0;
  overflow: visible;
  padding: 2px 1px;
}

.knowledge-category-select {
  display: none;
}

.knowledge-category-tabs a {
  align-items: center;
  background: #fff;
  border: 1px solid var(--knowledge-line);
  border-radius: 999px;
  color: #334155;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .88rem;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 14px;
  text-decoration: none;
  white-space: nowrap;
}

.knowledge-category-tabs a:hover,
.knowledge-category-tabs a.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.knowledge-filter-bar {
  align-items: end;
  border-radius: var(--knowledge-panel-radius);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, .45fr) minmax(150px, .35fr) auto;
  margin: 18px 0;
  padding: 18px;
}

.knowledge-history-page .knowledge-filter-bar {
  grid-template-columns: minmax(220px, 1fr) minmax(170px, .35fr) auto;
}

.knowledge-filter-bar .field {
  margin: 0;
}

.knowledge-filter-actions,
.knowledge-card-actions,
.knowledge-detail-actions,
.knowledge-history-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.knowledge-card {
  background: #fff;
  border: 1px solid var(--knowledge-line);
  border-radius: var(--knowledge-card-radius);
  box-shadow: 0 14px 30px rgba(15, 35, 65, .05);
  display: grid;
  gap: 12px 14px;
  grid-template-areas:
    "cover summary"
    "meta meta"
    "actions actions";
  grid-template-columns: 168px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  padding: 14px;
}

.knowledge-card-cover,
.knowledge-detail-cover {
  aspect-ratio: 16 / 9;
  background: #eef4f8;
  display: block;
  overflow: hidden;
}

.knowledge-card .knowledge-card-cover {
  align-self: start;
  border-radius: 18px;
  grid-area: cover;
  min-height: 0;
  width: 100%;
}

.knowledge-card-cover img,
.knowledge-detail-cover img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.knowledge-card .knowledge-card-cover img {
  object-position: center center;
}

.knowledge-cover-placeholder {
  align-items: center;
  background: linear-gradient(135deg, #e9f5f2, #f7fafc 52%, #fff5d7);
  display: flex;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.knowledge-cover-placeholder span {
  border: 2px solid rgba(18, 33, 58, .16);
  border-radius: 8px;
  color: #24465f;
  font-size: 2.2rem;
  font-weight: 900;
  padding: 10px 16px;
}

.knowledge-card-summary {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 7px;
  grid-area: summary;
  min-width: 0;
}

.knowledge-card-summary > .muted {
  display: -webkit-box;
  line-height: 1.55;
  margin: 0;
  min-height: 3.1em;
  max-height: 3.1em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.knowledge-card h2,
.knowledge-history-item h2 {
  font-size: 1.12rem;
  line-height: 1.35;
  margin: 0;
}

.knowledge-card h2 {
  display: -webkit-box;
  min-height: 2.7em;
  max-height: 2.7em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.knowledge-card h2 a {
  color: inherit;
  text-decoration: none;
}

.knowledge-badge-row {
  align-content: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 58px;
}

.knowledge-meta-grid {
  display: grid;
  gap: 8px;
  grid-area: meta;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.knowledge-meta-grid span {
  background: var(--knowledge-soft);
  border: 1px solid rgba(18, 33, 58, .08);
  border-radius: var(--knowledge-inner-radius);
  color: #334155;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.3;
  min-width: 0;
  padding: 7px 9px;
  text-align: center;
}

.knowledge-card-actions {
  grid-area: actions;
  justify-content: flex-end;
  margin-top: 0;
}

.knowledge-card-actions .btn {
  min-height: 40px;
  padding: 9px 16px;
}

.knowledge-detail-hero {
  border-radius: 18px;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(240px, 36%) minmax(0, 1fr);
  margin-bottom: 18px;
  overflow: hidden;
  padding: 16px;
}

.knowledge-detail-cover {
  border-radius: 12px;
}

.knowledge-detail-copy {
  min-width: 0;
  padding: 8px 8px 8px 0;
}

.knowledge-detail-metrics {
  margin: 18px 0;
}

.knowledge-inline-form {
  margin: 0;
}

.knowledge-detail-grid,
.knowledge-room-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
}

.knowledge-detail-section,
.knowledge-room-panel {
  min-width: 0;
}

.knowledge-detail-section h2,
.knowledge-room-panel h2 {
  font-size: 1.15rem;
  margin-top: 0;
}

.knowledge-rich-text {
  color: #334155;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.knowledge-room-hero {
  align-items: center;
  border-radius: 18px;
  display: flex;
  gap: 22px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 18px 20px;
}

.knowledge-room-progress {
  flex: 0 0 170px;
}

.progress-track {
  background: #e2e8f0;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  width: 100%;
}

.progress-track span {
  background: linear-gradient(90deg, #0f766e, #d99b1f);
  display: block;
  height: 100%;
  min-width: 0;
}

.knowledge-room-summary {
  min-width: 0;
  padding: 20px;
}

.knowledge-room-summary-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.knowledge-room-summary-head h2 {
  font-size: 1.3rem;
  margin: 4px 0 0;
}

.knowledge-room-badge {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .9rem;
  font-weight: 900;
  justify-content: center;
  line-height: 1.25;
  padding: 8px 12px;
}

.knowledge-room-badge.is-success,
.knowledge-room-inline-status.is-success {
  background: #ecfdf5;
  border-color: rgba(4, 120, 87, .18);
  color: #047857;
}

.knowledge-room-badge.is-warning,
.knowledge-room-inline-status.is-warning {
  background: #fff7ed;
  border-color: rgba(154, 52, 18, .18);
  color: #9a3412;
}

.knowledge-room-badge.is-progress,
.knowledge-room-inline-status.is-progress {
  background: #eff6ff;
  border-color: rgba(29, 78, 216, .18);
  color: #1d4ed8;
}

.knowledge-room-badge.is-neutral,
.knowledge-room-inline-status.is-neutral {
  background: var(--knowledge-soft);
  border-color: var(--knowledge-line);
  color: var(--knowledge-muted);
}

.knowledge-room-steps {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.knowledge-room-step {
  align-items: center;
  background: var(--knowledge-soft);
  border: 1px solid var(--knowledge-line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  min-height: 44px;
  min-width: 0;
  padding: 8px 10px;
}

.knowledge-room-step > span {
  align-items: center;
  background: #e2e8f0;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 26px;
  font-size: .84rem;
  font-weight: 900;
  height: 26px;
  justify-content: center;
}

.knowledge-room-step strong {
  font-size: .88rem;
  line-height: 1.3;
  min-width: 0;
}

.knowledge-room-step.is-done {
  background: #f0fdf4;
  border-color: rgba(4, 120, 87, .16);
}

.knowledge-room-step.is-done > span {
  background: #d1fae5;
  color: #047857;
}

.knowledge-room-step.is-active {
  background: #fffaf0;
  border-color: rgba(217, 155, 31, .4);
}

.knowledge-room-step.is-active > span {
  background: #fef3c7;
  color: #92400e;
}

.knowledge-room-facts {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.knowledge-room-facts > div {
  background: var(--knowledge-soft);
  border: 1px solid var(--knowledge-line);
  border-radius: 8px;
  min-width: 0;
  padding: 11px 12px;
}

.knowledge-room-facts span {
  color: var(--knowledge-muted);
  display: block;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 4px;
}

.knowledge-room-facts strong {
  display: block;
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.knowledge-room-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.knowledge-room-inline-status {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  font-size: .88rem;
  font-weight: 800;
  line-height: 1.4;
  padding: 8px 10px;
}

.knowledge-room-summary-actions {
  border-top: 1px solid var(--knowledge-line);
  margin-top: 16px;
  padding-top: 16px;
}

.knowledge-progress-path {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0;
}

.knowledge-step {
  background: #fff;
  border: 1px solid var(--knowledge-line);
  border-radius: 8px;
  min-width: 0;
  padding: 14px;
}

.knowledge-step-index {
  align-items: center;
  background: #e2e8f0;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  margin-bottom: 10px;
  width: 28px;
}

.knowledge-step strong,
.knowledge-step small {
  display: block;
}

.knowledge-step small {
  color: var(--knowledge-muted);
  font-weight: 800;
  margin-top: 4px;
}

.knowledge-step.is-done .knowledge-step-index {
  background: #d1fae5;
  color: #047857;
}

.knowledge-step.is-active {
  border-color: rgba(217, 155, 31, .55);
  box-shadow: inset 0 0 0 1px rgba(217, 155, 31, .22);
}

.knowledge-definition-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.knowledge-definition-list div {
  border-bottom: 1px solid rgba(18, 33, 58, .08);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 10px;
}

.knowledge-definition-list dt {
  color: var(--knowledge-muted);
  font-weight: 800;
}

.knowledge-definition-list dd {
  font-weight: 900;
  margin: 0;
  text-align: right;
}

.knowledge-status-note,
.knowledge-status-ok {
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.55;
  margin-top: 16px;
  padding: 12px;
}

.knowledge-status-note {
  background: #fff7ed;
  color: #9a3412;
}

.knowledge-status-ok {
  background: #ecfdf5;
  color: #047857;
}

.knowledge-history-list {
  display: grid;
  gap: 14px;
}

.knowledge-history-item {
  align-items: center;
  border-radius: var(--knowledge-card-radius);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 154px);
  padding: 18px 20px;
}

.knowledge-history-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.knowledge-history-heading {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  min-width: 0;
}

.knowledge-history-heading h2 {
  margin-top: 8px;
}

.knowledge-history-heading h2 a {
  color: inherit;
  text-decoration: none;
}

.knowledge-history-facts {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.knowledge-history-facts > div {
  background: var(--knowledge-soft);
  border: 1px solid rgba(18, 33, 58, .08);
  border-radius: var(--knowledge-inner-radius);
  display: grid;
  min-height: 56px;
  padding: 8px 11px;
}

.knowledge-history-facts span {
  color: var(--knowledge-muted);
  font-size: .8rem;
  font-weight: 800;
  line-height: 1.25;
}

.knowledge-history-facts strong {
  align-self: end;
  color: var(--knowledge-ink);
  font-size: .95rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.knowledge-history-facts > div.is-certificate span {
  color: #8a6413;
}

.knowledge-history-facts > div.is-certificate {
  grid-column: span 2;
}

.knowledge-history-facts > div.is-certificate strong {
  color: #8a6413;
  font-size: .92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-history-progress {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 48px;
}

.knowledge-history-progress > span {
  color: var(--knowledge-muted);
  font-weight: 900;
  text-align: right;
}

.knowledge-history-actions {
  align-items: stretch;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 10px;
  justify-content: center;
  min-width: 132px;
}

.knowledge-history-actions .btn {
  flex: 0 0 auto;
  justify-content: center;
  white-space: nowrap;
  width: 100%;
}

@media (max-width: 980px) {
  .knowledge-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .knowledge-filter-bar,
  .knowledge-history-page .knowledge-filter-bar,
  .knowledge-detail-grid,
  .knowledge-room-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .knowledge-history-actions {
    flex-direction: row;
    justify-content: flex-start;
    min-width: 0;
  }

  .knowledge-history-actions .btn {
    width: auto;
  }
}

@media (max-width: 720px) {
  .knowledge-badge-row,
  .knowledge-card h2,
  .knowledge-card-summary > .muted {
    min-height: 0;
    max-height: none;
  }

  .knowledge-category-tabs {
    display: none;
  }

  .knowledge-category-select {
    align-items: end;
    background: #fff;
    border: 1px solid var(--knowledge-line);
    border-radius: var(--knowledge-panel-radius);
    box-shadow: 0 16px 34px rgba(15, 35, 65, .06);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 18px 0 0;
    padding: 14px;
  }

  .knowledge-category-select .field {
    margin: 0;
    min-width: 0;
  }

  .knowledge-category-select .btn {
    min-height: 44px;
    white-space: nowrap;
  }

  .knowledge-user-hero,
  .knowledge-room-hero,
  .knowledge-history-item {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .knowledge-user-hero,
  .knowledge-room-hero {
    display: flex;
    padding: 18px;
  }

  .knowledge-detail-hero {
    grid-template-columns: 1fr;
  }

  .knowledge-detail-copy {
    padding: 0;
  }

  .knowledge-card-grid,
  .knowledge-progress-path {
    grid-template-columns: 1fr;
  }

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

  .knowledge-meta-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .knowledge-room-progress {
    flex-basis: auto;
  }

  .knowledge-room-summary {
    padding: 16px;
  }

  .knowledge-room-summary-head {
    align-items: flex-start;
  }

  .knowledge-room-steps,
  .knowledge-room-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .knowledge-room-summary-actions .knowledge-room-inline-status {
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .knowledge-history-actions,
  .knowledge-history-actions .btn,
  .knowledge-filter-actions,
  .knowledge-filter-actions .btn,
  .knowledge-detail-actions .btn,
  .knowledge-inline-form,
  .knowledge-inline-form .btn {
    width: 100%;
  }
}

.knowledge-test-hero,
.knowledge-result-summary {
  align-items: center;
  background: #fff;
  border: 1px solid var(--knowledge-line);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(15, 35, 65, .055);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 18px 20px;
}

.knowledge-test-hero h1,
.knowledge-result-summary h1 {
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  line-height: 1.25;
  margin: 3px 0 6px;
}

.knowledge-test-status {
  display: grid;
  gap: 12px;
  min-width: 240px;
}

.knowledge-test-timer,
.knowledge-test-progress,
.knowledge-result-score {
  background: var(--knowledge-soft);
  border: 1px solid var(--knowledge-line);
  border-radius: 8px;
  padding: 14px;
}

.knowledge-test-page.is-time-warning .knowledge-test-timer {
  background: #fff7ed;
  border-color: rgba(154, 52, 18, .35);
  color: #9a3412;
}

.knowledge-test-timer span,
.knowledge-test-progress span {
  color: var(--knowledge-muted);
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
}

.knowledge-test-timer strong,
.knowledge-result-score strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.knowledge-test-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 280px;
}

.knowledge-question-panel,
.knowledge-question-navigator,
.knowledge-result-item {
  background: #fff;
  border: 1px solid var(--knowledge-line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 35, 65, .05);
}

.knowledge-question-panel {
  border-radius: 28px;
  min-width: 0;
  overflow: hidden;
  padding: clamp(20px, 2.6vw, 30px);
  position: relative;
}

.knowledge-question-panel::before {
  background: linear-gradient(180deg, #0b579f, #f4c542);
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 6px;
}

.knowledge-question-panel,
.knowledge-question-panel * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.knowledge-question-panel img {
  -webkit-user-drag: none;
}

.knowledge-question {
  display: none;
}

.knowledge-question.is-active {
  display: block;
}

.knowledge-question-head {
  align-items: center;
  color: var(--knowledge-muted);
  display: flex;
  flex-wrap: wrap;
  font-weight: 900;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.knowledge-question-head .question-number {
  align-items: center;
  background: #0b579f;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(11, 87, 159, .18);
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  min-height: 32px;
  padding: 6px 12px;
}

.knowledge-question h2,
.knowledge-result-item h3 {
  font-size: 1.25rem;
  line-height: 1.6;
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}

.knowledge-choice-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.knowledge-choice {
  align-items: flex-start;
  border: 1px solid var(--knowledge-line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 24px 34px minmax(0, 1fr);
  line-height: 1.55;
  padding: 14px;
}

.knowledge-choice:focus-within {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .18);
}

.knowledge-choice input {
  margin-top: 5px;
}

.knowledge-choice-label {
  align-items: center;
  background: #e9f5f2;
  border-radius: 999px;
  color: #0f766e;
  display: inline-flex;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.knowledge-choice-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.knowledge-question-actions,
.knowledge-room-actions,
.knowledge-result-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.knowledge-question-navigator {
  padding: 16px;
  position: sticky;
  top: 12px;
}

.knowledge-question-navigator h2 {
  font-size: 1rem;
  margin: 0 0 12px;
}

.knowledge-question-numbers {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.knowledge-question-numbers button {
  aspect-ratio: 1;
  background: #fff;
  border: 1px solid var(--knowledge-line);
  border-radius: 8px;
  color: var(--knowledge-ink);
  cursor: pointer;
  font-weight: 900;
}

.knowledge-question-numbers button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, .28);
  outline-offset: 2px;
}

.knowledge-question-numbers button.is-answered {
  background: #ecfdf5;
  border-color: rgba(4, 120, 87, .35);
}

.knowledge-question-numbers button.is-current {
  background: #fff7ed;
  border-color: rgba(217, 155, 31, .65);
}

.knowledge-test-legend {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.knowledge-test-legend span {
  align-items: center;
  color: var(--knowledge-muted);
  display: flex;
  font-size: .9rem;
  font-weight: 800;
  gap: 8px;
}

.knowledge-test-legend i {
  background: #fff;
  border: 1px solid var(--knowledge-line);
  border-radius: 999px;
  display: inline-block;
  height: 14px;
  width: 14px;
}

.knowledge-test-legend i.is-answered {
  background: #ecfdf5;
  border-color: rgba(4, 120, 87, .35);
}

.knowledge-test-legend i.is-current {
  background: #fff7ed;
  border-color: rgba(217, 155, 31, .65);
}

.knowledge-question-navigator .btn + .btn {
  margin-top: 8px;
}

.knowledge-result-summary.is-pass {
  border-color: rgba(4, 120, 87, .3);
}

.knowledge-result-summary.is-fail {
  border-color: rgba(154, 52, 18, .26);
}

.knowledge-result-main {
  min-width: 0;
}

.knowledge-result-score {
  min-width: 170px;
  text-align: center;
}

.knowledge-result-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr);
  margin-bottom: 18px;
}

.knowledge-result-message {
  border-radius: 8px;
  display: grid;
  gap: 6px;
  line-height: 1.55;
  margin-top: 14px;
  padding: 12px;
}

.knowledge-result-message.success {
  background: #ecfdf5;
  color: #047857;
}

.knowledge-result-message.warning {
  background: #fff7ed;
  color: #9a3412;
}

.knowledge-result-items {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.knowledge-result-items > h2 {
  font-size: 1.25rem;
  margin: 0;
}

.knowledge-result-item {
  padding: 16px;
}

.knowledge-result-item.is-correct {
  border-color: rgba(4, 120, 87, .28);
}

.knowledge-result-item.is-wrong {
  border-color: rgba(154, 52, 18, .24);
}

.knowledge-result-item p {
  color: #334155;
  line-height: 1.6;
  margin: 8px 0 0;
}

.knowledge-satisfaction-form {
  background: #fff;
  border: 1px solid var(--knowledge-line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 35, 65, .05);
  display: grid;
  gap: 20px;
  padding: 24px;
}

.knowledge-satisfaction-hero {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.knowledge-satisfaction-hero-meta {
  align-items: flex-end;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(18, 33, 58, .1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-width: 190px;
  padding: 14px 16px;
}

.knowledge-satisfaction-hero-meta strong {
  color: var(--knowledge-ink);
  font-size: 1.1rem;
}

.knowledge-satisfaction-hero-meta span {
  color: #64748b;
  font-size: .9rem;
}

.knowledge-satisfaction-intro {
  align-items: flex-start;
  background: #f0fdfa;
  border: 1px solid rgba(13, 148, 136, .22);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  margin: 18px 0;
  padding: 18px;
}

.knowledge-satisfaction-intro-icon {
  align-items: center;
  background: #0f766e;
  border-radius: 50%;
  color: #fff;
  display: flex;
  flex: 0 0 34px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
}

.knowledge-satisfaction-intro h2 {
  color: var(--knowledge-ink);
  font-size: 1.08rem;
  margin: 0 0 4px;
}

.knowledge-satisfaction-intro p {
  color: #334155;
  line-height: 1.65;
  margin: 0;
}

.knowledge-rating-scale {
  align-items: center;
  background: var(--knowledge-soft);
  border: 1px solid rgba(18, 33, 58, .08);
  border-radius: 8px;
  color: #334155;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 14px 16px;
}

.knowledge-rating-scale strong {
  color: var(--knowledge-ink);
  margin-right: 4px;
}

.knowledge-rating-scale span {
  font-size: .92rem;
  white-space: nowrap;
}

.knowledge-satisfaction-questions {
  display: grid;
  gap: 16px;
}

.knowledge-rating-group {
  border: 1px solid var(--knowledge-line);
  border-radius: 8px;
  margin: 0;
  min-width: 0;
  padding: 16px;
}

.knowledge-rating-group legend {
  align-items: flex-start;
  color: var(--knowledge-ink);
  display: flex;
  font-weight: 900;
  gap: 10px;
  line-height: 1.55;
  padding: 0 6px;
}

.knowledge-rating-group legend > span {
  align-items: center;
  background: var(--knowledge-soft);
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 30px;
  height: 30px;
  justify-content: center;
}

.knowledge-rating-options {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 12px;
}

.knowledge-rating-options label {
  cursor: pointer;
  min-width: 0;
}

.knowledge-rating-options input {
  opacity: 0;
  position: absolute;
}

.knowledge-rating-options label > span {
  align-items: center;
  border: 1px solid var(--knowledge-line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  min-height: 62px;
  padding: 8px 6px;
  text-align: center;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.knowledge-rating-options label:hover > span {
  border-color: rgba(15, 118, 110, .38);
  transform: translateY(-1px);
}

.knowledge-rating-options strong {
  color: var(--knowledge-ink);
  font-size: 1.08rem;
  line-height: 1;
}

.knowledge-rating-options small {
  color: #64748b;
  font-size: .78rem;
  line-height: 1.2;
}

.knowledge-rating-options input:checked + span {
  background: #ecfdf5;
  border-color: rgba(4, 120, 87, .55);
  box-shadow: inset 0 0 0 1px rgba(4, 120, 87, .12);
}

.knowledge-rating-options input:checked + span strong,
.knowledge-rating-options input:checked + span small {
  color: #047857;
}

.knowledge-rating-options input:focus-visible + span {
  outline: 3px solid rgba(15, 118, 110, .22);
  outline-offset: 2px;
}

.knowledge-satisfaction-comment {
  border-top: 1px solid var(--knowledge-line);
  padding-top: 20px;
}

.knowledge-satisfaction-comment label {
  color: var(--knowledge-ink);
  font-weight: 900;
}

.knowledge-satisfaction-comment .field-hint {
  color: #64748b;
  font-size: .9rem;
  margin: 4px 0 10px;
}

.knowledge-satisfaction-comment textarea {
  resize: vertical;
}

.knowledge-satisfaction-actions {
  border-top: 1px solid var(--knowledge-line);
  margin-top: 0;
  padding-top: 20px;
}

.knowledge-certificate-status {
  background: #fff;
  border: 1px solid var(--knowledge-line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 35, 65, .05);
  display: grid;
  gap: 16px;
  line-height: 1.55;
  padding: 20px;
}

.knowledge-certificate-status > strong {
  display: block;
  font-size: 1.3rem;
}

.knowledge-certificate-status.is-valid {
  border-color: rgba(4, 120, 87, .32);
}

.knowledge-certificate-status.is-invalid {
  border-color: rgba(154, 52, 18, .28);
}

.btn-full {
  width: 100%;
}

@media (max-width: 980px) {
  .knowledge-test-layout,
  .knowledge-result-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-question-navigator {
    position: static;
  }
}

@media (max-width: 720px) {
  .knowledge-test-hero,
  .knowledge-result-summary {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .knowledge-test-status,
  .knowledge-result-score {
    min-width: 0;
    width: 100%;
  }

  .knowledge-question-panel {
    padding: 16px;
  }

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

  .knowledge-choice {
    grid-template-columns: 22px 32px minmax(0, 1fr);
    padding: 12px;
  }

  .knowledge-question-actions .btn,
  .knowledge-room-actions .btn,
  .knowledge-result-actions .btn,
  .knowledge-result-actions form,
  .knowledge-result-actions form .btn {
    width: 100%;
  }

  .knowledge-question-numbers {
    grid-template-columns: repeat(5, minmax(42px, 1fr));
  }

  .knowledge-satisfaction-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .knowledge-satisfaction-hero-meta {
    align-items: flex-start;
    min-width: 0;
    width: 100%;
  }

  .knowledge-rating-scale {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

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

  .knowledge-rating-options label > span {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    justify-content: flex-start;
    min-height: 48px;
    padding: 10px 14px;
  }

  .knowledge-rating-options strong {
    align-items: center;
    background: var(--knowledge-soft);
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 30px;
    height: 30px;
    justify-content: center;
  }

  .knowledge-rating-options small {
    font-size: .9rem;
  }

  .knowledge-satisfaction-form {
    gap: 16px;
    padding: 16px;
  }

  .knowledge-satisfaction-intro {
    padding: 15px;
  }
}

@media (max-width: 460px) {
  .knowledge-history-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .knowledge-history-facts > div.is-certificate {
    grid-column: span 1;
  }
}

@media (max-width: 560px) {
  .knowledge-category-select {
    grid-template-columns: 1fr;
  }

  .knowledge-category-select .btn {
    width: 100%;
  }

  .knowledge-card {
    grid-template-areas:
      "cover"
      "summary"
      "meta"
      "actions";
    grid-template-columns: 1fr;
  }

  .knowledge-card .knowledge-card-cover {
    aspect-ratio: 16 / 9;
  }

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

  .knowledge-card-actions .btn {
    width: 100%;
  }
}
