@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

:root {
    /* Brand palette sampled from the Autosol mark. */
    --bg: #f8fafd;
    --card: #ffffff;
    --text: #15232f;
    --accent: #1d4a71;
    --accent-dark: #143b5b;
    --accent-warm: #f39712;
    --accent-warm-dark: #8a4f00;
    --accent-container: #d5e9fa;
    --warm-container: #fff0d8;
    --muted: #546675;
    --border: #d5e1eb;
    --color-primary: var(--accent);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #e4f1fc 0%, var(--bg) 45%, #fff7ea 100%);
    color: var(--text);
}

.container {
    width: min(920px, 92%);
    margin: 0 auto;
}

.site-header {
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(6px);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 0;
}

.brand {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    font-size: 1.1rem;
    font-family: "Roboto", system-ui, sans-serif;
}

nav a {
    margin-left: 1rem;
    color: var(--muted);
    text-decoration: none;
}

nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.inline-logout {
    margin: 0;
}

.link-btn {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--muted);
    font: inherit;
}

main {
    padding: 1.5rem 0 3rem;
}

.hero {
    padding: 4rem 0;
}

.eyebrow {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--accent-dark);
    font-weight: 700;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0.2rem 0 0.8rem;
}

.lead {
    color: var(--muted);
    max-width: 680px;
    margin-bottom: 1.4rem;
}

.landing-pro {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 1rem;
    border: 1px solid #d1e7de;
    border-radius: 28px;
    padding: 1.15rem;
    background:
        radial-gradient(circle at 82% 18%, rgba(17, 132, 93, 0.2), transparent 42%),
        radial-gradient(circle at 18% 100%, rgba(63, 168, 129, 0.16), transparent 40%),
        linear-gradient(145deg, #f7fffb 0%, #fbfffd 55%, #f2f8ff 100%);
}

.landing-kicker {
    margin: 0 0 0.45rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #0f5b46;
}

.landing-pro h1 {
    margin: 0;
    line-height: 1.02;
    font-size: clamp(2.15rem, 4.4vw, 3.55rem);
    max-width: 12ch;
    font-family: "Roboto", system-ui, sans-serif;
}

.landing-sub {
    margin-top: 0.82rem;
    color: #26453d;
    max-width: 590px;
    font-size: 1.03rem;
}

.landing-chip-row {
    margin-top: 0.92rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.landing-chip {
    border: 1px solid var(--md-outline-variant);
    border-radius: 999px;
    padding: 0.35rem 0.62rem;
    background: #f5fcf8;
    font-size: 0.83rem;
    color: #195f49;
    font-weight: 600;
}

.landing-cta-row {
    margin-top: 1.05rem;
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.home-requests {
    margin-top: 1rem;
    border: 1px solid #d3e6dc;
    border-radius: 16px;
    background:
        radial-gradient(circle at 4% 0%, rgba(18, 115, 87, 0.08), transparent 48%),
        #fbfefc;
    padding: 0.95rem;
}

.home-requests-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.home-requests-head h2 {
    margin: 0;
    font-family: "Roboto", system-ui, sans-serif;
}

.home-requests-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.home-request-grid {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.home-request-card {
    border: 1px solid #d7e7df;
    border-radius: 12px;
    background: #fff;
    padding: 0.7rem;
}

.home-request-card p {
    margin: 0.28rem 0;
}

.home-request-pagination {
    margin-top: 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.home-request-page {
    font-size: 0.9rem;
    font-weight: 700;
    color: #224b3e;
}

.request-success-shell {
    max-width: 760px;
    margin: 0 auto;
    border: 1px solid #c8e2d6;
    background:
        radial-gradient(circle at 100% 0%, rgba(18, 115, 87, 0.14), transparent 56%),
        radial-gradient(circle at 0% 100%, rgba(30, 130, 104, 0.08), transparent 44%),
        #f9fefb;
}

.request-success-shell h1 {
    margin: 0.2rem 0 0.45rem;
    font-family: "Roboto", system-ui, sans-serif;
}

.request-success-sub {
    margin: 0;
    color: #2f5449;
}

.request-success-meta {
    margin-top: 0.85rem;
    border: 1px solid #d5e7de;
    border-radius: 12px;
    background: #fff;
    padding: 0.75rem;
    display: grid;
    gap: 0.42rem;
}

.request-success-meta p {
    margin: 0;
}

.request-success-actions {
    margin-top: 0.8rem;
    display: grid;
    gap: 0.45rem;
}

.impact-card {
    border: 1px solid #d0e5db;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    padding: 0.95rem;
    box-shadow: var(--md-elevation-1);
}

.impact-card h3 {
    margin-top: 0;
    font-family: "Roboto", system-ui, sans-serif;
}

.impact-metrics {
    margin-top: 0.62rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.impact-metrics > div {
    border: 1px solid #d6e9e0;
    border-radius: 12px;
    padding: 0.6rem;
    background: #f9fffc;
}

.m-label {
    margin: 0;
    font-size: 0.73rem;
    color: #496a61;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.m-value {
    margin: 0.28rem 0 0.15rem;
    font-size: 1.22rem;
    font-weight: 800;
    color: #0f573f;
    font-family: "Roboto", system-ui, sans-serif;
}

.m-note {
    margin: 0;
    font-size: 0.78rem;
    color: #4f7067;
}

.fact-band {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.72rem;
}

.fact-tile {
    border: 1px solid #d6e7de;
    border-radius: 12px;
    padding: 0.88rem;
    background:
        linear-gradient(170deg, rgba(255, 255, 255, 0.9), rgba(248, 255, 252, 0.93));
}

.fact-tile h3 {
    margin: 0 0 0.28rem;
    font-family: "Roboto", system-ui, sans-serif;
}

.fact-tile p {
    margin: 0;
    color: #3f5c54;
}

.flow-strip {
    margin-top: 1rem;
    border: 1px solid #d8e6de;
    border-radius: 12px;
    background: #f8fcfa;
    padding: 1rem;
}

.flow-strip h2 {
    margin: 0 0 0.74rem;
    font-family: "Roboto", system-ui, sans-serif;
}

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

.flow-step {
    border: 1px solid #d8e7df;
    border-radius: 12px;
    padding: 0.74rem;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.flow-step:hover {
    transform: translateY(-2px);
    box-shadow: var(--md-elevation-1);
}

.flow-step span {
    display: inline-block;
    font-weight: 700;
    color: var(--md-primary);
    margin-bottom: 0.35rem;
    font-family: "Roboto", system-ui, sans-serif;
}

.flow-step h4 {
    margin: 0 0 0.3rem;
}

.flow-step p {
    margin: 0;
    color: #3f5e56;
}

.reveal {
    animation: slideFade 560ms ease both;
}

.reveal-2 {
    animation-delay: 120ms;
}

.reveal-3 {
    animation-delay: 220ms;
}

@keyframes slideFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.4rem;
}

.form-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.calc-shell {
    max-width: 960px;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.calc-field {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
}

.calc-field-wide {
    grid-column: span 2;
}

.calc-row {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 0.8rem;
}

.toggle-wrap {
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    background: #fbfffd;
    padding: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-toggle {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #d5e3db;
    border-radius: 999px;
    transition: 0.2s ease;
}

.slider-toggle:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    top: 4px;
    background: #fff;
    border-radius: 999px;
    transition: 0.2s ease;
}

.switch input:checked + .slider-toggle {
    background: var(--md-primary);
}

.switch input:checked + .slider-toggle:before {
    transform: translateX(22px);
}

.usage-icons {
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    background: #fbfffd;
    padding: 0.8rem;
    display: grid;
    grid-template-columns: auto 1fr 1fr 1fr;
    gap: 0.55rem;
    align-items: center;
}

.usage-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #20453b;
}

.usage-card {
    border: 1px solid #d5e4dd;
    border-radius: 12px;
    padding: 0.55rem;
    display: grid;
    justify-items: center;
    gap: 0.22rem;
    cursor: pointer;
    background: #fff;
    font-size: 0.88rem;
}

.usage-card input {
    display: none;
}

.usage-card.active {
    border-color: var(--md-primary);
    background: #eefaf4;
}

.usage-icon {
    font-size: 1.1rem;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--md-primary);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: var(--md-primary);
    cursor: pointer;
}

/* The track drops its outline, so the thumb carries keyboard focus: a white
   gap then a brand ring, visible on the pale track and on white. */
input[type="range"]:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent);
}

input[type="range"]:focus-visible::-moz-range-thumb {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent);
}

.usage-label {
    font-weight: 600;
}

.usage-desc {
    font-size: 0.75rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.3;
}

.map-box {
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    background: #fbfffd;
    padding: 0.8rem;
    display: grid;
    gap: 0.7rem;
}

.map-box h3 {
    margin: 0;
}

.map-address-search {
    display: grid;
    gap: 0.35rem;
}

.map-address-search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
}

.map-address-search-row .btn {
    white-space: nowrap;
}

label {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
}

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

input,
select,
textarea {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.62rem 0.72rem;
}

textarea {
    resize: vertical;
    min-height: 64px;
}

.btn {
    display: inline-block;
    padding: 0.65rem 0.95rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-dark);
}

.btn-final-cta {
    width: 100%;
    padding: 0.92rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.final-step-note {
    margin: 0.4rem 0 0;
    text-align: center;
}

.summary-list {
    line-height: 1.7;
    margin: 0;
    padding-left: 1.2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
}

/* File inputs were the last raw browser control on the accreditation form, where
   an applicant uploads three documents. Style the picker to match the outlined
   buttons around it; the filename text stays the browser's. */
input[type="file"] {
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
}

input[type="file"]::file-selector-button {
    margin-right: 0.75rem;
    min-height: 32px;
    padding: 0.3rem 0.85rem;
    border: 1px solid var(--md-outline);
    border-radius: 999px;
    background: transparent;
    color: var(--md-primary);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
    border-color: var(--md-primary);
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
}

/* Policy pages are the only long-form prose here, and at the full container
   width their lines ran past 150 characters. */
.prose-shell p,
.prose-shell li {
    max-width: 34rem;
}

/* Section headings sit closer to the text they introduce than to the one
   before, so each reads as the start of its block. */
.prose-shell h2 {
    margin: 1.75rem 0 0.5rem;
    font-size: 1.125rem;
}

.prose-shell .box > h2:first-child {
    margin-top: 0;
}

/* These shells are grids, so a button placed straight into one stretched the
   full column — a ~950px "Submit accreditation documents" on desktop. */
@media (min-width: 720px) {
    .installer-shell > .btn,
    .dashboard-shell > .btn {
        justify-self: start;
        min-width: 15rem;
    }
}

/* Used on five screens and never actually defined, so the buttons only lined up
   where they happened to be inline anchors — a single-button form next to a link
   broke onto its own line at a different width. */
.compact-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.compact-action-row > form {
    margin: 0;
}

/* A request in the customer's list is a short row, not a stacked card: the
   "Open" action belongs on the right of it rather than dropped underneath. */
@media (min-width: 640px) {
    .request-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 1rem;
    }

    .request-row > .btn {
        grid-column: 2;
        grid-row: 1 / span 3;
        align-self: center;
    }
}

/* Three short peer fields on one row once there is room for them. */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

/* The date picker is a fixed ~22rem control, so on a desktop-width form it sat
   alone against a half-empty card. Put the times already chosen beside it
   rather than stacked above, and let the submit take its natural width. */
@media (min-width: 860px) {
    .booking-form [data-mode-panel="specific_slots"] {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.5rem 1.5rem;
        align-items: start;
    }

    .booking-form #slot-picker {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .booking-form #chosen-slots {
        grid-column: 2;
        grid-row: 1;
        margin-top: 0;
    }

    .booking-form [data-mode-panel="specific_slots"] > p {
        grid-column: 2;
        grid-row: 2;
        margin-top: 0;
    }

    .booking-form .btn-final-cta {
        width: auto;
        min-width: 16rem;
        /* The form is a flex column, where `justify-self` does nothing. */
        align-self: flex-start;
    }
}

.phone-input-row {
    display: grid;
    grid-template-columns: 94px 1fr;
    gap: 0.6rem;
}

.country-code-select {
    min-width: 0;
    width: 100%;
}

.box {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.9rem;
    background: #fbfdfc;
}

.messages {
    margin-bottom: 1rem;
}

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

.error {
    border-color: #e4bbbb;
    background: #fff4f4;
}

.error-block {
    margin-top: 1rem;
    border: 1px solid #e4bbbb;
    background: #fff4f4;
    padding: 0.8rem;
    border-radius: 12px;
}

.auth-shell {
    max-width: 540px;
    margin: 0 auto;
}

.auth-grid {
    margin-top: 0.75rem;
}

.login-method-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.login-method-option {
    position: relative;
    cursor: pointer;
}

.login-method-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.login-method-option span {
    display: block;
    border: 1px solid #c8ddd3;
    border-radius: 12px;
    padding: 0.58rem 0.6rem;
    text-align: center;
    font-weight: 700;
    background: #fff;
    color: #1f3d34;
}

.login-method-option input:checked + span {
    border-color: var(--md-primary);
    background: #eef9f4;
}

.login-method-fields.is-hidden {
    display: none;
}

.login-switch-help {
    margin: 0;
}

.text-link-btn {
    background: transparent;
    border: none;
    color: var(--md-primary);
    padding: 0;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.auth-shell .login-switch-help {
    display: none;
}

.gate-shell {
    max-width: 900px;
    margin: 0 auto;
}

.gate-summary-grid {
    margin-top: 0.75rem;
}

.gate-cta {
    margin-top: 0.75rem;
}

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

.small-text {
    font-size: 0.9rem;
}

.result-shell {
    border-radius: 16px;
    background:
        radial-gradient(circle at 0% 0%, rgba(18, 115, 87, 0.08), transparent 50%),
        #fff;
}

.result-header p {
    margin-top: 0.25rem;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.result-main {
    display: grid;
    gap: 0.9rem;
}

.result-sidebar {
    display: grid;
    gap: 0.9rem;
    align-content: start;
}

.next-step-box {
    border: 1px solid #bcd8cc;
    background:
        radial-gradient(circle at 0% 0%, rgba(18, 115, 87, 0.13), transparent 55%),
        #f6fbf8;
}

.next-step-eyebrow {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #165847;
}

.next-step-box h3 {
    margin: 0.25rem 0 0.25rem;
}

.cta-row {
    margin: 0.35rem 0 0.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.cta-row .btn {
    flex: 1 1 220px;
}

.next-step-cta {
    width: 100%;
    margin: 0;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: var(--md-elevation-1);
}

.next-step-cta:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
}

.adjust-box {
    overflow: hidden;
}

.adjust-grid {
    margin-top: 0.65rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    align-items: end;
}

.adjust-item {
    display: grid;
    gap: 0.32rem;
    border: 1px solid #d9e7e0;
    border-radius: 12px;
    padding: 0.58rem;
    background: #fbfffd;
    font-size: 0.9rem;
}

.adjust-item strong {
    color: #0f5e47;
}

.adjust-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.adjust-item-wide {
    grid-column: span 2;
}

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

.product-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.8rem;
    background: #fcfffd;
}

.product-card img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    border-radius: 12px;
    background: #f1f8f4;
    border: 1px solid #e6efe9;
    margin-bottom: 0.45rem;
}

.product-card h4 {
    margin: 0 0 0.35rem;
}

.product-card p {
    margin: 0.2rem 0;
}

.price-tag {
    color: var(--accent-dark);
    font-weight: 700;
}

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

