:root {
    color-scheme: light;
    --primary-color: #2078ff;
    --page-background: #f5f5f5;
    --card-background: #ffffff;
    --body-color: #333333;
    --muted-color: #666666;
    --border-color: #eeeeee;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page-background);
}

body.document-viewer {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--body-color);
    background: var(--page-background);
    font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

.document-page {
    width: 100%;
    padding: 15px;
}

.page-shell {
    width: min(100%, 840px);
    margin: 0 auto;
    padding: 20px 15px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--card-background);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.document-header {
    margin-bottom: 22px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.document-header img {
    width: auto;
    max-width: 150px;
    height: auto;
    margin-bottom: 12px;
}

.document-header h1 {
    margin: 0 0 6px;
    color: var(--primary-color);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.35;
}

.document-header h1:last-child {
    margin-bottom: 0;
}

.document-header p {
    margin: 0;
    color: var(--muted-color);
    font-size: 14px;
    line-height: 1.6;
}

.document-navigation {
    display: flex;
    justify-content: flex-start;
    margin: -6px 0 16px;
}

.document-back-button {
    display: inline-flex;
    min-height: 36px;
    padding: 8px 12px;
    align-items: center;
    gap: 5px;
    border: 1px solid #cbdfff;
    border-radius: 8px;
    color: #176be8;
    background: #f6f9ff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
    transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.document-back-button svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.document-back-button:hover,
.document-back-button:focus {
    color: #0f5fda;
    border-color: #9fc2fb;
    background: #edf5ff;
    transform: translateX(-1px);
}

.document-back-button:focus-visible {
    outline: 2px solid rgba(32, 120, 255, 0.28);
    outline-offset: 2px;
}

.paper {
    position: relative;
    color: #171717;
    background: #ffffff;
}

.letter-paper {
    width: 100%;
    max-width: 640px;
    margin-right: auto;
    margin-left: auto;
    padding: 2px 4px 0;
    font-family: "SimSun", "宋体", "Songti SC", "STSong", serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.9;
}

.letter-paper p,
.letter-paper h1,
.letter-paper h2 {
    margin: 0;
    font: inherit;
}

.letter-greeting {
    margin-bottom: 22px !important;
}

.letter-introduction {
    margin-bottom: 18px !important;
}

.document-line {
    display: block;
    white-space: normal;
}

.promise-section + .promise-section {
    margin-top: 18px;
}

.promise-section__title {
    margin-bottom: 1px !important;
    color: #222222;
    font-size: 16px !important;
    font-weight: 500 !important;
}

.promise-section__copy {
    color: #333333;
}

.detail-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.detail-link:hover,
.detail-link:focus {
    color: #1a68d5;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.detail-link:focus-visible,
.back-button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

.viability-note {
    margin-top: 2px;
    color: #555555;
    font-size: 13px;
    line-height: 1.75;
}

.signature-block {
    position: relative;
    width: min(100%, 280px);
    height: 170px;
    margin: 22px 0 0 auto;
}

.official-seal {
    position: absolute;
    top: 0;
    right: 22px;
    width: 150px;
    height: 153px;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

.official-seal__source {
    position: absolute;
    top: -39.4px;
    left: -80.9px;
    display: block;
    width: 270.3px;
    max-width: none;
    height: auto;
}

.company-signature {
    position: absolute;
    z-index: 2;
    top: 78px;
    right: 0;
    margin: 0;
    color: #222222;
    font: 400 15px/1.8 "SimSun", "宋体", "Songti SC", "STSong", serif;
    white-space: nowrap;
}

.page-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.back-button {
    display: block;
    width: 90%;
    max-width: 360px;
    margin: 0 auto;
    padding: 10px 0;
    border-radius: 8px;
    color: #ffffff;
    background: var(--primary-color);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
}

.back-button:hover,
.back-button:focus {
    color: #ffffff;
    background: #1a68d5;
}

.original-file {
    width: 100%;
    max-width: 640px;
    margin: 14px auto 0;
    text-align: left;
}

.original-file__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
}

.original-file__link:hover,
.original-file__link:focus {
    color: #1a68d5;
    background: #f2f7ff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.original-file__link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.original-file__link svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.paper-scroll {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
}

.technical-paper {
    width: 700px;
    min-width: 700px;
    margin-right: auto;
    margin-left: auto;
    padding: 2px 0 4px;
    font-family: "SimSun", "宋体", "Songti SC", "STSong", serif;
}

.literature-table {
    width: 100%;
    border: 1px solid #555555;
    border-collapse: collapse;
    table-layout: fixed;
    color: #222222;
    background: #ffffff;
}

.literature-table col:nth-child(1) {
    width: 5.78%;
}

.literature-table col:nth-child(2) {
    width: 49.35%;
}

.literature-table col:nth-child(3) {
    width: 44.87%;
}

.literature-table th,
.literature-table td {
    border: 1px solid #555555;
}

.literature-table th {
    padding: 10px 8px;
    background: #fafcfe;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    vertical-align: middle;
}

.literature-table td {
    padding: 8px 9px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.75;
    text-align: left;
    vertical-align: top;
}

.literature-table td:first-child {
    font-size: 13px;
    text-align: center;
}

.cell-line {
    display: block;
    white-space: normal;
}

.effectiveness-paper {
    width: 100%;
    max-width: 700px;
    margin-right: auto;
    margin-left: auto;
    font-family: "SimSun", "宋体", "Songti SC", "STSong", serif;
}

.evidence-page {
    margin: 0;
    padding: 14px;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    background: #f7f9fc;
}

.evidence-page + .evidence-page {
    margin-top: 20px;
}

.evidence-page img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #edf0f4;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(37, 55, 81, 0.08);
}

.clinical-trial-reference {
    margin-top: 20px;
    padding: 15px 17px;
    border-left: 3px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    background: #f4f8ff;
}

.clinical-trial-reference h2 {
    margin: 0 0 7px;
    color: #222222;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
}

.clinical-trial-reference a {
    color: var(--primary-color);
    font: 400 13px/1.7 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.clinical-trial-reference a:hover,
.clinical-trial-reference a:focus {
    color: #1a68d5;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.clinical-trial-reference a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

.screen-reader-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media screen {
    body.document-viewer--embedded {
        min-height: 0;
        background: #ffffff;
    }

    .document-viewer--embedded .document-page {
        padding: 0;
    }

    .document-viewer--embedded .page-shell {
        width: 100%;
        padding: 20px 15px;
        border-radius: 0;
        box-shadow: none;
    }
}

@media (max-width: 600px) {
    .document-page {
        padding: 10px;
    }

    .page-shell {
        padding: 18px 22px;
    }

    .document-viewer--embedded .page-shell {
        padding: 18px 28px;
    }

    .document-header {
        margin-bottom: 18px;
    }

    .document-header img {
        max-width: 125px;
        margin-bottom: 9px;
    }

    .document-header h1 {
        font-size: 20px;
    }

    .document-header p {
        font-size: 13px;
    }

    .letter-paper {
        padding-right: 1px;
        padding-left: 1px;
        font-size: 15px;
        line-height: 1.85;
    }

    .paper-scroll {
        overflow-x: visible;
    }

    .technical-paper {
        width: 100%;
        min-width: 0;
    }

    .literature-table col:nth-child(1) {
        width: 9%;
    }

    .literature-table col:nth-child(2) {
        width: 46%;
    }

    .literature-table col:nth-child(3) {
        width: 45%;
    }

    .literature-table th {
        padding: 8px 4px;
        font-size: 12px;
        line-height: 1.4;
    }

    .literature-table td {
        padding: 7px 5px;
        font-size: 11px;
        line-height: 1.65;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .literature-table td:first-child {
        padding-right: 2px;
        padding-left: 2px;
        font-size: 11px;
    }

    .promise-section__title {
        font-size: 15px !important;
    }

    .viability-note {
        font-size: 12px;
    }

    .signature-block {
        height: 155px;
    }

    .official-seal {
        right: 14px;
        width: 138px;
        height: 140.5px;
    }

    .official-seal__source {
        top: -36.2px;
        left: -74.4px;
        width: 248.6px;
    }

    .company-signature {
        top: 72px;
        font-size: 14px;
    }

    .evidence-page {
        padding: 8px;
        border-radius: 8px;
    }

    .evidence-page + .evidence-page {
        margin-top: 14px;
    }

    .clinical-trial-reference {
        margin-top: 14px;
        padding: 13px 14px;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    html,
    body.document-viewer {
        width: 210mm;
        min-width: 210mm;
        min-height: 297mm;
        background: #ffffff;
    }

    .document-page {
        width: 210mm;
        padding: 0;
    }

    .page-shell {
        width: 210mm;
        max-width: none;
        min-height: 297mm;
        margin: 0;
        padding: 0;
        overflow: visible;
        border-radius: 0;
        box-shadow: none;
    }

    .document-header,
    .document-navigation,
    .page-actions,
    .original-file {
        display: none !important;
    }

    .paper-scroll {
        width: 210mm;
        overflow: visible;
        padding: 0;
    }

    .paper {
        width: 210mm;
        min-width: 210mm;
        min-height: 297mm;
        overflow: hidden;
    }

    .letter-paper {
        width: 210mm;
        max-width: none;
        margin: 0;
        padding: 25.4mm 32.65mm 28mm;
        font-size: 10.56pt;
        line-height: 15.6pt;
    }

    .letter-greeting {
        margin-bottom: 27.36pt !important;
    }

    .letter-introduction {
        margin-bottom: 15.6pt !important;
    }

    .document-line {
        display: block;
        white-space: nowrap;
    }

    .promise-section + .promise-section {
        margin-top: 15.6pt;
    }

    .promise-section--with-note + .promise-section {
        margin-top: 14.4pt;
    }

    .promise-section__title {
        margin-bottom: 0 !important;
        color: #171717;
        font-size: 10.56pt !important;
        font-weight: 400 !important;
    }

    .promise-section__copy {
        color: #171717;
    }

    .detail-link {
        color: inherit;
        font-weight: 400;
        text-decoration: none;
    }

    .viability-note {
        margin-top: 0;
        color: #171717;
        font-size: 8.04pt;
        line-height: 16.8pt;
    }

    .signature-block {
        position: absolute;
        inset: 0;
        width: auto;
        height: auto;
        margin: 0;
        pointer-events: none;
    }

    .official-seal {
        top: 172.2mm;
        right: auto;
        left: 134.7mm;
        width: 40.6mm;
        height: 41.34mm;
    }

    .official-seal__source {
        top: -10.66mm;
        left: -21.89mm;
        width: 73.15mm;
    }

    .company-signature {
        top: 190.5mm;
        right: auto;
        left: 130.25mm;
        width: 48.5mm;
        color: #171717;
        font-size: 10.56pt;
        line-height: 15.6pt;
    }

    .technical-paper {
        position: relative;
        width: 210mm;
        min-width: 210mm;
        margin: 0;
        padding: 0;
    }

    .literature-table {
        position: absolute;
        top: 25.4mm;
        left: 32.01mm;
        width: 146.54mm;
        border: 0.5pt solid #000000;
    }

    .literature-table th,
    .literature-table td {
        border: 0.5pt solid #000000;
    }

    .literature-table thead tr {
        height: 8.45mm;
    }

    .literature-table th {
        padding: 0 1.9mm;
        background: #ffffff;
        font-size: 9pt;
        line-height: 1;
    }

    .literature-table tbody tr:nth-child(1) { height: 22.18mm; }
    .literature-table tbody tr:nth-child(2) { height: 11.18mm; }
    .literature-table tbody tr:nth-child(3) { height: 12.54mm; }
    .literature-table tbody tr:nth-child(4) { height: 16.68mm; }
    .literature-table tbody tr:nth-child(5) { height: 16.68mm; }
    .literature-table tbody tr:nth-child(6) { height: 16.73mm; }
    .literature-table tbody tr:nth-child(7) { height: 16.68mm; }
    .literature-table tbody tr:nth-child(8) { height: 16.68mm; }
    .literature-table tbody tr:nth-child(9) { height: 22.19mm; }
    .literature-table tbody tr:nth-child(10) { height: 22.18mm; }
    .literature-table tbody tr:nth-child(11) { height: 30.5mm; }

    .literature-table td {
        padding: 0 1.9mm;
        font-size: 7.56pt;
        line-height: 15.6pt;
    }

    .literature-table td:first-child {
        font-size: 9pt;
        line-height: 15.6pt;
        text-align: left;
    }

    .cell-line {
        display: block;
        white-space: nowrap;
    }
}
