/* Docs and policy pages. Colours, buttons and the top bar come from /style.css. */

.topbar .nav { display: flex; gap: 6px; align-items: center; flex: 1; }
.doc-wrap { max-width: 1180px; margin: 0 auto; padding: 22px 20px 10px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.doc-toc { position: sticky; top: 76px; padding: 14px; font-size: 13px; }
.doc-toc h4 { margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
.doc-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; counter-reset: toc; }
.doc-toc li { counter-increment: toc; }
.doc-toc a { display: flex; gap: 8px; padding: 5px 6px; border-radius: var(--radius); color: var(--muted); text-decoration: none; }
.doc-toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 11px; color: var(--faint); padding-top: 1px; }
.doc-toc a:hover, .doc-toc a.on { color: var(--ink); background: var(--paper-2); }

.doc { padding: 30px 36px 36px; line-height: 1.65; font-size: 15px; }
.doc h1 { margin: 0 0 6px; font-family: var(--serif); font-size: 36px; letter-spacing: -0.02em; line-height: 1.1; }
.doc .lead { margin: 0 0 8px; color: var(--muted); font-size: 16px; max-width: 70ch; }
.doc .meta { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.doc section { padding-top: 26px; margin-top: 26px; border-top: 1px dotted var(--line-2); scroll-margin-top: 70px; }
.doc h2 { margin: 0 0 10px; font-family: var(--serif); font-size: 24px; letter-spacing: -0.01em; }
.doc h3 { margin: 18px 0 6px; font-size: 15px; }
.doc p, .doc li { max-width: 74ch; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc code { font-family: var(--mono); font-size: 13px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; word-break: break-all; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; }
.doc th, .doc td { text-align: left; padding: 7px 10px; border-bottom: 1px dotted var(--line-2); vertical-align: top; }
.doc th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); background: var(--paper-2); border-bottom: 3px double var(--line-2); }
.doc td:first-child { white-space: nowrap; }
.callout { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--line-2); border-left: 4px solid var(--accent); border-radius: var(--radius); background: #fffaf0; font-size: 14px; }
.callout.warn { border-left-color: #d97a12; background: #fff3d1; color: #4f3304; }
.callout.risk { border-left-color: var(--red); background: var(--red-bg); }
.callout b:first-child { display: block; margin-bottom: 2px; }
.steps-list { counter-reset: s; list-style: none; padding-left: 0 !important; }
.steps-list li { counter-increment: s; position: relative; padding-left: 34px; margin: 10px 0; }
.steps-list li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; background: var(--paper-2); font-family: var(--mono); font-size: 11px; font-weight: 600; }
details { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 8px 0; background: #fffdf7; }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 6px; }

@media (max-width: 860px) {
  .doc-wrap { grid-template-columns: 1fr; padding: 14px 16px 6px; }
  .doc-toc { position: static; }
  .doc { padding: 22px 18px 26px; }
  .doc h1 { font-size: 28px; }
  .doc td:first-child { white-space: normal; }
}
[data-theme="origami"] .doc h1, [data-theme="origami"] .doc h2 { font-family: var(--sans); }
[data-theme="origami"] .callout, [data-theme="origami"] details { background: #fbfbfc; }