.metric-label {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.metric-value {
    margin: 0.18rem 0 0;
    font-weight: 700;
}

.line-chart-wrap {
    margin-top: 0.5rem;
    border: 1px solid #d9e8e1;
    border-radius: 12px;
    background: #fbfffd;
    padding: 0.35rem;
}

.line-chart {
    width: 100%;
    height: 300px;
    display: block;
}

.chart-grid {
    stroke: #e7efeb;
    stroke-width: 1;
}

.chart-axis {
    stroke: #bed2c8;
    stroke-width: 1.2;
}

.chart-axis-right {
    stroke: #d7dce9;
    stroke-width: 1.1;
}

.chart-area {
    fill: rgba(32, 159, 110, 0.18);
}

.chart-line-generation {
    fill: none;
    stroke: #139a6d;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-line-savings {
    fill: none;
    stroke: #265fca;
    stroke-width: 2.2;
    stroke-dasharray: 5 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-point-generation {
    fill: #139a6d;
}

.chart-point-savings {
    fill: #265fca;
}

.chart-tick {
    font-size: 10px;
    fill: #5f726c;
    text-anchor: middle;
}

.chart-y-label {
    font-size: 10px;
    fill: #5c6e68;
    font-weight: 700;
}

.line-chart-legend {
    margin-top: 0.52rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.33rem;
    border: 1px solid var(--md-outline-variant);
    border-radius: 999px;
    padding: 0.2rem 0.48rem;
    font-size: 0.8rem;
    color: #32544a;
    background: #fbfffd;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.legend-dot.generation {
    background: #139a6d;
}

.legend-dot.savings {
    background: #265fca;
}

.legend-metric {
    font-size: 0.82rem;
    color: #35574d;
    font-weight: 600;
}

.chat-lead-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 0.95rem;
}

.chat-window {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f9fcfa;
    height: 320px;
    overflow-y: auto;
    padding: 0.75rem;
    display: grid;
    gap: 0.55rem;
}

.chat-msg {
    max-width: 92%;
    border-radius: 12px;
    padding: 0.62rem 0.7rem;
    font-size: 0.95rem;
    line-height: 1.4;
    white-space: pre-wrap;
}

.chat-msg.user {
    margin-left: auto;
    background: var(--md-primary);
    color: #fff;
}

.chat-msg.assistant {
    margin-right: auto;
    background: #edf8f3;
    color: #15312a;
}

.chat-input-row {
    margin-top: 0.7rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.45rem;
}

.chat-suggestions {
    margin-top: 0.6rem;
}

.chat-suggestions ul {
    margin: 0.3rem 0 0;
    padding-left: 1.2rem;
}

.result-chat-window {
    height: 300px;
}

.result-chat-actions {
    margin-top: 0.65rem;
}

.chat-chip-list {
    margin-top: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.chat-chip-btn {
    border: 1px solid #caded4;
    border-radius: 999px;
    background: #fff;
    color: #164339;
    padding: 0.34rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.chat-chip-btn:hover:not(:disabled) {
    background: #eef9f4;
    border-color: #a8cab9;
}

.chat-chip-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dashboard-shell {
    border-radius: 16px;
}

.dashboard-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.dashboard-top h1 {
    margin-bottom: 0.25rem;
}

.dashboard-main {
    margin-top: 0.8rem;
    display: grid;
    gap: 0.8rem;
    align-content: start;
}

.pin-map,
.roof-map {
    width: 100%;
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    overflow: hidden;
}

.pin-map {
    height: 320px;
}

.roof-map {
    height: 360px;
}

.location-readout {
    margin-top: 0.6rem;
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    background: #f7fbf9;
    padding: 0.55rem 0.65rem;
}

.location-readout p {
    margin: 0.2rem 0;
}

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

.dashboard-lead-list,
.installer-request-list {
    display: grid;
    gap: 0.6rem;
}

.dash-lead-card,
.installer-request-card {
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    padding: 0.65rem;
    background: #fff;
}

.inbox-thread-list {
    display: grid;
    gap: 0.7rem;
}

.inbox-thread-card {
    border: 1px solid #d7e5de;
    border-radius: 12px;
    padding: 0.65rem;
    background: #fff;
}

.thread-messages {
    margin-top: 0.55rem;
    border: 1px solid #dbe8e2;
    border-radius: 12px;
    background: #f8fcfa;
    padding: 0.55rem;
    max-height: 210px;
    overflow-y: auto;
    display: grid;
    gap: 0.45rem;
}

.thread-msg {
    border-radius: 8px;
    padding: 0.46rem 0.52rem;
    max-width: 92%;
}

.thread-msg p {
    margin: 0.2rem 0;
}

.thread-msg-user {
    background: #eaf4ff;
    color: #12324e;
    margin-right: auto;
}

.thread-msg-installer {
    background: #ecf8f2;
    color: #14392e;
    margin-left: auto;
}

.thread-meta {
    font-size: 0.76rem;
    color: #4d6760;
    font-weight: 700;
}

.inbox-compose {
    margin-top: 0.55rem;
    gap: 0.45rem;
}

.dash-lead-card p,
.installer-request-card p {
    margin: 0.3rem 0;
}

.dash-lead-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.status-badge {
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.76rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.status-new {
    background: #ecf5ff;
    color: #1f4d9a;
    border-color: #c8dcff;
}

.status-accepted {
    background: #fff7e6;
    color: #976800;
    border-color: #f5dea5;
}

.status-completed {
    background: #e9f8ee;
    color: #14663e;
    border-color: #c8e7d4;
}

.status-cancelled {
    background: #f2f4f6;
    color: #5b6975;
    border-color: #dde3e9;
}

.installer-shell {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    gap: 0.8rem;
}

.installer-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.6rem;
    align-items: end;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.catalog-shell {
    display: grid;
    gap: 0.95rem;
}

.catalog-hero {
    border: 1px solid #cfe4d9;
    border-radius: 28px;
    padding: 1.1rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0.85rem;
    background:
        radial-gradient(circle at 85% 15%, rgba(14, 127, 96, 0.2), transparent 43%),
        radial-gradient(circle at 0% 100%, rgba(43, 149, 113, 0.12), transparent 46%),
        linear-gradient(145deg, #f7fffb 0%, #fbfffd 58%, #f2f8ff 100%);
}

.catalog-kicker {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.76rem;
    color: #0f6149;
    font-weight: 800;
}

.catalog-hero h1 {
    margin: 0;
    font-size: clamp(1.75rem, 3.5vw, 2.6rem);
    line-height: 1.06;
    /* "Space Grotesk" and "Manrope" are never loaded — only Roboto is — so this
       silently fell back and disagreed with every other heading. */
    font-family: "Roboto", system-ui, sans-serif;
    /* 13ch broke "Compare products" onto two lines inside a panel with room to
       spare. */
    max-width: none;
}

.catalog-sub {
    margin: 0.68rem 0 0;
    color: #2e4c43;
    max-width: 64ch;
}

.catalog-stat-grid {
    display: grid;
    gap: 0.55rem;
    align-content: start;
}

.catalog-stat {
    border: 1px solid #d0e3da;
    border-radius: 12px;
    padding: 0.66rem;
    background: rgba(255, 255, 255, 0.82);
}

.catalog-stat-label {
    margin: 0;
    color: #44635b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
    font-weight: 700;
}

.catalog-stat-value {
    margin: 0.18rem 0 0;
    font-size: 1.1rem;
    font-family: "Roboto", system-ui, sans-serif;
    color: #0f5a44;
    font-weight: 700;
}

.catalog-controls {
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    background: #fbfffd;
    padding: 0.72rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr auto;
    gap: 0.55rem;
    align-items: end;
}

.catalog-controls label {
    font-weight: 700;
    color: #22453b;
    font-size: 0.88rem;
}

.catalog-controls .btn {
    white-space: nowrap;
}

.catalog-chip-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.catalog-chip {
    border: 1px solid #cbdfd5;
    border-radius: 999px;
    background: #fff;
    text-decoration: none;
    color: #21463b;
    padding: 0.3rem 0.58rem;
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 700;
}

.catalog-chip strong {
    border-radius: 999px;
    background: #edf8f3;
    padding: 0.12rem 0.38rem;
    color: #185841;
    font-size: 0.76rem;
}

.catalog-chip.is-active {
    border-color: var(--md-primary);
    background: #ecf9f3;
    color: #0f5c45;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.catalog-card {
    border: 1px solid var(--md-outline-variant);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.catalog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--md-elevation-2);
    border-color: #b9d7cb;
}

.catalog-card-media {
    position: relative;
    border-bottom: 1px solid #dfece5;
    padding: 0.8rem;
    min-height: 124px;
    display: grid;
    place-items: center;
}

.catalog-card-media img {
    width: min(80%, 170px);
    height: 84px;
    object-fit: contain;
}

.catalog-card-media img.catalog-photo {
    width: min(88%, 208px);
    height: 110px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--md-outline-variant);
    background: #fff;
}

/* One neutral thumbnail surface for every product type. The per-type gradient
   washes tinted each tile a different colour without encoding anything the
   type pill in the corner does not already say. */
.catalog-card-media.type-panel,
.catalog-card-media.type-battery,
.catalog-card-media.type-inverter {
    background: var(--md-surface-container-low);
}

.catalog-type-pill {
    position: absolute;
    top: 0.56rem;
    right: 0.56rem;
    border: 1px solid var(--md-outline-variant);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #1f4a3d;
    padding: 0.2rem 0.52rem;
    font-size: 0.74rem;
    font-weight: 700;
}

.catalog-card-body {
    padding: 0.72rem;
    display: grid;
    gap: 0.32rem;
}

.catalog-brand {
    margin: 0;
    font-size: 0.77rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4d7064;
    font-weight: 700;
}

.catalog-card h3 {
    margin: 0;
    font-size: 1.03rem;
    line-height: 1.3;
}

.catalog-spec {
    margin: 0;
    color: #3e6255;
    font-size: 0.88rem;
}

.catalog-card-footer {
    margin-top: 0.34rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
}

.catalog-price {
    margin: 0;
    color: #0f5f47;
    font-size: 1.04rem;
    font-weight: 800;
    font-family: "Roboto", system-ui, sans-serif;
}

.catalog-empty {
    border-radius: 12px;
    text-align: center;
    padding: 1.1rem;
}

@media (max-width: 720px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .landing-pro {
        grid-template-columns: 1fr;
        padding: 0.95rem;
    }

    .fact-band,
    .flow-grid {
        grid-template-columns: 1fr;
    }

    .result-grid,
    .chat-lead-grid {
        grid-template-columns: 1fr;
    }

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

    .calc-field-wide {
        grid-column: span 1;
    }

    .usage-icons {
        grid-template-columns: 1fr;
    }

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

    .adjust-item-wide {
        grid-column: span 1;
    }

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

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

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

    .catalog-hero {
        grid-template-columns: 1fr;
    }

    .catalog-controls {
        grid-template-columns: 1fr;
    }

    .catalog-controls .btn {
        width: 100%;
    }

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

    .line-chart {
        height: 250px;
    }

    .location-readout-grid {
        grid-template-columns: 1fr;
    }

    .map-address-search-row {
        grid-template-columns: 1fr;
    }

    .map-address-search-row .btn {
        width: 100%;
    }

    .home-request-grid {
        grid-template-columns: 1fr;
    }
}

/* Autosol blue and orange system — blue owns navigation and actions; orange
   is used sparingly for positive emphasis such as price and featured states. */
.site-header {
    background: rgba(255, 255, 255, 0.9);
}

.brand,
.eyebrow,
.landing-kicker,
.catalog-kicker,
.flow-step span,
.next-step-eyebrow,
.m-value,
.catalog-stat-value {
    color: var(--accent-dark);
}

nav a:hover,
.link-btn:hover,
.text-link-btn,
.price-tag,
.catalog-price {
    color: var(--accent-warm-dark);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: var(--md-focus-ring);
    outline: none;
}

.landing-pro,
.catalog-hero {
    border-color: #bdd5e8;
    background:
        radial-gradient(circle at 84% 15%, rgba(35, 106, 158, 0.22), transparent 43%),
        radial-gradient(circle at 12% 100%, rgba(243, 151, 18, 0.16), transparent 42%),
        linear-gradient(145deg, #f6fbff 0%, #ffffff 56%, #fff8ed 100%);
}

.landing-sub,
.catalog-sub,
.home-request-page,
.usage-title,
.catalog-controls label,
.catalog-type-pill {
    color: #29475e;
}

.landing-chip,
.usage-card.active,
.catalog-chip.is-active,
.login-method-option input:checked + span {
    border-color: #9cc4e2;
    background: var(--accent-container);
    color: var(--accent-dark);
}

.home-requests,
.request-success-shell,
.result-shell,
.next-step-box {
    border-color: #bdd5e8;
    background:
        radial-gradient(circle at 0% 0%, rgba(35, 106, 158, 0.12), transparent 54%),
        radial-gradient(circle at 100% 100%, rgba(243, 151, 18, 0.09), transparent 44%),
        #fbfdff;
}

.impact-card,
.fact-tile,
.flow-strip,
.toggle-wrap,
.usage-icons,
.map-box,
.line-chart-wrap,
.chat-window,
.thread-messages,
.location-readout,
.catalog-controls {
    border-color: var(--border);
    background-color: #f7faff;
}

.switch input:checked + .slider-toggle,
input[type="range"]::-webkit-slider-thumb,
input[type="range"]::-moz-range-thumb,
.chat-msg.user {
    background: var(--accent);
}

.btn-primary {
    border-color: var(--accent);
    background: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-dark);
}

.catalog-price,
.price-tag {
    color: var(--accent-warm-dark);
}

.chart-grid { stroke: #dbe6ef; }
.chart-axis { stroke: #b7c8d6; }
.chart-area { fill: rgba(35, 106, 158, 0.18); }
.chart-line-generation { stroke: #236a9e; }
.chart-line-savings { stroke: var(--warm); }
.chart-point-generation,
.legend-dot.generation { fill: #236a9e; }
.chart-point-savings,
.legend-dot.savings { fill: var(--warm); }

/* Operations user directory */
.directory-shell {
    display: grid;
    gap: 0.85rem;
}

.directory-search {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.6rem;
    align-items: end;
}

.directory-search label {
    font-weight: 700;
    color: #29475e;
    font-size: 0.88rem;
}

.directory-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.directory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.directory-table th,
.directory-table td {
    padding: 0.6rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.directory-table th {
    background: #f7faff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #29475e;
}

.directory-table tbody tr:last-child td {
    border-bottom: 0;
}

.directory-table p {
    margin: 0.15rem 0;
}

.directory-actions {
    white-space: nowrap;
}

.role-staff {
    background: #ecf5ff;
    color: #1f4d9a;
    border-color: #c8dcff;
}

.role-installer {
    background: #fff7e6;
    color: #976800;
    border-color: #f5dea5;
}

.role-customer {
    background: #e9f8ee;
    color: #14663e;
    border-color: #c8e7d4;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 720px) {
    .directory-search {
        grid-template-columns: 1fr;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   Operations sidebar

   Two modes off one preference. At >=1080px the sidebar docks: it is fixed to
   the left edge and the body is padded so the header and page shift with it,
   and the choice is remembered in the `autosol_admin_nav` cookie so it survives
   navigation. Below that width there is no room to dock, so the same control
   slides the sidebar over the page with a scrim instead.
   ───────────────────────────────────────────────────────────────────────── */
:root {
    --admin-nav-w: 260px;
}

.skip-link {
    position: absolute;
    top: -3rem;
    left: 0.75rem;
    z-index: 80;
    padding: 0.5rem 0.9rem;
    border-radius: 0 0 12px 12px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0;
}

.admin-launch {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    margin-left: 1rem;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: var(--accent-container);
    color: var(--accent-dark);
    padding: 0.32rem 0.85rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.admin-launch:hover {
    background: var(--accent);
    color: #fff;
}

.admin-launch-ico {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.admin-launch-badge {
    min-width: 1.25rem;
    padding: 0 0.34rem;
    border-radius: 999px;
    background: var(--accent-warm);
    color: #3a2400;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.25rem;
    text-align: center;
}

.admin-nav-scrim {
    position: fixed;
    inset: 0;
    background: rgba(21, 35, 47, 0.42);
    z-index: 40;
}

.admin-nav-scrim[hidden] {
    display: none;
}

.admin-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    width: var(--admin-nav-w);
    max-width: 86vw;
    display: flex;
    flex-direction: column;
    padding: 1rem 0.85rem 0.85rem;
    background: var(--card);
    border-right: 1px solid var(--border);
    box-shadow: var(--md-elevation-3);
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 0.2s ease, visibility 0.2s ease;
}

.admin-nav.is-open {
    visibility: visible;
    transform: translateX(0);
}

.admin-nav-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 0.35rem 0.85rem;
    border-bottom: 1px solid var(--border);
}

.admin-nav-eyebrow {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.admin-nav-title {
    margin: 0.1rem 0 0;
    font-family: "Roboto", system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-dark);
}

.admin-nav-dismiss {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.admin-nav-dismiss:hover {
    background: #f0f5fa;
    color: var(--text);
}

.admin-nav-dismiss svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.admin-nav-list {
    display: grid;
    align-content: start;
    gap: 0.1rem;
    padding: 0.35rem 0;
    flex: 1;
}

.admin-nav-section {
    margin-top: 0.45rem;
}

.admin-nav-section > summary {
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    list-style: none;
    text-transform: uppercase;
}

.admin-nav-section > summary::-webkit-details-marker {
    display: none;
}

.admin-nav-section > summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: 0;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.15s ease;
}

.admin-nav-section[open] > summary::after {
    transform: rotate(225deg) translate(-1px, -1px);
}

.admin-nav-section > summary:hover,
.admin-nav-section > summary:focus-visible {
    background: var(--md-surface-container);
    color: var(--md-on-surface);
    outline: none;
}

/* Hover's pale tint is too faint to find by keyboard; focus adds a ring. */
.admin-nav-section > summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.admin-nav-section > summary > span:first-child {
    flex: 1;
}

.admin-nav-section > summary > .admin-nav-badge {
    margin-left: 0;
}

.admin-nav-section-links {
    display: grid;
    gap: 0.1rem;
    padding-top: 0.1rem;
}

.admin-nav-group {
    margin: 0.85rem 0 0.2rem;
    padding: 0 0.6rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
}

.admin-nav-group:first-child {
    margin-top: 0.15rem;
}

.admin-nav-list a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: 0;
    padding: 0.52rem 0.6rem;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.93rem;
    font-weight: 500;
    text-decoration: none;
}

.admin-nav-list a:hover {
    background: #f0f5fa;
    color: var(--accent-dark);
}

.admin-nav-list a.is-active {
    background: var(--accent-container);
    color: var(--accent-dark);
    font-weight: 700;
}

.admin-nav-list a.is-nested {
    padding-left: 0.6rem;
    font-size: 0.87rem;
    color: var(--muted);
}

.admin-nav-list a span:nth-child(2) {
    flex: 1;
}

.admin-nav-ico {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-nav-badge {
    min-width: 1.3rem;
    padding: 0 0.36rem;
    border-radius: 999px;
    background: var(--accent-warm);
    color: #3a2400;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.3rem;
    text-align: center;
}

.admin-nav-foot {
    padding: 0.7rem 0.6rem 0;
    border-top: 1px solid var(--border);
}

.admin-nav-account {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-nav-role {
    margin: 0.1rem 0 0;
    font-size: 0.75rem;
    color: var(--muted);
}

body.has-sidebar-open {
    overflow: hidden;
}

.operations-header-inner {
    justify-content: flex-start;
    gap: 0.65rem;
}

.operations-header-inner #site-nav {
    margin-left: auto;
}

.operations-menu-toggle {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--md-outline-variant);
    border-radius: 999px;
    background: var(--card);
    color: var(--md-primary);
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 600;
}

.operations-menu-toggle:hover,
.operations-menu-toggle:focus-visible {
    border-color: var(--md-primary);
    background: var(--md-primary-container);
    outline: none;
}

/* Hover's pale tint is too faint to find by keyboard; focus adds a ring. */
.operations-menu-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.operations-menu-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

@media (min-width: 1080px) {
    body.admin-docked {
        padding-left: var(--admin-nav-w);
    }

    body.admin-docked .admin-nav {
        visibility: visible;
        transform: translateX(0);
        box-shadow: none;
    }

    body.admin-docked .admin-nav-scrim {
        display: none;
    }
}
/* Platform settings */
.settings-shell,
.growth-shell {
    display: grid;
    gap: 0.85rem;
}

.setting-row {
    display: grid;
    gap: 0.55rem;
}

.setting-toggle {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
    align-items: start;
}

.setting-toggle input {
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.2rem;
}

.setting-toggle span {
    display: grid;
    gap: 0.25rem;
}

.setting-state {
    margin: 0;
}

/* Member growth */
.growth-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
}

.growth-stat {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfdff;
    padding: 0.75rem;
}

.growth-stat-value {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--accent-dark);
}

.growth-stat-label {
    margin: 0.1rem 0 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.growth-up {
    color: #14663e;
    font-weight: 700;
}

.growth-down {
    color: #9a2f2f;
    font-weight: 700;
}

.growth-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    height: 220px;
    padding: 0.7rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfdff;
    overflow-x: auto;
}

.growth-bar-col {
    display: flex;
    flex: 1 0 34px;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 0.3rem;
    height: 100%;
}

.growth-bar {
    width: 100%;
    max-width: 34px;
    min-height: 3px;
    border-radius: 8px 8px 0 0;
    background: var(--accent);
}

.growth-bar-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-dark);
}

.growth-bar-label {
    font-size: 0.68rem;
    color: var(--muted);
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .growth-stat-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   Operations chrome

   Shared page furniture for every staff page: header, tabs, search, tables,
   dialogs. Ops pages carry more data than the marketing pages, so they opt
   into `container-wide` via base.html's `main_class` block.
   ───────────────────────────────────────────────────────────────────────── */
.container-wide {
    width: min(1440px, 94%);
}

.ops-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding: 1.75rem 0 1.15rem;
}

.ops-eyebrow {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.ops-title {
    margin: 0.25rem 0 0;
    font-family: "Roboto", system-ui, sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
}

.ops-sub {
    max-width: 68ch;
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.ops-header-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.ops-metric {
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    font-size: 0.85rem;
    color: var(--muted);
}

.ops-metric strong {
    color: var(--accent-dark);
    font-size: 1rem;
}

/* ── tabs + search ── */
.ops-tabs {
    display: flex;
    gap: 0.15rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
}

.ops-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.6rem 0.85rem;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.ops-tab:hover {
    color: var(--accent-dark);
}

.ops-tab.is-active {
    border-bottom-color: var(--accent);
    color: var(--accent-dark);
    font-weight: 700;
}

.ops-tab-count {
    padding: 0.05rem 0.42rem;
    border-radius: 999px;
    background: #eef3f8;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.ops-tab.is-active .ops-tab-count {
    background: var(--accent-container);
    color: var(--accent-dark);
}

.ops-search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: min(340px, 100%);
}

.ops-search-ico {
    position: absolute;
    left: 0.7rem;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.9;
    stroke-linecap: round;
    pointer-events: none;
}

.ops-search input[type="search"] {
    width: 100%;
    padding: 0.55rem 2rem 0.55rem 2.25rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    font: inherit;
    font-size: 0.9rem;
}

.ops-search-clear {
    position: absolute;
    right: 0.7rem;
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1;
    text-decoration: none;
}

.ops-field {
    display: grid;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.ops-field textarea,
.ops-field input {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    font-weight: 400;
    resize: vertical;
}

.ops-empty-title {
    margin: 0 0 0.2rem;
    font-weight: 700;
}

.btn-danger {
    border-color: #b3261e;
    background: #b3261e;
    color: #fff;
}

.btn-danger:hover {
    background: #8c1d17;
}

/* ── status pills ── */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.16rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.status-pill.status-pending {
    background: var(--warm-container);
    border-color: #f4d7a6;
    color: var(--accent-warm-dark);
}

.status-pill.status-approved {
    background: #d9f2e2;
    border-color: #a9dcc0;
    color: #17603a;
}

.status-pill.status-rejected {
    background: #fbdedc;
    border-color: #f3bab5;
    color: #8c1d17;
}

/* ── modal dialogs ── */
.ops-dialog {
    width: min(520px, 92vw);
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
    color: var(--text);
    box-shadow: var(--md-elevation-4);
}

.ops-dialog::backdrop {
    background: rgba(21, 35, 47, 0.45);
}

.ops-dialog h3 {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
}

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

.ops-dialog p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ops-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

.material-dialog-heading {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.8rem;
}

.material-dialog-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: var(--md-error-container);
    color: var(--md-error);
    font-size: 1.1rem;
    font-weight: 800;
}

/* ─────────────────────────────────────────────────────────────────────────
   Review workspace — list on the left, one application open on the right.
   Selection is a URL parameter so a review is linkable and the back button
   works, rather than client-side state that dies on reload.
   ───────────────────────────────────────────────────────────────────────── */
.review-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
}

.review-workspace {
    display: grid;
    grid-template-columns: minmax(300px, 380px) 1fr;
    gap: 1rem;
    align-items: start;
    margin-bottom: 2.5rem;
}

.review-list {
    display: grid;
    gap: 0.35rem;
    align-content: start;
    max-height: calc(100vh - 15rem);
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    overflow-y: auto;
}

.review-row {
    display: flex;
    gap: 0.7rem;
    padding: 0.7rem;
    margin-left: 0;
    border-radius: 12px;
    border-left: 3px solid transparent;
    color: var(--text);
    text-decoration: none;
}

.review-row:hover {
    background: #f4f8fc;
}

.review-row.is-selected {
    background: var(--accent-container);
    border-left-color: var(--accent);
}

.review-avatar {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.review-avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

.review-row-body {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
    flex: 1;
}

.review-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.review-row-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.94rem;
}

.review-row-meta {
    font-size: 0.8rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-row-services {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    white-space: normal;
}

.review-tag {
    padding: 0.1rem 0.48rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f4f8fc;
    color: #29475e;
    font-size: 0.74rem;
    font-weight: 600;
}

.review-tag-warn {
    border-color: #f3bab5;
    background: #fbdedc;
    color: #8c1d17;
}

.review-age {
    padding: 0.1rem 0.42rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
}

.review-age.is-stale {
    background: var(--warm-container);
    color: var(--accent-warm-dark);
}

.review-empty {
    padding: 2rem 1rem;
    text-align: center;
}

.review-empty-detail {
    padding: 4rem 1rem;
}

.review-detail {
    min-height: 22rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}

.review-detail-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--border);
}

.review-detail-ident {
    flex: 1;
    min-width: 0;
}

.review-detail-ident h2 {
    margin: 0;
    font-size: 1.25rem;
}

.review-detail-ident p {
    margin: 0.15rem 0 0;
    font-size: 0.88rem;
}

.review-callout {
    margin-top: 1.1rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.88rem;
}

.review-callout p {
    margin: 0.25rem 0 0;
}

.review-callout-reject {
    background: #fbdedc;
    border: 1px solid #f3bab5;
    color: #6b1611;
}

.review-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem 2rem;
    padding: 1.35rem 0;
}

.review-fact-wide {
    grid-column: 1 / -1;
}

.review-fact-group h3 {
    margin: 0 0 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.review-fact-group dl {
    display: grid;
    gap: 0.5rem;
    margin: 0;
}

.review-fact-group dl div {
    display: grid;
    grid-template-columns: 8.5rem 1fr;
    gap: 0.5rem;
    font-size: 0.89rem;
}

.review-fact-group dt {
    color: var(--muted);
}

.review-fact-group dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.review-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.review-document-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 0.85rem;
}

.review-document-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    background: var(--md-surface-container-lowest);
}

.review-document-card.is-missing {
    border-style: dashed;
    background: var(--md-surface-container-low);
}

.review-document-head,
.review-document-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.7rem 0.8rem;
}

.review-document-head > div {
    display: grid;
    min-width: 0;
}

.review-document-head strong {
    font-size: 0.86rem;
}

.review-document-head div span,
.review-document-meta {
    color: var(--muted);
    font-size: 0.72rem;
}

.review-document-status {
    flex: none;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: var(--warm-container);
    color: var(--accent-warm-dark);
    font-size: 0.7rem;
    font-weight: 700;
}

.review-document-status.is-ready {
    background: var(--md-success-container);
    color: var(--md-on-success-container);
}

.review-document-preview {
    display: block;
    width: 100%;
    height: 250px;
    border: 0;
    border-block: 1px solid var(--md-outline-variant);
    background: #eef2f5;
}

.review-document-meta {
    display: grid;
    gap: 0.15rem;
    padding: 0.65rem 0.8rem 0;
}

.review-document-meta span:first-child {
    overflow: hidden;
    color: var(--md-on-surface);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-document-actions {
    justify-content: flex-start;
    padding-top: 0.55rem;
}

.review-document-empty {
    display: grid;
    min-height: 110px;
    place-items: center;
    padding: 1rem;
    color: var(--muted);
    font-size: 0.8rem;
    text-align: center;
}

.review-flag {
    margin: 0;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    background: var(--warm-container);
    color: var(--accent-warm-dark);
    font-size: 0.85rem;
    font-weight: 600;
}

.review-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1.15rem;
    border-top: 1px solid var(--border);
}

.review-actions p {
    max-width: 46ch;
    margin: 0;
}

.review-readiness {
    flex-basis: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid #efc27c;
    border-radius: 10px;
    background: var(--warm-container);
    color: #744400;
    font-size: 0.84rem;
}

.review-readiness ul {
    margin: 0.35rem 0 0;
    padding-left: 1.15rem;
}

.review-action-buttons {
    display: flex;
    gap: 0.6rem;
}

.review-preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.review-preset {
    padding: 0.32rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f4f8fc;
    color: #29475e;
    font: inherit;
    font-size: 0.78rem;
    text-align: left;
    cursor: pointer;
}

.review-preset:hover {
    border-color: var(--accent);
    background: var(--accent-container);
    color: var(--accent-dark);
}

@media (max-width: 1000px) {
    .review-workspace {
        grid-template-columns: 1fr;
    }

    .review-list {
        max-height: 22rem;
    }

    .review-facts {
        grid-template-columns: 1fr;
    }

    .review-document-grid {
        grid-template-columns: 1fr;
    }

    .review-fact-group dl div {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }
}

/* ── shared ops tables, stats, forms ── */
/* ─────────────────────────────────────────────────────────────────────────
   Installer account management

   Cards for editing one installer: approval decision, details, and the
   four-mode service area picker. Chips are the removable places a reviewer
   has added; each carries the hidden input that actually gets submitted.
   ───────────────────────────────────────────────────────────────────────── */
.ops-backlink {
    color: var(--muted);
    text-decoration: none;
    letter-spacing: normal;
    text-transform: none;
    font-weight: 600;
}

.ops-backlink:hover {
    color: var(--accent-dark);
}

.manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.1rem;
    align-items: start;
    margin-bottom: 2.5rem;
}

