/* =========================================================
   COUNCIL RATES / WATER CHARGES EVIDENCE FORM
   Mobile-first professional design
   ========================================================= */

:root {
    --primary: #8f0f04;
    --primary-dark: #6f0b03;
    --primary-light: #fff1ef;
    --navy: #172b3a;
    --text: #1f2933;
    --muted: #667580;
    --background: #f4f6f8;
    --surface: #ffffff;
    --surface-soft: #f8fafb;
    --border: #d8e0e6;
    --border-light: #e8edf1;
    --success: #177245;
    --success-bg: #edf8f2;
    --success-border: #b9dfca;
    --danger: #b42318;
    --danger-bg: #fff4f2;
    --danger-border: #efc4be;
    --warning: #8a5a00;
    --warning-bg: #fff8e6;
    --warning-border: #efd79b;
    --focus: rgba(143, 15, 4, .16);
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(20, 35, 45, .05);
    --shadow-md: 0 8px 24px rgba(20, 35, 45, .08);
}


/* =========================================================
   RESET
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


/* =========================================================
   MAIN CONTAINER
   ========================================================= */

.water-survey {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 12px;
}


/* =========================================================
   HERO
   ========================================================= */

.survey-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #780c03 0%, #a81206 55%, #c51b0b 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-md);
}

    .survey-hero::after {
        content: "";
        position: absolute;
        width: 190px;
        height: 190px;
        right: -90px;
        top: -90px;
        border-radius: 50%;
        background: rgba(255,255,255,.06);
        pointer-events: none;
    }

    .survey-hero h1 {
        position: relative;
        z-index: 1;
        margin: 0 0 14px;
        font-size: clamp(26px, 7vw, 38px);
        font-weight: 750;
        letter-spacing: -.025em;
        line-height: 1.15;
    }

    .survey-hero p {
        position: relative;
        z-index: 1;
        margin: 0;
        max-width: 680px;
        font-size: 15px;
        line-height: 1.65;
        color: rgba(255,255,255,.95);
    }


/* =========================================================
   INTRO
   ========================================================= */

.survey-intro {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

    .survey-intro strong {
        display: block;
        margin-bottom: 6px;
        color: var(--primary);
        font-size: 15px;
    }

    .survey-intro p {
        margin: 8px 0 0;
        color: var(--muted);
        font-size: 14px;
        line-height: 1.6;
    }


/* =========================================================
   CARDS
   ========================================================= */

.survey-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.survey-card-title {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 18px;
    color: var(--navy);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
}


/* =========================================================
   SECTION NUMBER
   ========================================================= */

.survey-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(143,15,4,.12);
    font-size: 14px;
    font-weight: 750;
}


/* =========================================================
   FORM
   ========================================================= */

.survey-field {
    margin-bottom: 17px;
}

    .survey-field:last-child {
        margin-bottom: 0;
    }

    .survey-field label {
        display: block;
        margin-bottom: 7px;
        color: var(--navy);
        font-size: 14px;
        font-weight: 650;
    }

.survey-required {
    color: var(--danger);
    margin-left: 2px;
}


/* =========================================================
   INPUTS
   ========================================================= */

.survey-input,
.survey-select {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
    -webkit-appearance: none;
    appearance: none;
}

    .survey-input::placeholder {
        color: #9aa6af;
    }

    .survey-input:hover,
    .survey-select:hover {
        border-color: #b9c4cc;
    }

    .survey-input:focus,
    .survey-select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--focus);
        background: #fff;
    }

textarea.survey-input {
    padding: 12px 14px;
    min-height: 100px;
    resize: vertical;
}


/* =========================================================
   SELECT
   ========================================================= */

.survey-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667580' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 42px;
}


/* =========================================================
   MONEY INPUT
   ========================================================= */

.survey-money {
    position: relative;
}

    .survey-money > span {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--muted);
        font-weight: 650;
        pointer-events: none;
        z-index: 2;
    }

    .survey-money .survey-input {
        padding-left: 31px;
    }


/* =========================================================
   HELP
   ========================================================= */

