/*
 * WheelWage legal surfaces
 *
 * The shared site shell supplies the global brand primitives. This file keeps
 * the reading surfaces deliberately quiet: cool-white paper, evergreen ink,
 * mint wayfinding, and a restrained blue focus state.
 */

.legal-page {
  --legal-page: #f7faf9;
  --legal-surface: #ffffff;
  --legal-surface-tint: #eff8f1;
  --legal-ink: #102f28;
  --legal-muted: #47645b;
  --legal-evergreen: #174d3c;
  --legal-mint: #d8f4de;
  --legal-blue: #335bea;
  --legal-line: #cfe0da;
  --legal-line-strong: #a9c5b9;
  --legal-shadow: 0 18px 42px rgba(16, 47, 40, 0.08);
  background: var(--legal-page);
  color: var(--legal-ink);
  color-scheme: light;
  font-family: var(--font-sans, "Manrope", "Avenir Next", "Helvetica Neue", Arial, sans-serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.legal-page,
.legal-page * {
  box-sizing: border-box;
}

.legal-page .site-header {
  border-bottom: 1px solid var(--legal-line);
  background: rgba(247, 250, 249, 0.96);
}

.legal-page .header-inner.shell,
.legal-page .legal-main.shell,
.legal-page .site-footer .shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.legal-page .header-inner.shell {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.legal-page .brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  color: var(--legal-ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.legal-page .brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.legal-page .simple-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.legal-page .simple-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--legal-muted);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.legal-page .simple-nav a:hover {
  border-color: var(--legal-line);
  background: var(--legal-surface);
  color: var(--legal-evergreen);
}

.legal-page a {
  color: var(--legal-evergreen);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.legal-page a:focus-visible {
  outline: 3px solid var(--legal-blue);
  outline-offset: 4px;
}

.legal-page .skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 9px;
  background: var(--legal-ink);
  color: #ffffff;
  transform: translateY(-160%);
}

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

.legal-page .legal-main {
  padding: 74px 0 104px;
}

.legal-page .eyebrow {
  margin: 0 0 15px;
  color: var(--legal-evergreen);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.legal-page h1,
.legal-page h2,
.legal-page h3 {
  color: var(--legal-ink);
  text-wrap: balance;
}

.legal-page h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 820;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.legal-page .lede {
  max-width: 64ch;
  margin: 24px 0 0;
  color: var(--legal-muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.62;
}

.legal-page .meta {
  max-width: 78ch;
  margin: 30px 0 0;
  padding: 17px 19px;
  border: 1px solid var(--legal-line);
  border-radius: 12px;
  background: var(--legal-surface-tint);
  color: var(--legal-ink);
  font-size: 14px;
  line-height: 1.65;
}

.legal-page strong {
  color: var(--legal-ink);
  font-weight: 780;
}

.legal-page .legal-document {
  max-width: 850px;
  margin: 54px 0 0;
  padding: clamp(25px, 5vw, 58px);
  border: 1px solid var(--legal-line);
  border-radius: 18px;
  background: var(--legal-surface);
  box-shadow: var(--legal-shadow);
}

.legal-page .legal-document h2 {
  margin: 40px 0 13px;
  padding-top: 30px;
  border-top: 1px solid var(--legal-line);
  font-size: clamp(21px, 2vw, 27px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.legal-page .legal-document h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.legal-page .legal-document h3 {
  margin: 28px 0 9px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
}

.legal-page .legal-document p,
.legal-page .legal-document li,
.legal-page .support-content p,
.legal-page .support-content li {
  color: var(--legal-muted);
  font-size: 16px;
  line-height: 1.76;
}

.legal-page .legal-document p,
.legal-page .support-content p {
  margin: 0 0 15px;
}

.legal-page .legal-document ul,
.legal-page .legal-document ol,
.legal-page .support-content ul,
.legal-page .support-content ol {
  margin: 10px 0 20px;
  padding-left: 24px;
}

.legal-page .legal-document li + li,
.legal-page .support-content li + li {
  margin-top: 9px;
}

.legal-page .legal-document a,
.legal-page .support-content a {
  font-weight: 750;
}

.legal-page .legal-main--support .lede {
  max-width: 56ch;
}

.legal-page .legal-quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 42px;
}

.legal-page .legal-quick-links a {
  min-height: 76px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 17px;
  border: 1px solid var(--legal-line);
  border-radius: 13px;
  background: var(--legal-surface);
  color: var(--legal-ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.legal-page .legal-quick-links a::after {
  content: "↗";
  color: var(--legal-evergreen);
  font-size: 18px;
  line-height: 1;
}

.legal-page .legal-quick-links a:hover {
  border-color: var(--legal-line-strong);
  background: var(--legal-mint);
  transform: translateY(-2px);
}

.legal-page .support-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
  margin-top: 26px;
}

.legal-page .support-content > section {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--legal-line);
  border-radius: 16px;
  background: var(--legal-surface);
  box-shadow: 0 12px 30px rgba(16, 47, 40, 0.045);
  scroll-margin-top: 24px;
}

.legal-page .support-content > section.full {
  grid-column: 1 / -1;
}

.legal-page .support-content > section:target {
  border-color: var(--legal-line-strong);
  box-shadow: 0 0 0 4px rgba(216, 244, 222, 0.75);
}

.legal-page .support-content h2 {
  margin: 0 0 13px;
  font-size: clamp(21px, 2vw, 27px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.legal-page .support-content .notice {
  margin-top: 20px;
  padding: 15px 17px;
  border: 1px solid var(--legal-line-strong);
  border-radius: 11px;
  background: var(--legal-mint);
  color: var(--legal-ink);
}

.legal-page .site-footer {
  border-top: 1px solid var(--legal-line);
  background: var(--legal-surface);
  color: var(--legal-muted);
  font-size: 13px;
}

.legal-page .site-footer .footer-inner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}

.legal-page .site-footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--legal-evergreen);
  font-weight: 700;
}

@media (max-width: 860px) {
  .legal-page .legal-quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .legal-page .header-inner.shell,
  .legal-page .legal-main.shell,
  .legal-page .site-footer .shell {
    width: calc(100% - 28px);
  }

  .legal-page .header-inner.shell {
    min-height: 72px;
    align-items: flex-start;
    padding: 14px 0;
  }

  .legal-page .simple-nav {
    max-width: 62%;
    gap: 2px;
  }

  .legal-page .simple-nav a {
    padding-inline: 9px;
  }

  .legal-page .legal-main {
    padding: 54px 0 76px;
  }

  .legal-page .legal-document {
    margin-top: 42px;
    padding: 25px 21px 31px;
    border-radius: 15px;
  }

  .legal-page .support-content {
    grid-template-columns: 1fr;
  }

  .legal-page .support-content > section.full {
    grid-column: auto;
  }

  .legal-page .support-content > section {
    padding: 23px 21px;
  }

  .legal-page .site-footer .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    padding: 22px 0;
  }
}

@media (max-width: 500px) {
  .legal-page .header-inner.shell {
    align-items: flex-start;
  }

  .legal-page .brand {
    font-size: 16px;
  }

  .legal-page .simple-nav {
    max-width: 54%;
  }

  .legal-page .simple-nav a {
    min-height: 40px;
    padding: 6px 7px;
    font-size: 13px;
  }

  .legal-page h1 {
    font-size: clamp(38px, 14vw, 56px);
  }

  .legal-page .legal-quick-links {
    grid-template-columns: 1fr;
  }

  .legal-page .legal-quick-links a {
    min-height: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-page .legal-quick-links a {
    transition: none;
  }
}

/* Keep the shared legal navigation on one line on narrow phones. */
@media (max-width: 500px) {
  .legal-page .header-inner.shell { align-items: center; gap: 8px; }
  .legal-page .brand { gap: 6px; }
  .legal-page .brand img { width: 28px; height: 28px; }
  .legal-page .brand span { font-size: 16px; }
  .legal-page .simple-nav { flex-wrap: nowrap; max-width: none; gap: 0; }
  .legal-page .simple-nav a { min-height: 44px; padding-inline: 6px; font-size: 12px; }
}
