/* 全ページで共通のサイトヘッダー。ツール本体のheaderやnavには適用しない。 */
.site-header {
    background: white;
    border-bottom: 1px solid #dce4ed;
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header .header-inner {
    width: min(100% - 2rem, 1080px);
    min-height: 68px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-header .brand {
    display: block;
    width: clamp(190px, 25vw, 290px);
    padding: .5rem 0;
}

.site-header .brand img {
    display: block;
    width: 100%;
    height: auto;
}

.site-header .desktop-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.site-header .desktop-nav a,
.site-header .mobile-nav a {
    color: #1f2d3d;
    text-decoration: none;
    font-weight: 700;
}

.site-header .desktop-nav a {
    padding: .8rem .65rem;
    border-radius: 8px;
    font-size: .86rem;
}

.site-header .desktop-nav a:hover,
.site-header .desktop-nav a:focus-visible {
    background: #eaf4ff;
    color: #1769aa;
}

.site-header .menu-button {
    display: none;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid #b8c8d8;
    border-radius: 9px;
    background: white;
    color: #102c4c;
    font-size: 1.5rem;
    box-shadow: none;
}

.site-header .mobile-nav {
    display: none;
    padding: 0 1rem 1rem;
    border-top: 1px solid #e3eaf1;
}

.site-header .mobile-nav.open {
    display: grid;
}

.site-header .mobile-nav a {
    min-height: 46px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #edf1f5;
}

@media (max-width: 900px) {
    .site-header .desktop-nav {
        display: none;
    }

    .site-header .menu-button {
        display: grid;
        place-items: center;
    }
}

@media (max-width: 390px) {
    .site-header .header-inner {
        width: min(100% - 1rem, 1080px);
    }

    .site-header .brand {
        width: 185px;
    }
}

/* ページ先頭の見出しと末尾フッターを共有する。 */
.tool-heading {
    padding: .8rem 1rem .5rem;
    text-align: center;
}

h1.page-title {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Yu Gothic", sans-serif;
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    font-weight: 800;
    line-height: 1.25;
    color: #3b82f6;
    text-align: center;
}

h1.page-title .page-title--gradient {
    color: transparent;
    background-image: linear-gradient(to right, #3b82f6, #4f46e5);
    -webkit-background-clip: text;
    background-clip: text;
}

h2.section-title {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Yu Gothic", sans-serif;
    font-size: clamp(1.2rem, 3.6vw, 1.3rem);
    font-weight: 700;
    line-height: 1.35;
    color: #31529d;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: .16em;
}

footer.page-footer {
    box-sizing: border-box;
    overflow-wrap: anywhere;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Yu Gothic", sans-serif;
    font-size: .85rem;
    line-height: 1.6;
    color: #64748b;
}

footer.page-footer :is(h2, h3, p, .legal, .version, .author-note, .version-info) {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

footer.page-footer a {
    color: #4f46e5;
}

.page-footer--framed {
    border-top: 1px solid #dce4ed;
    background: white;
}

.page-footer--author {
    border-top: 1px solid #e0e0e0;
}

/* 作者・利用上の注意・バージョンを各ページで揃える。 */
.site-footer.page-footer--framed {
    padding: 1.5rem max(1rem, env(safe-area-inset-left)) 2.5rem;
    color: #607184;
    text-align: left;
}

.site-footer.page-footer--framed .footer-inner {
    width: min(100%, 1040px);
    margin: auto;
}

.site-footer.page-footer--framed .author-title {
    margin: 0 0 .45rem;
    color: #102c4c;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}

.site-footer.page-footer--framed .author-title a,
.site-footer.page-footer--framed .legal a {
    color: #1769aa;
}

.site-footer.page-footer--framed .author-note {
    margin: .02em 0;
    color: #607184;
    font-size: .75rem;
    line-height: 1.1;
}

.site-footer.page-footer--framed .legal {
    margin-top: .65rem;
    color: #607184;
    font-size: .72rem;
    line-height: 1.65;
}

.site-footer.page-footer--framed .legal p {
    margin: .15rem 0;
}

.site-footer.page-footer--framed .version {
    margin: 0 0 .45rem !important;
    color: #718096;
}

.site-footer.page-footer--framed .copyright {
    padding-top: .4rem;
    border-top: 1px solid #e4ebf2;
    color: #718096;
    font-size: .58rem;
    line-height: 1.4;
}

.site-footer.page-footer--framed .copyright p {
    margin: .1rem 0;
}