.manage-grid > .ops-table-card {
    margin-bottom: 0;
}

.manage-wide {
    grid-column: 1 / -1;
}

.request-detail-facts {
    grid-template-columns: 1fr;
    padding-bottom: 0;
}

.request-notes {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
}

.request-notes p:last-child {
    margin-bottom: 0;
}

.request-schedule-options {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
}

.request-message-history {
    max-height: 520px;
}

.manage-form {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.9rem;
}

.manage-form select,
.manage-form input[type="text"] {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    font: inherit;
    font-weight: 400;
}

.manage-fieldset {
    display: grid;
    gap: 0.4rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.manage-fieldset legend {
    padding: 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.manage-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
}

.manage-check input {
    width: 16px;
    height: 16px;
}

.manage-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ── service area coverage picker ── */
.cov {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.9rem;
}

.cov-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: var(--accent-container);
}

.cov-count-lead {
    margin: 0 0 0.45rem;
    color: var(--accent-dark);
    font-size: 0.88rem;
}

.cov-count-lead strong {
    font-size: 1.15rem;
}

.cov-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cov-chip {
    padding: 0.16rem 0.6rem;
    border: 1px solid rgba(19, 74, 122, 0.22);
    border-radius: 8px;
    background: var(--card);
    color: #1c4b6e;
    font-size: 0.76rem;
    font-weight: 600;
}

.cov-chip-empty,
.cov-chip-more {
    border-style: dashed;
    color: var(--muted);
}

