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;
}

.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;
}

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

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

.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: 425px;
    max-width: min(88vw, 760px);
    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: 340px;
    max-width: 380px;
    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: -11px;
    min-width: 480px;
    max-width: min(55vw, 630px);
    display: none;
    padding: 14px 18px;
    border: 1px solid #d6dce3;
    background: #fff;
    box-shadow: 0 20px 40px rgba(17, 17, 17, 0.08);
}

/* Prawe dzialy otwieraja trzeci poziom do srodka ekranu. */
.top-nav .nav-group:nth-last-child(-n + 4) .nav-subgroup__menu {
    left: auto;
    right: calc(100% - 1px);
}

.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;
}

.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;
}

.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;
}

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

.article-body .equation {
    margin: 4px 0 24px;
    overflow-x: auto;
    padding: 16px 20px;
    border-left: 4px solid #ffaa17;
    background: #f4f6f8;
    color: #111820;
    font-size: 1.08rem;
    line-height: 1.5;
}

.article-body .equation code {
    padding: 0;
    background: transparent;
    color: inherit;
    font-family: "DejaVu Sans Mono", "Liberation Mono", monospace;
    white-space: nowrap;
}

.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;
}

.lab-calculator {
    margin: 34px 0 46px;
    border: 1px solid #ccd5dd;
    border-radius: 14px;
    overflow: hidden;
    background: #f8fafb;
    box-shadow: 0 18px 44px rgba(17, 17, 17, 0.06);
}

.lab-calculator__header {
    padding: 26px 28px 20px;
    background: #111;
    color: #fff;
}

.article-body .lab-calculator__header h2 {
    margin: 4px 0 10px;
    color: #fff;
    font-size: 1.75rem;
}

.lab-calculator__header p {
    max-width: 760px;
    margin: 0;
    color: #dce2e8;
}

.lab-calculator__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
    font-weight: 700;
    color: #ffbf3f !important;
}

.lab-calculator__tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    border-bottom: 1px solid #ccd5dd;
    background: #eef2f5;
}

.lab-calculator__tab {
    flex: 1 1 0;
    min-width: 150px;
    padding: 14px 18px;
    border: 0;
    border-right: 1px solid #ccd5dd;
    background: transparent;
    color: #44505b;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
}

.lab-calculator__tab:last-child {
    border-right: 0;
}

.lab-calculator__tab.is-active {
    background: #fff;
    color: #111;
    box-shadow: inset 0 -3px 0 #ffaa17;
}

.lab-calculator__tab:focus-visible,
.lab-calculator button:focus-visible,
.lab-calculator input:focus-visible,
.lab-calculator select:focus-visible {
    outline: 3px solid #ffaa17;
    outline-offset: 2px;
}

.lab-calculator__panel {
    padding: 26px 28px 30px;
    background: #fff;
}

.lab-calculator__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.lab-calculator label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-weight: 700;
    color: #1e252c;
}

.lab-calculator label small {
    min-height: 2.8em;
    color: #68727c;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.45;
}

.lab-calculator input,
.lab-calculator select,
.lab-calculator textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #9aa7b2;
    border-radius: 7px;
    background: #fff;
    color: #111;
    font: inherit;
}

.lab-calculator textarea {
    min-height: 190px;
    resize: vertical;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.92rem;
    line-height: 1.55;
}

.lab-calculator__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

.lab-calculator__actions button {
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid #111;
    border-radius: 7px;
    background: #111;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.lab-calculator__actions .lab-calculator__button-secondary {
    background: #fff;
    color: #111;
}

.lab-calculator__message,
.lab-calculator__warning {
    margin: 22px 0 0;
    padding: 14px 16px;
    border-left: 5px solid #b33a2f;
    border-radius: 5px;
    background: #fff0ed;
    color: #51201b;
}

.lab-calculator__results {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #d7dfe6;
}

.lab-calculator__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.lab-calculator__metrics > div {
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid #d7dfe6;
    border-radius: 8px;
    background: #f8fafb;
}

