/* ============================================================
   Rundown — legal page styling
   Shared by every generated policy page (terms, privacy, etc).
   Generated pages come from scripts/build-legal-site.js; this
   file is hand-maintained and safe to edit.
   ============================================================ */

.legal {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(120px, 16vh, 180px) clamp(20px, 5vw, 40px) clamp(80px, 12vh, 120px);
  position: relative;
  z-index: 2;
}

.legal__head { margin-bottom: 40px; }

.legal__head h1 {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1.02;
  letter-spacing: .01em;
  text-transform: uppercase;
  background: var(--grad-sunset);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}

/* ---------------------------------------------------- contents */

.legal__toc {
  margin: 36px 0 8px;
  padding: 22px 24px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(8px);
}

.legal__toc h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}

.legal__toc ol { list-style: none; display: grid; gap: 8px; }
.legal__toc a {
  color: var(--mute);
  font-weight: 500;
  font-size: .96rem;
  transition: color .2s ease;
}
.legal__toc a:hover { color: var(--white); }

/* ---------------------------------------------------- body */

.legal section { margin-top: 44px; scroll-margin-top: 96px; }

.legal h2.legal__h {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(1.25rem, 3.4vw, 1.6rem);
  line-height: 1.25;
  margin-bottom: 14px;
  color: var(--white);
}

.legal h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.04rem;
  margin: 22px 0 8px;
  color: var(--yellow);
}

.legal h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: .98rem;
  margin: 18px 0 6px;
  color: var(--cyan);
}

.legal p {
  color: rgba(255, 255, 255, .78);
  margin-bottom: 14px;
  line-height: 1.72;
}

.legal ul {
  margin: 0 0 16px 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.legal ul li {
  position: relative;
  padding-left: 26px;
  color: rgba(255, 255, 255, .78);
  line-height: 1.65;
}

.legal ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-ocean);
  box-shadow: 0 0 10px rgba(0, 213, 255, .55);
}

.legal strong { color: var(--white); font-weight: 600; }
.legal em { color: rgba(255, 255, 255, .9); font-style: italic; }

.legal a.inline {
  color: var(--cyan);
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 213, 255, .4);
  transition: color .2s ease, border-color .2s ease;
}
.legal a.inline:hover { color: var(--aqua); border-color: var(--aqua); }

/* ---------------------------------------------------- tables
   The header block of each policy is a two-column table; long
   fee schedules also appear as tables. Wrap so they scroll on
   narrow screens instead of forcing the page sideways. */

.legal__tablewrap {
  margin: 20px 0 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .03);
}

.legal__table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

.legal__table th,
.legal__table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  color: rgba(255, 255, 255, .78);
  line-height: 1.6;
  border-bottom: 1px solid var(--line);
}

.legal__table tr:last-child th,
.legal__table tr:last-child td { border-bottom: 0; }

.legal__table th {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
}

.legal__table td:first-child { color: var(--white); font-weight: 500; }
.legal__table strong { color: var(--white); }

/* ---------------------------------------------------- back link */

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  font-weight: 700;
  color: var(--mute);
  font-size: .95rem;
  transition: color .2s ease;
}
.legal__back:hover { color: var(--white); }

/* ---------------------------------------------------- footer links */

.footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 18px auto 6px;
  max-width: 640px;
}

.footer__legal-links a {
  color: var(--mute);
  font-size: .86rem;
  font-weight: 500;
  transition: color .2s ease;
}
.footer__legal-links a:hover { color: var(--white); }
