:root {
        /* ── Clairo Brand Palette ───────────────────── */
        --orange:          #FF4500;
        --orange-d:        #CC3700;
        --orange-l:        #FF6B3D;
        --black:           #0F0F0F;
        --dark:            #1A1A1A;
        --mid:             #555555;
        --muted:           #999999;
        --border:          #E8E8E8;
        --off-white:       #F7F7F7;
        --white:           #FFFFFF;

        /* ── Semantic aliases (keeps existing CSS working) ── */
        --surface:                    var(--white);
        --surface-container:          var(--off-white);
        --surface-container-low:      #F2F2F2;
        --surface-container-lowest:   var(--white);
        --surface-container-high:     #EBEBEB;
        --surface-container-highest:  #E4E4E4;
        --on-surface:                 var(--black);
        --on-surface-variant:         var(--mid);
        --primary:                    var(--orange);
        --primary-strong:             var(--mid);
        --primary-container:          #FFE5DC;
        --primary-container-soft:     #FFF0EB;
        --on-primary-container:       #5A1A00;
        --outline:                    #AAAAAA;
        --outline-variant:            var(--border);
        --inverse-surface:            var(--black);
        --inverse-on-surface:         var(--white);
        --danger:                     #EF4444;
        --shadow-soft: 0 22px 58px rgba(15, 15, 15, 0.10);
        --shadow-quiet: 0 12px 34px rgba(15, 15, 15, 0.07);
        --sidebar: 310px;
        --content: 1180px;

        /* ── Typography ─────────────────────────────── */
        --font-head: 'Syne', sans-serif;
        --font-body: 'DM Sans', sans-serif;
}

* {
        box-sizing: border-box;
}

html {
        color-scheme: light;
        scroll-behavior: smooth;
}

body {
        margin: 0;
        min-height: 100vh;
        font-family: var(--font-body), 'DM Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        color: var(--on-surface);
        background: var(--surface);
        letter-spacing: 0;
        overflow-x: hidden;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
        opacity: 0;
        transition: opacity 0.5s ease-out;
}

body.fonts-loaded {
        opacity: 1;
}

body[data-mode="demo"] .actual-only,
body[data-mode="actual"] .demo-only {
        display: none !important;
}

a {
        color: inherit;
        text-decoration: none;
}

button,
input,
select,
textarea {
        font: inherit;
}

button {
        cursor: pointer;
}

img,
svg {
        max-width: 100%;
}

.material-symbols-outlined {
        font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
        line-height: 1;
}

.filled-icon {
        font-variation-settings: "FILL" 1, "wght" 650, "GRAD" 0, "opsz" 24;
}

.app-layout {
        min-height: 100vh;
        display: grid;
        grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        width: var(--sidebar);
        height: 100vh;
        display: flex;
        flex-direction: column;
        gap: 34px;
        padding: 34px 20px 30px 30px;
        border-right: 2px solid var(--outline-variant);
        background: var(--surface-container);
}

.brand {
        display: inline-grid;
        gap: 8px;
        width: fit-content;
        color: var(--on-surface);
}

.brand-logo {
        position: relative;
        display: block;
        width: 150px;
        height: 24px;
        overflow: hidden;
}

.brand-logo::before {
        content: "";
        position: absolute;
        inset: 0;
        background: url("../NewWordmark.svg") left center / contain no-repeat;
}
}

.brand-caption {
        color: var(--on-surface-variant);
        font-size: 14px;
        line-height: 1;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
}

.sidebar-nav {
        display: grid;
        gap: 18px;
        margin-top: 34px;
}

