html {
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    background: #fff;
    color: #111;
    font: 17px/1.8 "Rubik", "Segoe UI", Arial, Helvetica, sans-serif;
}

a {
    color: #000;
}

a:hover,
a:focus {
    text-decoration-thickness: 2px;
}

code,
pre {
    font-family: "Courier New", Courier, monospace;
}

/* Pełny tekst pozycji wykazu - odwzorowanie konspektu w czcionce strony,
   z zawijaniem wierszy i wcięciem zależnym od poziomu (data-lvl). */
.wykaz {
    margin: 16px 0;
    border-left: 3px solid #c3ccd6;
    background: #f7f9fb;
    border-radius: 0 4px 4px 0;
    padding: 8px 16px 8px 4px;
    font-size: 0.95rem;
}

.wykaz__i {
    padding: 1px 0 1px calc(var(--wykaz-wciecie, 0) * 1.5em + 1.4em);
    text-indent: -1.4em;
    line-height: 1.5;
}

.wykaz__i--nota {
    color: #5a6672;
    font-style: italic;
}

.wykaz__i[data-lvl="0"] { --wykaz-wciecie: 0; font-weight: 600; text-indent: 0; padding-left: 0; }
.wykaz__i[data-lvl="1"] { --wykaz-wciecie: 1; }
.wykaz__i[data-lvl="2"] { --wykaz-wciecie: 2; }
.wykaz__i[data-lvl="3"] { --wykaz-wciecie: 3; }
.wykaz__i[data-lvl="4"] { --wykaz-wciecie: 4; }
.wykaz__i[data-lvl="5"] { --wykaz-wciecie: 5; }
.wykaz__i[data-lvl="6"] { --wykaz-wciecie: 6; }
.wykaz__i[data-lvl="7"] { --wykaz-wciecie: 7; }
.wykaz__i[data-lvl="8"] { --wykaz-wciecie: 8; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid #d6dce3;
    background: #fff;
}

.site-header__inner {
    max-width: 1380px;
    margin: 0 auto;
    padding: 20px 28px 16px;
}

.site-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 18px;
}

.site-brand__main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-brand__logo-link {
    display: inline-flex;
    flex: 0 0 auto;
}

.site-brand__logo {
    display: block;
    width: auto;
    height: 44px;
}

.site-title {
    display: inline-block;
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #003C7E;
    text-decoration: none;
}

.site-tagline {
    margin: 8px 0 0;
    max-width: 760px;
    color: #56606b;
}

.top-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px 12px;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #edf1f4;
}

.top-nav-toggle,
.nav-group__toggle {
    display: none;
    border: 0;
    background: transparent;
    color: #4b5561;
    font: inherit;
    cursor: pointer;
}

.top-nav-toggle {
    margin: 0;
    padding: 10px 0 2px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.top-nav > a,
.nav-group__link,
.nav-group__menu a {
    padding: 8px 0;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #4b5561;
    white-space: nowrap;
}

.top-nav > a:hover,
.top-nav > a:focus,
.nav-group__link:hover,
.nav-group__link:focus,
.nav-group__menu a:hover,
.nav-group__menu a:focus {
    color: #111;
}

.top-nav > a.active {
    color: #111;
    font-weight: 700;
}

.nav-group {
    position: relative;
}

.nav-group__header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-group__link {
    display: inline-block;
}

.nav-group__link--label {
    cursor: default;
}

.nav-group__toggle {
    position: relative;
    width: 24px;
    height: 24px;
    padding: 0;
    flex: 0 0 auto;
}

.nav-group__toggle:before,
.nav-group__toggle:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 2px;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.nav-group__toggle:after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.nav-group__toggle[aria-expanded="true"]:after {
    display: none;
}

.nav-group__toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.nav-group.active .nav-group__link {
    color: #111;
    font-weight: 700;
}

.nav-group__menu {
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 580.125px;
    max-width: min(88vw, 1037.4px);
    display: none;
    padding: 14px 18px;
    border: 1px solid #d6dce3;
    background: #fff;
    box-shadow: 0 20px 40px rgba(17, 17, 17, 0.08);
}

.nav-group--section .nav-group__menu {
    min-width: 464.1px;
    max-width: 518.7px;
    padding: 10px 14px;
}

.nav-group__menu a {
    display: block;
    padding: 8px 0;
    white-space: normal;
    line-height: 1.45;
}

.nav-group__menu a.active {
    color: #111;
    font-weight: 700;
}

.nav-group:hover .nav-group__menu,
.nav-group:focus-within .nav-group__menu {
    display: block;
}

.nav-subgroup {
    position: relative;
}

.nav-subgroup + .nav-subgroup {
    border-top: 1px solid #edf1f4;
}

.nav-subgroup__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #111;
}

.nav-subgroup__arrow {
    flex: 0 0 auto;
    color: #7b8794;
    font-size: 1rem;
    line-height: 1;
}

