*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family: Arial, sans-serif;
    background:#dfe8f6;
    color:#14346b;
}

.page-bg{
    min-height:100vh;
    background:
        radial-gradient(circle at top left, rgba(47,114,245,.12), transparent 35%),
        linear-gradient(180deg, #eef4fc 0%, #dfe8f6 100%);
    padding:24px 0;
}

.container{
    max-width:1400px;
    margin:0 auto;
    padding:28px;
    background:#edf3fb;
    border-radius:26px;
    box-shadow:
        0 24px 70px rgba(35,73,130,.16),
        inset 0 0 0 1px rgba(255,255,255,.75);
}

/* HEADER */

.hero{
    display:flex;
    justify-content:space-between;
    align-items:stretch;
    background:#f8fbff;
    border-radius:22px;
    overflow:hidden;
    margin-bottom:28px;
    border:1px solid #cbd8ec;
    box-shadow:0 12px 34px rgba(32,79,150,.12);
}

.hero-left{
    flex:1;
    display:flex;
    align-items:center;
    padding:44px 52px;
    background:linear-gradient(135deg, #ffffff 0%, #edf4ff 100%);
}

.hero-right{
    width:46%;
    min-height:230px;
    background-image:url("img/banner.png");
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
}

#page-title{
    font-size:38px;
    line-height:1.18;
    margin-bottom:12px;
    color:#0d3b8f;
    letter-spacing:.2px;
}

#page-subtitle{
    font-size:22px;
    color:#234477;
}

/* INFO */

.info-card{
    display:flex;
    gap:24px;
    margin-bottom:24px;
}

.info-text-card,
.legend-card{
    background:#f9fbff;
    border:1px solid #ccd9ed;
    border-radius:18px;
    box-shadow:0 10px 28px rgba(38,83,150,.10);
}

.info-text-card{
    flex:1;
    display:flex;
    gap:24px;
    align-items:center;
    padding:28px 32px;
}

.info-icon{
    width:48px;
    height:48px;
    min-width:48px;
    border:3px solid #2f72f5;
    color:#2f72f5;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:28px;
    font-weight:700;
    font-family: Georgia, serif;
}

.info-text{
    line-height:1.75;
    color:#223e68;
    font-size:16px;
}
.info-text ul{
    margin:12px 0 12px 20px;
}
.intro-text{
    margin-bottom:18px;
    line-height:1.7;
}

.feature-list{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin:18px 0;
}

.feature-item{
    display:flex;
    align-items:flex-start;
    gap:12px;
    padding:10px 14px;

    background:#f5f9ff;
    border:1px solid #d9e6fb;
    border-radius:10px;
}

.feature-dot{
    width:10px;
    height:10px;
    min-width:10px;

    margin-top:6px;

    background:#2f72f5;
    border-radius:50%;
}

.summary-text{
    margin-top:18px;
    line-height:1.7;
    font-weight:500;
}
.legend-card{
    width:390px;
    padding:26px 30px;
}

.legend-card h3{
    margin-bottom:18px;
    color:#1f5fd6;
    font-size:18px;
}

.legend-item{
    display:grid;
    grid-template-columns:16px 118px 22px 110px;
    align-items:center;
    column-gap:10px;
    min-height:52px;
    margin-bottom:6px;
    color:#1c3560;
}
.legend-card{
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.legend-card h3{
    margin-bottom:18px;
}

.legend-item span:last-child{
    text-align:center;
    line-height:1.25;
}
.dot{
    width:14px;
    height:14px;
    border-radius:50%;
}

.green{
    background:#9edda8;
}

.yellow{
    background:#ffd978;
}

.red{
    background:#ff8d8d;
}

/* QUESTIONS */

#questions-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:22px;
}

.question-card{
    background:#f9fbff;
    border-radius:18px;
    padding:20px 20px 16px;
    border:1px solid #cbd8ec;
    box-shadow:0 10px 26px rgba(38,83,150,.10);
}

.question-header{
    display:flex;
    align-items:center;
    gap:16px;
    margin-bottom:18px;
}

.question-number{
    width:38px;
    height:38px;
    min-width:38px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(180deg, #2e78ee, #174fae);
    color:white;
    font-weight:bold;
    border-radius:9px;
    box-shadow:0 5px 12px rgba(31,95,214,.25);
}

.question-title{
    font-size:17px;
    font-weight:700;
    line-height:1.35;
    color:#073986;
}

.answers{
    display:flex;
    flex-direction:column;
    border-top:1px solid #dce5f3;
}

.answer-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px 4px;
    border-bottom:1px solid #e3ebf7;
    cursor:pointer;
    color:#1e3b68;
}

