/* Legal pages (Privacy, Terms, Security, Subprocessors), 2026-10-08.
   The inner-page language of about.html (Inter, the interior-dusk ground, a
   luminous field behind the title) carried into a long reading page: a
   centered header, a sticky contents rail on wide screens, and a measured
   prose column. Loaded after styles.css by the four legal pages only. */
body.legal-page {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* The header turns solid once the reader scrolls (site.js watches this). */
.top-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 24px;
  pointer-events: none;
}
/* Long page: content starts under the fixed header instead of centering, and
   the dusk atmosphere covers the first screen only, fading into Nocturne. */
.legal-screen {
  justify-content: flex-start;
  padding-top: 132px;
  padding-bottom: 120px;
  /* .screen clips with overflow: hidden, which would stop the contents rail
     from sticking; clip still trims the glow without creating a scroller. */
  overflow: visible;
  overflow: clip;
}
.legal-screen .screen-bg {
  bottom: auto;
  height: max(100svh, 860px);
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent);
  mask-image: linear-gradient(180deg, #000 62%, transparent);
}
.legal-screen:after {
  bottom: auto;
  height: max(100svh, 860px);
}
.legal-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 620px;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.legal-glow .brand-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.legal-head {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
}
.legal-head .eyebrow {
  justify-content: center;
}
.legal-title {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  text-wrap: balance;
  text-shadow: 0 2px 40px rgba(0, 3, 15, 0.55);
}
.legal-meta {
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 0.01em;
}
.legal-lede {
  margin: 22px auto 0;
  max-width: 40em;
  color: var(--text-secondary);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.6;
}
/* The four legal documents as one quiet pill, matching the header nav. */
.legal-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 30px auto 0;
  padding: 6px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(9, 14, 30, 0.5), rgba(5, 9, 20, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.legal-tabs a {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition:
    color 160ms var(--ease-out),
    background 160ms var(--ease-out);
}
.legal-tabs a[aria-current="page"] {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}
@media (hover: hover) and (pointer: fine) {
  .legal-tabs a:hover {
    color: var(--text-primary);
  }
}
/* Body: contents rail on the left, the document on the right. */
.legal-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  justify-content: center;
  gap: 64px;
  margin-top: 72px;
}
.legal-toc {
  position: sticky;
  top: 108px;
  align-self: start;
  padding-top: 6px;
}
.legal-toc p {
  margin: 0 0 14px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--divider);
}
.legal-toc a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 16px;
  border-left: 1px solid transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.4;
  text-decoration: none;
  transition:
    color 160ms var(--ease-out),
    border-color 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .legal-toc a:hover {
    color: var(--text-primary);
    border-left-color: var(--gold);
  }
}
.legal-doc {
  color: var(--text-secondary);
  font-size: 16.5px;
  line-height: 1.72;
}
.legal-doc section {
  scroll-margin-top: 100px;
}
.legal-doc section + section {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--divider);
}
.legal-doc h2 {
  margin: 0 0 16px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(21px, 1.8vw, 25px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.legal-doc h3 {
  margin: 28px 0 10px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.legal-doc p {
  margin: 0 0 16px;
}
.legal-doc p:last-child,
.legal-doc ul:last-child {
  margin-bottom: 0;
}
.legal-doc ul {
  margin: 0 0 16px;
  padding-left: 20px;
}
.legal-doc li {
  margin: 0 0 8px;
  padding-left: 4px;
}
.legal-doc li::marker {
  color: var(--gold);
}
.legal-doc strong {
  color: var(--text-primary);
  font-weight: 600;
}
.legal-doc a {
  color: var(--blue-300);
  text-decoration: underline;
  text-decoration-color: rgba(121, 166, 255, 0.4);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
@media (hover: hover) and (pointer: fine) {
  .legal-doc a:hover {
    color: var(--blue-200);
    text-decoration-color: currentColor;
  }
}
.legal-doc address {
  margin: 0 0 16px;
  font-style: normal;
}
/* A quiet callout for the one thing a reader must not miss on a page. */
.legal-note {
  margin: 0 0 20px;
  padding: 18px 20px;
  border: 1px solid var(--hairline-blue);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(37, 99, 255, 0.07), rgba(37, 99, 255, 0.02));
  color: var(--text-secondary);
}
/* Tables: hairline rows on wide screens, stacked cards on phones. */
.legal-table {
  width: 100%;
  margin: 8px 0 20px;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.55;
}
.legal-table th {
  padding: 0 14px 12px 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-align: left;
  text-transform: uppercase;
  vertical-align: bottom;
  border-bottom: 1px solid var(--border-medium);
}
.legal-table td {
  padding: 14px 14px 14px 0;
  vertical-align: top;
  border-bottom: 1px solid var(--divider);
}
.legal-table td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}
.legal-table td .sub {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 13.5px;
}
.phi {
  display: inline-block;
  font-weight: 600;
}
.phi-yes {
  color: var(--gold-bright);
}
.phi-no,
.phi-info {
  color: var(--text-primary);
}
/* A longer lead-in: let the sentence after it flow on the same line. */
.phi-info {
  display: inline;
}
/* A table that ends its section: the section divider closes it, not a second rule. */
.legal-doc section > .legal-table:last-child {
  margin-bottom: 0;
}
.legal-doc section > .legal-table:last-child tr:last-child,
.legal-doc section > .legal-table:last-child tr:last-child td {
  border-bottom: 0;
}
@media (max-width: 1080px) {
  .legal-body {
    grid-template-columns: minmax(0, 760px);
    margin-top: 56px;
  }
  .legal-toc {
    display: none;
  }
}
@media (max-width: 860px) {
  .legal-screen {
    padding-top: 112px;
    padding-bottom: 0;
  }
  .legal-head {
    text-align: left;
  }
  .legal-head .eyebrow {
    justify-content: flex-start;
  }
  .legal-lede {
    margin-left: 0;
  }
  /* Four tabs do not fit one row on a phone: a tidy two-by-two grid. */
  .legal-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 360px;
    border-radius: 20px;
    padding: 6px;
  }
  .legal-tabs a {
    padding: 9px 12px;
    font-size: 14px;
    text-align: center;
  }
  .legal-body {
    margin-top: 44px;
  }
  /* Line the stacked footer up with the left-aligned text column. */
  .legal-screen .screen-foot {
    margin-inline: clamp(20px, 4vw, 40px);
  }
  .legal-doc {
    font-size: 16px;
  }
  .legal-doc section + section {
    margin-top: 36px;
    padding-top: 32px;
  }
  .legal-table thead {
    display: none;
  }
  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table td {
    display: block;
    width: 100%;
  }
  .legal-table tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--divider);
  }
  .legal-table td {
    padding: 3px 0;
    border: 0;
  }
  .legal-table td[data-label]:not(:first-child):before {
    content: attr(data-label);
    display: block;
    margin-top: 8px;
    color: var(--text-faint);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
}
/* Both subprocessor tables share one column grid so they line up. */
@media (min-width: 861px) {
  .sub-table {
    table-layout: fixed;
  }
  .sub-table th:nth-child(1) {
    width: 21%;
  }
  .sub-table th:nth-child(2) {
    width: 27%;
  }
  .sub-table th:nth-child(3) {
    width: 20%;
  }
  .sub-table th:nth-child(4) {
    width: 32%;
  }
}
.legal-doc .nowrap {
  white-space: nowrap;
}
