/* Smart TOC – Public CSS v3.5.13 */

/* Scoped reset. Specificity is intentionally strong enough for common theme
   link/list rules, without forcing users into an !important specificity war. */
.stoc-wrapper,.stoc-wrapper *,
.stoc-float-panel,.stoc-float-panel *,
.stoc-sticky-panel,.stoc-sticky-panel *,
.stoc-rail-panel,.stoc-rail-panel *,
.stoc-progress-nav-panel,.stoc-progress-nav-panel *,
.stoc-chapter-nav,.stoc-chapter-nav *,
.stoc-diagnostics,.stoc-diagnostics * { box-sizing:border-box; }

/* ── Colour tokens ─────────────────────────────────────────── */
.stoc-wrapper,.stoc-float-panel,.stoc-sticky-panel,.stoc-rail-panel,.stoc-progress-nav-panel,.stoc-chapter-nav {
  --stoc-bg:#fff;
  --stoc-bg-hdr:#f8fafc;
  --stoc-border:#e2e8f0;
  --stoc-accent:#4f46e5;
  --stoc-accent-contrast:#fff;
  --stoc-brand-primary:#4f46e5;
  --stoc-brand-secondary:#4338ca;
  --stoc-title:#1e293b;
  --stoc-link:#4f46e5;
  --stoc-link-h:#4338ca;
  --stoc-link-act:#4338ca;
  --stoc-muted:#64748b;
  --stoc-hover-bg:#f1f5f9;
  --stoc-active-bg:#eef2ff;
  --stoc-tab-bg:#4f46e5;
  --stoc-tab-hover-bg:#4338ca;
  --stoc-tab-color:#fff;
  --stoc-tab-hover-color:#fff;
  --stoc-fab-bg:#4f46e5;
  --stoc-fab-color:#fff;
  --stoc-progress-color:#4f46e5;
  --stoc-shadow:0 4px 24px rgba(0,0,0,.10),0 1px 4px rgba(0,0,0,.06);
  --stoc-shadow-strong:0 12px 48px rgba(15,23,42,.18),0 4px 12px rgba(15,23,42,.10);
  --stoc-shadow-up:0 -12px 42px rgba(15,23,42,.16);
  --stoc-radius:10px;
}
.stoc-scheme-dark.stoc-wrapper,
.stoc-scheme-dark.stoc-float-panel,
.stoc-scheme-dark.stoc-sticky-panel,
.stoc-scheme-dark.stoc-rail-panel,
.stoc-scheme-dark.stoc-progress-nav-panel,
.stoc-scheme-dark.stoc-chapter-nav {
  --stoc-bg:#1e293b; --stoc-bg-hdr:#0f172a; --stoc-border:#334155;
  --stoc-accent:#818cf8; --stoc-accent-contrast:#0f172a; --stoc-brand-primary:#818cf8; --stoc-brand-secondary:#a5b4fc; --stoc-title:#f1f5f9; --stoc-link:#818cf8;
  --stoc-link-h:#a5b4fc; --stoc-link-act:#c7d2fe; --stoc-muted:#94a3b8;
  --stoc-hover-bg:#263148; --stoc-active-bg:#312e81; --stoc-tab-bg:#312e81; --stoc-tab-hover-bg:#a5b4fc;
  --stoc-fab-bg:#4f46e5;
}
@media (prefers-color-scheme:dark) {
  .stoc-scheme-auto.stoc-wrapper,
  .stoc-scheme-auto.stoc-float-panel,
  .stoc-scheme-auto.stoc-sticky-panel,
  .stoc-scheme-auto.stoc-rail-panel,
  .stoc-scheme-auto.stoc-progress-nav-panel,
  .stoc-scheme-auto.stoc-chapter-nav {
    --stoc-bg:#1e293b; --stoc-bg-hdr:#0f172a; --stoc-border:#334155;
    --stoc-accent:#818cf8; --stoc-accent-contrast:#0f172a; --stoc-brand-primary:#818cf8; --stoc-brand-secondary:#a5b4fc; --stoc-title:#f1f5f9; --stoc-link:#818cf8;
    --stoc-link-h:#a5b4fc; --stoc-link-act:#c7d2fe; --stoc-muted:#94a3b8;
    --stoc-hover-bg:#263148; --stoc-active-bg:#312e81; --stoc-tab-bg:#312e81; --stoc-tab-hover-bg:#a5b4fc;
    --stoc-fab-bg:#4f46e5;
  }
}

