/* Depth is a reading choice. Colour always travels with a written label. */
.ls-reading{min-width:0}
.ls-reading [hidden]{display:none!important}
.ls-reading :is(.ls-depth-filter,.ls-deep,.ls-mechanism,.ls-glossary){box-sizing:border-box;max-width:100%;font-size:1rem}
.ls-depth-badge,.ls-outline-depth{--depth-color:var(--success);color:var(--depth-color)}
[data-depth=core]{--depth-color:var(--primary)}
[data-depth=internals]{--depth-color:var(--violet)}
[data-depth=advanced]{--depth-color:var(--text)}
.ls-depth-badge{display:inline-flex;gap:7px;align-items:center;border:1px solid currentColor;border-radius:999px;padding:3px 10px;font-size:.75rem;font-weight:700;line-height:1.5;margin-bottom:8px}
.ls-depth-badge::before,.ls-outline-depth::before{content:"";width:7px;height:7px;flex:none;border-radius:50%;background:currentColor}
.ls-sec-head>div{min-width:0}
.ls-layout .ls-outline a[data-out]{display:flex;padding:8px 10px;text-decoration:none!important}
.ls-outline a[data-out]>span:not(.ls-o-num,.ls-o-tick){min-width:0}
.ls-outline-depth{display:flex;align-items:center;gap:6px;font-size:.75rem;line-height:1.5;font-weight:600;margin-top:4px}
.ls-depth-filter{padding:16px;border:1px solid var(--border);border-radius:16px;background:var(--surface);margin-bottom:28px}
.ls-depth-filter>strong{display:block;font-size:.85rem;margin-bottom:10px}
.ls-depth-options{display:flex;flex-wrap:wrap;gap:6px}
.ls-depth-options button,.ls-mechanism-controls button,.ls-hidden-section button{min-height:44px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);font:600 .85rem/1.4 'DM Sans',sans-serif;padding:9px 12px;cursor:pointer}
.ls-depth-options button[aria-pressed=true]{background:var(--primary);border-color:var(--primary);color:var(--surface)}
[data-theme=dark] .ls-depth-options button[aria-pressed=true]{color:#071430}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .ls-depth-options button[aria-pressed=true]{color:#071430}}
.ls-depth-filter p{font-size:.8rem;line-height:1.5;margin:10px 0 0;color:var(--muted)}
.ls-section.ls-is-filtered{margin-block:20px}
.ls-hidden-section{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;padding:8px 12px;background:var(--raised);border:1px solid var(--border);border-radius:10px;font-size:.85rem;color:var(--muted)}
.ls-hidden-section button{margin-left:auto;color:var(--primary);background:var(--surface);flex:none}
.ls-reading :is(button,summary,a):focus-visible{outline:3px solid var(--primary);outline-offset:4px}
.ls-deep{margin:28px 0;border:1px solid var(--border);border-left:4px solid #0F2A6B;border-radius:16px;background:var(--surface)}
[data-theme=dark] .ls-deep{border-left-color:#7DB2FF}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .ls-deep{border-left-color:#7DB2FF}}
.ls-deep summary{padding:16px 18px;min-height:44px;cursor:pointer;font-weight:700;line-height:1.5;overflow-wrap:anywhere;list-style:none;display:grid;grid-template-columns:minmax(0,1fr) 20px;column-gap:12px;align-items:center}
.ls-deep summary::-webkit-details-marker{display:none}
.ls-deep summary>span{grid-column:1}
.ls-deep summary::after{content:"+";grid-column:2;grid-row:1/3;font-size:1.3rem;color:var(--primary);text-align:center}
.ls-deep[open]>summary::after{content:"\2212"}
.ls-deep-label{display:block;color:var(--violet);font-size:.75rem;margin:0 0 4px}
.ls-deep-body{padding:0 18px 18px}.ls-deep-body>:last-child{margin-bottom:0}
.ls-mechanism{margin:28px 0;background:var(--surface);border:1px solid var(--border);border-radius:16px;overflow:hidden}
.ls-mechanism figcaption{display:grid;gap:5px;padding:18px 20px;border-bottom:1px solid var(--border);text-align:left;color:var(--text);font-size:1rem;line-height:1.5}
.ls-mechanism-label{font:600 .75rem/1.5 'IBM Plex Mono',monospace;color:var(--violet)}
.ls-mechanism-list{margin:0;padding:20px 20px 20px 48px}
.ls-mechanism-step{padding-left:4px;overflow-wrap:anywhere}
.ls-mechanism-step::marker{color:var(--primary);font-weight:700}
.ls-mechanism-step p{margin:0 0 12px;font-size:1rem;line-height:1.65}
.ls-mechanism-step p:last-child{margin-bottom:0}
.ls-mechanism-step+.ls-mechanism-step{margin-top:14px}
.ls-mechanism.is-interactive .ls-mechanism-step{margin-top:0;animation:ls-step-in .2s ease-out}
.ls-mechanism-controls{border-top:1px solid var(--border);padding:12px 16px;display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.ls-mechanism-controls button:disabled{opacity:.5;cursor:default}
.ls-step-status{font-size:.8rem;color:var(--muted);margin-right:auto}
.ls-step-announcement{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.ls-step-dots{display:flex;flex-wrap:wrap;gap:0;padding:0 16px 12px}
.ls-step-dots button{display:grid;place-items:center;min-width:44px;min-height:44px;background:none;border:0;cursor:pointer;border-radius:10px}
.ls-step-dots button::before{content:"";width:8px;height:8px;border:1px solid var(--muted);border-radius:50%;background:transparent}
.ls-step-dots button[aria-current=step]::before{background:var(--primary);border-color:var(--primary);box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 18%,transparent)}
.ls-term-wrap{position:relative;display:inline}
.ls-term{display:inline;min-height:40px;padding:3px 2px;border:0;border-bottom:2px dotted var(--primary);border-radius:0;background:transparent;color:var(--primary);font:inherit;font-weight:600;cursor:help;overflow-wrap:anywhere}
.ls-term-tip{position:fixed;z-index:120;width:max-content;max-width:min(288px,calc(100vw - 24px));box-sizing:border-box;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:var(--text);color:var(--bg);box-shadow:0 8px 24px rgb(7 20 48 / 18%);font-size:.85rem;font-weight:400;line-height:1.6;text-align:left;overflow-wrap:anywhere;pointer-events:auto}
.ls-glossary{margin:48px 0;padding:24px;border:1px solid var(--border);border-radius:16px;background:var(--surface)}
.ls-glossary .label{font-size:.85rem;font-weight:700;color:var(--violet)}
.ls-glossary h2{margin:8px 0 18px}.ls-glossary dl{margin:0}
.ls-glossary dt{font-weight:700;color:var(--primary);font-size:1rem;margin-top:16px;overflow-wrap:anywhere}
.ls-glossary dd{margin:5px 0 0;font-size:1rem;line-height:1.65;overflow-wrap:anywhere}
.ls-glossary dt:first-child{margin-top:0}
@keyframes ls-step-in{from{opacity:.3;transform:translateX(6px)}to{opacity:1;transform:none}}
@media(max-width:600px){.ls-depth-options{display:grid;grid-template-columns:1fr;width:100%}.ls-depth-options button{text-align:left}.ls-mechanism figcaption{padding:16px}.ls-mechanism-list{padding:18px 16px 18px 40px}.ls-mechanism-controls{padding:12px}.ls-step-status{width:100%}.ls-hidden-section{font-size:.8rem}.ls-glossary{padding:18px}}
@media(prefers-reduced-motion:reduce){.ls-mechanism.is-interactive .ls-mechanism-step{animation:none}}

/* The selector explains inclusion; only the selected choice needs a filled surface. */
.ls-depth-filter{background:none;border:0;border-bottom:1px solid var(--border);border-radius:0;padding:0 0 20px;margin-bottom:24px}
.ls-depth-filter>strong{font-size:.9rem}
.ls-depth-filter p{font-size:.85rem;line-height:1.6}
.ls-depth-options button{flex:1 1 auto}
.ls-depth-options button:hover{border-color:var(--primary)}
.ls-deep summary{padding:14px 18px}
.ls-deep-label{font-weight:400}
@media(max-width:600px){.ls-depth-options{display:flex;gap:6px}.ls-depth-options button{flex:1 1 85px;padding:8px;font-size:12px;text-align:center}.ls-hidden-section span{flex:1 1 180px}}
