:root {
    --bg-color: #ffffff;
    --text-main: #1d1d1f;
    --text-secondary: #86868b;
    --accent-blue: #0071e3;
    --accent-blue-hover: #0077ed;
    --navbar-bg: rgba(255, 255, 255, 0.8);
    --card-bg: #f5f5f7;
    --code-bg: #1c1c1e;
    --max-width: 1100px;
    --transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    /* overflow-x: clip 不会创建滚动容器（不同于 hidden），因此不会破坏 iOS Safari 的
       position:fixed 页眉固定效果，同时彻底阻断日语长文本造成的水平溢出向上传递 */
    overflow-x: hidden; /* 旧版浏览器 fallback */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Myriad Set Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: -0.015em;
    overflow-x: hidden; /* 旧版浏览器 fallback */
    -webkit-font-smoothing: antialiased;
}

/* 现代浏览器：overflow-x: clip 只裁剪不创建滚动容器，
   避免 iOS Safari 因 body 成为滚动容器而导致 position:fixed 失效 */
@supports (overflow-x: clip) {
    html, body {
        overflow-x: clip;
    }
}

/* Navbar Styles */
#site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: var(--navbar-bg);
    backdrop-filter: saturate(180%) blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-content {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 19px;
    text-decoration: none;
    color: var(--text-main);
}

.nav-logo-img {
    width: 28px;
    height: 28px;
    margin-right: 10px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 13px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.nav-links a:hover { opacity: 1; }

.nav-links a.is-active {
    opacity: 1;
    color: var(--accent-blue);
    font-weight: 600;
    position: relative;
}

.nav-links a.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    border-radius: 1px;
    background: var(--accent-blue);
}

/* Language switcher */
.nav-lang-wrap {
    position: relative;
    flex-shrink: 0;
}

/* Nav right group (lang switcher + hamburger) */
.nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Hamburger button */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    border-radius: 8px;
    flex-shrink: 0;
}

.nav-hamburger:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.nav-hamburger-bar {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--text-main);
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s ease;
    transform-origin: center;
}

.nav-hamburger.is-open .nav-hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.is-open .nav-hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-hamburger.is-open .nav-hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile drawer */
.nav-drawer {
    display: none;
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 999;
    padding: 8px 0 16px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s ease;
}

.nav-drawer.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.nav-drawer a {
    display: block;
    padding: 12px 24px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-drawer a:hover {
    background: rgba(0, 113, 227, 0.06);
    color: var(--accent-blue);
}

.nav-drawer a.is-active {
    color: var(--accent-blue);
    font-weight: 600;
}

body.nav-drawer-open {
    overflow: hidden;
}

.nav-lang,
.nav-lang-trigger {
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
    border: none;
    background: transparent;
    font-family: inherit;
    color: inherit;
    padding: 6px 2px 6px 8px;
    border-radius: 8px;
    -webkit-appearance: none;
    appearance: none;
}

.nav-lang:hover,
.nav-lang-trigger:hover {
    opacity: 1;
}

.nav-lang-trigger:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.nav-lang-chevron {
    font-size: 9px;
    opacity: 0.5;
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

body.nav-lang-open .nav-lang-chevron {
    transform: rotate(180deg);
}

.nav-lang-backdrop {
    position: fixed;
    top: var(--nav-height, 52px);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 998;
    background: rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nav-lang-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1001;
    min-width: 232px;
    padding: 14px 10px 12px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border: 1px solid rgba(0, 113, 227, 0.14);
    border-radius: 16px;
    box-shadow:
        0 4px 24px rgba(0, 113, 227, 0.08),
        0 18px 56px rgba(0, 0, 0, 0.1);
}

.nav-lang-panel-hint {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 10px 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-lang-panel-hint-sub {
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0.02em;
}

.nav-lang-options {
    list-style: none;
    margin: 0;
    padding: 4px 0 0;
}

.nav-lang-options li {
    margin: 0;
}

.nav-lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 12px;
    margin: 2px 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}

.nav-lang-option:hover {
    background: rgba(0, 113, 227, 0.07);
    color: var(--accent-blue);
}

.nav-lang-option.is-active {
    background: rgba(0, 113, 227, 0.09);
    color: var(--accent-blue);
    cursor: default;
    font-weight: 600;
}

.nav-lang-option.is-active::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-blue);
    flex-shrink: 0;
    opacity: 0.85;
}

