:root {
  --primary: #035ba4;
  --primary-dark: #013b75;
  --primary-light: #dfeefe;
  --white: #ffffff;
  --soft-white: #f5f9ff;
  --text: #0d1726;
  --muted: #5f6f82;
  --border: rgba(3, 91, 164, 0.12);
  --shadow: 0 18px 45px rgba(3, 91, 164, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #117ce2);
  color: var(--white);
  box-shadow: var(--shadow);
}

.brand-name,
.brand-sub {
  display: block;
  line-height: 1.1;
}

.brand-sub {
  color: var(--primary);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--muted);
  font-weight: 600;
}

.main-nav a:hover,
.site-footer a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 0.9rem 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 12px 30px rgba(3, 91, 164, 0.18);
}

.btn-light {
  background: var(--soft-white);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(3, 91, 164, 0.25);
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  margin-top: 1rem;
  padding: 0.65rem 1rem;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.1), 0 1px 3px rgba(60, 64, 67, 0.06);
  font-weight: 500;
  font-size: 0.94rem;
}

.btn-google:hover {
  background: #f8f9fa;
  border-color: #c7d0d9;
  box-shadow: 0 2px 4px rgba(60, 64, 67, 0.12), 0 1px 3px rgba(60, 64, 67, 0.08);
}

.btn-google-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 40px;
  padding: 0 16px;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.1), 0 1px 3px rgba(60, 64, 67, 0.06);
  font-weight: 500;
  font-size: 0.94rem;
}

.btn-google-header:hover {
  background: #f8f9fa;
  border-color: #c7d0d9;
  box-shadow: 0 2px 4px rgba(60, 64, 67, 0.12), 0 1px 3px rgba(60, 64, 67, 0.08);
}

.google-svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(180deg, #f5faff 0%, #ffffff 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 2rem;
}

