/* Flip-book reader: pairs with StPageFlip (page-flip) and user-manual-book.js */

.manual-hero {
    padding: 2rem 0 1rem;
    text-align: center;
}

.manual-hero .eyebrow {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--muted, #8b92b0);
    margin-bottom: 0.5rem;
}

.manual-hero-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin: 0 0 0.5rem;
}

.manual-hero-lede {
    max-width: 42rem;
    margin: 0 auto 1.25rem;
    color: var(--muted, #a8b0d0);
    line-height: 1.55;
}

.manual-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.5rem;
}

.manual-page-indicator {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.85rem;
    color: var(--muted, #9aa3c4);
    min-width: 8rem;
    text-align: center;
}

.manual-btn {
    min-width: 7rem;
}

.manual-book-status {
    text-align: center;
    margin: 0 auto 1rem;
    min-height: 1.5rem;
    color: var(--muted, #9aa3c4);
    font-size: 0.95rem;
}

.manual-book-status-loading strong {
    color: #e8eaf4;
}

.manual-book-status--error,
.manual-book-status .manual-book-status-error {
    color: #f0a4a4;
}

.manual-book-status--hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.manual-book-shell--empty {
    min-height: 160px;
}

.manual-book-shell {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto 4rem;
    padding: 0 12px 48px;
    min-height: min(78vh, 820px);
}

.imas-book-root {
    margin: 0 auto;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    border-radius: 6px;
}

.imas-book-page {
    background: linear-gradient(145deg, #fdfdfb 0%, #f4f1ea 100%);
    color: #1a1d26;
}

.imas-book-page-inner {
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.25rem 1.35rem 1.5rem;
    box-sizing: border-box;
    font-size: 0.92rem;
    line-height: 1.55;
}

.imas-book-page-inner h1,
.imas-book-page-inner h2,
.imas-book-page-inner h3,
.imas-book-page-inner h4 {
    color: #0a0e27;
    line-height: 1.25;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.imas-book-page-inner h1:first-child,
.imas-book-page-inner h2:first-child,
.imas-book-page-inner h3:first-child {
    margin-top: 0;
}

.imas-book-page-inner p {
    margin: 0.5rem 0;
}

.imas-book-page-inner ul,
.imas-book-page-inner ol {
    margin: 0.35rem 0 0.75rem 1.1rem;
    padding: 0;
}

.imas-book-page-inner table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    margin: 0.75rem 0;
}

.imas-book-page-inner th,
.imas-book-page-inner td {
    border: 1px solid #c9c3b8;
    padding: 0.35rem 0.45rem;
    vertical-align: top;
}

.imas-book-page-inner th {
    background: rgba(10, 14, 39, 0.06);
}

.imas-book-page-inner hr {
    border: none;
    border-top: 1px solid #d5d0c6;
    margin: 1rem 0;
}

.imas-book-page-inner code {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.84em;
    background: rgba(10, 14, 39, 0.06);
    padding: 0.08em 0.28em;
    border-radius: 4px;
}

.imas-book-page-inner pre {
    background: #0a0e27;
    color: #e8eaf4;
    padding: 0.75rem 0.85rem;
    border-radius: 6px;
    overflow: auto;
    font-size: 0.8rem;
}

.imas-book-page-inner pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.imas-book-page-inner a {
    color: #1e4ed8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.book-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    min-height: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
    background: linear-gradient(160deg, #0f1533 0%, #1a2347 40%, #0a0e27 100%);
    color: #e8eaf4;
}

.book-cover-back {
    background: linear-gradient(200deg, #0a0e27 0%, #151c3d 55%, #0f1533 100%);
}

.book-cover-logo {
    opacity: 0.95;
    margin-bottom: 1rem;
}

.book-cover-title {
    font-size: 1.65rem;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.book-cover-sub {
    margin: 0 0 1rem;
    color: #9aa3c4;
    font-size: 0.95rem;
}

.book-cover-version,
.book-cover-lead {
    font-size: 0.88rem;
    color: #b4bdd9;
    max-width: 22rem;
    margin: 0.35rem 0;
    line-height: 1.5;
}

.book-cover-thanks {
    font-size: 1.15rem;
    margin: 0 0 0.75rem;
}

.book-cover-note {
    font-size: 0.88rem;
    color: #b4bdd9;
    max-width: 24rem;
    margin: 0 0 1rem;
    line-height: 1.5;
}

.book-cover-legal {
    margin: 0;
    color: #7d869f;
}

/* Discourage treating the reader as a printable document (content still in the DOM). */
@media print {
    body * {
        visibility: hidden !important;
    }

    body::after {
        visibility: visible !important;
        content: "This manual is provided for on-screen viewing only.";
        display: block;
        position: fixed;
        left: 0;
        top: 40%;
        width: 100%;
        text-align: center;
        font-size: 14pt;
        color: #000;
    }
}
