.mtn-floating-headings,
.mtn-floating-headings-flyout {
--mtn-toc-ink: #172033;
--mtn-toc-muted: #667085;
--mtn-toc-accent: var(--mtn-floating-headings-accent, #0081ff);
--mtn-toc-accent-soft: #e8f3ff;
--mtn-toc-accent-soft: color-mix(in srgb, var(--mtn-toc-accent) 11%, white);
margin: 26px 0 34px;
}
.mtn-floating-headings__card {
background: #fff;
border: 1px solid #e7eaf0;
border-radius: 14px;
box-shadow: 0 10px 35px rgba(16, 24, 40, 0.07);
overflow: hidden;
}
.mtn-floating-headings__header {
display: flex;
align-items: baseline;
gap: 10px;
padding: 18px 20px 13px;
border-bottom: 1px solid #edf0f4;
}
.mtn-floating-headings__eyebrow {
color: var(--mtn-toc-accent);
font-size: 10px;
font-weight: 700;
letter-spacing: .11em;
text-transform: uppercase;
}
.mtn-floating-headings__title {
color: var(--mtn-toc-ink);
font-size: 16px;
line-height: 1.3;
}
.mtn-floating-headings__scroll {
max-height: min(64vh, 520px);
overflow: auto;
padding: 10px;
scrollbar-width: thin;
scrollbar-color: #c7cdd6 transparent;
}
.mtn-floating-headings--inline .mtn-floating-headings__scroll {
max-height: none;
overflow: visible;
padding: 12px 14px 16px;
}
.mtn-floating-headings__scroll::-webkit-scrollbar { width: 6px; }
.mtn-floating-headings__scroll::-webkit-scrollbar-thumb { background: #c7cdd6; border-radius: 999px; }
.mtn-floating-headings__list { list-style: none; margin: 0; padding: 0; }
.mtn-floating-headings__item + .mtn-floating-headings__item { margin-top: 2px; }
.mtn-floating-headings__link {
display: block;
padding: 8px 10px;
border-radius: 7px;
color: #344054;
font-size: 13px;
font-weight: 500;
line-height: 1.35;
text-decoration: none;
transition: background-color .16s ease, color .16s ease, transform .16s ease;
}
.mtn-floating-headings__item--h3 .mtn-floating-headings__link {
padding-left: 24px;
color: var(--mtn-toc-muted);
font-size: 12px;
}
.mtn-floating-headings--inline .mtn-floating-headings__list {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
column-gap: 20px;
row-gap: 2px;
}
.mtn-floating-headings__link:hover,
.mtn-floating-headings__link:focus-visible {
background: #f5f7fa;
color: var(--mtn-toc-ink);
outline: none;
transform: translateX(2px);
}
.mtn-floating-headings__link.is-active {
background: var(--mtn-toc-accent-soft);
color: var(--mtn-toc-accent);
font-weight: 650;
box-shadow: inset 3px 0 0 var(--mtn-toc-accent);
}
.mtn-floating-headings-flyout {
--mtn-rail-width: 38px;
position: fixed;
top: 50%;
right: 18px;
width: 330px;
height: min(72vh, 620px);
z-index: 90;
opacity: 0;
transform: translateY(-50%) translateX(12px);
pointer-events: none;
transition: opacity .2s ease, transform .2s ease;
}
.mtn-floating-headings-flyout.is-enabled.is-visible {
opacity: 1;
transform: translateY(-50%);
pointer-events: auto;
}
.mtn-floating-headings-flyout .mtn-floating-headings__card {
position: absolute;
top: 50%;
right: calc(var(--mtn-rail-width) + 6px);
width: 280px;
opacity: 0;
transform: translate(10px, -50%) scale(.98);
transform-origin: right center;
visibility: hidden;
pointer-events: none;
transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.mtn-floating-headings-flyout:hover .mtn-floating-headings__card,
.mtn-floating-headings-flyout:focus-within .mtn-floating-headings__card,
.mtn-floating-headings-flyout.is-expanded .mtn-floating-headings__card {
opacity: 1;
transform: translate(0, -50%) scale(1);
visibility: visible;
pointer-events: auto;
transition-delay: 0s;
}
.mtn-floating-headings__rail {
position: absolute;
top: 50%;
right: 0;
display: flex;
align-items: center;
justify-content: center;
width: var(--mtn-rail-width);
min-height: 118px;
padding: 12px 7px;
border: 1px solid #e5e7eb;
border-radius: 12px;
background: rgba(255,255,255,.96);
box-shadow: 0 8px 24px rgba(16,24,40,.09);
transform: translateY(-50%);
cursor: pointer;
user-select: none;
}
.mtn-floating-headings__rail-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mtn-floating-headings__markers { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; width: 18px; }
.mtn-floating-headings__marker {
display: block;
width: 15px;
height: 2px;
border-radius: 99px;
background: #cfd4dc;
transition: width .16s ease, background-color .16s ease, height .16s ease;
}
.mtn-floating-headings__marker--h3 { width: 10px; }
.mtn-floating-headings__marker.is-active { width: 18px; height: 3px; background: var(--mtn-toc-accent); }
.post-details-content h2[data-mtn-heading-anchor],
.post-details-content h3[data-mtn-heading-anchor] { scroll-margin-top: 120px; }
.post-details-content h2, .post-details-content h3 { line-height: 1.2; }
.post-details-content h2 { font-size: 28px; margin-top: 34px; margin-bottom: 14px; }
.post-details-content h3 { font-size: 22px; margin-top: 26px; margin-bottom: 12px; }
[ta-theme=dark] .mtn-floating-headings,
[ta-theme=dark] .mtn-floating-headings-flyout { --mtn-toc-ink: #f4f6f8; --mtn-toc-muted: #a9b2c0; --mtn-toc-accent-soft: rgba(0,129,255,.2); --mtn-toc-accent-soft: color-mix(in srgb, var(--mtn-toc-accent) 20%, #171a21); }
[ta-theme=dark] .mtn-floating-headings__card,
[ta-theme=dark] .mtn-floating-headings__rail { background: #171a21; border-color: #303642; }
[ta-theme=dark] .mtn-floating-headings__header { border-color: #303642; }
[ta-theme=dark] .mtn-floating-headings__link { color: #d7dce3; }
[ta-theme=dark] .mtn-floating-headings__link:hover,
[ta-theme=dark] .mtn-floating-headings__link:focus-visible { background: #242933; color: #fff; }
[ta-theme=dark] .mtn-floating-headings__marker { background: #596273; }
[ta-theme=dark] .mtn-floating-headings__marker.is-active { background: #f4f6f8; }
@media (max-width: 1279px) { .mtn-floating-headings-flyout { display: none; } }
@media (max-width: 767px) {
.mtn-floating-headings--inline .mtn-floating-headings__list { grid-template-columns: 1fr; }
.mtn-floating-headings__header { display: block; }
.mtn-floating-headings__eyebrow { display: block; margin-bottom: 4px; }
.post-details-content h2 { font-size: 24px; }
.post-details-content h3 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
.mtn-floating-headings-flyout,
.mtn-floating-headings-flyout .mtn-floating-headings__card,
.mtn-floating-headings__link { transition: none; }
}