.cov-summary-actions {
    display: flex;
    gap: 0.25rem;
}

.btn-text {
    padding: 0.45rem 0.75rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--accent-dark);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-text:hover {
    background: rgba(19, 74, 122, 0.09);
}

.cov-search {
    position: relative;
    display: flex;
    align-items: center;
}

.cov-search-ico {
    position: absolute;
    left: 0.85rem;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.9;
    stroke-linecap: round;
    pointer-events: none;
}

.cov-search input {
    width: 100%;
    padding: 0.7rem 0.9rem 0.7rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    font: inherit;
    font-size: 0.9rem;
}

.cov-search input:focus {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.cov-tree {
    max-height: 460px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}

.cov-group + .cov-group {
    border-top: 1px solid var(--border);
}

.cov-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 48px;
    padding: 0 0.9rem;
}

.cov-row:hover {
    background: rgba(19, 74, 122, 0.05);
}

.cov-row-island .cov-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.cov-row-province {
    padding-left: 2rem;
}

.cov-row-province .cov-name {
    font-size: 0.88rem;
    font-weight: 600;
}

.cov-box {
    flex: none;
    width: 18px;
    min-height: 18px;
    height: 18px;
    padding: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.cov-toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 1;
    min-height: 48px;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.cov-chevron {
    flex: none;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--muted);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.15s ease;
}

.is-open > .cov-row .cov-chevron {
    transform: rotate(90deg);
}

.cov-count {
    flex: none;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.cov-cities {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.1rem 0.5rem;
    padding: 0.4rem 0.9rem 0.8rem 3.1rem;
}

.cov-city {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 34px;
    padding: 0 0.35rem;
    border-radius: 8px;
    font-size: 0.84rem;
    cursor: pointer;
}

.cov-city:hover {
    background: rgba(19, 74, 122, 0.05);
}

.cov-empty {
    margin: 0;
    padding: 1.2rem;
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
}

/* ── catalogue maintenance ── */
.catalog-thumb {
    display: block;
    width: 52px;
    height: 52px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
}

.catalog-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f8fc;
    color: var(--muted);
    font-weight: 700;
}

.photo-editor {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
    align-items: start;
    margin-top: 0.9rem;
}

.photo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.photo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.photo-empty {
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}

.photo-controls {
    display: grid;
    gap: 0.6rem;
    align-content: start;
}

.photo-controls input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: var(--card);
    font: inherit;
    font-size: 0.84rem;
}

.manage-form textarea {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.55;
    resize: vertical;
}

.manage-form input[type="number"] {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    font: inherit;
}

.review-inline-form {
    display: inline;
}

.ops-table-card {
    padding: 1.35rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}

.ops-panel-title {
    margin: 0 0 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
}

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

.ops-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.ops-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.6rem 0.75rem;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.ops-table td {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid #eef3f8;
    vertical-align: top;
}

.ops-table tbody tr:hover {
    background: #f7fafd;
}

.ops-table-link {
    color: var(--accent-dark);
    text-decoration: none;
}

.ops-table-link:hover,
.ops-table-link:focus-visible {
    text-decoration: underline;
}

.ops-table tr:last-child td {
    border-bottom: none;
}

.ops-table-right {
    text-align: right;
    white-space: nowrap;
}

.ops-table p {
    margin: 0;
}

.ops-identity {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.ops-identity-lead {
    padding-bottom: 1.1rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid var(--border);
}

.ops-identity strong {
    display: block;
}

.btn-small {
    padding: 0.4rem 0.7rem;
    font-size: 0.84rem;
}

.btn.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.ops-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.9rem;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.ops-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.ops-stat {
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}

.ops-stat-label {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.ops-stat-value {
    margin: 0.35rem 0 0;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.05;
}

.ops-stat-delta {
    margin: 0.3rem 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
}

.ops-stat-delta.is-up {
    color: #17603a;
}

.ops-stat-delta.is-down {
    color: #b3261e;
}

.ops-home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.ops-home-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.9rem;
    min-height: 112px;
    padding: 1.15rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ops-home-card:hover {
    border-color: var(--accent);
    box-shadow: var(--md-elevation-2);
    transform: translateY(-1px);
}

.ops-home-card strong,
.ops-home-card small {
    display: block;
}

.ops-home-card small {
    margin-top: 0.3rem;
    color: var(--muted);
    line-height: 1.45;
}

.ops-home-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--accent-container);
    color: var(--accent-dark);
    font-size: 1.15rem;
    font-weight: 800;
}

.ops-home-action {
    color: var(--accent-dark);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.ops-system-admin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f7fafd;
}

.ops-system-admin p {
    margin: 0;
}

.review-callout-warn {
    background: var(--warm-container);
    border: 1px solid #f4d7a6;
    color: #6b3d00;
}

/* ── settings ── */
.ops-settings-form {
    display: grid;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.ops-setting {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.35rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}

.ops-setting-copy {
    max-width: 68ch;
}

.ops-setting-copy h2 {
    margin: 0 0 0.4rem;
    font-size: 1.02rem;
}

.ops-setting-copy p {
    margin: 0;
    font-size: 0.89rem;
    line-height: 1.6;
}

.ops-setting-state {
    margin-top: 0.7rem !important;
}

.ops-model-control {
    flex: 1 1 360px;
    max-width: 520px;
    display: grid;
    gap: 0.45rem;
}

.ops-model-control select,
.ops-model-control textarea {
    width: 100%;
    min-width: 0;
    background: #fff;
}

.ops-model-control textarea {
    font: inherit;
    line-height: 1.5;
    resize: vertical;
}

.ops-model-warning {
    margin-top: 0.7rem !important;
    color: var(--error, var(--md-error));
}

.ops-switch {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.ops-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ops-switch-track {
    display: block;
    width: 52px;
    height: 30px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #e3eaf1;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.ops-switch-thumb {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--md-elevation-1);
    transition: transform 0.16s ease;
}

.ops-switch input:checked + .ops-switch-track {
    border-color: var(--accent);
    background: var(--accent);
}

.ops-switch input:checked + .ops-switch-track .ops-switch-thumb {
    transform: translateX(22px);
}

.ops-switch input:focus-visible + .ops-switch-track {
    box-shadow: var(--md-focus-ring);
}

.ops-settings-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ── standalone ops form ── */
.ops-form-card {
    max-width: 620px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}

.ops-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

@media (max-width: 760px) {
    .ops-home-grid {
        grid-template-columns: 1fr;
    }

    .ops-home-card {
        grid-template-columns: auto 1fr;
    }

    .ops-home-action {
        grid-column: 2;
    }

    .ops-system-admin {
        align-items: flex-start;
        flex-direction: column;
    }

    .ops-setting {
        flex-direction: column;
        gap: 1rem;
    }

    .ops-header {
        padding-top: 1.25rem;
    }
}

/* The docked sidebar eats 260px, so the workspace has to fold one breakpoint
   earlier than it would on a page without it. */
@media (max-width: 1280px) {
    body.admin-docked .review-workspace {
        grid-template-columns: 1fr;
    }

    body.admin-docked .review-list {
        max-height: 22rem;
    }

    body.admin-docked .review-facts {
        grid-template-columns: 1fr;
    }
}

/* ── console header ── */
.brand-scope {
    display: inline-block;
    margin-left: 0.15rem;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    background: var(--accent-container);
    color: var(--accent-dark);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    vertical-align: middle;
}

.scope-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 1rem;
    padding: 0.32rem 0.75rem 0.32rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.scope-switch:hover {
    border-color: var(--accent);
    background: var(--card);
    color: var(--accent-dark);
}

/* ─────────────────────────────────────────────────────────────────────────
   Material 3 compact refresh

   These shared rules intentionally come last. They normalize the older page-
   specific styles around one type scale, one spacing rhythm, and Material
   surface roles without changing any Django forms or workflows.
   ───────────────────────────────────────────────────────────────────────── */
:root {
    --md-primary: #1d4a71;
    --md-on-primary: #ffffff;
    --md-primary-container: #d5e9fa;
    --md-on-primary-container: #003352;
    --md-secondary-container: #ffe0b2;
    --md-on-secondary-container: #2c1600;
    /* White and neutral greys, matching the apps: colour is kept for the one
       primary action on a page and for status, so it stands out. */
    --md-surface: #ffffff;
    --md-surface-container-low: #f4f5f7;
    --md-surface-container: #eef0f3;
    --md-surface-container-high: #e7eaee;
    --md-surface-container-highest: #e0e4e9;
    --md-on-surface: #15232f;
    --md-on-surface-variant: #5b6670;
    --md-outline: #8a949d;
    --md-outline-variant: #e3e6ea;
    --md-error: #ba1a1a;
    --md-error-container: #ffdad6;
    /* A success role, so confirmations stop borrowing the neutral surface. The
       greens scattered through the older rules resolve here too. */
    --md-success: #146c43;
    --md-success-container: #d9f2e4;
    --md-on-success-container: #04361f;
    --bg: var(--md-surface);
    --card: #ffffff;
    --text: var(--md-on-surface);
    --muted: var(--md-on-surface-variant);
    --border: var(--md-outline-variant);
    --accent: var(--md-primary);
    --accent-dark: #143b5b;
    --accent-container: var(--md-primary-container);
    --warm-container: var(--md-secondary-container);

    /* Material's five elevation levels, tinted towards the brand navy. The page
       had twenty hand-rolled shadows, several of them 40-60px blurs that read as
       drop-shadow decoration rather than height. Levels 1-2 cover everything
       that sits on the page; 3+ is for things that float over it. */
    /* Things that sit on the page are flat; only what floats over it (menus,
       dialogs) keeps a shadow. */
    --md-elevation-1: none;
    --md-elevation-2: none;
    --md-elevation-3: 0 1px 3px rgba(20, 40, 60, 0.24), 0 4px 8px 3px rgba(20, 40, 60, 0.1);
    --md-elevation-4: 0 2px 3px rgba(20, 40, 60, 0.24), 0 6px 10px 4px rgba(20, 40, 60, 0.1);

    /* Material's shape scale. Radii were previously drawn from fifteen values
       between 4px and 28px, so equivalent components disagreed by a pixel or
       two on every screen. */
    --md-shape-xs: 4px;
    --md-shape-s: 8px;
    --md-shape-m: 12px;
    --md-shape-l: 16px;
    --md-shape-xl: 28px;

    /* One focus ring, rather than three that differ by a percent of alpha. */
    --md-focus-ring: 0 0 0 3px rgba(29, 74, 113, 0.24);
}

html {
    background: var(--md-surface);
    color-scheme: light;
}

body {
    min-height: 100vh;
    background: var(--md-surface);
    color: var(--md-on-surface);
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

.container {
    width: min(1120px, calc(100% - 32px));
}

.container-wide {
    width: min(1440px, calc(100% - 32px));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--md-outline-variant);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 64px;
    padding: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--md-on-surface);
    font-family: "Roboto", system-ui, sans-serif;
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: grid;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 12px;
    background: var(--md-primary);
}

.brand-mark svg {
    width: 22px;
    height: 22px;
    fill: var(--md-on-primary);
}

.brand-mark circle {
    fill: var(--warm);
}

.site-header nav {
    gap: 0.1rem;
}

.site-header nav a,
.site-header .link-btn {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    color: var(--md-on-surface-variant);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
}

.site-header nav a:hover,
.site-header .link-btn:hover {
    background: var(--md-surface-container-high);
    color: var(--md-on-surface);
}

.site-header nav > a[href="/users/signup/"] {
    padding-inline: 1rem;
    background: var(--md-primary);
    color: var(--md-on-primary);
}

.site-header nav > a[href="/users/signup/"]:hover {
    background: var(--accent-dark);
    color: var(--md-on-primary);
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--md-on-surface);
}

.nav-toggle:hover {
    background: var(--md-surface-container-high);
}

.nav-toggle svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

main {
    padding: 1.5rem 0 2.5rem;
}

h1,
h2,
h3,
h4,
.landing-pro h1,
.home-requests-head h2,
.request-success-shell h1,
.impact-card h3,
.fact-tile h3,
.flow-strip h2,
.ops-title {
    font-family: "Roboto", system-ui, sans-serif;
    color: var(--md-on-surface);
}

h1,
h2,
h3,
h4,
p {
    text-wrap: pretty;
}

.card {
    padding: 1.25rem;
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    background: var(--card);
    box-shadow: none;
}

.form-grid {
    gap: 0.85rem;
    margin-top: 0.85rem;
}

label {
    gap: 0.35rem;
    color: var(--md-on-surface);
    font-size: 0.88rem;
    font-weight: 500;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--md-outline);
    border-radius: 4px;
    background: var(--card);
    color: var(--md-on-surface);
}

textarea {
    min-height: 88px;
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--md-on-surface);
}

input:focus,
select:focus,
textarea:focus {
    border-width: 2px;
    border-color: var(--md-primary);
    box-shadow: none;
    outline: none;
}

/* The field rules above made sliders 48px boxes with a border, so the filled
   track read as a navy block and the thumb vanished into it at 100%. A slider
   is a track: give it back its 6px height, with room above and below so the
   thumb stays easy to grab. */
input[type="range"],
input[type="range"]:hover,
input[type="range"]:focus {
    min-height: 0;
    height: 6px;
    margin: 0.75rem 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
}

.btn {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid var(--md-outline);
    border-radius: 999px;
    background: transparent;
    color: var(--md-primary);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.2;
    transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    border-color: var(--md-primary);
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
}

.btn-primary {
    border-color: var(--md-primary);
    background: var(--md-primary);
    color: var(--md-on-primary);
    box-shadow: var(--md-elevation-1);
}

.btn-primary:hover {
    border-color: var(--accent-dark);
    background: var(--accent-dark);
    color: var(--md-on-primary);
    box-shadow: var(--md-elevation-2);
}

