/* ============================================
   Alabs PROPOSALGEN — Master Stylesheet
   ============================================ */

/* === Global Reset & Base === */
body {
    background-color: #525252;
    margin: 0;
    height: 100vh;
    overflow: hidden;
    color: #333;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

/* === A4 Page Container (Base) === */
.page-container {
    width: 210mm;
    height: 297mm;
    background: white;
    margin: 0 auto 40px auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    page-break-after: always;
    transition: opacity 0.3s ease;
}

/* === Page Management === */
.hide-page-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 40;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #6b7280;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
}

.page-container:hover .hide-page-btn {
    opacity: 1;
}

.hide-page-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #ef4444;
}

.hidden-overlay {
    backdrop-filter: blur(2px);
}

/* === UI Input Styling (Sidebar) === */
.swiss-input {
    width: 100%;
    background-color: #262626;
    border: 1px solid #404040;
    color: white;
    padding: 0.75rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    border-radius: 0;
    transition: all 0.2s ease;
}

.swiss-input:focus {
    outline: none;
    border-color: #48b64b;
    background-color: #2a2a2a;
}

textarea.swiss-input {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* === Collapsible Sections === */
details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details[open]>summary .details-chevron {
    transform: rotate(180deg);
}

details>summary {
    border-top: 1px solid #333;
}

details[open]>summary {
    margin-bottom: 0.25rem;
}

/* === Brand Selector === */
.brand-radio {
    display: none;
}

.brand-card {
    border: 1px solid #404040;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    background: #262626;
    opacity: 0.6;
}

.brand-radio:checked+.brand-card {
    border-color: #48b64b;
    background: #1e3e4f;
    opacity: 1;
}

/* =========================================
   INLINE EDITING STYLES
   ========================================= */

/* Contenteditable paragraph/scope item hover  */
[data-para-index],
[data-scope-index] {
    cursor: text;
    transition: outline 0.15s ease, background 0.15s ease;
    outline: 1px dashed transparent;
    border-radius: 2px;
}

[data-para-index]:hover,
[data-scope-index]:hover {
    outline: 1px dashed rgba(72, 182, 75, 0.35);
    background: rgba(72, 182, 75, 0.02);
}

[data-para-index]:focus,
[data-scope-index]:focus {
    outline: 2px solid rgba(72, 182, 75, 0.5);
    background: rgba(72, 182, 75, 0.04);
}

/* Inline remove button (✕) on paragraphs */
.inline-para-wrap {
    position: relative;
}

.inline-para-wrap .inline-remove-btn {
    position: absolute;
    right: -1.5rem;
    top: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.inline-para-wrap:hover .inline-remove-btn {
    opacity: 1;
}

/* Inline remove button (✕) on scope items */
.inline-scope-wrap {
    position: relative;
}

.inline-scope-wrap .inline-remove-btn {
    position: absolute;
    right: -1.2rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.15s;
}

.inline-scope-wrap:hover .inline-remove-btn {
    opacity: 1;
}

/* Shared remove button style */
.inline-remove-btn {
    background: none;
    border: none;
    color: #ccc;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.15rem 0.3rem;
    line-height: 1;
    border-radius: 2px;
    transition: color 0.15s, background 0.15s;
}

.inline-remove-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

/* Inline add button on document */
.inline-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin: 0.5rem auto 0;
    padding: 0.3rem 0.8rem;
    background: transparent;
    border: 1px dashed rgba(72, 182, 75, 0.3);
    color: rgba(72, 182, 75, 0.5);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 3px;
    font-family: 'Inter', sans-serif;
}

.inline-add-btn:hover {
    border-color: #48b64b;
    color: #48b64b;
    background: rgba(72, 182, 75, 0.04);
}

.scope-add-section {
    margin: 8px 0 0;
    color: #38853d;
    border-color: #79bc7b;
    padding: 7px 14px;
}

.scope-remove-section {
    color: #94a3b8;
    font-size: 16px;
    line-height: 1;
    padding: 0 4px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.scope-remove-section:hover { color: #dc2626; }

/* =========================================
   NRS SPECIFIC STYLES
   ========================================= */
.swiss-header {
    letter-spacing: -0.04em;
    line-height: 0.92;
}

.swiss-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: #a3a3a3;
    margin-bottom: 0.4rem;
}

.bullet-item {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.7rem;
    line-height: 1.7;
    color: #4b5563;
}

.bullet-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 8px;
    height: 2px;
    background-color: #48b64b;
    border-radius: 1px;
}

.bullet-item.navy-bullet::before {
    background-color: #1B3A4B;
}

.bullet-compact {
    position: relative;
    padding-left: 1rem;
    font-size: 0.625rem;
    line-height: 1.65;
    color: #4b5563;
}

.bullet-compact::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 5px;
    height: 1.5px;
    background-color: #48b64b;
}