.nav-item {
        min-height: 62px;
        display: flex;
        align-items: center;
        gap: 20px;
        padding: 0 20px;
        border: 2px solid transparent;
        border-radius: 999px;
        color: var(--on-surface-variant);
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.045em;
        text-transform: uppercase;
        transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.nav-item .material-symbols-outlined {
        width: 28px;
        font-size: 28px;
}

.nav-item:hover,
.nav-item.active {
        color: var(--on-primary-container);
        background: var(--primary-container);
        border-color: var(--primary);
}

.nav-item:hover {
        transform: translateX(2px);
}

.sidebar-footer {
        margin-top: auto;
        display: grid;
        gap: 16px;
}

.mini-progress {
        display: grid;
        gap: 10px;
        padding: 16px;
        border: 1px solid var(--outline-variant);
        border-radius: 26px;
        background: rgba(250, 250, 235, 0.72);
}

.mini-progress span {
        color: var(--on-surface-variant);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
}

.app-main {
        min-width: 0;
        min-height: 100vh;
        grid-column: 2;
        display: flex;
        flex-direction: column;
}

.mobile-top {
        display: none;
}

.workspace {
        width: min(var(--content), calc(100% - 64px));
        margin: 0 auto;
        flex: 0 0 auto;
        padding: 96px 0 40px;
}

.workflow-header {
        display: grid;
        gap: 18px;
}

.header-row {
        display: flex;
        justify-content: space-between;
        align-items: end;
        gap: 24px;
}

.eyebrow,
.kicker {
        margin: 0;
        color: var(--primary-strong);
        font-size: 14px;
        line-height: 1;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
}

.kicker {
        min-height: 34px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 0 12px;
        border: 1px solid var(--outline-variant);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.42);
}

.page-title,
.hero-title {
        margin: 10px 0 0;
        color: var(--on-surface);
        font-size: clamp(38px, 4vw, 48px);
        line-height: 1.08;
        font-weight: 700;
}

.hero-title {
        max-width: 820px;
        font-size: clamp(36px, 4.2vw, 64px);
        line-height: 1.02;
}

.hero-title span {
        color: var(--primary);
}

.page-copy,
.hero-copy {
        margin: 16px 0 0;
        max-width: 720px;
        color: var(--primary-strong);
        font-size: 20px;
        line-height: 1.55;
        overflow-wrap: break-word;
}

.step-label {
        margin: 0 0 6px;
        color: var(--on-surface);
        font-size: 14px;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        white-space: nowrap;
}

.stepper {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        width: 100%;
        height: 20px;
}

.step {
        display: block;
        border: 1px solid rgba(197, 201, 178, 0.58);
        border-radius: 999px;
        background: rgba(250, 250, 235, 0.82);
        box-shadow: inset 0 1px 2px rgba(47, 49, 39, 0.04);
}

.step.done,
.step.active {
        background: var(--primary);
        border-color: var(--outline-variant);
}

.content-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 374px;
        gap: 28px;
        align-items: start;
        margin-top: 92px;
}

.content-grid.tight {
        margin-top: 48px;
}

.content-grid > *,
.stack,
.doc-card,
.surface-panel,
.service-card,
.summary-card,
.complete-banner,
.hero-panel,
.preview-panel,
.choice-card {
        min-width: 0;
}

.stack {
        display: grid;
        gap: 30px;
}

.doc-card,
.surface-panel,
.service-card,
.summary-card,
.complete-banner {
        border: 2px solid var(--outline-variant);
        border-radius: 54px;
        background:
                linear-gradient(135deg, rgba(255, 255, 255, 0.48), rgba(244, 245, 229, 0.78)),
                var(--surface);
        box-shadow: var(--shadow-quiet);
}

.doc-card {
        position: relative;
        overflow: hidden;
        padding: 36px 30px 30px;
}

.doc-card.is-highlighted::before {
        content: "";
        position: absolute;
        inset: 0 24px auto 24px;
        height: 11px;
        border-radius: 0 0 999px 999px;
        background: var(--primary);
}

.doc-card.compact {
        padding-bottom: 34px;
}

.doc-main {
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 18px;
        align-items: start;
}

.check-dot {
        width: 30px;
        height: 30px;
        margin-top: 2px;
        display: grid;
        place-items: center;
        border: 2px solid var(--outline-variant);
        border-radius: 999px;
        color: var(--surface);
        background: transparent;
        font-size: 22px;
}

.check-dot.done {
        border-color: var(--primary);
        background: var(--primary);
}

.doc-heading {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        margin-bottom: 10px;
}

.doc-title {
        margin: 0;
        font-size: clamp(25px, 2.5vw, 32px);
        line-height: 1.12;
        font-weight: 500;
}