/* Runtime-pruned/search-hidden navigation must stay non-rendered even when
   a theme or display-mode stylesheet gives Smart TOC links an explicit display. */
.stoc-link[hidden],
.stoc-item[hidden],
.stoc-command-item[hidden] { display:none !important; }

/* ── Shared header / controls ──────────────────────────────── */
.stoc-header,.stoc-panel-header {
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; padding:13px 18px 11px; background:var(--stoc-bg-hdr);
  border-block-end:1px solid var(--stoc-border); flex-shrink:0;
}
.stoc-wrapper .stoc-title,
.stoc-float-panel .stoc-panel-title,
.stoc-sticky-panel .stoc-panel-title,
.stoc-progress-nav-panel .stoc-panel-title {
  margin:0; padding:0; border:0; background:none; box-shadow:none;
  color:var(--stoc-title); font-family:inherit; font-size:13px; font-weight:700; line-height:1.35;
  text-transform:none; letter-spacing:.01em;
}
.stoc-panel-footer {
  display:flex; justify-content:flex-end; align-items:center;
  padding:5px 12px 7px; border-block-start:1px solid var(--stoc-border);
  background:var(--stoc-bg-hdr); flex-shrink:0;
}
.stoc-kb-hint {
  display:inline-block; padding:1px 5px; border:1px solid var(--stoc-border);
  border-radius:3px; background:var(--stoc-bg); color:var(--stoc-muted);
  font:10px/1.4 monospace; opacity:.7; pointer-events:none; letter-spacing:.04em;
}
.stoc-panel-close {
  appearance:none; background:none; border:0; box-shadow:none; cursor:pointer;
  color:var(--stoc-muted); font-family:inherit; font-size:14px; font-weight:600; line-height:1; padding:6px; border-radius:5px;
}
.stoc-panel-close:hover { background:var(--stoc-hover-bg); color:var(--stoc-title); }
.stoc-panel-close:focus-visible { outline:2px solid var(--stoc-accent); outline-offset:2px; }

.stoc-toggle-btn {
  appearance:none; width:28px; height:28px; padding:0; flex:0 0 28px;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  border:1.5px solid var(--stoc-accent); border-radius:6px;
  background:transparent; color:var(--stoc-accent); box-shadow:none;
  transition:background .15s,color .15s,border-color .15s;
}
.stoc-toggle-btn:hover { background:var(--stoc-active-bg); color:var(--stoc-link-h); border-color:var(--stoc-link-h); }
.stoc-toggle-btn:focus { outline:none; }
.stoc-toggle-btn:focus-visible { outline:2px solid var(--stoc-accent); outline-offset:2px; }
.stoc-chevron::before { content:'▾'; display:block; color:currentColor; font-size:14px; line-height:1; transition:transform .25s; }
.stoc-collapsed .stoc-chevron::before { transform:rotate(-90deg); }
[dir="rtl"] .stoc-collapsed .stoc-chevron::before { transform:rotate(90deg); }

/* ── Body/list ─────────────────────────────────────────────── */
.stoc-body { overflow:hidden; max-height:3000px; opacity:1; padding-block-start:3px; transition:max-height .3s ease,opacity .3s ease; }
.stoc-collapsible.stoc-collapsed .stoc-body { max-height:0; opacity:0; }

