/* Shared reference-directory components. Wrap each participating section in .inform-page. */
.inform-page {
    min-width: 0;
    max-width: 100%;
    margin: 0 0 30px;
    color: #253542;
    font-size: 15px;
    line-height: 1.55;
}
.inform-page *, .inform-page *::before, .inform-page *::after { box-sizing: border-box; }
.content .inform-page > h1 {
    margin: 0 0 22px;
    padding: 0;
    color: #253542;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.inform-page a:focus-visible, .inform-page button:focus-visible,
.inform-page [tabindex]:focus-visible { outline: 2px solid #0080c2; outline-offset: 3px; }
.inform-page .inform-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Keep the existing input, button and error IDs used by reference_search.js and the directory search scripts. */
.inform-page #search_rs_form {
    margin: 0 0 20px;
    padding: 22px 24px;
    border: 1px solid #d9e5ed;
    border-top: 3px solid #0080c2;
    border-radius: 8px;
    background: #f3f7fa;
}
.content .inform-page #search_rs_form h1,
.content .inform-page #search_rs_form h2 {
    margin: 0 0 18px;
    padding: 0;
    color: #253542;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.45;
    text-transform: none;
}
.content .inform-page--index #search_rs_form h1 { font-size: 25px; line-height: 1.35; }
.inform-page #search_rs_form .form-group {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin: 0;
}
.inform-page #search_field {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 11px 14px;
    border: 1px solid #bdcedb;
    border-radius: 5px;
    background: #fff;
    color: #253542;
    font-family: inherit;
    font-size: 16px;
    line-height: 22px;
    box-shadow: none;
}
.inform-page #search_field::placeholder { color: #7a8b97; opacity: 1; }
.inform-page #search_field:focus { border-color: #0080c2; outline: 2px solid #c4e3f3; outline-offset: 1px; }
.inform-page #send_search {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 106px;
    height: 46px;
    margin: 0;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: #0080c2;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
}
.inform-page #send_search::before {
    content: '';
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.inform-page #send_search:hover { background: #006da6; opacity: 1; }
.inform-page #send_search:active { background: #005e91; }
.inform-page #search_error_place { margin: 12px 0 0; color: #b23832; font-size: 14px; line-height: 1.5; }
.inform-page .inform-search-hint { margin: 12px 0 0; color: #647985; font-size: 13px; line-height: 1.55; }

.inform-page .rs_search_descr, .inform-page .inform-directory__intro {
    margin: 0 0 16px;
    color: #52636f;
    font-size: 14px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}
.inform-page .inform-intro { margin-bottom: 28px; }
.inform-page .main_okof_urls { margin: 0 0 20px; font-size: 14px; line-height: 1.6; }
.inform-page .inform-back-link { display: inline-flex; align-items: baseline; gap: 8px; max-width: 100%; }
.inform-page .inform-back-link > span { flex: 0 0 auto; font-size: 18px; line-height: 1; }
.inform-page .main_okof_urls a,
.inform-page .rs_search_descr a,
.inform-page .rs_search_to_forum a { text-decoration: none; text-underline-offset: 3px; }
.inform-page .main_okof_urls a:hover,
.inform-page .rs_search_descr a:hover,
.inform-page .rs_search_to_forum a:hover { text-decoration: underline; }
.inform-page .inform-explanation { margin-top: 24px; padding-top: 22px; border-top: 1px solid #e1e9ef; }
.inform-page .inform-forum, .inform-page .rs_search_to_forum { margin: 20px 0; font-size: 14px; line-height: 1.6; }

/* Directory navigation. Full labels and descriptions remain visible. */
.inform-page #rs_also { margin: 26px 0; }
.content .inform-page .inform-directory h2 {
    margin: 0 0 8px;
    padding: 0;
    color: #253542;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: none;
}
.content .inform-page .inform-directory__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 0 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.content .inform-page .inform-directory__list li { min-width: 0; margin: 0; padding: 0; border-bottom: 1px solid #e1e9ef; background: none; }
.content .inform-page .inform-directory__list a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    height: 100%;
    margin: 0;
    padding: 16px 0;
    color: #253542;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
}
.inform-page .inform-directory__number {
    display: flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    height: 32px;
    border: 1px solid #d7e5ef;
    border-radius: 6px;
    background: #f0f6fa;
    color: #37718f;
    font-size: 15px;
    font-weight: 600;
}
.inform-page .inform-directory__text { display: block; min-width: 0; }
.inform-page .inform-directory__text strong { display: block; margin-bottom: 4px; color: #0076b3; font-size: 15px; font-weight: 600; }
.inform-page .inform-directory__text > span { color: #52636f; font-size: 13px; }
.content .inform-page .inform-directory__list a:hover strong { color: #d30000; text-decoration: underline; text-underline-offset: 3px; }
.inform-page .inform-directory__list a[aria-current="page"] .inform-directory__number { border-color: #0080c2; background: #0080c2; color: #fff; }

/* Scroll the tables inside the content column, preserving cells and rowspans. */
.inform-page .inform-table-scroll, .inform-page #rs_table_place {
    max-width: 100%;
    margin: 0 0 24px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}
.inform-page .inform-table-scroll:not(:has(table)), .inform-page #rs_table_place:empty { display: none; }
.inform-page .rs_cnt_res, .kbk-page .ks_cnt_res {
    margin: 0 0 18px;
    padding: 12px 16px;
    border-left: 3px solid #0080c2;
    background: #f0f6fa;
    color: #3c596c;
    font-size: 15px;
    line-height: 1.5;
}
.inform-page .rs_table {
    width: 100%;
    min-width: 580px;
    margin: 0;
    border: 1px solid #dce6ed;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 6px;
    color: #253542;
    font-size: 14px;
    line-height: 1.55;
}
.inform-page #rs_table_place .rs_table { min-width: 620px; margin-bottom: 20px; }
.inform-page .rs_table th, .inform-page .rs_table td {
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid #e1e9ef;
    line-height: 1.55;
    text-align: left;
    vertical-align: top;
}
.inform-page .rs_table th {
    border-bottom-color: #cbdde9;
    background: #edf4f9;
    color: #3d5c71;
    font-size: 13px;
    font-weight: 600;
}
.inform-page .rs_table tr:first-child th:first-child { border-top-left-radius: 5px; }
.inform-page .rs_table tr:first-child th:last-child { border-top-right-radius: 5px; }
.inform-page .rs_table tr:last-child > td { border-bottom: 0; }
.inform-page .rs_table tr:hover > td { background: #f7fafc; }
.inform-page .rs_table .group_separator > td { border-bottom: 2px solid #abc6d8; }
.inform-page .rs_table a { text-decoration: none; text-underline-offset: 3px; }
.inform-page .rs_table a:hover { text-decoration: underline; }
.inform-page .okof_group_table tr > td:first-child { width: 170px; white-space: nowrap; }
.inform-page .okof_group_table th:nth-child(2) { width: 42%; }
.inform-page .okof_classif_content_t { min-width: 620px; }
.inform-page .okof_classif_content_t td:first-child { white-space: nowrap; }
.inform-page .okof_classif_content_t th:nth-child(2) { width: 35%; }
.inform-page .okof_uskor_table { min-width: 560px; table-layout: fixed; font-size: 13px; }
.inform-page .okof_uskor_table .uskor-equipment { width: 26%; }
.inform-page .okof_uskor_table .uskor-description { width: 21%; }
.inform-page .okof_uskor_table .uskor-reference { width: 15%; }
.inform-page .okof_uskor_table .uskor-indicator { width: 23%; }
.inform-page .okof_uskor_table .uskor-value { width: 15%; }
.inform-page .okof_uskor_table th, .inform-page .okof_uskor_table td { padding: 12px 10px; overflow-wrap: anywhere; }
.inform-page .okof_uskor_table th { font-size: 12px; }
.inform-page .okof_uskor_table th + th { border-left: 1px solid #dce6ed; }
.inform-page .okof_uskor_table .uskor-equipment-code { margin-top: 4px; }
.inform-page .rs_table_search a[href*="/okof/"] { white-space: nowrap; }
.inform-page .okof_url { line-height: 1.6; }

/* OKVED: section letters, codes and long explanatory notes. */
.okved-page .inform-directory__list a { align-items: center; }
.okved-page .inform-directory__text strong { margin-bottom: 0; font-weight: 500; }
.okved-page .okved-section-table th:first-child { width: 100px; }
.okved-page .okved-section-table th:nth-child(2) { width: 35%; }
.okved-page .okved-section-table td:first-child { white-space: nowrap; }
.okved-page .okved-section-table .okved-linked-row { cursor: pointer; }
.okved-page .okved-section-table .okved-linked-row:focus-within > td { background: #f0f6fa; }
.okved-page .okved-classifier-note { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid #e1e9ef; }
.okved-page .rs_table a { color: #0080c2; }
.okved-page .rs_table a:hover { color: #d30000; }
.okved-page .okved_table th:first-child { width: 70px; }
.okved-page .okved_table th:nth-child(2) { width: 110px; }
.okved-page .okved_table td:first-child, .okved-page .okved_table td:nth-child(2) { white-space: nowrap; }
.okved-page #rs_table_place .table-wrapper-arrow,
.okpd-page #rs_table_place .table-wrapper-arrow,
.kbk-page #rs_table_place .table-wrapper-arrow {
    display: block; position: static; width: auto; height: auto; margin: 0 0 8px; padding: 0;
    background: none; color: #647985; font-size: 18px; line-height: 1; text-align: left;
}

/* OKPD: section navigation and full product codes. */
.okpd-page .inform-directory__list a { align-items: center; }
.okpd-page .inform-directory__text strong { margin-bottom: 0; font-weight: 500; }
.okpd-page .okpd-section-table th:first-child { width: 140px; }
.okpd-page .okpd-section-table th:nth-child(2) { width: 40%; }
.okpd-page .okpd-section-table td:first-child { white-space: nowrap; }
.okpd-page .okpd-section-table .okpd-linked-row { cursor: pointer; }
.okpd-page .okpd-section-table .okpd-linked-row:focus-within > td { background: #f0f6fa; }
.okpd-page .okpd-classifier-note { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid #e1e9ef; }
.okpd-page .rs_table a { color: #0080c2; }
.okpd-page .rs_table a:hover { color: #d30000; }
.okpd-page .okpd-search-table th:first-child { width: 70px; }
.okpd-page .okpd-search-table th:nth-child(2) { width: 140px; }
.okpd-page .okpd-search-table td:first-child,
.okpd-page .okpd-search-table td:nth-child(2) { white-space: nowrap; }

/* KBK: keep the complete payment code together and retain the parent/leaf distinction. */
.kbk-page .kbk-search-label { margin: -6px 0 16px; color: #52636f; font-size: 15px; line-height: 1.5; }
.kbk-page .rs_table th:first-child, .kbk-page .rs_table td:first-child { width: 1%; }
.kbk-page .rs_table td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.kbk-page .rs_table a { color: #0080c2; }
.kbk-page .rs_table a:hover { color: #d30000; }
.kbk-page .rs_table .kbk-parent-code { color: #738795; }
.kbk-page .rs_table a.kbk-parent-code:hover { color: #d30000; }
.kbk-page .kbk-classifier-note { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid #e1e9ef; }

@media (max-width: 600px) {
    .content .inform-page > h1 { font-size: 22px; }
    .inform-page #search_rs_form { padding: 18px 16px; }
    .content .inform-page--index #search_rs_form h1 { font-size: 22px; }
    .content .inform-page #search_rs_form h2 { font-size: 17px; }
    .inform-page #search_rs_form .form-group { flex-wrap: wrap; }
    .inform-page #search_field { flex-basis: 100%; }
    .inform-page #send_search { width: 100%; }
    .content .inform-page .inform-directory__list { grid-template-columns: minmax(0, 1fr); }
    .inform-page .rs_table th, .inform-page .rs_table td { padding: 12px; }
    .inform-page .okof_uskor_table { min-width: 620px; }
}
@media print {
    .inform-page #search_rs_form { display: none; }
    .inform-page .inform-table-scroll, .inform-page #rs_table_place { overflow: visible; }
    .inform-page .rs_table, .inform-page #rs_table_place .rs_table { min-width: 0; font-size: 10px; }
    .inform-page .rs_table th, .inform-page .rs_table td { padding: 6px; }
    .inform-page .rs_table td { white-space: normal !important; }
}
