*{box-sizing:border-box}

:root{
    --primary:#0c1a31;
    --secondary:#95969b;
    --page:#e3e8f0;
    --panel:#f7f8fa;
    --card:#fff;
    --border:#edf0f4;
    --button:#f4f6fb;
    --button-border:#dfe4ee;
    --button-text:#2f70df;
}

html{scroll-behavior:smooth}

body{
    margin:0;
    min-height:100vh;
    background:var(--page);
    color:var(--primary);
    font-family:Inter,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    -webkit-font-smoothing:antialiased;
}

.portal{
    width:min(calc(100% - 40px),1080px);
    margin:42px auto;
    padding:20px 22px 28px;
    background:var(--panel);
    border:1px solid rgba(255,255,255,.75);
    border-radius:20px;
    box-shadow:0 14px 35px rgba(12,26,49,.07);
}

.portal-header{padding:0 2px 28px}

.portal-header-content{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:24px;
}

.portal-header-text{
    min-width:0;
}

.statistics-link{
    flex:0 0 auto;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:38px;
    padding:7px 14px;

    color:var(--button-text);
    background:var(--button);
    border:1px solid var(--button-border);
    border-radius:6px;

    font-size:14px;
    line-height:1;
    font-weight:600;
    text-decoration:none;

    transition:
        background-color 150ms ease,
        border-color 150ms ease,
        color 150ms ease,
        transform 150ms ease;
}

.statistics-link:hover{
    color:#245fca;
    background:#e9eef8;
    border-color:#d3dbea;
}

.statistics-link:active{
    transform:translateY(1px);
}

.statistics-link:focus-visible{
    outline:3px solid rgba(47,112,223,.20);
    outline-offset:2px;
}

.statistics-link-icon{
    font-size:16px;
    line-height:1;
}

.portal-header h1{
    margin:0;
    color:var(--primary);
    font-size:clamp(30px,3.2vw,38px);
    line-height:1.05;
    font-weight:800;
    letter-spacing:-1.25px;
}

.portal-header p{
    margin:4px 0 0;
    color:var(--secondary);
    font-size:18px;
    line-height:1.2;
    font-weight:600;
}

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

.service-card{
    min-width:0;
    min-height:224px;
    padding:28px 22px 20px;
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:14px;
    box-shadow:0 5px 16px rgba(12,26,49,.055);
    transition:transform 160ms ease,box-shadow 160ms ease,border-color 160ms ease;
}

.service-card:hover{
    transform:translateY(-2px);
    border-color:#e4e8ef;
    box-shadow:0 9px 22px rgba(12,26,49,.08);
}

.service-content{width:100%}

.service-title{
    margin:0;
    color:var(--primary);
    font-size:20px;
    line-height:1.25;
    font-weight:750;
    letter-spacing:-.35px;
}

.service-description{
    max-width:285px;
    margin:12px auto 0;
    color:var(--secondary);
    font-size:14px;
    line-height:1.35;
    font-weight:450;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.service-action{
    width:100%;
    margin-top:auto;
    padding-top:28px;
}

.service-button{
    width:min(100%,152px);
    min-height:34px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:5px 18px;
    color:var(--button-text);
    background:var(--button);
    border:1px solid var(--button-border);
    border-radius:4px;
    font-size:18px;
    line-height:1;
    font-weight:400;
    text-decoration:none;
    transition:background-color 150ms ease,border-color 150ms ease,color 150ms ease,transform 150ms ease;
}

.service-button:hover{
    color:#245fca;
    background:#e9eef8;
    border-color:#d3dbea;
}

.service-button:active{transform:translateY(1px)}

.service-button:focus-visible{
    outline:3px solid rgba(47,112,223,.20);
    outline-offset:2px;
}

.service-button-disabled{
    color:#b2b4b9;
    background:#f7f7f8;
    border-color:#e8e9ec;
    cursor:not-allowed;
}

.service-empty{
    grid-column:1/-1;
    padding:48px 20px;
    color:var(--secondary);
    text-align:center;
    font-size:15px;
}

@media(max-width:900px){
    .portal{width:min(calc(100% - 28px),720px);margin:28px auto}
    .service-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:560px){
    .portal{
        width:calc(100% - 20px);
        margin:10px auto;
        padding:18px 12px 20px;
        border-radius:16px;
    }

    .portal-header{padding:2px 4px 22px}
    .portal-header h1{font-size:30px}
    .portal-header p{font-size:16px}

    .service-grid{
        grid-template-columns:1fr;
        gap:14px;
    }

    .service-card{
        min-height:210px;
        padding:25px 20px 19px;
    }
    .portal-header-content{
        align-items:flex-start;
        gap:14px;
    }
    
    .statistics-link{
        min-height:34px;
        padding:6px 10px;
        font-size:13px;
    }
    
    .statistics-link-icon{
        font-size:15px;
    }
}

@media(max-width:360px){
    .statistics-link{
        padding:6px 9px;
        font-size:12px;
    }

    .statistics-link-icon{
        display:none;
    }
}

@media(prefers-reduced-motion:reduce){
    *,*::before,*::after{
        scroll-behavior:auto!important;
        transition:none!important;
    }
}
