:root {
  --blue-950: #06163b;
  --blue-900: #092252;
  --violet-800: #3a2a68;
  --red-600: #ef0011;
  --white: #ffffff;
  --ink: #14213d;
  --muted: #5b6478;
  --shadow: 0 22px 70px rgba(2, 10, 30, 0.18);
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f4f6fb;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  transform: translateY(-160%);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--white);
  color: var(--blue-900);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.legal-header {
  padding: 1rem 1rem 4.5rem;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 15%, rgba(239, 0, 17, 0.3), transparent 32%),
    linear-gradient(135deg, var(--blue-950), var(--violet-800));
}

.legal-nav,
.legal-hero,
.legal-main,
footer {
  width: min(1040px, 100%);
  margin-inline: auto;
}

.legal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.legal-nav img {
  display: block;
  width: min(38vw, 210px);
  height: auto;
  filter: brightness(0) invert(1);
}

.back-link {
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.back-link:hover,
.back-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.legal-hero {
  padding-top: 4.5rem;
}

.legal-hero > img {
  display: block;
  width: min(78vw, 380px);
  margin-bottom: 2rem;
}

.legal-hero span,
.eyebrow {
  display: block;
  color: #ff5865;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.legal-hero h1 {
  max-width: 850px;
  margin: 0.45rem 0 1rem;
  font-size: clamp(2.6rem, 10vw, 6.3rem);
  line-height: 0.93;
  text-transform: uppercase;
}

.legal-hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 700;
  line-height: 1.6;
}

.legal-main {
  padding: clamp(2rem, 6vw, 4.5rem) 1rem;
}

.terms-card,
.contact-card {
  border: 1px solid #e1e6f0;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.terms-card {
  padding: clamp(1.25rem, 4vw, 3.5rem);
}

.terms-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.4rem;
  border-bottom: 3px solid var(--red-600);
}

.terms-heading h2,
.contact-card h2 {
  margin: 0.35rem 0 0;
  color: var(--blue-900);
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1;
  text-transform: uppercase;
}

.terms-version {
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: #edf1f8;
  color: var(--blue-900);
  font-size: 0.72rem;
  font-weight: 900;
}

.terms-status {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.terms-status.is-error {
  color: #9d1020;
}

.terms-content {
  margin-top: 2rem;
  color: #303a50;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  font-weight: 600;
  line-height: 1.8;
  white-space: pre-wrap;
}

.contact-card {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  margin-top: 2rem;
  padding: clamp(1.4rem, 4vw, 2.5rem);
}

.contact-card p {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.6;
}

.contact-card a {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.2rem;
  border-radius: 8px;
  background: linear-gradient(180deg, #ff0b1d, #c90013);
  color: var(--white);
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem 3rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

footer p {
  margin: 0;
}

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

@media (min-width: 760px) {
  .contact-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media print {
  .legal-header {
    padding-bottom: 1.5rem;
    background: var(--white);
    color: var(--ink);
  }

  .legal-nav,
  .legal-hero > img,
  .contact-card,
  footer,
  .terms-status {
    display: none;
  }

  .legal-hero {
    padding-top: 1rem;
  }

  .legal-main {
    padding: 0;
  }

  .terms-card {
    border: 0;
    box-shadow: none;
  }
}
