:root {
    --ink: #17202a;
    --muted: #586575;
    --navy: #0f4c81;
    --blue: #1f6fba;
    --blue-soft: #eaf4fd;
    --blue-pale: #f6faff;
    --line: #d9e4ee;
    --orange: #f39a21;
    --green: #15705b;
    --white: #ffffff;
    --shadow: 0 16px 40px rgba(15, 76, 129, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: #f8fafc;
    font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.8;
}

a { color: var(--blue); }
a:hover { color: var(--navy); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    color: var(--white);
    background: rgba(15, 76, 129, 0.97);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
}

.nav-inner, .container {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.nav-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand { color: var(--white); font-weight: 700; text-decoration: none; }

.nav-links {
    display: flex;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a { color: rgba(255, 255, 255, 0.88); text-decoration: none; font-size: 0.92rem; }
.nav-links a[aria-current="page"], .nav-links a:hover { color: var(--white); }

.qa-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, #0c3b66 0%, #1765a8 66%, #2b7bc1 100%);
    padding: 76px 0 82px;
}

.qa-hero::after {
    content: "Q&A";
    position: absolute;
    right: 5vw;
    bottom: -58px;
    color: rgba(255, 255, 255, 0.07);
    font: 800 clamp(8rem, 20vw, 15rem)/1 sans-serif;
    letter-spacing: -0.08em;
    pointer-events: none;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.qa-hero h1 {
    max-width: 830px;
    margin: 0 0 20px;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.25;
    letter-spacing: -0.035em;
}

.qa-hero .lead {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.breadcrumb { margin: 0 0 24px; color: rgba(255, 255, 255, 0.72); font-size: 0.9rem; }
.breadcrumb a { color: var(--white); }
.section { padding: 68px 0; }
.section.alt { background: var(--blue-pale); border-block: 1px solid var(--line); }

.section-title {
    margin: 0 0 10px;
    color: var(--navy);
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    line-height: 1.35;
}
.section-intro { max-width: 760px; margin: 0 0 30px; color: var(--muted); }

.answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.answer-card {
    display: flex;
    flex-direction: column;
    min-height: 260px;
    padding: 28px;
    color: inherit;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 76, 129, 0.06);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
a.answer-card:hover { color: inherit; border-color: #9fc6e7; box-shadow: var(--shadow); transform: translateY(-4px); }
.answer-card.featured {
    grid-column: 1 / -1;
    min-height: 0;
    background: linear-gradient(145deg, #ffffff 0%, #f1f8ff 100%);
    border-left: 5px solid var(--orange);
}
.answer-card.coming-soon { opacity: 0.76; }
.card-meta, .book-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 10px;
    color: var(--navy);
    background: var(--blue-soft);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}
.tag.open { color: #7a4300; background: #fff0d6; }
.tag.next { color: #5d6670; background: #edf0f3; }
.answer-card h2 { margin: 18px 0 12px; color: var(--navy); font-size: clamp(1.2rem, 2.5vw, 1.55rem); line-height: 1.5; }
.answer-card p { margin: 0; color: var(--muted); }
.card-link { margin-top: auto; padding-top: 20px; color: var(--blue); font-weight: 700; }

.book-bridge {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 26px;
    align-items: center;
    padding: 28px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}
.book-cover { width: 100%; max-height: 205px; object-fit: contain; border-radius: 7px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18); }
.book-bridge h2 { margin: 0 0 8px; color: var(--navy); font-size: 1.45rem; }
.book-bridge p { margin: 0 0 14px; color: var(--muted); }

.article-shell { display: grid; grid-template-columns: minmax(0, 760px) 280px; gap: 48px; align-items: start; }
.article { min-width: 0; }
.article h2 {
    margin: 68px 0 20px;
    padding-bottom: 10px;
    color: var(--navy);
    border-bottom: 2px solid var(--line);
    font-size: clamp(1.45rem, 3vw, 1.9rem);
    line-height: 1.45;
}
.article h2:first-child { margin-top: 0; }
.article h3 { margin: 38px 0 12px; color: var(--navy); font-size: 1.25rem; }
.article p, .article li { color: #2f3b47; }
.article strong { color: #142d43; }

.short-answer { margin: 0 0 38px; padding: 24px 26px; background: #eff9f6; border-left: 5px solid var(--green); border-radius: 0 14px 14px 0; }
.short-answer .label { display: block; margin-bottom: 4px; color: var(--green); font-weight: 700; }
.short-answer p { margin: 0; font-size: 1.06rem; }

.connection-box { margin: 0 0 38px; padding: 26px; background: var(--blue-pale); border: 1px solid #bdd9ef; border-radius: 14px; }
.connection-box h2 { margin: 0 0 12px; padding: 0; border: 0; font-size: 1.25rem; }
.connection-list { display: grid; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.connection-list li { display: grid; grid-template-columns: 7em 1fr; gap: 8px; padding-top: 10px; border-top: 1px solid #d4e6f5; }
.connection-list strong { color: var(--navy); }

.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 26px 0; padding: 0; list-style: none; counter-reset: flow; }
.flow li {
    position: relative;
    padding: 46px 15px 16px;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
}
.flow li::before {
    counter-increment: flow;
    content: counter(flow);
    position: absolute;
    top: 12px;
    left: 50%;
    width: 25px;
    height: 25px;
    color: var(--white);
    background: var(--blue);
    border-radius: 50%;
    font-size: 0.78rem;
    line-height: 25px;
    transform: translateX(-50%);
}
.flow li:not(:last-child)::after {
    content: "›";
    position: absolute;
    top: 50%;
    right: -10px;
    z-index: 2;
    width: 18px;
    color: var(--blue);
    background: #f8fafc;
    font-size: 1.5rem;
    line-height: 1;
    transform: translateY(-50%);
}

pre { overflow-x: auto; margin: 22px 0; padding: 22px; color: #e8eef5; background: #152434; border-radius: 12px; font: 0.9rem/1.7 "Cascadia Code", Consolas, monospace; tab-size: 4; }
code { padding: 0.12em 0.35em; color: #8b3f00; background: #fff2e1; border-radius: 4px; font-family: "Cascadia Code", Consolas, monospace; font-size: 0.92em; }
pre code { padding: 0; color: inherit; background: transparent; border-radius: 0; }

.cursor-demo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 24px 0; }
.cursor-panel { padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.cursor-panel strong { display: block; margin-bottom: 12px; color: var(--navy); }
.result-table { width: 100%; border-collapse: collapse; text-align: center; }
.result-table th, .result-table td { padding: 8px; border: 1px solid var(--line); }
.cursor { color: #b85c00; font-weight: 700; }
.note { margin: 22px 0; padding: 18px 20px; background: #fff8e8; border: 1px solid #f1d59d; border-radius: 10px; }
.note p { margin: 0; }
.check-list { padding-left: 1.4em; }
.check-list li { margin-bottom: 8px; }

.toc { position: sticky; top: 88px; padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.toc strong { display: block; margin-bottom: 10px; color: var(--navy); }
.toc ol { margin: 0; padding-left: 1.3em; }
.toc li { margin: 5px 0; }
.toc a { color: var(--muted); text-decoration: none; font-size: 0.88rem; }
.toc a:hover { color: var(--blue); }

.next-step { margin-top: 64px; padding: 28px; color: var(--white); background: linear-gradient(135deg, #0f4c81, #1f6fba); border-radius: 16px; }
.next-step h2 { margin: 0 0 10px; padding: 0; color: var(--white); border: 0; }
.next-step p { color: rgba(255, 255, 255, 0.88); }
.next-step a { color: var(--white); font-weight: 700; }

.site-footer { padding: 32px 0; color: #dfe8f0; background: #1a252f; text-align: center; }
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--white); }

/* 深掘りサポート：元原稿の流れを保った長文記事 */
.qa-hero::after { content: "DEEP"; letter-spacing: -0.04em; }
.support-hero h1 { max-width: 100%; }
.article-hero h1 {
    max-width: 1000px;
    font-size: clamp(1.85rem, 4.5vw, 3.25rem);
}

.section-kicker {
    margin: 0 0 6px;
    color: var(--orange);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.reading-card { border-top: 4px solid #6d5ea8; }

.article-wide {
    width: min(100%, 840px);
    margin-inline: auto;
}

.page-purpose {
    margin: 0 0 32px;
    padding: 17px 20px;
    color: #29445b;
    background: var(--blue-pale);
    border-left: 4px solid var(--blue);
    border-radius: 0 10px 10px 0;
    font-size: 1.04rem;
    font-weight: 500;
}

.original-article .connection-box { margin-bottom: 48px; }
.original-article .connection-box + .source-article { margin-top: 0; }
.original-article .source-article + .connection-box { margin-top: 72px; margin-bottom: 0; }

.source-article > h2:first-child { margin-top: 0; }
.source-article p { margin: 0 0 1.25em; }
.source-article ul,
.source-article ol { margin-top: 0.7em; margin-bottom: 1.4em; }
.source-article hr {
    margin: 56px 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.source-article blockquote {
    margin: 24px 0 32px;
    padding: 18px 22px;
    color: #3f4d5a;
    background: #f1f6fb;
    border-left: 4px solid #8cb7dc;
    border-radius: 0 10px 10px 0;
}
.source-article blockquote p:last-child { margin-bottom: 0; }

.source-article table {
    width: 100%;
    margin: 24px 0 32px;
    border-collapse: collapse;
    background: var(--white);
}
.source-article th,
.source-article td {
    padding: 10px 12px;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.source-article th { color: var(--navy); background: var(--blue-soft); }

.source-article a { overflow-wrap: anywhere; }

@media (max-width: 860px) {
    .article-shell { grid-template-columns: 1fr; }
    .toc { position: static; order: -1; }
    .flow { grid-template-columns: repeat(2, 1fr); }
    .flow li:nth-child(2)::after { content: none; }
}

@media (max-width: 640px) {
    .nav-inner, .container { width: min(100% - 28px, 1120px); }
    .nav-inner { min-height: 58px; }
    .nav-links li:not(:last-child) { display: none; }
    .qa-hero { padding: 52px 0 58px; }
    .section { padding: 48px 0; }
    .answer-grid, .cursor-demo { grid-template-columns: 1fr; }
    .answer-card.featured { grid-column: auto; }
    .book-bridge { grid-template-columns: 92px 1fr; gap: 18px; padding: 20px; }
    .connection-list li { grid-template-columns: 1fr; gap: 0; }
    .flow { grid-template-columns: 1fr; }
    .flow li::after { content: none !important; }
    pre { margin-inline: -8px; padding: 18px; font-size: 0.82rem; }
    .article-hero h1 { font-size: clamp(1.65rem, 8vw, 2.45rem); }
    .source-article table { display: block; overflow-x: auto; white-space: nowrap; }
}
