:root {
    --bg: #F5FAFE;
    --deep-bg: #E7F2FA;
    --card: #FFFFFF;
    --secondary: #D7EAF6;
    --title: #16324A;
    --text: #2A4156;
    --muted: #4E6A80;
    --soft: #6E8899;
    --brand: #4AA3E0;
    --bright: #6BB8EC;
    --deep: #1B4A6E;
    --mist: #EAF5FC;
    --border: rgba(74,163,224,0.16);
    --border-strong: rgba(74,163,224,0.42);
    --shadow: 0 12px 28px rgba(27,74,110,0.08);
    --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
}
body.panel-open { overflow: hidden; }
a { color: var(--deep); text-decoration: none; }
a:hover { color: var(--brand); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
    outline: 3px solid rgba(74,163,224,0.38);
    outline-offset: 3px;
}
img { max-width: 100%; }
.skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 200;
    background: var(--card);
    color: var(--deep);
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.skip-link:focus { top: 10px; }

.topline {
    position: fixed;
    z-index: 60;
    top: 0;
    left: 0;
    right: 0;
    height: 22px;
    background: var(--deep);
    color: #FFFFFF;
}
.topline-inner, .masthead-inner, .section-tabs-inner, .footer-inner {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}
.topline-inner {
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}
.topline-brand { white-space: nowrap; }
.topline-search {
    position: relative;
    border: 0;
    background: transparent;
    color: #FFFFFF;
    padding: 0 4px;
    line-height: 22px;
    cursor: pointer;
}
.topline-search::before {
    content: "";
    position: absolute;
    inset: -11px -10px;
}