.btn-small {
    min-height: 34px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-danger {
    border-color: var(--md-error);
    background: var(--md-error);
    color: #fff;
}

/* A filled red button is right for confirming a destructive action inside a
   dialog, and too loud for the control that merely opens one — on the request
   page it made "Cancel request" the most prominent thing on screen. Triggers
   stay outlined in the error colour; the confirm stays filled. */
.btn-danger-outline {
    border-color: #e0a9a4;
    background: transparent;
    color: var(--md-error);
}

.btn-danger-outline:hover {
    border-color: var(--md-error);
    background: var(--md-error-container);
    color: #8c1d17;
}

.message,
.error-block {
    padding: 0.75rem 1rem;
    border-radius: 12px;
}

/* Only `error` had a surface of its own, so "Saved" and "Something went wrong"
   arrived in the same neutral white box. Give each level the container colour
   its meaning implies. */
.message.success {
    border-color: #a8d5bd;
    background: var(--md-success-container);
    color: var(--md-on-success-container);
}

.message.info,
.message.warning {
    border-color: #b9d4ea;
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
}

.message.warning {
    border-color: #e8c99a;
    background: var(--md-secondary-container);
    color: var(--md-on-secondary-container);
}

.error,
.error-block {
    border-color: #f3bab5;
    background: var(--md-error-container);
}

.landing-pro,
.catalog-hero {
    gap: 1.5rem;
    padding: 2rem;
    border: 0;
    border-radius: 28px;
    background: var(--md-surface-container-low);
}

.landing-pro h1 {
    max-width: 13ch;
    margin: 0.25rem 0 0.75rem;
    font-size: clamp(2.4rem, 4vw, 3.15rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.landing-kicker,
.catalog-kicker,
.ops-eyebrow,
.eyebrow {
    color: var(--md-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
}

.landing-sub {
    max-width: 62ch;
    margin-top: 0.75rem;
    color: var(--md-on-surface-variant);
    font-size: 1rem;
    line-height: 1.55;
}

.landing-chip-row,
.landing-cta-row {
    margin-top: 0.85rem;
}

.landing-chip {
    padding: 0.3rem 0.7rem;
    border: 0;
    border-radius: 8px;
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    font-size: 0.78rem;
    font-weight: 500;
}

.impact-card {
    padding: 1rem;
    border: 0;
    border-radius: 16px;
    background: var(--card);
    box-shadow: none;
}

.impact-card h3 {
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.impact-card > p {
    margin: 0;
    color: var(--md-on-surface-variant);
    font-size: 0.88rem;
}

.impact-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.impact-metrics > div {
    padding: 0.65rem;
    border: 0;
    border-radius: 12px;
    background: var(--md-surface-container-low);
}

.fact-band {
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.fact-tile {
    padding: 1rem;
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    background: var(--card);
}

.fact-tile h3 {
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

.fact-tile p,
.flow-step p {
    color: var(--md-on-surface-variant);
    font-size: 0.86rem;
    line-height: 1.45;
}

.flow-strip {
    margin-top: 0.75rem;
    padding: 1.25rem;
    border: 0;
    border-radius: 16px;
    background: var(--md-surface-container-low);
}

.flow-strip h2 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.flow-grid {
    gap: 0.55rem;
}

.flow-step {
    min-height: 0;
    padding: 0.75rem;
    border: 0;
    border-radius: 12px;
    background: var(--card);
}

.flow-step span {
    font-size: 0.72rem;
}

.flow-step h4 {
    margin: 0.18rem 0 0.2rem;
    font-size: 0.9rem;
}

.home-requests,
.request-success-shell,
.result-shell,
.next-step-box {
    padding: 1.25rem;
    border: 0;
    border-radius: 16px;
    background: var(--md-surface-container-low);
}

.home-request-card,
.box,
.toggle-wrap,
.usage-icons,
.map-box,
.catalog-controls,
.line-chart-wrap,
.chat-window,
.thread-messages,
.location-readout {
    border-color: var(--md-outline-variant);
    background: var(--card);
}

/* The neutral `.box` surface above also matches `class="box error-block"`, which
   silently repainted those callouts as ordinary sections. Restate the error
   surface after it so the variant still reads as a warning. */
.box.error-block {
    border-color: #f3bab5;
    background: var(--md-error-container);
}

/* Page shells that hold `.box` sections were themselves cards, so every screen
   stacked a white bordered card inside a white bordered card (and request cards
   inside that again). The sections keep the card; the shell around them becomes
   the page, matching how the Operations screens already read. Shells with no
   `.box` inside — privacy, terms, the confirmation pages — stay as they are. */
.card.dashboard-shell:has(.box),
.card.installer-shell:has(.box),
.card.result-shell:has(.box) {
    padding: 0;
    border: 0;
    background: none;
}

/* Three short read-only sections stacked full width left most of a desktop
   screen empty. The two lists pair up once there is room; "Blocked time" stays
   full width because it opens a form. */
.calendar-columns {
    display: grid;
    gap: 1rem;
}

@media (min-width: 900px) {
    .calendar-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

.auth-shell {
    max-width: 480px;
    margin: 1rem auto;
    padding: 1.5rem;
}

.auth-shell h1 {
    margin: 0;
    font-size: 1.75rem;
    letter-spacing: -0.025em;
}

.auth-shell > p {
    margin: 0.35rem 0 0;
}

.login-method-switch {
    gap: 0;
    padding: 2px;
    border-radius: 999px;
    background: var(--md-surface-container);
}

.login-method-option span {
    min-height: 40px;
    padding: 0.55rem 0.7rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--md-on-surface-variant);
    font-weight: 500;
}

.login-method-option input:checked + span {
    border: 0;
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
}

.text-link-btn {
    color: var(--md-primary);
    font-weight: 500;
    text-decoration: none;
}

.ops-header {
    padding: 1rem 0 0.85rem;
}

.ops-title {
    margin-top: 0.15rem;
    font-size: 1.55rem;
    letter-spacing: -0.025em;
}

.ops-sub {
    margin-top: 0.25rem;
    line-height: 1.45;
}

.ops-stat-grid,
.ops-home-grid {
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.ops-stat {
    padding: 0.85rem 1rem;
    border: 0;
    border-radius: 12px;
    background: var(--md-surface-container-low);
}

.ops-stat-value {
    margin-top: 0.2rem;
    font-size: 1.65rem;
}

.ops-home-card {
    min-height: 88px;
    gap: 0.75rem;
    padding: 0.9rem;
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    background: var(--card);
}

.ops-home-card:hover {
    border-color: var(--md-primary);
    background: var(--md-surface-container-low);
    box-shadow: none;
    transform: none;
}

.ops-home-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
}

.ops-system-admin,
.ops-table-card,
.ops-setting,
.ops-form-card,
.review-detail,
.review-list {
    border-color: var(--md-outline-variant);
    border-radius: 12px;
    box-shadow: none;
}

.ops-table-card,
.ops-setting,
.ops-form-card,
.review-detail {
    padding: 1rem;
}

.ops-table th {
    padding: 0.5rem 0.65rem;
    background: var(--md-surface-container-low);
}

.ops-table td {
    padding: 0.58rem 0.65rem;
}

.ops-table tbody tr:hover {
    background: var(--md-surface-container-low);
}

.review-workspace {
    gap: 0.75rem;
}

.review-row {
    padding: 0.6rem;
}

.ops-dialog {
    padding: 1.25rem;
    border: 0;
    border-radius: 28px;
}

.reveal {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        animation: none;
    }
}

/* Focused customer journeys keep navigation out of the decision path. */
.site-header-focused .header-inner {
    min-height: 64px;
}

.site-header-focused .brand {
    margin-inline: 0;
}

.journey-header-inner {
    position: relative;
    justify-content: center;
}

.journey-back {
    position: absolute;
    left: 0;
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    min-height: 44px;
    padding: 0.55rem 0.7rem;
    border-radius: 999px;
    color: var(--accent-dark);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.journey-back:hover,
.journey-back:focus-visible {
    background: var(--accent-container);
    color: var(--accent-dark);
    outline: none;
}

/* Hover's pale tint is too faint to find by keyboard; focus adds a ring. */
.journey-back:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.journey-back svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 480px) {
    .site-header-focused .header-inner {
        min-height: 56px;
    }

    .journey-back {
        left: -0.55rem;
    }

    .journey-back span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
}

@media (max-width: 960px) {
    .header-inner {
        position: relative;
    }

    .nav-toggle {
        display: grid;
        place-items: center;
    }

    .site-header nav {
        position: absolute;
        top: calc(100% - 4px);
        right: 0;
        display: none;
        width: min(340px, calc(100vw - 32px));
        max-height: calc(100vh - 80px);
        padding: 0.5rem;
        border: 1px solid var(--md-outline-variant);
        border-radius: 16px;
        background: var(--card);
        box-shadow: var(--md-elevation-3);
        overflow-y: auto;
    }

    .site-header nav.is-open {
        display: grid;
    }

    .site-header nav a,
    .site-header .link-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 0.65rem 0.8rem;
        border-radius: 8px;
    }

    .site-header .inline-logout {
        width: 100%;
    }

    .landing-pro {
        grid-template-columns: 1fr;
    }

    .landing-pro h1 {
        max-width: 16ch;
    }
}

@media (max-width: 640px) {
    .container,
    .container-wide {
        width: min(100% - 24px, 1120px);
    }

    .header-inner {
        min-height: 56px;
    }

    main {
        padding: 1rem 0 2rem;
    }

    .landing-pro,
    .catalog-hero {
        padding: 1.25rem;
        border-radius: 28px;
    }

    .landing-pro h1 {
        font-size: 2.2rem;
        line-height: 1.04;
    }

    .impact-metrics,
    .fact-band {
        grid-template-columns: 1fr 1fr;
    }

    .landing-cta-row .btn {
        flex: 1 1 100%;
    }

    .card,
    .auth-shell {
        padding: 1rem;
    }

    .phone-input-row {
        grid-template-columns: 88px 1fr;
    }

    .ops-home-card {
        grid-template-columns: auto 1fr;
    }
}

@media (max-width: 420px) {
    .impact-metrics,
    .fact-band {
        grid-template-columns: 1fr;
    }

}

/* Compact consumer-app density */
.landing-pro {
    grid-template-columns: minmax(0, 720px);
    min-height: 0;
    padding: clamp(1.5rem, 4vw, 3rem);
}

.landing-main,
.catalog-hero > div:first-child {
    max-width: 720px;
}

.home-request-grid,
.catalog-grid {
    gap: 0.75rem;
}

.home-request-card {
    padding: 0.9rem 1rem;
}

.catalog-hero {
    grid-template-columns: 1fr;
    padding: 1.5rem;
}

.catalog-card {
    border-radius: 12px;
}

.catalog-card-media {
    min-height: 132px;
}

.catalog-card-body {
    gap: 0.45rem;
    padding: 0.9rem;
}

/* These carried the browser's default ▶ marker, so "Block time off" and "Apply
   for this job" read as stray text rather than controls. Give them one chevron
   affordance plus hover and focus states, like any other actionable row. */
.disclosure-box > summary {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    min-height: 44px;
    padding: 0.7rem 0;
    color: var(--md-primary);
}

.disclosure-box > summary::-webkit-details-marker {
    display: none;
}

.disclosure-box > summary::before {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    margin-left: 2px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
}

.disclosure-box[open] > summary::before {
    transform: rotate(45deg);
}

.disclosure-box > summary:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.disclosure-box > summary:focus-visible {
    outline: 2px solid var(--md-primary);
    outline-offset: 2px;
    border-radius: var(--md-shape-xs);
}

.disclosure-box[open] > summary {
    border-bottom: 1px solid var(--md-outline-variant);
    margin-bottom: 1rem;
}

.location-disclosure {
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    padding: 0 0.9rem 0.9rem;
}

.signup-progress {
    margin: 1rem 0;
}

.signup-progress p {
    margin: 0 0 0.4rem;
}

.signup-progress-track {
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--md-surface-container-high);
}

.signup-progress-track span {
    display: block;
    width: 20%;
    height: 100%;
    background: var(--md-primary);
    transition: width 160ms ease-out;
}

.signup-step-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.signup-step[hidden] {
    display: none !important;
}

.signup-step-actions [hidden] {
    display: none !important;
}

.signup-step-actions .btn:last-child {
    margin-left: auto;
}

.dashboard-shell,
.result-shell,
.calc-shell {
    gap: 1rem;
}

.dashboard-main,
.result-main,
.form-grid {
    gap: 0.9rem;
}

/* Focused landing page service choices. */
.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.86fr);
    gap: clamp(1.5rem, 4vw, 3.2rem);
    align-items: center;
    padding: clamp(2rem, 6vw, 4.5rem);
    /* A flat surface rather than two radial washes over a diagonal gradient:
       the decoration competed with the two service cards that are the actual
       point of this screen. */
    border: 0;
    border-radius: var(--md-shape-xl);
    background: var(--md-surface-container-low);
    box-shadow: none;
}

.landing-hero-copy h1 {
    max-width: 12ch;
    margin: 0;
    font-family: "Roboto", system-ui, sans-serif;
    font-size: clamp(2.45rem, 5.6vw, 4.4rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.landing-hero-copy .landing-sub {
    max-width: 610px;
    font-size: 1.08rem;
    line-height: 1.65;
}

.landing-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1.2rem;
}

.landing-trust-row span {
    padding: 0.38rem 0.68rem;
    border: 1px solid #c7daea;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: #29475e;
    font-size: 0.78rem;
    font-weight: 700;
}

.landing-ops-link {
    margin-top: 1rem;
}

.service-entry-grid {
    display: grid;
    gap: 0.8rem;
}

.service-entry {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 1rem;
    align-items: center;
    min-height: 118px;
    padding: 1.15rem;
    border: 1px solid #bfd5e6;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--md-elevation-1);
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.service-entry:hover,
.service-entry:focus-visible {
    border-color: var(--accent);
    color: var(--text);
    /* Was `outline: none` with only a shadow to mark focus, which left keyboard
       users without a visible ring on the landing page's primary choices. */
    outline: 2px solid var(--md-primary);
    outline-offset: 2px;
    box-shadow: var(--md-elevation-2);
}

.service-entry-aircon:hover,
.service-entry-aircon:focus-visible {
    border-color: var(--accent-warm);
}

.service-entry-icon,
.installer-invite-icon,
.application-stage-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--accent-container);
    color: var(--accent);
}

.service-entry-aircon .service-entry-icon {
    background: var(--warm-container);
    color: var(--accent-warm-dark);
}

.service-entry-icon svg,
.installer-invite-icon svg,
.application-stage-icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-entry-copy strong,
.service-entry-copy small {
    display: block;
}

.service-entry-copy strong {
    font-size: 1.02rem;
}

.service-entry-copy small {
    margin-top: 0.3rem;
    color: var(--muted);
    line-height: 1.45;
}

.service-entry-arrow {
    color: var(--accent);
    font-size: 1.5rem;
}

.service-entry-aircon .service-entry-arrow {
    color: var(--accent-warm-dark);
}

.installer-invite {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
    padding: 1.2rem 1.3rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
}

.installer-invite h2,
.installer-invite p {
    margin: 0;
}

.installer-invite h2 {
    font-size: 1.18rem;
}

.installer-invite p:not(.landing-kicker) {
    margin-top: 0.3rem;
}

.installer-invite-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

/* Bare <fieldset>s were falling through to the UA default, so the installer
   signup and accreditation forms drew 1990s grooved boxes around each section.
   Group them the Material way instead: a section heading over a rule, with no
   container. Variants that want a real box (.manage-fieldset, .pricing-row)
   set their own border and win on specificity. */
fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

legend {
    width: 100%;
    padding: 0 0 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--md-outline-variant);
    color: var(--md-on-surface);
    font-size: 0.95rem;
    font-weight: 600;
}

/* The variants that keep a real box already have an edge; a full-width rule
   under their legend as well is one border too many. */
.pricing-row > legend,
.manage-fieldset > legend {
    width: auto;
    padding: 0 0.3rem;
    margin-bottom: 0.35rem;
    border-bottom: 0;
}

/* Installer account first, accreditation second. */
.installer-apply-shell,
.accreditation-shell {
    /* `.auth-shell` caps at 480px for a login box; these are long multi-section
       forms and were inheriting that cap, so a 1440px desktop rendered a phone-
       width column 1500px tall. */
    width: 100%;
    max-width: 880px;
    margin-inline: auto;
}

.installer-apply-shell fieldset + fieldset {
    margin-top: 1.75rem;
}

/* A full-bleed submit is right in a 480px auth card and absurd across an 880px
   form, so it takes its natural width once there is room. */
@media (min-width: 720px) {
    .installer-apply-shell > form > .btn-primary,
    .accreditation-shell > form > .btn-primary {
        justify-self: start;
        min-width: 15rem;
    }
}

.installer-apply-intro h1,
.accreditation-heading h1 {
    margin: 0;
}

.signup-coverage-heading {
    margin-top: 0.2rem;
}

.signup-coverage-heading p,
.signup-coverage #cov-status {
    margin: 0.25rem 0 0;
}

.signup-coverage {
    margin-top: 0;
}

.signup-coverage .cov-tree {
    max-height: 340px;
}

.application-stage-note {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid #bdd5e8;
    border-radius: 12px;
    background: #f3f8fd;
}

.application-stage-note .application-stage-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.application-stage-note .application-stage-icon svg {
    width: 24px;
    height: 24px;
}

.application-stage-note p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

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

.service-choice > input {
    position: absolute;
    width: 1px;
    min-height: 1px;
    height: 1px;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.service-choice > span {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    min-height: 58px;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

.service-choice svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-choice > input:checked + span {
    border-color: var(--accent);
    background: var(--accent-container);
    box-shadow: 0 0 0 2px rgba(29, 74, 113, 0.1);
}

.service-choice > input:focus-visible + span {
    outline: 3px solid rgba(29, 74, 113, 0.22);
    outline-offset: 2px;
}

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

.accreditation-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: accreditation-step;
}

.accreditation-steps li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 0.6rem;
    align-items: center;
    min-width: 0;
    padding: 0.65rem;
    border-radius: 10px;
    background: var(--md-surface-container-low);
    counter-increment: accreditation-step;
}

