:root {
    --blue: #173984;
    --blue-dark: #102d6d;
    --green: #9bb72c;
    --green-dark: #829d1e;
    --text: #3d4654;
    --muted: #6f7886;
    --line: #d9dee7;
    --surface: #ffffff;
    --background: #eef2f4;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    height: 80px;
    padding: 8px clamp(24px, 4vw, 56px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border-top: 1px solid #e4e6e9;
    border-bottom: 1px solid #dfe3e8;
}

.site-logo {
    display: block;
    width: auto;
    height: 54px;
    object-fit: contain;
}

.logo-link {
    display: block;
}

.catalogue-title {
    color: #262b31;
    font-size: 15px;
    font-weight: 400;
}

.site-navigation {
    display: flex;
    align-items: center;
    gap: 34px;
}

.site-navigation a {
    color: #343434;
    font-size: 14px;
    text-decoration: none;
}

.site-navigation a:hover {
    color: var(--blue);
    text-decoration: underline;
}

.header-link {
    text-decoration: none;
}

.header-link:hover {
    color: var(--blue);
    text-decoration: underline;
}

.hero {
    min-height: 340px;
    padding: 48px 24px 80px;
    display: grid;
    place-items: start center;
    color: #fff;
    text-align: center;
    background:
        linear-gradient(rgba(19, 52, 126, 0.87), rgba(27, 64, 147, 0.82)),
        url("../images/EBiSC-Cell_picture_header_narrow_shadow.jpg") center / cover no-repeat;
}

.hero-content {
    width: min(1180px, 100%);
}

.hero h1 {
    margin: 48px 0 36px;
    font-size: clamp(30px, 3.35vw, 52px);
    font-weight: 400;
    line-height: 1.2;
}

.hero p {
    margin: 10px 0;
    font-size: 15px;
}

.hero-email {
    color: inherit;
    text-underline-offset: 3px;
}

.hero-email:hover {
    text-decoration-thickness: 2px;
}

.primary-button,
.reset-button {
    border: 0;
    border-radius: 4px;
    box-shadow: 0 5px 14px rgba(19, 38, 68, 0.18);
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

.primary-button {
    color: #172000;
    background: var(--green);
    display: inline-block;
    margin-top: 14px;
    padding: 11px 24px;
    text-decoration: none;
}

.reset-button {
    color: #fff;
    background: var(--blue);
}

.primary-button:hover {
    background: var(--green-dark);
}

.reset-button:hover {
    background: var(--blue-dark);
}

.primary-button:focus-visible,
.reset-button:focus-visible,
input:focus-visible,
select:focus-visible,
.table-scroll:focus-visible {
    outline: 3px solid rgba(155, 183, 44, 0.5);
    outline-offset: 2px;
}

.catalogue-panel {
    position: relative;
    z-index: 1;
    width: 95%;
    margin: -38px auto 56px;
    padding: 42px 24px 20px;
    background: var(--surface);
    border: 1px solid #d9dfe7;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(29, 44, 65, 0.15);
}

.catalogue-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.catalogue-intro h2 {
    margin: 3px 0 8px;
    color: #424242;
    font-size: 25px;
    font-weight: 400;
}

.catalogue-intro p {
    margin: 0;
    color: #8a8a8a;
}

.statistics {
    display: grid;
    grid-template-columns: repeat(3, 92px);
    gap: 8px;
}

.statistic {
    min-height: 64px;
    padding: 9px 7px 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    background: #f7f9fc;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.statistic strong {
    font-size: 17px;
    line-height: 1.2;
}

.statistic span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.filter-bar {
    margin: 22px 0 24px;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 230px 130px;
    align-items: end;
    gap: 10px;
}

.form-field {
    min-width: 0;
}

.form-field label {
    display: block;
    margin-bottom: 4px;
    color: #535d6b;
    font-size: 13px;
}

.form-field input,
.form-field select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    color: var(--text);
    background: #fff;
    border: 1px solid #b9c6d8;
    border-radius: 4px;
}

.form-field input::placeholder {
    color: #8993a2;
}

.reset-button {
    min-height: 42px;
    padding: 0 16px;
}

.table-frame {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 5px;
}

.table-caption {
    min-height: 38px;
    margin: 0;
    padding: 10px 12px;
    color: #788291;
    background: #fff;
    font-size: 12px;
}

.table-caption span {
    display: block;
}

.table-caption span + span {
    margin-top: 3px;
}

.table-scroll {
    max-height: 90vh;
    overflow: auto;
}

table {
    width: 100%;
    min-width: 1800px;
    border-collapse: collapse;
    table-layout: fixed;
}

th,
td {
    padding: 13px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-top: 15px;
    padding-bottom: 15px;
    color: #fff;
    background: var(--blue);
    border-bottom: 2px solid var(--green);
    font-size: 12px;
    font-weight: 600;
    vertical-align: bottom;
}

thead th:nth-child(n+7) {
    width: 130px;
}

thead th:nth-child(1) {
    width: 100px;
}

thead th:nth-child(2),
thead th:nth-child(6) {
    width: 160px;
}

thead th:nth-child(3),
thead th:nth-child(5),
thead th:nth-child(8),
thead th:nth-child(9) {
    width: 75px;
}

thead th:nth-child(4) {
    width: 95px;
}

thead th:nth-child(n+12) {
    width: 120px;
}

tbody th {
    color: var(--blue);
    font-weight: 600;
}

.product-link {
    display: block;
    width: fit-content;
    margin-top: 6px;
    padding: 2px 7px;
    color: #36568f;
    background: #edf2fb;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 400;
    text-decoration: none;
}

.cell-line-link {
    color: var(--blue);
    font-weight: 600;
    text-decoration: underline;
}

.cell-line-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 0 24px;
    margin-top: 20px;
}

