/**
 * Unified resume.php — application kit (letters & emails)
 */

body.cv-body--unified {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 110, 200, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 100%, rgba(201, 169, 98, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, var(--royal-deep, #070d1a) 0%, var(--royal-void, #030711) 100%);
    color: var(--royal-platinum, #e8ecf2);
    min-height: 100vh;
}

.unified-wrap {
    max-width: 900px;
    margin: 0 auto 48px;
    padding: 0 12px 48px;
}

.unified-nav__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.unified-nav {
    max-width: 900px;
    margin: 0 auto 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    position: sticky;
    top: 12px;
    z-index: 100;
}

.unified-nav__brand {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 11pt;
    color: #e8d5a3;
    margin-right: auto;
    text-decoration: none;
}

.unified-nav__tab {
    font-size: 8.5pt;
    font-weight: 600;
    text-decoration: none;
    color: #9aa6ba;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.unified-nav__tab:hover {
    border-color: rgba(201, 169, 98, 0.35);
    color: #e8d5a3;
}

.unified-nav__tab.is-active {
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.25) 0%, rgba(138, 115, 64, 0.35) 100%);
    border-color: rgba(201, 169, 98, 0.45);
    color: #fff;
}

.unified-nav__print {
    font-size: 8.5pt;
    font-weight: 700;
    padding: 8px 16px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #c9a962, #8a7340);
    color: #0a0e14;
    cursor: pointer;
}

.unified-nav__print:hover {
    filter: brightness(1.08);
}

.unified-pack {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 16px 40px;
    border-radius: 0 0 var(--royal-radius, 18px) var(--royal-radius, 18px);
    margin-bottom: 24px;
}

.unified-pack .cv-document {
    margin: 0 auto 32px;
}

/* Kit sections */
.kit-pack {
    background: #fff;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.kit-pack__header {
    padding: 28px 32px 20px;
    border-bottom: 2px solid #0c2340;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.kit-pack__title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 20pt;
    color: #0c2340;
    margin-bottom: 8px;
}

.kit-pack__intro {
    font-size: 10pt;
    color: #5a6475;
    line-height: 1.5;
    max-width: 560px;
}

.kit-section-label {
    font-size: 9pt;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9a7b4f;
    padding: 20px 32px 8px;
    margin: 0;
    background: #f4f6f8;
    border-top: 1px solid #e2e8f0;
}

.kit-page {
    padding: 28px 32px 32px;
    border-bottom: 1px solid #e8ecf0;
    break-inside: avoid;
    page-break-inside: avoid;
}

.kit-letter__title,
.kit-email__title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 13pt;
    color: #0c2340;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d4dae3;
}

.kit-letter__recipient {
    font-size: 10pt;
    color: #4a5568;
    margin-bottom: 16px;
    line-height: 1.5;
}

.kit-letter p,
.kit-email__body {
    font-size: 10pt;
    line-height: 1.6;
    color: #374455;
    margin-bottom: 12px;
}

.kit-letter__sig {
    margin-top: 20px;
    font-weight: 600;
    color: #0c2340;
}

.kit-email__subject {
    font-size: 10pt;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: #f4f1ec;
    border-left: 3px solid #9a7b4f;
}

.kit-email__body {
    white-space: pre-line;
}

