:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #253244;
    background: #f8f9fa;
    line-height: 1.8;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: #005fc4; text-underline-offset: 0.2em; }
a:hover { color: #00438b; }
a:focus-visible, summary:focus-visible { outline: 3px solid #007bff; outline-offset: 5px; }
.skip-link { position: absolute; left: 16px; top: -100px; padding: 8px 16px; background: white; z-index: 2; }
.skip-link:focus { top: 12px; }
.site-header { border-bottom: 1px solid #e2e8f0; background: white; }
.header-inner { max-width: 1120px; margin: auto; padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.brand { color: #007bff; font-size: 24px; font-weight: 650; text-decoration: none; }
.site-nav, .language-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.site-nav a { color: #39485b; font-size: 15px; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.language-nav { gap: 4px; padding: 4px; border: 1px solid #dbe4f0; border-radius: 24px; background: #f8fbff; }
.language-nav a, .language-nav span { padding: 4px 14px; font-size: 14px; text-decoration: none; border-radius: 18px; }
.language-nav [aria-current="page"] { background: #007bff; color: white; }
.terms-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 32px; max-width: 1120px; margin: 40px auto 64px; padding: 0 28px; }
.terms-toc { position: sticky; top: 24px; font-size: 14px; }
.terms-toc h2 { margin: 0 0 14px; font-size: 15px; color: #5a687a; }
.terms-toc ol { list-style: none; margin: 0; padding: 0; }
.terms-toc li { margin: 0 0 4px; }
.terms-toc a { display: block; padding: 5px 10px; border-radius: 6px; color: #465468; text-decoration: none; }
.terms-toc a:hover { background: #eaf3ff; color: #005fc4; }
.mobile-toc { display: none; }
.terms-article { padding: 38px 42px 44px; background: white; border: 1px solid #e2e8f0; border-radius: 10px; min-width: 0; overflow-wrap: anywhere; }
.terms-article h1 { margin: 0 0 12px; font-size: 30px; line-height: 1.4; color: #1d2b3d; }
.terms-article h2 { margin: 34px 0 14px; padding-top: 16px; border-top: 1px solid #e9edf2; font-size: 21px; line-height: 1.5; color: #1d2b3d; scroll-margin-top: 24px; }
.terms-article p { margin: 12px 0; }
.terms-article ul { margin: 12px 0; padding-left: 22px; }
.terms-article li { margin: 8px 0; }
.terms-article .meta { margin: 0 0 24px; font-size: 14px; color: #647184; }
.terms-article .note { padding: 16px 18px; border-left: 3px solid #007bff; background: #f1f7ff; }
.site-footer { max-width: 1120px; margin: 0 auto; padding: 0 28px 32px; font-size: 14px; color: #647184; }
.site-footer a { margin-right: 20px; }

@media (max-width: 900px) {
    .header-inner { padding: 18px 20px; gap: 14px; }
    .site-nav { order: 3; width: 100%; gap: 20px; }
    .terms-layout { display: block; margin: 24px auto 40px; padding: 0 16px; }
    .terms-toc { display: none; }
    .mobile-toc { display: block; margin: 0 0 18px; padding: 12px 16px; background: white; border: 1px solid #e2e8f0; border-radius: 8px; }
    .mobile-toc summary { cursor: pointer; font-weight: 600; }
    .mobile-toc ol { margin: 14px 0 4px; padding-left: 20px; font-size: 14px; }
    .mobile-toc li { margin: 8px 0; }
    .terms-article { padding: 26px 22px 32px; }
    .terms-article h1 { font-size: 27px; }
    .terms-article h2 { font-size: 20px; }
}

@media (max-width: 380px) {
    .header-inner { padding: 16px; }
    .brand { font-size: 22px; }
    .language-nav a, .language-nav span { padding: 4px 10px; }
    .terms-article { padding: 24px 18px; }
}

@media print {
    :root { background: white; color: black; }
    .site-header, .terms-toc, .mobile-toc, .site-footer, .skip-link { display: none; }
    .terms-layout { display: block; max-width: none; margin: 0; padding: 0; }
    .terms-article { border: 0; padding: 0; }
    .terms-article h2 { break-after: avoid; }
}