.cell-line-details > div {
    min-width: 0;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    overflow-wrap: anywhere;
}

.cell-line-details dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.cell-line-details dd {
    margin: 6px 0 0;
    white-space: pre-wrap;
}

.product-link:hover {
    text-decoration: underline;
}

tbody td,
tbody th {
    font-size: 12px;
}

.gene-tag {
    display: inline-block;
    margin: 0 4px 3px 0;
    padding: 3px 7px;
    color: #9a5200;
    background: #fff1dc;
    border: 1px solid #f2a22c;
    border-radius: 4px;
    line-height: 1.25;
}

.positive-value {
    color: #477000;
    font-weight: 600;
}

.document-download {
    display: block;
    padding: 6px 8px;
    color: #fff;
    background: var(--blue);
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.document-download:hover {
    background: var(--blue-dark);
}

.document-filename {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
    overflow-wrap: anywhere;
}

.document-contact-message {
    color: var(--muted);
    font-size: 11px;
}

tbody tr:nth-child(even) {
    background: #f7f9fb;
}

tbody tr:hover {
    background: #f0f4f8;
}

tbody tr:last-child td,
tbody tr:last-child th {
    border-bottom: 0;
}

.status {
    display: inline-block;
    padding: 5px 8px;
    border-left: 3px solid;
    border-radius: 3px;
    line-height: 1.35;
}

.status-soon {
    color: #415600;
    background: #e5efbf;
    border-color: var(--green);
}

.status-available {
    color: #315000;
    background: #dcebb0;
    border-color: #82a51d;
}

.status-enquire {
    color: #704d00;
    background: #f7e7b8;
    border-color: #d4a72c;
}

.not-reported {
    color: #9299a3;
    font-style: italic;
}

.table-message {
    padding: 32px;
    color: var(--muted);
    text-align: center;
}

.table-error {
    color: #8a2d2d;
    background: #fff4f4;
}

.site-footer {
    padding: 32px 20px 30px;
    color: #8792a3;
    background: #f4f5f6;
    border-top: 1px solid var(--line);
}

.footer-content {
    max-width: 1640px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 40px;
    font-size: 15px;
    line-height: 1.55;
}

.footer-content > p {
    grid-column: 1;
}

.footer-content p {
    margin: 0;
}

.footer-copyright {
    margin-bottom: 8px !important;
}

.footer-logos {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 34px;
}

.footer-logos img {
    display: block;
    width: auto;
    max-width: 176px;
    height: 54px;
    object-fit: contain;
}

.footer-content a,
.legal-content a {
    color: var(--blue);
    text-underline-offset: 2px;
}

.legal-page {
    padding: 48px 24px 64px;
}

.legal-content {
    width: min(900px, 100%);
    margin: 0 auto;
    padding: clamp(24px, 5vw, 56px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(29, 44, 65, 0.1);
}

.legal-content h1 {
    margin: 0 0 32px;
    color: var(--blue);
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 400;
    line-height: 1.2;
}

.legal-content h2 {
    margin: 36px 0 12px;
    color: var(--blue);
    font-size: 23px;
    font-weight: 500;
    line-height: 1.3;
}

.legal-content h3 {
    margin: 25px 0 8px;
    color: var(--blue-dark);
    font-size: 17px;
}

.legal-content p,
.legal-content li {
    line-height: 1.7;
}

.legal-content ul {
    padding-left: 24px;
}

.legal-content pre {
    padding: 16px;
    overflow-x: auto;
    white-space: pre-wrap;
    color: var(--text);
    background: #f7f9fb;
    border-left: 3px solid var(--green);
    font: inherit;
    line-height: 1.6;
}

.legal-content iframe {
    width: 100%;
    max-width: 600px;
    border: 0;
}

@media (max-width: 800px) {
    .site-navigation {
        gap: 14px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-logos {
        grid-column: 1;
        grid-row: auto;
        margin-top: 20px;
        justify-content: flex-start;
    }

    .hero {
        min-height: 330px;
        padding-top: 42px;
    }

    .catalogue-panel {
        width: 95%;
        padding: 18px 14px 14px;
    }

    .catalogue-summary {
        display: block;
    }

    .statistics {
        margin-top: 18px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .reset-button {
        width: 100%;
    }

    .legal-page {
        padding: 24px 12px 40px;
    }
}

@media (max-width: 520px) {
    .site-header {
        height: 70px;
        padding-inline: 18px;
    }

    .site-logo {
        height: 46px;
    }

    .site-navigation {
        gap: 10px;
    }

    .site-navigation a {
        font-size: 12px;
    }

    .hero {
        min-height: 360px;
        padding-inline: 16px;
    }

    .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;
    }

    .hero h1 {
        font-size: 29px;
    }

    .hero p {
        font-size: 14px;
    }

    .catalogue-panel {
        margin-bottom: 32px;
    }

    .statistics {
        gap: 5px;
    }

    .statistic {
        padding-inline: 3px;
    }
}
