/* базовые настройки */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #262626;
  background: #ffffff;
  line-height: 1.55;
}

a {
  color: #2454a8;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: 760px;
}

h1, h2, h3 {
  line-height: 1.25;
  font-weight: 700;
}

h1 {
  font-size: 34px;
  margin: 0 0 16px;
}

h2 {
  font-size: 24px;
  margin: 40px 0 12px;
}

h3 {
  font-size: 18px;
  margin: 24px 0 8px;
}

p {
  margin: 0 0 14px;
}

/* header */

.site-header {
  border-bottom: 1px solid #e6e6e6;
  padding: 14px 0;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  color: #262626;
}

.logo span {
  color: #2454a8;
}

.main-nav a {
  margin-left: 22px;
  text-decoration: none;
  color: #444;
  font-size: 15px;
}

.main-nav a:hover {
  color: #2454a8;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 18px;
  padding: 4px 10px;
  cursor: pointer;
}

/* hero */

.hero {
  padding: 60px 0 40px;
  border-bottom: 1px solid #eee;
}

.lead {
  font-size: 17px;
  color: #444;
  max-width: 680px;
}

.btn {
  display: inline-block;
  background: #2454a8;
  color: #fff;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: 4px;
  font-size: 15px;
  border: none;
  cursor: pointer;
  margin-top: 8px;
}

.btn:hover {
  background: #1c4488;
}

/* content sections */

.content {
  padding: 40px 0;
}

.quiz-section {
  padding: 40px 0 60px;
  background: #fafafa;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.quiz-intro-text {
  color: #555;
}

/* progress bar */

.quiz-progress-bar {
  background: #e6e6e6;
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
  margin-top: 18px;
}

.quiz-progress-inner {
  background: #2454a8;
  height: 100%;
  width: 0%;
  transition: width .2s ease;
}

.progress-label {
  font-size: 13px;
  color: #777;
  margin-top: 6px;
}

/* questions */

.q-block {
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  padding: 18px 20px;
  margin: 18px 0;
}

.q-block.q-missing {
  border-color: #d64545;
}

.q-number {
  font-size: 13px;
  color: #888;
  margin-bottom: 4px;
}

.q-text {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.q-option {
  display: block;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 15px;
}

.q-option:hover {
  border-color: #2454a8;
}

.q-option input {
  margin-right: 8px;
}

.submit-row {
  margin-top: 30px;
  text-align: center;
}

.btn-submit {
  font-size: 16px;
  padding: 13px 30px;
}

/* footer */

.site-footer {
  border-top: 1px solid #e6e6e6;
  padding: 30px 0;
  background: #fafafa;
}

.footer-links a {
  margin-right: 18px;
  text-decoration: none;
  color: #444;
  font-size: 14px;
}

.footer-note {
  font-size: 13px;
  color: #888;
  max-width: 640px;
  margin-top: 14px;
}

.footer-copy {
  font-size: 13px;
  color: #999;
  margin-top: 8px;
}

/* modal */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal {
  background: #fff;
  border-radius: 6px;
  max-width: 640px;
  width: 100%;
  margin-top: 40px;
  padding: 28px 26px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #888;
}

#resultSummary {
  font-size: 16px;
  font-weight: 600;
}

.result-details {
  max-height: 360px;
  overflow-y: auto;
  border-top: 1px solid #eee;
  margin-top: 12px;
  padding-top: 12px;
}

.result-item {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}

.result-item.wrong .result-q {
  color: #b3311f;
}

.result-item.correct .result-q {
  color: #237a3c;
}

.result-q {
  font-weight: 600;
  margin-bottom: 4px;
}

.result-answer-line {
  margin: 2px 0;
  color: #555;
}

/* legal pages */

.legal-page {
  padding: 40px 0 70px;
}

.legal-page h1 {
  font-size: 28px;
}

.legal-page h2 {
  font-size: 20px;
  margin-top: 30px;
}

.legal-page ul {
  padding-left: 20px;
}

.legal-page li {
  margin-bottom: 6px;
}

.updated-note {
  color: #888;
  font-size: 14px;
  margin-bottom: 30px;
}

/* mobile */

@media (max-width: 720px) {
  .main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    left: 0;
    top: 56px;
    background: #fff;
    border-bottom: 1px solid #e6e6e6;
    padding: 10px 20px;
  }

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

  .main-nav a {
    margin: 8px 0;
  }

  .nav-toggle {
    display: inline-block;
  }

  h1 {
    font-size: 26px;
  }

  .modal {
    margin-top: 16px;
    padding: 20px 16px;
  }
}
