/* 配色は変数に集約し、OS のダークモード設定に追随させる */
:root {
    color-scheme: light dark;
    --bg: #ffffff;
    --fg: #1c1c1e;
    --muted: #6e6e73;
    --line: #e5e5ea;
    /* Web フォントは読み込まず、各 OS 標準の日本語ゴシックに任せる */
    --sans: "Helvetica Neue", Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", Meiryo, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111113;
        --fg: #ececee;
        --muted: #98989f;
        --line: #2c2c2e;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 1 カラムで、和文が読みやすい行長に抑える。本文が短いページでもフッタを画面下端に置く */
body {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    max-width: 46rem;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0 1.5rem;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.9;
    line-break: strict;
    overflow-wrap: anywhere;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration-color: var(--muted);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
}

a:hover {
    text-decoration-color: currentColor;
}

/* ヘッダ: 等幅の社名ロゴは旧サイトの印象を引き継ぐ */
.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--line);
}

.site-title {
    font-family: var(--mono);
    font-size: 1.25rem;
    letter-spacing: 0.25em;
    text-decoration: none;
}

.site-nav ul {
    display: flex;
    gap: 1.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: var(--fg);
}

/* 本文 */
main {
    flex: 1;
    padding: 4rem 0 5rem;
}

h1 {
    margin: 0 0 2.5rem;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

h2 {
    margin: 3.5rem 0 1rem;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.6;
}

p {
    margin: 0 0 1.25rem;
}

/* 節の並びのあとに続く単独の段落は、節と同じ間隔を空ける */
main section + p {
    margin-top: 3.5rem;
}

/* 罫線は見出し直下の 1 本だけにして、項目どうしは行間で区切る */
main dl,
main ul {
    margin: 0;
    padding: 0.75rem 0 0;
    border-top: 1px solid var(--line);
    list-style: none;
}

main dl > div {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 0 1.5rem;
}

main dt {
    color: var(--muted);
}

main dd {
    margin: 0;
}

rt {
    color: var(--muted);
    font-size: 0.5em;
}

/* 文書末尾の署名・連絡先 */
main address {
    margin: 3.5rem 0 0;
    font-style: normal;
}

main address p:last-child {
    margin-bottom: 0;
}

.site-footer {
    padding: 2rem 0 3rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* 狭い画面では項目名を内容の上に積む */
@media (max-width: 30rem) {
    .site-header {
        padding-top: 2rem;
    }

    main {
        padding: 3rem 0 4rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    main dl > div {
        grid-template-columns: 1fr;
        padding: 0.5rem 0;
    }

    main dt {
        font-size: 0.8125rem;
    }
}
