:root {
    /* ロゴ画像から合わせた色 */
    --pfp-navy: #153987;
    --pfp-navy-deep: #0e3383;
    --pfp-orange: #fe8d27;
    --pfp-white: #f5f6fa;

    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-accent: #eef4ff;
    --text: #0f172a;
    --text-muted: #667085;
    --line: #d7deea;
    --line-strong: #c4cfdf;
    --danger: #dc2626;

    --shadow-card: 0 12px 28px rgba(21, 57, 135, 0.08);
    --shadow-focus: 0 0 0 4px rgba(21, 57, 135, 0.12);
    --radius-xl: 22px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
        "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; }
img { display: block; max-width: 100%; }

.site-header {
    background: var(--pfp-navy);
    color: #fff;
}

.site-header__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 16px 24px 12px;
}

.site-header__top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.site-header__brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.site-header__logo {
    height: 82px;
    width: auto;
    object-fit: contain;
}

.site-header__url {
    color: rgba(255,255,255,0.96);
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.site-header__rule {
    margin-top: 10px;
    height: 2px;
    background: rgba(255,255,255,0.88);
}

.page {
    max-width: var(--container);
    margin: 0 auto;
    padding: 28px 24px 56px;
}

.hero {
    text-align: center;
    padding: 8px 0 10px;
}

.hero__title {
    margin: 0;
    font-size: clamp(42px, 6vw, 64px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: var(--text);
}

.hero__subtitle {
    margin: 14px auto 0;
    max-width: 760px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.8;
}

.layout {
    margin-top: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    padding: 22px;
}

.card--result {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.section-head { margin-bottom: 22px; }

.section-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-text {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.75;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

.required {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(254, 141, 39, 0.12);
    color: #c56a11;
    font-size: 10px;
    font-weight: 700;
    margin-left: 4px;
}

.field input,
.field select {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    color: var(--text);
    font-size: 16px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.field input::placeholder { color: #9aa4b2; }

.field input:hover,
.field select:hover {
    border-color: var(--line-strong);
    background: #fff;
}

.field input:focus,
.field select:focus {
    border-color: var(--pfp-navy);
    box-shadow: var(--shadow-focus);
    background: #fff;
}

.field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

.error {
    margin: 0;
    color: var(--danger);
    font-size: 12px;
    line-height: 1.5;
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}

.button:hover { transform: translateY(-1px); }

.button--primary {
    background: var(--pfp-orange);
    color: #fff;
    box-shadow: 0 8px 20px rgba(254, 141, 39, 0.22);
}

.button--primary:hover {
    box-shadow: 0 10px 24px rgba(254, 141, 39, 0.28);
}

.button--secondary {
    background: #fff;
    border-color: var(--line);
    color: var(--text-muted);
}

.result-hero {
    background: linear-gradient(135deg, var(--pfp-navy) 0%, var(--pfp-navy-deep) 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 20px 18px;
    margin-bottom: 18px;
    box-shadow: 0 14px 32px rgba(21, 57, 135, 0.20);
}

.result-hero__label {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    opacity: .88;
}

.result-hero__value {
    margin: 8px 0 6px;
    font-size: clamp(38px, 6vw, 56px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.result-hero__sub {
    margin: 0;
    font-size: 12px;
    opacity: .88;
}

.result-list {
    display: grid;
    gap: 10px;
}

.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.result-row span:first-child {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.result-row span:last-child {
    color: var(--text);
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.result-row--total {
    background: var(--surface-accent);
    border-color: #c8d8f6;
}

.result-row--total span:first-child,
.result-row--total span:last-child {
    color: var(--pfp-navy);
}

.note-box {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fbfcfe;
    padding: 16px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.8;
}

.note-box p { margin: 0 0 8px; }
.note-box p:last-child { margin-bottom: 0; }
.note-box hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 12px 0;
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 360px;
    padding: 28px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    background: #fafcff;
    text-align: center;
}

.empty-state__title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.empty-state__text {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 14px;
}

@media (max-width: 900px) {
    .site-header__top {
        align-items: center;
        gap: 16px;
    }

    .layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .site-header__inner,
    .page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .site-header__inner {
        padding-top: 12px;
        padding-bottom: 10px;
    }

    .site-header__top {
        gap: 12px;
    }

    .site-header__logo {
        height: 44px;
    }

    .site-header__url {
        font-size: 13px;
    }

    .site-header__rule {
        margin-top: 8px;
    }

    .hero__title {
        font-size: clamp(34px, 10vw, 46px);
    }

    .card {
        padding: 18px 16px;
    }

    .actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ── 説明セクション ───────────────────────── */
.info-section {
    margin-top: 40px;
    padding: 28px 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.info-section__title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.info-section__lead {
    margin: 0 0 24px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.75;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.info-item {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px 18px;
}

.info-item h3 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--pfp-navy);
}

.info-item p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ── 関連記事セクション ───────────────────── */
.articles-section {
    margin-top: 40px;
}

.articles-section__title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.article-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    padding: 22px 24px;
    text-decoration: none;
    color: var(--text);
    transition: transform .15s ease, box-shadow .2s ease;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(21, 57, 135, 0.12);
}

.article-card__label {
    display: inline-block;
    background: var(--surface-accent);
    color: var(--pfp-navy);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.article-card__title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
}

.article-card__desc {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.65;
}

.article-card__arrow {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--pfp-navy);
}

@media (max-width: 640px) {
    .info-section { padding: 20px 16px; }
    .info-grid { grid-template-columns: 1fr 1fr; }
    .articles-grid { grid-template-columns: 1fr; }
}

/* ── 基礎知識セクション ───────────────────── */
.knowledge-section {
    margin-top: 40px;
    padding: 28px 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.knowledge-section__title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.knowledge-section__lead {
    margin: 0 0 24px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.75;
}

.knowledge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.knowledge-item {
    border-left: 3px solid var(--pfp-navy);
    padding: 14px 18px;
    background: var(--surface-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.knowledge-item h3 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--pfp-navy);
}

.knowledge-item p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ── FAQセクション ───────────────────────── */
.faq-section {
    margin-top: 40px;
}

.faq-section__title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-q {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: var(--surface-accent);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
}

.faq-q::before {
    content: "Q";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: var(--pfp-navy);
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}

.faq-a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.75;
}

.faq-a::before {
    content: "A";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: var(--pfp-orange);
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}

@media (max-width: 640px) {
    .knowledge-section { padding: 20px 16px; }
    .knowledge-grid { grid-template-columns: 1fr; }
}