/* Hero Section */
.hero {
    padding: 160px 24px 80px;
    text-align: center;
    background: radial-gradient(circle at 50% 0%, #f0f7ff 0%, #ffffff 50%);
    overflow-x: hidden;
}

/* Initial state; main.js reveals on load */
#hero-entry {
    opacity: 0;
    transform: translateY(20px);
    transition: 1s ease-out;
}

/* Eyebrow badge */
.hero-eyebrow-wrap {
    margin-bottom: 22px;
}

.hero-eyebrow-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    background: rgba(0, 113, 227, 0.07);
    border: 1px solid rgba(0, 113, 227, 0.18);
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-blue);
    letter-spacing: 0.01em;
}

.hero-eyebrow-badge i {
    font-size: 14px;
}

/* H1 — primary keyword */
.hero h1 {
    font-size: clamp(40px, 6.5vw, 64px);
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
    line-height: 1.0;
    background: linear-gradient(180deg, #1d1d1f 0%, #3a3a3a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* SEO description — two logical lines (mobile: br hidden, natural wrap) */
.hero-desc {
    font-size: clamp(16px, 2.5vw, 19px) !important;
    color: var(--text-secondary) !important;
    max-width: min(52em, 720px) !important;
    margin: 0 auto 36px !important;
    line-height: 1.55 !important;
    font-weight: 400 !important;
}

/* Legacy .hero p — keep for any other paragraphs */
.hero p {
    font-size: clamp(16px, 2.5vw, 19px);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 36px;
    font-weight: 400;
    line-height: 1.65;
}

/* ─── Five-platform strip ────────────────────────────── */
.hero-platforms {
    display: inline-flex;
    align-items: center;
    margin: 36px auto 0;
    background: rgba(0, 0, 0, 0.035);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 40px;
    padding: 8px 20px;
    gap: 0;
}

.hero-plat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.hero-plat-item:hover {
    color: var(--text-main);
}

.hero-plat-item i {
    font-size: 15px;
    line-height: 1;
}

.hero-plat-sep {
    width: 1px;
    height: 18px;
    background: rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.btn-group { display: flex; justify-content: center; gap: 20px; align-items: center; flex-wrap: wrap; }

.btn {
    padding: 14px 32px;
    border-radius: 40px;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary { background: var(--accent-blue); color: #fff; }
.btn-primary:hover { background: var(--accent-blue-hover); transform: scale(1.02); }
.btn-link { color: var(--accent-blue); display: flex; align-items: center; gap: 4px; }
.btn-link:hover { text-decoration: underline; }

/* Hero visual */
.hero-visual {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hero-visual-wrap {
    position: relative;
    width: min(560px, 100%);
    margin: 0 auto;
}

.hero-svg-bg {
    display: block;
    width: 100%;
    overflow: visible;
}

.hero-cat-img {
    position: absolute;
    left: 50%;
    top: 4%;
    transform: translateX(-50%);
    width: 44%;
    filter: drop-shadow(0 16px 32px rgba(8, 18, 48, 0.22)) drop-shadow(0 2px 10px rgba(0, 80, 200, 0.12));
    animation: catFloat 4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    pointer-events: none;
    user-select: none;
}

@keyframes catFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(-10px); }
}

/* Floating node pill badges */
.hero-node {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px) saturate(1.8);
    -webkit-backdrop-filter: blur(18px) saturate(1.8);
    border: 1px solid rgba(0, 113, 227, 0.13);
    border-radius: 999px;
    box-shadow: 0 4px 20px rgba(0, 50, 140, 0.08), 0 1px 4px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.hero-node-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.hero-node-dot--blue  { background: #0071e3; }
.hero-node-dot--green { background: #34c759; }
.hero-node-dot--dim   { opacity: 0.65; }

.hero-node-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #0071e3;
    letter-spacing: 0.03em;
}
.hero-node-name--green { color: #248a3d; }

.hero-node-sep {
    font-size: 10px;
    color: #c7c7cc;
    line-height: 1;
}

.hero-node-meta {
    font-size: 10.5px;
    color: #86868b;
    font-feature-settings: "tnum";
}

/* Individual badge positions + staggered float animations */
.hero-node--hk     { top: 10%;  left: 2%;   animation: nodeBobA 5.0s ease-in-out infinite; }
.hero-node--sg     { top: 8%;   right: 1%;  animation: nodeBobB 5.4s ease-in-out infinite 0.7s; }
.hero-node--direct { bottom: 24%; left: 1%;  animation: nodeBobA 4.8s ease-in-out infinite 1.3s; }
.hero-node--jp     { bottom: 24%; right: 1%; animation: nodeBobB 5.6s ease-in-out infinite 0.4s; }

@keyframes nodeBobA {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-7px); }
}
@keyframes nodeBobB {
    0%, 100% { transform: translateY(-3px); }
    50%       { transform: translateY(4px); }
}

/* Status pill (HTML version) */
.hero-status-pill {
    position: absolute;
    bottom: 4%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.hero-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34c759;
    flex-shrink: 0;
    animation: statusPulse 2.2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

.hero-status-label {
    font-size: 11px;
    font-weight: 600;
    color: #1d1d1f;
}

.hero-status-stats {
    font-size: 11px;
    color: #86868b;
    font-feature-settings: "tnum";
}

/* Utility: screen-reader only caption */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Home: editorial intent rail layout */
.home-intent {
    display: grid;
    grid-template-columns: minmax(0, 52px) minmax(0, 1fr);
    gap: 0;
    max-width: calc(var(--max-width) + 80px);
    margin: 0 auto;
    padding: 88px 24px 72px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(105deg, #fafdff 0%, #fff 38%, #fff 100%);
    overflow-x: hidden;
}

.home-intent-rail {
    border-right: 1px solid rgba(0, 113, 227, 0.12);
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.home-intent-rail-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(0, 113, 227, 0.35);
}

.home-intent-body {
    padding-left: clamp(20px, 4vw, 48px);
    padding-right: 8px;
}

.home-intent-kicker {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-blue);
    margin-bottom: 14px;
}

.home-intent-title {
    font-size: clamp(28px, 4.2vw, 44px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.18;
    max-width: 100%;
    margin-bottom: 28px;
    /* CJK: avoid breaking inside common compound words (e.g. 订阅|链接) */
    word-break: keep-all;
    line-break: strict;
    hyphens: none;
    text-wrap: balance;
}

.home-intent-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    gap: clamp(28px, 4vw, 48px);
    align-items: start;
}

.home-intent-lead {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.75;
}

.home-intent-lead strong {
    color: var(--text-main);
    font-weight: 600;
}

.home-intent-aside {
    background: rgba(0, 113, 227, 0.04);
    border: 1px solid rgba(0, 113, 227, 0.14);
    border-radius: 20px;
    padding: 22px 22px 20px;
}

.home-intent-aside-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--accent-blue);
    margin-bottom: 14px;
}

.home-intent-chips {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-intent-chips li {
    font-size: 14px;
    color: var(--text-main);
    padding: 8px 12px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.home-intent-ghost {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.home-intent-ghost:hover {
    text-decoration: underline;
}

/* Scenarios: zigzag rows + abstract visuals */
.scenario-zigzag {
    padding: 96px 24px 100px;
    background: #fff;
}

.sz-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.sz-header {
    margin-bottom: 56px;
    max-width: 720px;
}

.sz-header h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 16px;
}

.sz-dek {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.sz-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sz-row {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(220px, 0.75fr);
    gap: clamp(24px, 4vw, 40px);
    align-items: stretch;
    padding: clamp(28px, 4vw, 40px) clamp(24px, 3vw, 36px);
    border-radius: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f5f5f7 45%, #fff 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.sz-row:hover {
    border-color: rgba(0, 113, 227, 0.2);
    box-shadow: 0 24px 48px rgba(0, 40, 90, 0.07);
}

.sz-row--flip {
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.05fr);
    background: linear-gradient(225deg, #f5f8ff 0%, #f8f8fa 50%, #fff 100%);
}

.sz-row--flip .sz-copy {
    order: 2;
}

.sz-row--flip .sz-visual {
    order: 1;
}

.sz-copy h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.sz-copy p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.72;
    max-width: 38em;
    overflow-wrap: break-word;
    word-break: break-word;
}

.sz-visual {
    position: relative;
    border-radius: 20px;
    min-height: 140px;
    overflow: hidden;
    background: radial-gradient(circle at 30% 30%, rgba(0, 113, 227, 0.12) 0%, transparent 55%),
                radial-gradient(circle at 80% 70%, rgba(0, 113, 227, 0.08) 0%, transparent 50%),
                #fff;
    border: 1px dashed rgba(0, 113, 227, 0.22);
}

.sz-visual--b {
    background: radial-gradient(circle at 70% 25%, rgba(52, 199, 89, 0.14) 0%, transparent 52%),
                radial-gradient(circle at 20% 80%, rgba(0, 113, 227, 0.07) 0%, transparent 50%),
                #fff;
    border-color: rgba(52, 199, 89, 0.25);
}

.sz-visual--c {
    background: radial-gradient(circle at 45% 40%, rgba(94, 92, 230, 0.12) 0%, transparent 54%),
                #fbfbff;
    border-color: rgba(94, 92, 230, 0.22);
}

.sz-blob {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 38% 62% 70% 30% / 40% 48% 52% 60%;
    background: linear-gradient(145deg, rgba(0, 113, 227, 0.35), rgba(0, 113, 227, 0.05));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: szBlob 7s ease-in-out infinite;
}

.sz-blob--green {
    background: linear-gradient(145deg, rgba(52, 199, 89, 0.4), rgba(52, 199, 89, 0.06));
    animation-duration: 8.5s;
}

.sz-blob--violet {
    background: linear-gradient(145deg, rgba(94, 92, 230, 0.38), rgba(94, 92, 230, 0.06));
    animation-duration: 9s;
}

@keyframes szBlob {
    0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    33% { transform: translate(-48%, -54%) scale(1.06) rotate(8deg); }
    66% { transform: translate(-52%, -46%) scale(0.94) rotate(-6deg); }
}

.sz-metric {
    position: absolute;
    bottom: 16px;
    left: 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-blue);
    letter-spacing: 0.04em;
}

.sz-visual--b .sz-metric {
    color: #248a3d;
}

.sz-visual--c .sz-metric {
    color: #5e5ce6;
}

.sz-caption {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Client matrix: spec table */
.home-matrix-section {
    padding: 88px 24px 96px;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.home-matrix-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
}

.home-matrix-head {
    margin-bottom: 36px;
}

.home-matrix-head h2 {
    font-size: clamp(26px, 3.8vw, 40px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 10px 0 14px;
}

.home-matrix-sub {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 52em;
}

.home-matrix-table-wrap {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 16px;
    border: 1px solid #e5e5ea;
    -webkit-overflow-scrolling: touch;
}

.home-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}

.home-matrix th,
.home-matrix td {
    padding: 16px 18px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #ececf0;
}

.home-matrix thead th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    background: #fafafa;
}

.home-matrix tbody tr:hover td {
    background: rgba(0, 113, 227, 0.03);
}

.home-matrix tbody tr:last-child td {
    border-bottom: none;
}

.home-matrix td:first-child {
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-main);
}

.home-matrix-foot {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 28px;
    max-width: 54em;
}

.home-matrix-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
}

/* Ecosystem vertical track */
.home-eco {
    padding: 96px 24px;
    background: linear-gradient(180deg, #f9fafb 0%, #fff 32%);
}

.home-eco-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.home-eco-head {
    margin-bottom: 48px;
    max-width: 640px;
}

.home-eco-head h2 {
    font-size: clamp(26px, 3.8vw, 38px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 8px 0 12px;
}

.home-eco-head p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.home-eco-track {
    list-style: none;
    margin: 0;
    padding: 0 0 0 8px;
    position: relative;
    border-left: 2px solid rgba(0, 113, 227, 0.15);
}

.home-eco-node {
    position: relative;
    padding: 0 0 36px 28px;
}

.home-eco-node:last-child {
    padding-bottom: 0;
}

.home-eco-step {
    position: absolute;
    left: -21px;
    top: 2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--accent-blue);
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 6px #fff;
}

.home-eco-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px 22px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
}

.home-eco-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.home-eco-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

.home-eco-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 6px;
}

/* Quick fix strip */
.home-fixstrip {
    padding: 88px 24px;
    background: #0f1419;
    color: #fff;
}

.home-fixstrip-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.home-fixstrip-intro {
    margin-bottom: 40px;
    max-width: 640px;
}

.home-fixstrip-intro h2 {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 14px;
}

.home-fixstrip-intro p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.52);
    line-height: 1.65;
}