.lab-calculator__metrics dt {
    color: #5f6973;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lab-calculator__metrics dd {
    margin: 6px 0 0;
    overflow-wrap: anywhere;
    color: #111;
    font-size: 1.28rem;
    font-weight: 700;
    line-height: 1.3;
}

.lab-calculator__metrics small {
    display: block;
    margin-top: 5px;
    color: #68727c;
    font-size: 0.78rem;
    line-height: 1.4;
}

.lab-calculator__table-wrap {
    margin-top: 22px;
    overflow-x: auto;
}

.article-body .lab-calculator__table-wrap table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.cycle-map {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 0 0 24px;
}

.cycle-map__pool {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 84px;
    padding: 14px;
    border: 2px solid #111;
    border-radius: 999px;
    background: #fff;
    text-align: center;
    font-weight: 700;
    line-height: 1.3;
}

.cycle-map__process {
    position: relative;
    padding: 13px 14px;
    border-left: 5px solid #ffaa17;
    border-radius: 6px;
    background: #fff8e5;
    line-height: 1.4;
}

.cycle-map__process small {
    display: block;
    margin-top: 4px;
    color: #5f6973;
}

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

.planned-articles {
    margin-top: 24px;
    padding: 18px 20px;
    border: 1px solid #e3e8ed;
    border-radius: 8px;
    background: #f8fafb;
}

.planned-articles h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: #56606b;
}

.planned-article-list {
    margin: 0;
    padding-left: 22px;
    color: #56606b;
}

.planned-article-list li + li {
    margin-top: 4px;
}

.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;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px 120px;
    flex-wrap: wrap;
}

.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--genetyka {
    height: 48px;
}

@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;
        right: 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;
    }

    .site-brand__logo {
        width: 242px;
        max-width: 100%;
        height: auto;
    }

    .site-footer__inner {
        padding: 24px 20px;
        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;
    }

    .site-footer__logo--genetyka {
        height: 48px;
    }

    .lab-calculator__header,
    .lab-calculator__panel {
        padding-left: 18px;
        padding-right: 18px;
    }

    .lab-calculator__grid,
    .lab-calculator__metrics {
        grid-template-columns: 1fr;
    }

    .lab-calculator__tab {
        flex: 0 0 auto;
    }
}

@media (min-width: 901px) {
    .nav-subgroup__menu {
        min-width: 540px;
        max-width: min(57.75vw, 661.5px);
    }
}

.eyebrow {
    margin: 0 0 8px;
    color: #69727d;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

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

.table-wrap {
    max-width: 100%;
    margin: 24px 0;
    overflow-x: auto;
}

.article-body .table-wrap table {
    width: 100%;
    margin: 0;
}

.process-flow {
    display: flex;
    gap: 28px;
    margin: 26px 0 !important;
    padding: 0 !important;
    list-style: none;
}

.process-flow li {
    position: relative;
    flex: 1;
    min-width: 0;
    padding: 14px 12px;
    border: 1px solid #d6dce3;
    background: #f7f9fb;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
}

.process-flow li:not(:last-child)::after {
    position: absolute;
    right: -22px;
    color: #69727d;
    font-size: 1.25rem;
    content: "→";
}

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

.article-pending-notice {
    margin: 0;
    padding: 16px 18px;
    border-left: 3px solid #596a7d;
    background: #f7f9fb;
    color: #39434e;
}

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

.article-list li:first-child {
    border-top: 1px solid #d6dce3;
}

.article-list a {
    font-weight: 700;
}

.article-list p,
.group-description {
    color: #56606b;
}

.article-list p {
    margin: 5px 0 0;
    font-size: 0.91rem;
}

.group-section {
    margin-top: 36px;
}

.stub-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border: 1px solid #d6dce3;
    border-radius: 999px;
    color: #56606b;
    font-size: 0.72rem;
    font-weight: 700;
    vertical-align: 0.08em;
}

.learning-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 42px;
    padding-top: 24px;
    border-top: 1px solid #d6dce3;
}

.learning-links__column {
    display: grid;
    align-content: start;
    gap: 22px;
}

