
/* Global Styles */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f7;
  color: #111827;
  line-height: 1.6;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

header {
  background: linear-gradient(135deg, #eef2ff, #f9fafb);
  border-bottom: 1px solid #e5e7eb;
  padding: 1.2rem 1rem;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span.icon {
  font-size: 1.3rem;
}

.subtitle {
  font-size: 0.85rem;
  color: #6b7280;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.nav-link:hover {
  background: #f9fafb;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  transform: translateY(-1px);
}

.nav-link.primary {
  border-color: #2563eb33;
  background: #2563eb;
  color: #ffffff;
}

.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
}

.card {
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 1.5rem 1.35rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
}

.card + .card {
  margin-top: 1.25rem;
}

h1, h2, h3 {
  margin-top: 0;
  color: #0f172a;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.05rem;
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

.lead {
  font-size: 0.98rem;
  color: #4b5563;
  margin-bottom: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.badge span.icon {
  font-size: 1rem;
}

.languages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.language-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 0.9rem 0.9rem 1rem;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: box-shadow 0.15s ease, transform 0.08s ease, border-color 0.15s ease;
}

.language-card:hover {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
  border-color: #c7d2fe;
}

.language-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.language-flag {
  font-size: 1.1rem;
}

.language-sub {
  font-size: 0.8rem;
  color: #6b7280;
}

.language-footer {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #4b5563;
}

.language-footer span.arrow {
  font-size: 1rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease, border-color 0.15s ease;
}

.btn span.icon {
  font-size: 1rem;
}

.btn:hover {
  background: #ffffff;
  border-color: #d4d4d8;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn.primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
}

.btn.secondary {
  background: #ffffff;
  color: #111827;
}

.btn.ghost {
  background: transparent;
  border-style: dashed;
}

hr.soft {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1.25rem 0 1rem;
}

.step-list {
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0 0.5rem;
}

.step-list li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
}

.step-list li::before {
  content: "•";
  position: absolute;
  left: 0.25rem;
  top: 0.1rem;
  color: #2563eb;
  font-weight: 700;
}

.substep {
  margin-left: 1.2rem;
  font-size: 0.93rem;
  color: #374151;
}

.highlight {
  background: #ecfeff;
  border-left: 3px solid #06b6d4;
  padding: 0.75rem 0.9rem;
  border-radius: 0.9rem;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.muted {
  font-size: 0.85rem;
  color: #6b7280;
}

.terms-list {
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0 0.5rem;
}

.terms-list li {
  margin-bottom: 0.9rem;
}

.terms-list strong {
  display: inline-block;
  margin-bottom: 0.15rem;
}

.footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem 1.75rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

@media (max-width: 640px) {
  header {
    padding: 0.9rem 0.85rem;
  }

  .main {
    padding: 1.1rem 0.85rem 2rem;
  }

  .card {
    border-radius: 1rem;
    padding: 1.2rem 1.1rem;
  }

  h1 {
    font-size: 1.45rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  /* More compact language buttons on mobile */
  .languages-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.6rem;
  }

  .language-card {
    padding: 0.6rem 0.6rem 0.7rem;
    border-radius: 0.85rem;
  }

  .language-header {
    font-size: 0.85rem;
    gap: 0.4rem;
  }

  .language-flag {
    font-size: 0.95rem;
  }

  .language-footer {
    font-size: 0.75rem;
  }
}