.stoc-wrapper .stoc-list,
.stoc-float-panel .stoc-list,
.stoc-sticky-panel .stoc-list,
.stoc-rail-panel .stoc-list,
.stoc-progress-nav-panel .stoc-list {
  margin:0; padding:0; list-style:none;
}
.stoc-list-plain { display:flex; flex-direction:column; }
ul.stoc-list { counter-reset:stoc-ul; }
ol.stoc-list { counter-reset:stoc-ol; }
ul.stoc-list > .stoc-item { counter-increment:stoc-ul; }
ol.stoc-list > .stoc-item { counter-increment:stoc-ol; }
ul.stoc-list-sub { counter-reset:stoc-ul-sub; }
ol.stoc-list-sub { counter-reset:stoc-ol-sub; }
ul.stoc-list-sub > .stoc-item { counter-increment:stoc-ul-sub; }
ol.stoc-list-sub > .stoc-item { counter-increment:stoc-ol-sub; }

.stoc-wrapper .stoc-item,
.stoc-float-panel .stoc-item,
.stoc-sticky-panel .stoc-item,
.stoc-rail-panel .stoc-item,
.stoc-progress-nav-panel .stoc-item { margin:0; padding:0; border:0; list-style:none; }

ul.stoc-list > .stoc-item > .stoc-link::before,
ol.stoc-list > .stoc-item > .stoc-link::before,
ul.stoc-list-sub > .stoc-item > .stoc-link::before,
ol.stoc-list-sub > .stoc-item > .stoc-link::before {
  display:inline-block; width:18px; margin-inline-end:4px; text-align:center; vertical-align:middle;
}
ul.stoc-list > .stoc-item > .stoc-link::before { content:'•'; color:var(--stoc-accent); font-size:18px; line-height:1; }
ol.stoc-list > .stoc-item > .stoc-link::before { content:counter(stoc-ol) '.'; color:var(--stoc-accent); font-size:11px; font-weight:700; }
ul.stoc-list-sub > .stoc-item > .stoc-link::before { content:'–'; color:var(--stoc-muted); font-size:13px; }
ol.stoc-list-sub > .stoc-item > .stoc-link::before { content:counter(stoc-ol-sub) '.'; color:var(--stoc-muted); font-size:11px; font-weight:600; }
.stoc-has-counter .stoc-link::before { content:none; display:none; }

.stoc-list.stoc-list-sub {
  margin:2px 0 2px 16px; margin-inline-start:16px; margin-inline-end:0;
  padding-inline-start:14px; border-inline-start:2px solid var(--stoc-border);
}

/* Scoped link reset — replaces the previous blanket !important architecture. */
.stoc-wrapper .stoc-link,
.stoc-float-panel .stoc-link,
.stoc-sticky-panel .stoc-link,
.stoc-rail-panel .stoc-link,
.stoc-progress-nav-panel .stoc-link {
  display:block; padding:7px 18px; color:var(--stoc-link); text-decoration:none;
  border:0; border-inline-start:3px solid transparent; background:transparent;
  box-shadow:none; line-height:1.45; word-break:break-word;
  transition:background .12s,color .12s,border-color .12s;
}
.stoc-wrapper .stoc-link:hover,
.stoc-float-panel .stoc-link:hover,
.stoc-sticky-panel .stoc-link:hover,
.stoc-rail-panel .stoc-link:hover,
.stoc-progress-nav-panel .stoc-link:hover {
  background:var(--stoc-hover-bg); color:var(--stoc-link-h); text-decoration:none;
  border-inline-start-color:var(--stoc-border);
}
.stoc-wrapper .stoc-link.stoc-active,
.stoc-wrapper .stoc-item.stoc-active > .stoc-link,
.stoc-float-panel .stoc-link.stoc-active,
.stoc-float-panel .stoc-item.stoc-active > .stoc-link,
.stoc-sticky-panel .stoc-link.stoc-active,
.stoc-sticky-panel .stoc-item.stoc-active > .stoc-link,
.stoc-rail-panel .stoc-link.stoc-active,
.stoc-progress-nav-panel .stoc-link.stoc-active {
  background:var(--stoc-active-bg); color:var(--stoc-link-act);
  border-inline-start-color:var(--stoc-accent); font-weight:700;
}
/* Accent Bar setting controls both the wrapper edge and active-link edge. */
.stoc-wrapper:not(.stoc-has-accent) .stoc-link.stoc-active,
.stoc-wrapper:not(.stoc-has-accent) .stoc-item.stoc-active > .stoc-link {
  border-inline-start-color:transparent;
}

