:root {
    --pb-navy: #173b59;
    --pb-blue: #27556f;
    --pb-gold: #d4ad43;
    --pb-cream: #fbf7ee;
    --pb-pale-blue: #eef5f8;
    --pb-text: #293943;
    --pb-border: #e3ca83;
}

.pb-viewer {
    max-width: 920px;
    margin: 1.5rem auto;
    color: var(--pb-text);
    font-family: Arial, Helvetica, sans-serif;
}

.pb-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    margin-bottom: .75rem;
    border: 1px solid #d8e0e5;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 3px 16px rgba(23, 59, 89, .08);
}

.pb-language-label {
    display: grid;
    gap: .35rem;
    min-width: min(100%, 250px);
    color: var(--pb-navy);
    font-size: .84rem;
    font-weight: 700;
}

.pb-language-select {
    min-height: 42px;
    padding: .45rem 2.2rem .45rem .7rem;
    border: 1px solid #9aaeb9;
    border-radius: 6px;
    background-color: #fff;
    color: #162f42;
    font-size: 1rem;
}

.pb-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .55rem;
}

.pb-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: .5rem .9rem;
    border: 1px solid var(--pb-navy);
    border-radius: 6px;
    background: var(--pb-navy);
    color: #fff !important;
    text-decoration: none !important;
    cursor: pointer;
}

.pb-button:hover,
.pb-button:focus {
    background: #0e293f;
}

.pb-button-secondary {
    background: #fff;
    color: var(--pb-navy) !important;
}

.pb-button:disabled,
.pb-language-select:disabled {
    cursor: wait;
    opacity: .6;
}

.pb-status {
    min-height: 1.25rem;
    margin: 0 0 .4rem;
    color: var(--pb-blue);
    font-size: .9rem;
}

.pb-status:empty {
    display: none;
}

.pb-status-loading {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem 1rem;
    border-radius: 8px;
    background: var(--pb-pale-blue);
}

.pb-hourglass {
    display: inline-block;
    flex: 0 0 auto;
    font-size: 1.15rem;
    line-height: 1.3;
    transform-origin: center;
    animation: pb-hourglass-turn 2s ease-in-out infinite alternate;
}

.pb-status-message {
    min-width: 0;
    overflow-wrap: anywhere;
}

@keyframes pb-hourglass-turn {
    0%, 20% { transform: rotate(0deg); }
    80%, 100% { transform: rotate(180deg); }
}

@media (prefers-reduced-motion: reduce) {
    .pb-hourglass { animation: none; }
}

.pb-content-host[aria-busy="true"] {
    opacity: .68;
    transition: opacity .15s ease;
}

.pb-ai-notice {
    padding: .75rem 1rem;
    margin: 0 0 1rem;
    border-left: 4px solid var(--pb-gold);
    background: #fffaf0;
    font-size: .92rem;
}

.pb-audio-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin: 0 0 1rem;
    border-radius: 8px;
    background: var(--pb-pale-blue);
}

.pb-audio-panel[hidden] {
    display: none;
}

.pb-audio-panel audio {
    flex: 1 1 420px;
    max-width: 100%;
}

.pb-audio-download {
    color: var(--pb-navy);
    font-weight: 700;
}

.pb-brochure {
    overflow: hidden;
    border: 1px solid var(--pb-border);
    background: #fff;
    box-shadow: 0 8px 30px rgba(23, 59, 89, .09);
}

.pb-cover,
.pb-page,
.pb-chapter,
.pb-summary {
    padding: clamp(1.5rem, 5vw, 4.5rem);
    border-bottom: 1px solid #ebdfbf;
}

.pb-cover {
    display: grid;
    place-items: center;
    min-height: 620px;
    text-align: center;
}

.pb-kicker,
.pb-eyebrow,
.pb-label,
.pb-cover-subtitle,
.pb-draft-label {
    color: #a67f1e;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.pb-cover h1,
.pb-page h2,
.pb-chapter h2,
.pb-summary h2,
.pb-feature h2 {
    margin: .45rem 0;
    color: var(--pb-navy);
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    line-height: 1.15;
}

.pb-cover h1 {
    max-width: 600px;
    font-size: clamp(2.25rem, 7vw, 4.4rem);
}

.pb-author {
    margin: 0;
    color: #697983;
}

.pb-motif {
    position: relative;
    width: min(100%, 520px);
    height: 210px;
    margin: 2.4rem auto;
    background: linear-gradient(155deg, transparent 49.5%, rgba(212, 173, 67, .24) 50%) left bottom / 50% 100% no-repeat,
                linear-gradient(205deg, transparent 49.5%, rgba(212, 173, 67, .24) 50%) right bottom / 50% 100% no-repeat;
}

.pb-motif::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 50%;
    width: 112px;
    height: 112px;
    border: 2px solid rgba(212, 173, 67, .65);
    border-radius: 50%;
    box-shadow: 0 0 0 14px rgba(212, 173, 67, .15), 0 0 0 28px rgba(212, 173, 67, .11), 0 0 0 42px rgba(212, 173, 67, .08);
    transform: translateX(-50%);
}

