.doc-hero {
    position: relative;
    overflow: hidden;
    padding: 46px 0 40px;
    background: var(--emerald-950);
    color: #f4efe1;
}
.doc-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .16;
    filter: saturate(.7);
}
.doc-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 29, 22, .55), rgba(5, 29, 22, .92));
}
.doc-hero .container { position: relative; z-index: 1; }
.doc-hero .breadcrumb { color: rgba(244, 239, 225, .72); }
.doc-hero .breadcrumb a { color: inherit; }
.doc-hero-body {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, .7fr);
    gap: 38px;
    align-items: center;
    margin-top: 18px;
}
.doc-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--gold-300);
    border: 1px solid rgba(232, 212, 154, .35);
    border-radius: 999px;
    padding: 5px 14px;
}
.doc-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.35;
    margin: 14px 0 12px;
    color: #fffdf6;
}
.doc-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    font-size: 13.5px;
    color: rgba(244, 239, 225, .82);
}
.doc-meta-item { display: inline-flex; align-items: center; gap: 7px; }
.doc-meta-item::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--gold-400);
    transform: rotate(45deg);
    flex: none;
}
.doc-meta-link { color: var(--gold-300); font-weight: 700; }
.doc-people {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 13px;
}
.doc-people-label { color: rgba(244, 239, 225, .62); margin-inline-end: 2px; }
.doc-people a {
    display: inline-flex;
    align-items: center;
    padding: 4px 13px;
    border: 1px solid rgba(232, 212, 154, .35);
    border-radius: 999px;
    color: var(--gold-300);
    text-decoration: none;
    transition: .25s var(--ease);
}
.doc-people a:hover { background: rgba(232, 212, 154, .12); border-color: var(--gold-400); }
.doc-intro {
    max-width: 68ch;
    margin: 18px 0 0;
    color: rgba(240, 235, 220, .85);
    line-height: 1.95;
    font-size: 15px;
}
.doc-hero-cover {
    justify-self: end;
    width: min(100%, 280px);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(232, 212, 154, .35);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
    transform: rotate(-2.5deg);
    background: #e8e0cf;
}
.doc-hero-cover img { display: block; width: 100%; height: 300px; object-fit: cover; }