/* Logical depth indentation: automatically mirrors in RTL. No container opacity,
   so H5/H6 descendants no longer compound contrast loss. */
.stoc-wrapper .stoc-d2 > .stoc-link,.stoc-wrapper .stoc-link.stoc-d2 { padding-inline-start:18px; }
.stoc-wrapper .stoc-d3 > .stoc-link,.stoc-wrapper .stoc-link.stoc-d3 { padding-inline-start:30px; font-size:.92em; }
.stoc-wrapper .stoc-d4 > .stoc-link,.stoc-wrapper .stoc-link.stoc-d4 { padding-inline-start:42px; font-size:.87em; }
.stoc-wrapper .stoc-d5 > .stoc-link,.stoc-wrapper .stoc-link.stoc-d5 { padding-inline-start:52px; font-size:.83em; }
.stoc-wrapper .stoc-d6 > .stoc-link,.stoc-wrapper .stoc-link.stoc-d6 { padding-inline-start:60px; font-size:.80em; }
.stoc-list-sub > .stoc-item > .stoc-link { padding-inline-start:12px; }
.stoc-num { opacity:.62; font-size:.87em; margin-inline-end:3px; }

/* ── Progress ──────────────────────────────────────────────── */
.stoc-progress-wrap { height:3px; background:var(--stoc-border); width:100%; overflow:hidden; }
.stoc-progress-bar { height:100%; background:var(--stoc-progress-color,var(--stoc-accent)); width:0; transition:width .1s linear; }

/* ── Inline block/float ────────────────────────────────────── */
.stoc-wrapper {
  display:block; margin:1.75em 0; overflow:hidden; line-height:1.5;
  background:var(--stoc-bg); border:1px solid var(--stoc-border);
  border-radius:10px; box-shadow:var(--stoc-shadow); font-family:inherit;
}
.stoc-full-width { width:100%; }
.stoc-has-accent { border-inline-start:3px solid var(--stoc-accent); }
.stoc-wrapper:is(.stoc-float-left,.stoc-float-right) {
  box-sizing:border-box;
  width:min(var(--stoc-inline-width,260px),40%); max-width:min(var(--stoc-inline-width,260px),40%);
  min-width:min(180px,40%); max-height:min(260px,45vh); overflow-y:auto;
  scrollbar-width:thin; scrollbar-color:var(--stoc-border) transparent;
  clear:none; display:block; margin-block:0 16px;
}
.stoc-wrapper:is(.stoc-float-left,.stoc-float-right)::-webkit-scrollbar { width:5px; }
.stoc-wrapper:is(.stoc-float-left,.stoc-float-right)::-webkit-scrollbar-thumb { background:var(--stoc-border); border-radius:6px; }
.stoc-wrapper.stoc-float-left { float:left; margin-inline:0 16px; }
.stoc-wrapper.stoc-float-right { float:right; margin-inline:16px 0; }
/* Only the heading immediately following a floated TOC establishes an
   independent formatting context, preventing themed heading backgrounds from
   painting behind the TOC. Some themes force display:block !important on
   article headings; this narrowly-scoped override must win that conflict.
   Keep all theme-authored background, spacing, type, and border rules intact.
   Paragraphs still wrap normally around the float. */
body .entry-content > .stoc-wrapper:is(.stoc-float-left,.stoc-float-right) + :is(h1,h2,h3,h4,h5,h6,.wp-block-heading),
body .entry-content .stoc-wrapper:is(.stoc-float-left,.stoc-float-right) + :is(h1,h2,h3,h4,h5,h6,.wp-block-heading) {
  display:flow-root !important;
}
/* For content islands that establish an independent formatting context,
   the browser cannot wrap their internal text around a preceding float. */
.stoc-cf { clear:both; display:block; height:0; overflow:hidden; }
.stoc-print-toc { display:none; }

