/* ══ LEGAL PAGES ═══════════════════════════════════════════════════════════
   Privacy policy and anything else that is long-form prose rather than a
   sales page.

   Two decisions drive everything below:

   1. A privacy policy is READ BY SOMEONE WHO IS WORRIED. A landlord who
      wants their data removed, or a broker checking where the records sit,
      arrives here mid-problem. So the page optimises for finding an answer
      fast — narrow measure, real hierarchy, a table of contents that works
      — rather than for looking impressive.

   2. It uses the SAME tokens as the landing page (--panel, --edge, --ink,
      --accent). Nothing here hardcodes a colour, so the footer theme picker
      keeps working and a future theme cannot leave this page unreadable
      while every other page follows along. */

/* A narrower shell than the marketing grid. Long prose at 1180px is
   genuinely harder to read — the eye loses the line on the way back. */
.shell-narrow {
  max-width: 780px;
}

.legal {
  padding: 56px 0 96px;
}

/* ── Head ──────────────────────────────────────────────────────────────── */

.legal-head {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--edge-soft, var(--edge));
}

.legal-head h1 {
  margin: 10px 0 16px;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.legal-lede {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-dim);
}

/* Updated-date and scope, side by side, wrapping to stacked on narrow. */
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--ink-faint);
}
.legal-meta strong {
  color: var(--ink-dim);
  font-weight: 600;
}

/* ── The short version ─────────────────────────────────────────────────── */

.legal-summary {
  margin: 34px 0 0;
  padding: 26px 28px;
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg, 16px);
  background: var(--panel);
  /* A quiet accent edge so the summary reads as a pull-out rather than as
     another section competing with the real terms below it. */
  border-left: 3px solid var(--accent);
}
.legal-summary h2 {
  margin: 0 0 14px;
  font-size: 15px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.legal-summary ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}
.legal-summary li {
  position: relative;
  padding-left: 24px;
  line-height: 1.6;
  color: var(--ink);
}
/* Drawn, not a bullet glyph: a real check reads as "this is the promise"
   where a disc reads as "this is a list". */
.legal-summary li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--accent-bright, var(--accent));
  border-bottom: 2px solid var(--accent-bright, var(--accent));
  transform: rotate(-45deg);
}
.legal-note {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--ink-faint);
}

/* ── Table of contents ─────────────────────────────────────────────────── */

.legal-toc {
  margin: 30px 0 0;
  padding: 22px 26px;
  border: 1px solid var(--edge-soft, var(--edge));
  border-radius: var(--radius-lg, 16px);
  background: var(--panel-raised, var(--panel));
}
.toc-k {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 26px;
}
.legal-toc li {
  counter-increment: toc;
}
.legal-toc a {
  display: inline-flex;
  gap: 9px;
  font-size: 14px;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 160ms var(--ease, ease);
}
.legal-toc a::before {
  content: counter(toc) ".";
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: var(--accent-bright, var(--accent));
}
@media (max-width: 620px) {
  .legal-toc ol { grid-template-columns: minmax(0, 1fr); }
}

/* ── Sections ──────────────────────────────────────────────────────────── */

.legal-s {
  margin-top: 46px;
  /* Anchors land under the sticky header without the heading hiding beneath
     it — the classic broken table-of-contents jump. */
  scroll-margin-top: 90px;
}

.legal-s h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.legal-s h3 {
  margin: 24px 0 8px;
  font-size: 15px;
  color: var(--ink);
}
.legal-s p {
  margin: 0 0 14px;
  line-height: 1.72;
  color: var(--ink-dim);
}
.legal-s p:last-child { margin-bottom: 0; }
.legal-s strong { color: var(--ink); font-weight: 600; }

.legal-list {
  margin: 0 0 14px;
  padding-left: 20px;
  display: grid;
  gap: 9px;
}
.legal-list li {
  line-height: 1.68;
  color: var(--ink-dim);
}
.legal-list li::marker { color: var(--ink-mute); }

/* Controller / processor, side by side — the distinction is the point, and
   two columns make it a comparison instead of two paragraphs in sequence. */
.legal-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}
.legal-cardlet {
  padding: 20px 22px;
  border: 1px solid var(--edge);
  border-radius: var(--radius-md, 12px);
  background: var(--panel);
}
.legal-cardlet h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--ink);
}
.legal-cardlet p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}
@media (max-width: 700px) {
  .legal-split { grid-template-columns: minmax(0, 1fr); }
}

/* A carve-out the reader would otherwise miss and later feel misled by. */
.legal-callout {
  margin: 18px 0 0 !important;
  padding: 16px 20px;
  border-radius: var(--radius-md, 12px);
  background: var(--accent-subtle, rgba(37, 99, 235, .13));
  border: 1px solid var(--edge);
  font-size: 14px;
}

/* ── Contact ───────────────────────────────────────────────────────────── */

.legal-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 24px 26px;
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg, 16px);
  background: var(--panel);
}
.legal-contact-co {
  margin: 0 !important;
  font-weight: 600;
  color: var(--ink) !important;
}
.legal-contact-co span {
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-faint);
}
.legal-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Print ─────────────────────────────────────────────────────────────── */

/* A privacy policy genuinely does get printed and filed. Ink-on-paper, and
   the navigation chrome removed — a table of contents whose links cannot be
   clicked is just a list of words. */
@media print {
  .site-header,
  .site-footer,
  .legal-toc,
  .skip { display: none !important; }

  .legal { padding: 0; }
  .legal-s { margin-top: 24pt; page-break-inside: avoid; }
  .legal-s h2 { page-break-after: avoid; }

  .legal-summary,
  .legal-cardlet,
  .legal-contact,
  .legal-callout {
    border: 1pt solid #999 !important;
    background: transparent !important;
  }
}