.answer-row:last-child{
    border-bottom:none;
}

.answer-row:hover{
    background:#eef5ff;
    border-radius:10px;
}

.answer-left{
    display:flex;
    align-items:center;
    gap:12px;
}

.answer-left input{
    width:18px;
    height:18px;
    accent-color:#1f5fd6;
}

.answer-score{
    color:#0d4ecf;
    font-weight:500;
}

/* SCORE */

#score-section{
    margin-top:28px;
}

.score-card{
    background:#f8fbff;
    border:1px solid #cbd8ec;
    border-radius:20px;
    padding:28px 34px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:24px;
    box-shadow:0 12px 30px rgba(38,83,150,.10);
}

.score-info{
    display:flex;
    align-items:center;
    gap:20px;
}

.score-icon{
    width:54px;
    height:54px;

    background:linear-gradient(180deg,#2f72f5,#1f5fd6);

    border-radius:12px;

    display:flex;
    align-items:center;
    justify-content:center;
}

.bars{
    display:flex;
    align-items:flex-end;
    gap:3px;
    height:24px;
}

.bars span{
    width:4px;
    background:white;
    border-radius:2px;
}

.bars span:nth-child(1){
    height:8px;
}

.bars span:nth-child(2){
    height:14px;
}

.bars span:nth-child(3){
    height:20px;
}

.bars span:nth-child(4){
    height:16px;
}

.score-info h3{
    color:#1f5fd6;
    margin-bottom:6px;
}

.score-info p{
    color:#4d668e;
}

#total-score-box{
    min-width:260px;
    text-align:center;
    background:white;
    border:1px solid #ccd9ed;
    border-radius:16px;
    padding:18px 20px;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.7);
}

#total-score{
    font-size:40px;
    font-weight:bold;
    color:#1f5fd6;
    margin-right:8px;
}

#show-result-btn{
    border:none;
    background:linear-gradient(180deg, #3d7df1, #1f5fd6);
    color:white;
    padding:18px 48px;
    border-radius:12px;
    cursor:pointer;
    font-size:17px;
    font-weight:700;
    box-shadow:0 10px 22px rgba(31,95,214,.28);
}

#show-result-btn:hover{
    transform:translateY(-1px);
    box-shadow:0 12px 26px rgba(31,95,214,.34);
}

/* RESULT */

#result-section{
    margin-top:26px;
}

#result-card{
    background:#f9fbff;
    border:1px solid #cbd8ec;
    border-radius:20px;
    padding:30px;
    box-shadow:0 12px 30px rgba(38,83,150,.10);
}

#result-score{
    font-size:42px;
    margin-top:15px;
    color:#1f5fd6;
    font-weight:700;
}

#risk-result{
    font-size:24px;
    font-weight:bold;
    margin-top:10px;
}

#risk-description{
    margin-top:10px;
    color:#4d668e;
}

#download-pdf-btn{
    margin-top:25px;
    background:#1f5fd6;
    color:white;
    border:none;
    border-radius:12px;
    padding:15px 30px;
    cursor:pointer;
    font-weight:700;
}

/* FOOTER */

#footer-note{
    margin-top:26px;
    background:#f8fbff;
    border:1px solid #cbd8ec;
    border-radius:18px;
    padding:24px 30px;
    color:#455d82;
    line-height:1.6;
    display:flex;
    align-items:center;
    gap:22px;
    box-shadow:0 10px 26px rgba(38,83,150,.08);
}

.footer-icon{
    width:44px;
    height:44px;
    min-width:44px;
    border:2px solid #2f72f5;
    color:#2f72f5;
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:800;
    font-size:22px;
}

.result-card.inactive{
    opacity:.72;
}

.result-top{
    display:flex;
    justify-content:space-between;
    gap:24px;
    align-items:flex-start;
    margin-bottom:22px;
}

#result-status{
    margin-top:8px;
    color:#5f7191;
}

#result-score-box{
    min-width:180px;
    background:#ffffff;
    border:1px solid #ccd9ed;
    border-radius:16px;
    padding:18px;
    text-align:center;
}

.risk-badge{
    display:inline-block;
    padding:12px 18px;
    border-radius:12px;
    background:#eef3fb;
    border:1px solid #ccd9ed;
    font-weight:800;
    color:#31506f;
    margin-bottom:14px;
}

.risk-low{
    background:#eaf7ea;
    border-color:#76bd7b;
    color:#217a35;
}

.risk-medium{
    background:#eef5ff;
    border-color:#2f72f5;
    color:#1f5fd6;
}

