.nqn-home {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
  color: #1a3152;
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nqn-home [hidden] {
  display: none !important;
}

@media (min-width: 640px) {
  .nqn-home {
    padding: 3.5rem 1rem 4rem;
  }
}

.nqn-hero {
  margin-bottom: 2.5rem;
  text-align: center;
}

.nqn-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(153, 17, 76, 0.08);
  color: #99114c;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25rem;
}

.nqn-title {
  margin: 0 0 0.75rem;
  color: #1a3152;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .nqn-title {
    font-size: 1.875rem;
  }
}

.nqn-subtitle {
  max-width: 28rem;
  margin: 0 auto;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.625;
}

@media (min-width: 640px) {
  .nqn-subtitle {
    font-size: 1.125rem;
  }
}

.nqn-section {
  margin-bottom: 2.5rem;
}

.nqn-section-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.nqn-section-icon {
  display: inline-flex;
  align-items: center;
  color: #99114c;
}

.nqn-section-heading h2 {
  margin: 0;
  color: #1a3152;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

.nqn-section-count {
  margin-left: auto;
  color: #4b5563;
  font-size: 0.75rem;
}

.nqn-category-grid {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.nqn-category-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1rem 1rem 1.25rem;
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 49, 82, 0.04);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.nqn-category-accent {
  position: absolute;
  left: 0;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 0.25rem;
  border-radius: 9999px;
  background: #f3f4f6;
  transition: background-color 200ms ease;
}

.nqn-category-card:hover .nqn-category-accent,
.nqn-category-card:focus-visible .nqn-category-accent {
  background: rgba(153, 17, 76, 0.4);
}

.nqn-category-card:hover .nqn-category-glyph,
.nqn-category-card:focus-visible .nqn-category-glyph {
  color: #99114c;
}

.nqn-category-card:hover,
.nqn-category-card:focus-visible {
  border-color: rgba(153, 17, 76, 0.2);
  box-shadow: 0 10px 15px -3px rgba(153, 17, 76, 0.05);
  transform: translateY(-2px);
  outline: none;
}

.nqn-category-icon {
  position: relative;
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
}

.nqn-ring {
  position: absolute;
  inset: 0;
}

.nqn-category-glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(26, 49, 82, 0.6);
  transition: color 160ms ease;
}

.nqn-lucide {
  display: block;
}

.nqn-category-copy {
  display: grid;
  min-width: 0;
  gap: 0.25rem;
}

.nqn-category-title {
  min-width: 0;
  color: #1a3152;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25;
}

.nqn-category-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}

.nqn-category-count {
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.25;
  white-space: nowrap;
}

.nqn-category-progress {
  color: #99114c;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}

.nqn-category-progress:empty {
  display: none;
}

.nqn-category-arrow {
  display: inline-flex;
  align-items: center;
  color: #cbd5e1;
  transition: color 160ms ease, transform 160ms ease;
}

.nqn-category-card:hover .nqn-category-title,
.nqn-category-card:focus-visible .nqn-category-title {
  color: #99114c;
}

.nqn-category-card:hover .nqn-category-arrow,
.nqn-category-card:focus-visible .nqn-category-arrow,
.nqn-exam-entry:hover .nqn-category-arrow,
.nqn-exam-entry:focus-visible .nqn-category-arrow,
.nqn-exam-card:hover .nqn-category-arrow,
.nqn-exam-card:focus-visible .nqn-category-arrow {
  color: #99114c;
  transform: translateX(2px);
}

@media (max-width: 520px) {
  .nqn-category-card {
    gap: 0.625rem;
  }
}

.nqn-practice {
  margin-bottom: 2.5rem;
}

.nqn-practice-header,
.nqn-question-card,
.nqn-practice-actions {
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 49, 82, 0.04);
}

.nqn-practice-header {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
}

@media (min-width: 640px) {
  .nqn-practice-header {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }
}

.nqn-back,
.nqn-next {
  display: inline-flex;
  justify-content: center;
  border: 0;
  border-radius: 9999px;
  background: #99114c;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.625rem 1rem;
}

.nqn-back {
  background: rgba(153, 17, 76, 0.08);
  color: #99114c;
}

.nqn-next:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

