:root {
    --accent: #1E56B0;
    --accent-soft: #EEF3FB;
    --bold-red: #C03A28;
    --bold-blue: #1E56B0;
    --bold-green: #2F8551;
    --bg-light: #FAF8F3;
    --bg-card: #FFFFFF;
    --text-dark: #1C2B4A;
    --text-gray: #69707F;
    --line: #E8E3D7;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-dark);
    background: var(--bg-light);
    font-family: 'Noto Sans JP', sans-serif;
}

.site-header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem 4rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-dark);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-decoration: none;
}

.logo .fund { color: var(--bold-red); }
.logo .lab { color: var(--text-dark); }
.site-nav { display: flex; flex-wrap: nowrap; gap: 1rem; }
.site-nav a {
    color: var(--text-gray);
    font-family: 'Space Grotesk', 'Noto Sans JP', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.2s ease;
}
.site-nav a:hover,
.site-nav a.active { color: var(--accent); }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
    z-index: 100;
}
.hamburger span { width: 25px; height: 3px; background: var(--text-dark); border-radius: 2px; transition: all 0.3s ease; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

.page-layout {
    display: flex;
    align-items: flex-start;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 2rem;
    gap: 2.5rem;
}
.article-main { flex: 1; min-width: 0; }

.breadcrumb {
    position: relative;
    z-index: 5;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 4rem;
    color: var(--text-gray);
    font-size: 0.85rem;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 0.5rem; }

.article-header {
    position: relative;
    z-index: 5;
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 4rem 0;
}
.article-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.article-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    color: #FFFFFF;
    background: var(--accent);
    border-radius: 50px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.article-date { color: var(--text-gray); font-family: 'Space Grotesk', sans-serif; font-size: 0.85rem; }
.article-header h1 {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.5;
}
.article-header .lead { color: var(--text-gray); font-size: 1rem; line-height: 1.8; }
.article-header a,
.article-content a { color: var(--accent); text-underline-offset: 0.18em; }

.article-content {
    position: relative;
    z-index: 5;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 4rem 4rem;
}
.article-card {
    padding: 3rem;
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
.section { margin-bottom: 2.5rem; }
.section:last-child { margin-bottom: 0; }
.section h2 {
    display: inline-block;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.55;
}
.section h3 { margin: 1.5rem 0 0.75rem; color: var(--text-dark); font-size: 1.1rem; line-height: 1.65; }
.section p { margin-bottom: 1rem; color: var(--text-dark); font-size: 0.95rem; line-height: 1.9; }
.section p:last-child { margin-bottom: 0; }
.section ul,
.section ol { margin: 0 0 1rem 1.2rem; color: var(--text-dark); font-size: 0.95rem; line-height: 1.9; }
.section a { color: var(--accent); text-decoration: none; }
.section a:hover { text-decoration: underline; }

.steps-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 0.6rem 0 1.2rem !important;
    list-style: none;
}
.steps-overview li {
    min-height: 105px;
    margin: 0;
    padding: 1rem;
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
    border-radius: 12px;
    color: var(--text-gray);
    font-size: 0.84rem;
    line-height: 1.65;
}
.steps-overview b { display: block; margin-bottom: 0.35rem; color: var(--accent); font-family: 'Space Grotesk', sans-serif; font-size: 0.74rem; letter-spacing: 0.07em; }

.screen-shot {
    display: block;
    width: 100%;
    margin: 0.5rem 0 0.4rem;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(28, 43, 74, 0.05);
}
.caption { margin-bottom: 1rem !important; color: var(--text-gray) !important; font-size: 0.85rem !important; line-height: 1.7 !important; }
.note {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    background: var(--accent-soft);
    border-left: 4px solid var(--accent);
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    line-height: 1.8;
}

.cta-box {
    margin-top: 2rem;
    padding: 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, #16223C 0%, #0D2230 100%);
    border-radius: 16px;
}
.cta-box h3 { margin: 0 0 0.75rem; color: #FFFFFF; font-size: 1.3rem; }
.cta-box p { margin-bottom: 1.5rem; color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; line-height: 1.7; }
.cta-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; }
.cta-button {
    display: inline-block;
    padding: 0.9rem 2rem;
    color: #FFFFFF !important;
    background: var(--accent);
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    font-size: 0.94rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta-button:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.22); }
.cta-button.secondary { color: #FFFFFF !important; background: transparent; border: 2px solid #FFFFFF; }
.cta-button.secondary:hover { color: var(--accent) !important; background: #FFFFFF; }

.faq-item { margin-bottom: 0.75rem; padding: 1.25rem 1.5rem; background: var(--bg-light); border-radius: 12px; }
.faq-question { margin-bottom: 0.5rem; color: var(--text-dark); font-size: 0.95rem; font-weight: 700; line-height: 1.65; }
.faq-answer { color: var(--text-gray); font-size: 0.9rem; line-height: 1.8; }

.related {
    position: relative;
    z-index: 5;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 4rem 4rem;
}
.related h2 { margin-bottom: 1rem; color: var(--text-dark); font-family: 'Noto Sans JP', sans-serif; font-size: 1.2rem; }
.related-links { display: flex; flex-direction: column; gap: 0.75rem; }
.related-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.6;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.related-links a::before { content: '›'; color: var(--accent); font-size: 1.2rem; }
.related-links a:hover { color: var(--accent); transform: translateX(4px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }

.tool-sidebar { position: sticky; top: 2rem; width: 260px; flex-shrink: 0; padding-top: 0.5rem; }
.tool-sidebar-label { margin-bottom: 0.5rem; padding: 0 0.25rem; color: var(--text-gray); font-family: 'Space Grotesk', sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.tool-card {
    display: block;
    margin-bottom: 0.4rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tool-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10); }
.tool-card.current { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 12%, transparent); }
.tool-card-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.2rem; }
.tool-card-icon { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 6px; font-size: 0.85rem; }
.tool-card-name { color: var(--text-dark); font-size: 0.84rem; font-weight: 700; }
.tool-card-desc { margin-bottom: 0.3rem; color: var(--text-gray); font-size: 0.72rem; line-height: 1.3; }
.tool-card-cta { color: var(--accent); font-family: 'Space Grotesk', sans-serif; font-size: 0.7rem; font-weight: 700; }

footer { position: relative; z-index: 5; padding: 3rem; color: var(--text-gray); text-align: center; font-family: 'Space Grotesk', 'Noto Sans JP', sans-serif; font-size: 0.85rem; }
footer a { color: var(--text-gray); text-decoration: none; }
footer a:hover { color: var(--accent); }
footer .disclaimer { max-width: 600px; margin: 1rem auto 0; color: var(--text-gray); font-size: 0.78rem; line-height: 1.7; opacity: 0.8; }

.bottom-tool-bar { display: none; }

@media (max-width: 1100px) {
    .site-header { padding: 1.5rem 2rem; }
    .hamburger { display: flex; }
    .site-nav {
        display: none;
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 99;
    }
    .site-nav.open { display: flex; }
    .site-nav a { font-size: 1.2rem; }
}

@media (max-width: 960px) {
    .page-layout { flex-direction: column; max-width: none; padding: 0; gap: 0; }
    .article-main { width: 100%; }
    .tool-sidebar { display: none; }
    .bottom-tool-bar {
        display: flex;
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 50;
        gap: 0.25rem;
        padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    .bottom-tool-item { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; padding: 0.4rem 0.2rem; border-radius: 8px; text-decoration: none; }
    .bottom-tool-item:active { background: var(--bg-light); }
    .bottom-tool-icon { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 7px; font-size: 0.9rem; }
    .bottom-tool-name { color: var(--text-dark); font-size: 0.6rem; font-weight: 600; line-height: 1.2; text-align: center; }
    body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 768px) {
    .breadcrumb,
    .article-header,
    .article-content,
    .related { padding-right: 1.5rem; padding-left: 1.5rem; }
    .article-card { padding: 2rem 1.5rem; border-radius: 16px; }
    .article-header h1 { font-size: 1.5rem; }
    .steps-overview { grid-template-columns: 1fr; }
    .steps-overview li { min-height: 0; }
    .cta-box { padding: 2rem 1.5rem; }
    .cta-buttons { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .site-header { padding: 1.2rem 1rem; }
    .logo { font-size: 2rem; }
    .breadcrumb { font-size: 0.76rem; }
    .article-header h1 { font-size: 1.3rem; }
    .article-header .lead { font-size: 0.92rem; }
    .article-card { padding: 1.5rem 1rem; }
    .section h2 { font-size: 1.1rem; }
    .cta-button { width: 100%; padding-right: 1rem; padding-left: 1rem; }
}
