/* ---------- Quiz an toan so ---------- */

.quiz-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.quiz-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
}

.quiz-question {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.quiz-question-text {
  margin: 0 0 12px;
  font-weight: 600;
  line-height: 1.5;
}

.quiz-question label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1.45;
}

.quiz-question label:hover {
  background: var(--bg-alt);
}

.quiz-question input[type="radio"] {
  margin-top: 4px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.quiz-question label.is-correct {
  background: rgba(34, 160, 90, 0.16);
  color: #1c8a4e;
  font-weight: 600;
}

:root[data-theme="light"] .quiz-question label.is-correct {
  color: #17703e;
}

.quiz-question label.is-wrong {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: line-through;
}

.quiz-explain {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.quiz-submit {
  align-self: flex-start;
  padding: 12px 28px;
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.quiz-submit:hover {
  background: var(--accent-dim);
}

.quiz-result {
  margin-top: 24px;
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  text-align: center;
}

.quiz-score {
  margin: 0 0 6px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gold);
}

.quiz-feedback {
  margin: 0 0 16px;
  color: var(--text-dim);
}

.quiz-retry {
  padding: 10px 22px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.quiz-retry:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Tin nhan va thong ke truy cap ---------- */

.engagement-section {
  background: #0b1628;
  border-top: 3px solid var(--gold);
  color: #edf4fa;
}

.engagement-section .section-inner {
  padding-top: 36px;
  padding-bottom: 36px;
}

.engagement-grid {
  max-width: 1120px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 20px;
}

.feedback-card,
.traffic-card {
  padding: 22px;
  background: #101d32;
  border: 1px solid rgba(185, 214, 232, 0.22);
}

.engagement-kicker {
  margin: 0 0 6px;
  color: #efbd50;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.feedback-card h2,
.traffic-card h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.45rem;
  text-transform: uppercase;
}

.engagement-section .section-hint { color: #b9cad8; }

.feedback-form { display: grid; gap: 10px; }
.feedback-form > label { color: #f3f7fb; font-size: 0.82rem; font-weight: 700; }
.feedback-form textarea {
  width: 100%;
  min-height: 105px;
  resize: vertical;
  padding: 14px;
  color: #13233a;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 0;
  font: inherit;
  line-height: 1.55;
  outline: none;
}
.feedback-form textarea:focus { border-color: #efbd50; }
.feedback-honeypot { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.feedback-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.feedback-actions button {
  min-width: 112px;
  padding: 11px 18px;
  color: #071b35;
  background: #43d88c;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  font-weight: 800;
}
.feedback-actions button:hover, .feedback-actions button:focus-visible { background: #70e5a8; }
.feedback-actions button:disabled { cursor: wait; opacity: 0.7; }
#feedback-status { color: #d7e5ef; font-size: 0.8rem; }
#feedback-status.success { color: #7ef0b5; }
#feedback-status.error { color: #ff9b9b; }

.traffic-list { display: grid; gap: 6px; margin-top: 12px; }
.traffic-list > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  color: #13233a;
  background: #fff;
}
.traffic-icon { color: #08a85b; font-weight: 900; text-align: center; }
.traffic-list span:nth-child(2) { font-size: 0.87rem; }
.traffic-list strong { color: #08734a; font-size: 1rem; }
.traffic-note { margin: 10px 0 0; color: #9db3c3; font-size: 0.72rem; line-height: 1.45; }

@media (max-width: 780px) {
  .engagement-grid { grid-template-columns: 1fr; }
  .feedback-card, .traffic-card { padding: 22px 18px; }
}

/* ---------- Footer nhan dien chinh thong va thong tin trach nhiem ---------- */

.site-footer {
  border-top: 3px solid var(--gold);
  background: #071b35;
  color: #e7f0f7;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 30px 20px 24px;
  text-align: center;
}

.footer-line-1 {
  margin: 0 0 4px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #ffffff;
}

.footer-line-2 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.35px;
  color: #b9d6e8;
}

.footer-site-name {
  margin: 14px 0 4px;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.45px;
}

.footer-description {
  margin: 0 auto 16px;
  max-width: 920px;
  color: #b9d6e8;
  font-size: 0.86rem;
  line-height: 1.6;
}

.footer-status-notice {
  max-width: 920px;
  margin: -4px auto 18px;
  padding: 10px 14px;
  border: 1px solid rgba(185, 214, 232, 0.22);
  color: #d5e3ed;
  font-size: 0.78rem;
  line-height: 1.55;
}

.footer-responsibility {
  display: grid;
  gap: 3px;
  margin: 0 auto 18px;
  font-size: 0.8rem;
  color: #d5e3ed;
}

.footer-responsibility p { margin: 0; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(185, 214, 232, 0.28);
}

.footer-links a {
  color: #7ee7f4;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible { text-decoration: underline; }

.footer-copyright {
  margin: 18px 0 0;
  color: #8fa9bc;
  font-size: 0.72rem;
}
