/* Numbered article contents: a quiet editorial rail on desktop, inline on mobile. */
.fpp-reading-layout, .fpp-reading-layout * { box-sizing: border-box; }
.fpp-reading-layout { display: block; }
.fpp-toc-rail { min-width: 0; max-width: 760px; margin: 0 auto 32px; }
.fpp-toc {
    --fpp-toc-ink: #191919;
    --fpp-toc-muted: #737373;
    --fpp-toc-line: #e5e5e5;
    color: var(--fpp-toc-ink);
    background: transparent;
    border: 0;
    border-top: 1px solid var(--fpp-toc-line);
    border-bottom: 1px solid var(--fpp-toc-line);
    padding: 14px 0 18px;
    font-family: "DM Sans", sans-serif;
    text-align: left;
}
.fpp-toc-header { display: flex; align-items: center; gap: 12px; min-height: 44px; flex-shrink: 0; }
.fpp-toc-title { font: 600 21px/1.3 "EB Garamond", Georgia, serif; letter-spacing: 0; }
.fpp-toc-count { margin-left: auto; color: var(--fpp-toc-muted); font-size: 11px; line-height: 1.5; white-space: nowrap; }
button.fpp-toc-toggle {
    appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    flex-shrink: 0; min-width: 44px; min-height: 44px; padding: 5px 0 5px 8px;
    margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
    color: var(--fpp-toc-muted); font: 400 11px/1.5 "DM Sans", sans-serif; letter-spacing: 0;
    text-transform: none; cursor: pointer;
}
.fpp-toc-toggle-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; font-size: 19px; font-weight: 400; line-height: 1; }
.fpp-toc .fpp-toc-list {
    list-style: none; margin: 10px 0 0; padding: 4px 0 0; border: 0;
    max-height: none; overflow: visible; min-height: 0;
}
.fpp-toc .fpp-toc-list[hidden] { display: none; }
.fpp-toc .fpp-toc-list li { list-style: none; padding: 0; margin: 0 0 4px; }
.fpp-toc .fpp-toc-list li:last-child { margin-bottom: 0; }
button.fpp-toc-topic {
    appearance: none; display: grid; grid-template-columns: 4.5ch minmax(0, 1fr); gap: 8px;
    width: 100%; min-height: 44px; padding: 9px 0; margin: 0; border: 0;
    border-radius: 0; background: transparent; color: #686868; box-shadow: none;
    font: 400 14px/1.65 "DM Sans", sans-serif; letter-spacing: 0; text-align: left;
    text-transform: none; white-space: normal; overflow-wrap: anywhere; cursor: pointer;
}
.fpp-toc-number { color: #737373; font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; line-height: 2.1; white-space: nowrap; }
.fpp-toc .fpp-toc-sublist { list-style: none; margin: 0; padding: 0 0 0 10px; border: 0; }
.fpp-toc .fpp-toc-subtopic > .fpp-toc-topic { font-size: 13px; grid-template-columns: 5ch minmax(0, 1fr); }
button.fpp-toc-topic:hover, button.fpp-toc-toggle:hover { background: transparent; color: var(--fpp-toc-ink); }
button.fpp-toc-topic[aria-current="location"] { color: var(--fpp-toc-ink); font-weight: 500; }
.fpp-toc-topic[aria-current="location"] .fpp-toc-text { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
button.fpp-toc-topic:focus-visible, button.fpp-toc-toggle:focus-visible { outline: 1px solid #555; outline-offset: 3px; background: transparent; }
.fpp-toc-target:focus-visible { outline: 1px solid #777; outline-offset: 6px; }

@media (max-width: 400px) {
    .fpp-toc { padding: 12px 0 16px; }
    .fpp-toc-header { gap: 8px; }
    .fpp-toc-toggle-label { display: none; }
}
@media (min-width: 1200px) {
    .fpp-reading-layout { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 40px; justify-content: center; align-items: stretch; }
    .fpp-toc-rail { max-width: none; margin: 0; }
    .fpp-toc { position: sticky; top: 28px; display: flex; flex-direction: column; max-height: none; padding: 0 18px 0 0; border: 0; background: transparent; }
    body.admin-bar .fpp-toc { top: 60px; max-height: none; }
    .fpp-toc.is-long { position: static; }
    .fpp-toc-header { flex-wrap: wrap; gap: 2px 8px; }
    .fpp-toc-title { flex: 1 1 100%; }
    .fpp-toc-count { margin-left: 0; }
    button.fpp-toc-toggle { margin-left: auto; }
    .fpp-toc .fpp-toc-list { flex: 0 1 auto; max-height: none; overflow: visible; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--fpp-toc-line); }
    button.fpp-toc-topic { min-height: 34px; padding-block: 8px; }
    body.single-post .site-main article .fpp-reading-layout > .entry-content { width: 100%; max-width: 760px; min-width: 0; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .fpp-toc, .fpp-toc * { scroll-behavior: auto; }
}
