/* Browsing and reading enhancements; the original page remains usable without JavaScript. */
.opc-browse-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.opc-browse-shortcuts a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text); font-size: 14px; font-weight: 700; }
.opc-browse-shortcuts a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
[data-reading-guide][hidden], [data-reader-toc][hidden], [data-reader-resume][hidden], [data-home-continue][hidden] { display: none !important; }
.opc-continue-card { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 16px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.opc-continue-card > div { display: grid; gap: 5px; min-width: 0; }
.opc-continue-card a { font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.opc-continue-card button { flex-shrink: 0; }
.opc-continue-card button, .opc-reading-controls button, .opc-reading-controls > a, .opc-reading-toc summary, .opc-reading-resume button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font-size: 13px; font-weight: 700; cursor: pointer; }
.opc-reading-bar { position: sticky; top: 0; z-index: 40; display: grid; gap: 6px; padding: 8px 10px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 6px 18px rgba(18, 40, 68, .08); }
.opc-reader-page { width: 100%; max-width: 960px; margin-inline: auto; }
.opc-reading-controls { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.opc-reading-controls > a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.opc-reading-controls > a:hover, .opc-reading-controls button:hover, .opc-reading-toc summary:hover { color: var(--accent); border-color: var(--accent); }
.opc-reading-controls button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.opc-reading-toc summary { display: flex; align-items: center; list-style: none; }
.opc-reading-toc summary::-webkit-details-marker { display: none; }
.opc-reading-toc summary::after { content: '⌄'; margin-left: 6px; }
.opc-reading-toc[open] summary::after { content: '⌃'; }
.opc-reading-toc nav { position: absolute; left: 0; right: 0; top: calc(100% + 6px); display: grid; gap: 3px; box-sizing: border-box; max-height: 42vh; overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 16px 30px rgba(18, 40, 68, .16); }
.opc-reading-toc a { display: block; padding: 10px 12px; min-height: 42px; border-radius: 8px; color: var(--text); font-size: 14px; }
.opc-reading-toc a:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.opc-reading-toc a.opc-toc-subsection { padding-left: 26px; font-size: 13px; }
.opc-reading-progress { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.opc-reading-progress progress { display: block; width: 100%; height: 4px; border: 0; border-radius: 4px; accent-color: var(--accent); background: var(--line); }
.opc-reading-progress progress::-webkit-progress-bar { background: var(--line); border-radius: 4px; }
.opc-reading-progress progress::-webkit-progress-value { background: var(--accent); border-radius: 4px; }
.opc-reading-progress progress::-moz-progress-bar { background: var(--accent); border-radius: 4px; }
.opc-reading-progress span { min-width: 3.5em; text-align: right; }
.opc-reading-resume { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line); }
.opc-reading-resume button:first-child { color: var(--accent); }
.opc-focus-reading .opc-playground-promo, .opc-focus-reading .opc-contact-float { display: none; }
.opc-calendar-strip.is-loading { pointer-events: auto; }
body.opc-body.opc-list-restored [data-reveal] { animation: none !important; transform: none !important; opacity: 1 !important; }
.opc-browse-shortcuts a:focus-visible, .opc-reading-bar a:focus-visible, .opc-reading-bar button:focus-visible, .opc-reading-bar summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.opc-search-form input[type="search"], .opc-search-form input[type="text"] { font-size: 16px; min-width: 0; }
@media (min-width: 769px) { .opc-reading-controls .opc-reading-font { display: none; } }
@media (max-width: 768px) {
    .opc-browse-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 2px; }
    .opc-browse-shortcuts a { padding: 8px 3px; font-size: 12px; justify-content: center; white-space: nowrap; }
    .opc-home-topic-strip .opc-section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .opc-home-topic-strip .opc-section-head h2 { font-size: 24px; }
    .opc-home-topic-strip .opc-topic-related { gap: 8px 14px; }
    .opc-home-topic-strip .opc-home-topic-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .opc-home-topic-strip .opc-home-topic-chip { min-width: 0; width: auto; }
    .opc-home-topic-strip .opc-home-topic-chip span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
    .opc-reader-page .opc-detail-title-row h1 { font-size: clamp(28px, 7.4vw, 36px); line-height: 1.35; }
    .opc-reading-bar { padding: 7px; border-radius: 14px; }
    .opc-reading-controls { gap: 5px; }
    .opc-reading-controls > a, .opc-reading-controls button, .opc-reading-toc summary { padding: 7px 8px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .opc-reading-bar *, .opc-browse-shortcuts * { scroll-behavior: auto; } }