.accreditation-steps li::before {
    content: counter(accreditation-step);
    grid-row: 1 / 3;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    font-size: 0.78rem;
    font-weight: 700;
}

.accreditation-steps strong {
    overflow: hidden;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.accreditation-steps span {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.accreditation-form fieldset {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.upload-field {
    padding: 0.75rem;
    border: 1px dashed var(--md-outline-variant);
    border-radius: 10px;
    background: var(--md-surface-container-lowest);
}

.upload-field:focus-within,
.upload-field.has-file {
    border-color: var(--md-primary);
    background: var(--md-primary-container);
}

.upload-field.has-error {
    border-color: var(--md-error);
    background: var(--md-error-container);
}

.upload-field input[type="file"] {
    margin-top: 0.4rem;
}

.upload-field .field-help strong {
    color: var(--md-on-surface);
}

.accreditation-map {
    height: 320px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.field-help {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.consent-row {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}

.consent-row input {
    width: auto;
    margin-top: 0.2rem;
}

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

/* Global Ask AI bubble, matching the BYD Operations Hub interaction pattern. */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.ask-ai-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1041;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    box-shadow: var(--md-elevation-3);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: grab;
    touch-action: none;
}

/* The launcher floats over the end of the page, where the primary action of a
   form usually sits — on a phone it covered "Send request". Reserve a gutter
   tall enough to clear it on pages that actually render the widget. */
body:has(.ask-ai-launcher) main {
    padding-bottom: 6rem;
}

.ask-ai-launcher:active {
    cursor: grabbing;
}

.ask-ai-launcher:hover,
.ask-ai-launcher:focus-visible {
    background: var(--accent-dark);
    outline: 3px solid #bcd2f4;
    outline-offset: 2px;
}

.ask-ai-launcher svg,
.ask-ai-title-icon svg,
.ask-ai-close svg,
.ask-ai-bot-icon svg,
.ask-ai-form button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ask-ai-drawer {
    position: fixed;
    right: 24px;
    bottom: 86px;
    z-index: 1041;
    display: flex;
    flex-direction: column;
    width: min(410px, calc(100vw - 32px));
    max-height: min(650px, calc(100vh - 112px));
    overflow: hidden;
    border: 1px solid #cbd4e1;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--md-elevation-3);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.ask-ai-drawer.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.ask-ai-drawer > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0.9rem 0.75rem 1rem;
    border-bottom: 1px solid #dce3ed;
    background: #f5f8fd;
}

.ask-ai-title {
    display: flex;
    gap: 0.55rem;
    align-items: center;
}

.ask-ai-title-icon,
.ask-ai-bot-icon {
    display: grid;
    place-items: center;
    padding: 0.42rem;
    border-radius: 8px;
    background: #dbe8fb;
    color: var(--accent);
}

.ask-ai-title strong,
.ask-ai-title small {
    display: block;
}

.ask-ai-title strong {
    font-size: 0.88rem;
}

.ask-ai-title small {
    margin-top: 0.1rem;
    color: var(--muted);
    font-size: 0.7rem;
}

.ask-ai-close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.ask-ai-close:hover,
.ask-ai-close:focus-visible {
    background: var(--accent-container);
    color: var(--accent-dark);
    outline: none;
}

/* Hover's pale tint is too faint to find by keyboard; focus adds a ring. */
.ask-ai-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.ask-ai-messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 250px;
    overflow-y: auto;
    padding: 1rem;
}

.ask-ai-message {
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
    max-width: 91%;
}

.ask-ai-message > div {
    padding: 0.65rem 0.7rem;
    border-radius: 12px;
    background: #f0f5fd;
    color: #334052;
    line-height: 1.45;
}

.ask-ai-message.user {
    align-self: flex-end;
    justify-content: flex-end;
}

.ask-ai-message.user > div {
    background: var(--accent);
    color: #fff;
}

.ask-ai-message strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.ask-ai-message p {
    margin: 0;
    font-size: 0.82rem;
}

.ask-ai-message a {
    display: block;
    margin-top: 0.5rem;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
}

.ask-ai-message a:hover,
.ask-ai-message a:focus-visible {
    text-decoration: underline;
}

.ask-ai-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    padding: 0.7rem;
    border-top: 1px solid #dce3ed;
}

.ask-ai-form textarea {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    max-height: 110px;
    resize: vertical;
    padding: 0.6rem 0.65rem;
    border: 1px solid #aeb7c5;
    border-radius: 8px;
    font: inherit;
    font-size: 0.86rem;
}

.ask-ai-form textarea:focus {
    border-color: var(--accent);
    box-shadow: var(--md-focus-ring);
    outline: none;
}

.ask-ai-form .btn {
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0.65rem;
}

@media (max-width: 760px) {
    .landing-hero {
        grid-template-columns: 1fr;
        padding: 1.4rem;
        border-radius: 28px;
    }

    .landing-hero-copy h1 {
        font-size: clamp(2.3rem, 12vw, 3.5rem);
    }

    .installer-invite {
        grid-template-columns: auto 1fr;
    }

    .installer-invite .btn {
        grid-column: 1 / -1;
        justify-content: center;
        width: 100%;
    }

    .service-choice-grid,
    .accreditation-heading {
        grid-template-columns: 1fr;
    }

    .accreditation-heading {
        display: grid;
    }

    .ask-ai-launcher {
        right: 16px;
        bottom: 16px;
    }

    .ask-ai-drawer {
        right: 16px;
        bottom: 76px;
        width: calc(100vw - 32px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-entry,
    .ask-ai-drawer {
        transition: none;
    }
}

/* ── booking flow ─────────────────────────────────────────────────────────
   A class that sets `display` beats the UA `[hidden] { display: none }` rule,
   so hiding a `.chip-list` by attribute silently did nothing. Make the
   attribute win everywhere rather than remembering it per component. */
[hidden] {
    display: none !important;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* `.landing-chip` is the filled *informational* tag. Chips the user can act on
   inherit it too, so on their own they read as already-selected — every aircon
   size looked chosen before the customer picked one. Selectable and clickable
   chips therefore start outlined and earn the filled surface once chosen. */
.spec-chip,
.slot-fill,
.week-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 36px;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--md-outline-variant);
    background: transparent;
    color: var(--md-on-surface);
    cursor: pointer;
}

.spec-chip:hover,
.slot-fill:hover,
.week-shortcut:hover {
    border-color: var(--md-outline);
    background: var(--md-surface-container);
}

.spec-chip input {
    margin: 0;
    width: auto;
}

.spec-chip:has(input:focus-visible),
.slot-fill:focus-visible,
.week-shortcut:focus-visible {
    outline: 2px solid var(--md-primary);
    outline-offset: 2px;
}

.spec-chip:has(input:checked) {
    border-color: var(--md-primary);
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    font-weight: 500;
}

.week-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.week-shortcut.is-selected {
    border-color: var(--md-primary);
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
}

/* These labels are long enough to take a line each on a phone, where chips that
   hug their text leave a ragged right edge. Full width reads as the list of
   choices it actually is. */
@media (max-width: 560px) {
    .spec-group {
        flex-direction: column;
    }

    .spec-group .spec-chip {
        width: 100%;
    }
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.checkbox-row input {
    width: auto;
    margin: 0;
}

.address-results {
    list-style: none;
    margin: 0.4rem 0;
    padding: 0;
    border: 1px solid #d6e2ec;
    border-radius: 12px;
    overflow: hidden;
}

.address-results li + li {
    border-top: 1px solid #eef3f8;
}

.address-results button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.7rem;
}

.location-confirmed {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
    color: var(--md-success);
    font-weight: 600;
}

.location-confirmed .text-link-btn {
    margin-left: auto;
}

/* ── slot picker ─────────────────────────────────────────────────────── */
.slot-picker {
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    padding: 0.75rem;
    max-width: 22rem;
}

/* On a phone there is no reason to cap it — the extra width goes straight into
   bigger day cells. */
@media (max-width: 560px) {
    .slot-picker {
        max-width: none;
    }
}

.slot-picker-month {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.slot-picker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.slot-picker-weekday {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #64757f;
    padding-bottom: 0.2rem;
}

.slot-picker-day {
    /* 2.1rem gave a 34px tap target on the main date control of the booking
       flow, under the 48px Material guidance. */
    min-height: 2.75rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: 0.82rem;
    cursor: pointer;
}

.slot-picker-month .btn-small {
    min-width: 40px;
    min-height: 40px;
    padding: 0;
}

.slot-picker-day:hover:not(:disabled):not(.is-selected) {
    background: var(--md-surface-container-high);
}

.slot-picker-day:focus-visible {
    outline: 2px solid var(--md-primary);
    outline-offset: -2px;
}

.slot-picker-day:disabled {
    color: #b9c6d1;
    cursor: default;
}

.slot-picker-day.is-selected {
    background: var(--md-primary);
    color: var(--md-on-primary);
    font-weight: 700;
}

.slot-picker-windows {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.slot-picker-window {
    min-height: 36px;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--md-outline-variant);
    background: transparent;
    color: var(--md-on-surface);
    cursor: pointer;
}

.slot-picker-window:hover:not(.is-selected) {
    border-color: var(--md-outline);
    background: var(--md-surface-container);
}

.slot-picker-window:focus-visible {
    outline: 2px solid var(--md-primary);
    outline-offset: 2px;
}

.slot-picker-window.is-selected {
    border-color: var(--md-primary);
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    font-weight: 500;
}

/* ── offers comparison ───────────────────────────────────────────────── */
.offer-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.offer-card {
    border: 1px solid #d6e2ec;
    border-radius: 12px;
    padding: 0.85rem;
}

.offer-slot {
    color: var(--md-primary);
    margin: 0.3rem 0;
}

.offer-note {
    font-style: italic;
    color: #3a4b58;
}

.installer-choice-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.7rem;
    margin-top: 0.8rem;
}

.installer-choice-card {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    min-height: 100%;
    padding: 0.85rem;
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    background: var(--md-surface);
    cursor: pointer;
}

.installer-choice-card:has(input:checked),
.installer-choice-card.is-selected {
    border-color: var(--md-primary);
    background: var(--md-primary-container);
    box-shadow: inset 0 0 0 1px var(--md-primary);
}

.installer-choice-card > input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0.15rem 0 0;
}

.installer-choice-copy {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.installer-choice-copy p {
    margin: 0;
}

.installer-distribution-tabs {
    width: min(560px, 100%);
}

.installer-picker {
    display: grid;
    gap: 0.65rem;
}

.installer-picker > p,
.marketplace-explanation p,
.privacy-note {
    margin: 0;
}

.installer-refresh {
    width: fit-content;
}

.installer-see-more {
    width: fit-content;
    justify-self: center;
    margin-top: 0.15rem;
}

.marketplace-explanation {
    padding: 0.9rem 1rem;
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    background: var(--md-surface-container-low);
}

.marketplace-explanation strong {
    display: block;
    margin-bottom: 0.2rem;
}

.completion-check,
.review-received {
    margin-top: 0.8rem;
    border-color: #c8ddd3;
    background: #f5fbf8;
}

.completion-actions,
.review-stars {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.review-stars label {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin: 0;
}

.form-error {
    color: var(--md-error);
}

.inbox-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    gap: 1rem;
    margin-top: 1rem;
    align-items: start;
}

.inbox-thread-list,
.inbox-conversations,
.inbox-notifications {
    display: grid;
    gap: 0.7rem;
}

.inbox-thread {
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    background: var(--md-surface);
    overflow: clip;
}

.inbox-thread > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    cursor: pointer;
    list-style: none;
}

.inbox-thread > summary::-webkit-details-marker {
    display: none;
}

.inbox-thread > summary > span:first-child {
    display: grid;
    gap: 0.15rem;
}

.inbox-thread[open] > summary {
    border-bottom: 1px solid var(--md-outline-variant);
    background: var(--md-surface-container-low);
}

.inbox-thread > :not(summary) {
    margin-left: 0.8rem;
    margin-right: 0.8rem;
}

.inbox-thread .thread-messages {
    max-height: 340px;
}

.inbox-compose {
    margin-top: 0.7rem;
    margin-bottom: 0.8rem;
}

.notification-row {
    padding: 0.75rem;
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    background: var(--md-surface);
}

.notification-row.is-unread {
    border-left: 4px solid var(--md-primary);
    background: var(--md-primary-container);
}

.notification-row p {
    margin: 0.35rem 0;
}

@media (max-width: 820px) {
    .inbox-layout {
        grid-template-columns: 1fr;
    }
}

.pricing-row {
    border: 1px solid #e4ebf1;
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.6rem;
}

.pricing-row legend {
    font-size: 0.8rem;
    font-weight: 700;
    color: #3a4b58;
    padding: 0 0.3rem;
}

/* ── installer dashboard: tap an offered time to fill the apply form ──── */
.slot-fill {
    cursor: pointer;
    font-family: inherit;
}

.slot-fill:hover {
    border-color: var(--md-primary);
}

.slot-fill.is-selected {
    background: var(--md-primary);
    border-color: var(--md-primary);
    color: #fff;
}

/* ── focused booking and installer navigation ───────────────────────────
   Installer work is a distinct product surface. Keep the brand visible and
   put secondary destinations behind one predictable menu at every width. */
.site-header-menu-only .header-inner {
    position: relative;
}

.site-header-menu-only .nav-toggle {
    display: grid;
    place-items: center;
}

.site-header-menu-only nav {
    position: absolute;
    top: calc(100% - 4px);
    right: 0;
    display: none;
    width: min(320px, calc(100vw - 32px));
    max-height: calc(100vh - 80px);
    padding: 0.5rem;
    border: 1px solid var(--md-outline-variant);
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--md-elevation-3);
    overflow-y: auto;
}

.site-header-menu-only nav.is-open {
    display: grid;
}

.site-header-menu-only nav a,
.site-header-menu-only .link-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 0.68rem 0.8rem;
    border-radius: 8px;
}

.site-header-menu-only .inline-logout {
    width: 100%;
}

.booking-container {
    width: min(880px, calc(100% - 32px));
}

.booking-shell > .dashboard-top {
    margin-bottom: 1.25rem;
}

.booking-shell > .dashboard-top h1 {
    margin: 0.2rem 0 0.35rem;
    font-size: clamp(1.8rem, 4vw, 2.35rem);
    letter-spacing: -0.035em;
}

.booking-shell > .dashboard-top p:last-child {
    max-width: 62ch;
    margin: 0;
}

.booking-form {
    gap: 1.15rem;
}

.booking-section {
    display: grid;
    gap: 1rem;
    padding: clamp(1rem, 3vw, 1.35rem);
    background: var(--card);
}

.booking-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--md-outline-variant);
}

.booking-section-heading h2,
.booking-section-heading p {
    margin: 0;
}

.booking-section-heading h2 {
    font-size: 1.08rem;
    line-height: 1.35;
}

.booking-section-heading p {
    margin-top: 0.15rem;
}

.booking-step {
    display: grid;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    font-size: 0.78rem;
    font-weight: 700;
}

.service-type-switch {
    width: min(360px, 100%);
}

.booking-section #address-fields {
    display: grid;
    gap: 0.85rem;
}

.booking-section .spec-group,
.booking-section .checkbox-row,
.booking-section [data-mode-panel],
.booking-section .installer-picker {
    margin-top: 0;
}

.booking-form > .btn-final-cta {
    min-width: 12rem;
    align-self: flex-start;
}

@media (max-width: 640px) {
    .booking-container {
        width: min(100% - 24px, 880px);
    }

    .booking-shell > .dashboard-top {
        margin-bottom: 1rem;
    }

    .booking-section {
        gap: 0.85rem;
    }

    .booking-form > .btn-final-cta {
        width: 100%;
    }
}


/* ─────────────────────────────────────────────────────────────────────────
   2026 audit: the apps' look on the web

   Borders and shadows give way to flat grey fills and hairline dividers, one
   filled button per page, four text sizes (28 / 17 / 15 / 13), and small
   labels above titles that are quiet references rather than shouting brand
   names. Page-specific rules below come last so they win over older ones.
   ───────────────────────────────────────────────────────────────────────── */