.learning-links h2 {
    margin: 0 0 8px;
    color: #56606b;
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.learning-links ul {
    margin: 0;
    padding-left: 18px;
    font-size: 0.9rem;
}

@media (max-width: 620px) {
    .learning-links {
        grid-template-columns: 1fr;
    }

    .process-flow {
        flex-direction: column;
        gap: 25px;
    }

    .process-flow li:not(:last-child)::after {
        right: auto;
        bottom: -25px;
        left: 50%;
        content: "↓";
    }

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

@media print {
    .learning-links {
        display: none;
    }
}

/* Editorial layout shared with the current Genetyka family, adapted to Leki. */
:root {
    --ink: #111820;
    --muted: #5a6570;
    --paper: #fff;
    --surface: #eef4f5;
    --line: #cfd8dd;
    --accent: #359e8f;
    --home-accent: #359e8f;
    --accent-soft: #edf7f5;
    --accent-line: #8fc5bc;
    --measure: 760px;
    --wide: 1240px;
}

body {
    background: var(--paper);
    color: var(--ink);
    font: 17px/1.72 Arial, Helvetica, sans-serif;
}

a {
    color: var(--accent);
    text-decoration-color: currentColor;
    text-underline-offset: .16em;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .98);
}

.site-header__inner {
    position: relative;
    width: min(var(--wide), calc(100% - 48px));
    max-width: none;
    min-height: 106px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 30px;
}

.site-brand {
    flex: 0 0 auto;
    margin: 0;
}

.site-brand__logo-link {
    display: block;
}

.site-brand__logo {
    width: 242px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: left center;
}

.top-nav {
    min-width: 0;
    margin-left: auto;
    padding: 0;
    border: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 1px;
    font-size: 12.5px;
    font-weight: 700;
}

.top-nav > a,
.nav-group__link {
    min-height: 42px;
    padding: 0 7px;
    display: flex;
    align-items: center;
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
}

.top-nav > a:hover,
.top-nav > a:focus,
.nav-group__header:hover .nav-group__link,
.nav-group.active .nav-group__link {
    color: var(--accent);
}

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

.top-nav-toggle {
    display: none;
}

.nav-group {
    position: relative;
}

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

.nav-group__toggle {
    position: static;
    width: 20px;
    height: 42px;
    margin-left: -6px;
    padding: 0;
    display: block;
}

.nav-group__toggle::before {
    display: none;
}

.nav-group__toggle::after {
    content: "⌄";
    position: static;
    display: inline;
    width: auto;
    height: auto;
    background: none;
    font-size: 12px;
    transform: none;
}

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

.nav-group__menu,
.nav-group--section .nav-group__menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    z-index: 40;
    width: 345px;
    min-width: 0;
    max-width: none;
    display: none;
    padding: 8px;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 18px 42px rgba(17, 24, 32, .12);
}

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

.nav-group__menu > a,
.nav-subgroup__link,
.nav-subgroup__menu a {
    min-height: 0;
    display: block;
    padding: 9px 11px;
    color: var(--ink);
    font: 700 13px/1.45 Arial, Helvetica, sans-serif;
    letter-spacing: 0;
    text-decoration: none;
    white-space: normal;
}

.nav-group__menu > a.active,
.nav-subgroup__menu a.active {
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 3px 0 0 var(--accent);
}

.nav-subgroup {
    position: relative;
}

.nav-subgroup + .nav-subgroup {
    border-top: 1px solid var(--line);
}

.nav-subgroup__link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    font-weight: 800;
}

.nav-subgroup__link:hover,
.nav-subgroup:focus-within > .nav-subgroup__link,
.nav-subgroup.is-open > .nav-subgroup__link {
    background: var(--surface);
    color: var(--accent);
}

.nav-subgroup__arrow {
    display: inline;
    flex: 0 0 auto;
    color: inherit;
    font-size: 1rem;
    line-height: 1;
}

.nav-subgroup__menu {
    position: absolute;
    top: -1px;
    right: calc(100% - 1px);
    left: auto;
    z-index: 41;
    width: min(422px, 36.8vw);
    min-width: 0;
    max-width: none;
    max-height: none;
    overflow: visible;
    display: none;
    padding: 9px;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: -18px 18px 42px rgba(17, 24, 32, .12);
}

