:root {
    color-scheme: light;
    --ink: #101728;
    --muted: #5f6b7a;
    --panel: rgba(255, 255, 255, 0.9);
    --panel-strong: rgba(255, 255, 255, 0.96);
    --border: rgba(16, 23, 40, 0.12);
    --primary: #0c3c78;
    --accent: #f3b53f;
    --accent-dark: #e09a1f;
    --mint: #15b59a;
    --shadow: 0 20px 60px rgba(16, 23, 40, 0.15);
    --font-display: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    --font-sans: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: var(--font-sans);
    color: var(--ink);
    background: radial-gradient(circle at top, #f7ecd4, #e4f0f2 45%, #d7e7f0);
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(0px);
    opacity: 0.65;
    z-index: -1;
    animation: float 18s ease-in-out infinite;
}

body::before {
    top: -120px;
    right: -120px;
    background: radial-gradient(circle, #f3b53f, rgba(243, 181, 63, 0));
}

body::after {
    bottom: -140px;
    left: -120px;
    background: radial-gradient(circle, #7fd8c7, rgba(127, 216, 199, 0));
    animation-delay: -6s;
}

.page-shell {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 48px 4vw 64px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
    gap: 32px;
    align-items: stretch;
}

.hero.hero-single {
    grid-template-columns: minmax(0, 1fr);
}

.hero-main {
    display: grid;
    gap: 32px;
}

.brand {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: start;
}

.brand-copy {
    display: grid;
    gap: 0;
}

.brand-estimates {
    justify-self: end;
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--primary);
    font-size: 14px;
    padding-top: 4px;
}

.logo {
    width: 160px;
    height: auto;
    border-radius: 18px;
    background: transparent;
    border: none;
    display: grid;
    place-items: center;
    padding: 6px;
    box-shadow: none;
}

.logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
}

.step-label {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 11px;
    color: var(--primary);
    font-weight: 700;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    color: var(--ink);
}

h1 {
    font-size: clamp(32px, 4vw, 44px);
    margin-top: 10px;
}

.lead {
    font-size: 18px;
    line-height: 1.6;
    color: var(--muted);
    margin-top: 12px;
}

.cta-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn {
    border: none;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn.primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 14px 28px rgba(12, 60, 120, 0.25);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(12, 60, 120, 0.32);
}

.btn.success {
    background: #1f8f4e;
    color: #fff;
    box-shadow: 0 14px 28px rgba(31, 143, 78, 0.25);
}

.btn.success:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(31, 143, 78, 0.32);
}

.btn.danger {
    background: #c0392b;
    color: #fff;
    box-shadow: 0 12px 24px rgba(192, 57, 43, 0.25);
}

.btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(192, 57, 43, 0.32);
}

.btn.ghost {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn.large {
    padding: 12px 24px;
    font-size: 14px;
}

.hero-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.highlight-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow);
}


main {
    display: grid;
    gap: 32px;
}

.panel {
    background: var(--panel-strong);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 24px;
    box-shadow: var(--shadow);
}

.panel.steps {
    grid-template-columns: minmax(0, 1fr);
}

#documents.panel {
    grid-template-columns: 1fr;
}

#estimate.panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "output" "text";
}

#estimate .estimate-output {
    grid-area: output;
}

#estimate .panel-text {
    grid-area: text;
}

.panel-text {
    display: grid;
    gap: 12px;
}

.panel-text p {
    color: var(--muted);
    line-height: 1.6;
}

.report-list {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}

.report-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
}

.report-item>div {
    min-width: 0;
}

.report-item a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.report-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-card {
    background: #fff;
    border-radius: 22px;
    padding: 20px;
    display: grid;
    gap: 16px;
    border: 1px solid var(--border);
}

.dropzone {
    border: 2px dashed rgba(12, 60, 120, 0.3);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    display: grid;
    gap: 6px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone input {
    display: none;
}

.dropzone.dragover {
    background: rgba(12, 60, 120, 0.08);
    border-color: var(--primary);
}

.drop-title {
    font-weight: 700;
}

.drop-subtitle {
    font-size: 13px;
    color: var(--muted);
}

.estimate-form {
    display: grid;
    gap: 16px;
}

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

.field label {
    font-weight: 700;
    font-size: 13px;
}

.field-help {
    font-size: 12px;
    color: var(--muted);
}

.field input,
.field select,
.field textarea {
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 10px 12px;
    font-family: var(--font-sans);
    font-size: 14px;
    background: #fff;
}


.estimate-output {
    background: #fff;
    border-radius: 22px;
    padding: 20px;
    border: 1px solid var(--border);
    display: grid;
    gap: 12px;
    overflow-wrap: anywhere;
}

.analysis-block {
    background: rgba(12, 60, 120, 0.05);
    border-radius: 16px;
    padding: 12px;
    display: grid;
    gap: 8px;
    overflow-wrap: anywhere;
}

.edit-input {
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 8px 10px;
    font-family: var(--font-sans);
    font-size: 13px;
    background: #fff;
    width: 100%;
}

.edit-input.amount {
    text-align: right;
}

.edit-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.service-list {
    display: grid;
    gap: 10px;
}

.service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
}

.service-row.is-excluded {
    opacity: 0.6;
    background: rgba(12, 60, 120, 0.04);
}

.add-row {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr auto;
    gap: 8px;
    align-items: center;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr 0.8fr;
    gap: 8px;
    align-items: end;
}

@media (max-width: 640px) {
    .add-row {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.analysis-list,
.analysis-warnings,
.estimate-output ul {
    padding-left: 18px;
    color: var(--muted);
    font-size: 13px;
}

.analysis-warnings {
    color: #9b3a3a;
}

.warning-text {
    color: #b3261e;
    font-size: 12px;
    font-weight: 600;
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
}

.output-header>div {
    min-width: 0;
}

.line-item {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 6px;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.line-item>div {
    min-width: 0;
}

.line-item span {
    color: var(--muted);
}

.total-row {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
}

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

.step-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 18px;
    display: grid;
    gap: 8px;
}

.step-card span {
    font-weight: 700;
    color: var(--accent-dark);
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 0 0;
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

.status {
    font-size: 13px;
    color: var(--muted);
}

[data-reveal] {
    opacity: 0;
    transform: translateY(14px);
}

[data-reveal].is-visible {
    animation: reveal 0.9s ease forwards;
}

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

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(20px);
    }
}

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .panel {
        grid-template-columns: 1fr;
    }

    .brand {
        grid-template-columns: 1fr;
    }

    .brand-estimates {
        justify-self: start;
        text-align: left;
    }

    .logo {
        width: 130px;
        height: auto;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding-top: 28px;
    }

    .cta-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .logo {
        width: 110px;
        height: auto;
    }

}
