/* Docs page: a man page in the vault's terminal style. Tokens and the top bar come from app.css. */
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
a.tbtn { text-decoration: none; color: var(--text); }
.tbtn.on { background: var(--text); color: var(--bg); border-color: var(--text); }

.docs { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 28px; padding: 18px 14px 60px; justify-content: center; }
.toc .panel { position: sticky; top: 16px; }
.toc ol { list-style: none; margin: 4px 0 0; padding: 0; counter-reset: s; }
.toc li { counter-increment: s; border-top: 1px dashed var(--line); }
.toc li:first-child { border-top: 0; }
.toc a { display: grid; grid-template-columns: 30px 1fr; padding: 7px 2px; text-decoration: none; font-size: 12px; letter-spacing: 0.06em; color: var(--muted); }
.toc a::before { content: counter(s, decimal-leading-zero); color: var(--dim); }
.toc a:hover, .toc a.on { color: var(--text); }
.toc a.on::before { color: var(--red); }

.man { font-size: 14px; line-height: 1.7; color: #cfccc5; min-width: 0; }
.manhead { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; letter-spacing: 0.08em; color: var(--dim); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.manhead.foot { border-bottom: 0; border-top: 1px solid var(--line); padding: 14px 0 0; margin-top: 8px; }
.manhead .mid { color: var(--muted); }
.manhead a { text-decoration: none; }
.manhead a:hover { color: var(--text); }

.man section { padding: 26px 0 30px; border-bottom: 1px solid var(--line); }
.man h2 { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; color: var(--text); display: flex; gap: 14px; }
.man h2 i { font-style: normal; color: var(--red); }
.man p { margin: 0 0 14px; }
.man p.lead { font-size: 17px; line-height: 1.6; color: var(--text); }
.man b { color: var(--text); font-weight: 600; }
.man a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--line-2); overflow-wrap: anywhere; }
.man a:hover { text-decoration-color: var(--red); }
.man .note { color: var(--muted); border-left: 2px solid var(--red); padding-left: 12px; }

.box { margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--line-2); background: var(--panel); font: inherit; font-size: 13px; line-height: 1.7; color: var(--text); white-space: pre-wrap; overflow-x: auto; }

.steps { list-style: none; margin: 0 0 14px; padding: 0; counter-reset: p; }
/* the number hangs in the gutter, so inline <b> and links flow with the text instead of becoming grid cells */
.steps li { counter-increment: p; position: relative; padding: 8px 0 8px 34px; border-top: 1px dashed var(--line); }
.steps li:last-child { border-bottom: 1px dashed var(--line); }
.steps li::before { content: counter(p, decimal-leading-zero); color: var(--red); position: absolute; left: 0; top: 8px; }

.t { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 13px; }
.t th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: 0.12em; color: var(--muted); padding: 6px 10px; border: 1px solid var(--line); background: var(--panel); }
.t td { padding: 6px 10px; border: 1px solid var(--line); color: var(--text); }
.t td:last-child { text-align: right; }

.heads-list { border-top: 1px solid var(--line); margin-bottom: 16px; }
.h { display: grid; grid-template-columns: 112px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.h img { width: 112px; height: 112px; object-fit: cover; display: block; border: 1px solid var(--line-2); border-top: 2px solid var(--c); }
.h h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; letter-spacing: 0.08em; color: var(--c); }
.h h3 span { font-size: 11px; font-weight: 400; letter-spacing: 0.08em; color: var(--dim); margin-left: 8px; text-transform: uppercase; }
.h p { margin: 0; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.kv span { color: var(--muted); letter-spacing: 0.08em; font-size: 12px; }
.kv b { min-width: 0; overflow-wrap: anywhere; text-align: right; }

.faq { margin: 0; }
.faq dt { color: var(--text); font-weight: 600; padding-top: 12px; border-top: 1px dashed var(--line); }
.faq dt:first-child { border-top: 0; padding-top: 0; }
.faq dt::before { content: '> '; color: var(--red); }
.faq dd { margin: 4px 0 12px 18px; }

@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 12px 16px 48px; }
  .toc .panel { position: static; }
  .toc ol { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
  .toc li:nth-child(2) { border-top: 0; }
}
@media (max-width: 560px) {
  .manhead .mid:not(:has(a)) { display: none; }
  .man p.lead { font-size: 15px; }
  .h { grid-template-columns: 72px 1fr; gap: 14px; }
  .h img { width: 72px; height: 72px; }
  .h h3 span { display: block; margin: 2px 0 0; }
  .box { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