.navy-bullet::before {
    background-color: #1B3A4B;
}

.page-header {
    height: 3.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    flex-shrink: 0;
}

.page-header .brand {
    font-weight: 700;
    color: #1B3A4B;
    letter-spacing: 0.2em;
    font-size: 0.6rem;
    text-transform: uppercase;
}

.page-header .section-label {
    color: #48b64b;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.page-footer {
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    background-color: #1B3A4B;
    color: white;
    flex-shrink: 0;
    margin-top: auto;
}

.page-footer .page-num {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.7;
}

.page-footer .accent-bar {
    width: 2rem;
    height: 3px;
    background-color: #48b64b;
    border-radius: 2px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background-color: #1B3A4B;
    color: white;
    font-weight: 800;
    font-size: 0.7rem;
    flex-shrink: 0;
    border-radius: 2px;
}

.accent-divider {
    width: 3rem;
    height: 3px;
    background-color: #48b64b;
    border-radius: 2px;
}

.quote-block {
    position: relative;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f8f7f5 0%, #f0efed 100%);
    border-left: 3px solid #48b64b;
    border-radius: 0 4px 4px 0;
}

.quote-block::before {
    content: '\201C';
    position: absolute;
    top: 0.25rem;
    left: 0.75rem;
    font-size: 2rem;
    color: #48b64b;
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

/* =========================================
   FYNSER SPECIFIC STYLES
   ========================================= */
.drop-zone {
    transition: all 0.3s ease;
    border: 2px dashed #cbd5e1;
}

.drop-zone.drag-over {
    border-color: #48b64b;
    background-color: rgba(72, 182, 75, 0.05);
    transform: scale(1.01);
}

.pdf-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* === PRINT ENGINE === */
@media print {
    @page {
        margin: 0;
        size: A4;
    }

    body {
        background-color: white !important;
        height: auto;
        overflow: visible;
        display: block;
        color: black;
    }

    .no-print {
        display: none !important;
    }

    .hidden-print {
        display: none !important;
    }

    .page-container {
        margin: 0 !important;
        box-shadow: none !important;
        page-break-after: always !important;
        width: 210mm !important;
        height: 297mm !important;
        break-inside: avoid;
    }

    .page-container:last-of-type {
        page-break-after: auto !important;
    }

    #pdf-pages-root:empty {
        display: none !important;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Remove all inline editing affordances in print */
    [data-para-index],
    [data-scope-index] {
        outline: none !important;
        background: transparent !important;
        cursor: default !important;
    }

    .inline-remove-btn,
    .inline-add-btn,
    .hide-page-btn {
        display: none !important;
    }
}


/* ============================================================
   WIZARD  —  SaaS-style onboarding UI
   ============================================================ */

/* ── Base body override for wizard/preview layout ── */
body {
    display: block;
    overflow: hidden;
    height: 100vh;
}

/* ── Wizard wrapper ── */
.wz-app {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: #fafafa;
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: 100;
    overflow-y: auto;
}

/* ── Progress Header ── */
.wz-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e8eaf0;
    padding: 0.85rem 1.5rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.wz-header-inner {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* ── Progress Dots ── */
.wz-progress {
    display: flex;
    align-items: center;
    gap: 0;
}

.wz-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s ease;
    flex-shrink: 0;
    cursor: default;
}

.wz-dot-active  { background: #48b64b; color: #fff; box-shadow: 0 0 0 4px rgba(72,182,75,0.18); }
.wz-dot-done    { background: #22c55e; color: #fff; }
.wz-dot-pending { background: #e5e7eb; color: #9ca3af; }

.wz-line {
    width: 32px;
    height: 2px;
    background: #e5e7eb;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.wz-line-done { background: #22c55e; }

/* ── Wizard Body scroll area ── */
.wz-body {
    flex: 1;
    overflow-y: auto;
}

/* ── Step 1: Brand Screen ── */
.wz-brand-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(72, 182, 75, 0.04), transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(30, 58, 79, 0.04), transparent 30%);
    position: relative;
    overflow: hidden;
}

.wz-brand-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(72,182,75,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(72,182,75,0.05) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
    z-index: 0;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}

.wz-brand-hero {
    text-align: center;
    padding: 5rem 1.5rem 3rem;
    z-index: 1;
    position: relative;
}

.wz-brand-title {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.wz-brand-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 840px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem 5rem;
    flex: 1;
    align-items: center;
    z-index: 1;
    position: relative;
}

.wz-bcard {
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    text-align: left;
    background: #ffffff;
    padding: 0;
    position: relative;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.02);
}

.wz-bcard::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(72,182,75,0.03), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.wz-bcard:hover::before { opacity: 1; }

.wz-bcard:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: #e2e8f0;
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.08), 0 0 40px rgba(72, 182, 75, 0.04);
}