.pb-motif::after {
    content: '';
    position: absolute;
    right: 12%;
    bottom: 20px;
    left: 12%;
    height: 2px;
    background: #8cabb9;
}

.pb-draft-label {
    margin-top: .45rem;
    color: var(--pb-navy);
}

.pb-lead {
    margin: 0 0 1.7rem;
    color: #5c6e79;
    font-size: 1.05rem;
}

.pb-card,
.pb-editorial,
.pb-quote,
.pb-summary-item {
    padding: 1.15rem 1.25rem;
    margin: 1rem 0;
    border: 0;
    border-left: 4px solid var(--pb-gold);
    background: var(--pb-cream);
}

.pb-card-important,
.pb-quote-primary {
    border-left-color: #86adbd;
    background: var(--pb-pale-blue);
}

.pb-card p,
.pb-editorial p,
.pb-summary-item p {
    margin: .35rem 0 0;
    line-height: 1.58;
}

.pb-toc {
    display: grid;
    gap: .35rem;
    padding: 0;
    margin: 1.5rem 0 0;
    list-style: none;
}

.pb-toc a {
    color: var(--pb-navy);
    text-decoration: none;
}

.pb-toc-number,
.pb-chapter-number {
    margin-right: .55rem;
    color: var(--pb-gold);
    font-weight: 700;
}

.pb-rule {
    width: 55px;
    height: 3px;
    margin: .75rem 0 1.5rem;
    background: var(--pb-gold);
}

.pb-quote {
    text-align: center;
}

.pb-quote p {
    margin: 0;
    color: var(--pb-navy);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    font-style: italic;
    line-height: 1.45;
}

.pb-quote cite {
    display: block;
    margin-top: .75rem;
    color: #6d7b83;
    font-family: Arial, Helvetica, sans-serif;
    font-size: .73rem;
    font-style: normal;
    line-height: 1.4;
}

.pb-feature {
    padding: clamp(2rem, 7vw, 5.5rem);
    text-align: center;
    background: linear-gradient(180deg, #fff, #fffdf8);
}

.pb-feature .pb-quote {
    max-width: 700px;
    padding: 2rem;
    margin: 2rem auto 0;
    border-left: 0;
    background: transparent;
}

.pb-feature .pb-quote p {
    font-size: clamp(1.4rem, 4vw, 2rem);
}

.pb-summary-list {
    display: grid;
    gap: .65rem;
}

.pb-summary-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: .75rem;
    margin: 0;
    border-left: 0;
}

.pb-summary-dot {
    color: var(--pb-gold);
    font-size: 1.4rem;
    line-height: 1;
}

.pb-summary-item h3 {
    margin: 0;
    color: var(--pb-navy);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
}

.pb-publication-note {
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 2px solid var(--pb-gold);
}

.pb-publication-note p {
    line-height: 1.55;
}

.pb-footer-note {
    margin-top: 2rem;
    color: #7a6d51;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-align: center;
    text-transform: uppercase;
}

.pb-book-language-note {
    display: block;
    margin-top: .55rem;
    color: #75694f;
    font-size: .86rem;
    font-style: italic;
    line-height: 1.45;
}

@media (max-width: 640px) {
    .pb-toolbar,
    .pb-audio-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .pb-actions,
    .pb-button {
        width: 100%;
    }

    .pb-language-label {
        width: 100%;
    }

    .pb-cover {
        min-height: 500px;
    }
}

@media print {
    .pb-toolbar,
    .pb-status,
    .pb-ai-notice,
    .pb-audio-panel {
        display: none !important;
    }

    .pb-brochure {
        border: 0;
        box-shadow: none;
    }

    .pb-cover,
    .pb-page,
    .pb-chapter,
    .pb-summary,
    .pb-feature {
        break-inside: avoid;
    }
}