.top-nav > .nav-group:nth-of-type(-n + 3) .nav-subgroup__menu {
    right: auto;
    left: calc(100% - 1px);
    box-shadow: 18px 18px 42px rgba(17, 24, 32, .12);
}

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

.nav-subgroup__menu a + a {
    border-top: 1px dotted var(--line);
}

.nav-subgroup__menu a:hover,
.nav-subgroup__menu a:focus-visible {
    background: var(--surface);
    color: var(--accent);
}

.layout {
    width: min(var(--wide), calc(100% - 48px));
    max-width: none;
    margin: 0 auto;
    padding: 60px 0 100px;
}

.page-home .layout {
    width: min(1280px, calc(100% - 48px));
}

.page-article .article-header {
    width: min(1020px, 100%);
    margin: 0 auto 42px;
    padding-bottom: 34px;
    border-bottom: 7px solid var(--accent);
    text-align: left;
}

.article-kicker,
.concept-kicker {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .13em;
    line-height: 1.3;
    text-transform: uppercase;
}

.article-kicker span {
    margin: 0 7px;
    color: var(--muted);
}

.page-article .article-kicker {
    color: var(--accent);
}

.page-article .article-header h1 {
    max-width: 950px;
    margin: 0;
    color: var(--ink);
    font: 700 clamp(3.2rem, 6vw, 5.5rem)/.98 Georgia, "Times New Roman", serif;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}

.page-article .article-meta {
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.page-article .article-body,
.page-article .footnotes,
.page-article .learning-links {
    width: min(var(--measure), 100%);
    margin-inline: auto;
}

.page-article .article-body {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.06rem;
    line-height: 1.72;
}

.page-article .article-body > :first-child {
    margin-top: 0;
}

.page-article .article-body > p:first-child {
    font: 700 1.28rem/1.55 Georgia, "Times New Roman", serif;
}

.page-article .article-body h1,
.page-article .article-body h2,
.page-article .article-body h3,
.page-article .article-body h4,
.page-article .article-body h5 {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.025em;
}

.page-article .article-body h2 {
    margin: 3.4rem 0 1.1rem;
    padding-top: 18px;
    border-top: 2px solid var(--ink);
    font-size: clamp(1.75rem, 3vw, 2.15rem);
}

.page-article .article-body > h2:first-child {
    padding-top: 0;
    border-top: 0;
}

.page-article .article-body h3 {
    margin: 2.6rem 0 .9rem;
    font-size: 1.5rem;
    line-height: 1.18;
}

.page-article .article-body h4 {
    margin: 2.2rem 0 .8rem;
    font-size: 1.25rem;
    line-height: 1.22;
}

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

.page-article .article-body table {
    width: 100%;
    margin: 1.8rem 0 2.3rem;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: .94em;
    line-height: 1.5;
}

.page-article .article-body th,
.page-article .article-body td {
    padding: .72rem .82rem;
    border: 1px dotted var(--accent-line);
    vertical-align: top;
    text-align: left;
}

.page-article .article-body th {
    background: var(--accent-soft);
    font-weight: 800;
}

.page-article .article-body blockquote {
    padding: 4px 0 4px 28px;
    border-left: 5px solid var(--accent);
    color: var(--ink);
    font: 700 1.25rem/1.55 Georgia, "Times New Roman", serif;
}

.page-article .article-body figure.article-figure--full {
    width: min(1080px, calc(100vw - 48px));
    margin: 46px 50%;
    transform: translateX(-50%);
}

.page-article .article-body figure.article-figure--full img {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--surface);
}

.page-article .article-body figcaption {
    margin-top: 12px;
    color: var(--muted);
    font: 12px/1.55 Arial, Helvetica, sans-serif;
}

.page-article .footnotes {
    margin-top: 72px;
    padding-top: 28px;
    border-top: 2px solid var(--ink);
    color: var(--muted);
    font-size: 13px;
}

.page-article .footnotes h2 {
    margin: 0 0 1.1rem;
    color: var(--ink);
    font: 700 clamp(1.75rem, 3vw, 2.15rem)/1.12 Georgia, "Times New Roman", serif;
    letter-spacing: -.025em;
}

