/* =============================================================
   LEGAL PAGES — Terms / Privacy / License Summary
   Long-form reading layout with strict typography hierarchy.
   ============================================================= */

.legal-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 64px 24px 96px;
  color: var(--cream);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 15.5px;
  line-height: 1.65;
}

.legal-page__hero {
  border-bottom: 1px solid var(--ink-line, rgba(245, 239, 224, 0.12));
  padding-bottom: 32px;
  margin-bottom: 36px;
}

.legal-page__kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--blue-bright, #2D52FF);
  margin-bottom: 14px;
  font-weight: 600;
  text-transform: uppercase;
}

.legal-page__title {
  font-family: "Anton", "Impact", sans-serif;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--cream);
  margin: 0 0 18px;
}

.legal-page__meta {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--cream-muted, rgba(245, 239, 224, 0.6));
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.legal-page__meta-sep {
  opacity: 0.4;
}

.legal-page__lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--cream);
  max-width: 70ch;
}

/* ── Plain-English summary box ───────────────────────────────── */
.legal-summary {
  background: rgba(45, 85, 184, 0.07);
  border: 1px solid rgba(45, 85, 184, 0.32);
  border-radius: 14px;
  padding: 24px 28px;
  margin: 32px 0 40px;
}

.legal-summary__kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--blue-bright, #2D52FF);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.legal-summary__title {
  font-family: "Anton", "Impact", sans-serif;
  font-size: 28px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--cream);
  margin: 0 0 16px;
}

.legal-summary__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-summary__list li {
  padding-left: 22px;
  position: relative;
  line-height: 1.55;
}

.legal-summary__list li::before {
  content: "›";
  color: var(--blue-bright, #2D52FF);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}

.legal-summary__note {
  font-size: 13px;
  color: var(--cream-muted, rgba(245, 239, 224, 0.6));
  margin: 18px 0 0;
  border-top: 1px solid rgba(45, 85, 184, 0.18);
  padding-top: 14px;
}

/* ── Table of contents ──────────────────────────────────────── */
.legal-toc {
  background: rgba(10, 18, 48, 0.5);
  border: 1px solid var(--ink-line, rgba(245, 239, 224, 0.12));
  border-radius: 12px;
  padding: 20px 24px;
  margin: 0 0 48px;
}

.legal-toc__title {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--cream-muted, rgba(245, 239, 224, 0.6));
  text-transform: uppercase;
  margin: 0 0 12px;
}

.legal-toc__list {
  columns: 2;
  column-gap: 28px;
  padding-left: 1.4em;
  margin: 0;
  font-size: 14px;
}

.legal-toc__list li {
  break-inside: avoid;
  margin-bottom: 6px;
}

.legal-toc__list a {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px dotted rgba(245, 239, 224, 0.25);
}

.legal-toc__list a:hover {
  color: var(--blue-bright, #2D52FF);
  border-bottom-color: var(--blue-bright, #2D52FF);
}

@media (max-width: 600px) {
  .legal-toc__list {
    columns: 1;
  }
}

/* ── Sections ──────────────────────────────────────────────── */
.legal-section {
  margin: 48px 0;
  scroll-margin-top: 24px;
}

.legal-section h2 {
  font-family: "Anton", "Impact", sans-serif;
  font-size: 32px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--cream);
  margin: 0 0 18px;
  border-bottom: 1px solid rgba(245, 239, 224, 0.18);
  padding-bottom: 10px;
}

.legal-section p {
  margin: 0 0 14px;
  max-width: 72ch;
}

.legal-section ul {
  margin: 0 0 18px;
  padding-left: 22px;
  max-width: 72ch;
}

.legal-section ul li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.legal-section a {
  color: var(--blue-bright, #2D52FF);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-section strong {
  color: var(--cream);
  font-weight: 700;
}

.legal-section em {
  font-style: italic;
  color: var(--cream);
}

/* ── Definitions list ──────────────────────────────────────── */
.legal-defs {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px 20px;
  margin: 16px 0 0;
  max-width: 72ch;
}

.legal-defs dt {
  font-weight: 700;
  color: var(--cream);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13.5px;
  padding-top: 1px;
}

.legal-defs dd {
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .legal-defs {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .legal-defs dt {
    margin-top: 12px;
  }
}

/* ── Footnote ──────────────────────────────────────────────── */
.legal-page__footnote {
  font-size: 12.5px;
  color: var(--cream-muted, rgba(245, 239, 224, 0.55));
  font-style: italic;
  border-top: 1px solid rgba(245, 239, 224, 0.12);
  padding-top: 20px;
  margin-top: 56px;
  max-width: 72ch;
}

/* =============================================================
   LICENSE SUMMARY page — 3-cell at-a-glance + table
   ============================================================= */

.license-glance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 32px 0 48px;
}

.license-glance__cell {
  padding: 22px 22px 24px;
  border-radius: 14px;
  border: 1px solid;
  background: rgba(10, 18, 48, 0.5);
}

.license-glance__cell--keep   { border-color: rgba(124, 196, 144, 0.45); }
.license-glance__cell--grant  { border-color: rgba(45, 85, 184, 0.55); }
.license-glance__cell--never  { border-color: rgba(255, 107, 95, 0.45); }

.license-glance__kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.license-glance__cell--keep  .license-glance__kicker { color: #7cc490; }
.license-glance__cell--grant .license-glance__kicker { color: var(--blue-bright, #2D52FF); }
.license-glance__cell--never .license-glance__kicker { color: #ff8a80; }

.license-glance__cell h2 {
  font-family: "Anton", "Impact", sans-serif;
  font-size: 22px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--cream);
  margin: 0 0 10px;
  line-height: 1.05;
}

.license-glance__cell p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--cream-muted, rgba(245, 239, 224, 0.78));
  margin: 0;
}

@media (max-width: 760px) {
  .license-glance {
    grid-template-columns: 1fr;
  }
}

/* ── License table ─────────────────────────────────────────── */
.license-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 0;
  font-size: 13.5px;
}

.license-table th,
.license-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(245, 239, 224, 0.10);
  line-height: 1.5;
}

.license-table thead th {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-bright, #2D52FF);
  border-bottom: 1px solid rgba(45, 85, 184, 0.4);
  background: rgba(45, 85, 184, 0.06);
}

.license-table tbody th {
  font-weight: 700;
  color: var(--cream);
  width: 32%;
}

@media (max-width: 720px) {
  .license-table,
  .license-table thead,
  .license-table tbody,
  .license-table tr,
  .license-table th,
  .license-table td {
    display: block;
    width: 100%;
  }
  .license-table thead {
    display: none;
  }
  .license-table tr {
    border-bottom: 1px solid rgba(245, 239, 224, 0.12);
    padding: 8px 0;
  }
  .license-table tbody th {
    padding-bottom: 4px;
  }
}
