/* Styling for the static legal pages (privacy.html, terms.html). Loaded after
   landing.css, so it reuses that page's palette/tokens (--text, --dim, --line,
   --accent, --panel…) and its shared chrome (.header-band, header, .btn,
   footer). Light-theme only, matching landing.css - these pages never follow
   prefers-color-scheme. This file only adds the long-form document styles. */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 72px;
}

.legal-head {
  margin-bottom: 8px;
}
.legal-head h1 {
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  text-wrap: balance;
}
.legal-head .meta {
  font-size: 13px;
  color: var(--faint);
  letter-spacing: 0.02em;
}
.legal-head .lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--dim);
  margin: 18px 0 0;
}

/* Callout for the plain-English "in short" and the important controller note. */
.note-box {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 15px 18px;
  margin: 22px 0;
}
.note-box p {
  margin: 0;
  font-size: 15px;
  color: var(--dim);
}
.note-box p + p {
  margin-top: 8px;
}
.note-box strong {
  color: var(--text);
}

/* Table of contents. */
.toc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 28px 0 10px;
}
.toc h2 {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 12px;
  border: 0;
  padding: 0;
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  columns: 2;
  column-gap: 32px;
}
.toc li {
  counter-increment: toc;
  margin: 0 0 8px;
  break-inside: avoid;
}
.toc li a {
  text-decoration: none;
  color: var(--dim);
  font-size: 14.5px;
}
.toc li a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.toc li a::before {
  content: counter(toc, decimal-leading-zero);
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  margin-right: 10px;
  font-size: 12.5px;
}

/* Body sections. */
.legal section {
  padding-top: 34px;
}
.legal section h2 {
  font-size: 21px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  scroll-margin-top: 20px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.legal section h2 .n {
  font-size: 14px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.legal h3 {
  font-size: 16px;
  margin: 26px 0 6px;
  letter-spacing: -0.005em;
}
.legal p,
.legal li {
  color: var(--dim);
  font-size: 15.5px;
  line-height: 1.72;
}
.legal p {
  margin: 12px 0;
}
.legal strong {
  color: var(--text);
  font-weight: 650;
}
.legal ul,
.legal ol.body {
  margin: 12px 0;
  padding-left: 22px;
}
.legal li {
  margin: 7px 0;
}
.legal ul li::marker {
  color: var(--faint);
}

/* Subprocessor / data-sharing table. */
.legal .table-scroll {
  overflow-x: auto;
  margin: 18px 0;
}
.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 520px;
}
.legal th,
.legal td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--dim);
}
.legal thead th {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--line-strong, var(--line));
}
.legal td strong {
  color: var(--text);
}

/* Placeholders the operator must fill in before relying on these pages. */
.fill {
  background: #fff3cd;
  color: #7a5b00;
  border: 1px dashed #e0b400;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 0.94em;
  white-space: nowrap;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.legal-nav a {
  color: var(--dim);
  text-decoration: none;
}
.legal-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.legal-nav .sep {
  color: var(--faint);
}

.legal a {
  color: var(--accent);
  text-underline-offset: 2px;
}
.legal a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

@media (max-width: 560px) {
  .toc ol {
    columns: 1;
  }
}

/* ---------- support / contact form (help.html) ---------- */
/* Same light-only palette as the rest of these pages; plain stacked fields so
   the form works with no framework and no JS beyond the submit handler. */
.support-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}
.support-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.support-field > span {
  font-size: 14px;
  font-weight: 600;
}
.support-field em {
  font-style: normal;
  font-weight: 400;
  color: var(--faint);
}
.support-field input,
.support-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  /* Token, not #fff - these pages follow the shared light/dark theme. */
  background: var(--panel);
}
.support-field textarea {
  resize: vertical;
  min-height: 120px;
}
.support-field input:focus,
.support-field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.support-field input[readonly] {
  background: var(--panel2);
  color: var(--dim);
}
.support-turnstile {
  min-height: 0;
}
.support-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.support-status {
  font-size: 14px;
  color: var(--dim);
}
/* Readable on both grounds (the light greens/reds go muddy on dark). */
.support-status--ok {
  color: #1a7f4b;
  font-weight: 600;
}
.support-status--error {
  color: #c0392b;
  font-weight: 600;
}
:root[data-theme="dark"] .support-status--ok {
  color: #4ade80;
}
:root[data-theme="dark"] .support-status--error {
  color: #f87171;
}