.risk-high{
    background:#fff0f0;
    border-color:#e06a6a;
    color:#c93434;
}

#risk-probability,
#risk-description{
    margin-top:8px;
    font-size:17px;
    color:#253f66;
}

.result-comment{
    margin-top:26px;
    padding:22px;
    background:#ffffff;
    border:1px solid #d2deef;
    border-radius:16px;
}

.result-comment h3{
    margin-bottom:14px;
    color:#173f88;
}

.result-comment ol{
    margin-top:14px;
    padding-left:22px;
    line-height:1.7;
}

.algorithm-card{
    margin-top:28px;
    background:#ffffff;
    border:1px solid #b8cbe4;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 10px 28px rgba(38,83,150,.08);
}

.algorithm-header{
    background:#155f25;
    color:#ffffff;
    padding:22px 28px;
}

.algorithm-header h3{
    text-transform:uppercase;
    font-size:22px;
    margin-bottom:6px;
}

.algorithm-header p{
    opacity:.9;
}

.algorithm-blue-line{
    margin:18px;
    padding:14px 18px;
    background:#dff0ff;
    border:3px solid #1f65c8;
    color:#0d4ba7;
    font-weight:800;
    text-align:center;
    text-transform:uppercase;
}

.algorithm-stage{
    display:grid;
    grid-template-columns:120px 1fr;
    border-top:8px solid #f4f8fc;
}

.stage-label{
    background:#155f25;
    color:white;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:18px 10px;
    text-transform:uppercase;
}

.stage-label span{
    margin-top:6px;
    font-size:12px;
    opacity:.9;
}

.stage-content{
    padding:18px;
    border:2px solid #155f25;
    border-left:none;
}

.stage-content h4{
    text-align:center;
    color:#155f25;
    text-transform:uppercase;
    margin-bottom:16px;
}

.factor-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin-bottom:8px;
}

.factor-box{
    background:#eef7ea;
    border:1px solid #8fcf98;
    padding:12px;
    color:#1d3d24;
}

.factor-box ul{
    margin-top:8px;
    padding-left:24px;
    line-height:1.45;
}

.factor-box p{
    margin-top:8px;
}

.factor-box.center{
    text-align:center;
}

.risk-table{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:8px;
}

.risk-column{
    border:1px solid #c5ceda;
    background:#f8fbff;
}

.risk-column-head{
    color:#ffffff;
    text-align:center;
    padding:13px;
    font-weight:800;
}

.risk-column.low .risk-column-head{
    background:#35933f;
}

.risk-column.medium .risk-column-head{
    background:#226fc6;
}

.risk-column.high .risk-column-head{
    background:#164fa5;
}

.risk-column em{
    display:block;
    text-align:center;
    padding:10px;
    font-size:13px;
    color:#4c5f78;
}

.risk-column p{
    border-top:1px solid #d7e0ec;
    padding:12px;
    line-height:1.45;
}

.decision-grid{
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    gap:8px;
    margin-top:8px;
}

.decision-grid > div{
    border:1px solid #c5ceda;
    background:#f8fbff;
    padding:12px;
}

.yes{
    color:#2f8c3d;
}

.no{
    color:#d33c3c;
}

.control-box{
    border:3px solid #1f65c8 !important;
    background:#dff0ff !important;
    color:#0d4ba7;
    font-weight:800;
    text-align:center;
}

.final-result{
    margin-top:8px;
    background:#155f25;
    color:white;
    text-align:center;
    padding:13px;
    font-weight:800;
    text-transform:uppercase;
}

#download-pdf-btn:disabled{
    opacity:.45;
    cursor:not-allowed;
    filter:grayscale(35%);
}

@media (max-width: 900px){
    .result-top,
    .factor-grid,
    .risk-table,
    .decision-grid,
    .algorithm-stage{
        grid-template-columns:1fr;
        display:grid;
    }

    .stage-content{
        border-left:2px solid #155f25;
    }

    .algorithm-header h3{
        font-size:18px;
    }
}
.hidden{
    display:none;
}

.result-top{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:24px;
    margin-bottom:28px;
}

#result-status{
    margin-top:8px;
    color:#8495b3;
}

#result-score-box{
    min-width:180px;
    background:#f8fbff;
    border:1px solid #ccd9ed;
    border-radius:16px;
    padding:22px;
    text-align:center;
}

#result-score{
    font-size:38px;
    font-weight:800;
    color:#1f5fd6;
}

.risk-badge{
    display:inline-block;
    padding:14px 20px;
    border-radius:12px;
    background:#eef3fb;
    border:1px solid #ccd9ed;
    color:#61758f;
    font-size:22px;
    font-weight:800;
    margin-bottom:18px;
}