.nqn-practice-eyebrow,
.nqn-subcategory {
  margin: 0 0 0.25rem;
  color: #99114c;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nqn-practice-header h2,
.nqn-question-card h3 {
  margin: 0;
  color: #1a3152;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nqn-score,
.nqn-question-meta {
  color: rgba(26, 49, 82, 0.62);
  font-size: 0.8125rem;
  font-weight: 700;
}

.nqn-question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.nqn-question-card {
  padding: 1.25rem;
}

.nqn-question-card h3 {
  font-size: 1.125rem;
  line-height: 1.45;
}

.nqn-answer-list {
  display: grid;
  gap: 0.625rem;
  margin-top: 1rem;
}

.nqn-answer {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  width: 100%;
  padding: 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  background: #fff;
  color: #1a3152;
  cursor: pointer;
  font: inherit;
  line-height: 1.45;
  text-align: left;
}

.nqn-answer:hover:not(:disabled),
.nqn-answer:focus-visible:not(:disabled) {
  border-color: rgba(153, 17, 76, 0.45);
  outline: none;
}

.nqn-answer:disabled {
  cursor: default;
}

.nqn-answer.is-correct {
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
}

.nqn-answer.is-incorrect {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

.nqn-answer-label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: #f3f4f6;
  color: #99114c;
  font-size: 0.75rem;
  font-weight: 800;
}

.nqn-feedback {
  margin-top: 1rem;
  padding: 0.875rem;
  border-radius: 0.875rem;
  color: #1a3152;
  font-size: 0.875rem;
  line-height: 1.55;
}

.nqn-feedback.is-correct {
  background: rgba(22, 163, 74, 0.1);
}

.nqn-feedback.is-incorrect {
  background: rgba(220, 38, 38, 0.1);
}

.nqn-practice-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
  padding: 1rem;
}

.nqn-exam-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px dashed #e2e8f0;
  border-radius: 1rem;
  background: #fcfcfc;
}

.nqn-exam-entry,
.nqn-exam-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 49, 82, 0.04);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.nqn-exam-entry:hover,
.nqn-exam-entry:focus-visible,
.nqn-exam-card:hover,
.nqn-exam-card:focus-visible {
  border-color: rgba(153, 17, 76, 0.24);
  box-shadow: 0 10px 24px rgba(26, 49, 82, 0.07);
  outline: none;
}

.nqn-exam-icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: rgba(153, 17, 76, 0.08);
  color: #99114c;
}

.nqn-exam-copy {
  display: grid;
  gap: 0.25rem;
}

.nqn-exam-title {
  color: #1a3152;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.33;
}

.nqn-exam-meta {
  color: #4b5563;
  font-size: 0.8125rem;
}

.nqn-exam-session,
.nqn-results {
  margin-bottom: 2.5rem;
}

.nqn-timer {
  justify-self: start;
  min-width: 5.5rem;
  padding: 0.625rem 0.875rem;
  border-radius: 9999px;
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
}

.nqn-timer.is-warning {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
}

.nqn-timer.is-danger {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.nqn-exam-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.nqn-exam-pill {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.5rem;
  background: #f3f4f6;
  color: #9ca3af;
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
}

.nqn-exam-pill.is-current {
  background: #1a3152;
  color: #fff;
}

.nqn-exam-pill.is-answered:not(.is-current) {
  background: rgba(153, 17, 76, 0.16);
  color: #99114c;
}

.nqn-finish {
  margin-left: 0.5rem;
}

.nqn-score-summary,
.nqn-incorrect-review,
.nqn-incorrect-item {
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 49, 82, 0.04);
}

.nqn-score-summary {
  margin-bottom: 1rem;
  padding: 1.25rem;
  text-align: center;
}

.nqn-result-banner {
  display: inline-flex;
  margin-bottom: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-radius: 1rem;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  font-weight: 800;
}