.nav-subgroup__menu {
    position: absolute;
    left: calc(100% - 1px);
    top: var(--nav-subgroup-menu-top, -11px);
    min-width: 485.1px;
    max-width: min(50vw, 646.8px);
    display: none;
    padding: 14px 18px;
    border: 1px solid #d6dce3;
    background: #fff;
    box-shadow: 0 20px 40px rgba(17, 17, 17, 0.08);
}

.nav-subgroup:hover .nav-subgroup__menu,
.nav-subgroup:focus-within .nav-subgroup__menu {
    display: block;
}

.nav-subgroup:hover .nav-subgroup__link,
.nav-subgroup:focus-within .nav-subgroup__link,
.nav-subgroup__link.active {
    background: #f7f9fb;
}

.nav-subgroup__menu a {
    padding: 8px 0;
}

@media (min-width: 901px) {
    .nav-subgroup--open-left .nav-subgroup__menu {
        right: calc(100% + 9px);
        left: auto;
    }

    .nav-subgroup--open-left .nav-subgroup__arrow {
        transform: rotate(180deg);
    }
}

.layout {
    max-width: 980px;
    margin: 0 auto;
    padding: 42px 28px 72px;
}

.article h1,
.footnotes h2 {
    margin-top: 0;
}

.article-meta {
    display: block;
    color: #69727d;
    font-size: 0.92rem;
}

.article-summary {
    max-width: 760px;
    margin: 0;
    color: #37414a;
    font-size: 1.08rem;
    line-height: 1.7;
}

.article {
    width: 100%;
}

.article-header {
    margin-bottom: 34px;
}