body {
    background: var(--md-surface);
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.0625rem;
    font-weight: 600;
}

.small-text {
    font-size: 0.8125rem;
}

.landing-kicker {
    color: var(--md-on-surface-variant);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.card {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.box {
    border: 0;
    border-radius: var(--md-shape-l);
    background: var(--md-surface-container-low);
    box-shadow: none;
}

.btn-primary,
.btn-primary:hover {
    box-shadow: none;
}

.message {
    border: 0;
    border-radius: var(--md-shape-m);
    box-shadow: none;
}

/* A plain list row: leading icon, a title and one or two quiet lines, and a
   chevron. The whole row is the link, so there is no button per row. */
.list-rows {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.list-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--md-outline-variant);
    color: var(--md-on-surface);
    text-decoration: none;
}

.list-row:hover .list-row-title {
    text-decoration: underline;
}

.list-row-icon {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 50%;
    background: var(--md-surface-container-low);
    color: var(--md-on-surface-variant);
}

.list-row-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.list-row-icon.is-action {
    background: var(--md-primary-container);
    color: var(--md-primary);
}

.list-row-body {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 0.1rem;
}

.list-row-title {
    font-size: 0.9375rem;
    font-weight: 600;
}

.list-row-line {
    color: var(--md-on-surface-variant);
    font-size: 0.8125rem;
}

.list-row-trailing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
    white-space: nowrap;
}

.list-row-price {
    font-size: 1.0625rem;
    font-weight: 700;
}

.list-row-chevron {
    color: var(--md-outline);
    font-size: 1.3rem;
    line-height: 1;
}

.section-title {
    margin: 0 0 0.25rem;
    font-size: 1.0625rem;
    font-weight: 600;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

/* Service tiles: an illustration and a short label on a grey square. */
.service-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.service-tile {
    display: flex;
    min-height: 168px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
    padding: 1.25rem;
    border-radius: var(--md-shape-l);
    background: var(--md-surface-container-low);
    color: var(--md-on-surface);
    text-decoration: none;
    transition: background 0.15s ease;
}

.service-tile:hover {
    background: var(--md-surface-container);
}

.service-tile img {
    width: 88px;
    height: 88px;
}

.service-tile strong {
    font-size: 1.0625rem;
    font-weight: 600;
}

.home-stack {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 720px;
}

.home-greeting {
    margin: 0;
    color: var(--md-on-surface-variant);
    font-size: 0.9375rem;
}

/* The installer's setup checklist. */
.progress-track {
    height: 4px;
    margin: 0.5rem 0 0.25rem;
    overflow: hidden;
    border-radius: 2px;
    background: var(--md-surface-container-high);
}

.progress-fill {
    height: 4px;
    background: var(--md-success);
}

.checklist-done .list-row-title {
    color: var(--md-on-surface-variant);
    font-weight: 400;
    text-decoration: line-through;
}

.check-icon {
    display: grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 2px solid var(--md-outline);
    border-radius: 50%;
}

.checklist-done .check-icon {
    border-color: var(--md-success);
    background: var(--md-success);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

@media (max-width: 560px) {
    .service-tile {
        min-height: 140px;
    }

    .service-tile img {
        width: 64px;
        height: 64px;
    }
}


.site-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 1.5rem 0 2.5rem;
    border-top: 1px solid var(--md-outline-variant);
}

.site-footer a {
    color: var(--md-on-surface-variant);
    font-size: 0.8125rem;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--md-on-surface);
    text-decoration: underline;
}

.installer-invite-flat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.25rem;
}

/* Unread and pending counts read as badges, the way the apps show them. */
.admin-launch-badge {
    background: var(--md-error);
    color: #fff;
}

.site-header nav a,
.site-header .link-btn {
    white-space: nowrap;
}

.offers-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.offer-card {
    border: 0;
    border-radius: var(--md-shape-l);
    background: var(--md-surface-container-low);
    padding: 1rem 1.1rem;
}

.offer-card .dash-lead-top strong:last-child {
    font-size: 1.0625rem;
}

/* Booking, one step at a time. Without script every section shows as before. */
.booking-progress {
    display: flex;
    gap: 4px;
    margin-bottom: 0.9rem;
}

.booking-progress span {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--md-surface-container-high);
}

.booking-progress span.is-done {
    background: var(--md-primary);
}

.booking-form.is-stepped .booking-section {
    display: none;
    padding: 0;
    background: transparent;
}

.booking-form.is-stepped .booking-section.is-current {
    display: grid;
}

.booking-form.is-stepped .booking-section-heading {
    display: none;
}

.job-kinds {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.job-kind {
    padding: 1rem 1.1rem;
    border: 1px solid var(--md-outline-variant);
    border-radius: var(--md-shape-l);
}

.job-kind.is-selected {
    padding: calc(1rem - 1px) calc(1.1rem - 1px);
    border: 2px solid var(--md-primary);
}

.job-kind-choice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--md-on-surface);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}

.job-kind-choice input {
    width: 20px;
    height: 20px;
    min-height: 0;
    margin: 0;
    padding: 0;
    accent-color: var(--md-primary);
}

.job-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.85rem 0 0 2rem;
}

.job-sizes .spec-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.job-sizes .spec-chip:has(input:checked) {
    border-color: var(--md-primary);
    background: var(--md-primary);
    color: var(--md-on-primary);
}

.booking-review {
    margin-bottom: 0.5rem;
}

.review-row {
    width: 100%;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.review-value {
    font-weight: 400;
}

.review-change {
    color: var(--md-primary);
    font-size: 0.9375rem;
    font-weight: 600;
}

.booking-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--md-outline-variant);
    background: var(--md-surface);
}

.booking-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.booking-bar-actions .btn-primary {
    flex: 1;
    min-height: 52px;
    font-size: 1rem;
}

.booking-bar-actions .booking-back {
    border-color: transparent;
}

.booking-range {
    margin: 0;
    color: var(--md-on-surface);
    font-weight: 600;
    text-align: center;
}

.booking-bar .form-error {
    margin: 0;
    text-align: center;
}

/* The floating assistant sits above a page's fixed action bar, not on it. */
body:has(.booking-bar) .ask-ai-launcher,
body:has(.booking-bar) #ask-ai-launcher {
    bottom: 104px;
}

.booking-head > div {
    width: 100%;
}

.review-row {
    border-radius: 0;
}

/* Installer dashboard: setup, a one-line filter, then flat job cards. */
.installer-home {
    max-width: none;
    gap: 1.25rem;
}

.compact-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
}

.compact-filter label {
    flex: 1 1 180px;
}

.coverage-line {
    margin-top: -0.5rem;
}

.installer-jobs {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.75rem;
}

.installer-jobs .installer-request-card {
    border: 0;
    border-radius: var(--md-shape-l);
    background: var(--md-surface-container-low);
    box-shadow: none;
}

.installer-jobs .dash-lead-top .list-row-price {
    white-space: nowrap;
}

.installer-jobs .installer-request-card {
    padding: 1rem 1.1rem;
}

.price-table {
    display: flex;
    flex-direction: column;
    padding: 0 0.9rem;
    border: 1px solid var(--md-outline-variant);
    border-radius: var(--md-shape-m);
    background: var(--md-surface);
}

.price-table-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--md-outline-variant);
    font-size: 0.9375rem;
    font-weight: 400;
}

.price-table-row:first-child {
    border-top: 0;
}

.price-table-row input {
    width: 140px;
    flex: 0 0 140px;
    text-align: right;
}

.pricing-row {
    border: 0;
    border-radius: var(--md-shape-l);
    background: var(--md-surface);
}

/* Messages: plain rows, a red count for unread, a dot for new updates. */
.inbox-conversations,
.inbox-notifications {
    padding: 0;
    border: 0;
    background: transparent;
}

.inbox-thread {
    border: 0;
    border-bottom: 1px solid var(--md-outline-variant);
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.inbox-thread[open] {
    padding-bottom: 1rem;
}

.inbox-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0;
    cursor: pointer;
    list-style: none;
}

.inbox-row::-webkit-details-marker {
    display: none;
}

.inbox-avatar {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 50%;
    background: var(--md-primary-container);
    color: var(--md-primary);
    font-weight: 700;
}

.unread-count {
    min-width: 1.4rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--md-error);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4rem;
    text-align: center;
}

.notification-row {
    padding: 0.85rem 0;
    border: 0;
    border-bottom: 1px solid var(--md-outline-variant);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.notification-row.is-unread {
    border-left: 0;
    background: transparent;
}

.unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 0.5rem;
    border-radius: 50%;
    background: var(--md-primary);
    vertical-align: middle;
}

.notification-row .link-btn,
.list-row .link-btn {
    color: var(--md-primary);
    font-weight: 600;
    text-decoration: none;
}

.calendar-block {
    margin-top: 0.75rem;
}

/* Long forms read as sections, not boxes: a heading and a hairline above. */
.accreditation-form fieldset,
.form-sections fieldset {
    border: 0;
    border-top: 1px solid var(--md-outline-variant);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    margin: 0;
    padding: 1.25rem 0 0;
}

.accreditation-form legend,
.form-sections legend {
    float: left;
    width: 100%;
    margin: 0 0 0.5rem;
    padding: 0;
    font-size: 1.0625rem;
    font-weight: 600;
}

.accreditation-form legend + *,
.form-sections legend + * {
    clear: both;
}

.consent-row input[type="checkbox"] {
    flex: none;
    height: 1.125rem;
    min-height: 0;
    width: 1.125rem;
    margin: 0.15rem 0 0;
    padding: 0;
}

/* The page owns the one filled button; the header's sign-up is tonal so the
   sign-in and sign-up forms are not competing with it. */
.site-header nav > a[href="/users/signup/"] {
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
}

.site-header nav > a[href="/users/signup/"]:hover {
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    filter: brightness(0.96);
}

.application-stage-note {
    border: 0;
    background: var(--md-surface-container);
}

/* Quiet small labels, never uppercase: sentence case, no tracking. */
.eyebrow,
.m-label,
.next-step-eyebrow,
.catalog-kicker,
.catalog-stat-label,
.catalog-brand,
.directory-table th,
.admin-nav-eyebrow,
.admin-nav-section > summary,
.admin-nav-group,
.ops-eyebrow,
.review-fact-group h3,
.manage-fieldset legend,
.ops-panel-title,
.ops-table th,
.ops-stat-label,
.brand-scope {
    text-transform: none;
    letter-spacing: 0;
}

.eyebrow,
.m-label,
.next-step-eyebrow,
.catalog-kicker,
.catalog-stat-label,
.ops-eyebrow,
.ops-stat-label,
.directory-table th,
.ops-table th,
.admin-nav-eyebrow,
.admin-nav-group {
    color: var(--md-on-surface-variant);
    font-size: 0.8125rem;
    font-weight: 500;
}

.ops-panel-title,
.review-fact-group h3,
.manage-fieldset legend {
    color: var(--md-on-surface);
    font-size: 1.0625rem;
    font-weight: 600;
}

.ops-backlink {
    color: var(--md-primary);
    text-decoration: none;
}

.ops-stat-delta {
    font-weight: 400;
    color: var(--md-on-surface-variant);
}

/* Ops: tables, forms and panels sit on the page, not in bordered cards. */
.ops-table-card,
.ops-form-card,
.review-list {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.ops-table th {
    background: transparent;
    border-bottom: 1px solid var(--md-outline-variant);
}

.ops-table td {
    border-bottom: 1px solid var(--md-outline-variant);
}

.review-detail {
    border: 0;
    border-left: 1px solid var(--md-outline-variant);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0 0 0 1.25rem;
}

@media (max-width: 900px) {
    .review-detail {
        border-left: 0;
        border-top: 1px solid var(--md-outline-variant);
        padding: 1rem 0 0;
    }
}

.ops-setting {
    border: 0;
    border-bottom: 1px solid var(--md-outline-variant);
    border-radius: 0;
    background: transparent;
    padding: 1rem 0;
}

.review-readiness {
    border: 0;
}

.growth-chart {
    border: 0;
    background: var(--md-surface-container-low);
    box-shadow: none;
}

.manage-fieldset {
    border: 0;
    border-top: 1px solid var(--md-outline-variant);
    border-radius: 0;
    background: transparent;
    padding: 1rem 0 0;
    margin: 0.5rem 0 0;
}

.manage-fieldset legend {
    padding: 0;
}

/* ─────────────────────────────────────────────────────────────────────────
   Home. For visitors, a splash in the Pixel / Grab manner: one big centred
   line, a stage where a request gathers offers, then content that rises in
   as it scrolls into view. Signed-in customers keep the plainer booking top.
   Everything that moves stops for prefers-reduced-motion.
   ───────────────────────────────────────────────────────────────────────── */
:root {
    --ease-out-soft: cubic-bezier(0.2, 0.7, 0.2, 1);
    --warm: #f39712;
    /* The home page sits on a soft sky; its cards go white so they still lift
       off it, and anything that was pale blue goes deeper or white. */
    --sky: #f1f7fd;
    --sky-top: #e2effb;
    --sky-stage-top: #cfe4f7;
    --sky-stage-bottom: #b6d4ef;
}

body:has(main.splash-main) {
    background: linear-gradient(180deg, var(--sky-top) 0, var(--sky) 900px) var(--sky);
}

body:has(main.splash-main) .site-header {
    border-bottom-color: rgba(29, 74, 113, 0.08);
    background: rgba(226, 239, 251, 0.82);
}

main.splash-main {
    padding-top: 0;
}

.landing {
    display: flex;
    flex-direction: column;
    gap: 7rem;
    padding-bottom: 3rem;
}

/* Scroll reveal. Hidden only once the page's script has said it is running. */
.js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s var(--ease-out-soft), transform 0.8s var(--ease-out-soft);
}

.js-reveal [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
}

.bento > [data-reveal]:nth-child(2),
.app-cards > [data-reveal]:nth-child(2) {
    transition-delay: 0.1s;
}

.bento > [data-reveal]:nth-child(3) {
    transition-delay: 0.2s;
}

.bento > [data-reveal]:nth-child(4) {
    transition-delay: 0.3s;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ── Splash top ─────────────────────────────────────────────────────────── */
.splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 4.5rem;
    text-align: center;
}

/* The copy and the button are there on the first frame; only the stage
   rises, so nobody waits on an entrance to read or tap. */
.splash > .splash-stage {
    animation: rise-in 0.9s var(--ease-out-soft) both;
}

.splash-pill {
    margin: 0 0 1.5rem;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    background: #fff;
    color: var(--md-on-surface-variant);
    font-size: 0.8125rem;
    font-weight: 500;
}