.wz-bcard:focus { outline: none; border-color: #48b64b; }

.wz-bcard-body { padding: 2.5rem; flex: 1; z-index: 2; position: relative; }

.wz-bcard-eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
    background: #eefdf2;
    color: #48b64b;
}

.wz-bcard-name { margin-bottom: 0.5rem; }

.wz-bcard-desc {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-top: 1.25rem;
}

.wz-bcard-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    background: #eefdf2;
    color: #48b64b;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wz-bcard:hover .wz-bcard-cta {
    gap: 0.8rem;
    background: #48b64b;
    color: #fff;
}

/* ── Shared form wrapper ── (steps 2‑6) */
.wz-form-wrap {
    max-width: 640px;
    margin: 3rem auto 5rem;
    padding: 3rem;
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.02);
    border: 1px solid #f3f4f6;
}

.wz-review-wrap { max-width: 640px; }

.wz-step-hdr { margin-bottom: 2rem; }

.wz-eyebrow {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #48b64b;
    margin-bottom: 1rem;
    background: #f0fdf4;
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
}

.wz-title {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    color: #09090b;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
}

.wz-subtitle {
    color: #71717a;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

/* ── Proposal Type Grid (step 2) ── */
.wz-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.wz-type-card {
    background: #ffffff;
    border: 2px solid #f4f4f5;
    border-radius: 16px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.wz-type-card:hover {
    border-color: #e4e4e7;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.wz-type-card:focus { outline: none; }

.wz-type-selected {
    box-shadow: 0 0 0 4px rgba(72,182,75,0.15), 0 8px 20px rgba(72,182,75,0.1) !important;
    transform: translateY(-2px) !important;
}

.wz-type-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Form fields ── */
.wz-fields { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 2rem; }

.wz-field { display: flex; flex-direction: column; gap: 0.5rem; }

.wz-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.wz-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #3f3f46;
    letter-spacing: -0.01em;
}

.wz-input {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #09090b;
    background: #fafafa;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}

.wz-input:hover { background: #ffffff; border-color: #d4d4d8; }

.wz-input:focus {
    outline: none;
    background: #ffffff;
    border-color: #48b64b;
    box-shadow: 0 0 0 4px rgba(72,182,75,0.15), inset 0 1px 2px rgba(0,0,0,0.02);
}

.wz-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239,68,68,0.15) !important;
}

.wz-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

/* ── Navigation row ── */
.wz-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f4f4f5;
}

/* ── Buttons ── */
.wz-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #48b64b, #3da040);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 12px rgba(72,182,75,0.25), inset 0 1px 0 rgba(255,255,255,0.2);
}

.wz-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(72,182,75,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}

.wz-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    color: #52525b;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    border: 1px solid #e4e4e7;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.wz-btn-ghost:hover { color: #09090b; border-color: #d4d4d8; background: #fafafa; box-shadow: 0 2px 4px rgba(0,0,0,0.04); }

.wz-btn-generate {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #18181b 0%, #27272a 100%);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 1.1rem 2rem;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Manrope', sans-serif;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.1);
}

.wz-btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.1);
    background: linear-gradient(135deg, #09090b 0%, #18181b 100%);
}

.wz-btn-generate:active { transform: translateY(0); }