.article-header h1 {
    margin-bottom: 10px;
    font-size: clamp(2.3rem, 5vw, 4.25rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
    font-weight: 700;
}

.article-header--group h1 {
    margin-bottom: 14px;
}

.article-body {
    font-size: 1.04rem;
    color: #1e252c;
}

.article-body--homepage h1:first-child,
.article-body--homepage h2:first-child {
    margin-top: 0;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
    margin: 52px 0 18px;
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: 700;
}

.article-body h2 {
    font-size: 2rem;
}

.article-body h3 {
    font-size: 1.45rem;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body pre,
.article-body blockquote,
.article-body table {
    margin: 0 0 22px;
}

.article-body img {
    max-width: 100%;
    height: auto;
}

.article-body figure {
    margin: 32px 0 26px;
}

/* Ilustracja wiodąca artykułu - pełny rozmiar, ograniczony do 90% szerokości
   treści; obraz nie jest rozciągany ponad rozmiar naturalny. */
.article-body figure.article-figure--lead {
    display: block;
    margin: 0 auto 26px;
    max-width: 90%;
    text-align: center;
}

.article-body figure.article-figure--lead img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.article-body figure.article-figure--float-right {
    display: block;
    float: right;
    width: 40%;
    max-width: 400px;
    margin: 0 0 22px 24px;
}

.article-body figure.article-figure--float-right.article-figure--float-right-max-300 {
    max-width: 300px;
}

.article-body figure.article-figure--float-right img {
    display: block;
    width: 100%;
}

.article-body figure.article-figure--full {
    display: block;
    width: 100%;
    margin: 28px 0 26px;
}

.article-body figure.article-figure--full img {
    display: block;
    width: 100%;
}

.article-body figcaption {
    margin-top: 10px;
    color: #5b6570;
    font-size: 0.95rem;
    line-height: 1.6;
}

.article-embed {
    margin: 32px 0 26px;
}

.article-embed--video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #111;
}

.article-embed--video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.article-body table {
    border-collapse: collapse;
    width: 100%;
}

.article-body th,
.article-body td {
    border: 1px solid #000;
    padding: 8px;
    text-align: left;
    /* dlugie wartosci bez spacji (np. zapis SMILES, nazwy IUPAC) maja sie
       zawijac wewnatrz komorki, a nie rozpychac tabeli poza ekran */
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* zapis SMILES i inne dlugie ciagi w monospace - lamanie w dowolnym miejscu */
.article-body td code,
.article-body th code {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
}

.article-body blockquote {
    margin: 0;
    margin-bottom: 22px;
    padding: 2px 0 2px 18px;
    border-left: 4px solid #111;
    color: #37414a;
}

.article-body hr {
    border: 0;
    border-top: 1px solid #d6dce3;
    margin: 36px 0;
}

.article-body a {
    text-underline-offset: 0.16em;
}

.article-body sup a {
    color: #ffaa17;
    text-decoration: none;
}

.article-body sup {
    margin-left: 0.08em;
    font-size: 0.72em;
    line-height: 0;
    vertical-align: super;
}

.article-body sup.footnote-separator {
    margin-left: 0.04em;
    margin-right: 0.04em;
    color: #111;
}

.article-deferred {
    margin: 0 0 22px;
    padding: 16px 18px;
    border: 1px solid #e6d58a;
    border-left: 5px solid #d0aa1b;
    background: #fff7bf;
    border-radius: 6px;
}

.article-deferred > *:last-child {
    margin-bottom: 0;
}

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

.group-article-section {
    margin-bottom: 42px;
}

.group-article-section:last-child {
    margin-bottom: 0;
}

.group-article-section__description {
    max-width: 760px;
    margin: -6px 0 22px;
    color: #4b5561;
}

.group-article-list li {
    padding: 0 0 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid #d6dce3;
}

.group-article-list li:last-child {
    margin-bottom: 0;
}

.group-article-list a {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 1.05rem;
    font-weight: 700;
}

.group-article-list p {
    margin: 0;
    color: #4b5561;
}

.footnotes {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #d6dce3;
}

.footnotes ol {
    padding-left: 22px;
}

.footnotes li {
    margin-bottom: 14px;
}

.footnote-backref {
    color: #ffaa17;
    text-decoration: none;
}

.site-footer {
    border-top: 1px solid #d6dce3;
    background: #fff;
}

.site-footer__inner {
    max-width: 1380px;
    margin: 0 auto;
    padding: 32px 28px 38px;
}

.site-footer__logos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px 40px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.site-footer__logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.site-footer__logo {
    display: block;
    max-width: 100%;
    height: 28px;
    width: auto;
}

.site-footer__logo--polskiatom {
    height: 40px;
}

@media (max-width: 900px) {
    .site-header__inner {
        padding: 18px 18px 14px;
    }

    .layout {
        padding: 28px 18px 56px;
    }

    .top-nav-toggle {
        display: inline-flex;
        align-items: center;
    }

    .top-nav {
        display: none;
        padding-top: 16px;
        margin-top: 14px;
    }

    .top-nav.is-open {
        display: block;
    }

    .top-nav > a,
    .nav-group__link {
        display: block;
    }

    .nav-group {
        padding-bottom: 4px;
    }

    .nav-group__header {
        justify-content: space-between;
        gap: 12px;
    }

    .nav-group__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-group__menu {
        position: static;
        display: none;
        min-width: 0;
        max-width: none;
        padding: 2px 0 10px 14px;
        border: 0;
        box-shadow: none;
    }

    .nav-group--section .nav-group__menu {
        min-width: 0;
        max-width: none;
        padding: 2px 0 10px 14px;
    }

    .nav-group__header + .nav-group__menu {
        margin-top: 2px;
    }

    .nav-group:hover .nav-group__menu,
    .nav-group:focus-within .nav-group__menu {
        display: none;
    }

    .nav-group.is-open .nav-group__menu {
        display: block;
    }

    .nav-subgroup + .nav-subgroup {
        border-top: 0;
    }

    .nav-subgroup__link {
        padding: 10px 0;
        background: transparent;
    }

    .nav-subgroup__arrow {
        display: none;
    }

    .nav-subgroup__menu {
        position: static;
        left: auto;
        top: auto;
        min-width: 0;
        max-width: none;
        display: block;
        padding: 0 0 8px 12px;
        border: 0;
        box-shadow: none;
    }

    .site-brand__main {
        align-items: center;
        gap: 12px;
    }

    .site-brand__logo {
        width: auto;
        height: 44px;
    }

    .site-footer__inner {
        padding: 24px 20px;
    }

    .site-footer__logos {
        justify-content: center;
        gap: 28px 40px;
    }

    .article-body figure.article-figure--float-right {
        float: none;
        width: auto;
        margin: 32px 0 26px;
    }

    .site-footer__logo {
        height: 28px;
    }
}

/* ==== Zabronione: strona indeksu i stopka ==== */

.site-footer__note {
    max-width: 1380px;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #56606b;
}

.index-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 28px;
    padding: 12px 14px;
    border: 1px solid #d6dce3;
    border-radius: 6px;
    background: #f7f9fb;
}

.index-letters a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    padding: 4px 6px;
    border: 1px solid #d6dce3;
    border-radius: 4px;
    background: #fff;
    font-weight: 500;
    text-decoration: none;
}

.index-letters a:hover {
    border-color: #37414a;
}

.index-section {
    margin: 0 0 34px;
}

.index-section h2 {
    padding-bottom: 6px;
    border-bottom: 2px solid #d6dce3;
}

.index-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.index-table th,
.index-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #cfd6de;
    text-align: left;
    vertical-align: top;
}

.index-table thead th {
    border-bottom: 1px solid #d6dce3;
    background: #f7f9fb;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #69727d;
}

/* przewijanie poziome, gdyby tabela nie miescila sie na waskim ekranie */
.index-table-scroll {
    overflow-x: auto;
}

/* nazwa angielska pod nazwa polska w kolumnie "Haslo" */
.index-name-en {
    color: #69727d;
    font-size: 0.9em;
}

/* komorka z identyfikatorami i kodami - zwarte, linkowane "chipy" */
.index-ids {
    font-size: 0.82rem;
    line-height: 1.7;
}

.index-id {
    display: block;
    white-space: nowrap;
    margin: 0 0 2px;
}

.index-id__label {
    color: #8a929b;
    font-size: 0.78rem;
}