.badge,
.status-pill {
        min-height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 0 14px;
        border: 1px solid var(--outline-variant);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.48);
        color: var(--primary-strong);
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        white-space: nowrap;
}

.badge.required,
.status-pill.primary {
        border-color: transparent;
        background: var(--primary-container);
        color: var(--on-primary-container);
}

.badge.dark,
.status-pill.dark {
        border-color: var(--inverse-surface);
        background: var(--inverse-surface);
        color: var(--inverse-on-surface);
}

.doc-copy {
        margin: 0;
        color: var(--primary-strong);
        font-size: 20px;
        line-height: 1.48;
        overflow-wrap: break-word;
}

.file-pill {
        min-height: 78px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin: 24px 0 0 50px;
        padding: 0 28px;
        border: 1px solid var(--outline-variant);
        border-radius: 999px;
        background: rgba(244, 245, 229, 0.86);
}

.file-pill strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 19px;
}

.file-pill-left {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 18px;
}

.icon-btn {
        width: 40px;
        height: 40px;
        display: grid;
        place-items: center;
        border: 0;
        border-radius: 999px;
        color: var(--primary-strong);
        background: transparent;
}

.icon-btn:hover {
        background: var(--surface-container-high);
}

.upload-zone {
        width: calc(100% - 50px);
        min-height: 204px;
        display: grid;
        place-items: center;
        margin: 30px 0 0 50px;
        padding: 28px;
        border: 2px dashed var(--outline-variant);
        border-radius: 40px;
        background: rgba(255, 255, 255, 0.82);
        color: var(--on-surface);
        text-align: center;
        transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.upload-zone:hover,
.upload-card:hover {
        border-color: var(--primary);
        background: rgba(255, 255, 255, 0.96);
        transform: translateY(-2px);
}

.upload-inner {
        display: grid;
        justify-items: center;
        gap: 12px;
}

.upload-icon {
        width: 58px;
        height: 58px;
        display: grid;
        place-items: center;
        border: 1px solid var(--outline-variant);
        border-radius: 999px;
        background: var(--surface-container);
        color: var(--primary-strong);
}

.upload-copy {
        display: grid;
        gap: 4px;
        font-size: 16px;
}

.upload-copy span {
        color: var(--primary-strong);
}

.info-icon {
        margin-left: auto;
        color: var(--primary-strong);
}

.side-stack {
        display: grid;
        gap: 28px;
}

.surface-panel {
        min-height: 198px;
        display: grid;
        align-content: start;
        gap: 16px;
        padding: 32px;
        overflow: hidden;
}

.surface-panel.empty {
        min-height: 310px;
        align-content: end;
}

.panel-title {
        margin: 0;
        font-size: 28px;
        line-height: 1.16;
        font-weight: 500;
}

.panel-copy {
        margin: 0;
        color: var(--primary-strong);
        font-size: 18px;
        line-height: 1.48;
}

.panel-label {
        margin: 0;
        color: var(--on-surface);
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
}

.action-strip {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        margin-top: 98px;
        padding-top: 42px;
        border-top: 1px solid var(--outline-variant);
}

.btn {
        min-height: 58px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        border: 2px solid transparent;
        border-radius: 999px;
        padding: 0 34px;
        color: var(--on-surface);
        background: transparent;
        font-size: 15px;
        font-weight: 800;
        letter-spacing: 0.02em;
        transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
        transform: translateY(-2px);
}

.btn-primary {
        min-width: 232px;
        color: var(--inverse-on-surface);
        background: var(--primary);
        border-color: var(--primary);
}

.btn-primary:hover {
        background: var(--orange-d);
        border-color: var(--orange-d);
}

.btn-secondary,
.btn-ghost {
        border-color: var(--outline-variant);
        background: rgba(255, 255, 255, 0.28);
}

.btn-dark {
        color: var(--inverse-on-surface);
        background: var(--black);
        border-color: var(--black);
}

.footer {
        margin-top: 0;
        border-top: 2px solid var(--dark);
        background: var(--inverse-surface);
        color: var(--inverse-on-surface);
}

.footer-inner {
        width: min(var(--content), calc(100% - 64px));
        min-height: 92px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 26px;
        margin: 0 auto;
}

.footer .brand {
        color: var(--inverse-on-surface);
}

.footer .brand-logo {
        width: 112px;
        height: 20px;
}

.footer .brand-logo::before {
        background-image: url("../NewWordmark-Light.svg");
        filter: none;
}

.footer-copy {
        color: var(--primary-container);
        font-size: 18px;
}

.footer-links {
        display: flex;
        align-items: center;
        gap: 30px;
        color: var(--primary-container);
        font-size: 13px;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
}

.service-grid,
.summary-grid,
.choice-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
}