/* ── Shared floating inner structure ───────────────────────── */
.stoc-panel-content {
  flex:1; min-height:0; overflow-y:auto; background:var(--stoc-bg);
  scrollbar-width:thin; scrollbar-color:var(--stoc-border) transparent;
}
.stoc-panel-content::-webkit-scrollbar { width:4px; }
.stoc-panel-content::-webkit-scrollbar-thumb { background:var(--stoc-border); border-radius:2px; }

.stoc-float-panel .stoc-wrapper,
.stoc-sticky-panel .stoc-wrapper,
.stoc-progress-nav-panel .stoc-wrapper,
.stoc-rail-panel .stoc-wrapper {
  border:0; box-shadow:none; margin:0; border-radius:0; background:var(--stoc-bg); overflow:visible;
}
.stoc-float-panel .stoc-wrapper .stoc-body,
.stoc-sticky-panel .stoc-wrapper .stoc-body,
.stoc-progress-nav-panel .stoc-wrapper .stoc-body,
.stoc-rail-panel .stoc-wrapper .stoc-body {
  max-height:none; overflow:visible; opacity:1; transition:none;
}
.stoc-float-panel .stoc-wrapper .stoc-header,
.stoc-sticky-panel .stoc-wrapper .stoc-header,
.stoc-progress-nav-panel .stoc-wrapper .stoc-header,
.stoc-rail-panel .stoc-wrapper .stoc-header { display:none; }