.risk-low{
    background:#eaf7ea;
    border-color:#81c98a;
    color:#217a35;
}

.risk-medium{
    background:#eef5ff;
    border-color:#2f72f5;
    color:#1f5fd6;
}

.risk-high{
    background:#fff0f0;
    border-color:#e06a6a;
    color:#c93434;
}

#risk-probability,
#risk-description{
    margin-top:8px;
    font-size:18px;
    line-height:1.5;
    color:#253f66;
}

.result-comment{
    margin-top:28px;
    padding:24px;
    background:#ffffff;
    border:1px solid #d2deef;
    border-radius:16px;
}

.result-comment h3{
    margin-bottom:14px;
    color:#173f88;
}

.result-comment p{
    color:#253f66;
    line-height:1.6;
}

.result-comment ol{
    margin-top:14px;
    padding-left:22px;
    line-height:1.8;
    color:#253f66;
}

#download-pdf-btn:disabled{
    opacity:.45;
    cursor:not-allowed;
    filter:grayscale(40%);
}
.answer-row{
    transition:
        background-color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.answer-row:has(input:checked){
    background:#eaf3ff;
    border-radius:12px;
    box-shadow:inset 0 0 0 1px #7faef7;
}

.answer-row:has(input:checked) .answer-left span{
    color:#0d4ecf;
    font-weight:700;
}
.result-card-animated{
    animation: resultAppear 1.1s ease;
    animation:
        resultAppear 1s ease,
        resultGlow 1.4s ease;
}

@keyframes resultAppear{

    from{
        opacity:0;
        transform:translateY(30px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }
}
@keyframes resultGlow{

    0%{
        box-shadow:0 0 0 rgba(31,95,214,0);
    }

    50%{
        box-shadow:0 0 40px rgba(31,95,214,.18);
    }

    100%{
        box-shadow:0 12px 30px rgba(38,83,150,.10);
    }
}
.result-complete{
    border:2px solid #2f72f5 !important;
}
.result-actions{
    display:flex;
    align-items:center;
    gap:16px;
}

.reset-test-btn{
    border:1px solid #b8cae8;
    background:#ffffff;
    color:#1f5fd6;
    padding:14px 20px;
    border-radius:12px;
    cursor:pointer;
    font-size:15px;
    font-weight:700;
    transition:
        background-color .18s ease,
        border-color .18s ease,
        transform .18s ease;
}

.reset-test-btn:hover{
    background:#eef5ff;
    border-color:#1f5fd6;
    transform:translateY(-1px);
}

.question-card-wide{
    grid-column:1 / -1;
}

.question-content{
    display:grid;
    grid-template-columns:1fr;
    gap:22px;
}

.question-card-wide .question-content{
    grid-template-columns:1fr 1fr;
    align-items:start;
}

.question-signs{
    background:#eef5ff;
    border:1px solid #b8d0f5;
    border-radius:14px;
    padding:18px 22px;
    color:#173f72;
}

.question-signs h4{
    margin-bottom:12px;
    color:#0d4ecf;
    font-size:16px;
}

.question-signs ul{
    padding-left:20px;
    line-height:1.65;
}

.question-signs li{
    margin-bottom:2px;
}
#pdf-template{
    display:none;
}
.score-line{
    display:flex;
    align-items:baseline;
    gap:10px;
    margin-bottom:14px;
    font-size:15px;
}

.score-line strong{
    font-size:22px;
    color:#1f5fd6;
}
/* MOBILE */

@media (max-width: 900px){

    .container{
        padding:18px;
        border-radius:18px;
    }

    .hero{
        flex-direction:column;
    }

    .hero-left{
        padding:32px 26px;
    }

    .hero-right{
        width:100%;
        min-height:180px;
    }

    #page-title{
        font-size:28px;
    }

    #page-subtitle{
        font-size:18px;
    }

    .info-card{
        flex-direction:column;
    }

    .info-text-card{
        flex-direction:column;
    }

    .legend-card{
        width:100%;
    }

    #questions-grid{
        grid-template-columns:1fr;
    }

    .score-card{
        flex-direction:column;
        align-items:stretch;
    }

    #show-result-btn,
    #total-score-box{
        width:100%;
    }

    #footer-note{
        align-items:flex-start;
    }
    .result-actions{
        width:100%;
        flex-direction:column;
        align-items:stretch;
    }

    .reset-test-btn{
        width:100%;
    }
    .question-card-wide .question-content{
        grid-template-columns:1fr;
    }
}
