/* Carvecrest docs: paper page, sticky contents, readable column. */
body.docs { background: linear-gradient(180deg, #ffe7dd 0, #fff4ee 420px, #fffaf6 100%); }
.docs-hero { padding: calc(var(--nav-h) + 56px) 0 40px; background: radial-gradient(ellipse at 80% 0%, rgba(185, 162, 232, 0.5), transparent 60%), radial-gradient(ellipse at 10% 20%, rgba(255, 196, 163, 0.6), transparent 55%); }
.docs-hero h1 { font-size: clamp(42px, 6vw, 84px); margin: 12px 0 16px; }
.docs-hero h1 span { color: #d98a2b; }
.docs-hero .lead { max-width: 62ch; font-size: 18px; color: var(--ink-2); }

.docs-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; padding-bottom: 96px; }
.toc { position: sticky; top: calc(var(--nav-h) + 20px); align-self: start; padding: 18px; border-radius: 18px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }
.toc-k { font: 800 11px var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 7px 10px; border-radius: 9px; text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.toc a:hover { background: rgba(42, 31, 61, 0.05); color: var(--ink); }
.toc a.on { background: var(--ink); color: var(--cream); }

.doc { max-width: 780px; font-size: 16.5px; line-height: 1.7; color: var(--ink-2); }
.doc section { padding: 34px 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 16px); }
.doc section:first-child { border-top: 0; padding-top: 0; }
.doc h2 { font: 400 clamp(28px, 3.4vw, 40px)/1.1 var(--display); color: var(--ink); margin-bottom: 14px; }
.doc h3 { font: 800 18px var(--body); color: var(--ink); margin: 26px 0 8px; }
.doc p + p { margin-top: 12px; }
.doc b { color: var(--ink); }
.doc a { color: #b56a1e; font-weight: 600; text-underline-offset: 3px; }
.doc ul, .doc ol { padding-left: 22px; margin: 12px 0; }
.doc li + li { margin-top: 6px; }
.doc code { font-size: 0.88em; padding: 0.1em 0.4em; border-radius: 6px; background: rgba(42, 31, 61, 0.07); color: var(--ink); }
.doc .small { font-size: 13.5px; color: var(--ink-3); margin-top: 10px; }
.num { counter-reset: n; list-style: none; padding-left: 0 !important; }
.num li { position: relative; padding-left: 40px; counter-increment: n; }
.num li::before { content: counter(n); position: absolute; left: 0; top: 0.05em; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--gold); color: var(--ink); font: 400 15px/1 var(--display); }
.formula { margin: 14px 0; padding: 16px 18px; border-radius: 14px; background: var(--ink); color: var(--gold); font: 400 clamp(17px, 2.2vw, 22px) var(--display); text-align: center; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.card { padding: 16px 18px; border-radius: 16px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 15px; }
.card-k { display: flex; align-items: center; gap: 8px; font: 400 18px var(--display); color: var(--ink); margin-bottom: 6px; }
.card-k kbd { font-size: 11px; }
.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 14px 0; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line); }
.tscroll .t { margin: 0; box-shadow: none; }
.t { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14.5px; background: var(--paper); border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 1.5px var(--line); }
.t th { text-align: left; font: 800 11.5px var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); background: rgba(42, 31, 61, 0.05); }
.t th, .t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t td { color: var(--ink); font-variant-numeric: tabular-nums; }
#sled-table td, #sled-table th { white-space: nowrap; }
.sw { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; }
.sw li { margin: 0 !important; display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 5px; border-radius: 99px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 13px; font-weight: 600; color: var(--ink); }
.sw i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
.sw small { color: var(--ink-3); }
.feeds { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 14px 0; }
.feed { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); text-decoration: none; font-weight: 400 !important; }
.feed b { font: 400 15px var(--display); color: var(--ink); }
.feed code { background: none !important; padding: 0 !important; font-size: 11.5px !important; color: var(--ink-3) !important; }
.feed:hover { box-shadow: inset 0 0 0 2px var(--gold-2); }
.doc details { padding: 14px 16px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); margin-top: 10px; }
.doc summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.doc details p { margin-top: 8px; }
.doc .ca { margin: 16px 0 12px; }
.docs-cd { margin: 6px 0 4px; }

@media (max-width: 900px) {
  .docs-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .toc { position: static; }
  .toc ol { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr; }
}