.summary-grid.three {
        grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.summary-card {
        min-height: 230px;
        display: grid;
        align-content: space-between;
        gap: 24px;
        padding: 30px;
        transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.service-card:hover,
.summary-card:hover {
        transform: translateY(-4px);
        border-color: var(--primary);
        box-shadow: var(--shadow-soft);
}

.service-card.featured {
        position: relative;
        overflow: hidden;
}

.service-card.featured::before {
        content: "";
        position: absolute;
        inset: 0 24px auto 24px;
        height: 10px;
        border-radius: 0 0 999px 999px;
        background: var(--primary);
}

.card-top,
.metric-row,
.identity-item,
.timeline-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
}

.card-icon,
.avatar {
        width: 54px;
        height: 54px;
        display: grid;
        place-items: center;
        border: 1px solid var(--outline-variant);
        border-radius: 999px;
        color: var(--on-primary-container);
        background: var(--primary-container);
}

.card-title {
        display: block;
        margin: 0;
        font-size: 28px;
        line-height: 1.16;
        font-weight: 600;
}

.card-copy {
        display: block;
        margin: 10px 0 0;
        color: var(--primary-strong);
        font-size: 18px;
        line-height: 1.5;
}

.card-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        color: var(--primary-strong);
        font-size: 15px;
        font-weight: 800;
}

.identity-list,
.timeline,
.upload-list,
.metric-list {
        display: grid;
        gap: 12px;
}

.identity-item,
.timeline-row,
.metric-row,
.upload-card {
        min-height: 68px;
        padding: 14px 16px;
        border: 1px solid var(--outline-variant);
        border-radius: 30px;
        background: rgba(255, 255, 255, 0.42);
}

.identity-item strong,
.timeline-row strong,
.metric-row strong,
.upload-card strong {
        display: block;
        color: var(--on-surface);
        font-size: 15px;
}

.identity-item div > span,
.timeline-row div > span,
.metric-row div > span,
.upload-card p {
        color: var(--primary-strong);
        font-size: 13px;
        font-weight: 700;
}

.home-hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 420px;
        gap: 34px;
        align-items: stretch;
        margin-top: 36px;
}

.hero-panel {
        min-height: 520px;
        display: grid;
        align-content: center;
        gap: 34px;
        padding: 48px;
        border: 2px solid var(--outline-variant);
        border-radius: 58px;
        background:
                linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 69, 0, 0.05)),
                var(--surface-container-low);
}

.preview-panel {
        min-height: 520px;
        display: grid;
        gap: 18px;
        padding: 24px;
        border: 2px solid var(--outline-variant);
        border-radius: 58px;
        background: var(--surface-container);
}

.preview-card {
        display: grid;
        gap: 18px;
        padding: 24px;
        border: 1px solid var(--outline-variant);
        border-radius: 38px;
        background: rgba(255, 255, 255, 0.52);
}

.choice-grid {
        margin-top: 8px;
}

.choice-card {
        min-height: 188px;
        display: grid;
        align-content: space-between;
        gap: 20px;
        padding: 24px;
        border: 2px solid var(--outline-variant);
        border-radius: 40px;
        background: rgba(255, 255, 255, 0.48);
}

.choice-card:hover {
        border-color: var(--primary);
}

.complete-banner {
        min-height: 350px;
        display: grid;
        align-content: center;
        gap: 24px;
        padding: 42px;
}

.complete-banner h1 {
        margin: 0;
        max-width: 760px;
        font-size: clamp(42px, 5vw, 64px);
        line-height: 1.02;
        font-weight: 700;
}

