/* ==========================================================
   Flyfy 协议文档 - 响应式
   只放断点内的覆盖规则，跟随 agreement.css 加载，避免主文件过长。
   ========================================================== */

@media (max-width: 1199.98px) {
    .agreement-body {
        display: block;
    }

    .agreement-toc {
        display: none;
    }

    .agreement-toc-mobile {
        display: block;
    }

    .agreement-body {
        padding-top: 44px;
    }

    .agreement-section {
        scroll-margin-top: 148px;
    }
}

@media (min-width: 1200px) {
    body[data-page="agreement"] .site-footer .container,
    body[data-page="privacy"] .site-footer .container {
        padding-left: calc(var(--agreement-toc-width) + var(--agreement-column-gap) + 12px);
    }
}

@media (max-width: 767.98px) {
    body[data-page="agreement"],
    body[data-page="privacy"] {
        --agreement-mobile-toc-space: 94px;
    }

    .agreement-masthead .agreement-container {
        padding-top: 46px;
        padding-bottom: 38px;
    }

    .agreement-masthead h1,
    html[lang^="en"] .agreement-masthead h1 {
        font-size: clamp(2.15rem, 9.5vw, 2.85rem);
        line-height: 1.12;
    }

    .agreement-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 34px;
    }

    .agreement-meta div {
        padding: 15px 14px 15px 0;
        border-bottom: 1px solid var(--stock-border);
    }

    .agreement-meta div:nth-child(2) {
        padding-left: 14px;
        border-right: 0;
    }

    .agreement-meta div:nth-child(3) {
        padding-left: 0;
    }

    .agreement-meta div:nth-child(3),
    .agreement-meta div:nth-child(4) {
        border-bottom: 0;
    }

    .agreement-meta div:nth-child(4) {
        padding-left: 14px;
    }

    .agreement-body {
        padding-top: 34px;
        padding-bottom: 82px;
    }

    .agreement-toc-mobile {
        margin-bottom: 30px;
        border-radius: 16px;
    }

    .agreement-toc-mobile .agreement-toc__list {
        grid-template-columns: 1fr;
    }

    .agreement-section + .agreement-section {
        margin-top: 42px;
        padding-top: 38px;
    }

    .agreement-section h2 {
        grid-template-columns: 31px minmax(0, 1fr);
        margin-bottom: 17px;
        gap: 8px;
        font-size: 1.35rem;
    }

    .agreement-section--intro h2 {
        grid-template-columns: 1fr;
    }

    .agreement-copy {
        padding-left: 39px;
        gap: 12px;
    }

    .agreement-copy p {
        font-size: .94rem;
        line-height: 1.82;
    }

    .agreement-end {
        display: block;
        margin-top: 52px;
    }

    .agreement-end span {
        display: block;
        margin-top: 11px;
    }
}

@media (max-width: 575.98px) {
    .agreement-masthead__top {
        margin-bottom: 18px;
    }

    .agreement-print {
        min-height: 36px;
        padding: 0 11px;
    }

    .agreement-meta {
        grid-template-columns: 1fr;
    }

    .agreement-meta div,
    .agreement-meta div:not(:first-child),
    .agreement-meta div:nth-child(2),
    .agreement-meta div:nth-child(3),
    .agreement-meta div:nth-child(4) {
        padding: 14px 0;
        border-right: 0;
        border-bottom: 1px solid var(--stock-border);
    }

    .agreement-meta div:last-child {
        border-bottom: 0;
    }
}

@media print {
    @page {
        size: Letter;
        margin: 19mm 18mm;
    }

    body[data-page="agreement"],
    body[data-page="privacy"] {
        padding-top: 0;
        color: #000;
        background: #fff;
    }

    .stock-navbar,
    .site-footer,
    .back-to-top,
    .agreement-toc,
    .agreement-toc-mobile,
    .agreement-print {
        display: none !important;
    }

    .agreement-container,
    .agreement-body {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .agreement-masthead {
        border-bottom: 1px solid #bbb;
        background: #fff;
    }

    .agreement-masthead .agreement-container {
        padding: 0 0 8mm;
    }

    .agreement-masthead h1,
    html[lang^="en"] .agreement-masthead h1 {
        font-size: 27pt;
    }

    .agreement-subtitle {
        margin-top: 4mm;
        color: #222;
        font-size: 11pt;
    }

    .agreement-meta {
        grid-template-columns: repeat(4, 1fr);
        margin-top: 8mm;
    }

    .agreement-meta div,
    .agreement-meta div:not(:first-child),
    .agreement-meta div:nth-child(2),
    .agreement-meta div:nth-child(3),
    .agreement-meta div:nth-child(4) {
        padding: 3mm 4mm 3mm 0;
        border-right: 1px solid #bbb;
        border-bottom: 0;
    }

    .agreement-meta div:last-child {
        border-right: 0;
    }

    .agreement-body {
        padding: 9mm 0 0;
    }

    .agreement-section + .agreement-section {
        margin-top: 8mm;
        padding-top: 7mm;
        border-color: #bbb;
    }

    .agreement-section h2 {
        margin-bottom: 4mm;
        font-size: 15pt;
    }

    .agreement-copy {
        gap: 3mm;
    }

    .agreement-copy p,
    .agreement-copy .agreement-lead {
        color: #111;
        font-size: 10.2pt;
        line-height: 1.55;
    }

    .agreement-end {
        margin-top: 9mm;
        padding-top: 4mm;
        border-color: #bbb;
    }

    .agreement-end span {
        display: none;
    }
}
