:root {
    --color-primary: #123f3c;
    --color-primary-hover: #0c302e;
    --color-accent: #e7b63e;
    --color-background: #f4f6f3;
    --color-surface: #ffffff;
    --color-surface-muted: #edf2ef;
    --color-border: #d9e0dc;
    --color-text: #122022;
    --color-text-muted: #657376;
    --color-success: #23724d;
    --color-warning: #a86f00;
    --color-danger: #b42318;
    --mounting-roof: #d8dee6;
    --mounting-roof-edge: #64748b;
    --mounting-panel: #123d4a;
    --mounting-panel-frame: #7fc7c0;
    --mounting-rail: #12b7bd;
    --mounting-attachment: #f97316;
    --mounting-clamp: #f7c948;
    --mounting-rafter: #7c8aa0;
    --mounting-obstacle: #ef4444;
    --shadow-subtle: 0 10px 28px rgba(20, 38, 35, 0.07);
    --radius: 8px;
}

/* DachIQ UI/UX refresh */
:root {
    --color-primary: #202827;
    --color-primary-hover: #111716;
    --color-accent: #e7b63e;
    --color-background: #f7f6f2;
    --color-surface-muted: #eeece5;
    --color-border: #d8d4c9;
    --color-text: #202827;
    --color-text-muted: #5f6864;
    --color-technical: #315d63;
    --shadow-subtle: 0 10px 24px rgba(32, 40, 39, 0.06);
}

body {
    background: var(--color-background);
    font-family: "IBM Plex Sans", "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
}

textarea {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    font: inherit;
    min-height: 9rem;
    padding: 0.78rem 0.9rem;
    resize: vertical;
    width: 100%;
}

textarea:focus,
button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(231, 182, 62, 0.45);
    outline-offset: 3px;
}

.button.primary {
    background: var(--color-accent);
    color: #202827;
}

.button.primary:hover {
    background: #d4a52f;
}

.button.secondary {
    color: var(--color-primary);
}

.brand-mark {
    background: var(--color-accent);
    border-radius: 4px;
    color: #202827;
}

.public-page {
    background:
        linear-gradient(180deg, #f7f6f2 0, #fff 42rem, #f7f6f2 100%);
    min-height: 100vh;
}

.public-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    width: min(1240px, calc(100% - 2rem));
    border-bottom: 1px solid rgba(32, 40, 39, 0.12);
    background: rgba(247, 246, 242, 0.92);
    backdrop-filter: blur(14px);
}

.public-menu-toggle {
    display: none;
}

.public-nav {
    align-items: center;
    display: flex;
    gap: 0.35rem;
}

.public-nav a:not(.button) {
    border-radius: 6px;
    color: #3e4945;
    min-height: 40px;
    padding: 0.5rem 0.7rem;
}

.public-hero,
.planning-proof,
.process-section,
.results-section,
.package-section,
.faq-section,
.contact-section,
.public-footer {
    box-sizing: border-box;
    width: min(1240px, calc(100% - 2rem));
    margin: 0 auto;
}

.public-page * {
    box-sizing: border-box;
}

.public-hero {
    align-items: center;
    display: grid;
    gap: clamp(1.5rem, 4vw, 4rem);
    grid-template-columns: minmax(28rem, 0.82fr) minmax(34rem, 1.18fr);
    min-height: clamp(620px, 72vh, 820px);
    padding: clamp(2rem, 5vw, 5rem) 0 4rem;
}

.hero-copy h1 {
    font-size: clamp(2.5rem, 4.4vw, 4.85rem);
    letter-spacing: 0;
    line-height: 1.04;
    margin: 0.45rem 0 1rem;
    max-width: min(13ch, 100%);
    overflow-wrap: break-word;
}

.hero-copy,
.product-workbench,
.demo-roof,
.demo-controls,
.result-table,
.report-slice,
.inquiry-card {
    min-width: 0;
}

.hero-copy p {
    color: #42504c;
    font-size: 1.15rem;
    max-width: 43rem;
}

.hero-facts {
    display: grid;
    gap: 0.75rem;
    margin: 2rem 0 0;
}

.hero-facts div {
    border-left: 4px solid var(--color-accent);
    padding-left: 0.85rem;
}

.hero-facts dt {
    font-weight: 900;
}

.hero-facts dd {
    color: var(--color-text-muted);
    margin: 0.12rem 0 0;
}

.product-workbench {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 22px 60px rgba(32, 40, 39, 0.16);
    overflow: hidden;
}

.workbench-head,
.preview-toolbar {
    align-items: center;
    background: #202827;
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.workbench-head span {
    color: #f6d67b;
    font-weight: 800;
}

.workbench-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) 16rem;
    min-height: 440px;
    padding: 1rem;
}

.roof-plan,
.demo-roof-plane {
    background:
        linear-gradient(90deg, rgba(49, 93, 99, 0.12) 1px, transparent 1px),
        linear-gradient(0deg, rgba(49, 93, 99, 0.12) 1px, transparent 1px),
        #f9faf7;
    background-size: 28px 28px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    min-height: 420px;
    overflow: hidden;
    position: relative;
}

.roof-outline {
    position: absolute;
    inset: 13% 10% 16% 9%;
    background: rgba(231, 182, 62, 0.14);
    border: 2px solid #202827;
    clip-path: polygon(6% 18%, 54% 3%, 94% 28%, 82% 92%, 17% 86%);
}

.roof-panels,
.demo-panel-field {
    position: absolute;
}

.roof-panels {
    inset: 26% 20% 31% 24%;
    clip-path: polygon(0 10%, 82% 0, 100% 72%, 14% 100%);
}

.roof-obstacle,
.demo-obstacle,
.demo-shadow,
.measure {
    position: absolute;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 850;
}

