:root {
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --text-main: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    --bg-main: #FFFFFF;
    --bg-sec: #F8FAFC;
    --border: #E2E8F0;
    --toc-bg: #F1F5F9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    color: var(--text-body); 
    background: var(--bg-main); 
    line-height: 1.7; 
    -webkit-font-smoothing: antialiased; 
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; border-radius: 12px; }
button { font: inherit; }
a:focus-visible, button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 3px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header & Navigation */
.header { 
    border-bottom: 1px solid var(--border); 
    position: sticky; 
    top: 0; 
    background: rgba(255,255,255,0.95); 
    backdrop-filter: blur(8px); 
    z-index: 100; 
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 22px; letter-spacing: -0.5px; color: var(--primary); }
.logo svg, .logo-img { height: 32px; width: 32px; }
.wordmark-img { height: 32px; width: auto; max-width: 156px; display: block; }

.nav-links { display: flex; gap: 24px; align-items: center; font-weight: 500; font-size: 15px; color: var(--text-main); }
.nav-links a { transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active-nav { color: var(--primary); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text-main); padding: 8px; }
.menu-toggle svg { width: 24px; height: 24px; }

/* Lang Dropdown */
.lang-dropdown { position: relative; }
.lang-toggle { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    cursor: pointer; 
    padding: 8px 12px; 
    border: none;
    background: transparent;
    color: inherit;
    border-radius: 6px; 
    transition: background 0.2s; 
}
.lang-toggle:hover { background: var(--bg-sec); }
.icon-globe { width: 18px; height: 18px; }
.icon-chevron { width: 16px; height: 16px; transition: transform 0.2s; }
.lang-dropdown:hover .icon-chevron,
.lang-dropdown:focus-within .icon-chevron,
.lang-dropdown.active .icon-chevron { transform: rotate(180deg); }
.lang-menu { 
    position: absolute; 
    right: 0; 
    top: 100%; 
    background: #fff; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    box-shadow: 0 10px 24px rgba(0,0,0,0.08); 
    padding: 8px 0; 
    min-width: 140px; 
    opacity: 0; 
    visibility: hidden; 
    transform: translateY(10px); 
    transition: all 0.2s; 
}
.lang-dropdown:hover .lang-menu,
.lang-dropdown:focus-within .lang-menu,
.lang-dropdown.active .lang-menu { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
}
.lang-menu a,
.lang-menu .lang-option {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    transition: all 0.2s;
}
.lang-menu a:hover { background: var(--bg-sec); color: var(--primary); }
.lang-option.is-disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Hero Section */
.hero { padding: 80px 0; overflow: hidden; background: linear-gradient(180deg, var(--bg-sec) 0%, var(--bg-main) 100%); border-bottom: 1px solid var(--border); }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.hero-content h1 { 
    font-size: 48px; 
    line-height: 1.2; 
    margin-bottom: 24px; 
    letter-spacing: -0.02em; 
    color: var(--text-main); 
    font-weight: 800;
}
.hero-content p { 
    font-size: 18px; 
    color: var(--text-body); 
    margin-bottom: 32px; 
    max-width: 540px; 
}

/* Subpage Hero specific */
.hero-center { text-align: center; padding: 60px 0; }
.hero-center .hero-content { max-width: 800px; margin: 0 auto; }
.hero-center h1 { font-size: 40px; }
.hero-center p { margin: 0 auto; }