.home-fix-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.home-fix-list > li {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 16px;
    row-gap: 6px;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    align-items: start;
}

.home-fix-list > li:first-child {
    border-top: none;
    padding-top: 0;
}

.home-fix-tag {
    grid-row: 1 / span 2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5ac8fa;
    border: 1px solid rgba(90, 200, 250, 0.35);
    padding: 5px 8px;
    border-radius: 6px;
    margin-top: 2px;
}

.home-fix-list strong {
    grid-column: 2;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.home-fix-detail {
    grid-column: 2;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.48);
    line-height: 1.6;
    overflow-wrap: break-word;
    word-break: break-word;
}

.home-fixstrip-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    font-size: 15px;
    font-weight: 600;
    color: #5ac8fa;
    text-decoration: none;
}

.home-fixstrip-more:hover {
    text-decoration: underline;
}

/* 2. Technical Visualization section */
.tech-visual {
    background: var(--text-main);
    padding: 100px 24px;
    color: #fff;
}

.tech-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 60px;
    align-items: center;
}

.code-window {
    flex: 1;
    min-width: 0;
    background: var(--code-bg);
    border-radius: 12px;
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    overflow-x: auto;
}

.code-header { display: flex; gap: 6px; margin-bottom: 15px; }

.code-header-filename {
    font-size: 12px;
    color: #555;
    margin-left: 10px;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.red { background: #ff5f56; } .yellow { background: #ffbd2e; } .green { background: #27c93f; }

.code-content { color: #d4d4d4; }
.key { color: #9cdcfe; } .val { color: #ce9178; } .comment { color: #6a9955; }

.tech-text { flex: 1; }

.tech-text-lead {
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.tech-text h2 { font-size: 44px; margin-bottom: 24px; line-height: 1.1; }
.tech-text p { color: #a1a1a6; font-size: 19px; }

/* 3. Security section */
.security-focus {
    padding: 120px 24px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.security-focus h2 { font-size: 52px; font-weight: 700; margin-bottom: 30px; }
.security-focus p { font-size: 21px; color: var(--text-secondary); line-height: 1.6; }
.security-badge {
    display: inline-flex;
    padding: 8px 16px;
    background: #eefaf0;
    color: #248a3d;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 14px;
}

.security-icons {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.sec-icon-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.sec-icon-item i {
    font-size: 26px;
    color: #34c759;
}

.sec-icon-item div {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 4. Open Source Banner (replaces community-hub) */
.opensource-banner {
    padding: 100px 24px;
    background: #fff;
    border-top: 1px solid #f0f0f2;
}

.os-banner-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.os-left h2 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 20px;
    margin-top: 8px;
}

.os-left p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 32px;
    max-width: 480px;
}

.btn-outline-dark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1.5px solid #1d1d1f;
    border-radius: 40px;
    color: #1d1d1f;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
}

.btn-outline-dark:hover {
    background: #1d1d1f;
    color: #fff;
}

.os-right {
    display: flex;
    flex-direction: column;
    gap: 36px;
    padding-top: 8px;
}

.os-feature {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.os-feat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    color: var(--text-main);
}

.os-feature strong {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-main);
}

.os-feature p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 5. FAQ section */
.faq-section {
    padding: 100px 24px;
    max-width: 800px;
    margin: 0 auto;
}

.faq-section h2 { text-align: center; font-size: 40px; margin-bottom: 60px; }

.faq-item {
    border-bottom: 1px solid #e5e5e5;
    padding: 24px 0;
    cursor: pointer;
}

.faq-question {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    color: var(--text-secondary);
    margin-top: 0;
    line-height: 1.6;
}

.faq-item.active .faq-answer { max-height: 200px; margin-top: 15px; }
.faq-item.active i { transform: rotate(180deg); }

/* Downloads Section */
.downloads {
    padding: 100px 24px;
    background: #000;
    color: #fff;
}

.dl-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.dl-header {
    text-align: center;
    margin-bottom: 56px;
}

.dl-header h2 {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.dl-header p {
    font-size: 18px;
    color: rgba(255,255,255,0.45);
    max-width: 520px;
    margin: 0 auto;
}

.dl-platforms {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dl-platform {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 22px 28px;
    background: rgba(255,255,255,0.06);
    border-radius: 14px;
    color: #fff;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid rgba(255,255,255,0.06);
}

.dl-platform:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.12);
    transform: translateX(6px);
}

.dl-plat-icon {
    font-size: 28px;
    width: 44px;
    text-align: center;
    color: rgba(255,255,255,0.8);
    flex-shrink: 0;
}

.dl-plat-info { flex: 1; }

.dl-plat-info strong {
    display: block;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 3px;
}

.dl-plat-info span {
    font-size: 13px;
    color: rgba(255,255,255,0.38);
}

.dl-arrow {
    color: rgba(255,255,255,0.22);
    font-size: 13px;
    transition: all 0.25s ease;
}

.dl-platform:hover .dl-arrow {
    color: rgba(255,255,255,0.8);
    transform: translateX(4px);
}

/* Footer */
footer {
    padding: 80px 24px;
    background: #f5f5f7;
    font-size: 12px;
    color: #6e6e73;
}

.footer-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    border-bottom: 1px solid #d2d2d7;
    padding-bottom: 40px;
    margin-bottom: 20px;
}

.footer-col h5 { color: var(--text-main); margin-bottom: 15px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: inherit; text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.footer-github-link {
    color: var(--text-main);
    font-weight: 600;
    text-decoration: none;
}

.footer-github-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    .scenario-zigzag .sz-row,
    .scenario-zigzag .sz-row--flip {
        grid-template-columns: 1fr;
    }

    .sz-row--flip .sz-copy,
    .sz-row--flip .sz-visual {
        order: unset;
    }

    .home-intent {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 64px;
    }

    .home-intent-rail {
        display: none;
    }

    .home-intent-body {
        padding-left: 0;
        min-width: 0;
    }

    .home-intent-grid {
        /* minmax(0,1fr) 而不是 1fr(=minmax(auto,1fr))，防止日语长词撑宽 grid 轨道 */
        grid-template-columns: minmax(0, 1fr);
    }

    /* 日语长词（如"をダウンロードした後の使い方は？"）在 keep-all 模式下无法断行，
       在窄屏上会超出容器。改为 normal 允许日文字符在任意位置换行 */
    .home-intent-title {
        word-break: normal;
        overflow-wrap: anywhere;
        text-wrap: pretty;
    }

    .tech-container { flex-direction: column; }
    .tech-text { text-align: center; }
    .code-content { text-align: left; }
    .hero h1 { font-size: 36px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .protocols-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .os-banner-inner { grid-template-columns: 1fr; gap: 40px; }
    .stat-sep { display: none; }
    .stats-inner { gap: 40px; }
    .security-icons { gap: 28px; }
    .tech-feature-list { display: none; }
    .hero-plat-item span { display: none; }
    .hero-plat-item { padding: 5px 10px; }
    .hero-eyebrow-badge { font-size: 11px; }
}

@media (max-width: 760px) {
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .nav-drawer { display: block; }
    .nav-lang-current { display: none; }
    .nav-lang-trigger { padding: 6px; }
}

@media (max-width: 600px) {
    .nav-lang-panel {
        min-width: min(260px, calc(100vw - 32px));
    }
    .dl-plat-info span { display: none; }
    .security-focus h2 { font-size: 36px; }
    .hero-platforms { padding: 6px 12px; }
    .hero-desc-br { display: none; }
    .btn-group {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .btn-group .btn {
        width: 100%;
        max-width: 320px;
        text-align: center;
        justify-content: center;
    }
    .code-window { font-size: 12px; padding: 14px; }
    .tech-text { min-width: 0; }
    .hero-eyebrow-badge {
        white-space: normal;
        text-align: center;
        justify-content: center;
        max-width: calc(100vw - 48px);
    }
    /* 日文统计数字在小屏幕下缩小字体，防止"大プラットフォーム"等长字符超出视口宽度
       导致 body 形成水平滚动容器，破坏 position: fixed 页眉的固定效果 */
    .stat-number {
        font-size: clamp(20px, 5.5vw, 36px);
    }
    .stats-inner {
        gap: 24px;
    }
    .how-cta .btn {
        display: block;
        text-align: center;
        font-size: 15px;
        padding: 12px 24px;
    }
}

/* ─── Stats Strip ────────────────────────────────────────── */
.stats-strip {
    background: #000;
    color: #fff;
    padding: 64px 24px;
    overflow-x: hidden;
}

.stats-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item { text-align: center; }

.stat-number {
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.42);
    letter-spacing: 0.02em;
}

.stat-sep {
    width: 1px;
    height: 56px;
    background: rgba(255,255,255,0.12);
    flex-shrink: 0;
}

/* ─── Shared eyebrow label ───────────────────────────────── */
.section-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

/* ─── How It Works ───────────────────────────────────────── */
.how-it-works {
    padding: 120px 24px;
    background: #fff;
}

.how-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.how-header {
    margin-bottom: 72px;
}

.how-header h2 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    max-width: 680px;
}

/* ── How Steps: mobile-first single column ── */
.how-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 60px;
    position: relative;
}

.how-steps::before { display: none; }

.how-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 22px;
    background: #f9f9fb;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-width: 0;
}

.step-num {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: #d8d8de;
    line-height: 1;
    flex-shrink: 0;
    width: 56px;
    margin-bottom: 0;
    padding-right: 0;
    display: block;
    background: transparent;
    position: static;
    z-index: auto;
}

.step-body {
    min-width: 0;
    flex: 1;
}

.step-body h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.step-body p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    overflow-wrap: break-word;
    word-break: break-word;
    margin: 0;
}

/* ── Desktop: 3-column grid ── */
@media (min-width: 900px) {
    .how-steps {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 48px;
        position: relative;
    }

    .how-steps::before {
        display: block;
        content: '';
        position: absolute;
        top: 34px;
        left: 80px;
        right: 80px;
        height: 1px;
        background: #e8e8ed;
        z-index: 0;
    }

    .how-step {
        display: block;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
    }

    .step-num {
        font-size: 68px;
        color: #ebebf0;
        width: auto;
        display: inline-block;
        background: #fff;
        padding-right: 16px;
        margin-bottom: 20px;
        position: relative;
        z-index: 1;
    }

    .step-body h3 {
        font-size: 21px;
        margin-bottom: 12px;
    }
}

.how-cta { text-align: center; }

/* ─── Protocols Section ──────────────────────────────────── */
.protocols-section {
    padding: 100px 24px;
    background: #f9f9fb;
}

.protocols-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.protocols-header {
    margin-bottom: 56px;
}

.protocols-header h2 {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
    margin-top: 8px;
}

.protocols-header p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 580px;
}

.protocols-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
}

.proto-cat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5ea;
}

.proto-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.proto-tag {
    display: inline-block;
    padding: 7px 14px;
    background: #fff;
    border: 1px solid #dededf;
    border-radius: 20px;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    color: #3c3c43;
    transition: all 0.2s ease;
    cursor: default;
}

.proto-tag:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(0, 113, 227, 0.05);
}

.proto-tag.featured {
    background: #1d1d1f;
    color: #fff;
    border-color: transparent;
}

.proto-tag.featured:hover {
    background: #333;
    color: #fff;
}

/* ─── Tech Feature List (inside dark section) ────────────── */
.tech-feature-list {
    list-style: none;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tech-feature-list li {
    font-size: 15px;
    color: #a1a1a6;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tech-feature-list li i {
    color: #34c759;
    font-size: 13px;
    flex-shrink: 0;
}
