/* Reefly — Legal/document pages */
.legal-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  background: color-mix(in oklab, var(--navy) 78%, transparent);
  border-bottom: 1px solid var(--navy-line);
}
body.mood-rh .legal-nav, body.mood-editorial .legal-nav {
  background: color-mix(in oklab, var(--paper) 78%, transparent);
}
.legal-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 80px 32px 120px;
}
@media (max-width: 720px) { .legal-wrap { padding: 56px 20px 80px; } }

.legal-head { border-bottom: 1px solid var(--navy-line); padding-bottom: 40px; margin-bottom: 12px; }
.legal-head h1 {
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-weight: 500;
  margin-top: 20px;
  text-wrap: balance;
}
.legal-meta {
  display: flex; gap: 24px; flex-wrap: wrap;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.legal-meta strong { color: var(--cyan); font-weight: 500; }

.legal-intro {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  margin: 40px 0;
  text-wrap: pretty;
}

/* TOC */
.legal-toc {
  border: 1px solid var(--navy-line);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 40px 0 56px;
  background: var(--navy-2);
}
body.mood-rh .legal-toc, body.mood-editorial .legal-toc { background: transparent; }
.legal-toc h4 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); font-weight: 400; margin-bottom: 16px;
}
.legal-toc ol {
  margin: 0; padding: 0; list-style: none;
  columns: 2; column-gap: 32px;
}
@media (max-width: 600px) { .legal-toc ol { columns: 1; } }
.legal-toc li {
  padding: 6px 0;
  font-size: 14px;
  counter-increment: toc;
  break-inside: avoid;
}
.legal-toc a { color: inherit; display: flex; gap: 10px; }
.legal-toc a:hover { color: var(--cyan); }
.legal-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 12px; color: var(--cyan);
  flex-shrink: 0;
}
.legal-toc ol { counter-reset: toc; }

/* Sections */
.legal-section {
  padding: 40px 0;
  border-top: 1px solid var(--navy-line);
  scroll-margin-top: 80px;
}
.legal-section h2 {
  font-size: 24px;
  letter-spacing: -0.02em;
  font-weight: 500;
  display: flex;
  gap: 14px;
  align-items: baseline;
  text-wrap: balance;
}
.legal-section h2 .num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--cyan);
  flex-shrink: 0;
}
.legal-section h3 {
  font-size: 17px;
  font-weight: 500;
  margin: 28px 0 10px;
  letter-spacing: -0.01em;
}
.legal-section p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--muted);
  margin: 14px 0;
  margin-left: 28px;
  text-wrap: pretty;
}
.legal-section > h2 + p { margin-top: 18px; }
.legal-section ul {
  margin: 14px 0 14px 28px;
  padding: 0;
  list-style: none;
}
.legal-section li {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
  padding: 7px 0 7px 22px;
  position: relative;
}
.legal-section li::before {
  content: "";
  position: absolute;
  left: 0; top: 14px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.6;
}
.legal-section li strong, .legal-section p strong { color: inherit; font-weight: 600; }
body:not(.mood-rh):not(.mood-editorial) .legal-section li strong,
body:not(.mood-rh):not(.mood-editorial) .legal-section p strong { color: #fff; }

.legal-table {
  margin: 20px 0 20px 28px;
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.legal-table-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  border-bottom: 1px solid var(--navy-line);
}
.legal-table-row:last-child { border-bottom: 0; }
.legal-table-row > div { padding: 14px 18px; font-size: 14.5px; line-height: 1.5; }
.legal-table-row > div:first-child {
  font-weight: 500;
  border-right: 1px solid var(--navy-line);
  background: var(--navy-2);
}
body.mood-rh .legal-table-row > div:first-child,
body.mood-editorial .legal-table-row > div:first-child { background: transparent; }
.legal-table-row > div:last-child { color: var(--muted); }
.legal-table-head > div {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); font-weight: 400 !important;
}
@media (max-width: 560px) {
  .legal-table-row { grid-template-columns: 1fr; }
  .legal-table-row > div:first-child { border-right: 0; border-bottom: 1px solid var(--navy-line); }
}

.legal-callout {
  margin: 24px 0 24px 28px;
  border-left: 2px solid var(--cyan);
  padding: 16px 20px;
  background: color-mix(in oklab, var(--cyan) 6%, transparent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.legal-callout p { margin: 0 0 0 0; color: inherit; font-size: 14.5px; }

.legal-contact {
  margin-top: 56px;
  border: 1px solid var(--navy-line);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: var(--navy-2);
}
body.mood-rh .legal-contact, body.mood-editorial .legal-contact { background: transparent; }
.legal-contact h3 { font-size: 18px; font-weight: 500; margin-bottom: 6px; }
.legal-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
@media (max-width: 560px) { .legal-contact-grid { grid-template-columns: 1fr; } }
.legal-contact-item .k {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.legal-contact-item .v { font-size: 15px; }
.legal-contact-item .v a { color: var(--cyan); }

.legal-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em;
  color: var(--muted);
}
.legal-back:hover { color: var(--cyan); }