/* ── Diagnostics (admin-only frontend overlay) ─────────────── */
.stoc-diagnostics {
  position:fixed; inset:auto 16px 16px auto; z-index:100000; width:min(360px,calc(100vw - 32px));
  max-height:70vh; overflow:auto; padding:0; border:1px solid #334155; border-radius:10px;
  background:#0f172a; color:#e2e8f0; box-shadow:0 12px 40px rgba(0,0,0,.35);
  font:12px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.stoc-diagnostics summary { cursor:pointer; padding:10px 12px; font-weight:700; color:#fff; }
.stoc-diagnostics-grid { display:grid; grid-template-columns:1fr 1fr; border-block-start:1px solid #334155; }
.stoc-diagnostics-grid > div { padding:7px 10px; border-block-end:1px solid #1e293b; }
.stoc-diagnostics-grid span { display:block; color:#94a3b8; }
.stoc-diagnostics-grid strong { display:block; color:#f8fafc; overflow-wrap:anywhere; }
.stoc-diagnostics > p { margin:8px 10px 10px; color:#94a3b8; }

/* ── Mobile / RTL / WP admin bar ───────────────────────────── */
@media (max-width:782px) {
  .stoc-wrapper:is(.stoc-float-left,.stoc-float-right) { float:none; width:100%; max-width:100%; min-width:0; margin:1em 0; }
  .stoc-sticky-panel { display:none; }
  .stoc-kb-hint,.stoc-panel-footer { display:none; }
}
@media (max-width:480px) {
  .stoc-wrapper .stoc-link { padding-block:8px; padding-inline:14px; }
  .stoc-wrapper .stoc-d3 > .stoc-link,.stoc-wrapper .stoc-link.stoc-d3 { padding-inline-start:22px; }
  .stoc-wrapper .stoc-d4 > .stoc-link,.stoc-wrapper .stoc-link.stoc-d4 { padding-inline-start:30px; }
}
.admin-bar .stoc-sticky-panel { top:142px; }
@media screen and (max-width:782px) { .admin-bar .stoc-sticky-panel { top:156px; } }

@media (prefers-reduced-motion:reduce) {
  .stoc-body,.stoc-toggle-btn,.stoc-chevron::before,.stoc-slide-body,.stoc-slide-tab,
  .stoc-drawer-body,.stoc-fab-popup,.stoc-sticky-panel,.stoc-progress-bar,
  .stoc-bottom-sheet-body,.stoc-progress-nav-popup,.stoc-progress-nav-panel,
  .stoc-rail-panel,.stoc-top-tabs-panel,.stoc-command-dialog,.stoc-command-backdrop { transition:none!important; animation:none!important; }
}

/* Frontend locale direction. Applied per Smart TOC instance so multilingual
   pages can switch direction without relying on the admin/user locale. */
.stoc-wrapper[dir="rtl"],
.stoc-float-panel[dir="rtl"],
.stoc-sticky-panel[dir="rtl"],
.stoc-rail-panel[dir="rtl"],
.stoc-chapter-nav[dir="rtl"]{direction:rtl;text-align:right;}


/* ══════════════════════════════════════════════════════════════
   v3.5.0 – resilient collapse, presets, active states & Smart Auto
══════════════════════════════════════════════════════════════ */
html { --stoc-safe-top:0px; --stoc-safe-bottom:0px; }

/* Never clip long expanded TOCs. Grid rows provide a real height animation
   without the old 3000px ceiling. */
.stoc-body { max-height:none; overflow:visible; }
.stoc-collapsible .stoc-body {
  display:grid; grid-template-rows:1fr; overflow:hidden; max-height:none;
  transition:grid-template-rows .3s ease,opacity .3s ease,padding .3s ease;
}
.stoc-collapsible .stoc-body > * { min-height:0; overflow:hidden; }
.stoc-collapsible.stoc-collapsed .stoc-body { grid-template-rows:0fr; max-height:none; opacity:0; padding-block-start:0; }

/* Reading Journey */
.stoc-journey-count {
  display:inline-flex; align-items:center; justify-content:center; min-width:36px;
  padding:2px 6px; border-radius:999px; background:var(--stoc-active-bg);
  color:var(--stoc-link-act); font-size:10px; font-weight:700; line-height:1.4;
  font-variant-numeric:tabular-nums; white-space:nowrap;
}
.stoc-journey-count[hidden] { display:none!important; }

/* Active-section styles. */
.stoc-active-style-pill .stoc-link.stoc-active,
.stoc-active-style-pill .stoc-item.stoc-active > .stoc-link {
  margin:2px 8px; padding-inline:10px; border-inline-start-color:transparent!important;
  border-radius:7px; background:var(--stoc-active-bg); box-shadow:inset 0 0 0 1px var(--stoc-border);
}
.stoc-active-style-dot .stoc-link { position:relative; }
.stoc-active-style-dot .stoc-link.stoc-active,
.stoc-active-style-dot .stoc-item.stoc-active > .stoc-link { border-inline-start-color:transparent!important; background:transparent; }
.stoc-active-style-dot .stoc-link.stoc-active::after,
.stoc-active-style-dot .stoc-item.stoc-active > .stoc-link::after {
  content:''; position:absolute; inset-inline-start:7px; top:50%; width:7px; height:7px;
  transform:translateY(-50%); border-radius:50%; background:var(--stoc-accent);
  box-shadow:0 0 0 3px var(--stoc-active-bg);
}
.stoc-active-style-dot .stoc-link.stoc-active,
.stoc-active-style-dot .stoc-item.stoc-active > .stoc-link { padding-inline-start:22px; }
/* Rail owns its marker and should not receive the generic dot marker. */
.stoc-rail-panel.stoc-active-style-dot .stoc-link.stoc-active::after,
.stoc-rail-panel.stoc-active-style-dot .stoc-item.stoc-active > .stoc-link::after { inset-inline-start:10px; }

/* Six professional visual foundations. User Custom scheme variables remain
   authoritative; presets primarily shape typography, spacing and surfaces. */
.stoc-preset-minimal_clean.stoc-wrapper { box-shadow:none; }
.stoc-preset-editorial.stoc-wrapper,
.stoc-preset-editorial .stoc-wrapper { border-radius:2px; box-shadow:none; border-inline-start:4px solid var(--stoc-accent); }
.stoc-preset-editorial .stoc-title,.stoc-preset-editorial.stoc-wrapper .stoc-title { font-family:Georgia,'Times New Roman',serif; font-size:1.08em; }
.stoc-preset-editorial .stoc-link,.stoc-preset-editorial.stoc-wrapper .stoc-link { line-height:1.55; }

.stoc-preset-documentation.stoc-wrapper,
.stoc-preset-documentation .stoc-wrapper { border-radius:6px; box-shadow:none; }
.stoc-preset-documentation .stoc-header,.stoc-preset-documentation.stoc-wrapper .stoc-header { padding-block:10px; }
.stoc-preset-documentation .stoc-link,.stoc-preset-documentation.stoc-wrapper .stoc-link { padding-block:6px; font-size:.94em; }

.stoc-preset-saas_modern.stoc-wrapper,
.stoc-preset-saas_modern .stoc-wrapper { border-radius:14px; box-shadow:0 10px 34px rgba(15,23,42,.10); }
.stoc-preset-saas_modern .stoc-header,.stoc-preset-saas_modern.stoc-wrapper .stoc-header { padding-block:15px 13px; }
.stoc-preset-saas_modern .stoc-link,.stoc-preset-saas_modern.stoc-wrapper .stoc-link { margin:1px 7px; border-radius:7px; }

.stoc-preset-government.stoc-wrapper,
.stoc-preset-government .stoc-wrapper { border-radius:3px; box-shadow:none; border-width:1px; border-block-start:4px solid var(--stoc-accent); }
.stoc-preset-government .stoc-title,.stoc-preset-government.stoc-wrapper .stoc-title { text-transform:uppercase; letter-spacing:.045em; font-size:.86em; }
.stoc-preset-government .stoc-link,.stoc-preset-government.stoc-wrapper .stoc-link { font-weight:550; }

.stoc-preset-academic.stoc-wrapper,
.stoc-preset-academic .stoc-wrapper { border-radius:0; box-shadow:none; }
.stoc-preset-academic .stoc-title,.stoc-preset-academic.stoc-wrapper .stoc-title,
.stoc-preset-academic .stoc-link,.stoc-preset-academic.stoc-wrapper .stoc-link { font-family:Georgia,'Times New Roman',serif; }
.stoc-preset-academic .stoc-list-sub,.stoc-preset-academic.stoc-wrapper .stoc-list-sub { border-inline-start-style:dotted; }

/* Smart Auto: Side Rail >1100, Side Slide 783–1100, Bottom Sheet <=782. */
.stoc-smart-auto-desktop,.stoc-smart-auto-tablet,.stoc-smart-auto-mobile { display:none!important; }
@media (min-width:1101px) {
  .stoc-rail-panel.stoc-smart-auto-desktop { display:block!important; }
}
@media (min-width:783px) and (max-width:1100px) {
  .stoc-slide-panel.stoc-smart-auto-tablet { display:flex!important; }
}
@media (max-width:782px) {
  .stoc-bottom-sheet-panel.stoc-smart-auto-mobile { display:block!important; }
}

/* Layout Safety fallback is rendered only for Side Slide mode. */
.stoc-layout-fallback-sheet { display:none!important; }
html.stoc-layout-fallback .stoc-slide-panel:not(.stoc-smart-auto-tablet) { display:none!important; }
html.stoc-layout-fallback .stoc-layout-fallback-sheet { display:block!important; }

@media (prefers-reduced-motion:reduce) {
  .stoc-collapsible .stoc-body { transition:none; }
}

/* Floating/sticky shells always show their embedded TOC. Global inline collapse
   state must never collapse the copy rendered inside a panel. */
.stoc-float-panel .stoc-wrapper.stoc-collapsible .stoc-body,
.stoc-sticky-panel .stoc-wrapper.stoc-collapsible .stoc-body,
.stoc-progress-nav-panel .stoc-wrapper.stoc-collapsible .stoc-body,
.stoc-rail-panel .stoc-wrapper.stoc-collapsible .stoc-body {
  display:block; max-height:none; overflow:visible; opacity:1; padding-block-start:3px; transition:none;
}
.stoc-float-panel .stoc-wrapper.stoc-collapsible .stoc-body > *,
.stoc-sticky-panel .stoc-wrapper.stoc-collapsible .stoc-body > *,
.stoc-progress-nav-panel .stoc-wrapper.stoc-collapsible .stoc-body > *,
.stoc-rail-panel .stoc-wrapper.stoc-collapsible .stoc-body > * { overflow:visible; }
