/* Legal pages — rendered from apps/frontend/content/legal by tools/build-legal.
   Dark surface, one measure, no ornament. Reuses the cookie plate's palette so
   the legal copy reads as the same family as the consent dialog.

   These pages load only colors.css, so the font tokens are declared here rather
   than inherited from landing.css. */

:root {
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --title: "Instrument Sans", sans-serif;
}

html {
  background: var(--night);
  color-scheme: dark;
}

body {
  margin: 0;
  padding: clamp(24px, 5vw, 64px) 16px;
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ck-lead);
  background: var(--night);
}

.legal {
  max-width: 720px;
  margin: 0 auto;
}

/* --- Back link (top and bottom) --- */
.legal-back {
  margin: 0 0 22px;
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 13px;
}

.legal-back a {
  color: var(--ck-copy);
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.legal-back a:hover,
.legal-back a:focus-visible {
  opacity: 1;
  color: var(--ck-ink);
}

/* --- Nav --- */
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 0 0 34px;
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 13px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ck-copy);
}

.legal-nav a {
  color: var(--ck-copy);
  text-decoration: none;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  opacity: 0.5;
  transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.legal-nav a:hover,
.legal-nav a:focus-visible {
  opacity: 1;
  color: var(--ck-ink);
  border-bottom-color: var(--ck-ink);
}

.legal-nav a:first-child {
  color: var(--ck-ink);
  font-weight: 500;
}

/* --- Document --- */
.legal-doc h1 {
  font-family: var(--title, "Instrument Sans", sans-serif);
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ck-ink);
  margin: 0 0 8px;
}

.legal-doc h2 {
  font-family: var(--title, "Instrument Sans", sans-serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ck-ink);
  margin: 40px 0 10px;
}

.legal-doc h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ck-ink);
  margin: 26px 0 8px;
}

.legal-doc p {
  margin: 0 0 14px;
}

/* The effective-date line sits right under the title. */
.legal-doc h1 + p strong {
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ck-copy);
}

.legal-doc strong {
  color: var(--ck-ink);
  font-weight: 600;
}

.legal-doc a {
  color: var(--ck-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-doc a:hover {
  color: #fff;
}

.legal-doc ul,
.legal-doc ol {
  margin: 0 0 16px;
  padding-left: 20px;
}

.legal-doc li {
  margin: 0 0 6px;
}

.legal-doc li::marker {
  color: var(--ck-copy);
}

.legal-doc blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 2px solid var(--coral, #ff6f4a);
  background: var(--ck);
  border-radius: 0 8px 8px 0;
  color: var(--ck-lead);
}

.legal-doc blockquote p:last-child {
  margin-bottom: 0;
}

.legal-doc hr {
  height: 0;
  margin: 34px 0;
  border: 0;
  border-top: 1px solid var(--ck);
}

.legal-doc table {
  width: 100%;
  margin: 16px 0 22px;
  border-collapse: collapse;
  font-size: 14px;
}

.legal-doc th,
.legal-doc td {
  padding: 8px 10px;
  border: 1px solid var(--ck);
  text-align: left;
  vertical-align: top;
}

.legal-doc th {
  background: var(--ck);
  color: var(--ck-ink);
  font-weight: 500;
}

.legal-doc code {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.92em;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--ck);
  color: var(--ck-ink);
}

/* --- Footer --- */
.legal-foot {
  margin: 44px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--ck);
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 13px;
}

.legal-foot a {
  color: var(--ck-copy);
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.legal-foot a:hover,
.legal-foot a:focus-visible {
  opacity: 1;
  color: var(--ck-ink);
}

@media (max-width: 500px) {
  body {
    font-size: 14.5px;
  }

  .legal-doc h2 {
    margin-top: 32px;
  }

  .legal-doc table {
    font-size: 13px;
  }

  .legal-doc th,
  .legal-doc td {
    padding: 6px 7px;
  }
}
