/* Texiva legal pages (/privacy/, /delete-account/). Loaded after site.css and
   uses its tokens only, so light/dark follow the landing page. */

.top-nav a[aria-current="page"] { color: var(--text); background: var(--surface-alt); }

/* Page head */
.legal-head { padding: 36px 0 28px; border-bottom: 1px solid var(--border); }
.legal-head h1 { font-size: clamp(2rem, 7vw, 3.1rem); margin-bottom: .35em; }
.legal-head .lede { margin-bottom: 1rem; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: .92rem; color: var(--muted); }
.legal-meta div { display: flex; gap: 6px; }
.legal-meta dt { font-weight: 600; color: var(--text); }
.legal-meta dd { margin: 0; }
@media (min-width: 900px) { .legal-head { padding: 56px 0 40px; } }

/* Layout: contents first on phones, a sticky side column on wide screens */
.legal-layout { display: grid; gap: 28px; padding: 28px 16px 64px; }
.legal-layout > * { min-width: 0; }
@media (min-width: 1000px) {
  .legal-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding-top: 44px; padding-bottom: 96px; }
  .toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; }
}

/* Table of contents */
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 14px; }
.toc h2 { font: 700 .8rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 10px; }
.toc ol { counter-reset: toc; display: grid; gap: 1px; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 7px 8px; margin: 0 -8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .94rem; line-height: 1.35; }
.toc a::before { content: counter(toc); flex: none; min-width: 1.3em; font-weight: 700; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.toc a:hover { background: var(--surface-alt); color: var(--primary); }

/* Readable prose. site.css resets lists; restore them here. */
.prose { max-width: 70ch; font-size: 1.02rem; overflow-wrap: break-word; }
.prose > section { padding-bottom: 8px; }
.prose > section + section { border-top: 1px solid var(--border); padding-top: 28px; margin-top: 28px; }
.prose h2 { font-size: clamp(1.4rem, 4.6vw, 1.85rem); margin-bottom: .6em; scroll-margin-top: 84px; }
.prose h3 { font-size: 1.08rem; margin: 1.5em 0 .45em; }
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.35em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: .3em 0; padding-left: .15em; }
.prose li::marker { color: var(--accent-ink); }
.prose strong { font-weight: 650; }
.prose code { font: .9em/1 var(--font-mono); background: var(--surface-alt); border: 1px solid var(--border); padding: .12em .38em; border-radius: 6px; overflow-wrap: anywhere; }
.prose a { overflow-wrap: anywhere; }
.path { font-weight: 600; white-space: normal; }
.path span { white-space: nowrap; }

/* Summary card at the top */
.summary { background: var(--primary-soft); border-radius: var(--radius); padding: 20px 20px 6px; margin-bottom: 28px; }
.summary h2 { font-size: 1.25rem; margin-bottom: .6em; }
.summary ul { list-style: none; padding: 0; }
.summary li { position: relative; padding-left: 28px; }
.summary li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%232E3A8C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .summary li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%238C98F2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}

/* Callouts */
.note { border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 12px 12px 0; padding: 14px 16px; margin: 0 0 1rem; }
.note p:last-child { margin-bottom: 0; }
.note-info { border-left-color: var(--info); background: var(--info-soft); }

/* Two-column facts tables (fit 360px without scrolling) */
.facts { width: 100%; border-collapse: collapse; margin: 0 0 1.2rem; font-size: .96rem; }
.facts caption { text-align: left; font-weight: 600; padding-bottom: 8px; color: var(--muted); font-size: .9rem; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.facts thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom-width: 2px; }
.facts tbody th { font-weight: 600; width: 38%; }
@media (max-width: 479px) {
  .facts thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .facts tbody tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .facts tbody th, .facts tbody td { display: block; width: auto; padding: 2px 0; border: 0; }
  .facts tbody td { color: var(--muted); }
}

/* Numbered steps (delete-account) */
.steps { list-style: none !important; padding: 0 !important; counter-reset: s; display: grid; gap: 10px; margin: 0 0 1.2rem; }
.steps li { counter-increment: s; position: relative; margin: 0; padding: 12px 14px 12px 54px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 11px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--primary); color: var(--on-primary); font: 800 .95rem/1 var(--font-display); }

/* Option cards (delete-account) */
.ways { display: grid; gap: 14px; margin: 0 0 1.2rem; }
@media (min-width: 760px) { .ways { grid-template-columns: 1fr 1fr; } }
.way { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.way h3 { margin-top: 0; }
.way .btn { margin-top: 4px; white-space: normal; text-align: center; }
.way p:last-child { margin-bottom: 0; }
.app-id { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: .95rem; margin: 0 0 1rem; }
.app-id strong { font-weight: 700; }