.masthead {
    position: fixed;
    z-index: 58;
    top: 22px;
    left: 0;
    right: 0;
    height: 60px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border);
}
.masthead-inner {
    height: 60px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
}
.brand-link { justify-self: start; display: inline-flex; min-height: 44px; align-items: center; }
.brand-logo, .drawer-logo, .footer-logo { height: 28px; width: auto; object-fit: contain; object-position: center; display: block; }
.brand-fallback, .footer-logo-fallback { font-size: 20px; font-weight: 800; color: var(--title); }
.drawer-trigger, .app-link, .btn {
    min-height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.drawer-trigger {
    justify-self: center;
    border: 1px solid var(--border-strong);
    color: var(--deep);
    background: #FFFFFF;
}
.app-link {
    justify-self: end;
    color: #FFFFFF;
    background: linear-gradient(135deg,#6BB8EC 0%,#4AA3E0 55%,#1B4A6E 100%);
}
.app-link:hover, .btn-primary:hover { color: #FFFFFF; filter: brightness(0.97); }

.section-tabs {
    position: fixed;
    z-index: 56;
    top: 82px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--mist);
    border-bottom: 1px solid var(--border);
}
.section-tabs-inner { display: flex; justify-content: center; align-items: center; gap: 10px; height: 40px; }
.tab-link {
    position: relative;
    min-width: 74px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 13px;
    color: var(--deep);
}
.tab-link::before { content: ""; position: absolute; inset: -6px 0; }
.tab-link.is-current { background: var(--brand); color: #FFFFFF; }

.site-main { padding-top: 122px; min-height: 70vh; }
.page-wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
.page-hero { padding: 38px 0 24px; }
.page-hero.compact { padding-bottom: 8px; }
.eyebrow { display: inline-block; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3 { color: var(--title); margin-top: 0; }
h1 { font-size: 24px; line-height: 1.3; margin-bottom: 14px; }
h2 { font-size: 20px; line-height: 1.45; margin-bottom: 12px; }
h3 { font-size: 16px; line-height: 1.5; margin-bottom: 8px; }
p { margin-top: 0; margin-bottom: 16px; }
.lead { color: var(--muted); max-width: 780px; font-size: 16px; }
.subtle { color: var(--soft); }

.cover-slot { height: 260px; background: var(--mist); }
.feature-slot { height: 180px; background: var(--mist); }
.section-slot { height: 200px; background: var(--mist); }
.app-slot { height: 340px; max-height: 360px; background: var(--mist); }
.icon-slot { width: 64px; height: 64px; background: var(--mist); border-radius: 14px; }
.icon-slot img { width: 48px; height: 48px; object-fit: contain; }
.inner-slot { height: 230px; background: var(--mist); }
.media-slot {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-slot img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }

.section { padding: 26px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-head p { margin: 0; color: var(--muted); max-width: 640px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}
.card.soft { background: var(--mist); box-shadow: none; }
.card p:last-child { margin-bottom: 0; }
.card .media-slot { margin-bottom: 16px; }
.card-number, .issue-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 32px;
    padding: 0 10px;
    border-radius: 9px;
    background: var(--brand);
    color: #FFFFFF;
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 12px;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { min-height: 42px; }
.btn-primary { background: linear-gradient(135deg,#6BB8EC 0%,#4AA3E0 55%,#1B4A6E 100%); color: #FFFFFF; border: 0; }
.btn-secondary { background: #FFFFFF; color: var(--deep); border: 1px solid var(--border-strong); }
.text-link { display: inline-flex; min-height: 44px; align-items: center; font-weight: 700; }

.cover-copy { max-width: 820px; margin-top: 18px; }
.cover-brand { font-size: 16px; color: var(--deep); font-weight: 800; margin-bottom: 6px; }
.cover-tagline { font-size: 24px; line-height: 1.3; color: var(--title); font-weight: 800; margin-bottom: 10px; }
.issue-layout, .app-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 22px; align-items: start; }
.number-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.number-list div { background: var(--mist); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.number-list strong { display: block; color: var(--brand); font-size: 18px; }
.shelf-list { display: grid; gap: 10px; }
.shelf-item { background: #FFFFFF; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start; }
.shelf-item strong { color: var(--title); min-width: 92px; }
.observer-list { display: grid; gap: 12px; counter-reset: obs; }
.observer-item { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; }
.observer-item .num { color: var(--brand); font-size: 26px; font-weight: 900; line-height: 1; }
.timeline { position: relative; display: grid; gap: 16px; }
.timeline::before { content: ""; position: absolute; left: 12px; top: 8px; bottom: 8px; width: 2px; background: var(--secondary); }
.timeline-item { position: relative; padding-left: 38px; }
.timeline-item::before { content: ""; position: absolute; left: 6px; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--brand); border: 3px solid #FFFFFF; box-shadow: 0 0 0 1px var(--border-strong); }
.status { display: inline-flex; min-height: 28px; align-items: center; border-radius: 8px; padding: 0 9px; background: var(--mist); color: var(--deep); font-size: 12px; font-weight: 800; margin-bottom: 7px; }
.article-prose { max-width: 860px; }
.article-prose h2 { margin-top: 30px; }
.article-prose h3 { margin-top: 22px; }
.article-prose ul, .article-prose ol { padding-left: 1.25em; }
.article-prose li { margin-bottom: 8px; }
.note-box { background: var(--mist); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin: 20px 0; }
.index-list { display: grid; gap: 12px; }
.index-link { display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: center; padding: 16px; background: #FFFFFF; border: 1px solid var(--border); border-radius: 12px; min-height: 72px; }
.index-link strong { color: var(--title); }
.index-link span { color: var(--muted); }
.index-link b { font-weight: 700; color: var(--brand); }
.faq-list { display: grid; gap: 14px; }
.faq-item { background: #FFFFFF; border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.faq-item h2 { font-size: 16px; margin-bottom: 8px; }
.faq-item p { margin-bottom: 0; }
.definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.definition-grid .card h2 { font-size: 17px; }

.mt-16 { margin-top: 16px; }
.mt-18 { margin-top: 18px; }
.mt-22 { margin-top: 22px; }

.site-footer { margin-top: 42px; background: var(--deep); color: #E7F2FA; border-top: 1px solid rgba(231,242,250,.3); padding: 34px 0 28px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.footer-logo-link { min-height: 44px; display: inline-flex; align-items: center; }
.footer-brand strong, .footer-brand span { display: block; color: #FFFFFF; }
.footer-brand span { font-size: 13px; color: #E7F2FA; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.footer-grid h2 { color: #FFFFFF; font-size: 14px; margin-bottom: 8px; }
.footer-grid a { display: flex; align-items: center; color: #E7F2FA; min-height: 44px; font-size: 13px; }
.footer-grid a:hover { color: #FFFFFF; }
.footer-note, .footer-copy { color: #E7F2FA; font-size: 13px; }
.footer-note { margin-top: 22px; max-width: 820px; }
.footer-copy { margin-bottom: 0; opacity: .86; }

.screen-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(22,50,74,.34);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}
.screen-overlay.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
.drawer-panel {
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    width: min(400px, 86vw);
    height: 100dvh;
    background: #FFFFFF;
    box-shadow: -18px 0 40px rgba(27,74,110,.16);
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform .25s ease, visibility .25s ease;
    overflow-y: auto;
}
.drawer-panel.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.drawer-head { position: sticky; top: 0; z-index: 2; background: #FFFFFF; border-bottom: 1px solid var(--border); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.drawer-brand { display: flex; align-items: center; gap: 9px; color: var(--title); }
.drawer-brand span { font-weight: 800; }
.panel-close { min-width: 68px; min-height: 44px; border: 1px solid var(--border-strong); border-radius: 10px; background: #FFFFFF; color: var(--deep); cursor: pointer; }
.drawer-groups { padding: 8px 16px 30px; }
.drawer-groups section { padding: 14px 0; border-bottom: 1px solid var(--border); }
.drawer-groups h2 { font-size: 14px; margin-bottom: 7px; }
.drawer-groups a { display: block; padding: 10px 8px; border-radius: 10px; }
.drawer-groups a:hover { background: var(--mist); }
.drawer-groups strong { display: block; color: var(--title); font-size: 14px; }
.drawer-groups span { display: block; color: var(--muted); font-size: 13px; }

.search-panel {
    position: fixed;
    z-index: 100;
    top: 82px;
    left: 50%;
    width: min(760px, calc(100% - 32px));
    transform: translate(-50%, -14px);
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 0 0 14px 14px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.search-panel.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
.search-panel-inner { padding: 22px; }
.search-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.search-head h2 { margin-bottom: 10px; }
.search-panel label { display: block; color: var(--muted); margin-bottom: 7px; }
.search-input { width: 100%; min-height: 46px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; color: var(--title); background: #FFFFFF; }
.search-presets { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 8px; }
.search-presets a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; background: var(--mist); border-radius: 9px; color: var(--deep); }
.search-empty { color: var(--muted); margin: 8px 0; }
.mobile-bottom { display: none; }

@media (max-width: 820px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .issue-layout, .app-layout { grid-template-columns: 1fr; }
    .number-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    body { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
    .section-tabs { display: none; }
    .site-main { padding-top: 82px; }
    .topline-inner, .masthead-inner, .page-wrap, .footer-inner { width: calc(100% - 32px); }
    .masthead-inner { grid-template-columns: 1fr auto 1fr; gap: 8px; }
    .brand-link { min-width: 48px; }
    .drawer-trigger, .app-link { min-height: 44px; padding: 0 12px; }
    .page-hero { padding-top: 28px; }
    .cover-slot { height: 260px; }
    .feature-slot { height: 180px; }
    .app-slot { height: 320px; }
    .search-panel {
        inset: 0;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        transform: none;
        border: 0;
        border-radius: 0;
        background: var(--deep);
        color: #FFFFFF;
        overflow-y: auto;
    }
    .search-panel.is-open { transform: none; }
    .search-panel-inner { min-height: 100%; padding: 28px 16px 86px; }
    .search-panel .eyebrow, .search-panel h2, .search-panel label, .search-panel .text-link { color: #FFFFFF; }
    .search-panel .panel-close { background: transparent; border-color: rgba(255,255,255,.42); color: #FFFFFF; }
    .search-presets a { background: #FFFFFF; color: var(--deep); }
    .search-empty { color: #E7F2FA; }
    .mobile-bottom {
        position: fixed;
        z-index: 54;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(48px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: #FFFFFF;
        border-top: 1px solid var(--border);
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .mobile-item { display: flex; align-items: center; justify-content: center; min-height: 48px; font-size: 13px; color: var(--deep); }
    .mobile-item.is-current { background: var(--brand); color: #FFFFFF; }
    .site-footer { margin-bottom: 0; }
    .index-link { grid-template-columns: 82px 1fr; }
    .index-link b { display: none; }
}

@media (max-width: 560px) {
    .grid-2, .grid-3, .grid-4, .definition-grid { grid-template-columns: 1fr; }
    .section-head { display: block; }
    .shelf-item { display: block; }
    .shelf-item strong { display: block; margin-bottom: 6px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .cover-tagline { font-size: 22px; }
    h1 { font-size: 24px; }
}