.nqn-result-banner.is-passed {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.nqn-result-banner.is-failed {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.nqn-score-summary p,
.nqn-incorrect-review p {
  margin: 0;
  color: rgba(26, 49, 82, 0.62);
  font-size: 0.875rem;
}

.nqn-incorrect-review {
  padding: 1.25rem;
}

.nqn-incorrect-review h3 {
  margin: 0 0 0.75rem;
  color: #1a3152;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
}

.nqn-incorrect-item {
  margin-top: 0.75rem;
  padding: 0.875rem;
}

.nqn-incorrect-item span {
  display: block;
  margin-bottom: 0.25rem;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
}

.nqn-incorrect-item p {
  color: #1a3152;
  font-weight: 600;
}

.nqn-source {
  margin: 0;
  padding-bottom: 1rem;
  color: #4b5563;
  font-size: 0.75rem;
  line-height: 1.25;
  text-align: center;
}

.nqn-dashboard-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  border: 0;
  border-radius: 9999px;
  background: #f8fafc;
  color: #1a3152;
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.5rem 0.875rem;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nqn-dashboard-link:hover,
.nqn-dashboard-link:focus-visible {
  background: #f5f0eb;
  color: #99114c;
  outline: none;
  transform: translateY(-1px);
}

.nqn-dashboard {
  margin-bottom: 2.5rem;
}

.nqn-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .nqn-dashboard-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.nqn-stat-card,
.nqn-dashboard-category,
.nqn-dashboard-history,
.nqn-dashboard-exam {
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 49, 82, 0.04);
}

.nqn-stat-card {
  padding: 1rem 0.75rem;
  text-align: center;
}

.nqn-stat-icon {
  margin-bottom: 0.25rem;
  font-size: 1.25rem;
}

.nqn-stat-value {
  color: #1a3152;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
}

.nqn-stat-label,
.nqn-dashboard-category-percent,
.nqn-dashboard-category-meta,
.nqn-dashboard-exam span:last-child {
  color: #9ca3af;
  font-size: 0.75rem;
}

.nqn-dashboard-heading,
.nqn-dashboard-history h3 {
  margin: 0 0 1rem;
  color: #1a3152;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
}

.nqn-dashboard-categories {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.nqn-dashboard-category {
  padding: 0.875rem;
}

.nqn-dashboard-category-top,
.nqn-dashboard-category-meta,
.nqn-dashboard-exam {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nqn-dashboard-category-name,
.nqn-dashboard-exam span:first-child {
  min-width: 0;
  color: #1a3152;
  font-size: 0.875rem;
  font-weight: 700;
}

.nqn-dashboard-progress-track {
  overflow: hidden;
  height: 0.5rem;
  margin: 0.5rem 0 0.25rem;
  border-radius: 9999px;
  background: #f3f4f6;
}

.nqn-dashboard-progress-bar {
  height: 100%;
  border-radius: 9999px;
  background: #99114c;
  transition: width 160ms ease;
}

.nqn-dashboard-history {
  padding: 1rem;
}

.nqn-dashboard-history h3 {
  font-size: 1rem;
}

.nqn-dashboard-exam {
  margin-top: 0.5rem;
  padding: 0.875rem;
}

.nqn-dashboard-exam.is-passed {
  border-color: rgba(22, 163, 74, 0.3);
  background: rgba(22, 163, 74, 0.05);
}

.nqn-dashboard-exam.is-failed {
  border-color: rgba(220, 38, 38, 0.3);
  background: rgba(220, 38, 38, 0.05);
}

/* ── Exam answering-mode toggle: Studio vs Esame (#129) ── */
.nqn-answer.is-selected {
  border-color: #1a3152;
  background: rgba(26, 49, 82, 0.06);
}
.nqn-exam-mode {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.nqn-exam-mode-btn {
  flex: 1 1 12rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  background: #fff;
  color: #4b5563;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.nqn-exam-mode-btn strong { color: #1a3152; font-weight: 700; }
.nqn-exam-mode-btn span { font-size: 0.8125rem; color: #4b5563; }
.nqn-exam-mode-btn:hover,
.nqn-exam-mode-btn:focus-visible { border-color: rgba(153, 17, 76, 0.45); outline: none; }
.nqn-exam-mode-btn.is-active { border-color: #99114c; background: rgba(153, 17, 76, 0.06); }
.nqn-exam-mode-btn.is-active strong { color: #99114c; }

/* == Official DD 131/2022 question figures (2026-07-06) == */
.nqn-question-figure {
    margin: 0 0 14px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    justify-content: center;
}
.nqn-question-figure img {
    max-width: min(100%, 360px);
    height: auto;
    display: block;
}
.nqn-incorrect-item .nqn-incorrect-figure {
    max-width: 180px;
    height: auto;
    display: block;
    margin-top: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px;
    background: #fff;
}
.nqn-section-note {
    margin: -6px 0 14px;
    font-size: 0.85rem;
    color: #64748b;
}
