body:has(.tobolsk-header), body > .body:has(.tobolsk-header) {
    background: #edf2f5;
}

.tobolsk-header {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #172f4a;
    color: #fff;
    font: 14px/1.35 "Segoe UI", Arial, sans-serif;
}

.tobolsk-scene { position: relative; }
.tobolsk-image { display: block; width: 100%; aspect-ratio: 3 / 1; background: center / cover no-repeat; }
.tobolsk-image.scene-base { background-image: url("../images/kremlin-winter-dark.png"); }
.tobolsk-image.scene-lit { background-image: url("../images/kremlin-winter-lit.png"); }
.tobolsk-summer .tobolsk-image.scene-base { background-image: url("../images/kremlin-summer-dark.png"); }
.tobolsk-summer .tobolsk-image.scene-lit { background-image: url("../images/kremlin-summer-lit.png"); }
.tobolsk-summer .pole-snow { display: none; }
.tobolsk-image.scene-lit { position: absolute; inset: 0; opacity: 0; transition: opacity .32s ease; }
.tobolsk-header:has(#tobolsk-lights:checked) .scene-lit { opacity: 1; }

.tobolsk-bar {
    position: absolute;
    z-index: 1;
    inset: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto auto auto;
    align-items: center;
    gap: 16px;
    padding: 9px 16px 21px;
    background: linear-gradient(180deg, #081729c9, #08172982 63%, transparent);
}

.tobolsk-bar .mast-brand { width: fit-content; padding: 2px 6px; }
.tobolsk-bar .mast-brand img { display: block; width: 175px; max-width: 100%; height: auto; }
.tobolsk-bar a { color: inherit; text-decoration: none; white-space: nowrap; }
.tobolsk-bar a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tobolsk-office, .tobolsk-phones { display: grid; gap: 2px; }
.tobolsk-office a { font-size: 19px; font-weight: 700; }
.tobolsk-office span, .tobolsk-phones { font-size: 12px; }

.light-switch { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 6px; cursor: pointer; }
.light-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { position: relative; width: 34px; height: 20px; flex: none; border-radius: 20px; background: #607c91; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.light-switch input:checked + .switch-track { background: #955008; }
.light-switch input:checked + .switch-track::after { transform: translateX(14px); }
.light-switch input:focus-visible + .switch-track, .tobolsk-bar a:focus-visible { outline: 2px solid #ffd597; outline-offset: 3px; }

.winter-power-pole { position: absolute; bottom: -1.5%; left: 14%; width: 11.5%; height: auto; opacity: .94; pointer-events: none; }
.winter-wires { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .8; pointer-events: none; }
.pole-snow { position: absolute; left: 18.3%; bottom: -1.7%; width: 3%; height: 4%; border-radius: 50%; background: radial-gradient(ellipse at 50% 67%, #9fafcd 0%, #97a9c7 25%, #8396b700 72%); pointer-events: none; }

.tobolsk-header + .top-menu-block { margin-top: 0; }
.tobolsk-header ~ .content > .right-col:has(> .calc-button-container) { margin-top: -10px; }
.tobolsk-account { clear: both; padding: 6px 16px; }
.tobolsk-account .avtorization { position: static; float: none; width: auto; }

@media (max-width: 680px) {
    .tobolsk-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px 10px; }
    .tobolsk-bar .mast-brand img { width: 135px; }
    .tobolsk-office a { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .tobolsk-header .scene-lit, .tobolsk-header .switch-track::after { transition: none; }
}

/* Desktop layout at the approved width. */
@media (min-width:1000px) {
    body:has(.tobolsk-header) > .body > .main {
        width:min(1160px, calc(100vw - 48px));
        min-width:0;
        max-width:none;
        margin-inline:auto;
    }
    body:has(.tobolsk-header) .main > .content,
    body:has(.tobolsk-header) .main > .top-menu-block,
    body:has(.tobolsk-header) .main > .content > .right-col {
        box-sizing:border-box;
        width:100%;
        min-width:0;
        max-width:none;
    }
    body:has(.tobolsk-header) .top-menu-block {
        position:relative;
        z-index:5;
        height:auto;
        padding:0;
        overflow:visible;
        border-radius:9px;
        background:linear-gradient(180deg,#2c9de6,#075c9f);
    }
    body:has(.tobolsk-header) .top-menu-block > ul {
        display:grid;
        grid-template-columns:repeat(8,minmax(0,1fr));
        gap:5px;
        width:auto;
        height:auto;
        margin:0;
        padding:5px;
        list-style:none;
        background:none;
    }
    body:has(.tobolsk-header) .top-menu-block > ul > li {
        position:relative;
        float:none;
        width:auto;
        min-width:0;
        height:auto;
        margin:0;
        padding:0;
        background:none;
    }
    body:has(.tobolsk-header) .top-menu-block > ul > li > .menu-link {
        box-sizing:border-box;
        display:flex;
        align-items:center;
        justify-content:center;
        gap:5px;
        width:100%;
        height:auto;
        min-height:40px;
        margin:0;
        padding:8px;
        border:0;
        border-radius:5px;
        background:transparent;
        color:#fff;
        font:500 15px/1.2 "Segoe UI",Arial,sans-serif;
        text-align:center;
        white-space:nowrap;
        text-decoration:none;
    }

    body:has(.tobolsk-header) .top-menu-block > ul > li::before,
    body:has(.tobolsk-header) .top-menu-block > ul > li::after,
    body:has(.tobolsk-header) .top-menu-block .menu-link::before,
    body:has(.tobolsk-header) .top-menu-block .menu-link::after { content:none; }
    body:has(.tobolsk-header) .top-menu-block > ul > li:hover > .menu-link,
    body:has(.tobolsk-header) .top-menu-block > ul > li:focus-within > .menu-link {
        background:rgba(255,255,255,.13);
    }
    body:has(.tobolsk-header) .top-menu-block,
    body:has(.tobolsk-header) .top-menu-block > ul,
    body:has(.tobolsk-header) .top-menu-block > ul > li,
    body:has(.tobolsk-header) .top-menu-block > ul > li > .menu-link {
        box-shadow:none;
        text-shadow:none;
    }
    body:has(.tobolsk-header) .top-menu-block .menu-link:focus-visible {
        outline:2px solid #fff;
        outline-offset:-4px;
    }
    body:has(.tobolsk-header) .top-menu-block .menu-link > i {
        position:static;
        display:block;
        width:0;
        height:0;
        margin:2px 0 0;
        border:4px solid transparent;
        border-bottom:0;
        border-top-color:currentColor;
        background:none;
    }
    body:has(.tobolsk-header) .top-menu-block .hidden-menu-block {
        display:none;
        position:absolute;
        inset:100% auto auto 0;
        width:280px;
        margin:0;
        padding:0;
        border-radius:0 0 8px 8px;
        background:#fff;
        box-shadow:0 6px 20px #16354c32;
        text-align:left;
        z-index:6;
    }
    body:has(.tobolsk-header) .top-menu-block li:hover > .hidden-menu-block,
    body:has(.tobolsk-header) .top-menu-block li:focus-within > .hidden-menu-block { display:block; }
    body:has(.tobolsk-header) .top-menu-block .hidden-menu-block > div { border:0 !important; }
    body:has(.tobolsk-header) .top-menu-block .hidden-menu-link {
        display:block;
        padding:7px 8px;
        color:#173a53;
        line-height:1.35;
    }
    body:has(.tobolsk-header) .tobolsk-bar { padding-inline:24px; }
    body:has(.tobolsk-header) .right-col:has(> .calc-button-container) .item:has(> .item-content > .video-news) > .item-title,
    body:has(.tobolsk-header) .right-col:has(> .calc-button-container) .item-content:has(> .video-news) {
        width:min(100%, 980px);
        margin-inline:auto;
    }
    body:has(.tobolsk-header) .right-col:has(> .calc-button-container) .item-content:has(> .video-news) {
        display:grid;
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:18px 22px;
        padding-bottom:20px;
    }
    body:has(.tobolsk-header) .right-col:has(> .calc-button-container) .item-content:has(> .video-news) > div[style*="clear:"] { display:none; }
    body:has(.tobolsk-header) .right-col:has(> .calc-button-container) .video-news {
        float:none;
        box-sizing:border-box;
        width:100%;
        height:auto;
        aspect-ratio:214 / 146;
        margin:0;
        padding:0;
    }
    body:has(.tobolsk-header) .right-col:has(> .calc-button-container) .video-news-image,
    body:has(.tobolsk-header) .right-col:has(> .calc-button-container) .video-news-image a,
    body:has(.tobolsk-header) .right-col:has(> .calc-button-container) .video-news-image img {
        display:block;
        width:100%;
        height:100%;
    }
    body:has(.tobolsk-header) .right-col:has(> .calc-button-container) .video-news-image img { object-fit:cover; }
    body:has(.tobolsk-header) .right-col:has(> .calc-button-container) .video-back,
    body:has(.tobolsk-header) .right-col:has(> .calc-button-container) .video-title {
        inset:0;
        width:100%;
        height:100%;
    }
}

.right-col h1.proton-services-heading,
.proton-service-header > h1 {
    text-align: center;
}

.right-col .proton-news-label {
    margin: 0 0 4px;
    color: #85909b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 1px;
    text-align: center;
}

.right-col h1.proton-news-title {
    text-align: center;
}

.proton-service-header:has(> .proton-news-title) {
    padding-bottom: 10px;
}

.proton-service-header > h1.proton-news-title {
    margin-block: 0;
}

.right-col img.proton-news-cover {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
    margin-inline: auto;
    border-radius: 8px;
}
