/* The same surface renders in the live reader, admin preview and exports. */
.toc-surface{--toc-row-radius:7px;--toc-row-gap:0px;--toc-row-y:14px;box-sizing:border-box;background:var(--toc-surface,#243142);color:var(--toc-color,#edf3fc);font-family:var(--toc-font,system-ui,sans-serif);font-size:var(--toc-size,14px);font-weight:var(--toc-weight,400)}
.toc-surface *{box-sizing:border-box}
.toc-surface .toc-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 20px 18px;border-bottom:1px solid var(--toc-border);flex-shrink:0}
.toc-surface .toc-heading>div{min-width:0}
.toc-surface .toc-heading h2{font-family:inherit;font-size:calc(var(--toc-size,14px) + 7px);line-height:1.4;margin:0 0 7px;font-weight:700;overflow-wrap:anywhere;color:inherit}
.toc-surface .toc-heading p{font-size:max(12px,calc(var(--toc-size,14px) - 2px));line-height:1.5;color:var(--toc-muted);overflow-wrap:anywhere;margin:0;max-height:3em;overflow:hidden}
.toc-surface .toc-heading .icon-button{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;padding:0;border:0;border-radius:8px;background:var(--toc-wash);color:inherit;font-size:24px}
.toc-surface .toc-heading svg{width:18px;height:18px}
.toc-surface .toc-content{padding:12px 16px max(20px,env(safe-area-inset-bottom));min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--toc-muted) transparent}
.toc-surface .toc-section{margin:0 0 16px}
.toc-surface .toc-section h3{margin:18px 0 8px;padding:0 10px;color:var(--toc-accent);border:0;font-size:max(12px,calc(var(--toc-size,14px) - 1px));line-height:1.5;font-weight:700;overflow-wrap:anywhere}
.toc-surface .toc-entry{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;width:100%;margin:var(--toc-row-gap) 0;padding:var(--toc-row-y) 12px;border:1px solid transparent;border-radius:var(--toc-row-radius);background:transparent;color:inherit;font:inherit;line-height:1.5;text-align:left;text-decoration:none;cursor:pointer;box-shadow:none}
.toc-surface .toc-entry span{min-width:0;overflow-wrap:anywhere}
.toc-surface .toc-entry small{flex-shrink:0;white-space:nowrap;color:var(--toc-muted);font-family:inherit;font-size:max(11px,calc(var(--toc-size,14px) - 2px));padding-top:2px}
.toc-surface .toc-entry:hover{background:var(--toc-wash)}
.toc-surface .toc-entry[aria-current=page]{background:var(--toc-active);box-shadow:inset 3px 0 var(--toc-accent)}
.toc-surface :is(.toc-entry,.toc-empty-action,.icon-button):focus-visible{outline:2px solid var(--toc-accent);outline-offset:-2px}
.toc-surface .empty-message{color:var(--toc-muted);line-height:1.8;font:inherit;padding:12px}
.toc-surface .toc-empty-action{display:block;margin:12px auto;padding:10px 18px;border:1px solid var(--toc-border);border-radius:7px;color:inherit;background:var(--toc-active);font:inherit;cursor:pointer}
.toc-surface[data-toc-theme=minimal]{--toc-row-radius:0px}
.toc-surface[data-toc-theme=minimal] .toc-entry{border-bottom-color:var(--toc-border)}
.toc-surface[data-toc-theme=paper]{--toc-row-radius:0px}
.toc-surface[data-toc-theme=paper] .toc-heading{border-bottom:4px double var(--toc-border)}
.toc-surface[data-toc-theme=paper] .toc-entry{border-bottom:1px dotted var(--toc-border)}
.toc-surface[data-toc-theme=midnight]{--toc-row-gap:8px;--toc-row-radius:12px}
.toc-surface[data-toc-theme=midnight] .toc-entry{background:var(--toc-card);border-color:var(--toc-border)}
.toc-surface[data-toc-theme=ocean] .toc-heading{background:linear-gradient(135deg,var(--toc-wash),transparent)}
.toc-surface[data-toc-theme=ocean] .toc-entry{border-left:3px solid var(--toc-border);border-radius:0 7px 7px 0}
.toc-surface[data-toc-theme=forest]{--toc-row-radius:26px;--toc-row-gap:5px}
.toc-surface[data-toc-theme=forest] .toc-heading{border-bottom:3px solid var(--toc-accent)}
.toc-surface[data-toc-theme=forest] .toc-entry{padding-left:18px}
.toc-surface[data-toc-theme=forest] .toc-entry[aria-current=page]{box-shadow:none;border-color:var(--toc-accent)}
.toc-surface[data-toc-theme=rose]{--toc-row-radius:14px;--toc-row-gap:9px}
.toc-surface[data-toc-theme=rose] .toc-entry{background:var(--toc-card);border-color:var(--toc-border);align-items:center}
.toc-surface[data-toc-theme=rose] .toc-entry small{background:var(--toc-wash);color:var(--toc-accent);border-radius:20px;padding:4px 9px}
.toc-surface[data-toc-theme=slate]{--toc-row-radius:0px;--toc-row-y:11px}
.toc-surface[data-toc-theme=slate] .toc-heading{border-bottom:2px solid var(--toc-accent)}
.toc-surface[data-toc-theme=slate] .toc-entry{border:1px dashed var(--toc-border);margin-top:-1px}
.toc-surface[data-toc-theme=slate] .toc-entry small{border-left:1px solid var(--toc-border);padding-left:10px}
.toc-surface[data-toc-theme=aurora]{--toc-row-radius:4px 18px 18px 4px;--toc-row-gap:7px}
.toc-surface[data-toc-theme=aurora] .toc-heading{background:linear-gradient(120deg,var(--toc-wash),transparent);border-bottom:3px solid var(--toc-accent)}
.toc-surface[data-toc-theme=aurora] .toc-entry{border-left:3px solid var(--toc-accent);background:var(--toc-card)}
.toc-surface[data-toc-theme=contrast]{--toc-row-radius:0px;--toc-row-gap:8px}
.toc-surface[data-toc-theme=contrast] .toc-heading{border-bottom:3px solid var(--toc-accent)}
.toc-surface[data-toc-theme=contrast] .toc-entry{border:2px solid var(--toc-color)}
.toc-surface[data-toc-theme=contrast] .toc-entry[aria-current=page]{border-color:var(--toc-accent);box-shadow:inset 5px 0 var(--toc-accent)}
.toc-surface[data-toc-theme] .toc-entry:hover{background:var(--toc-wash)}
.toc-surface[data-toc-theme] .toc-entry[aria-current=page]{background:var(--toc-active)}