.complete-banner p {
        margin: 0;
        max-width: 650px;
        color: var(--primary-strong);
        font-size: 20px;
        line-height: 1.55;
}

.complete-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 14px;
}

.confidence-number {
        font-size: 74px;
        line-height: 0.95;
        font-weight: 800;
}

.progress-track {
        height: 10px;
        overflow: hidden;
        border-radius: 999px;
        background: rgba(197, 201, 178, 0.48);
}

.progress-fill {
        height: 100%;
        border-radius: inherit;
        background: var(--primary);
}

.upload-card {
        width: 100%;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 14px;
        border-style: dashed;
        color: var(--on-surface);
        text-align: left;
        transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.upload-card.is-complete {
        border-style: solid;
        border-color: var(--primary);
        background: rgba(255, 69, 0, 0.07);
}

.upload-card.is-complete .upload-icon,
.upload-zone.is-complete .upload-icon {
        background: var(--primary);
        color: var(--inverse-on-surface);
}

.upload-zone.is-complete {
        border-style: solid;
        border-color: var(--primary);
        background: rgba(255, 69, 0, 0.07);
}

.upload-action {
        color: var(--primary-strong);
        font-size: 13px;
        font-weight: 800;
        text-transform: uppercase;
}

.field-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
}

.field {
        display: grid;
        gap: 8px;
}

.field.full {
        grid-column: 1 / -1;
}

.field label {
        color: var(--on-surface-variant);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
        width: 100%;
        min-height: 54px;
        border: 1px solid var(--outline-variant);
        border-radius: 999px;
        padding: 0 18px;
        outline: none;
        color: var(--on-surface);
        background: rgba(255, 255, 255, 0.72);
        transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.field textarea {
        min-height: 120px;
        padding: 18px;
        border-radius: 30px;
        resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(255, 69, 0, 0.18);
        background: var(--surface-container-lowest);
}

.reveal {
        animation: riseIn 0.42s ease both;
}

@keyframes riseIn {
        from {
                opacity: 0;
                transform: translateY(10px);
        }

        to {
                opacity: 1;
                transform: translateY(0);
        }
}

@media (prefers-reduced-motion: reduce) {
        html {
                scroll-behavior: auto;
        }

        *,
        *::before,
        *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                scroll-behavior: auto !important;
                transition-duration: 0.01ms !important;
        }
}

