:root {
  color-scheme: dark;
  --page: #030914;
  --surface: #101b2c;
  --surface-soft: #16253b;
  --text: #fffaf2;
  --muted: #c8d0dc;
  --line: rgba(255, 255, 255, .15);
  --navy: #07172d;
  --blue: #123d6a;
  --red: #c62832;
  --gold: #d5aa42;
  --ivory: #f7f1df;
  --shadow: 0 24px 70px rgba(0, 0, 0, .36);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 0%, rgba(198, 40, 50, .2), transparent 28rem),
    radial-gradient(circle at 86% 6%, rgba(213, 170, 66, .14), transparent 24rem),
    linear-gradient(180deg, #030914, var(--navy) 34rem, #08111f);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.68;
}

a { color: #78dff4; }

.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 100;
  transform: translateY(-150%);
  border-radius: 8px;
  padding: .75rem 1rem;
  color: var(--navy);
  background: var(--ivory);
  font-weight: 900;
}

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

.legal-header,
.legal-main,
.legal-footer {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

.legal-header {
  min-height: 82px;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 0;
}

.legal-brand {
  display: inline-flex;
  gap: .75rem;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.legal-brand-mark {
  min-width: 54px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  padding: 0 .55rem;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #78141e);
  font-size: .8rem;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(198, 40, 50, .2);
}

.legal-brand strong,
.legal-brand small { display: block; }
.legal-brand small { color: var(--muted); font-size: .82rem; }

.legal-nav {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.legal-nav a,
.footer-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 .85rem;
  color: var(--text);
  background: rgba(255, 255, 255, .055);
  text-decoration: none;
  font-weight: 800;
}

.legal-nav a[aria-current="page"] { border-color: rgba(213, 170, 66, .72); color: var(--gold); }

.legal-main {
  margin-top: 1.6rem;
  margin-bottom: 2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(18, 61, 106, .17), rgba(198, 40, 50, .06)), var(--surface);
  box-shadow: var(--shadow);
}

.legal-hero {
  padding: clamp(1.4rem, 5vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(198, 40, 50, .13), rgba(213, 170, 66, .08));
}

.legal-content { padding: clamp(1.4rem, 5vw, 3rem); }

.eyebrow,
.meta {
  margin: 0 0 .7rem;
  color: var(--gold);
  font-size: .82rem;
  font-weight: 950;
  text-transform: uppercase;
}

h1, h2, h3 { line-height: 1.16; }
h1 { max-width: 780px; margin: 0 0 1rem; font-size: clamp(2.25rem, 8vw, 4.5rem); }
h2 { margin: 2.1rem 0 .6rem; color: var(--ivory); font-size: clamp(1.35rem, 4vw, 1.8rem); }
h3 { color: var(--gold); }
p, li { color: var(--muted); }
li { margin: .45rem 0; }

.notice {
  margin: 1rem 0;
  border: 1px solid rgba(213, 170, 66, .38);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(213, 170, 66, .08);
}

.notice.danger {
  border-color: rgba(198, 40, 50, .48);
  border-left-color: var(--red);
  background: rgba(198, 40, 50, .09);
}

.document-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .8rem;
  margin-top: 1rem;
}

.document-links a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  color: var(--text);
  background: rgba(255, 255, 255, .045);
  text-decoration: none;
  font-weight: 850;
}

form {
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(255, 255, 255, .04);
}

label { display: block; margin: .85rem 0 .35rem; color: var(--ivory); font-weight: 800; }
input, button { width: 100%; min-height: 48px; border-radius: 8px; padding: .75rem .9rem; font: inherit; }
input { border: 1px solid rgba(255, 255, 255, .25); color: var(--text); background: #07111f; }
input:focus { border-color: var(--gold); outline: 2px solid rgba(213, 170, 66, .22); }
button { margin-top: 1rem; border: 0; color: #fff; background: linear-gradient(135deg, var(--red), #821621); font-weight: 900; cursor: pointer; }
button:hover, button:focus-visible { filter: brightness(1.08); }
button:disabled { opacity: .62; cursor: wait; }

output {
  display: block;
  min-height: 58px;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .9rem;
  color: var(--muted);
  background: #07111f;
  white-space: pre-wrap;
}

output[data-kind="success"] { border-color: rgba(85, 216, 255, .55); color: #dff9ff; }
output[data-kind="error"] { border-color: rgba(255, 115, 128, .64); color: #ffdfe3; }

.legal-footer {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 1rem 0 2.5rem;
  color: var(--muted);
}

.footer-links { display: flex; gap: .5rem; flex-wrap: wrap; }

@media (max-width: 720px) {
  .legal-header { align-items: flex-start; flex-direction: column; }
  .legal-nav { width: 100%; }
  .legal-nav a { flex: 1 1 auto; }
  .legal-main { margin-top: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
