:root {
    --bg: #EEF0F8;
    --bg-deep: #E0E4F2;
    --surface: #F7F8FD;
    --surface-2: #EBEEF8;
    --ink: #1A1840;
    --text: #2C2A48;
    --muted: #5A5680;
    --soft: #7A76A0;
    --purple: #5B4BDB;
    --blue: #3A6BD4;
    --dark: #1C1A3A;
    --mist: #8AA4E0;
    --lilac: #8A6AD4;
    --border: rgba(58,107,212,.18);
    --border-strong: rgba(91,75,219,.42);
    --shadow: 0 12px 28px rgba(28,26,58,.08);
    --radius: 12px;
    --max: 1000px;
    --top-total: 118px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
img { max-width: 100%; display: block; }
.skip-link {
    position: fixed; left: 12px; top: -80px; z-index: 500;
    background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 8px;
    border: 1px solid var(--border-strong);
}
.skip-link:focus { top: 8px; }
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 200; }
.address-bar { height: 22px; background: var(--dark); color: #F7F8FD; font-size: 12px; }
.address-inner, .window-inner, .tabs-inner { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.address-inner { height: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.address-brand { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.text-button { background: transparent; border: 0; color: #F7F8FD; cursor: pointer; min-height: 22px; padding: 0 4px; }
.window-bar { height: 54px; background: var(--bg-deep); border-bottom: 1px solid var(--border); }
.window-inner { height: 54px; 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: 24px; width: auto; object-fit: contain; object-position: center; }
.brand-fallback { font-size: 16px; font-weight: 800; color: var(--ink); }
.app-entry { min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 999px; color: var(--ink); border: 1px solid var(--border-strong); background: rgba(247,248,253,.75); font-size: 14px; }
.drawer-trigger { justify-self: end; min-height: 44px; min-width: 72px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--ink); background: var(--surface); cursor: pointer; }
.section-tabs { height: 42px; background: var(--surface); border-bottom: 1px solid var(--border); }
.tabs-inner { height: 42px; display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; overflow: hidden; }
.tabs-inner a { min-height: 30px; padding: 4px 14px; display: inline-flex; align-items: center; border-radius: 999px; color: var(--muted); font-size: 13px; border: 1px solid transparent; }
.tabs-inner a:hover { border-color: var(--border); background: var(--surface-2); }
.tabs-inner a.active { background: var(--purple); color: #F7F8FD; }
.page-shell { max-width: var(--max); margin: 0 auto; padding: calc(var(--top-total) + 30px) 16px 72px; min-height: 70vh; }
h1, h2, h3 { color: var(--ink); margin: 0; letter-spacing: -.02em; }
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; }
section + section { margin-top: 32px; }
.page-intro, .content-card, .note-box, .window-card, .product-card, .compare-panel, .step-card, .faq-item, .terms-block {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.page-intro { padding: 24px; }
.eyebrow { font-size: 12px; color: var(--purple); font-weight: 800; letter-spacing: .08em; }
.page-intro h1 { margin-top: 4px; }
.page-intro p { margin-top: 12px; color: var(--muted); }
.hero-copy { display: grid; gap: 14px; }
.hero-line { font-size: 20px; font-weight: 800; color: var(--ink); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; 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: 700; white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg,#8AA4E0 0%,#5B4BDB 55%,#3A6BD4 100%); color: #F7F8FD; }
.btn-secondary { background: var(--surface); border: 1px solid var(--border-strong); color: var(--dark); }
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-1px); }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(58,107,212,.35); outline-offset: 3px; }
.media-slot { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; display: grid; place-items: center; overflow: hidden; }
.media-slot img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.media-slot.banner { height: 168px; }
.media-slot.wide { height: 176px; }
.media-slot.tall { height: min(320px, 58vw); }
.media-slot.medium { min-height: 170px; }
.media-placeholder { color: var(--soft); font-size: 13px; text-align: center; padding: 24px; }
.home-window { display: grid; gap: 18px; }
.home-window .window-card { padding: 18px; border-left: 4px solid var(--purple); }
.home-longform { display: grid; gap: 18px; }
.home-longform .text { padding: 2px 4px; }
.home-longform h2 { margin-bottom: 8px; }
.stack-stage { position: relative; display: grid; gap: 12px; padding-right: 24px; }
.step-card { padding: 18px; }
.step-card.offset { transform: translateX(24px); }
.step-card .meta { color: var(--soft); font-size: 12px; margin-bottom: 6px; }
.tag-wrap { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 18px; }
.tag { padding: 8px 14px; border-radius: 999px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); font-size: 13px; }
.read-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.compare-panel { padding: 18px; }
.compare-panel p { margin-top: 10px; color: var(--muted); }
.path-strip { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.path-strip span { background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink); border-radius: 10px; padding: 8px 14px; }
.path-strip i { color: var(--soft); font-style: normal; }
.center-cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; max-width: 760px; margin: 0 auto; }
.center-cards .content-card { padding: 20px; text-align: center; }
.product-card { max-width: 760px; margin: 0 auto; padding: 22px; text-align: center; }
.product-card .app-icon { width: 48px; height: 48px; object-fit: contain; margin: 0 auto 12px; }
.product-card p { color: var(--muted); margin-top: 10px; text-align: left; }
.prose { display: grid; gap: 14px; }
.prose h2 { margin-top: 10px; }
.prose p { color: var(--text); }
.prose .note-box { padding: 18px; background: var(--surface-2); }
.info-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.info-grid .content-card { padding: 18px; }
.info-grid p { color: var(--muted); margin-top: 8px; }
.window-layout { display: grid; gap: 18px; }
.window-frame { background: var(--dark); color: #F7F8FD; border-radius: 14px; padding: 10px; box-shadow: var(--shadow); }
.window-frame .frame-top { display: flex; gap: 6px; padding: 2px 4px 10px; }
.window-frame .frame-top span { width: 8px; height: 8px; border-radius: 50%; background: var(--mist); }
.window-frame .frame-body { background: var(--surface); color: var(--text); border-radius: 10px; padding: 20px; }
.ladder { display: grid; gap: 12px; padding-right: 32px; }
.ladder > article { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.ladder > article:nth-child(2) { transform: translateX(16px); }
.ladder > article:nth-child(3) { transform: translateX(32px); }
.wrap-tags-layout { display: grid; gap: 18px; }
.wrap-tags-layout .tag-panel { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.reading-sheet { max-width: 780px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 28px; }
.reading-sheet .reading-controls { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.reading-sheet .reading-controls span { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; font-size: 13px; }
.tool-list { display: grid; gap: 12px; }
.tool-row { display: grid; grid-template-columns: 150px 1fr; gap: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.tool-row strong { color: var(--ink); }
.tool-row p { color: var(--muted); }
.split-compare { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border-strong); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.split-compare section { margin: 0; padding: 22px; background: var(--surface); }
.split-compare section + section { border-left: 1px solid var(--border); background: var(--surface-2); }
.route-list { display: grid; gap: 14px; }
.route-item { display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.route-item .route-name { color: var(--purple); font-weight: 800; }
.memo-list { display: grid; gap: 14px; counter-reset: memo; }
.memo-item { position: relative; padding: 18px 18px 18px 62px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.memo-item::before { counter-increment: memo; content: counter(memo); position: absolute; left: 18px; top: 18px; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--purple); color: #fff; font-weight: 800; }
.center-explain { max-width: 760px; margin: 0 auto; display: grid; gap: 18px; }
.center-explain .content-card { padding: 22px; text-align: center; }
.center-explain .content-card p { text-align: left; color: var(--muted); margin-top: 8px; }
.terms { display: grid; gap: 14px; }
.terms-block { padding: 20px; }
.terms-block p { margin-top: 8px; color: var(--muted); }
.brand-statement { display: grid; gap: 18px; }
.brand-statement .statement-lead { background: var(--dark); color: #F7F8FD; border-radius: 14px; padding: 26px; }
.brand-statement .statement-lead h1 { color: #F7F8FD; }
.brand-statement .statement-lead p { margin-top: 12px; color: #EEF0F8; }
.faq-list { display: grid; gap: 14px; }
.faq-item { padding: 20px; }
.faq-item h2 { font-size: 16px; }
.faq-item p { color: var(--muted); margin-top: 8px; }
.site-footer { background: var(--dark); color: #EEF0F8; border-top: 1px solid rgba(138,164,224,.28); padding: 34px 16px 78px; font-size: 13px; }
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 24px; }
.footer-brand div { display: grid; gap: 2px; }
.footer-brand strong { color: #F7F8FD; }
.footer-brand span { color: #C9D4F0; }
.footer-links { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
.footer-links section { margin: 0; display: grid; align-content: start; gap: 7px; }
.footer-links h2 { color: #F7F8FD; font-size: 13px; margin-bottom: 4px; }
.footer-links a { color: #DDE5F7; }
.footer-links a:hover { color: #fff; }
.footer-note { margin-top: 24px; color: #D3DCF1; max-width: 780px; }
.footer-copy { margin-top: 10px; color: #AEB9D8; }
.screen-overlay { position: fixed; inset: 0; background: rgba(28,26,58,.38); z-index: 290; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease; }
.screen-overlay.visible { opacity: 1; visibility: visible; pointer-events: auto; }
.tool-drawer { position: fixed; z-index: 310; right: 18px; bottom: 18px; width: min(360px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: 0 18px 46px rgba(28,26,58,.22); padding: 16px; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(16px) scale(.98); transition: .18s ease; }
.tool-drawer.open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.drawer-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.drawer-brand { display: flex; gap: 8px; align-items: center; color: var(--ink); }
.drawer-close, .search-close { min-height: 44px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); padding: 0 14px; cursor: pointer; }
.drawer-groups { margin-top: 14px; display: grid; gap: 14px; }
.drawer-groups section { margin: 0; }
.drawer-groups h2 { font-size: 13px; color: var(--purple); margin-bottom: 8px; }
.drawer-groups a { display: grid; gap: 1px; padding: 9px 10px; border-radius: 9px; border: 1px solid transparent; }
.drawer-groups a:hover { border-color: var(--border); background: var(--surface-2); }
.drawer-groups b { color: var(--ink); font-size: 14px; }
.drawer-groups span { color: var(--soft); font-size: 12px; }
body.drawer-open, body.search-open { overflow: hidden; }
.search-panel { position: fixed; z-index: 305; left: 0; right: 0; top: 76px; visibility: hidden; pointer-events: none; opacity: 0; transform: translateY(-8px); transition: .18s ease; }
.search-panel.open { visibility: visible; pointer-events: auto; opacity: 1; transform: none; }
.search-card { max-width: 760px; margin: 0 auto; background: var(--bg-deep); border: 1px solid var(--border-strong); border-radius: 0 0 14px 14px; box-shadow: var(--shadow); padding: 20px; }
.search-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.search-head h2 { margin-top: 3px; }
.search-card > p { color: var(--muted); margin-top: 10px; }
.search-presets { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.search-presets a { min-height: 42px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--ink); }
.mobile-bottom { display: none; }
@media (max-width: 720px) {
    :root { --top-total: 76px; }
    .section-tabs { display: none; }
    .window-inner { grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; }
    .brand-link { min-width: 0; overflow: hidden; }
    .brand-fallback { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
    .app-entry { padding: 0 10px; }
    .drawer-trigger { min-width: 66px; }
    .page-shell { padding: calc(var(--top-total) + 22px) 16px 86px; }
    .read-split, .center-cards, .info-grid, .split-compare { grid-template-columns: 1fr; }
    .split-compare section + section { border-left: 0; border-top: 1px solid var(--border); }
    .step-card.offset, .ladder > article:nth-child(2), .ladder > article:nth-child(3) { transform: none; }
    .stack-stage, .ladder { padding-right: 0; }
    .tool-row, .route-item { grid-template-columns: 1fr; gap: 7px; }
    .reading-sheet { padding: 20px; }
    .footer-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .tool-drawer { width: 92%; right: 4%; bottom: calc(58px + env(safe-area-inset-bottom)); max-height: 70vh; }
    .search-panel { inset: 22px 0 0 0; top: 22px; background: var(--dark); color: #F7F8FD; }
    .search-card { min-height: calc(100vh - 22px); max-width: none; border: 0; border-radius: 0; background: var(--dark); color: #F7F8FD; padding: 24px 16px 90px; }
    .search-card h2, .search-card .eyebrow { color: #F7F8FD; }
    .search-card > p { color: #DDE5F7; }
    .search-close { background: transparent; color: #F7F8FD; border-color: rgba(247,248,253,.28); }
    .search-presets a { background: rgba(247,248,253,.08); color: #F7F8FD; border-color: rgba(247,248,253,.20); }
    .mobile-bottom { display: grid; position: fixed; z-index: 240; left: 0; right: 0; bottom: 0; grid-template-columns: repeat(4,1fr); min-height: calc(48px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); }
    .mobile-bottom a { min-height: 48px; display: grid; place-items: center; font-size: 13px; color: var(--muted); }
    .mobile-bottom a.active { background: var(--purple); color: #F7F8FD; }
    .site-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}
