/* ==========================================================================
   Simple text pages: Privacy policy, Terms of use, 404
   A narrow reading column with a contents list beside it on wide screens.
   ========================================================================== */

.legal-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: clamp(48px, 7vw, 104px) var(--gutter) clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--color-line);
}

.legal-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: var(--stretch-display);
  font-weight: var(--weight-display);
  font-size: var(--heading-lg);
  line-height: 1.05;
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}

.legal-hero__lede {
  max-width: 640px;
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.35;
}

.legal-hero__meta {
  margin: 0;
}

/* ---- Contents + text ---- */
.legal {
  display: grid;
  grid-template-columns: minmax(0, .6fr) minmax(0, 1.4fr);
  align-items: start;
  gap: 40px clamp(32px, 6vw, 96px);
  padding: var(--section-y) var(--gutter);
}

.legal__toc {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.legal__toc ol {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.legal__toc li {
  counter-increment: toc;
}

.legal__toc a {
  display: inline-flex;
  gap: 12px;
  min-height: 32px;
  align-items: center;
  font-size: var(--text-sm);
  text-decoration: none;
}

.legal__toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-display);
  font-stretch: var(--stretch-display);
  font-weight: var(--weight-display);
  font-size: var(--text-num);
  color: var(--color-muted);
}

@media (hover: hover) and (pointer: fine) {
  .legal__toc a:hover { text-decoration: underline; text-underline-offset: 4px; }
}

.legal__body {
  max-width: 720px;
  font-size: var(--text-base);
  line-height: 1.7;
}

.legal__body section {
  padding: 28px 0;
  border-top: 1px solid var(--color-line);
  scroll-margin-top: 90px;
}

.legal__body section:first-child {
  padding-top: 0;
  border-top: 0;
}

.legal__body h2 {
  margin: 0 0 14px;
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.3;
}

.legal__body p,
.legal__body ul {
  margin: 0 0 14px;
}

.legal__body ul {
  padding-left: 20px;
}

.legal__body li + li {
  margin-top: 6px;
}

.legal__body a {
  text-underline-offset: 4px;
}

.legal__body strong {
  font-weight: 500;
}

.legal__body code {
  font-size: .92em;
}

/* "Change my cookie choice": a button that reads like a link
   (scripts/features/consent.js) */
.legal__inline-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* ---- 404 ---- */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  min-height: 60vh;
  justify-content: center;
  padding: var(--section-y) var(--gutter);
}

.not-found__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 900px) {
  .legal { grid-template-columns: 1fr; }
  .legal__toc { position: static; }
}