.roof-obstacle,
.demo-obstacle {
    background: #fff;
    border: 1px solid #b54f36;
    color: #8a321d;
    padding: 0.35rem 0.5rem;
}

.roof-obstacle {
    right: 24%;
    top: 34%;
}

.measure {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 0.22rem 0.45rem;
}

.measure-a {
    bottom: 13%;
    left: 34%;
}

.measure-b {
    right: 7%;
    top: 45%;
    transform: rotate(90deg);
}

.module-drawer {
    border-left: 1px solid var(--color-border);
    display: grid;
    gap: 0.7rem;
    padding-left: 1rem;
}

.module-drawer > span,
.module-drawer dt {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.module-drawer dl {
    display: grid;
    gap: 0.7rem;
    margin: 0;
}

.module-drawer dd {
    margin: 0;
    font-weight: 850;
}

.planning-proof,
.process-section,
.results-section,
.package-section,
.faq-section,
.contact-section {
    padding: clamp(3rem, 6vw, 5.5rem) 0;
}

.section-heading {
    max-width: 760px;
}

.section-heading h2 {
    font-size: clamp(1.9rem, 3.2vw, 3.1rem);
    line-height: 1.08;
    margin: 0.4rem 0 0.8rem;
}

.section-heading p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
}

.demo-planning-grid,
.results-grid,
.contact-section {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
}

.demo-roof {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
}

.demo-roof p {
    color: var(--color-text-muted);
    font-weight: 850;
    margin: 0.75rem 0 0;
}

.demo-roof-plane {
    min-height: 460px;
}

.demo-panel-field {
    inset: 16% 20% 22% 15%;
    clip-path: polygon(8% 0, 100% 12%, 86% 100%, 0 82%);
}

.demo-panel-field {
    background: rgba(49, 93, 99, 0.08);
    border: 1px solid rgba(49, 93, 99, 0.26);
}

.demo-panel {
    background: #294e56;
    border: 1px solid #83bab8;
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    height: 10%;
    position: absolute;
    width: 8.7%;
}

.demo-shadow {
    background: rgba(181, 79, 54, 0.14);
    border: 1px dashed #b54f36;
    bottom: 22%;
    color: #7a2b19;
    left: 10%;
    padding: 0.45rem 0.6rem;
    width: 42%;
}

.demo-obstacle {
    right: 28%;
    top: 36%;
}

.demo-3d-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-top: 1rem;
    overflow: hidden;
}

.demo-3d-head {
    align-items: center;
    background: #202827;
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.7rem 0.85rem;
}

.demo-3d-head button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 850;
    min-height: 2.15rem;
    padding: 0.35rem 0.65rem;
}

.demo-3d-canvas {
    aspect-ratio: 16 / 9;
    background: #f9faf7;
    min-height: 280px;
    position: relative;
}

.demo-3d-canvas canvas {
    display: block;
    height: 100%;
    width: 100%;
}

.demo-controls,
.report-slice,
.inquiry-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-subtle);
    padding: 1rem;
}

.demo-controls h3 {
    margin-top: 0;
}

.demo-controls button {
    background: #f7f6f2;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
    cursor: pointer;
    display: block;
    margin-bottom: 0.55rem;
    min-height: 44px;
    padding: 0.65rem 0.75rem;
    text-align: left;
    width: 100%;
}

.demo-controls button.is-active {
    background: #fff7d8;
    border-color: #d5a62e;
    box-shadow: inset 4px 0 0 var(--color-accent);
}

.demo-metrics {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1rem 0 0;
}

.demo-metrics div {
    border-top: 1px solid var(--color-border);
    padding-top: 0.6rem;
}

