/* ==========================================================================
   ハブ内サイトマップ・軽い型（hub-sitemap-light.css）2026-10-19 新設・LFP入口（/challenge/lfp/）でパイロット
   --------------------------------------------------------------------------
   hub-sitemap.css の後に読み込み、section に hub-sitemap--light が付いたサイトマップだけを上書きする
   （hub-sitemaps.json のハブ定義で "variant": "light" を指定すると、生成スクリプトがクラスを付ける）。
   方針：ヒーロー直下に見える位置のまま、重みだけを軽くする。読者に高齢の方が多いので小さくしすぎない。
     - 見出し：本文（16px）より小さく、太さを抑える（15px・600）
     - リンク：本文より1段階小さい 14px（13px 以下にしない）。色は白地に対しコントラスト比 4.5:1 以上
         #15803d（第1段）5.0:1、#4b5563（第2段以下）7.6:1、#14532d（見出し・ホバー）9.1:1
     - リンクと分かるよう、薄い下線を常に出し、ホバーで濃くする
     - 子ページは「関連ページ（N件）」のラベルを使わず、ツリー状の枝（CSS の線）で親の下にあることを表す
     - 行の上下の余白は、スマホで押し間違えない程度に残す（1行あたり約32px）
   ========================================================================== */

/* 枠：ページの内容とは別の「案内図」と分かるよう、線を1段濃く・地をごく薄い緑がかった白に（2026-10-19）。
   角丸と余白は共通CSSのまま。地 #f7fdf9 に対する文字のコントラスト比：#15803d 4.8:1、#4b5563 7.3:1、#166534 6.9:1 */
.hub-sitemap.hub-sitemap--light .hub-sitemap__inner {
    background: #f7fdf9;
    border: 1px solid #86efac;         /* green-300（共通CSSは #bbf7d0） */
}

/* 見出し（付記と同じ行に並べるため inline。付記が無いときも同じ見た目になるよう、下の余白は付記側で取る） */
.hub-sitemap.hub-sitemap--light .hub-sitemap__title {
    display: inline;
    margin: 0;
    font-size: 0.9375rem;              /* 15px */
    font-weight: 600;
    word-break: auto-phrase;           /* 狭い幅で「サイトマッ／プ」のように1文字だけ落ちないよう文節で折り返す（表示名と同じ。Chrome 系のみ） */
}

/* 見出しの付記（hub-sitemaps.json の description。生成スクリプトが全角かっこで囲む）
   見出しの直後に同じ行で続け、幅が足りないときは付記がまとまって次の行へ移る（inline-block）。
   付記自体が1行に収まらない幅では、付記の中で折り返す。大きさはリンクと同じ（スマホ14px・PC13px） */
.hub-sitemap.hub-sitemap--light .hub-sitemap__desc {
    display: inline-block;
    margin: 0 0 0.75rem;               /* 続くリンクの塊との間 12px（変更前と同じ） */
    font-size: 0.875rem;               /* 14px */
    font-weight: 400;
    line-height: 1.6;
    color: #5f6b7a;                    /* 子のリンク #4b5563 より一段薄い。地 #f7fdf9 に対し 5.3:1 */
    word-break: auto-phrase;           /* 付記の中で折り返すときは文節で（表示名と同じ。Chrome 系のみ） */
}