/* ── Review cards (step 6) ── */
.wz-rv-card {
    background: #fff;
    border: 1.5px solid #e9ecef;
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    margin-top: 1rem;
}

.wz-rv-card-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.wz-rv-section {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9ca3af;
}

.wz-rv-edit {
    font-size: 0.75rem;
    font-weight: 600;
    color: #48b64b;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
    font-family: 'Inter', sans-serif;
}

.wz-rv-edit:hover { color: #3da040; text-decoration: underline; }

.wz-rv-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f3f4f6;
    gap: 1rem;
}

.wz-rv-row:last-child { border-bottom: none; }

.wz-rv-label {
    font-size: 0.78rem;
    color: #9ca3af;
    flex-shrink: 0;
    min-width: 110px;
    font-weight: 500;
}

.wz-rv-val {
    font-size: 0.82rem;
    color: #111827;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

/* ── Shake animation ── */
@keyframes wzShake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-6px); }
    75%      { transform: translateX(6px); }
}


/* ============================================================
   PREVIEW MODE  —  full-screen proposal viewer
   ============================================================ */

.pv-app {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    background: #525252;
}

.pv-topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    flex-shrink: 0;
    z-index: 10;
}

.pv-topbar-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0 0.5rem;
}

.pv-client-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    font-family: 'Manrope', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pv-topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.5rem 0.85rem;
    border-radius: 9px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
}

.pv-btn-back {
    background: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}