.demo-metrics dt {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.demo-metrics dd {
    margin: 0.15rem 0 0;
    font-weight: 900;
}

.process-flow {
    counter-reset: process;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
}

.process-flow li {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    counter-increment: process;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
    padding: 1rem;
    position: relative;
}

.process-flow li::before {
    background: var(--color-accent);
    border: 1px solid #c59528;
    border-radius: 4px;
    content: counter(process);
    display: grid;
    font-weight: 900;
    height: 2rem;
    place-items: center;
    width: 2rem;
}

.process-flow strong {
    font-size: 1.05rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.process-flow span {
    color: var(--color-text-muted);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.result-table,
.package-table {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.report-slice {
    align-content: center;
    border-left: 5px solid var(--color-accent);
    display: grid;
    gap: 0.55rem;
}

.report-slice strong {
    font-size: 1.35rem;
}

.report-slice p,
.report-slice span {
    color: var(--color-text-muted);
    margin: 0;
}

.demo-note {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 1rem 0 0;
}

.product-screens {
    display: grid;
    gap: 1rem;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
}

.product-screen {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-subtle);
    margin: 0;
    min-width: 0;
    overflow: hidden;
}

.product-screen figcaption {
    background: #202827;
    color: #fff;
    font-weight: 900;
    padding: 0.75rem 1rem;
}

.mini-toolbar {
    border-bottom: 1px solid var(--color-border);
    display: flex;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
}

.mini-toolbar span {
    background: #f1efe8;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: #3e4945;
    font-size: 0.82rem;
    font-weight: 850;
    padding: 0.28rem 0.5rem;
}

.mini-plan {
    background:
        linear-gradient(90deg, rgba(49, 93, 99, 0.1) 1px, transparent 1px),
        linear-gradient(0deg, rgba(49, 93, 99, 0.1) 1px, transparent 1px),
        #f9faf7;
    background-size: 24px 24px;
    height: 260px;
    position: relative;
}

.mini-roof {
    background: rgba(231, 182, 62, 0.14);
    border: 2px solid #202827;
    clip-path: polygon(6% 18%, 55% 4%, 94% 26%, 82% 91%, 17% 86%);
    inset: 11% 9% 13%;
    position: absolute;
}

.mini-panel {
    background: #294e56;
    border: 1px solid #83bab8;
    height: 32px;
    position: relative;
    width: 22px;
}

.mini-plan .mini-panel {
    position: absolute;
}

.mini-plan .mini-panel:nth-of-type(3n + 1) {
    left: 22%;
}

.mini-plan .mini-panel:nth-of-type(3n + 2) {
    left: 27%;
}

.mini-plan .mini-panel:nth-of-type(3n) {
    left: 32%;
}

.mini-plan .mini-panel:nth-of-type(n + 4) {
    top: 22%;
}

.mini-plan .mini-panel:nth-of-type(n + 7) {
    top: 38%;
}

.mini-plan .mini-panel:nth-of-type(n + 10) {
    top: 54%;
}

.mini-plan .mini-panel:nth-of-type(n + 13) {
    top: 70%;
}

.mini-obstacle {
    background: #fff;
    border: 1px solid #b54f36;
    height: 2.2rem;
    left: 56%;
    position: absolute;
    top: 38%;
    width: 4rem;
    z-index: 1;
}

.product-screen dl {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 1rem;
}

.product-screen dt {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.product-screen dd {
    font-weight: 900;
    margin: 0.1rem 0 0;
}

.mini-list {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
}

.mini-list span {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    display: grid;
    gap: 0.25rem;
    padding: 0.8rem;
}

.mini-list i {
    color: var(--color-text-muted);
    font-style: normal;
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.faq-section .faq-list {
    max-width: 900px;
}

.contact-section {
    align-items: start;
}

.contact-section > div {
    max-width: 34rem;
}

.contact-section h2 {
    font-size: clamp(1.9rem, 3.2vw, 3rem);
    line-height: 1.08;
    margin: 0.45rem 0 0.8rem;
}

.inquiry-card {
    display: grid;
    gap: 0.8rem;
}

.hp-field {
    clip: rect(0 0 0 0);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.field-error {
    color: var(--color-danger);
    font-weight: 800;
    margin-top: 0.25rem;
}

.unit-input {
    align-items: center;
    display: grid;
    gap: 0.45rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.unit-input small {
    color: var(--color-text-muted);
    font-weight: 900;
}

.public-footer {
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    padding: 2rem 0;
}

.public-footer p {
    color: var(--color-text-muted);
    margin: 0.25rem 0 0;
}

.public-footer nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.content {
    background: #fbfaf7;
}

.page-header {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}

.metric,
.panel,
.analysis-entry,
.login-card {
    border-radius: 6px;
    box-shadow: none;
}

.metric {
    border-left: 4px solid var(--color-accent);
}

.table-wrap {
    border-radius: 6px;
}

.map-canvas,
.mounting-plan-canvas,
.mounting-3d-canvas {
    border-radius: 6px;
}

.login-simple-page {
    align-content: center;
    background:
        linear-gradient(90deg, rgba(32, 40, 39, 0.05) 1px, transparent 1px),
        #f7f6f2;
    background-size: 42px 42px;
    display: grid;
    gap: 2rem;
    justify-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-card-centered {
    max-width: 28rem;
    width: 100%;
}

@media (max-width: 1100px) {
    .public-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .hero-copy h1 {
        max-width: 15ch;
    }

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

@media (max-width: 900px) {
    .public-topbar {
        align-items: center;
    }

    .public-menu-toggle {
        align-items: center;
        background: #fff;
        border: 1px solid var(--color-border);
        border-radius: 6px;
        color: var(--color-text);
        display: inline-flex;
        font-weight: 850;
        gap: 0.45rem;
        min-height: 44px;
        padding: 0.55rem 0.85rem 0.55rem 2.3rem;
        position: relative;
    }

    .public-menu-toggle span {
        background: currentColor;
        display: block;
        height: 2px;
        left: 0.75rem;
        position: absolute;
        width: 14px;
    }

    .public-menu-toggle span:nth-child(1) {
        top: 0.9rem;
    }

    .public-menu-toggle span:nth-child(2) {
        top: 1.28rem;
    }

    .public-menu-toggle span:nth-child(3) {
        top: 1.66rem;
    }

    .public-nav {
        background: #fff;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        box-shadow: var(--shadow-subtle);
        display: none;
        flex-direction: column;
        inset: 4.6rem 1rem auto 1rem;
        overflow: visible;
        padding: 0.75rem;
        position: fixed;
        width: auto;
    }

    .public-nav.is-open {
        display: flex;
    }

    .public-nav a {
        width: 100%;
    }

    .public-hero,
    .demo-planning-grid,
    .results-grid,
    .contact-section,
    .workbench-layout,
    .product-screens {
        grid-template-columns: 1fr;
    }

    .public-hero {
        min-height: 0;
        padding-top: 2rem;
    }

    .module-drawer {
        border-left: 0;
        border-top: 1px solid var(--color-border);
        padding-left: 0;
        padding-top: 1rem;
    }
}

@media (max-width: 560px) {
    .public-hero,
    .planning-proof,
    .process-section,
    .results-section,
    .package-section,
    .faq-section,
    .contact-section,
    .public-footer {
        width: min(100% - 1rem, 1240px);
    }

    .roof-plan,
    .demo-roof-plane {
        min-height: 320px;
    }

    .demo-3d-canvas {
        min-height: 220px;
    }

    .demo-metrics,
    .process-flow {
        grid-template-columns: 1fr;
    }

    .process-flow li {
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.mounting-disclaimer {
    align-items: flex-start;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #7c2d12;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}

.mounting-disclaimer strong {
    white-space: nowrap;
}

.mounting-planning-shell {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
    margin-bottom: 1rem;
}

.mounting-workspace,
.mounting-side {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-subtle);
    min-width: 0;
    padding: 1rem;
}

.mounting-toolbar {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.mounting-toolbar h2,
.mounting-side h2 {
    margin-bottom: 0.2rem;
}

.mounting-toolbar p {
    color: var(--color-text-muted);
    margin: 0;
}

.mounting-view-controls {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.segmented-control {
    background: #edf2ef;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: inline-flex;
    gap: 0.15rem;
    padding: 0.2rem;
}

.segmented-control button {
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    font-weight: 800;
    min-height: 2.2rem;
    padding: 0.45rem 0.7rem;
}

.segmented-control button.is-active {
    background: #fff;
    color: var(--color-primary);
    box-shadow: 0 4px 14px rgba(18, 63, 60, 0.08);
}

.mounting-layer-bar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.85rem;
    margin-bottom: 0.75rem;
}

.mounting-layer-bar label {
    align-items: center;
    color: var(--color-text-muted);
    display: inline-flex;
    gap: 0.35rem;
    font-size: 0.86rem;
    font-weight: 700;
}

.mounting-layer-bar input[type="checkbox"] {
    width: auto;
}

.mounting-layer-bar input[type="range"] {
    accent-color: var(--mounting-panel);
    width: 5.2rem;
}

.button.compact {
    min-height: 2.1rem;
    padding: 0.4rem 0.65rem;
}

.mounting-canvas-stack {
    display: grid;
}

.mounting-plan-canvas,
.mounting-3d-canvas {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    min-height: 28rem;
    overflow: hidden;
}

.mounting-plan-canvas.is-drawing {
    cursor: crosshair;
}

.mounting-plan-canvas svg {
    display: block;
    height: auto;
    width: 100%;
}

.mounting-3d-canvas {
    min-height: 24rem;
}

.mounting-3d-canvas canvas {
    display: block;
}

.mounting-shape,
.mounting-line,
.mounting-point {
    transform-box: fill-box;
    transform-origin: center;
    transition: opacity 0.16s ease, stroke-width 0.16s ease, transform 0.16s ease;
}

.mounting-roof {
    fill: var(--mounting-roof);
    fill-opacity: 0.64;
    stroke: var(--mounting-roof-edge);
    stroke-width: 1.4;
}

.mounting-roof.is-selected {
    fill-opacity: 0.78;
    stroke: #123d4a;
    stroke-width: 2.4;
}

.mounting-panel {
    fill: var(--mounting-panel);
    fill-opacity: 0.86;
    stroke: var(--mounting-panel-frame);
    stroke-width: 0.9;
}

.mounting-obstacle {
    fill: var(--mounting-obstacle);
    fill-opacity: 0.45;
    stroke: #991b1b;
    stroke-width: 1.2;
}

.mounting-line {
    fill: none;
}

.mounting-rail {
    stroke: var(--mounting-rail);
    stroke-linecap: round;
    stroke-width: 3;
}

.mounting-rafter {
    stroke: var(--mounting-rafter);
    stroke-dasharray: 4 5;
    stroke-width: 1.1;
}

.mounting-clamp.is-mid {
    fill: var(--mounting-clamp);
    stroke: #854d0e;
}

.mounting-clamp.is-end {
    fill: #fb7185;
    stroke: #9f1239;
}

.mounting-attachment {
    fill: var(--mounting-attachment);
    stroke: #9a3412;
}

.mounting-plan-canvas[data-active-mounting-mode="substructure"] .mounting-panel {
    fill-opacity: 0.2;
}

.mounting-plan-canvas[data-active-mounting-mode="substructure"] .mounting-roof {
    fill-opacity: 0.42;
}

.mounting-plan-canvas[data-active-mounting-mode="substructure"] .mounting-rail {
    stroke-width: 5.4;
}

.mounting-plan-canvas[data-active-mounting-mode="substructure"] .mounting-attachment,
.mounting-plan-canvas[data-active-mounting-mode="substructure"] .mounting-clamp {
    transform: scale(1.45);
}

.mounting-plan-canvas[data-active-mounting-mode="exploded"] .mounting-panel {
    filter: drop-shadow(0 10px 5px rgba(18, 61, 74, 0.25));
    transform: translate(-9px, -13px);
}

.mounting-plan-canvas[data-active-mounting-mode="exploded"] .mounting-rail {
    filter: drop-shadow(0 6px 4px rgba(18, 183, 189, 0.3));
    stroke-width: 4.6;
    transform: translate(3px, 4px);
}

.mounting-plan-canvas[data-active-mounting-mode="exploded"] .mounting-attachment,
.mounting-plan-canvas[data-active-mounting-mode="exploded"] .mounting-clamp {
    filter: drop-shadow(0 4px 3px rgba(249, 115, 22, 0.32));
    transform: translate(10px, 12px) scale(1.28);
}

.mounting-label {
    fill: #334155;
    font-size: 14px;
    font-weight: 700;
    paint-order: stroke;
    pointer-events: none;
    stroke: #f8fafc;
    stroke-linejoin: round;
    stroke-width: 4px;
    text-anchor: middle;
}

.is-hidden {
    display: none !important;
    pointer-events: none;
}

.mounting-selection,
.mounting-property-card {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
    padding: 0.7rem 0.8rem;
}

.mounting-property-card {
    display: grid;
    gap: 0.15rem;
    margin-bottom: 0.9rem;
}

.mounting-property-card strong {
    color: var(--color-text);
}

.mounting-side h3 {
    border-top: 1px solid var(--color-border);
    font-size: 0.88rem;
    margin: 0.45rem 0 0.15rem;
    padding-top: 0.75rem;
}

.stacked-form {
    display: grid;
    gap: 0.7rem;
}

.stacked-form label {
    color: var(--color-text-muted);
    display: grid;
    font-size: 0.86rem;
    gap: 0.25rem;
}

.mounting-side .stacked-form label {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.mounting-side .stacked-form label > span {
    align-items: center;
    display: grid;
    gap: 0.35rem;
    grid-template-columns: minmax(4.5rem, 1fr) auto;
}

.mounting-side .stacked-form label > input,
.mounting-side .stacked-form label > select,
.mounting-side .stacked-form label > span {
    max-width: 11rem;
}

.stacked-form input,
.stacked-form select {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font: inherit;
    padding: 0.55rem 0.65rem;
}

.quality-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quality-grid div {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.75rem;
}

.quality-grid strong,
.quality-grid span {
    display: block;
}

.quality-grid strong {
    margin-bottom: 0.25rem;
}

.quality-grid span {
    color: var(--color-text-muted);
}

.mounting-bottom {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.6fr);
}

.mounting-summary {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.mounting-summary div {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.75rem;
}

.mounting-summary strong,
.mounting-summary span {
    display: block;
}

.mounting-summary strong {
    color: var(--color-primary);
    font-size: 1.15rem;
}

.mounting-summary span {
    color: var(--color-text-muted);
    font-size: 0.82rem;
}

@media (max-width: 980px) {
    .mounting-planning-shell,
    .mounting-bottom,
    .quality-grid {
        grid-template-columns: 1fr;
    }

    .mounting-toolbar {
        display: grid;
    }

    .mounting-workspace,
    .mounting-side {
        padding: 0.8rem;
    }

    .mounting-view-controls,
    .mounting-layer-bar {
        justify-content: flex-start;
    }

    .mounting-plan-canvas,
    .mounting-3d-canvas {
        min-height: clamp(24rem, 82vh, 40rem);
    }

    .mounting-plan-canvas {
        overflow: auto;
    }

    .mounting-plan-canvas svg {
        min-width: 54rem;
    }

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

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: Inter, Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

small {
    display: block;
    color: var(--color-text-muted);
}

input,
select,
button {
    font: inherit;
}

input,
select {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.78rem 0.9rem;
    background: var(--color-surface);
    color: var(--color-text);
}

input[type="checkbox"] {
    width: auto;
    min-width: 18px;
}

input:focus,
select:focus {
    border-color: var(--color-primary);
    outline: 3px solid rgba(18, 63, 60, 0.12);
}

label {
    display: grid;
    gap: 0.4rem;
    color: var(--color-text);
    font-weight: 700;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

th,
td {
    border-bottom: 1px solid var(--color-border);
    padding: 0.82rem 0.75rem;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

th {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

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

.mobile-app-bar,
.sidebar-backdrop,
.sidebar-close {
    display: none;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 232px;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: #102927;
    color: #fff;
}

.brand {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: inherit;
    padding-bottom: 1rem;
}

.brand.large {
    margin-bottom: 2rem;
    border-bottom: 0;
    color: var(--color-text);
}

.brand-mark {
    display: grid;
    min-width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 6px;
    background:
        linear-gradient(135deg, rgba(231, 182, 62, 0.98), rgba(244, 205, 95, 0.98));
    color: #132522;
    font-size: 0.86rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    box-shadow: inset 0 0 0 1px rgba(19, 37, 34, 0.16);
}

.brand strong {
    line-height: 1.15;
}

.brand small {
    color: rgba(255, 255, 255, 0.7);
}

.brand.large small {
    color: var(--color-text-muted);
}

.nav {
    display: grid;
    gap: 0.25rem;
    margin-top: 1.25rem;
}

.nav span {
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.72rem;
    font-weight: 900;
    margin: 0.9rem 0 0.2rem;
    text-transform: uppercase;
}

.nav a {
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.78);
    padding: 0.58rem 0.7rem;
    font-weight: 750;
}

.nav a.active,
.nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-footer {
    display: grid;
    gap: 0.55rem;
    margin-top: auto;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
}

.sidebar-footer a {
    color: #fff;
    font-weight: 800;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.check-row {
    display: flex;
    grid-auto-flow: column;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    font-weight: 800;
}

.quota-note {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    padding: 0.8rem 0.9rem;
    background: var(--color-surface-muted);
}

.quota-note strong {
    color: var(--color-primary);
    font-size: 1.45rem;
    line-height: 1;
}

.quota-strip {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.quota-strip span {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.55rem 0.75rem;
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-weight: 750;
}

.quota-strip strong {
    color: var(--color-primary);
}

.admin-user-list {
    display: grid;
    gap: 1rem;
}

.admin-user-card {
    display: grid;
    gap: 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem;
    background: var(--color-surface);
}

.admin-user-card-header,
.admin-user-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-user-card-header div {
    display: grid;
    gap: 0.15rem;
}

.admin-user-card-header span {
    color: var(--color-text-muted);
}

.quota-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.content {
    margin-left: 232px;
    min-width: 0;
    padding: 1.45rem 1.75rem 2.5rem;
}

.auth-content {
    min-height: 100vh;
}

.page-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.35rem;
}

.page-header h1 {
    margin: 0.15rem 0 0.35rem;
    font-size: 2rem;
    line-height: 1.15;
}

.page-header p {
    max-width: 820px;
    margin: 0;
    color: var(--color-text-muted);
}

.eyebrow {
    color: var(--color-primary);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius);
    padding: 0.72rem 1rem;
    font-weight: 850;
    cursor: pointer;
}

.button.primary {
    background: var(--color-primary);
    color: #fff;
}

.button.primary:hover {
    background: var(--color-primary-hover);
}

.button.secondary {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-primary);
}

.button:disabled,
input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.metric,
.panel,
.analysis-entry,
.login-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow-subtle);
}

.metric {
    display: grid;
    gap: 0.18rem;
    min-height: 118px;
    padding: 1rem;
}

.metric.compact {
    min-height: 86px;
    padding: 0.75rem;
}

.metric.compact strong {
    font-size: 1.05rem;
}

.compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 0;
}

.metric span,
.muted,
.disclaimer {
    color: var(--color-text-muted);
}

.metric strong {
    font-size: 1.85rem;
    line-height: 1.12;
}

.metric small {
    font-size: 0.82rem;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.panel {
    min-width: 0;
    padding: 1.1rem;
}

.panel h2 {
    margin: 0 0 1rem;
    font-size: 1.22rem;
}

.panel h3 {
    margin: 1rem 0 0.35rem;
    font-size: 0.95rem;
}

.value-list {
    display: grid;
    gap: 0.8rem;
}

.value-list div {
    display: grid;
    gap: 0.18rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.75rem;
}

.value-list span {
    color: var(--color-text-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.feature-list {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding-left: 1.1rem;
}

.span-2 {
    grid-column: span 2;
}

.stack-form {
    display: grid;
    gap: 0.9rem;
}

.analysis-entry {
    max-width: 980px;
    padding: 1.2rem;
}

.address-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
}

.address-row input {
    min-height: 56px;
    font-size: 1.05rem;
}

.analysis-progress {
    display: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    border-top: 1px solid var(--color-border);
    padding-top: 0.85rem;
}

.analysis-progress strong {
    grid-column: 1 / -1;
}

.analysis-progress span {
    border-radius: 999px;
    background: var(--color-surface-muted);
    color: var(--color-primary);
    padding: 0.42rem 0.65rem;
    font-size: 0.84rem;
    font-weight: 800;
}

.is-analyzing .analysis-progress {
    display: grid;
}

.is-analyzing button[type="submit"] {
    opacity: 0.75;
    pointer-events: none;
}

.filter-bar {
    display: flex;
    align-items: end;
    gap: 0.8rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-bar label {
    min-width: 170px;
}

.table-wrap {
    overflow-x: auto;
}

.badge,
.status-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.26rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 850;
    white-space: nowrap;
}

.badge,
.status-chip.neutral {
    background: var(--color-surface-muted);
    color: var(--color-primary);
}

.badge.success {
    background: #e4f3ea;
    color: var(--color-success);
}

.badge.warning {
    background: #fff4d7;
    color: var(--color-warning);
}

.status-a {
    background: #e4f3ea;
    color: var(--color-success);
}

.status-b {
    background: #eef6e9;
    color: #446f1d;
}

.status-c {
    background: #fff3d7;
    color: var(--color-warning);
}

.status-d {
    background: #fee4e2;
    color: var(--color-danger);
}

.list {
    display: grid;
    gap: 0.7rem;
}

.list a {
    display: grid;
    gap: 0.15rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.7rem;
}

.list a:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.data-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 1rem;
    margin: 0;
}

.data-list dt {
    color: var(--color-text-muted);
}

.data-list dd {
    margin: 0;
    font-weight: 850;
}

.score-block {
    display: grid;
    gap: 0.1rem;
    margin-bottom: 0.9rem;
}

.score-block strong {
    font-size: 2rem;
}

.score-block span {
    color: var(--color-primary);
    font-weight: 850;
}

.reason-list {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding-left: 1.15rem;
}

.reason-list li::marker {
    color: var(--color-success);
}

.map-panel {
    min-width: 0;
    overflow-x: hidden;
    margin-bottom: 1rem;
}

.map-heading,
.map-footer {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
}

.map-heading {
    margin-bottom: 0.7rem;
}

.map-heading h2 {
    margin: 0;
    font-size: 1.35rem;
}

.map-heading p,
.map-footer p {
    margin: 0;
    color: var(--color-text-muted);
}

.map-controls,
.map-legend {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    padding: 0.55rem 0.7rem;
    white-space: nowrap;
}

.map-controls label,
.map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.86rem;
    font-weight: 750;
}

.map-canvas {
    min-height: 680px;
    overflow: hidden;
    contain: paint;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #233735;
}

.map-footer {
    margin-top: 0.65rem;
}

.legend-panel,
.legend-segment,
.legend-measurement {
    display: inline-block;
    width: 16px;
    height: 12px;
    border-radius: 2px;
}

.legend-panel {
    border: 1px solid #88c6ba;
    background: #173d4a;
}

.legend-segment {
    border: 2px solid var(--color-accent);
    background: rgba(231, 182, 62, 0.16);
}

.legend-measurement {
    border-top: 3px solid #2dd4bf;
    background: transparent;
}

.map-measurement-label {
    position: absolute;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(16, 62, 70, 0.28);
    border-radius: 999px;
    background: rgba(246, 253, 250, 0.92);
    box-shadow: 0 8px 18px rgba(13, 43, 45, 0.2);
    color: #0f3d46;
    font: 800 11px/1.1 Inter, system-ui, sans-serif;
    padding: 0.22rem 0.42rem;
    pointer-events: none;
    white-space: nowrap;
}

.empty-state {
    display: grid;
    min-height: 160px;
    place-content: center;
    gap: 0.45rem;
    padding: 1.2rem;
    color: var(--color-text-muted);
    text-align: center;
}

.empty-state.compact {
    min-height: 0;
    place-items: start;
    text-align: left;
}

.empty-state .button {
    justify-self: start;
    margin-top: 0.3rem;
}

.flash {
    border-radius: var(--radius);
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    background: #e4f3ea;
    color: var(--color-success);
    font-weight: 750;
}

.flash.error {
    background: #fee4e2;
    color: var(--color-danger);
}

.login-page {
    min-height: 100vh;
    background: var(--color-background);
}

.public-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1rem 0;
}

.public-brand {
    border-bottom: 0;
    color: var(--color-text);
    padding-bottom: 0;
}

.public-brand small {
    color: var(--color-text-muted);
}

.public-nav,
.public-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.public-nav a {
    color: var(--color-text-muted);
    font-weight: 800;
}

.public-nav a:hover {
    color: var(--color-primary);
}

.login-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
    gap: 2rem;
    align-items: center;
    width: min(1180px, calc(100% - 2rem));
    min-height: 620px;
    margin: 0 auto;
    padding: 2.5rem 0 3rem;
}

.hero-copy h1 {
    max-width: 680px;
    margin: 0.4rem 0 1rem;
    font-size: 3.65rem;
    line-height: 1.02;
}

.hero-copy p {
    max-width: 640px;
    color: var(--color-text-muted);
    font-size: 1.12rem;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.trust-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 2rem 0 0;
}

.trust-strip div {
    border-left: 3px solid var(--color-accent);
    padding-left: 0.8rem;
}

.trust-strip dt {
    font-weight: 900;
}

.trust-strip dd {
    margin: 0.15rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.product-preview {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    box-shadow: 0 28px 70px rgba(18, 32, 34, 0.13);
    overflow: hidden;
}

.preview-toolbar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border-bottom: 1px solid var(--color-border);
    padding: 0.8rem 1rem;
}

.preview-toolbar span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-border);
}

.preview-toolbar strong {
    margin-left: 0.35rem;
}

.preview-map {
    position: relative;
    min-height: 360px;
    background:
        linear-gradient(35deg, rgba(18, 63, 60, 0.48), rgba(18, 63, 60, 0.1)),
        linear-gradient(135deg, #31524a 0 20%, #203b37 20% 38%, #76816c 38% 48%, #243a36 48% 70%, #4f654f 70% 100%);
}

.roof {
    position: absolute;
    border: 2px solid rgba(231, 182, 62, 0.9);
    background: rgba(231, 182, 62, 0.12);
}

.roof-main {
    inset: 24% 16% 27% 26%;
    transform: rotate(4deg);
}

.roof-side {
    inset: 43% 46% 19% 18%;
    transform: rotate(-8deg);
}

.panel-array {
    position: absolute;
    background-image:
        linear-gradient(rgba(140, 201, 189, 0.85) 1px, transparent 1px),
        linear-gradient(90deg, rgba(140, 201, 189, 0.85) 1px, transparent 1px);
    background-color: rgba(23, 61, 74, 0.86);
    background-size: 18px 24px;
    border: 1px solid rgba(140, 201, 189, 0.9);
}

.panel-array-a {
    inset: 32% 22% 37% 36%;
    transform: rotate(4deg);
}

.panel-array-b {
    inset: 48% 50% 25% 24%;
    transform: rotate(-8deg);
}

.score-pill {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    border-radius: 999px;
    background: #fff;
    color: var(--color-primary);
    padding: 0.55rem 0.8rem;
    font-weight: 900;
    box-shadow: var(--shadow-subtle);
}

.preview-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preview-metrics div {
    border-right: 1px solid var(--color-border);
    padding: 1rem;
}

.preview-metrics div:last-child {
    border-right: 0;
}

.preview-metrics span {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.preview-metrics strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.45rem;
}

.public-section,
.login-panel-section {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3rem 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 1.3rem;
}

.section-heading h2,
.login-panel-section h2 {
    margin: 0.3rem 0 0.55rem;
    font-size: 2rem;
    line-height: 1.15;
}

.section-heading p,
.login-panel-section p {
    color: var(--color-text-muted);
}

.value-grid,
.pricing-grid,
.workflow-grid,
.product-split,
.trust-section {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.value-grid article,
.pricing-card,
.workflow-grid article,
.product-split article,
.trust-section article,
.inquiry-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow-subtle);
    padding: 1.2rem;
}

.value-grid strong,
.pricing-card h3 {
    font-size: 1.15rem;
}

.value-grid p,
.pricing-card p {
    color: var(--color-text-muted);
}

.pricing-card {
    display: grid;
    align-content: start;
    gap: 0.65rem;
}

.pricing-card.featured {
    border-color: rgba(18, 63, 60, 0.32);
    box-shadow: 0 20px 46px rgba(18, 63, 60, 0.12);
}

.pricing-card span {
    color: var(--color-primary);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.pricing-card h3,
.pricing-card p,
.pricing-card ul {
    margin: 0;
}

.pricing-card > strong {
    font-size: 1.8rem;
}

.pricing-card ul {
    display: grid;
    gap: 0.4rem;
    padding-left: 1.1rem;
}

.pricing-card li::marker {
    color: var(--color-success);
}

.pricing-card .button {
    align-self: end;
    margin-top: 0.5rem;
}

.workflow-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workflow-grid article {
    display: grid;
    gap: 0.55rem;
}

.workflow-grid span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 900;
}

.workflow-grid p,
.product-split p,
.trust-section p,
.faq-list p {
    color: var(--color-text-muted);
}

.product-split,
.trust-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-split h2,
.trust-section h2 {
    margin: 0.35rem 0 0.8rem;
    font-size: 1.65rem;
    line-height: 1.18;
}

.product-split ul {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding-left: 1.1rem;
}

.product-split li::marker {
    color: var(--color-success);
}

.faq-list {
    display: grid;
    gap: 0.65rem;
}

.faq-list details {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    padding: 1rem 1.1rem;
}

.faq-list summary {
    cursor: pointer;
    font-weight: 900;
}

.faq-list p {
    margin-bottom: 0;
}

.login-panel-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    gap: 2rem;
    align-items: center;
    border-top: 1px solid var(--color-border);
}

.inquiry-card {
    display: grid;
    gap: 0.65rem;
}

.inquiry-card .button {
    margin-top: 0.4rem;
}

.success-state {
    display: grid;
    gap: 0.2rem;
    border-radius: var(--radius);
    background: #e4f3ea;
    color: var(--color-success);
    padding: 0.9rem 1rem;
}

.field-error {
    color: var(--color-danger);
    font-weight: 800;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.login-simple-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    gap: 1.5rem;
    padding: 2rem 1rem;
    background: var(--color-background);
}

.login-card-centered {
    max-width: 430px;
}

.login-card {
    width: 100%;
    margin: 0;
    padding: 1.4rem;
}

.login-card h2 {
    margin-top: 0;
}

.login-card h1 {
    margin: 0.3rem 0 0.4rem;
    font-size: 2rem;
}

.login-card p,
.login-note {
    color: var(--color-text-muted);
}

.login-card label {
    margin-top: 0.8rem;
}

.login-card .button {
    width: 100%;
    margin-top: 1rem;
}

.public-footer {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    border-top: 1px solid var(--color-border);
    padding: 2rem 0;
}

.public-footer p {
    max-width: 520px;
    color: var(--color-text-muted);
}

.public-footer nav {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.public-footer a {
    color: var(--color-text-muted);
    font-weight: 800;
}

.public-footer a:hover {
    color: var(--color-primary);
}

.disclaimer {
    margin-top: 1rem;
    font-size: 0.9rem;
}

@media (max-width: 1100px) {
    .metric-grid,
    .compact-grid,
    .content-grid,
    .login-hero,
    .login-panel-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-copy h1 {
        font-size: 3rem;
    }

    .map-canvas {
        min-height: 560px;
    }
}

@media (max-width: 760px) {
    .mobile-app-bar {
        position: sticky;
        top: 0;
        z-index: 40;
        display: flex;
        min-height: 70px;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        background: #102927;
        color: #fff;
        padding: 0.85rem 1rem;
    }

    .mobile-brand {
        margin-left: auto;
        border-bottom: 0;
        padding-bottom: 0;
    }

    .mobile-nav-toggle {
        display: inline-grid;
        grid-template-columns: 18px auto;
        align-items: center;
        gap: 0.45rem 0.55rem;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: var(--radius);
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        padding: 0.55rem 0.72rem;
        font-weight: 850;
    }

    .mobile-nav-toggle span {
        grid-column: 1;
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
    }

    .mobile-nav-toggle strong {
        grid-row: 1 / span 3;
        grid-column: 2;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 45;
        background: rgba(7, 20, 19, 0.48);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease;
    }

    .nav-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    body.nav-open {
        overflow: hidden;
    }

    .sidebar {
        z-index: 50;
        width: min(84vw, 320px);
        max-width: 320px;
        transform: translateX(-100%);
        box-shadow: 22px 0 40px rgba(0, 0, 0, 0.22);
        overflow-y: auto;
        transition: transform 0.2s ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: inline-flex;
        min-height: 38px;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: var(--radius);
        margin-top: 1rem;
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        font-weight: 850;
    }

    .content {
        margin-left: 0;
        padding: 1rem;
    }

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

    .nav span {
        grid-column: 1 / -1;
    }

    .metric-grid,
    .compact-grid,
    .content-grid,
    .login-hero,
    .login-panel-section,
    .form-row,
    .value-grid,
    .pricing-grid,
    .workflow-grid,
    .product-split,
    .trust-section,
    .trust-strip,
    .address-row,
    .analysis-progress {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: auto;
    }

    .page-header,
    .map-heading,
    .map-footer {
        display: grid;
    }

    .page-header h1 {
        font-size: 1.7rem;
    }

    .map-controls,
    .map-legend {
        flex-wrap: wrap;
        white-space: normal;
    }

    .map-canvas {
        min-height: 430px;
    }

    table {
        table-layout: fixed;
    }

    th,
    td {
        padding: 0.55rem 0.35rem;
        font-size: 0.72rem;
    }

    .public-topbar {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .public-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.2rem;
    }

    .public-actions {
        margin-left: auto;
    }

    .public-actions .button {
        min-height: 36px;
        padding: 0.55rem 0.65rem;
    }

    .public-brand small {
        display: none;
    }

    .login-hero {
        min-height: 0;
        padding: 1.5rem 0 2rem;
    }

    .hero-copy h1 {
        font-size: 2.25rem;
    }

    .hero-copy p {
        font-size: 1rem;
    }

    .preview-map {
        min-height: 280px;
    }

    .preview-metrics {
        grid-template-columns: 1fr;
    }

    .preview-metrics div {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .preview-metrics div:last-child {
        border-bottom: 0;
    }

    .public-footer {
        display: grid;
    }
}

@media (max-width: 900px) {
    .public-nav {
        background: #fff;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        box-shadow: var(--shadow-subtle);
        display: none;
        flex-direction: column;
        inset: 4.6rem 1rem auto 1rem;
        overflow: visible;
        padding: 0.75rem;
        position: fixed;
        width: auto;
    }

    .public-nav.is-open {
        display: flex;
    }

    .public-nav a,
    .public-nav .button {
        width: 100%;
    }
}

/* DachIQ public-page overrides after legacy landing rules. */
.public-page .section-heading h2 {
    overflow-wrap: anywhere;
}

.public-page .hp-field {
    clip: rect(0 0 0 0);
    height: 1px;
    left: auto;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.public-page .process-flow {
    border-left: 0;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 2rem 0 0;
}

.public-page .process-flow li {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    grid-template-columns: none;
    min-width: 0;
    padding: 1rem;
}

.public-page .process-flow strong,
.public-page .process-flow span {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
    .public-page .process-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .public-page .public-topbar {
        position: static;
    }

    .public-page .process-flow {
        grid-template-columns: 1fr;
    }
}

