﻿:root {
    --bg: #edf1f5;
    --bg-soft: #eef3f9;
    --card: #ffffff;
    --card-soft: #f8fbff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #d9e2ec;
    --line-strong: #c7d3e0;
    --brand: #1678d3;
    --brand-dark: #0f5ea8;
    --brand-soft: #e7f1fb;
    --accent: #00a88f;
    --danger: #d83b01;
    --shadow: 0 8px 24px rgba(15, 23, 42, .08);
    --maxw: 730px;
    --fs: 17px;
    --lh: 1.9;
    --radius:4px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f7f9fc 0%, #f3f6fb 100%);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    padding-top: 68px;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.hidden {
    display: none !important;
}

.site-app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    width: 100%;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(229, 231, 235, .88);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.site-app-header-inner {
    max-width: var(--maxw);
    min-height: 62px;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.site-app-logo {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.site-app-logo-box {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--brand);
}

.site-app-logo-box img {
    width: 100%;
    height: 100%;
    display: block;
}

.site-app-logo-text {
    min-width: 0;
    display: block;
}

.site-app-logo-text strong,
.site-app-logo-text small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.site-app-logo-text strong {
    color: var(--text);
    font-size: 16px;
    line-height: 1.1;
    font-weight: 900;
}

.site-app-logo-text small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
}

.site-app-header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-app-back-btn,
.site-app-menu-btn {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    border-radius: var(--radius);
    border: 1px solid #cde1f7;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.site-app-menu-btn {
    width: 38px;
    padding: 0;
}

.site-app-back-btn:hover,
.site-app-menu-btn:hover {
    background: #d9ecff;
}

.site-app-menu {
    position: relative;
    z-index: 20;
}

.site-app-menu-icon {
    display: inline-block;
    font-size: 13px;
    line-height: 1;
}

.site-app-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    width: 154px;
    padding: 6px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(217, 226, 236, .95);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
}

.site-app-menu-item {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0 10px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.site-app-menu-item:hover {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.app {
    max-width: var(--maxw);
    margin: 0 auto;
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(243,246,251,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.back-btn {
    min-height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--brand);
    background: #fff;
    color: var(--brand);
    cursor: pointer;
    border-radius: var(--radius);
}

.top-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--brand);
    background: #fff;
    color: var(--brand);
    cursor: pointer;
    transition: all .16s ease;
    border-radius: var(--radius);
}

.btn.primary {
    background: var(--brand);
    color: #fff;
}

.section {
    padding-top: 8px;
    padding-bottom: 8px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.hero-cover {
    width: 100%;
    height: 220px;
    background: #e8eef5;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.hero-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #8a97a6;
    font-size: 13px;
    background: linear-gradient(135deg, #edf3f9, #e3ebf4);
}

.hero-body {
    padding: 16px;
}

.cat-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
    color: var(--brand-dark);
    background: var(--brand-soft);
    border: 1px solid #cde1f7;
    border-radius: var(--radius);
}

.title {
    margin: 12px 0 10px;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: .2px;
}

.summary {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--muted);
    background: var(--card-soft);
    border-left: 4px solid var(--brand);
    padding: 10px 12px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-item {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    color: #526172;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.action-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.font-tools,
.quick-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hint {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    font-size: 13px;
    color: var(--muted);
    background: var(--bg-soft);
    border: 1px solid var(--line);
}

.article-wrap {
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

article {
    padding: 16px;
    font-size: var(--fs);
    line-height: var(--lh);
    color: var(--text);
    word-break: break-word;
}
article h1,
article h2,
article h3,
article h4 {
    color: #0f172a;
    line-height: 1.45;
    margin: 1.2em 0 .55em;
    font-weight: 700;
    font-size:1.2em;
}

article h2 {
    font-size: 22px;
}

article h3 {
    font-size: 19px;
}

article p {
    margin: 0 0 1em;
    color: #334155;
}

article ul,
article ol {
    margin: 0 0 1em 1.25em;
    padding: 0;
    color: #334155;
}

article li {
    margin: .45em 0;
}

article img {
    max-width: 100%;
    height: auto;
}

article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    overflow-x: auto;
    display: block;
}

article th,
article td {
    border: 1px solid var(--line);
    padding: 10px 8px;
    text-align: left;
    white-space: nowrap;
}

article blockquote {
    margin: 1em 0;
    padding: 12px 14px;
    background: var(--card-soft);
    border-left: 4px solid var(--brand);
    color: #475569;
}

article code {
    font-family: Consolas, Monaco, monospace;
    font-size: .95em;
    padding: .14em .34em;
    background: #eff4fb;
    border: 1px solid #d7e2ef;
    color: #0f5ea8;
}

article pre {
    overflow: auto;
    padding: 12px;
    background: #f4f8fc;
    border: 1px solid var(--line);
}

.loading,
.error {
    padding: 30px 16px;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    color: var(--muted);
    line-height: 1.7;
}

.error {
    color: var(--danger);
}

.footer-space {
    height: 20px;
}

footer.site-footer {
    margin-top: 8px;
    padding: 18px 14px 20px;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--muted);
    text-align: center;
}

footer.site-footer .footer-inner {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.law-note {
    margin-bottom: 10px;
    color: var(--danger);
    font-size: 13px;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.7;
}

.footer-links a {
    color: var(--brand);
}

.footer-links .sep {
    color: #c0cad6;
}

.footer-meta {
    margin-top: 10px;
    display: grid;
    gap: 4px;
    font-size: 12px;
    line-height: 1.7;
}

.footer-meta .slogan {
    color: #8794a5;
}

@media (max-width: 560px) {
    .site-app-header-inner {
        min-height: 56px;
        padding: calc(env(safe-area-inset-top, 0px) + 8px) 6px 8px;
        gap: 8px;
    }

    .site-app-logo-box {
        width: 34px;
        height: 34px;
    }

    .site-app-logo-text small {
        max-width: 150px;
    }

    .site-app-header-actions {
        gap: 6px;
    }

    .site-app-back-btn {
        min-height: 36px;
        padding: 0 10px;
    }

    .site-app-menu-panel {
        width: 146px;
    }

    .title {
        font-size: 23px;
    }

    .hero-cover {
        height: 190px;
    }

    article {
        padding: 14px;
    }

    footer.site-footer {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* background repeat guard */
body {
    background-repeat: no-repeat;
}