/* Docs hub */
.kit-hub {
    max-width: 800px;
    margin: 0 auto 24px;
    padding: 40px 28px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: var(--royal-radius, 18px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.kit-hub__title {
    font-family: var(--royal-font-display, 'Cormorant Garamond', Georgia, serif);
    font-size: 22pt;
    color: var(--royal-gold-light, #e8d5a3);
}

.kit-hub__intro {
    color: var(--royal-silver, #9aa6ba);
    margin: 8px 0 24px;
}

.kit-hub__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.kit-hub__card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px;
    border-radius: var(--royal-radius-sm, 12px);
    background: rgba(255, 255, 255, 0.04);
}

.kit-hub__card--primary {
    border-color: rgba(201, 169, 98, 0.35);
    background: rgba(201, 169, 98, 0.08);
}

.kit-hub__card h3 {
    font-size: 11pt;
    color: var(--royal-platinum, #e8ecf2);
    margin-bottom: 8px;
}

.kit-hub__card p {
    font-size: 9pt;
    color: var(--royal-silver, #9aa6ba);
    margin-bottom: 14px;
    line-height: 1.45;
}

.kit-hub__btn {
    display: inline-block;
    font-size: 8.5pt;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--royal-platinum, #e8ecf2);
    border-radius: 999px;
}

.kit-hub__btn:hover {
    border-color: rgba(201, 169, 98, 0.4);
    color: var(--royal-gold-light, #e8d5a3);
}

.kit-hub__btn--gold {
    background: linear-gradient(135deg, #c9a962, #8a7340);
    border-color: rgba(201, 169, 98, 0.5);
    color: #0a0e14;
}

.kit-hub__back {
    margin-top: 28px;
    font-size: 10pt;
}

.kit-hub__back a {
    color: var(--royal-gold, #c9a962);
}

@media print {
    .unified-nav,
    .no-print {
        display: none !important;
    }

    .unified-pack {
        background: #fff;
        padding: 0;
    }

    .kit-pack {
        box-shadow: none;
    }

    .kit-page,
    .kit-section-label {
        page-break-inside: avoid;
    }

    .kit-page {
        page-break-after: always;
    }

    .kit-page:last-child {
        page-break-after: auto;
    }

    @page {
        size: A4;
        margin: 14mm;
    }
}

/* ── Enterprise kit enhancements ── */
.kit-pack__hero {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 24px;
    padding: 32px 32px 24px;
    background: linear-gradient(135deg, #0c2340 0%, #162a45 50%, #0c2340 100%);
    color: #fff;
    border-bottom: 3px solid #9a7b4f;
}

.kit-pack__eyebrow {
    font-size: 8pt;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #d4bc7a;
    margin-bottom: 8px;
}

.kit-pack__hero .kit-pack__title {
    color: #fff;
    font-size: 22pt;
    margin-bottom: 12px;
}

.kit-pack__hero .kit-pack__intro {
    color: #c5cdd9;
    max-width: none;
}

.kit-pack__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    font-size: 9pt;
}

.kit-pack__stats strong {
    color: #e8d5a3;
    font-size: 11pt;
}

.kit-toc {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(201, 169, 98, 0.25);
    border-radius: 8px;
    padding: 16px;
    font-size: 9pt;
}

.kit-toc__label {
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9a7b4f;
    margin-bottom: 10px;
}

.kit-toc a {
    display: block;
    color: #e8ecf2;
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.kit-toc a:hover {
    color: #e8d5a3;
}

.kit-page__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.kit-badge {
    font-size: 7.5pt;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    background: #f4f1ec;
    color: #7a6340;
    border-radius: 999px;
    border: 1px solid #d4bc7a;
}

.kit-copy {
    font-size: 8pt;
    font-weight: 700;
    padding: 6px 12px;
    border: 1px solid #0c2340;
    background: #fff;
    color: #0c2340;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kit-copy:hover {
    background: #0c2340;
    color: #fff;
}

.kit-copy.is-copied {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
}

.kit-pack__footer {
    padding: 24px 32px 32px;
    background: #f4f6f8;
    font-size: 10pt;
    color: #5a6475;
    border-top: 1px solid #e2e8f0;
}

.kit-pack__footer a {
    color: #0c2340;
    font-weight: 600;
}

.unified-nav__mark {
    border-radius: 6px;
    vertical-align: middle;
    margin-right: 6px;
}

.unified-nav__wa {
    font-size: 8.5pt;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    background: #25d366;
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.unified-nav__wa:hover {
    filter: brightness(1.08);
    color: #fff !important;
}

@media (max-width: 900px) {
    .kit-pack__hero {
        grid-template-columns: 1fr;
    }

    .kit-toc {
        order: -1;
    }
}

@media (max-width: 640px) {
    .unified-nav__brand {
        width: 100%;
        margin-bottom: 4px;
    }

    .kit-pack__hero,
    .kit-page {
        padding-left: 20px;
        padding-right: 20px;
    }
}