.risk-warning { 
    display: flex; 
    gap: 12px; 
    font-size: 13px; 
    color: var(--text-muted); 
    background: #fff; 
    padding: 16px; 
    border-radius: 8px; 
    margin-bottom: 40px; 
    border-left: 4px solid var(--primary); 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.risk-warning svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--primary); }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.cta-btn { 
    display: inline-flex; 
    justify-content: center; 
    align-items: center; 
    font-weight: 600; 
    padding: 16px 32px; 
    border-radius: 12px; 
    font-size: 16px; 
    transition: all 0.2s; 
}
.primary-btn { background: var(--primary); color: #FFFFFF; }
.primary-btn:hover { 
    background: var(--primary-hover); 
    transform: translateY(-2px); 
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.25); 
}
.secondary-btn { background: #fff; color: var(--text-main); border: 1px solid var(--border); }
.secondary-btn:hover { background: var(--bg-sec); }

/* Hero Card */
.hero-card { 
    background: #fff; 
    border-radius: 24px; 
    padding: 40px; 
    box-shadow: 0 24px 48px rgba(0,0,0,0.08); 
    border: 1px solid var(--border); 
    position: relative; 
}
.hero-card::before { 
    content: ''; 
    position: absolute; 
    top: 0; left: 0; right: 0; 
    height: 6px; 
    background: linear-gradient(90deg, var(--primary), #60A5FA); 
    border-radius: 24px 24px 0 0; 
}
.card-badge { 
    display: inline-block; 
    background: rgba(37, 99, 235, 0.1); 
    color: var(--primary); 
    font-size: 13px; 
    font-weight: 700; 
    padding: 6px 12px; 
    border-radius: 20px; 
    margin-bottom: 16px; 
}
.hero-card h2 { font-size: 24px; margin-bottom: 24px; color: var(--text-main); }
.benefit-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.benefit-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--text-main); font-weight: 500; }
.benefit-list svg { width: 20px; height: 20px; color: #10B981; flex-shrink: 0; }

/* Main Content Layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    padding: 64px 0;
    align-items: start;
}
.content-narrow {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

/* Table of Contents (Sidebar) */
.toc-sidebar {
    position: sticky;
    top: 100px;
    background: var(--toc-bg);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
}
.toc-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.toc-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.toc-list a {
    font-size: 14px;
    color: var(--text-body);
    transition: color 0.2s;
    display: block;
    line-height: 1.4;
}
.toc-list a:hover, .toc-list a.active {
    color: var(--primary);
    font-weight: 600;
}

/* Article Typography */
.article-content {
    max-width: 800px;
    width: 100%;
}
.article-content section {
    margin-bottom: 64px;
}
.article-content h2 {
    font-size: 32px;
    color: var(--text-main);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    letter-spacing: -0.01em;
}
.article-content h3 {
    font-size: 22px;
    color: var(--text-main);
    margin: 32px 0 16px;
}
.article-content p {
    margin-bottom: 20px;
    font-size: 16px;
}
.article-content a {
    color: var(--primary);
}
.article-content a:hover {
    color: var(--primary-hover);
}
.article-meta a {
    color: var(--primary);
    font-weight: 600;
}
.article-content ul, .article-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}
.article-content li {
    margin-bottom: 12px;
    position: relative;
}
.article-content ul li { list-style-type: disc; }
.article-content ol li { list-style-type: decimal; }
.article-content strong { color: var(--text-main); font-weight: 600; }

.highlight-box {
    background: rgba(37, 99, 235, 0.05);
    border-left: 4px solid var(--primary);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin: 32px 0;
}
.highlight-box h4 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 16px;
}
.highlight-box p:last-child { margin-bottom: 0; }

