:root{
    --hydro-deep:#073b4c;
    --hydro-teal:#087f8c;
    --hydro-cyan:#16b7c4;
    --hydro-pale:#eef8fa;
    --hydro-border:#cfe1e5;
    --hydro-text:#173f48;
    --hydro-muted:#5d767d;
    --hydro-gold:#d6a84b;
    --hydro-red:#b42318;
    --hydro-green:#13795b;
}

.hydro-page{
    min-height:70vh;
    background:
        radial-gradient(circle at 92% 3%,rgba(22,183,196,.11),transparent 24%),
        linear-gradient(180deg,#f6fbfc,#edf6f8);
    color:var(--hydro-text);
}

.hydro-wrap{
    width:min(1240px,calc(100% - 30px));
    margin:0 auto;
}

.hydro-hero{
    padding:44px 0 42px;
    background:
        radial-gradient(circle at 85% 10%,rgba(94,234,229,.18),transparent 30%),
        linear-gradient(135deg,#043a49,#087982);
    color:#fff;
}

.hydro-hero h1{
    max-width:900px;
    margin:6px 0 12px;
    color:#fff;
    font-size:clamp(30px,5vw,52px);
    line-height:1.05;
}

.hydro-hero p{
    max-width:900px;
    margin:0;
    color:#ddf5f3;
    font-size:17px;
    line-height:1.7;
    text-align:justify;
    text-align-last:left;
}

.hydro-result-hero,
.hydro-error-hero{
    padding:34px 0;
}

.hydro-kicker{
    display:block;
    color:#39d8d1;
    font-size:12px;
    font-weight:900;
    letter-spacing:.09em;
    text-transform:uppercase;
}

.hydro-main{
    padding:30px 0 54px;
}

.hydro-panel{
    margin-bottom:20px;
    padding:24px;
    border:1px solid var(--hydro-border);
    border-radius:22px;
    background:#fff;
    box-shadow:0 12px 28px rgba(5,58,72,.08);
}

.hydro-intro-panel,
.hydro-section-heading,
.hydro-download-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
}

.hydro-panel h2{
    margin:4px 0 7px;
    color:var(--hydro-deep);
    font-size:clamp(22px,3vw,31px);
}

.hydro-panel h3{
    color:var(--hydro-deep);
}

.hydro-panel p{
    color:var(--hydro-muted);
    line-height:1.68;
}

.hydro-step-number{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:34px;
    height:34px;
    border-radius:50%;
    background:#dff6f5;
    color:#087f8c;
    font-weight:950;
}

.hydro-upload-form,
.hydro-settings-form{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
}

.hydro-settings-form{
    display:block;
}

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

.hydro-fieldset{
    min-width:0;
    margin:0;
    padding:20px;
    border:1px solid var(--hydro-border);
    border-radius:18px;
    background:#fbfefe;
}

.hydro-fieldset legend{
    padding:0 8px;
    color:var(--hydro-deep);
    font-size:17px;
    font-weight:900;
}

.hydro-field{
    min-width:0;
    margin-bottom:15px;
}

.hydro-field:last-child{
    margin-bottom:0;
}

.hydro-field-wide{
    grid-column:1/-1;
}

.hydro-field label,
.hydro-confirmation{
    display:block;
    margin-bottom:7px;
    color:var(--hydro-deep);
    font-size:13px;
    font-weight:900;
}

.hydro-field input,
.hydro-field select,
.hydro-field textarea{
    width:100%;
    min-height:46px;
    padding:10px 12px;
    border:1px solid #bfd5da;
    border-radius:12px;
    background:#fff;
    color:var(--hydro-text);
    font:inherit;
}

.hydro-field textarea{
    min-height:92px;
    resize:vertical;
}

.hydro-field input:focus,
.hydro-field select:focus,
.hydro-field textarea:focus{
    outline:3px solid rgba(22,183,196,.20);
    border-color:var(--hydro-teal);
}

.hydro-field small{
    display:block;
    margin-top:6px;
    color:var(--hydro-muted);
    line-height:1.45;
}

.hydro-checkbox-field{
    display:flex;
    align-items:center;
}

.hydro-checkbox-field label,
.hydro-confirmation{
    display:flex;
    align-items:flex-start;
    gap:9px;
}

.hydro-checkbox-field input,
.hydro-confirmation input{
    width:auto;
    min-height:0;
    margin-top:3px;
}

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

.hydro-actions,
.hydro-download-actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:12px;
}

.hydro-actions{
    grid-column:1/-1;
    margin-top:8px;
}

.hydro-primary-button,
.hydro-secondary-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:44px;
    padding:10px 16px;
    border:0;
    border-radius:999px;
    font-weight:900;
    line-height:1.2;
    text-decoration:none;
    cursor:pointer;
}