.splash-title {
    display: flex;
    flex-direction: column;
    margin: 0;
    font-size: clamp(2.6rem, 7vw, 5.25rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

/* Solid deep amber: the brand orange clipped to a gradient measured about
   2:1 on the sky, under the 3:1 even display text needs. */
.splash-title em {
    color: var(--accent-warm-dark);
    font-style: normal;
}

.splash-lede {
    max-width: 34rem;
    margin: 1.5rem 0 0;
    color: var(--md-on-surface-variant);
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    line-height: 1.55;
}

.splash-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.splash .landing-ops-link {
    margin-top: 1rem;
}

.pill-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.6rem;
    border: 1px solid rgba(29, 74, 113, 0.14);
    border-radius: 999px;
    background: #fff;
    color: var(--md-on-surface);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.pill-button:hover {
    background: #fff;
    box-shadow: 0 10px 24px rgba(29, 74, 113, 0.12);
    transform: translateY(-2px);
}

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

.pill-button-primary:hover {
    background: #163b5b;
    box-shadow: 0 10px 24px rgba(29, 74, 113, 0.28);
}

/* The stage: a soft sky with a phone rising out of its bottom edge. */
.splash-stage {
    position: relative;
    width: 100%;
    height: 560px;
    margin-top: 4rem;
    overflow: hidden;
    border-radius: 40px;
    background: linear-gradient(180deg, var(--sky-stage-top) 0%, var(--sky-stage-bottom) 100%);
    animation-delay: 0.5s;
}

.splash-phone {
    position: absolute;
    bottom: -64px;
    left: 50%;
    width: 300px;
    height: 560px;
    margin-left: -150px;
    padding: 12px;
    border-radius: 48px;
    background: #10151b;
    box-shadow: 0 30px 60px rgba(16, 36, 56, 0.35);
    animation: rise-in 1.2s 0.7s var(--ease-out-soft) both;
}

.splash-phone-notch {
    position: absolute;
    top: 22px;
    left: 50%;
    z-index: 1;
    width: 84px;
    height: 22px;
    margin-left: -42px;
    border-radius: 999px;
    background: #10151b;
}

.splash-phone .offer-sketch {
    max-width: none;
    height: 100%;
    padding: 3.5rem 1.1rem 1.1rem;
    border-radius: 37px;
    box-shadow: none;
    text-align: left;
}

.splash-float {
    position: absolute;
    width: 132px;
    height: 132px;
    padding: 18px;
    border-radius: 32px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(16, 36, 56, 0.12);
}

.splash-float-aircon {
    top: 70px;
    left: 9%;
}

.splash-float-solar {
    right: 9%;
    bottom: 110px;
}

.splash-chip {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(16, 36, 56, 0.12);
    color: var(--md-on-surface);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.splash-chip svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--md-primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.splash-chip-a {
    top: 64px;
    right: 12%;
}

.splash-chip-b {
    bottom: 150px;
    left: 7%;
}

.splash-chip-c {
    top: 250px;
    right: 4%;
}

/* ── The offer sketch, and its loop: offers arrive, one is chosen ────────── */
.offer-sketch {
    display: flex;
    width: 100%;
    max-width: 300px;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1.25rem;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 20, 40, 0.28);
}

.offer-sketch p {
    margin: 0;
}

.offer-sketch-eyebrow {
    color: var(--md-on-surface-variant);
    font-size: 0.75rem;
}

.offer-sketch-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.offer-sketch-status {
    color: var(--md-primary);
    font-size: 0.8125rem;
    font-weight: 600;
}

.offer-sketch-rows {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 1rem 0;
}

.offer-sketch-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.75rem;
    border: 2px solid transparent;
    border-radius: var(--md-shape-m);
    background: var(--md-surface-container-low);
    animation: sketch-arrive 0.6s var(--ease-out-soft) both;
}

/* Plays once and rests on the chosen offer: a loop that never stops is
   motion nobody can pause (WCAG 2.2.2). */
.offer-sketch-row:nth-child(1) {
    animation: sketch-arrive 0.6s 0.4s var(--ease-out-soft) both, sketch-choose 0.4s 2.6s ease both;
}

.offer-sketch-row:nth-child(2) {
    animation-delay: 0.9s;
}

.offer-sketch-row:nth-child(3) {
    animation-delay: 1.4s;
}

@keyframes sketch-arrive {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes sketch-choose {
    from {
        border-color: transparent;
        background: var(--md-surface-container-low);
    }
    to {
        border-color: var(--md-primary);
        background: #fff;
    }
}

.offer-sketch-avatar {
    flex: 0 0 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--md-surface-container-highest);
}

.offer-sketch-row:nth-child(1) .offer-sketch-avatar {
    background: var(--md-secondary-container);
}

.offer-sketch-lines {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.35rem;
}

.offer-sketch-lines span {
    display: block;
    width: 80%;
    height: 7px;
    border-radius: 4px;
    background: var(--md-surface-container-highest);
}

.offer-sketch-lines span + span {
    width: 55%;
    background: var(--md-surface-container-high);
}

.offer-sketch-check {
    display: grid;
    flex: 0 0 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: var(--md-primary);
    color: #fff;
    animation: sketch-check 0.5s 2.6s var(--ease-out-soft) both;
}

@keyframes sketch-check {
    0% {
        transform: scale(0);
    }
    60% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.offer-sketch-check svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.offer-sketch-button {
    padding: 0.7rem;
    border-radius: 999px;
    background: var(--md-primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    animation: sketch-press 0.3s 2.3s ease both;
}

@keyframes sketch-press {
    0%,
    100% {
        transform: none;
    }
    50% {
        transform: scale(0.95);
    }
}

/* ── Section headings ───────────────────────────────────────────────────── */
.splash-heading {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.08;
    text-align: center;
}

.splash-subheading {
    max-width: 32rem;
    margin: 0 auto 2.5rem;
    color: var(--md-on-surface-variant);
    font-size: 1.125rem;
    line-height: 1.5;
    text-align: center;
}

/* ── Services ───────────────────────────────────────────────────────────── */
.splash-services {
    scroll-margin-top: 2rem;
}

.splash-services .splash-heading {
    margin-bottom: 2.5rem;
}

.splash-services .service-tiles {
    max-width: 760px;
    margin: 0 auto;
    gap: 1rem;
}

.splash-main .service-tile,
.splash-main .service-tile:hover {
    background: #fff;
}

.splash-main .service-tile:hover {
    box-shadow: 0 16px 36px rgba(29, 74, 113, 0.12);
}

.splash-services .service-tile {
    min-height: 240px;
    border-radius: 32px;
}

.splash-services .service-tile img {
    width: 120px;
    height: 120px;
}

.splash-services .service-tile strong {
    font-size: 1.25rem;
}

.service-tile {
    transition: background 0.2s ease, transform 0.3s var(--ease-out-soft);
}

.service-tile img {
    transition: transform 0.4s var(--ease-out-soft);
}

.service-tile:hover {
    transform: translateY(-4px);
}

.service-tile:hover img {
    transform: scale(1.08) rotate(-2deg);
}

/* ── Audience tabs and bento ────────────────────────────────────────────── */
#how-it-works {
    scroll-margin-top: 2rem;
}

.audience-tabs {
    display: flex;
    width: max-content;
    max-width: 100%;
    margin: 1.5rem auto 2.5rem;
    padding: 4px;
    border-radius: 999px;
    background: #fff;
}

.audience-tabs button {
    padding: 0.7rem 1.3rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--md-on-surface-variant);
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}

.audience-tabs button[aria-selected="true"] {
    background: var(--md-on-surface);
    color: #fff;
}

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

.bento[hidden] {
    display: none;
}

.bento:not([hidden]) .bento-card {
    animation: rise-in 0.6s var(--ease-out-soft) both;
}

.bento-card {
    display: flex;
    min-height: 240px;
    flex-direction: column;
    gap: 0.6rem;
    padding: 2rem;
    border-radius: 32px;
    color: var(--md-on-surface);
    text-decoration: none;
}

.bento-card h3,
.app-card h3 {
    color: inherit;
}

.bento-card h3 {
    margin: auto 0 0;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.bento-card p {
    margin: 0;
    color: var(--md-on-surface-variant);
    font-size: 1rem;
    line-height: 1.55;
}

.bento-blue {
    background: var(--md-primary);
    color: #fff;
}

.bento-blue p {
    color: rgba(255, 255, 255, 0.78);
}

.bento-blue .bento-step {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.bento-warm {
    background: #fff1dc;
}

.bento-green {
    background: #e2f4e9;
}

.bento-grey {
    background: #fff;
}

.bento-grey .bento-step {
    background: var(--md-primary-container);
    box-shadow: none;
}

.bento-dark {
    background: #171c22;
    color: #fff;
}

.bento-dark p {
    color: rgba(255, 255, 255, 0.72);
}

.bento-dark .bento-step {
    background: rgba(255, 255, 255, 0.1);
    color: var(--warm);
}

.bento-orange {
    background: var(--warm);
    color: #1f1300;
}

.bento-orange p,
.bento-orange .bento-more {
    color: #3d2600;
}

.bento-step {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 1px rgba(29, 74, 113, 0.06);
    color: var(--md-primary);
    font-size: 1.125rem;
    font-weight: 700;
}

.bento-step-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bento-link {
    transition: transform 0.3s var(--ease-out-soft);
}

.bento-link:hover {
    transform: translateY(-4px);
}

.bento-more {
    margin-top: 0.4rem;
    color: var(--md-primary);
    font-weight: 600;
}

.bento-more span {
    display: inline-block;
    transition: transform 0.2s ease;
}

.bento-link:hover .bento-more span {
    transform: translateX(4px);
}

/* ── Signed-in customer top ─────────────────────────────────────────────── */
.landing-top {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 2.5rem;
    padding-top: 2rem;
}

.landing-top-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.landing-top-main h1 {
    margin: 0;
}

.landing-top .landing-ops-link {
    align-self: flex-start;
}

.landing-visual {
    display: grid;
    min-height: 380px;
    place-items: center;
    padding: 2rem;
    border-radius: 32px;
    background: linear-gradient(180deg, var(--sky-stage-top) 0%, var(--sky-stage-bottom) 100%);
}

.landing .home-stack {
    max-width: none;
    margin-top: -4rem;
}

/* ── Apps ───────────────────────────────────────────────────────────────── */
.app-downloads {
    scroll-margin-top: 2rem;
}

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

.app-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    border-radius: 32px;
    background: #fff;
}

.app-card-installer {
    background: #171c22;
    color: #fff;
}

.app-card p {
    margin: 0;
}

.app-card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-card-head img {
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(16, 36, 56, 0.18);
}

.app-card-head h3 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.app-card-audience {
    color: var(--md-on-surface-variant);
    font-size: 0.875rem;
}

.app-card-summary {
    color: var(--md-on-surface-variant);
    font-size: 1rem;
    line-height: 1.5;
}

.app-card-installer .app-card-audience,
.app-card-installer .app-card-summary {
    color: rgba(255, 255, 255, 0.72);
}

.store-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: auto;
}

.store-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.1rem 0.55rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #0d0f12;
    color: #fff;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.1;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.app-card-installer .store-button {
    border-color: rgba(255, 255, 255, 0.3);
}

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

.store-button svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.store-button span {
    display: flex;
    flex-direction: column;
}

.store-button small {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.install-guide {
    margin-top: 3rem;
}

.install-guide h3 {
    margin: 0 0 1.25rem;
    font-size: 1.25rem;
    text-align: center;
}

.install-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.install-steps li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    color: var(--md-on-surface-variant);
    font-size: 0.9375rem;
    line-height: 1.55;
}

.install-steps strong {
    display: block;
    color: var(--md-on-surface);
}

.install-step-num {
    display: grid;
    flex: 0 0 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    background: var(--md-primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
}

.install-guide-desktop {
    margin: 2rem 0 0;
    text-align: center;
}

/* ── Smaller screens ────────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .landing-top {
        grid-template-columns: 1fr;
    }

    .landing-visual {
        display: none;
    }

    .landing .home-stack {
        margin-top: -3rem;
    }

    .install-steps {
        grid-template-columns: 1fr;
    }

    .splash-float {
        width: 96px;
        height: 96px;
        padding: 12px;
        border-radius: 24px;
    }

    .splash-chip-c {
        display: none;
    }
}

@media (max-width: 640px) {
    .landing {
        gap: 4.5rem;
    }

    .splash {
        padding-top: 2.5rem;
    }

    .splash-stage {
        height: 460px;
        margin-top: 2.5rem;
        border-radius: 28px;
    }

    .splash-phone {
        width: 250px;
        height: 470px;
        margin-left: -125px;
        border-radius: 40px;
        bottom: -80px;
    }

    .splash-phone .offer-sketch {
        border-radius: 30px;
        padding-top: 3rem;
    }

    .splash-float {
        width: 72px;
        height: 72px;
        padding: 10px;
        border-radius: 20px;
    }

    .splash-float-aircon {
        top: 28px;
        left: 4%;
    }

    .splash-float-solar {
        display: none;
    }

    .splash-chip {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }

    .splash-chip-a {
        top: 24px;
        right: 4%;
    }

    .splash-chip-b {
        bottom: 96px;
        left: 3%;
    }

    .splash-services .service-tile {
        min-height: 180px;
        border-radius: 24px;
    }

    .splash-services .service-tile img {
        width: 80px;
        height: 80px;
    }

    .bento,
    .app-cards {
        grid-template-columns: 1fr;
    }

    .bento-card {
        min-height: 0;
        padding: 1.5rem;
        border-radius: 24px;
    }

    .bento-card h3 {
        margin-top: 0.75rem;
        font-size: 1.25rem;
    }

    .app-card {
        padding: 1.5rem;
        border-radius: 24px;
    }

    .audience-tabs button {
        padding: 0.65rem 0.95rem;
        font-size: 0.875rem;
    }
}

/* Phones and tablets are where the app gets installed, so the "on a computer"
   hint is only for wide screens. */
@media (max-width: 1024px) and (hover: none) {
    .install-guide-desktop {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing *,
    .landing *::before,
    .landing *::after {
        animation: none !important;
        transition: none !important;
    }

    .js-reveal [data-reveal] {
        opacity: 1;
        transform: none;
    }
}

/* Staff installer prices: the manage-page editor and the comparison table. */
.manage-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.manage-travel {
    margin-top: 0.75rem;
}

.price-table-row > span {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.price-pos {
    padding: 0.05rem 0.45rem;
    border-radius: 8px;
    background: #f2f4f6;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
}

.price-pos-low {
    background: #e3f2e8;
    color: #1e6a3a;
}

.price-pos-high {
    background: #fbdedc;
    color: #8c1d17;
}

.price-matrix td,
.price-matrix tfoot th {
    white-space: nowrap;
}

.price-matrix tfoot th {
    border-top: 1px solid var(--border);
    font-weight: 600;
}

.price-cell-inherited {
    color: var(--muted);
}

.price-cell-note {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 600;
}

.price-cell-low {
    color: #1e6a3a;
}

.price-cell-high {
    color: #8c1d17;
}

.price-matrix tfoot p {
    margin: 0;
    white-space: nowrap;
}

/* Signed-out results: installers, prices, and a number one tap away. */
.guest-results .offer-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.guest-results .offer-card {
    scroll-margin-top: 5rem;
}

.guest-results .offer-card p {
    margin: 0.3rem 0 0;
}

.guest-phone {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.6rem !important;
}

.guest-results a:not(.btn) {
    color: var(--accent);
    font-weight: 500;
}

.guest-account-cta {
    margin-top: 1.25rem;
}

.guest-account-cta h2 {
    margin: 0 0 0.4rem;
    font-size: 1.0625rem;
}

.guest-account-cta ul {
    margin: 0 0 0.9rem;
    padding-left: 1.1rem;
}

.guest-account-cta li + li {
    margin-top: 0.2rem;
}

.guest-contact {
    margin-top: 0.75rem;
}

/* Change password: labels above every field, rules shown before the first
   attempt, and each error next to the field it is about. */
.change-password .password-field {
    display: grid;
    gap: 0.35rem;
}

.change-password .password-field > label {
    display: block;
}

.change-password .password-field .field-help {
    margin: 0;
}

.change-password .field-error,
.change-password .field-error p {
    margin: 0;
    color: var(--md-error);
    font-size: 0.8125rem;
}

.change-password input[aria-invalid="true"] {
    border-color: var(--md-error);
}

.field-error-summary {
    margin: 1rem 0 0;
    padding: 0.75rem 0.9rem;
    border-radius: var(--md-shape-m);
    background: var(--md-error-container);
    color: var(--md-on-surface);
    font-size: 0.875rem;
}

.password-rules {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--md-on-surface-variant);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.match-status:empty {
    display: none;
}

.match-status.is-match {
    color: var(--md-success);
}

.match-status.is-mismatch {
    color: var(--md-error);
}

.change-password .show-passwords {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    font-weight: 400;
    cursor: pointer;
}

.change-password .show-passwords[hidden] {
    display: none;
}

.change-password .show-passwords input {
    width: 20px;
    min-height: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--md-primary);
}

.change-password .show-passwords input:focus-visible {
    outline: 2px solid var(--md-primary);
    outline-offset: 2px;
}

.change-password .btn-primary {
    width: 100%;
    min-height: 48px;
    margin-top: 0.4rem;
}

.change-password .btn-primary:focus-visible {
    outline: 2px solid var(--md-primary);
    outline-offset: 2px;
}