.survey-help {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   VALIDATION
   ========================================================= */

.survey-validation {
    display: none;
    margin-top: 5px;
    color: var(--danger);
    font-size: 13px;
    font-weight: 500;
}

    .survey-validation.show {
        display: block;
    }

.input-error {
    border-color: var(--danger) !important;
    background: var(--danger-bg) !important;
    box-shadow: 0 0 0 3px rgba(180,35,24,.10) !important;
}


/* =========================================================
   INFORMATION BOX
   ========================================================= */

.survey-info {
    background: var(--surface-soft);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--primary);
    border-radius: 9px;
    padding: 13px 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

    .survey-info strong {
        color: var(--navy);
    }


/* =========================================================
   GRID
   ========================================================= */

.survey-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}


/* =========================================================
   TOTAL BOX
   ========================================================= */

.survey-total-box {
    margin-top: 16px;
    padding: 13px 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.survey-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    font-size: 14px;
}

    .survey-total-row + .survey-total-row {
        border-top: 1px solid var(--border-light);
    }

    .survey-total-row strong {
        color: var(--navy);
        font-size: 16px;
        font-weight: 700;
        white-space: nowrap;
    }


/* =========================================================
   RESULTS
   ========================================================= */

.survey-results {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.survey-results-title {
    margin: 0 0 14px;
    color: var(--navy);
    font-size: 18px;
    font-weight: 700;
}


/* =========================================================
   COMPARISON
   ========================================================= */

.survey-comparison {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 14px;
}

.survey-compare-col {
    text-align: center;
    padding: 10px 8px;
}

    .survey-compare-col + .survey-compare-col {
        border-top: 1px solid var(--border-light);
    }

.survey-compare-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.survey-compare-value {
    margin-top: 3px;
    color: var(--navy);
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -.02em;
}


/* =========================================================
   DIVIDER
   ========================================================= */

.survey-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 16px 0;
}


/* =========================================================
   RESULT ROW
   ========================================================= */

.survey-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 9px 0;
    font-size: 14px;
}

    .survey-result-row + .survey-result-row {
        border-top: 1px solid var(--border-light);
    }

.survey-result-label {
    color: var(--muted);
    font-weight: 500;
}

.survey-result-value {
    color: var(--navy);
    font-weight: 700;
}


/* =========================================================
   ANNUAL INCREASE / DECREASE
   ========================================================= */

/* INCREASE = RED */

