/* Long-form pages (privacy, and any docs later). Loads after site.css and reuses its tokens, nav and footer. */
:root {
  --note-bg: #fdf1ec;  --note-line: #efb59f;
  --code-bg: #f4f4f6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --note-bg: #2a1712;  --note-line: #7a3f2c;
    --code-bg: #1b1b1f;
  }
}

/* ---------- Article layout ---------- */
.article-shell { display: grid; grid-template-columns: minmax(0, 760px) 260px; justify-content: space-between; gap: 56px; padding: 48px 24px 120px; max-width: 1200px; margin: 0 auto; }
.article-shell aside { border-left: 1px solid var(--line); padding-left: 32px; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 20px; }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--ink-2); }
.crumbs .here { background: var(--soft); border-radius: 8px; padding: 4px 10px; font-weight: 500; color: var(--ink); }

.article h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.article .byline { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-2); font-size: 15px; margin: 16px 0 32px; }
.article .lede { font-size: 18px; line-height: 1.6; color: var(--ink-2); margin: 0 0 24px; }

.prose { font-size: 17px; line-height: 1.7; }
.prose > * + * { margin-top: 16px; }
.prose p { margin: 0; }
.prose h2 { font-family: var(--font-body); font-size: 26px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; margin-top: 48px; scroll-margin-top: 96px; }
.prose ul { padding-left: 1.4em; margin-bottom: 0; }
.prose li + li { margin-top: 8px; }
.prose a { color: var(--accent-1-ink); text-underline-offset: 3px; }
.prose code { background: var(--code-bg); }

.callout { border: 1px solid; border-radius: 8px; padding: 14px 18px; font-size: 16px; line-height: 1.6; }
.callout.note { background: var(--note-bg); border-color: var(--note-line); }

.table-wrap { border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; min-width: 520px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 16px; }
.prose thead th { background: var(--soft); font-weight: 700; }
.prose tbody tr:nth-child(odd) { background: color-mix(in srgb, var(--soft) 55%, transparent); }
.prose td code { white-space: nowrap; }

/* ---------- On this page (TOC) ---------- */
.toc { position: sticky; top: 96px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.toc header { display: flex; align-items: center; gap: 8px; font-size: 15px; padding: 11px 16px; background: var(--soft); border-bottom: 1px solid var(--line); font-weight: 600; }
.toc svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.toc ol { list-style: none; margin: 0; padding: 2px 16px; }
.toc li + li { border-top: 1px solid var(--line); }
.toc a { display: block; padding: 9px 0 9px 12px; margin-left: -12px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink-2); font-size: 14px; line-height: 1.4; transition: color .15s var(--ease), border-color .15s var(--ease); }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); font-weight: 600; border-left-color: var(--accent-1); }

/* Mobile TOC sits above the article as a collapsible card */
.toc-mobile { display: none; margin-bottom: 28px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.toc-mobile summary { padding: 14px 18px; font-weight: 600; cursor: pointer; }
.toc-mobile ol { margin: 0; padding: 0 18px 14px 40px; }
.toc-mobile a { color: var(--ink-2); text-decoration: none; line-height: 2; }

@media (max-width: 960px) {
  .article-shell { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 32px; }
  .article-shell aside { display: none; }
  .toc-mobile { display: block; }
}
@media (max-width: 600px) {
  .article-shell { padding: 24px 16px 88px; }
  .prose h2 { font-size: 24px; margin-top: 44px; }
}