.page-article .article-body sup a,
.page-article .footnote-backref {
    color: var(--accent);
}

.page-article .learning-links {
    margin-top: 64px;
    font-family: Georgia, "Times New Roman", serif;
}

.page-group .article-header h1,
.page-group .article-summary,
.page-group .article-body,
.page-group .group-article-section > h2,
.page-group .group-article-list a,
.page-group .group-article-list p {
    font-family: Georgia, "Times New Roman", serif;
}

.page-group .article-header {
    max-width: 1020px;
    margin-bottom: 48px;
}

.page-group .article-header h1 {
    margin: 0 0 18px;
    color: var(--ink);
    font-size: clamp(3.2rem, 6vw, 5.4rem);
    font-weight: 700;
    line-height: .98;
    letter-spacing: -.045em;
}

.page-group .article-summary,
.page-group .article-body {
    color: var(--ink);
    font-size: 1.06rem;
    line-height: 1.72;
}

.page-group .group-article-section > h2 {
    margin: 2.6rem 0 .9rem;
    padding: 0;
    border: 0;
    color: var(--ink);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -.025em;
}

.page-group .group-article-section:first-child > h2 {
    margin-top: 0;
}

.page-group .group-article-section > h2 a,
.page-group .group-article-list a {
    color: var(--ink);
    text-decoration-color: currentColor;
}

.page-group .group-article-section > h2 a:hover,
.page-group .group-article-list a:hover {
    color: var(--accent);
}

.page-group .group-article-list a.group-article-list__title {
    display: inline;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -.025em;
}

.page-group .group-article-list__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 24px;
    align-items: start;
    margin: 0;
    padding: 18px 0;
}

.page-group .group-article-list__item--no-image {
    grid-template-columns: minmax(0, 1fr);
}

.page-group .group-article-list__body {
    min-width: 0;
}

.page-group .group-article-list p.group-article-list__summary {
    margin: 8px 0 0;
}

.page-group .group-article-list p.group-article-list__updated {
    margin: 10px 0 0;
    color: var(--muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: .78rem;
    line-height: 1.4;
}

.page-group .group-article-list__image {
    width: 100%;
    max-width: 230px;
    margin: 0;
    display: block;
    aspect-ratio: 14 / 9;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
}

.page-group .group-article-list__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.page-group .group-article-section__description,
.page-group .group-article-list p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.65;
}

.page-home .article-body--homepage {
    width: 100%;
    color: var(--ink);
}

.page-home .concept-hero {
    height: 550px;
    min-height: 0;
    margin: 0 0 72px;
    display: grid;
    grid-template-columns: .88fr 1.12fr;
    align-items: stretch;
    border-top: 5px solid var(--ink);
    border-bottom: 1px solid #aab4ba;
    background: #f1f4f3;
}

