.toc-layout { position: relative; display:grid; grid-template-columns:minmax(0,1fr) 230px; gap:18px; align-items:start; }
.toc-main { min-width:0; }
.toc-main [id] { scroll-margin-top: calc(var(--impersonation-height) + 90px); }
.toc-main > .card:first-child,
.toc-main > form:first-child > .card:first-of-type { margin-top:0; }
.toc-sidebar { position:sticky; top:90px; padding:16px 14px; border:1px solid var(--line); border-radius:12px; background:var(--paper); box-shadow:var(--shadow); }
.toc-sidebar-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; padding:0 4px; }
.toc-sidebar-head .eyebrow { margin:0 !important; }
.toc-progress { display:block; width:26px; height:4px; flex:0 0 auto; border-radius:999px; background:var(--line); overflow:hidden; position:relative; }
.toc-progress:after { content:''; position:absolute; inset:0 auto 0 0; width:var(--toc-progress,0%); border-radius:inherit; background:var(--brand); transition:width .15s; }
.toc-sidebar nav ol { list-style:none; margin:0; padding:0; display:grid; gap:2px; }
.toc-sidebar nav a { display:flex; align-items:center; gap:9px; padding:6px 8px; border-radius:8px; color:var(--muted); font-size:13px; font-weight:700; line-height:1.3; text-decoration:none; transition:color .15s,background .15s; }
.toc-num { display:grid; place-items:center; width:20px; height:20px; flex:0 0 auto; border-radius:6px; background:var(--subtle); color:var(--muted); font-size:11px; font-weight:800; transition:background .15s,color .15s; }
.toc-label { min-width:0; }
.toc-sidebar nav a:hover { color:var(--brand-dark); background:var(--brand-soft); }
.toc-sidebar nav a:hover .toc-num { background:var(--brand-soft); color:var(--brand-dark); }
.toc-sidebar nav a.is-active { color:var(--brand-dark); background:var(--brand-soft); }
.toc-sidebar nav a.is-active .toc-num { background:var(--brand); color:#fff; }
