:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #07111e;
  color: #edf7ff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 5%, rgba(62, 82, 145, .48) 0, transparent 32rem),
    radial-gradient(circle at 10% 78%, rgba(98, 34, 107, .28) 0, transparent 34rem),
    linear-gradient(150deg, #07111e, #11172a 65%, #0a101d);
}

a { color: #7ee9ff; }

a:hover,
a:focus-visible { color: #fff0ae; }

.legal-page {
  width: min(920px, calc(100% - 30px));
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 0 max(52px, env(safe-area-inset-bottom));
}

.legal-hero,
.legal-section,
.legal-summary {
  border: 1px solid rgba(167, 213, 255, .2);
  border-radius: 22px;
  background: rgba(12, 26, 42, .95);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .24);
}

.legal-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: clamp(20px, 4vw, 30px);
}

.legal-hero img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
}

.legal-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #7ee9ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  margin-bottom: 5px;
  color: #fff0ae;
  font-size: clamp(29px, 6vw, 44px);
  line-height: 1.02;
}

h2 {
  margin-bottom: 10px;
  color: #fff0ae;
  font-size: clamp(19px, 3.5vw, 23px);
}

h3 {
  margin-bottom: 7px;
  color: #edf7ff;
  font-size: 17px;
}

.legal-hero p,
.legal-muted { color: #9fb4c9; }

.legal-hero p { margin-bottom: 0; }

.legal-summary,
.legal-section {
  margin-top: 14px;
  padding: clamp(19px, 4vw, 30px);
}

.legal-summary {
  border-color: rgba(255, 219, 104, .34);
  background: linear-gradient(135deg, rgba(52, 41, 34, .96), rgba(20, 31, 50, .96));
}

.legal-summary strong { color: #fff0ae; }

p,
li,
td,
th {
  color: #c8d8e7;
  line-height: 1.65;
}

p:last-child,
ul:last-child,
ol:last-child { margin-bottom: 0; }

li + li { margin-top: 7px; }

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.legal-card {
  padding: 17px;
  border: 1px solid rgba(167, 213, 255, .14);
  border-radius: 15px;
  background: rgba(4, 14, 25, .55);
}

.legal-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(167, 213, 255, .15);
  border-radius: 15px;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: rgba(4, 14, 25, .52);
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(167, 213, 255, .12);
  text-align: left;
  vertical-align: top;
}

th {
  color: #fff0ae;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

tr:last-child td { border-bottom: 0; }

.legal-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.legal-nav a { font-weight: 800; }

.legal-contact {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 8px;
  padding: 0 18px;
  border-radius: 13px;
  color: #06111e;
  background: linear-gradient(135deg, #ffe47a, #ffac3e);
  font-weight: 900;
  text-decoration: none;
}

.legal-contact:hover,
.legal-contact:focus-visible { color: #06111e; filter: brightness(1.06); }

@media (max-width: 640px) {
  .legal-page { width: min(100% - 20px, 920px); }
  .legal-hero { align-items: flex-start; }
  .legal-hero img { width: 54px; height: 54px; border-radius: 14px; }
  .legal-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
