/* xfix.ai legal pages (/privacy/, /terms/ and their /ar/ and /es/ copies). Loaded on those pages only, after
   site.css and landing.css, so it may use their tokens and classes. Built by build.py (legal_page). */

.legal-hero .lp-head { margin-bottom: 0; }
.legal-date { margin: 0; font-size: 14px; color: var(--ink-2); }

/* Privacy · Terms · Refunds, one click apart */
.legal-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.legal-tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: var(--radius-pill); background: var(--card); font-size: 14px; font-weight: 700; color: var(--ink); }
.legal-tabs a:hover { background: var(--chip); }
.legal-tabs a[aria-current="page"] { background: var(--ink); color: var(--card); }

/* Contents beside the text on wide screens, above it on narrow ones */
.legal-body { padding-top: clamp(40px, 5vw, 64px); }
.legal-grid { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 720px); gap: clamp(32px, 5vw, 72px); align-items: start; }
.legal-toc { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.legal-toc b { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
[dir="rtl"] .legal-toc b { letter-spacing: 0; text-transform: none; font-size: 13px; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; border-inline-start: 2px solid var(--hairline); }
.legal-toc a { display: block; padding: 6px 14px; margin-inline-start: -2px; border-inline-start: 2px solid transparent; color: var(--ink-2); line-height: 1.35; }
.legal-toc a:hover { color: var(--ink); border-inline-start-color: var(--ink); }
@media (max-width: 900px) {
  .legal-grid { grid-template-columns: minmax(0, 1fr); }
  .legal-toc { position: static; background: var(--card); border-radius: var(--radius-22); padding: 20px 22px; }
  .legal-toc ol { border: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0 16px; }
  .legal-toc a { padding: 7px 0; margin: 0; border: 0; }
}

/* The text */
.legal-doc { font-size: 16px; line-height: 1.7; color: var(--ink-2); min-width: 0; }
[dir="rtl"] .legal-doc { line-height: 1.95; }
.legal-sec { padding-top: 8px; margin-bottom: 36px; scroll-margin-top: 92px; }
.legal-sec h2 { margin: 0 0 12px; font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
[dir="rtl"] .legal-sec h2 { letter-spacing: 0; line-height: 1.5; }
.legal-doc p { margin: 0 0 12px; }
.legal-doc ul { margin: 0 0 12px; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 10px; }
.legal-doc b { color: var(--ink); font-weight: 700; }
.legal-doc .link { overflow-wrap: anywhere; }
.legal-prevails { padding: 14px 16px; border-radius: var(--radius-14); background: var(--chip); font-size: 14px; color: var(--ink); margin-bottom: 32px !important; }
.legal-closing { margin-top: 40px !important; padding-top: 22px; border-top: 1px solid var(--hairline); }
.legal-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Who else sees your data: each company, which tools use it, and what for */
.legal-doc ul.legal-procs { list-style: none; padding: 0; gap: 0; margin-bottom: 16px; border-top: 1px solid var(--hairline); }
.legal-procs li { padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.legal-procs p { margin: 4px 0 0; }
.legal-proc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.legal-tools { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.legal-tool { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 5px; border-radius: var(--radius-pill); background: var(--tool-tint); color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1; }
.legal-tool .xf-mark { width: 14px; height: 14px; }

/* Cookies */
.legal-table-wrap { margin: 4px 0 16px; background: var(--card); border-radius: var(--radius-14); overflow: hidden; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.legal-table th { text-align: start; font-size: 12px; font-weight: 700; color: var(--ink-3); padding: 12px 16px; border-bottom: 1px solid var(--hairline); }
.legal-table td { padding: 12px 16px; border-bottom: 1px solid var(--hairline); vertical-align: top; color: var(--ink-2); }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table td:first-child { white-space: nowrap; }
.legal-table code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: var(--ink); }
@media (max-width: 640px) {
  .legal-table thead { display: none; }
  .legal-table tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--hairline); }
  .legal-table tr:last-child { border-bottom: 0; }
  .legal-table td { display: block; padding: 2px 0; border: 0; white-space: normal !important; }
  .legal-table td:last-child::before { content: attr(data-label) ": "; color: var(--ink-3); }
}

/* The analytics choice on xfix shop */
.legal-consent { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 16px; padding: 20px 22px; border-radius: var(--radius-22); background: var(--card); }
.legal-consent[hidden] { display: none; }
.legal-consent b { font-size: 16px; }
.legal-consent-state { margin: 0 !important; font-size: 15px; }
.legal-consent-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.legal-consent-btns .btn[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