.eyebrow {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(3, 91, 164, 0.08);
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.hero-copy h1 {
  margin-top: 1rem;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  line-height: 1.05;
  color: var(--text);
}

.hero-copy p {
  max-width: 610px;
  font-size: 1.08rem;
  color: var(--muted);
  margin: 1.2rem 0 1.8rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.2rem;
  color: var(--muted);
  font-weight: 600;
}

.hero-points li::before {
  content: "✓";
  color: var(--primary);
  margin-right: 0.45rem;
}

.hero-card {
  display: flex;
  justify-content: center;
}

.mini-panel {
  width: min(100%, 450px);
  background: linear-gradient(135deg, #ffffff 0%, #edf6ff 100%);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 1.1rem;
}

.mini-top {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.dot {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 50%;
}

.dot.red { background: #ff6b6b; }
.dot.amber { background: #f9c74f; }
.dot.green { background: #4cc9a1; }

.mini-body {
  padding: 1rem;
  background: var(--white);
  border-radius: 18px;
  border: 1px solid var(--border);
}

.mini-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font-weight: 700;
}

.mini-body h3 {
  margin: 1rem 0 0.8rem;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.mini-metrics div {
  background: var(--soft-white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
}

.mini-metrics strong {
  display: block;
  font-size: 1.4rem;
  color: var(--primary);
}

.mini-metrics span {
  color: var(--muted);
  font-size: 0.84rem;
}

.progress {
  width: 100%;
  height: 12px;
  background: #edf2f7;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress span {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #57a1f0);
}

.full-btn {
  width: 100%;
}

.stats-section {
  padding: 0 0 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.stats-grid > div {
  background: linear-gradient(180deg, #f7fbff 0%, #edf5ff 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.2rem;
  text-align: center;
}

.stats-grid strong {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--primary);
}

.stats-grid span {
  color: var(--muted);
  font-weight: 600;
}

.free-tests-section {
  background: var(--soft-white);
}

.sub-level-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.sub-level-cta strong,
.sub-level-cta span {
  display: block;
}

.sub-level-cta span {
  color: var(--muted);
  font-size: 0.9rem;
}

.sub-level-section {
  background: #ffffff;
}

.sub-level-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.sub-level-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  min-height: 88px;
  padding: 1rem;
  background: var(--soft-white);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sub-level-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(3, 91, 164, 0.1);
}

.sub-level-card strong,
.sub-level-card small {
  display: block;
}

.sub-level-card strong {
  color: var(--primary-dark);
}

.sub-level-card small {
  color: var(--muted);
  font-size: 0.82rem;
}

.free-tests-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.free-test-card {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  justify-content: space-between;
  padding: 1.25rem;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(3, 91, 164, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.free-test-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(3, 91, 164, 0.14);
}

.free-test-code {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
}

.free-test-copy {
  display: grid;
  gap: 0.2rem;
}

.free-test-copy strong {
  font-size: 1.15rem;
}

.free-test-copy small {
  color: var(--muted);
}

.free-test-arrow {
  align-self: flex-end;
  color: var(--primary);
  font-size: 1.4rem;
  line-height: 1;
}

.section {
  padding: 5rem 0;
}

.alt-section {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.section-head {
  max-width: 700px;
  margin: 0 auto 2.2rem;
  text-align: center;
}

.left-align {
  margin-left: 0;
  text-align: left;
}

.section-head h2 {
  margin: 1rem 0 0.7rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
}

.section-head p {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.filter-btn {
  background: #f3f8ff;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.exams-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.exam-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.04);
}

.exam-card .top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.language-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(3, 91, 164, 0.08);
  color: var(--primary);
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.exam-type {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.exam-card h3 {
  font-size: 1.3rem;
  margin: 0 0 0.55rem;
}

.exam-card p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.exam-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.exam-card .meta-info {
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.exam-card .meta-info strong {
  font-size: 1.1rem;
  color: var(--primary);
}

.specialty-grid,
.steps-grid,
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

.specialty-card,
.step-card,
.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 12px 28px rgba(10, 18, 29, 0.03);
}

.pill {
  display: inline-block;
  color: var(--primary);
  background: rgba(3, 91, 164, 0.08);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 800;
}

.specialty-card h3,
.step-card h3,
.faq-item h3 {
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.specialty-card p,
.step-card p,
.faq-item p,
.site-footer p,
.site-footer li {
  color: var(--muted);
}

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

.step-number {
  display: inline-block;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.faq-wrap {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 1.7rem;
  align-items: start;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.site-footer {
  padding: 4rem 0 1rem;
  background: #062d4c;
  color: var(--white);
}

.footer-grid {
  grid-template-columns: 1.3fr 0.9fr 0.9fr;
  align-items: start;
}

.site-footer .brand {
  margin-bottom: 1rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 200;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 17, 29, 0.52);
}

.modal-panel {
  position: relative;
  width: min(460px, calc(100% - 28px));
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
  z-index: 1;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: rgba(3, 91, 164, 0.08);
  color: var(--primary);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.3rem;
  cursor: pointer;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab-btn {
  border: none;
  background: #edf5ff;
  color: var(--muted);
  font-weight: 800;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--primary);
  color: var(--white);
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: block;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--text);
}

.auth-form input,
.auth-form select,
.auth-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(13, 23, 38, 0.12);
  background: #fbfdff;
  padding: 0.9rem 1rem;
  color: var(--text);
}

.auth-form textarea {
  resize: vertical;
  min-height: 90px;
}

.field-row {
  display: grid;
  gap: 1rem;
}

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

.signup-form {
  gap: 0.9rem;
}

.auth-message {
  min-height: 24px;
  margin: 1rem 0 0;
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 980px) {
  .hero-grid,
  .faq-wrap,
  .specialty-grid,
  .stats-grid,
  .free-tests-grid,
  .sub-level-grid,
  .exams-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-nav {
    display: none;
  }
}

@media (max-width: 700px) {
  .hero-grid,
  .specialty-grid,
  .steps-grid,
  .stats-grid,
  .free-tests-grid,
  .sub-level-grid,
  .exams-grid,
  .footer-grid,
  .faq-wrap {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.9rem 0;
  }

  .nav-actions {
    width: 100%;
    justify-content: center;
  }

  .sub-level-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .sub-level-cta .btn {
    text-align: center;
  }

  .hero {
    padding-top: 3rem;
  }

  .section {
    padding: 4rem 0;
  }

  .hero-copy h1 {
    font-size: 2.6rem;
  }
}