.doc-section { padding-top: 34px; }
.doc-toolbar {
    position: sticky;
    top: calc(var(--header-h) - 1px);
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 253, 248, .96);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}
.doc-tab {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    padding: 11px 20px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background .2s, color .2s, border-color .2s;
}
.doc-tab:hover:not(:disabled) { background: var(--sand-100); border-color: var(--line); }
.doc-tab.is-active { background: var(--emerald-800); color: #fffdf6; }
.doc-tab:disabled { opacity: .5; cursor: not-allowed; }
.doc-tab-print { border-color: var(--line); background: #fff; }
.doc-tab-print:hover { background: var(--gold-300); border-color: var(--gold-400); }
.doc-tab-pdf { margin-inline-start: auto; border-color: var(--line); background: #fff; }
.doc-tab-pdf:hover { background: var(--gold-300); border-color: var(--gold-400); }
.doc-tab-wa { border-color: var(--line); background: #fff; color: #1a7f45; }
.doc-tab-wa:hover:not(:disabled) { background: #e8f6ee; border-color: #9fd3b3; }
.doc-tab-speak { border-color: var(--line); background: #fff; }
.doc-tab-speak:hover:not(:disabled) { background: var(--sand-100); }
.doc-tab-speak.is-speaking { background: var(--gold-300); border-color: var(--gold-500); color: #3b2c0a; }
.doc-speech-status {
    flex-basis: 100%;
    display: none;
    padding: 2px 6px 0;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.8;
    color: var(--emerald-600);
}
.doc-speech-status:not(:empty) { display: block; }
.doc-speech-status.is-error { color: #9a2f2f; }

.doc-adminbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(201, 162, 75, .1);
    border: 1px dashed rgba(176, 138, 38, .45);
    border-radius: 14px;
    font-size: 13px;
}
.doc-adminbar-label { font-weight: 700; color: var(--gold-700); margin-inline-end: 4px; }
.doc-chip {
    appearance: none;
    border: 1px solid rgba(176, 138, 38, .35);
    background: #fffdf7;
    color: var(--ink-soft);
    border-radius: 999px;
    padding: 7px 13px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.doc-chip:hover { border-color: var(--gold-500); color: var(--gold-700); }
.doc-copy-status { font-size: 12.5px; color: var(--emerald-600); font-weight: 700; }

.doc-sheets {
    max-width: 980px;
    margin: 26px auto 0;
    display: grid;
    gap: 26px;
}
.doc-sheet {
    margin: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 14px 10px;
    box-shadow: var(--shadow);
}
.doc-sheet-frame { position: relative; overflow: hidden; border-radius: 10px; background: #efe9db; }
.doc-sheet-frame img {
    display: block;
    width: 100%;
    height: auto;
    -webkit-user-drag: none;
    user-select: none;
}
.doc-sheet figcaption {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 10px 4px 2px;
    font-size: 12.5px;
    color: var(--muted);
}
.doc-sheet-count { font-variant-numeric: tabular-nums; color: var(--gold-700); font-weight: 700; }

.doc-watermark {
    position: absolute;
    inset: -18%;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 20px 42px;
    transform: rotate(-24deg);
    opacity: .075;
    pointer-events: none;
    user-select: none;
}
.doc-watermark span {
    font-size: 20px;
    font-weight: 700;
    color: #2a1c05;
    white-space: nowrap;
}

.doc-protect-note {
    max-width: 760px;
    margin: 24px auto 0;
    padding: 13px 16px;
    background: var(--sand-100);
    border: 1px dashed var(--line-strong);
    border-radius: 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
    text-align: center;
}

.doc-modern-paper {
    max-width: 880px;
    margin: 26px auto 0;
    background: #fffdf6;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: clamp(26px, 5vw, 56px);
    box-shadow: var(--shadow);
    font-family: var(--font-body);
}
.doc-modern-head { text-align: center; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.doc-modern-kicker { font-size: 12px; font-weight: 700; color: var(--gold-700); letter-spacing: .05em; }
.doc-modern-head h2 {
    font-family: var(--font-display);
    font-size: clamp(23px, 3vw, 32px);
    margin: 10px 0 8px;
    color: var(--ink);
    line-height: 1.5;
}
.doc-modern-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 16px;
    font-size: 12.5px;
    color: var(--muted);
}
.doc-modern-body { padding-top: 24px; }
.doc-modern-body p {
    font-size: clamp(16px, 1.15vw + 12px, 19px);
    line-height: 2.2;
    color: #22322b;
    margin: 0 0 1.1em;
    text-align: justify;
}
.doc-modern-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-top: 30px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--muted);
}
.doc-modern-foot a { color: var(--emerald-600); font-weight: 700; }

.doc-empty {
    max-width: 680px;
    margin: 30px auto 0;
    text-align: center;
    padding: 46px 24px;
    background: #fffdf7;
    border: 1px dashed var(--line-strong);
    border-radius: 18px;
}
.doc-empty-icon { color: var(--gold-600); display: flex; justify-content: center; margin-bottom: 12px; }
.doc-empty h2 { font-family: var(--font-display); font-size: 25px; margin: 0 0 8px; }
.doc-empty p { color: var(--muted); line-height: 1.9; margin: 0 auto 18px; max-width: 46ch; }

.doc-related-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.doc-related-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.doc-protected .doc-sheet img,
.doc-protected .doc-hero-cover img,
.doc-protected .doc-watermark { pointer-events: none; }
.doc-protected .doc-sheet-frame,
.doc-protected .doc-modern-paper {
    -webkit-touch-callout: none;
    user-select: none;
}

@media (max-width: 900px) {
    .doc-hero-body { grid-template-columns: 1fr; gap: 22px; }
    .doc-hero-cover { justify-self: start; width: 160px; transform: none; }
    .doc-hero-cover img { height: 190px; }
    .doc-toolbar { position: static; }
    .doc-tab { flex: 1 1 auto; justify-content: center; padding: 11px 14px; }
    .doc-tab-print, .doc-tab-pdf { margin-inline-start: 0; }
}

@media print {
    @page { margin: 14mm; }
    body { background: #fff !important; }
    .topbar, .site-header, .site-footer, .to-top, .skip-link, .toast-stack,
    .lightbox, .fatiha-modal, .doc-toolbar, .doc-adminbar, .doc-related,
    .doc-protect-note, .doc-hero-bg, .doc-hero-cover, .doc-watermark,
    .doc-hero .breadcrumb { display: none !important; }
    .doc-hero {
        background: #fff !important;
        color: #111 !important;
        padding: 0 0 18px !important;
        border-bottom: 1px solid #bbb;
    }
    .doc-hero::after { display: none !important; }
    .doc-hero h1 { color: #111 !important; font-size: 26px; }
    .doc-kicker { color: #6b5315 !important; border-color: #c9a24b; }
    .doc-meta, .doc-intro { color: #333 !important; }
    .doc-people { color: #333 !important; }
    .doc-people-label { color: #555 !important; }
    .doc-people a { color: #333 !important; border-color: #c9a24b; }
    .doc-section { padding: 0 !important; }
    .doc-panel[hidden] { display: none !important; }
    .doc-sheets { margin-top: 14px; gap: 16px; }
    .doc-sheet {
        box-shadow: none !important;
        border: 0 !important;
        padding: 0 !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .doc-sheet-frame img { width: 100%; }
    .doc-sheet figcaption { color: #444; font-size: 10px; }
    .doc-modern-paper {
        box-shadow: none !important;
        border: 0 !important;
        padding: 0 !important;
        max-width: none;
    }
    .doc-modern-head { padding-bottom: 14px; }
    .doc-modern-body p { font-size: 13pt; line-height: 1.9; }
    .doc-modern-foot { margin-top: 18px; }
    .doc-empty { border: 0; }
}