.pv-btn-back:hover { background: #e9ecef; color: #111827; }

.pv-btn-action {
    background: #fff;
    color: #4b5563;
    border-color: #d1d5db;
}

.pv-btn-action:hover { background: #f9fafb; color: #111827; border-color: #9ca3af; }

.pv-btn-print {
    background: #48b64b;
    color: #fff;
    border-color: #48b64b;
    box-shadow: 0 2px 6px rgba(72,182,75,0.3);
}

.pv-btn-print:hover { background: #3da040; border-color: #3da040; }

.pv-canvas {
    flex: 1;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    padding: 2.5rem 1rem;
    overflow-x: auto;
}

/* ── Print override ── */
@media print {
    .pv-topbar { display: none !important; }
    .pv-app    { position: static !important; display: block !important; background: transparent !important; }
    .pv-canvas { display: block !important; padding: 0 !important; overflow: visible !important; }
}

/* Subtle finish within the original eight-page layout. */
.nrs-proposal .page-header {background:#fbfcfc;border-bottom-color:#e3e9ec;}
.nrs-proposal .page-header .brand {letter-spacing:.14em;}
.nrs-proposal .section-badge {border-radius:6px;}
.nrs-proposal .accent-divider {border-radius:2px;}
.nrs-proposal .bullet-item {line-height:1.75;color:#475569;}
.nrs-proposal .bullet-compact {line-height:1.7;}
.nrs-proposal [data-para-index] {font-size:12.5px;line-height:1.85;}
.nrs-proposal [data-scope-sec-title] {letter-spacing:.055em;}
.nrs-proposal [contenteditable]:focus {outline:1px solid #48b64b55;outline-offset:3px;}
@media print {.nrs-proposal [contenteditable] {outline:none!important;}}

/* Client artwork occupies the existing free area below the firm profile. */
.client-brands {margin-top:26px;padding-top:18px;border-top:1px solid #e5e7eb;break-inside:avoid;}
.client-brands>h3 {font-size:10px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;color:#1b3a4b;margin:0 0 14px;}
.client-logo-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 15px;align-items:center;}
.client-logo {height:52px;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:5px;}
.client-logo svg {display:block;width:100%;height:100%;overflow:hidden;}
.client-logo-wide {grid-column:span 3;height:42px;padding:2px 14px;}
@media print {.client-brands,.client-logo {break-inside:avoid;}}

/* Team and timeline remain together, with one aligned row per person. */
.engagement-page-body {flex:1;padding:2.5rem 3rem;}
.engagement-roster {margin:22px 0 0 3.25rem;border-top:1px solid #dce5e8;}
.engagement-person {display:grid;grid-template-columns:205px minmax(0,1fr);gap:24px;align-items:center;min-height:106px;padding:20px 0;border-bottom:1px solid #dce5e8;break-inside:avoid;}
.engagement-person h4 {font-size:13px;line-height:1.5;}
.engagement-person-identity p {font-size:10.5px!important;line-height:1.6;color:#38853d!important;margin-top:5px;}
.engagement-person>p {font-size:11.5px!important;line-height:1.75!important;margin:0!important;color:#526171!important;}
.engagement-timeline {margin-top:34px;break-inside:avoid;}

/* Leadership page: consistent left alignment and a continuous reading flow. */
.leadership-services-body {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: 28px;
    flex: 1;
    padding: 2.25rem 2.5rem 2.5rem;
    align-content: start;
}
.leadership-column { border-right: 1px solid #e5ebee; padding-right: 24px; display: flex; flex-direction: column; }
.leadership-profiles { display: grid; grid-template-rows: repeat(3, 1fr); flex: 1; gap: 28px; }
.leadership-profiles > div + div { border-top: 1px solid #e5ebee; padding-top: 22px; }
.leadership-profiles p, .service-directory-list p {
    text-align: left;
    font-size: 12.5px;
    line-height: 1.7;
    word-spacing: normal;
    letter-spacing: normal;
}
.leadership-profiles h4 { font-size: 14px; line-height: 1.5; }
.leadership-profiles h4 + p { font-size: 11px; line-height: 1.5; margin: 3px 0 7px; }
.service-directory-list { display: grid; gap: 16px; margin: 0; }
.service-directory-list li { font-size: 12px; line-height: 1.55; }
.service-directory-list p { margin-top: 4px; }
.service-directory-note {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #e5ebee;
    color: #64748b;
    font-size: 10px;
    line-height: 1.6;
}

/* Scope and deliverables follow one another; no automatic spacer. */
.scope-page-body { flex: 1; padding: 2.25rem 2.5rem; display: flex; flex-direction: column; gap: 26px; }
.scope-section { margin-bottom: 16px; break-inside: avoid; }
.scope-page-body [data-scope-sec-title] { font-size: 13px; line-height: 1.5; margin-bottom: 10px; }
.scope-page-body .bullet-item { font-size: 13px; line-height: 1.8; }
.scope-page-body .scope-section ul { display: grid; gap: 7px; }
.scope-page-body .scope-section ul > li { margin-top: 0; }
.scope-deliverables { border-top: 1px solid #e5ebee; padding-top: 22px; }
.scope-deliverables-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.scope-deliverables-list > li { font-size: 11.5px; line-height: 1.7; }

.terms-page-body { flex: 1; display: flex; flex-direction: column; padding: 2.25rem 2.5rem; gap: 32px; }
.terms-page-body > .grid:first-child { font-size: 12px; line-height: 1.8; gap: 26px; text-align: left; }

/* Editorial hierarchy for the responsibilities page. */
.responsibility-editorial {
    flex: 1;
    padding: 40px 42px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.responsibility-section-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}
.responsibility-section-number {
    color: #38853d;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    border-top: 3px solid #48b64b;
    padding-top: 8px;
    align-self: stretch;
}
.responsibility-section-heading h3 {
    color: #1b3a4b;
    font-family: 'Manrope', 'Inter', sans-serif;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.3;
}
.responsibility-rows { list-style: none; padding: 0; margin: 0; border-top: 1px solid #dce5e8; }
.responsibility-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 19px 6px;
    border-bottom: 1px solid #dce5e8;
    break-inside: avoid;
}
.responsibility-row-number { color: #7f969f; font-size: 11px; font-weight: 600; padding-top: 4px; }
.responsibility-row [data-resp-item], .limitation-row p {
    color: #425563;
    font-size: 13px;
    line-height: 1.8;
    text-align: left;
    word-spacing: normal;
    margin: 0;
}
.limitation-panel {
    background: #f2f6f6;
    border: 1px solid #e0e8e9;
    border-left: 3px solid #48b64b;
    border-radius: 0 10px 10px 0;
    padding: 26px 28px;
}
.limitation-panel .responsibility-section-heading { margin-bottom: 14px; }
.limitation-panel .responsibility-section-heading h3 { font-size: 22px; }
.limitation-row { display: grid; grid-template-columns: 6px minmax(0, 1fr); gap: 14px; padding: 13px 0; break-inside: avoid; }
.limitation-row + .limitation-row { border-top: 1px solid #dce5e8; }
.limitation-mark { width: 5px; height: 5px; background: #68858e; border-radius: 50%; margin-top: 10px; }
@media print { .limitation-panel { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Closing page: clear agreement hierarchy and usable signing space. */
.terms-page-body { padding: 38px 40px 32px; gap: 28px; }
.terms-intro > span { color: #38853d; font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.terms-intro h2 { margin: 8px 0 0; font-family: 'Manrope', sans-serif; font-size: 29px; font-weight: 800; letter-spacing: -.04em; color: #1b3a4b; line-height: 1.25; }
.terms-clauses { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 26px 32px; }
.terms-clauses > div { border-top: 1px solid #dce5e8; padding-top: 14px; }
.terms-clauses h4 { font-size: 12px; line-height: 1.5; margin-bottom: 9px; letter-spacing: .025em; }
.terms-clauses p { font-size: 13px; line-height: 1.8; color: #425563; text-align: left; }
.terms-signatures { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 36px; margin-top: auto; padding-top: 24px; border-top: 1px solid #dce5e8; }
.terms-signatures > div > p:first-child { font-size: 12px; }
.terms-signature-space { height: 80px; border-bottom: 1px solid #b9c8cf; margin-bottom: 12px; }
.terms-signatures p { font-size: 11px; line-height: 1.6; }
.terms-signatures p.text-gray-400 { font-size: 10px; }
@media print { .terms-commercial { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Commercial summary: quiet invoice styling rather than a dark banner. */
.terms-commercial { background: #fafcfc; color: #1b3a4b; border: 1px solid #dce5e8; border-radius: 8px; padding: 22px 24px; }
.commercial-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid #dce5e8; }
.commercial-heading h3 { font-family: 'Manrope', sans-serif; font-size: 16px; font-weight: 700; letter-spacing: -.025em; }
.commercial-heading > span { color: #70818b; font-size: 10px; }
.commercial-details { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 22px; }
.commercial-label { display: block; color: #6d818b; font-size: 9px; font-weight: 600; letter-spacing: .12em; }
.commercial-fee { display: flex; flex-direction: column; align-items: flex-start; }
.commercial-amount { color: #1b3a4b; font-family: 'Manrope', sans-serif; font-size: 28px; font-weight: 700; line-height: 1.3; letter-spacing: -.035em; margin: 16px 0; overflow-wrap: anywhere; }
.commercial-amount-pending { font-size: 21px; font-weight: 600; max-width: 220px; }
.commercial-tax { font-size: 10px; line-height: 1.7; color: #70818b; margin-top: auto; }
.commercial-schedule { border-left: 1px solid #dce5e8; padding-left: 24px; }
.commercial-payment { display: flex; align-items: center; gap: 14px; padding-top: 14px; }
.commercial-payment + .commercial-payment { border-top: 1px solid #e5ebee; margin-top: 12px; }
.commercial-payment > strong { font-size: 25px; font-weight: 600; letter-spacing: -.04em; min-width: 48px; }
.commercial-payment > strong > span { color: #38853d; font-size: 14px; margin-left: 2px; }
.commercial-payment p { color: #344e5d; font-size: 11px; line-height: 1.6; }
.commercial-payment small { display: block; color: #7a8b95; font-size: 10px; }
.commercial-note { border-top: 1px solid #dce5e8; margin-top: 18px; padding-top: 12px; color: #526773; font-size: 11px; line-height: 1.7; }

.einvoice-context { margin: 0 0 18px 3.25rem; padding: 13px 16px; border-left: 3px solid #48b64b; background: #f2f6f6; font-size: 11px; line-height: 1.65; color: #425563; }
.einvoice-context strong { color: #1b3a4b; }
.einvoice-context a { display: block; margin-top: 6px; color: #58737d; font-size: 9px; }

.scope-paginated-body { flex: none; min-height: 0; box-sizing: border-box; overflow: visible; gap: 18px; }
.scope-paginated-body > * { flex-shrink: 0; }
.scope-flow-section { margin-left: 3.25rem; }
.scope-paginated-body > .scope-add-section { margin-left: 3.25rem; }
.scope-continuation-label { color: #6b838e; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.scope-oversized { height: auto; min-height: 297mm; overflow: visible; }

.responsibility-paginated-body { flex:none; box-sizing:border-box; min-height:0; }
.responsibility-paginated-body > * { flex-shrink:0; }