/* Content Matrix Grid */
.matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}
.matrix-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}
.matrix-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    border-color: var(--primary);
}
.matrix-icon {
    width: 48px;
    height: 48px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.matrix-icon svg { width: 24px; height: 24px; }
.matrix-card h3 {
    font-size: 20px;
    color: var(--text-main);
    margin-bottom: 12px;
    margin-top: 0;
}
.matrix-card p {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
}
.matrix-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.matrix-link svg { width: 16px; height: 16px; transition: transform 0.2s; }
.matrix-card:hover .matrix-link svg { transform: translateX(4px); }
.topic-link-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 24px;
}
.topic-link-item {
    display: block;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.topic-link-item:hover {
    border-color: rgba(37, 99, 235, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}
.topic-link-item strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 16px;
}
.topic-link-item span {
    color: var(--text-muted);
    font-size: 14px;
}

/* Steps */
.step-grid { display: grid; gap: 24px; margin-top: 32px; }
.step-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.step-num {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}
.step-text h4 { font-size: 18px; color: var(--text-main); margin-bottom: 8px; }

/* FAQ */
.faq-section { background: transparent; padding: 0; border-top: none; }
.faq-container { 
    max-width: 100%;
    margin: 0;
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
    border-radius: 24px;
    border: 1px solid var(--border); 
    padding: 28px 32px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}
.faq-container > h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 12px;
}
.faq-container > p {
    color: var(--text-muted);
    margin-bottom: 16px;
}
.faq-item { border-bottom: 1px solid rgba(148, 163, 184, 0.28); }
.faq-item:last-child { border-bottom: none; }
.faq-question { 
    width: 100%;
    padding: 24px 0; 
    font-size: 16px; 
    font-weight: 600; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    color: var(--text-main); 
    transition: color 0.2s; 
    border: none;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    text-align: left;
}
.faq-question:hover { color: var(--primary); }
.faq-question span {
    padding-right: 16px;
}
.faq-question:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 4px;
    border-radius: 8px;
}
.faq-answer { padding: 0 0 24px; color: var(--text-body); font-size: 15px; line-height: 1.8; display: none; }
.faq-item.active .faq-answer { display: block; animation: fadeIn 0.3s ease; }
.faq-item.active .faq-icon { transform: rotate(180deg); color: var(--primary); }
.faq-icon { transition: transform 0.3s; width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; margin-left: 16px; }

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(-10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 99;
    border: none;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-hover); transform: translateY(-3px); }

/* Footer */
.footer { background: #fff; padding: 64px 0 32px; border-top: 1px solid var(--border); }
.footer-logo-img { height: 24px; margin-bottom: 16px; display: block; }
.footer-wordmark-img { height: 28px; width: auto; margin-bottom: 16px; display: block; }
.footer-logo-svg { height: 24px; margin-bottom: 16px; }
.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-main);
}
.footer-links a {
    color: var(--text-main);
    font-weight: 600;
}
.footer-links a:hover {
    color: var(--primary);
}
.footer-slogan { color: var(--text-muted); font-size: 14px; font-weight: 600; }
.footer-disclaimer { 
    font-size: 12px; 
    color: #94A3B8; 
    text-align: justify; 
    margin-top: 48px; 
    padding-top: 32px; 
    border-top: 1px solid var(--border); 
    line-height: 1.8; 
}
.footer-copyright { margin-top: 8px; }

/* Responsive Design */
@media (max-width: 992px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 48px; }
    .hero-content p { margin: 0 auto 32px; }
    .risk-warning { text-align: left; }
    .hero-actions { justify-content: center; }
    .content-wrapper { grid-template-columns: 1fr; padding: 40px 0; }
    .toc-sidebar { display: none; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links { 
        display: none; 
        position: absolute; 
        top: 72px; 
        left: 0; 
        right: 0; 
        background: #fff; 
        flex-direction: column; 
        padding: 20px; 
        box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
        gap: 20px;
        align-items: flex-start;
    }
    .nav-links.active { display: flex; }
    .lang-dropdown { width: 100%; }
    .lang-menu { position: static; box-shadow: none; border: none; padding-left: 20px; display: none; opacity: 1; visibility: visible; transform: none; }
    .lang-dropdown.active .lang-menu { display: block; }

    .hero { padding: 40px 0; }
    .hero-content h1 { font-size: 36px; }
    .hero-actions { flex-direction: column; }
    .article-content h2 { font-size: 26px; }
    .step-item { flex-direction: column; gap: 12px; }
    .topic-link-list { grid-template-columns: 1fr; }
    .faq-container { padding: 24px 20px; border-radius: 20px; }
    .faq-question { padding: 20px 0; font-size: 15px; }
    .back-to-top { bottom: 20px; right: 20px; }
    .footer-links { flex-direction: column; gap: 10px; }
}