.hydro-primary-button{
    background:linear-gradient(135deg,#087f8c,#0a9ca6);
    color:#fff !important;
    box-shadow:0 8px 18px rgba(8,127,140,.20);
}

.hydro-secondary-button{
    border:1px solid #aacbd1;
    background:#fff;
    color:var(--hydro-deep) !important;
}

.hydro-primary-button:hover,
.hydro-primary-button:focus-visible,
.hydro-secondary-button:hover,
.hydro-secondary-button:focus-visible{
    transform:translateY(-1px);
    outline:3px solid rgba(22,183,196,.20);
    outline-offset:2px;
}

.hydro-alert{
    margin-bottom:20px;
    padding:18px 20px;
    border-radius:16px;
    line-height:1.55;
}

.hydro-alert-error{
    border:1px solid #f1b7b2;
    background:#fff2f1;
    color:#7f1d1d;
}

.hydro-alert ul{
    margin:8px 0 0 20px;
}

.hydro-preview-section{
    overflow:hidden;
}

.hydro-table-scroll{
    max-width:100%;
    overflow:auto;
    border:1px solid var(--hydro-border);
    border-radius:15px;
}

.hydro-preview-table{
    width:100%;
    border-collapse:collapse;
    background:#fff;
    font-size:13px;
}

.hydro-preview-table th,
.hydro-preview-table td{
    padding:10px 12px;
    border-bottom:1px solid #e4eef0;
    text-align:left;
    vertical-align:top;
    white-space:nowrap;
}

.hydro-preview-table th{
    position:sticky;
    top:0;
    z-index:1;
    background:#eaf7f8;
    color:var(--hydro-deep);
    font-weight:900;
}

.hydro-preview-table tbody tr:nth-child(even){
    background:#f8fbfc;
}

.hydro-method-preview{
    margin:15px 0;
    padding:14px 15px;
    border-left:5px solid var(--hydro-gold);
    border-radius:12px;
    background:#fff9e8;
}

.hydro-method-preview strong{
    color:#6d4c08;
}

.hydro-method-preview p{
    margin:5px 0 0;
    color:#695a32;
}

.hydro-confirmation{
    margin-top:16px;
    padding:13px;
    border:1px solid #c6dce0;
    border-radius:12px;
    background:#fff;
    line-height:1.45;
}

.hydro-rule-grid,
.hydro-method-report,
.hydro-balance-grid,
.hydro-quality-grid,
.hydro-chart-grid{
    display:grid;
    gap:15px;
}

.hydro-rule-grid,
.hydro-method-report{
    grid-template-columns:repeat(3,minmax(0,1fr));
}

.hydro-rule-grid article,
.hydro-method-report article,
.hydro-balance-grid article,
.hydro-quality-grid article,
.hydro-chart-grid article{
    min-width:0;
    padding:16px;
    border:1px solid var(--hydro-border);
    border-radius:15px;
    background:#f8fcfd;
}

.hydro-rule-grid p,
.hydro-method-report p{
    margin:6px 0 0;
    text-align:justify;
    text-align-last:left;
}

.hydro-result-status{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin-bottom:20px;
}

.hydro-result-status > div{
    padding:16px;
    border:1px solid #bcd9d7;
    border-radius:16px;
    background:#effbf8;
}

.hydro-result-status span,
.hydro-balance-grid span,
.hydro-quality-grid span{
    display:block;
    color:#688188;
    font-size:11px;
    font-weight:900;
    letter-spacing:.05em;
    text-transform:uppercase;
}

.hydro-result-status strong,
.hydro-balance-grid strong,
.hydro-quality-grid strong{
    display:block;
    margin-top:7px;
    color:var(--hydro-deep);
    font-size:18px;
    line-height:1.35;
}

.hydro-status-passed-with-warnings > div{
    border-color:#e7cf92;
    background:#fff9e8;
}

.hydro-status-review-required > div{
    border-color:#efb3ad;
    background:#fff2f1;
}

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

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

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

.hydro-chart-grid h3{
    margin:0 0 12px;
}

.hydro-chart-grid canvas{
    display:block;
    width:100%;
    height:310px;
    border-radius:12px;
    background:#fff;
}

.hydro-chart-note,
.hydro-warning-note{
    margin:13px 0 0;
    font-size:13px;
}

.hydro-warning-note{
    padding:12px 14px;
    border-radius:12px;
    background:#fff7df;
    color:#6f530e !important;
}

[hidden]{
    display:none !important;
}

@media(max-width:980px){
    .hydro-settings-grid,
    .hydro-chart-grid{
        grid-template-columns:1fr;
    }

    .hydro-result-status,
    .hydro-balance-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .hydro-rule-grid,
    .hydro-method-report,
    .hydro-quality-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:680px){
    .hydro-wrap{
        width:min(100% - 20px,1240px);
    }

    .hydro-hero{
        padding:32px 0;
    }

    .hydro-panel{
        padding:18px;
        border-radius:18px;
    }

    .hydro-upload-form,
    .hydro-two-columns,
    .hydro-result-status,
    .hydro-balance-grid,
    .hydro-quality-grid,
    .hydro-rule-grid,
    .hydro-method-report{
        grid-template-columns:1fr;
    }

    .hydro-intro-panel,
    .hydro-section-heading,
    .hydro-download-heading{
        align-items:flex-start;
        flex-direction:column;
    }

    .hydro-primary-button,
    .hydro-secondary-button{
        width:100%;
    }

    .hydro-download-actions{
        width:100%;
    }

    .hydro-chart-grid canvas{
        height:250px;
    }
}
