@page {
    size: A4;
    margin: 13mm 14mm 16mm;
}

@page datasheet-wide {
    size: A4 landscape;
    margin: 12mm 13mm 14mm;
}

:root {
    color-scheme: light;
    --navy: #082b49;
    --blue: #0d5d91;
    --orange: #ed7d22;
    --ink: #172536;
    --muted: #5d6b78;
    --line: #dce4eb;
    --surface: #f4f7f9;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: #fff;
    color: var(--ink);
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: 11px;
    line-height: 1.55;
}

.datasheet-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin: 0 auto 16px;
    max-width: 900px;
}

.datasheet-actions a,
.datasheet-actions button {
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    padding: 9px 14px;
    text-decoration: none;
}

.datasheet-download-button {
    background: #0d5c75;
    color: #fff;
}

.datasheet-back-button {
    background: #e9f0f3;
    color: #173b4a;
}

@media print {
    .datasheet-actions {
        display: none;
    }

    .datasheet-cover {
        grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
        min-height: 96mm;
    }

    .cover-image {
        min-height: 84mm;
    }

    .cover-image img {
        max-height: 82mm;
    }
}

.datasheet {
    width: 100%;
    max-width: 190mm;
    margin: 0 auto;
}

.datasheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 0 10px;
    border-bottom: 3px solid var(--orange);
}

.datasheet-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.datasheet-brand img {
    width: 132px;
    height: auto;
}

.datasheet-brand p,
.datasheet-label small,
.datasheet-footer span,
.datasheet-footer p {
    color: var(--muted);
}

.datasheet-brand p {
    margin: 0;
    padding-left: 14px;
    border-left: 1px solid var(--line);
    font-size: 10px;
    font-weight: 700;
}

.datasheet-label {
    text-align: right;
}

.datasheet-label span,
.eyebrow {
    color: var(--orange);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.datasheet-label small {
    display: block;
    margin-top: 3px;
    font-size: 9px;
}

.datasheet-cover {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 26px;
    align-items: stretch;
    min-height: 108mm;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.cover-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    margin: 0 0 7px;
}

.cover-copy h1 {
    max-width: 82mm;
    margin: 0 0 18px;
    color: var(--navy);
    font-size: 29px;
    line-height: 1.14;
}

.product-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.product-facts div {
    padding-top: 7px;
    border-top: 2px solid var(--blue);
}

.product-facts dt {
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.product-facts dd {
    margin: 3px 0 0;
    color: var(--navy);
    font-size: 10px;
    font-weight: 700;
}

.cover-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 94mm;
    padding: 12px;
    border: 1px solid #cad8e2;
    background: linear-gradient(145deg, #f7fafc 0%, #edf4f8 100%);
}

.cover-image img {
    width: 100%;
    max-width: 100%;
    max-height: 92mm;
    object-fit: contain;
}

.datasheet-summary,
.datasheet-content,
.datasheet-specifications {
    padding: 14px 0 0;
}

.datasheet-summary {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.datasheet-summary h2,
.datasheet-specifications h2,
.datasheet-content > h2 {
    margin: 0 0 6px;
    color: var(--navy);
    font-size: 16px;
    line-height: 1.2;
}

.datasheet-summary p {
    max-width: 155mm;
    margin: 0;
    color: var(--muted);
}

.datasheet-specifications .spec-table {
    max-width: 125mm;
}

.datasheet-specifications .spec-table th {
    width: 34%;
    color: var(--navy);
    background: #edf3f7;
}

.datasheet-specifications .spec-table td {
    background: #fff;
}

.content-body {
    min-width: 0;
}

.content-body p {
    margin: 0 0 8px;
}

.content-body .content-subtitle {
    margin: 15px 0 7px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line);
    color: var(--navy);
    font-size: 13px;
    line-height: 1.25;
}

.content-body .content-subtitle span {
    color: inherit;
}

.content-body .content-image {
    margin: 10px 0;
    text-align: center;
}

.content-body .content-image img {
    max-width: 100%;
    max-height: 75mm;
    object-fit: contain;
}

.spec-table-wrapper {
    overflow-x: auto;
    margin: 9px 0 13px;
    page-break-inside: auto;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 9px;
}

.spec-table th,
.spec-table td {
    padding: 5px 6px;
    border: 1px solid #cbd7e0;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.spec-table th {
    color: #fff;
    background: var(--navy);
    font-weight: 700;
}

.spec-table tr:nth-child(even) td {
    background: #f7fafc;
}

.spec-table thead {
    display: table-header-group;
}

.spec-table tr {
    break-inside: avoid;
}

.datasheet-wide-table {
    page: datasheet-wide;
}

.datasheet-wide-heading {
    page: datasheet-wide;
    break-before: page;
}

.datasheet-wide-heading + .datasheet-wide-table {
    break-before: auto;
}

.datasheet-wide-table .spec-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 9px;
}

.datasheet-wide-table .spec-table th,
.datasheet-wide-table .spec-table td {
    padding: 5px 6px;
}

.datasheet-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 20px;
    padding-top: 9px;
    border-top: 2px solid var(--navy);
    font-size: 8px;
}

.datasheet-footer div {
    display: grid;
    gap: 2px;
}

.datasheet-footer strong {
    color: var(--navy);
}

.datasheet-footer p {
    max-width: 70mm;
    margin: 0;
    text-align: right;
}

@media screen {
    body {
        padding: 24px;
        background: #eef2f5;
    }

    .datasheet {
        max-width: 900px;
        padding: 34px;
        background: #fff;
        box-shadow: 0 10px 35px rgba(8, 43, 73, .12);
    }
}

@media print {
    .datasheet-cover {
        grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
        min-height: 96mm;
    }

    .cover-image {
        min-height: 84mm;
    }

    .cover-image img {
        max-height: 82mm;
    }
}
@media print {
    .spec-table-wrapper {
        overflow: visible;
    }
}

@media (max-width: 700px) {
    .datasheet-cover {
        grid-template-columns: 1fr;
    }

    .cover-image {
        min-height: 72mm;
    }

    .cover-image img {
        max-height: 70mm;
    }

    .product-facts {
        grid-template-columns: 1fr;
    }

    .datasheet-header,
    .datasheet-brand,
    .datasheet-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .datasheet-label,
    .datasheet-footer p {
        text-align: left;
    }
}
