:root {
    color-scheme: light;
    --brand-orange: #FF6B35;
    --brand-peach: #F7C59F;
    --brand-beige: #EFEFD0;
    --brand-navy: #004E89;
    --brand-blue: #1A659E;
    --navy: var(--brand-navy);
    --blue: var(--brand-blue);
    --blue-dark: var(--brand-navy);
    --ink: #173243;
    --muted: #5d707c;
    --line: #d5e0e7;
    --soft-line: #e7edf1;
    --background: #f7f9fa;
    --surface: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 0;
    margin: 0;
    background: var(--background);
    color: var(--ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

[hidden] {
    display: none !important;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.public-hero-area {
    position: relative;
    isolation: isolate;
    background-color: #004E89;
    background-image: url("https://storage.yandexcloud.net/mcv26/price_bg.webp");
    background-position: right center;
    background-repeat: no-repeat;
    background-size: auto 100%;
}

.public-hero-area::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: rgb(0 48 86 / 68%);
    content: "";
}

.public-header {
    position: relative;
    z-index: 1;
    border-bottom: 0;
    background: transparent;
}

.header-inner {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 19px;
    font-weight: 750;
    text-decoration: none;
}

.public-logo { display: block; width: 190px; max-width: 52vw; height: auto; }

.hero {
    position: relative;
    z-index: 1;
    padding: 30px 0;
    border-bottom: 0;
    background: transparent;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 760px;
    margin-bottom: 12px;
    color: #fff;
    font-size: clamp(34px, 7vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.intro {
    max-width: 680px;
    margin-bottom: 14px;
    color: rgb(255 255 255 / 88%);
    font-size: 18px;
}

.hero-home-link:link,
.hero-home-link:visited,
.price-home-link:link,
.price-home-link:visited {
    font-size: 14px;
    text-decoration: none;
}

.hero-home-link:link,
.hero-home-link:visited {
    display: inline-block;
    margin-top: 10px;
    color: rgb(255 255 255 / 92%);
}

.hero-home-link:hover,
.hero-home-link:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.price-home-link:link,
.price-home-link:visited {
    display: block;
    margin-top: 14px;
    color: var(--blue);
    text-align: right;
}

.price-home-link:hover,
.price-home-link:focus-visible {
    color: var(--brand-orange);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.price-content {
    padding-top: 34px;
    padding-bottom: 64px;
    scroll-margin-top: 12px;
}

.price-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
    gap: 24px;
    align-items: start;
}

.price-main {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

.search-panel,
.section-nav,
.price-section {
    border: 1px solid var(--line);
    background: var(--surface);
}

.search-panel {
    position: sticky;
    z-index: 10;
    top: 12px;
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto auto;
    grid-template-areas:
        "label input status back"
        ". no-results no-results no-results";
    gap: 0 14px;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 14px;
    border-color: rgb(0 78 137 / 28%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgb(0 78 137 / 8%);
}

.search-panel label {
    grid-area: label;
    color: var(--navy);
    font-weight: 700;
    white-space: nowrap;
}

.search-panel input {
    grid-area: input;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #91a9b8;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.search-panel input:hover {
    border-color: var(--brand-blue);
}

.search-status,
.no-results {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.search-status {
    grid-area: status;
    white-space: nowrap;
}

.back-to-tools {
    grid-area: back;
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 7px 11px;
    border: 1px solid var(--brand-navy);
    border-radius: 7px;
    background: var(--brand-navy);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.back-to-tools:hover {
    border-color: var(--brand-blue);
    background: var(--brand-blue);
}

.no-results {
    grid-area: no-results;
    padding-top: 10px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 650;
}

.section-nav {
    position: sticky;
    z-index: 5;
    grid-column: 2;
    grid-row: 1;
    top: 12px;
    max-height: calc(100vh - 24px);
    margin-bottom: 0;
    padding: 12px;
    overflow-y: auto;
    border-radius: 8px;
}

.section-nav h2 {
    margin-bottom: 9px;
    color: var(--navy);
    font-size: 16px;
}

.section-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.section-nav a {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    max-width: 100%;
    padding: 3px 6px;
    border: 0;
    border-radius: 5px;
    background: #f9f8e1;
    color: #173243;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.section-nav a:link,
.section-nav a:visited,
.section-nav a:hover,
.section-nav a:focus-visible {
    border: 0;
    outline: 0;
    background: #f9f8e1;
    color: var(--brand-blue);
}

.section-nav a.is-active,
.section-nav a.is-active:hover,
.section-nav a.is-active:focus-visible,
.section-nav a[aria-current="location"],
.section-nav a[aria-current="location"]:hover,
.section-nav a[aria-current="location"]:focus-visible {
    border: 0;
    outline: 0;
    background: #ffd3b2;
    color: #173243;
}

.price-section {
    margin-bottom: 24px;
    overflow: hidden;
    border-radius: 8px;
    scroll-margin-top: 92px;
}

.price-section > h2 {
    margin: 0;
    padding: 20px 22px;
    border-bottom: 1px solid rgb(255 255 255 / 22%);
    background: #004E89;
    color: #FFFFFF;
    font-size: clamp(18px, 2.5vw, 23px);
    font-weight: 750;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.service-columns,
.service-row {
    display: grid;
    grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) minmax(100px, 125px);
    gap: 20px;
}

.service-columns {
    padding: 10px 22px;
    border-bottom: 1px solid var(--line);
    background: rgb(239 239 208 / 38%);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.service-columns span:last-child {
    text-align: right;
}

.service-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-row {
    align-items: start;
    padding: 16px 22px;
    border-bottom: 1px solid var(--soft-line);
    transition: background-color 140ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .service-row:hover { background: rgb(0 78 137 / 4%); }
}

.service-row:last-child {
    border-bottom: 0;
}

.service-code {
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 14px;
}

.service-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.service-price {
    white-space: nowrap;
    text-align: right;
    color: var(--navy);
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

a:focus-visible,
input:focus-visible {
    outline: 3px solid var(--brand-orange);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-row { transition: none; }
}

.public-footer {
    padding: 28px 0;
    border-top: 1px solid var(--line);
    background: #004e87;
    color: rgb(255 255 255 / 90%);
    font-size: 14px;
}

.public-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.public-footer-inner p { margin: 0; }
.footer-price-source { overflow-wrap: anywhere; }
.admin-service-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 6px;
    color: rgb(255 255 255 / 72%);
    opacity: 0.72;
}
.admin-service-link:hover { background: rgb(255 255 255 / 12%); color: #fff; opacity: 1; }
.admin-service-link:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 2px; opacity: 1; }

.public-footer p {
    margin: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.error-shell {
    width: min(680px, calc(100% - 40px));
    margin: 15vh auto 0;
    padding: 32px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.error-shell h1 {
    font-size: clamp(28px, 6vw, 42px);
}

.error-shell p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

.empty-price-message {
    margin: 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    font-size: 18px;
    text-align: center;
}

@media (max-width: 680px) {
    .container {
        width: min(100% - 24px, 1120px);
    }

    .header-inner {
        min-height: 64px;
    }

    .hero {
        padding: 30px 0;
    }

    .price-content {
        padding-top: 22px;
    }

    .search-panel {
        position: static;
        display: block;
        box-shadow: none;
    }

    .back-to-tools {
        display: inline-flex;
        margin-top: 10px;
    }

    .search-panel label {
        display: block;
        margin-bottom: 8px;
    }

    .search-panel,
    .section-nav {
        padding: 17px;
    }

    .search-status,
    .no-results {
        margin-top: 10px;
    }

    .public-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .service-columns {
        display: none;
    }

    .service-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 14px;
        padding: 16px 17px;
    }

    .service-code {
        grid-column: 1;
        grid-row: 1;
    }

    .service-name {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .service-price {
        grid-column: 2;
        grid-row: 1;
    }

    .price-section > h2 {
        padding: 17px;
    }

    .price-section {
        scroll-margin-top: 16px;
    }
}

@media (max-width: 900px) {
    .price-layout {
        display: block;
    }

    .section-nav {
        position: static;
        max-height: none;
        margin-bottom: 20px;
        overflow: visible;
    }

    .section-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
}