@media (max-width: 1180px) {
        .content-grid,
        .home-hero {
                grid-template-columns: 1fr;
        }

        .side-stack {
                grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .summary-grid.three {
                grid-template-columns: 1fr;
        }
}

@media (max-width: 920px) {
        .app-layout {
                display: block;
        }

        .sidebar {
                display: none;
        }

        .app-main {
                min-height: 100vh;
        }

        .mobile-top {
                position: sticky;
                top: 0;
                z-index: 50;
                min-height: 72px;
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 18px;
                padding: 0 22px;
                border-bottom: 2px solid var(--outline-variant);
                background: rgba(255, 255, 255, 0.9);
                backdrop-filter: blur(18px);
        }

        .workspace {
                width: min(var(--content), calc(100% - 32px));
                padding: 42px 0 52px;
        }

        .header-row,
        .action-strip,
        .footer-inner {
                align-items: flex-start;
                flex-direction: column;
        }

        .content-grid {
                margin-top: 46px;
        }

        .service-grid,
        .summary-grid,
        .choice-grid,
        .side-stack,
        .field-grid {
                grid-template-columns: 1fr;
        }

        .footer-links {
                flex-wrap: wrap;
                gap: 16px;
        }
}

@media (max-width: 620px) {
        .workspace {
                width: min(var(--content), calc(100% - 24px));
        }

        .page-title {
                font-size: 31px;
                line-height: 1.08;
                overflow-wrap: break-word;
        }

        .doc-card,
        .surface-panel,
        .service-card,
        .summary-card,
        .complete-banner,
        .hero-panel,
        .preview-panel,
        .choice-card {
                border-radius: 32px;
                padding: 22px;
        }

        .doc-main {
                grid-template-columns: 1fr;
        }

        .doc-heading {
                align-items: flex-start;
                flex-direction: column;
        }

        .file-pill,
        .upload-zone {
                width: 100%;
                margin-left: 0;
                border-radius: 28px;
        }

        .file-pill {
                align-items: flex-start;
                flex-direction: column;
                min-height: 0;
                padding: 18px;
        }

        .file-pill strong {
                white-space: normal;
                overflow-wrap: anywhere;
        }

        .upload-card {
                grid-template-columns: auto minmax(0, 1fr);
        }

        .upload-action {
                grid-column: 2;
        }

        .btn,
        .btn-primary {
                width: 100%;
        }

        .home-hero,
        .hero-panel,
        .preview-panel {
                min-height: auto;
        }
}

/* ─── CLAIRO BRAND TYPOGRAPHY ────────────────────────── */

/* Syne for all headings and display text */
h1, h2, h3, h4, h5, h6,
.page-title,
.hero-title,
.panel-title,
.doc-title,
.card-title,
.complete-banner h1,
.confidence-number {
        font-family: var(--font-head), 'Syne', sans-serif;
        font-weight: 800;
        letter-spacing: -0.02em;
}

.panel-title,
.doc-title {
        font-weight: 700;
        letter-spacing: -0.01em;
}

.card-title {
        font-weight: 700;
        letter-spacing: -0.015em;
}

/* DM Sans for body, labels, UI text */
.page-copy,
.hero-copy,
.panel-copy,
.doc-copy,
.card-copy,
.eyebrow,
.kicker,
.brand-caption,
.nav-item,
.btn,
.badge,
.status-pill,
.step-label,
.panel-label,
.upload-copy,
.upload-action,
.footer-copy,
.footer-links {
        font-family: var(--font-body), 'DM Sans', sans-serif;
}

/* Eyebrow / label uses DM Sans 600 uppercase per guidelines */
.eyebrow,
.kicker {
        font-weight: 600;
        letter-spacing: 0.08em;
}

/* Brand name in sidebar uses Syne 800 */
.brand-logo {
        font-family: var(--font-head), 'Syne', sans-serif;
}

/* ─── ANIMATIONS ────────────────────────── */

[data-reveal] {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].reveal {
        opacity: 1;
        transform: translateY(0);
}

/* Staggered reveal for grid/stack children */
.stack[data-reveal] > *,
.service-grid[data-reveal] > *,
.side-stack[data-reveal] > * {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.stack[data-reveal].reveal > *,
.service-grid[data-reveal].reveal > *,
.side-stack[data-reveal].reveal > * {
        opacity: 1;
        transform: translateY(0);
}

[data-reveal].reveal > *:nth-child(1) { transition-delay: 0.05s; }
[data-reveal].reveal > *:nth-child(2) { transition-delay: 0.15s; }
[data-reveal].reveal > *:nth-child(3) { transition-delay: 0.25s; }
[data-reveal].reveal > *:nth-child(4) { transition-delay: 0.35s; }
[data-reveal].reveal > *:nth-child(5) { transition-delay: 0.45s; }

@keyframes spin {
        100% { transform: rotate(360deg); }
}

/* ─── TOAST NOTIFICATIONS ───────────────── */
#toast-container {
        position: fixed;
        top: 24px;
        right: 24px;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        gap: 12px;
        pointer-events: none;
}

.toast {
        background: var(--surface);
        color: var(--on-surface);
        padding: 16px 20px;
        border-radius: 12px;
        box-shadow: var(--shadow-soft);
        border: 1px solid var(--outline);
        display: flex;
        align-items: center;
        gap: 12px;
        transform: translateX(120%);
        opacity: 0;
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
        pointer-events: auto;
}

.toast.show {
        transform: translateX(0);
        opacity: 1;
}

.toast .material-symbols-outlined {
        color: var(--primary);
        font-size: 24px;
}

.toast-content {
        display: flex;
        flex-direction: column;
        gap: 2px;
}

.toast-title {
        font-family: var(--font-head);
        font-weight: 700;
        font-size: 14px;
}

.toast-message {
        font-size: 13px;
        color: var(--on-surface-variant);
}

/* ─── MODAL ───────────────── */
.modal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 15, 15, 0.4);
        backdrop-filter: blur(4px);
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
}