/* 先頭の案内（事業全体の案内ページへ）：背景色と太い線をやめ、細い線だけにする */
.hub-sitemap.hub-sitemap--light .hub-sitemap__lead {
    gap: 0.125rem 0.625rem;
    margin-bottom: 0.5rem;
    padding: 0.375rem 0 0.375rem 0.75rem;
    background: none;
    border-left: 2px solid #bbf7d0;
    border-radius: 0;
}
.hub-sitemap.hub-sitemap--light .hub-sitemap__lead:hover { background: none; }
.hub-sitemap.hub-sitemap--light .hub-sitemap__lead-label {
    font-size: 0.875rem;               /* 14px */
    font-weight: 500;
    color: #4b5563;                    /* gray-600・7.6:1 */
}
.hub-sitemap.hub-sitemap--light .hub-sitemap__lead-title {
    font-size: 0.9375rem;              /* 15px */
    font-weight: 600;
    color: #166534;                    /* green-800・7.1:1 */
    text-decoration: underline;
    text-decoration-color: #bbf7d0;
    text-underline-offset: 3px;
}
.hub-sitemap.hub-sitemap--light .hub-sitemap__lead:hover .hub-sitemap__lead-title { text-decoration-color: currentColor; }
.hub-sitemap.hub-sitemap--light .hub-sitemap__lead-arrow { color: #15803d; }

/* ツリー表記：入れ子の ul/li に CSS で枝を引く（文字記号 ├ └ │ は使わない）
     - 線は手書きハブ（miyazaki-lfp-hub の #tree）の子の線と同じ 2px・#bbf7d0（若葉色）
     - 1段あたりの字下げは 16px（ul の左 4px ＋ li の左 12px）。幅320pxでも3段が収まる
     - 縦線は li ごとに引き、最後の子だけ枝の高さで止めて L 字にする
     - 長いタイトルは li の中で折り返すので、2行目の頭は1行目の頭にそろう */
.hub-sitemap.hub-sitemap--light .hub-sitemap__tree--sub {
    margin: 0.125rem 0 0 0.25rem;      /* 親の文字の頭から 4px 右に縦線 */
    padding: 0;
    border-left: none;
}
.hub-sitemap.hub-sitemap--light .hub-sitemap__tree--sub > .hub-sitemap__item {
    position: relative;
    padding: 0.3125rem 0 0.125rem 0.75rem;   /* 縦線から文字まで 12px（枝 8px＋すき間 4px） */
    border-top: none;
}
/* 縦線（親から次の兄弟へ続く） */
.hub-sitemap.hub-sitemap--light .hub-sitemap__tree--sub > .hub-sitemap__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-left: 2px solid #bbf7d0;
}
/* 最後の子は枝の高さで止める（L 字） */
.hub-sitemap.hub-sitemap--light .hub-sitemap__tree--sub > .hub-sitemap__item:last-child::before {
    bottom: auto;
    height: 1rem;
}
/* 枝（縦線から文字の1行目の高さへ横に伸ばす。1行目の中央＝上余白 5px＋行の半分 約11px） */
.hub-sitemap.hub-sitemap--light .hub-sitemap__tree--sub > .hub-sitemap__item::after {
    content: "";
    position: absolute;
    left: 0;
    top: 1rem;
    width: 0.5rem;
    border-top: 2px solid #bbf7d0;
}

/* 行の余白（押し間違えない間隔。第1段は従来どおり上下 6px） */
.hub-sitemap.hub-sitemap--light .hub-sitemap__tree > .hub-sitemap__item { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.hub-sitemap.hub-sitemap--light .hub-sitemap__tree--sub > .hub-sitemap__item { padding-top: 0.3125rem; padding-bottom: 0.125rem; }

/* リンク：14px、薄い下線を常に出す */
.hub-sitemap.hub-sitemap--light .hub-sitemap__link {
    font-size: 0.875rem;               /* 14px */
    font-weight: 500;
    line-height: 1.6;
    color: #15803d;                    /* green-700・5.0:1 */
    text-decoration: underline;
    text-decoration-color: #bbf7d0;
    text-underline-offset: 3px;
}
.hub-sitemap.hub-sitemap--light .hub-sitemap__tree--sub .hub-sitemap__link {
    font-size: 0.875rem;               /* 子も 14px（小さくしない） */
    font-weight: 400;
    color: #4b5563;                    /* gray-600・7.6:1 */
    text-decoration-color: #e5e7eb;
}
.hub-sitemap.hub-sitemap--light .hub-sitemap__link:hover {
    color: #14532d;                    /* 9.1:1 */
    text-decoration-color: currentColor;
}

/* PC幅（1024px以上）だけ文字を1px小さくする（2026-10-19）。スマホ・タブレットは上のまま。13px未満にはしない。
   色・行間（1.6）・行の上下の余白は変えない */
@media (min-width: 1024px) {
    .hub-sitemap.hub-sitemap--light .hub-sitemap__title { font-size: 0.875rem; }       /* 15px → 14px */
    .hub-sitemap.hub-sitemap--light .hub-sitemap__desc { font-size: 0.8125rem; }       /* 説明：リンクと同じ 13px */
    .hub-sitemap.hub-sitemap--light .hub-sitemap__lead-label { font-size: 0.8125rem; } /* 14px → 13px */
    .hub-sitemap.hub-sitemap--light .hub-sitemap__lead-title { font-size: 0.875rem; }  /* 15px → 14px */
    .hub-sitemap.hub-sitemap--light .hub-sitemap__link,
    .hub-sitemap.hub-sitemap--light .hub-sitemap__tree--sub .hub-sitemap__link { font-size: 0.8125rem; }   /* 14px → 13px（全段） */
    /* 文字が小さくなると、1行目の文字の中央が約0.5px下がる（行の基準線に合わせて小さい文字が並ぶため。実測）。
       枝と L 字の終わりも同じだけ下げ、文字と線の位置関係（枝が文字の中央より約1px上）を今と同じに保つ */
    .hub-sitemap.hub-sitemap--light .hub-sitemap__tree--sub > .hub-sitemap__item:last-child::before { height: 1.03125rem; }  /* 16px → 16.5px */
    .hub-sitemap.hub-sitemap--light .hub-sitemap__tree--sub > .hub-sitemap__item::after { top: 1.03125rem; }                /* 16px → 16.5px */
}