.survey-increase-box {
    position: relative;
    margin-top: 18px;
    padding: 25px 18px 22px;
    border-radius: 17px;
    background: linear-gradient( 135deg, #fff0ed 0%, #fff8f7 100% );
    border: 2px solid var(--danger-border);
    color: var(--danger);
    text-align: center;
    box-shadow: 0 8px 22px rgba(180,35,24,.10);
    overflow: hidden;
}

    .survey-increase-box::before {
        content: "";
        position: absolute;
        width: 150px;
        height: 150px;
        right: -75px;
        top: -75px;
        border-radius: 50%;
        background: rgba(180,35,24,.05);
        pointer-events: none;
    }

.survey-increase-label {
    position: relative;
    z-index: 1;
    margin-bottom: 6px;
    color: var(--danger);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.survey-increase-value {
    position: relative;
    z-index: 1;
    margin: 4px 0 5px;
    color: var(--danger);
    font-size: clamp(38px, 11vw, 56px);
    font-weight: 850;
    line-height: 1.05;
    letter-spacing: -.04em;
}

.survey-increase-percent {
    position: relative;
    z-index: 1;
    color: #b42318;
    font-size: 21px;
    font-weight: 750;
    line-height: 1.3;
}

.survey-increase-note {
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin: 10px auto 0;
    color: #8b5b55;
    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   DECREASE = GREEN
   ========================================================= */

.survey-decrease {
    background: linear-gradient( 135deg, #e7f7ef 0%, #f5fbf7 100% );
    border-color: var(--success-border);
    color: var(--success);
    box-shadow: 0 8px 22px rgba(23,114,69,.08);
}

    .survey-decrease::before {
        background: rgba(23,114,69,.05);
    }

    .survey-decrease .survey-increase-label,
    .survey-decrease .survey-increase-value,
    .survey-decrease .survey-increase-percent {
        color: var(--success);
    }

    .survey-decrease .survey-increase-note {
        color: #527565;
    }


/* =========================================================
   LARGE CHANGE WARNING
   ========================================================= */

.survey-warning {
    display: none;
    margin-top: 14px;
    padding: 13px 14px;
    border-radius: 10px;
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: var(--warning);
    font-size: 13px;
    line-height: 1.55;
    text-align: left;
}

    .survey-warning.show {
        display: block;
    }

    .survey-warning strong {
        display: block;
        margin-bottom: 3px;
    }


/* =========================================================
   CHECKBOX
   ========================================================= */

.survey-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    cursor: pointer;
}

    .survey-checkbox input {
        width: 20px;
        min-width: 20px;
        height: 20px;
        min-height: 20px;
        margin: 2px 0 0;
        accent-color: var(--primary);
        cursor: pointer;
    }

    .survey-checkbox label {
        margin: 0;
        color: var(--muted);
        font-size: 13px;
        font-weight: 400;
        line-height: 1.55;
        cursor: pointer;
    }


/* =========================================================
   BUTTON
   ========================================================= */

.survey-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    padding: 0 20px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient( 135deg, var(--primary), #a91408 );
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(143,15,4,.18);
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}

    .survey-button:hover {
        background: linear-gradient( 135deg, var(--primary-dark), #8d1005 );
        box-shadow: 0 7px 16px rgba(143,15,4,.23);
    }

    .survey-button:active {
        transform: translateY(1px);
    }

    .survey-button:focus-visible {
        outline: 3px solid rgba(143,15,4,.25);
        outline-offset: 2px;
    }

    .survey-button:disabled {
        opacity: .6;
        cursor: not-allowed;
        box-shadow: none;
    }


/* =========================================================
   SUCCESS
   ========================================================= */

.survey-success {
    display: none;
    margin-bottom: 18px;
    padding: 20px;
    border-radius: 13px;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success);
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
}

    .survey-success strong {
        font-size: 17px;
    }


/* =========================================================
   ERROR
   ========================================================= */

.survey-error {
    display: none;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 10px;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger);
    font-size: 14px;
    line-height: 1.5;
}


/* =========================================================
   PRIVACY
   ========================================================= */

.survey-privacy {
    max-width: 620px;
    margin: 14px auto 30px;
    padding: 0 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .water-survey {
        padding: 8px;
    }

    .survey-hero {
        padding: 20px 16px;
    }

    .survey-card,
    .survey-intro {
        padding: 16px;
    }

    .survey-card-title {
        font-size: 18px;
    }

    .survey-input,
    .survey-select {
        min-height: 48px;
    }

    .survey-increase-box {
        padding: 22px 14px 20px;
    }
}

.crdb-public-badge {
    display: inline-block;
    margin-top: 14px;
    padding: 5px 11px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    color: #f8fafb !important;
    font-size: 16px;
    font-weight: 700;
}

    .crdb-public-badge a {
        color: #fff !important;
        text-decoration: none;
        font-weight: 700;
    }

        .crdb-public-badge a:hover {
            color: #fff !important;
            text-decoration: underline;
        }



/* =========================================================
   TABLET / DESKTOP
   ========================================================= */

@media (min-width: 600px) {

    .water-survey {
        padding: 30px 20px;
    }

    .survey-hero {
        padding: 30px 28px;
        border-radius: 18px;
    }

        .survey-hero h1 {
            font-size: clamp(30px, 4vw, 38px);
        }

    .survey-card,
    .survey-intro {
        padding: 22px;
    }

    .survey-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

        .survey-grid .survey-field {
            margin-bottom: 0;
        }

    .survey-comparison {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .survey-compare-col + .survey-compare-col {
        border-top: 0;
        border-left: 1px solid var(--border-light);
    }

    .survey-increase-box {
        padding: 30px 24px 26px;
    }
}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 900px) {

    .water-survey {
        max-width: 780px;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .survey-hero {
        padding: 34px 32px;
    }

    .survey-card {
        padding: 24px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