.modal-overlay.show {
        opacity: 1;
        pointer-events: auto;
}

.modal {
        background: var(--surface);
        width: 100%;
        max-width: 480px;
        border-radius: 16px;
        box-shadow: var(--shadow-soft);
        padding: 32px;
        transform: translateY(20px) scale(0.95);
        opacity: 0;
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.modal-overlay.show .modal {
        transform: translateY(0) scale(1);
        opacity: 1;
}

.modal-header {
        margin-bottom: 24px;
}

.modal-title {
        font-family: var(--font-head);
        font-size: 24px;
        font-weight: 700;
        margin: 0 0 8px 0;
}

.modal-copy {
        color: var(--on-surface-variant);
        font-size: 15px;
        margin: 0;
}

.extracted-data {
        background: var(--surface-variant);
        border-radius: 8px;
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 24px;
}

.data-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--outline);
        padding-bottom: 8px;
}
.data-row:last-child {
        border-bottom: none;
        padding-bottom: 0;
}

.data-label {
        font-size: 13px;
        color: var(--on-surface-variant);
        font-weight: 500;
}

.data-value {
        font-family: var(--font-head);
        font-size: 14px;
        font-weight: 600;
        color: var(--on-surface);
}

.modal-actions {
        display: flex;
        justify-content: flex-end;
        gap: 12px;
}

/* ─── COPILOT WIDGET ───────────────── */
#copilot-fab {
        position: fixed;
        bottom: 24px;
        right: 24px;
        width: 56px;
        height: 56px;
        border-radius: 28px;
        background: var(--black);
        color: var(--white);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 24px rgba(15,15,15,0.2);
        cursor: pointer;
        z-index: 9998;
        transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s;
        border: none;
        outline: none;
}

#copilot-fab:hover {
        transform: scale(1.05);
        background: var(--primary-strong);
}

#copilot-fab .material-symbols-outlined {
        font-size: 24px;
}

#copilot-window {
        position: fixed;
        bottom: 96px;
        right: 24px;
        width: 360px;
        height: 480px;
        background: var(--surface);
        border-radius: 16px;
        box-shadow: 0 12px 48px rgba(15,15,15,0.15);
        border: 1px solid var(--outline);
        display: flex;
        flex-direction: column;
        z-index: 9998;
        transform: translateY(20px) scale(0.95);
        transform-origin: bottom right;
        opacity: 0;
        pointer-events: none;
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
        overflow: hidden;
}

#copilot-window.open {
        transform: translateY(0) scale(1);
        opacity: 1;
        pointer-events: auto;
}

.copilot-header {
        background: var(--black);
        color: var(--white);
        padding: 16px 20px;
        display: flex;
        align-items: center;
        gap: 12px;
}

.copilot-header h3 {
        margin: 0;
        font-family: var(--font-head);
        font-size: 16px;
        font-weight: 600;
}

.copilot-header .material-symbols-outlined {
        color: var(--primary);
}

.copilot-messages {
        flex: 1;
        padding: 20px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 16px;
}

.chat-bubble {
        max-width: 85%;
        padding: 12px 16px;
        border-radius: 16px;
        font-size: 14px;
        line-height: 1.4;
}

.chat-bubble.ai {
        background: var(--surface-variant);
        color: var(--on-surface);
        border-bottom-left-radius: 4px;
        align-self: flex-start;
}

.chat-bubble.user {
        background: var(--primary);
        color: var(--white);
        border-bottom-right-radius: 4px;
        align-self: flex-end;
}

.copilot-input {
        padding: 16px;
        border-top: 1px solid var(--outline);
        display: flex;
        gap: 8px;
}

.copilot-input input {
        flex: 1;
        border: 1px solid var(--outline);
        border-radius: 24px;
        padding: 8px 16px;
        font-family: var(--font-body);
        font-size: 14px;
        outline: none;
}

.copilot-input input:focus {
        border-color: var(--primary);
}

.copilot-input button {
        background: var(--black);
        color: var(--white);
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
}
