/* Shared shell and reusable components; visual language follows ROM之家. */
.site-menu { display:none }
:root {
    --brand:#237cd2;
    --brand-strong:#1963be;
    --brand-soft:#edf5ff;
    --ink:#333;
    --muted:#9299a3;
    --line:#ededed;
    --surface:#fff;
    --canvas:#f8f8f8
}
*,*::before,*::after {
    box-sizing:border-box
}
html {
    scroll-behavior:smooth;
    scroll-padding-top:20px
}
body {
    margin:0;
    color:var(--ink);
    background:var(--canvas);
    font:14px/1.65 Arial,"Microsoft YaHei",sans-serif
}
h1,h2,h3,h4,p,ul,ol,dl,dd {
    margin:0
}
ul,ol {
    padding:0;
    list-style:none
}
a {
    color:inherit;
    text-decoration:none
}
a:hover {
    color:var(--brand)
}
img {
    display:block;
    max-width:100%;
    object-fit:cover
}
button,input {
    font:inherit
}
button {
    cursor:pointer
}
button:disabled {
    cursor:default
}
button,a {
    -webkit-tap-highlight-color:transparent
}
[hidden] {
    display:none!important
}
:focus-visible {
    outline:3px solid #64c9fa;
    outline-offset:3px
}
.container {
    width:min(1200px,calc(100% - 40px));
    margin-inline:auto
}
.utility-bar {
    background:#33363d;
    color:#c3cbd4;
    font-size:12px
}
.utility-inner {
    display:flex;
    justify-content:space-between;
    align-items:center;
    min-height:32px
}
.site-header {
    background:#fff;
    border-bottom:1px solid var(--line)
}
.header-inner {
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:96px;
    gap:24px
}
.site-logo {
    color:var(--brand);
    font-size:31px;
    font-weight:700;
    letter-spacing:2px;
    white-space:nowrap
}
.site-logo span {
    display:block;
    font-size:11px;
    font-weight:400;
    color:var(--muted);
    letter-spacing:2px
}
.site-nav {
    display:flex;
    gap:32px;
    font-size:16px
}
.site-nav a {
    display:block;
    padding:33px 0 29px;
    border-bottom:3px solid transparent;
    white-space:nowrap
}
.site-nav .is-active a,.site-nav a:hover {
    border-color:var(--brand);
    color:var(--brand)
}
.page-content {
    padding-block:24px;
    min-height:60vh
}
.skip-link {
    position:absolute;
    left:8px;
    top:-100px;
    background:#fff;
    padding:10px;
    z-index:50
}
.skip-link:focus {
    top:8px
}
.site-footer {
    padding:30px 0;
    text-align:center;
    color:var(--muted);
    border-top:1px solid var(--line);
    font-size:12px;
    background:#fff
}
.site-footer p+p {
    margin-top:5px
}
.site-footer nav {
    display:flex;
    justify-content:center;
    gap:22px;
    margin-bottom:10px
}
.breadcrumb {
    display:flex;
    flex-wrap:wrap;
    gap:9px;
    font-size:13px;
    color:#9098a1;
    margin-bottom:18px
}
.content-grid {
    display:grid;
    grid-template-columns:minmax(0,1fr) 280px;
    gap:24px;
    align-items:start
}
.content-grid>div {
    min-width:0
}
.panel {
    background:var(--surface);
    border:1px solid var(--line);
    margin-bottom:22px;
    min-width:0
}
.section-heading {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    min-height:58px;
    padding:14px 20px;
    border-bottom:1px solid var(--line)
}
.section-heading h1,.section-heading h2 {
    font-size:18px;
    font-weight:500;
    line-height:1.4;
    border-left:3px solid var(--brand);
    padding-left:11px
}
.section-heading>a,.section-heading>span {
    font-size:12px;
    color:var(--muted)
}
.category-filter {
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    padding:16px 20px;
    border-bottom:1px solid var(--line)
}
.category-filter a,.tag-list a {
    font-size:13px;
    padding:5px 12px;
    background:#f7f8fa
}
.category-filter a.is-active,.category-filter a:hover,.tag-list a:hover {
    background:var(--brand-soft);
    color:var(--brand)
}
.download-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    padding:0 20px;
    gap:0 22px
}
.download-card {
    min-width:0;
    border-bottom:1px solid #f1f1f1
}
.card-link {
    display:flex;
    align-items:center;
    gap:12px;
    min-height:106px;
    padding:18px 0
}
.card-link img {
    width:62px;
    height:62px;
    flex-shrink:0;
    border-radius:13px;
    background:#f4f5f7
}
.card-info {
    min-width:0;
    flex:1
}
.card-info h3 {
    font-size:14px;
    font-weight:500;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis
}
.card-info p,.card-info>span {
    font-size:12px;
    color:var(--muted);
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    margin-top:5px;
    display:block
}
.card-action {
    color:var(--brand);
    border:1px solid #c9ddf4;
    border-radius:3px;
    padding:3px 10px;
    font-size:12px;
    flex-shrink:0
}
.card-link:hover .card-action {
    color:#fff;
    background:var(--brand)
}
.sidebar .download-grid {
    grid-template-columns:1fr;
    padding:0 15px
}
.sidebar .card-action {
    display:none
}
.sidebar .card-link {
    gap:10px;
    min-height:93px
}
.sidebar .card-link img {
    width:48px;
    height:48px
}
.topic-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:24px;
    padding:22px
}
.topic-card {
    min-width:0;
    border:1px solid var(--line);
    background:#fff
}
.topic-card img {
    width:100%;
    height:155px;
    background:#f5f5f5
}
.topic-card a>div {
    padding:14px 16px
}
.topic-card h2 {
    font-size:16px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-weight:500
}
.topic-card p {
    font-size:13px;
    color:var(--muted);
    margin:9px 0;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
    min-height:42px
}
.topic-card span {
    font-size:12px;
    color:var(--brand)
}
.article-list {
    padding:0 22px
}
.article-card {
    border-bottom:1px solid var(--line)
}
.article-card:last-child {
    border:0
}
.article-card>a {
    display:flex;
    gap:20px;
    padding:22px 0
}
.article-card img {
    width:165px;
    height:105px;
    flex-shrink:0
}
.article-card h2 {
    font-size:17px;
    line-height:1.5;
    font-weight:500
}
.article-card p {
    color:var(--muted);
    font-size:13px;
    margin:9px 0;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden
}
.article-card time {
    color:var(--muted);
    font-size:12px
}
.sidebar .article-list {
    padding:0 16px
}
.sidebar .article-card img {
    display:none
}
.sidebar .article-card h2 {
    font-size:14px
}
.sidebar .article-card p {
    display:none
}
.sidebar .article-card>a {
    padding:15px 0
}
.empty-state {
    padding:40px 20px;
    text-align:center;
    color:var(--muted)
}
.pager {
    padding:24px 15px;
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:6px;
    font-size:13px
}
.pager a,.pager b {
    padding:5px 10px;
    border:1px solid var(--line);
    font-weight:400
}
.pager b,.pager a:hover {
    background:var(--brand);
    color:#fff;
    border-color:var(--brand)
}
.pager .total {
    align-self:center;
    color:var(--muted)
}
.load-more {
    display:block;
    width:calc(100% - 40px);
    margin:0 20px 22px;
    border:1px solid #d8e2f0;
    background:#f6faff;
    color:var(--brand);
    padding:12px
}
.load-more:disabled {
    color:var(--muted)
}
.button {
    display:inline-block;
    padding:11px 26px;
    background:var(--brand);
    color:white;
    text-align:center;
    border-radius:3px;
    border:0
}
.button:hover {
    background:var(--brand-strong);
    color:#fff
}
.is-disabled {
    color:#888!important;
    background:#e6e8eb!important;
    cursor:default
}
.rich-content {
    padding:22px;
    overflow-wrap:anywhere;
    font-size:15px;
    line-height:1.95
}
.rich-content p {
    margin-bottom:14px
}
.rich-content img,.rich-content video,.rich-content iframe {
    max-width:100%;
    height:auto
}
.rich-content table {
    display:block;
    max-width:100%;
    overflow-x:auto
}
.rich-content a {
    color:var(--brand)
}
.rich-content h2,.rich-content h3 {
    margin:18px 0 10px
}
.rich-content ul,.rich-content ol {
    list-style:revert;
    padding-left:24px
}
.back-to-top {
    position:fixed;
    right:22px;
    bottom:28px;
    width:42px;
    height:42px;
    border:1px solid #ddd;
    background:white;
    color:var(--brand);
    font-size:22px;
    z-index:10
}
.site-mobile .container {
    max-width:760px
}
.site-mobile .content-grid {
    display:block
}
.site-mobile .sidebar {
    display:none
}
.site-mobile .topic-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
}
@media(max-width:980px) {
    .content-grid {
        display:block
    }
    .sidebar {
        display:none
    }
    .topic-grid {
        grid-template-columns:repeat(2,minmax(0,1fr))
    }
    .site-nav {
        gap:22px
    }
}
@media(max-width:700px) {
    .container {
        width:calc(100% - 24px)
    }
    .utility-bar {
        font-size:10px
    }
    .header-inner {
        display:block;
        padding-top:16px;
        min-height:0
    }
    .site-logo {
        font-size:27px
    }
    .site-logo span {
        font-size:10px
    }
    .site-nav {
        gap:26px;
        font-size:14px;
        overflow-x:auto;
        margin-top:12px
    }
    .site-nav a {
        padding:10px 0 12px
    }
    .page-content {
        padding-top:17px
    }
    .breadcrumb {
        font-size:12px;
        margin-bottom:13px;
        gap:6px
    }
    .panel {
        margin-bottom:15px
    }
    .section-heading {
        padding:13px 15px;
        min-height:49px
    }
    .section-heading h1,.section-heading h2 {
        font-size:17px
    }
    .category-filter {
        padding:12px;
        gap:6px
    }
    .category-filter a {
        font-size:12px;
        padding:4px 9px
    }
    .download-grid {
        grid-template-columns:1fr;
        padding:0 15px
    }
    .card-link {
        min-height:96px
    }
    .card-link img {
        width:55px;
        height:55px
    }
    .card-info h3 {
        font-size:14px
    }
    .card-info p,.card-info>span {
        font-size:11px
    }
    .topic-grid {
        gap:12px;
        padding:14px
    }
    .topic-card img {
        height:105px
    }
    .topic-card a>div {
        padding:11px
    }
    .topic-card h2 {
        font-size:14px
    }
    .topic-card p {
        font-size:11px
    }
    .article-list {
        padding:0 15px
    }
    .article-card>a {
        gap:12px;
        padding:17px 0
    }
    .article-card img {
        width:100px;
        height:78px
    }
    .article-card h2 {
        font-size:14px
    }
    .article-card p {
        font-size:12px;
        -webkit-line-clamp:1;
        margin:5px 0
    }
    .article-card time {
        font-size:11px
    }
    .pager {
        padding:18px 10px;
        gap:5px;
        font-size:11px
    }
    .pager a,.pager b {
        padding:4px 7px
    }
    .rich-content {
        padding:16px;
        font-size:14px
    }
    .site-footer {
        padding:23px 0;
        font-size:11px
    }
    .back-to-top {
        right:12px;
        bottom:15px;
        width:36px;
        height:36px
    }
    .load-more {
        margin:0 15px 17px;
        width:calc(100% - 30px)
    }
}
@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior:auto
    }
}