.page-home .concept-hero__copy {
    min-width: 0;
    padding: 52px clamp(42px, 4vw, 62px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-home .concept-kicker {
    color: var(--home-accent);
}

.page-home .concept-hero h1 {
    max-width: 750px;
    margin: 0;
    font: 700 clamp(2.35rem, 3.35vw, 2.7rem)/.96 Georgia, "Times New Roman", serif;
    letter-spacing: -.055em;
    overflow-wrap: anywhere;
}

.page-home .concept-hero h1 a {
    color: inherit;
    text-decoration: none;
}

.page-home .concept-lead {
    max-width: 650px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: 1.12rem;
    line-height: 1.6;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.page-home .concept-cta {
    align-self: flex-start;
    margin-top: 30px;
    padding-bottom: 4px;
    border-bottom: 2px solid currentColor;
    color: var(--home-accent);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.page-home .concept-cta span {
    padding-left: 10px;
}

.page-home .concept-hero__media {
    min-height: 460px;
    margin: 0;
    padding: 22px;
    overflow: hidden;
    background: #e8f0f2;
}

.page-home .concept-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: saturate(.9) contrast(1.03);
}

.editorial-home {
    width: 100%;
}

.ed-section {
    margin-top: 70px;
}

.ed-section__heading {
    margin-bottom: 25px;
    padding-bottom: 12px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 25px;
    border-bottom: 4px solid var(--ink);
}

.ed-section__heading p {
    margin: 0;
    color: var(--home-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ed-section__heading h2 {
    margin: 0;
    color: var(--ink);
    font: 700 clamp(1.65rem, 3vw, 2.5rem)/1 Georgia, "Times New Roman", serif;
    letter-spacing: -.035em;
}

.ed-lead-grid {
    padding-top: 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.ed-card {
    min-width: 0;
    padding-top: 12px;
    border-top: 1px solid #aab4ba;
}

.ed-card a {
    color: inherit;
    text-decoration: none;
}

.ed-card__media {
    display: block;
    overflow: hidden;
    background: var(--surface);
}

.ed-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .2s ease;
}

.ed-card:hover .ed-card__media img {
    transform: scale(1.018);
}

.ed-card__copy {
    padding-top: 14px;
}

.ed-meta {
    margin: 0 0 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ed-meta span {
    color: var(--home-accent);
}

.ed-card h3 {
    margin: 0;
    color: var(--ink);
    font: 700 1.18rem/1.18 Georgia, "Times New Roman", serif;
    letter-spacing: -.025em;
}

.ed-card h3 a:hover {
    color: var(--home-accent);
}

.ed-summary {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.ed-card--lead .ed-card__media,
.ed-card--news .ed-card__media {
    aspect-ratio: 14 / 9;
}

.ed-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(250px, .72fr);
    gap: 42px;
    align-items: start;
}

.ed-news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 35px 26px;
}

.ed-card--news h3 {
    font-size: 1.35rem;
}

.ed-stream {
    border-top: 1px solid var(--line);
}

.ed-card--stream {
    padding: 18px 0;
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    border-top: 0;
    border-bottom: 1px solid var(--line);
}

.ed-card--stream .ed-card__media {
    aspect-ratio: 14 / 9;
}

.ed-card--stream .ed-card__copy {
    padding-top: 0;
}

.ed-sidebar {
    position: sticky;
    top: 126px;
}

.ed-side-module {
    margin-top: 70px;
}

.ed-topics nav {
    display: grid;
}

.ed-topics a {
    padding: 13px 4px;
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.ed-topics b {
    color: var(--home-accent);
}

.ed-card--tool {
    padding: 13px 0;
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 13px;
    align-items: center;
    border-top: 0;
    border-bottom: 1px solid var(--line);
}

.ed-card--tool .ed-card__media {
    aspect-ratio: 14 / 9;
}

.ed-card--tool .ed-card__copy {
    padding-top: 0;
    align-self: center;
}

.ed-card--tool h3 {
    font-size: .92rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--paper);
}

.site-footer__inner {
    width: min(var(--wide), calc(100% - 48px));
    max-width: none;
    min-height: 170px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.page-home .site-footer__inner {
    width: min(1280px, calc(100% - 48px));
}

.site-footer__logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--ink);
    text-decoration: none;
}

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

.site-footer__logo--genetyka {
    height: 48px;
}

.site-footer__logo--bioreaktory,
.site-footer__logo--mikrobiologia {
    height: 60px;
}

@media (max-width: 1050px) {
    .site-header__inner {
        min-height: 88px;
    }

    .site-brand__logo {
        width: 210px;
    }

    .top-nav-toggle {
        margin-left: auto;
        padding: 10px 14px;
        display: block;
        border: 1px solid var(--ink);
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .top-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        max-height: calc(100vh - 130px);
        overflow: auto;
        padding: 18px 24px;
        border-bottom: 1px solid var(--line);
        background: var(--paper);
        box-shadow: 0 18px 30px rgba(17, 24, 32, .08);
    }

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

    .top-nav > a,
    .nav-group__link {
        min-height: 44px;
        padding: 0;
    }

    .nav-group {
        padding-bottom: 0;
    }

    .nav-group__header {
        justify-content: space-between;
        border-top: 1px solid var(--line);
    }

    .nav-group__menu,
    .nav-group--section .nav-group__menu {
        position: static;
        width: 100%;
        max-height: none;
        margin: 0;
        padding: 4px 0 14px 16px;
        border: 0;
        box-shadow: none;
    }

    .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: 1px solid var(--line);
    }

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

    .nav-subgroup__arrow {
        display: inline;
    }

    .nav-subgroup__menu {
        position: static;
        width: 100%;
        min-width: 0;
        max-width: none;
        max-height: none;
        margin: 0 0 8px;
        padding: 0 0 4px 14px;
        overflow: visible;
        border: 0;
        border-left: 2px solid var(--line);
        box-shadow: none;
    }

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

    .nav-subgroup.is-open > .nav-subgroup__menu {
        display: block;
    }

    .page-home .concept-hero {
        height: auto;
        grid-template-columns: 1fr;
    }

    .page-home .concept-hero__media {
        min-height: 340px;
        order: -1;
    }

    .ed-content-grid {
        grid-template-columns: 1fr;
    }

    .ed-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .ed-side-module {
        margin-top: 55px;
    }
}

@media (max-width: 680px) {
    body {
        font-size: 16px;
    }

    .site-header__inner,
    .layout,
    .page-home .layout,
    .site-footer__inner,
    .page-home .site-footer__inner {
        width: min(100% - 30px, 1280px);
    }

    .site-header__inner {
        gap: 16px;
    }

    .site-brand__logo {
        width: 175px;
        max-width: calc(100vw - 120px);
    }

    .layout {
        padding: 38px 0 68px;
    }

    .page-article .article-header {
        padding: 0 0 30px;
    }

    .page-article .article-header h1 {
        max-width: 100%;
        font-size: clamp(2.65rem, 12vw, 3.25rem);
        line-height: 1;
    }

    .page-group .article-header h1 {
        font-size: clamp(2.7rem, 12vw, 3.4rem);
    }

    .page-group .group-article-list__item {
        grid-template-columns: minmax(0, 1fr) 112px;
        gap: 14px;
    }

    .page-group .group-article-list__item--no-image {
        grid-template-columns: minmax(0, 1fr);
    }

    .page-article .article-body table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }

    .page-article .article-body figure.article-figure--full {
        width: calc(100vw - 30px);
    }

    .page-home .concept-hero {
        margin-inline: -15px;
        margin-bottom: 50px;
    }

    .page-home .concept-hero__copy {
        padding: 36px 24px 42px;
    }

    .page-home .concept-hero h1 {
        max-width: 100%;
        font-size: 2.3rem;
        line-height: .98;
    }

    .page-home .concept-hero__media {
        min-height: 250px;
        padding: 10px;
    }

    .ed-section {
        margin-top: 48px;
    }

    .ed-section__heading {
        display: block;
    }

    .ed-section__heading p {
        margin-bottom: 8px;
    }

    .ed-lead-grid,
    .ed-news-grid {
        grid-template-columns: 1fr;
    }

    .ed-card--stream {
        grid-template-columns: 105px 1fr;
        gap: 13px;
    }

    .ed-sidebar {
        grid-template-columns: 1fr;
    }

    .site-footer__inner {
        min-height: 210px;
        padding-block: 40px;
        justify-content: center;
        gap: 28px 40px;
    }
}

@media print {
    .site-header {
        position: static;
    }

    .site-footer {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .site-footer__inner,
    .page-home .site-footer__inner {
        width: 100%;
        min-height: 96px;
        padding: 18px 0;
        flex-wrap: nowrap;
        gap: 18px;
    }

    .site-footer__logo {
        height: 22px;
    }

    .site-footer__logo--genetyka {
        height: 30px;
    }

    .site-footer__logo--bioreaktory,
    .site-footer__logo--mikrobiologia {
        height: 36px;
    }
}

/* Wyszukiwarka lokalna */
.header-navigation {
    min-width: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-navigation .top-nav {
    margin-left: 0;
}

.search-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.search-open svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
}

.search-open:hover,
.search-open:focus-visible {
    background: var(--surface);
    color: var(--accent);
}

.search-open:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 24%, transparent);
    outline-offset: 2px;
}

.search-dialog {
    width: min(760px, calc(100% - 30px));
    max-height: min(82vh, 760px);
    padding: 30px;
    border: 0;
    border-top: 7px solid var(--accent);
    border-radius: 0;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
    font: 16px/1.55 "Rubik", "Segoe UI", Arial, Helvetica, sans-serif;
}

.search-dialog::backdrop {
    background: rgba(17, 17, 17, .78);
}

.search-dialog__close {
    position: absolute;
    top: 10px;
    right: 12px;
    margin: 0;
}

.search-dialog__close button {
    padding: 4px 8px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.search-dialog__eyebrow {
    margin: 0 0 5px;
    color: var(--accent);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.search-dialog h2 {
    margin: 0 40px 20px 0;
    font: 700 clamp(2rem, 5vw, 3rem)/1 Georgia, "Times New Roman", serif;
    letter-spacing: -.035em;
}

.search-dialog__form,
.search-page__form {
    display: grid;
    gap: 8px;
}

.search-dialog__form label,
.search-page__form label {
    font-family: "Rubik", "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: .85rem;
    font-weight: 700;
}

.search-dialog__form > div,
.search-page__form > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.search-dialog input,
.search-page input {
    width: 100%;
    min-width: 0;
    padding: .8rem;
    border: 1px solid #858585;
    border-radius: 0;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
}

.search-dialog input:focus,
.search-page input:focus {
    position: relative;
    z-index: 1;
    border-color: var(--ink);
    outline: 3px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

.search-dialog__form button,
.search-page__form button {
    padding: .75rem 1.15rem;
    border: 0;
    background: var(--ink);
    color: var(--paper);
    font: 800 .82rem/1 "Rubik", "Segoe UI", Arial, Helvetica, sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
}

.search-dialog__form button:hover,
.search-dialog__form button:focus-visible,
.search-page__form button:hover,
.search-page__form button:focus-visible {
    background: var(--accent);
}

.quick-results {
    max-height: 48vh;
    margin-top: 20px;
    overflow-y: auto;
}

.quick-results[aria-busy="true"] {
    opacity: .58;
}

.quick-results > a {
    display: block;
    padding: 12px 5px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
}

.quick-results > a:hover,
.quick-results > a:focus-visible {
    color: var(--accent);
    background: var(--surface);
}

.quick-results strong,
.quick-results small {
    display: block;
}

.quick-results small {
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.45;
}

.page-search .layout {
    width: min(900px, calc(100% - 48px));
}

.page-search .article-header {
    margin-bottom: 34px;
    padding-bottom: 25px;
    border-bottom: 7px solid var(--accent);
}

.page-search .article-header h1 {
    margin: 0;
    font: 700 clamp(3.2rem, 7vw, 5rem)/.98 Georgia, "Times New Roman", serif;
    letter-spacing: -.045em;
}

.page-search .article-body {
    font-family: "Rubik", "Segoe UI", Arial, Helvetica, sans-serif;
}

.search-page__lead {
    max-width: 760px;
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 1.08rem;
}

.search-results-count {
    margin-top: 34px;
}

.search-result {
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.search-result h2 {
    margin: .3rem 0;
    font: 700 1.55rem/1.2 Georgia, "Times New Roman", serif;
    letter-spacing: -.02em;
}

.search-result h2 a:hover,
.search-result h2 a:focus-visible {
    color: var(--accent);
}

.search-result > p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

.search-result__meta {
    margin: 0;
    color: var(--accent);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .05em;
    line-height: 1.5;
    text-transform: uppercase;
}

.search-message {
    margin: 18px 0 0;
    color: var(--muted);
}

@media (max-width: 1050px) {
    .site-header__inner {
        gap: 12px;
    }

    .header-navigation {
        flex: 0 0 auto;
        margin-left: 0;
    }
}

@media (max-width: 680px) {
    .site-header__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .top-nav-toggle {
        margin-left: 0;
    }

    .search-open {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .page-search .layout {
        width: min(100% - 30px, 900px);
    }

    .page-search .article-header h1 {
        font-size: clamp(2.8rem, 14vw, 3.5rem);
    }
}

@media (max-width: 600px) {
    .search-dialog__form > div,
    .search-page__form > div {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .search-dialog {
        padding: 24px;
    }
}
