:root {
    color-scheme: light;
    --page-bg: #edf3fb;
    --page-accent: #2458d3;
    --page-accent-strong: #17398d;
    --text-primary: #162033;
    --text-secondary: #43506a;
    --surface-main: rgba(255, 255, 255, 0.94);
    --border-soft: rgba(36, 88, 211, 0.14);
    --border-strong: rgba(36, 88, 211, 0.24);
    --shadow-soft: 0 24px 70px rgba(18, 35, 74, 0.12);
    --shadow-card: 0 12px 32px rgba(18, 35, 74, 0.08);
    --radius-outer: 28px;
    --radius-card: 18px;
    --radius-pill: 999px;
    --content-width: 980px;
    --transition-base: 220ms ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 32px 18px 56px;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.85;
    color: var(--text-primary);
    background:
        radial-gradient(circle at top left, rgba(73, 126, 255, 0.16), transparent 32%),
        radial-gradient(circle at top right, rgba(57, 154, 148, 0.12), transparent 28%),
        linear-gradient(180deg, #f6f9ff 0%, var(--page-bg) 100%);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.54), transparent 45%),
        linear-gradient(315deg, rgba(214, 228, 255, 0.4), transparent 40%);
    z-index: -1;
}

body > .policy-shell {
    width: min(100%, var(--content-width));
    margin: 0 auto;
    padding: 44px clamp(20px, 4.8vw, 52px) 52px;
    background: var(--surface-main);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: var(--radius-outer);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

body > .policy-shell > * {
    margin-top: 0;
    margin-bottom: 18px;
}

.policy-main-title {
    margin-bottom: 10px;
    font-size: clamp(2rem, 3vw, 2.85rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-align: center;
    color: #0e1f46;
}

.policy-revision {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    padding: 10px 18px;
    font-size: 0.95rem;
    color: var(--page-accent-strong);
    text-align: center;
    background: linear-gradient(135deg, rgba(219, 231, 255, 0.95), rgba(241, 246, 255, 0.92));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
}

body > .policy-shell p {
    margin-bottom: 14px;
    font-size: 0.98rem;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

body > .policy-shell b,
body > .policy-shell strong,
.notice-mark {
    color: var(--text-primary);
    font-weight: 700;
}

body > .policy-shell a {
    color: var(--page-accent-strong);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
    transition:
        color var(--transition-base),
        opacity var(--transition-base),
        background-color var(--transition-base),
        transform var(--transition-base),
        box-shadow var(--transition-base);
}

body > .policy-shell a:hover {
    color: var(--page-accent);
}

body > .policy-shell a:focus-visible,
.quick-nav-link:focus-visible {
    outline: 3px solid rgba(36, 88, 211, 0.22);
    outline-offset: 3px;
    border-radius: 10px;
}

.section-intro {
    margin: 32px 0 18px;
    padding: 14px 18px 14px 20px;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(242, 246, 255, 0.96), rgba(235, 242, 255, 0.82));
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.quick-nav-group {
    margin-bottom: 10px;
}

.quick-nav-link {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.9));
    border: 1px solid rgba(36, 88, 211, 0.12);
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(31, 62, 116, 0.06);
}

.quick-nav-link:hover,
.quick-nav-link:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(31, 62, 116, 0.1);
    background: linear-gradient(180deg, rgba(245, 249, 255, 1), rgba(231, 240, 255, 0.94));
}

.section-anchor {
    position: relative;
    margin: 36px 0 18px;
    padding: 0 0 12px 18px;
    font-size: clamp(1.35rem, 2vw, 1.72rem);
    font-weight: 700;
    line-height: 1.35;
    color: #0e1f46;
    border-bottom: 1px solid rgba(36, 88, 211, 0.14);
}

.section-anchor::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.24em;
    width: 6px;
    height: 1.1em;
    border-radius: var(--radius-pill);
    background: linear-gradient(180deg, var(--page-accent), #5e7fff);
}

.section-anchor:target {
    scroll-margin-top: 26px;
    color: var(--page-accent-strong);
}

.section-anchor:target::after {
    content: "";
    position: absolute;
    inset: -10px -12px -6px -12px;
    border-radius: var(--radius-card);
    background: rgba(219, 231, 255, 0.45);
    z-index: -1;
}

.section-subtitle {
    margin: 24px 0 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.notice-mark {
    display: inline;
}

#permission-grid {
    width: 100%;
    min-width: 680px;
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 20px 0 22px;
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
    background: #ffffff;
}

#permission-grid thead {
    background: linear-gradient(180deg, #eef4ff 0%, #e2ebff 100%);
}

#permission-grid tbody {
    background: #ffffff;
}

#permission-grid tr {
    border-bottom: 1px solid rgba(36, 88, 211, 0.1);
}

#permission-grid th,
#permission-grid td {
    padding: 14px 16px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    text-align: left;
    vertical-align: top;
    border-right: 1px solid rgba(36, 88, 211, 0.08);
}

#permission-grid th:last-child,
#permission-grid td:last-child {
    border-right: 0;
}

#permission-grid th {
    font-weight: 700;
    color: var(--text-primary);
}

#permission-grid tbody tr:nth-child(even) {
    background: rgba(246, 249, 255, 0.82);
}

@media (max-width: 760px) {
    body {
        padding: 18px 12px 36px;
        font-size: 15px;
    }

    body > .policy-shell {
        padding: 28px 16px 34px;
        border-radius: 22px;
    }

    .policy-main-title {
        letter-spacing: 0.02em;
    }

    .policy-revision {
        display: flex;
        width: 100%;
        padding: 10px 14px;
    }

    .section-intro,
    .quick-nav-link {
        border-radius: 14px;
    }

    .section-anchor {
        padding-left: 14px;
        margin-top: 28px;
    }

    .section-subtitle {
        font-size: 1.02rem;
    }

    #permission-grid {
        min-width: 560px;
        border-radius: 16px;
    }

    #permission-grid th,
    #permission-grid td {
        padding: 12px;
        font-size: 0.92rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

@media print {
    body {
        padding: 0;
        background: #ffffff;
    }

    body::before {
        display: none;
    }

    body > .policy-shell {
        width: 100%;
        max-width: none;
        padding: 0;
        border: 0;
        box-shadow: none;
        background: #ffffff;
    }

    .quick-nav-link,
    .section-intro,
    #permission-grid {
        box-shadow: none;
    }
}
