:root {
  color-scheme: light;
  --navy: #061a33;
  --blue: #1d4ed8;
  --text: #172033;
  --muted: #5c6b80;
  --line: #dbe3ef;
  --surface: rgba(255, 255, 255, .97);
  --warning: #92400e;
  --warning-bg: #fffbeb;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background-color: var(--navy);
  background-image: linear-gradient(rgba(6, 26, 51, .28), rgba(6, 26, 51, .68)), url("pilot_trainer_sky_background.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

a {
  color: var(--blue);
}

.legal-shell {
  width: min(980px, calc(100% - 28px));
  margin: 24px auto 48px;
}

.legal-header,
.legal-card {
  border: 1px solid rgba(219, 227, 239, .94);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(2, 12, 27, .2);
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
}

.brand {
  margin: 0;
  color: var(--navy);
  font-size: 25px;
  line-height: 1;
}

.tagline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .035em;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e40af;
  font-weight: 900;
  text-decoration: none;
}

.legal-card {
  margin-top: 16px;
  padding: clamp(20px, 4vw, 42px);
}

.legal-card h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(29px, 5vw, 44px);
  line-height: 1.08;
}

.effective-date {
  margin: 9px 0 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.language-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 26px;
}

.language-nav button {
  appearance: none;
  padding: 8px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e40af;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.language-nav button:hover {
  transform: translateY(-1px);
}

.language-nav button.active {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(29, 78, 216, .22);
}

.language-nav button:focus-visible {
  outline: 3px solid rgba(59, 130, 246, .32);
  outline-offset: 2px;
}

.language-section[hidden] {
  display: none !important;
}

.language-label {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
}

h2 {
  margin: 28px 0 9px;
  color: var(--navy);
  font-size: 21px;
}

h3 {
  margin: 22px 0 8px;
  color: #1e3a5f;
  font-size: 17px;
}

p,
li {
  font-size: 15px;
  line-height: 1.7;
}

p {
  margin: 8px 0 12px;
}

ul {
  margin: 8px 0 14px;
  padding-left: 23px;
}

.notice {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid #f6c453;
  border-left: 5px solid #d97706;
  border-radius: 14px;
  background: var(--warning-bg);
  color: #713f12;
}

.notice strong {
  color: var(--warning);
}

.legal-footer {
  padding: 18px 12px 0;
  color: rgba(255, 255, 255, .82);
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
}

.legal-footer a {
  color: #dbeafe;
  font-weight: 800;
}

@media (max-width: 640px) {
  body {
    background-position: right top;
  }

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

  .back-link {
    width: 100%;
  }
}
