:root {
    --bg: #0C100E;
    --bg-deep: #080A09;
    --panel: #141A16;
    --panel-2: #1A2420;
    --title: #E8F6EE;
    --text: #CDE3D6;
    --muted: #8FB3A0;
    --soft: #6E8F7E;
    --green: #2A9D5C;
    --green-light: #3CB371;
    --green-deep: #146B3A;
    --sand: #EFE6D2;
    --border: rgba(42,157,92,0.18);
    --border-strong: rgba(42,157,92,0.45);
    --shadow: 0 12px 28px rgba(8,10,9,0.35);
    --topline-h: 22px;
    --utility-h: 60px;
    --tabs-h: 40px;
    --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;
    padding-top: calc(var(--topline-h) + var(--utility-h) + var(--tabs-h));
}
body.panel-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.site-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.topline {
    height: var(--topline-h);
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
    color: var(--green-light);
    font-size: 12px;
}
.topline-inner,
.utility-inner,
.section-tabs-inner,
.footer-inner,
.site-main > .page-shell,
.site-main > .home-shell {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}
.topline-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
.top-search-btn {
    position: relative;
    border: 0;
    background: transparent;
    color: var(--green-light);
    padding: 0 4px;
    height: 22px;
    cursor: pointer;
}
.top-search-btn::before {
    content: "";
    position: absolute;
    inset: -11px -8px;
}
.utilitybar {
    height: var(--utility-h);
    background: rgba(8,10,9,0.98);
    border-bottom: 1px solid var(--border-strong);
}
.utility-inner {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}
.brand-link { justify-self: start; min-height: 44px; display: inline-flex; align-items: center; }
.brand-logo, .drawer-logo, .footer-logo { height: 28px; width: auto; object-fit: contain; object-position: center; }
.brand-text { font-size: 16px; font-weight: 800; color: var(--title); letter-spacing: 0.04em; }
.drawer-toggle,
.app-quick,
.panel-close {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: #0B0E0C;
    color: var(--text);
    padding: 0 16px;
    cursor: pointer;
    font-size: 14px;
}
.drawer-toggle { justify-self: center; }
.app-quick { justify-self: end; }
.section-tabs {
    height: var(--tabs-h);
    background: #102319;
    border-bottom: 1px solid var(--border-strong);
}
.section-tabs-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.section-tabs a {
    min-height: 34px;
    padding: 0 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 13px;
}
.section-tabs a.is-active {
    background: var(--green);
    color: #08110C;
    font-weight: 800;
}
.site-main { min-height: 60vh; }
.page-shell, .home-shell { padding: 34px 0 72px; }
.page-header { margin-bottom: 24px; }
.eyebrow {
    font-size: 12px;
    color: var(--green-light);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
h1, h2, h3 { margin: 0; color: var(--title); }
h1 { font-size: 24px; line-height: 1.3; }
h2 { font-size: 20px; line-height: 1.4; }
h3 { font-size: 16px; line-height: 1.5; }
p { margin: 0 0 14px; }
.lead { margin-top: 12px; color: var(--muted); max-width: 840px; }
.section-block { margin-top: 28px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head p { margin: 0; color: var(--soft); font-size: 13px; }
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.prose-card { padding: 22px; }
.prose-card + .prose-card { margin-top: 14px; }
.prose-card p:last-child { margin-bottom: 0; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 14px; }
.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)); }
.spaced-grid { margin-top: 14px; }
.info-card { padding: 18px; }
.info-card h3 { margin-bottom: 8px; }
.info-card p { color: var(--muted); margin-bottom: 0; }
.kicker { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(42,157,92,0.12); border: 1px solid var(--border); color: var(--green-light); font-size: 12px; margin-bottom: 10px; }
.link-card { display: block; min-height: 100%; transition: transform .18s ease, border-color .18s ease; }
.link-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.link-card .more { display: inline-block; margin-top: 12px; color: var(--green-light); font-weight: 700; }
.media-slot {
    width: 100%;
    min-height: 180px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.media-slot img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.hero-media { height: 260px; }
.hero-media img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.module-media { height: 180px; }
.feature-media { height: 200px; }
.app-media { height: 360px; max-height: 360px; }
.icon-media { width: 48px; height: 48px; min-height: 48px; border-radius: 12px; flex: 0 0 48px; }
.hero-copy { padding: 22px 2px 0; }
.hero-brand { color: var(--sand); font-weight: 800; letter-spacing: .04em; margin-bottom: 6px; }
.hero-copy h1 { margin-bottom: 10px; }
.hero-copy .hero-intro { max-width: 860px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn-primary, .btn-secondary {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg,#3CB371 0%,#2A9D5C 55%,#146B3A 100%); color: #08110C; border: 1px solid transparent; }
.btn-secondary { background: #0A0D0B; border: 1px solid var(--border-strong); color: var(--text); }
.btn-primary:hover, .btn-secondary:hover, .drawer-toggle:hover, .app-quick:hover, .panel-close:hover { filter: brightness(1.08); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }
.number-list { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin: 16px 0; }
.number-list div { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.number-list b { color: var(--green-light); display: block; font-size: 12px; margin-bottom: 4px; }
.timeline { position: relative; margin: 0; padding: 0 0 0 28px; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 1px; background: var(--border-strong); }
.timeline li { position: relative; padding: 0 0 22px 8px; }
.timeline li::before { content: ""; position: absolute; width: 11px; height: 11px; border-radius: 50%; background: var(--green); border: 2px solid var(--bg); left: -25px; top: 6px; }
.timeline strong { color: var(--title); }
.status { display: inline-flex; min-height: 26px; align-items: center; padding: 0 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); color: var(--green-light); font-size: 12px; margin-left: 6px; }
.article-list { display: grid; gap: 12px; }
.article-row { padding: 16px 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.article-row h3 { margin-bottom: 6px; }
.article-row p { margin: 0; color: var(--muted); }
.meta-line { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--soft); }
.definition-list { margin: 0; display: grid; gap: 12px; }
.definition-list > div { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.definition-list dt { color: var(--title); font-weight: 800; margin-bottom: 6px; }
.definition-list dd { margin: 0; color: var(--muted); }
.faq-list { display: grid; gap: 12px; }
.faq-item { padding: 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.faq-item h2 { font-size: 16px; margin-bottom: 8px; }
.faq-item p { margin: 0; color: var(--muted); }
.notice { padding: 16px 18px; border-left: 3px solid var(--green); background: #101612; border-radius: 10px; color: var(--muted); }
.app-summary { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 18px; align-items: stretch; }
.app-copy { padding: 22px; }
.app-title-row { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }

.site-footer {
    background: #050706;
    border-top: 1px solid var(--border-strong);
    color: var(--text);
    font-size: 13px;
}
.footer-inner { padding: 34px 0 78px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.footer-brand div { display: grid; }
.footer-brand strong { color: var(--title); font-size: 16px; }
.footer-brand span { color: var(--soft); font-size: 12px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
.footer-grid h2 { font-size: 13px; margin-bottom: 8px; color: var(--sand); }
.footer-grid a { display: block; min-height: 32px; color: var(--muted); }
.footer-grid a:hover { color: var(--green-light); }
.footer-note { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); }
.footer-copy { margin: 8px 0 0; color: var(--soft); }

.site-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.66);
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}
.site-overlay.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
.drawer-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 400px;
    max-width: 86vw;
    background: #08100B;
    border-right: 1px solid var(--border-strong);
    z-index: 1300;
    transform: translateX(-102%);
    visibility: hidden;
    pointer-events: none;
    transition: transform .2s ease, visibility .2s ease;
    display: flex;
    flex-direction: column;
}
.drawer-panel.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.drawer-head { min-height: 68px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.drawer-brand { display: flex; align-items: center; gap: 10px; color: var(--title); }
.drawer-scroll { overflow-y: auto; padding: 12px 16px 28px; }
.drawer-group { margin-bottom: 18px; }
.drawer-group h2 { font-size: 12px; color: var(--green-light); margin: 0 0 8px; letter-spacing: .12em; }
.drawer-group a { display: grid; gap: 2px; padding: 11px 10px; border-radius: 10px; border: 1px solid transparent; min-height: 58px; }
.drawer-group a:hover { background: var(--panel); border-color: var(--border); }
.drawer-group b { color: var(--title); font-size: 14px; }
.drawer-group span { color: var(--soft); font-size: 12px; }

.search-panel {
    position: fixed;
    top: calc(var(--topline-h) + var(--utility-h));
    left: 50%;
    width: min(720px, calc(100% - 32px));
    transform: translate(-50%, -12px);
    z-index: 1350;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.search-panel.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
.search-card { background: #080B09; border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow); padding: 18px; }
.search-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.search-head > div { display: grid; }
.search-head strong { color: var(--title); }
.search-head span { color: var(--soft); font-size: 12px; }
.search-label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.search-input { width: 100%; height: 44px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--panel); color: var(--text); padding: 0 12px; }
.search-presets { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.search-presets a { min-height: 58px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); padding: 10px 12px; display: grid; align-content: center; }
.search-presets a:hover { border-color: var(--border-strong); }
.search-presets a span { color: var(--soft); font-size: 12px; }

.mobile-bottom { display: none; }

@media (max-width: 860px) {
    body { padding-top: calc(var(--topline-h) + var(--utility-h)); padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
    .section-tabs { display: none; }
    .utility-inner { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 6px; }
    .brand-link { overflow: hidden; }
    .brand-logo { max-width: 112px; }
    .drawer-toggle, .app-quick { padding: 0 10px; min-width: 44px; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .grid-3 { grid-template-columns: 1fr; }
    .app-summary { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .search-panel {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        transform: none;
        background: #060806;
        padding: 12px 16px 70px;
        overflow-y: auto;
    }
    .search-panel.is-open { transform: none; }
    .search-card { min-height: 100%; border: 0; box-shadow: none; padding: 10px 0; background: transparent; }
    .mobile-bottom {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        min-height: 48px;
        padding-bottom: env(safe-area-inset-bottom);
        background: #050706;
        border-top: 1px solid var(--border-strong);
        z-index: 1100;
        display: grid;
        grid-template-columns: repeat(5, minmax(0,1fr));
    }
    .mobile-bottom a { min-height: 48px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
    .mobile-bottom a.is-active { background: var(--green); color: #08110C; font-weight: 800; }
    .site-overlay { z-index: 1200; }
    .drawer-panel, .search-panel { z-index: 1300; }
    .footer-inner { padding-bottom: 84px; }
}

@media (max-width: 640px) {
    .topline-inner, .utility-inner, .footer-inner, .site-main > .page-shell, .site-main > .home-shell { width: calc(100% - 32px); }
    .page-shell, .home-shell { padding-top: 24px; }
    .grid-2, .grid-4, .search-presets { grid-template-columns: 1fr; }
    .number-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .hero-media { height: 260px; }
    .module-media { height: 180px; }
    .feature-media { height: 200px; }
    .app-media { height: 340px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .section-head { align-items: flex-start; flex-direction: column; }
}
