/*
 * 総合トップ（home）専用。app.css のトークンを使う。
 * 帯（.tp-band）は box-shadow と clip-path で背景だけ画面いっぱいに広げる（lp.css の .lp-band と同じ書き方。横スクロールを出さない）。
 * ヒーローの写真の上の文字は、写真の左の明るい壁に白の重ねを足して読ませる（ダークモードでも同じ色＝写真の色に合わせる）。
 */
:root {
  --tp-ink: #13314f;
  --tp-cta: #ecc94b;
  --tp-cta-ink: #1f2f45;
}

.tp { display: grid; margin-top: -28px; }
body:has(.tp) { overflow-x: clip; }
.tp-band { position: relative; box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax); background: var(--band); }
.tp-soft { --band: var(--navy-soft); }
.tp-sec { padding-block: 56px; display: grid; gap: 22px; }
.tp-head { display: grid; gap: 6px; }
.tp-head h2 { margin: 0; padding: 0; border: 0; font-size: clamp(1.375rem, 3vw, 1.875rem); line-height: 1.4; }
.tp-head p { margin: 0; color: var(--sub); }
.tp-more { margin: 0; text-align: right; font-weight: 700; }
.tp-more a::after { content: " ›"; }

/* ヒーロー：写真を画面いっぱいに。左に文字（白の重ね）、右に人物 */
.tp-hero { --band: #f3f1ec; padding-block: 64px 56px; isolation: isolate; color: var(--tp-ink); }
.tp-hero::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1;
  background: linear-gradient(90deg, rgba(255, 255, 255, .94) 0%, rgba(255, 255, 255, .86) 34%, rgba(255, 255, 255, .25) 58%, rgba(255, 255, 255, 0) 72%),
    var(--tp-hero) 62% 40% / cover no-repeat; }
.tp-hero-copy { display: grid; gap: 20px; max-width: 560px; }
.tp-hero h1 { margin: 0; font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.3; font-weight: 700; color: var(--tp-ink); }
.tp-lead { margin: 0; font-size: clamp(1rem, 1.6vw, 1.125rem); line-height: 1.9; color: #1f2933; }

/* 診断する工事を選ぶ */
.tp-picker { display: grid; gap: 10px; padding: 16px; background: #ffffff; border-radius: 10px; box-shadow: 0 18px 40px -22px rgba(19, 49, 79, .55); }
.tp-picker > p { margin: 0; font-size: .875rem; font-weight: 700; color: #4a5563; }
.tp-picker > div { display: grid; gap: 8px; }
.tp-pick { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 8px;
  background: var(--tp-cta); color: var(--tp-cta-ink); text-decoration: none; box-shadow: 0 3px 0 #b8952a; transition: transform .12s ease, box-shadow .12s ease; touch-action: manipulation; }
.tp-pick:hover { transform: translateY(-1px); }
.tp-pick:active { transform: translateY(2px); box-shadow: 0 1px 0 #b8952a; }
.tp-pick:focus-visible { outline: 3px solid var(--tp-ink); outline-offset: 3px; }
.tp-pick img { background: #fff; border-radius: 6px; padding: 3px; }
.tp-pick span { display: grid; line-height: 1.4; }
.tp-pick b { font-size: 1.125rem; }
.tp-pick small { font-size: .8125rem; font-weight: 700; }
.tp-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9375rem; font-weight: 700; color: var(--tp-ink); }
.tp-facts li { display: inline-flex; align-items: center; gap: 6px; }
.tp-facts i { color: #1f4e79; }   /* ヒーローはダークモードでも明るい帯なので固定色 */

/* 工事から探す：写真の入口 */
.tp-works { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tp-works a { position: relative; display: block; border-radius: 8px; overflow: hidden; color: #fff; text-decoration: none; aspect-ratio: 4 / 3; background: #1f2f45; }
.tp-works img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.tp-works span { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 10px; font-weight: 700; font-size: 1rem; line-height: 1.4;
  background: linear-gradient(transparent, rgba(10, 22, 36, .82)); }
.tp-works a:hover img { transform: scale(1.04); }
.tp-works a:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

/* 無料ツール */
.tp-tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
/* 便利ツール：記事の中のツールの枠（app.css の .tool-app）と同じ見た目（2026-10-31）。入力欄は見本 */
.tp-tool { display: grid; grid-template-rows: auto 1fr; height: 100%; border: 1px solid #c7d6e6; border-radius: 14px; overflow: hidden; background: var(--surface);
  color: var(--ink); text-decoration: none; box-shadow: 0 18px 40px -26px rgba(19, 49, 79, .55); transition: transform .15s ease, box-shadow .15s ease; }
.tp-tool:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -24px rgba(19, 49, 79, .6); }
.tp-tool:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.tp-tool .tool-app-bar { align-items: flex-start; }
.tp-tool .tool-app-name { display: block; font-size: 1.0625rem; }
.tp-tool .tool-app-steps span { counter-increment: st; }
.tp-tool .tool-app-steps span::before { content: counter(st, decimal) " "; font-weight: 700; color: #ecc94b; }
.tp-tool .tool-app-steps span + span::before { content: "→ " counter(st, decimal) " "; }
.tp-tool-body { display: grid; gap: 12px; align-content: start; padding: 16px; }
.tp-tool-note { font-size: .875rem; color: var(--sub); }
.tp-tool-form { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: #eef4fa; }
.tp-tool-sel { display: grid; gap: 2px; }
.tp-tool-sel small { font-size: .75rem; font-weight: 700; color: #173b5c; }
.tp-tool-sel > span { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 8px; border: 1px solid #b9cbe0; background: #fff; color: #6b7684; font-size: .875rem; }
.tp-tool-sel i { color: #1f4e79; font-size: .75rem; }
.tp-tool-go { justify-self: stretch; display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; border-radius: 10px; background: #1f4e79; color: #fff; font-weight: 700; }
.tp-tool:hover .tp-tool-go { background: #173b5c; }
@media (prefers-reduced-motion: reduce) { .tp-tool { transition: none; } .tp-tool:hover { transform: none; } }

/* 地域から探す */
.tp-areas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tp-areas a { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 14px 12px; border-radius: 8px;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }   /* 「北海道・東北」が途中で改行されないように（2026-10-31） */
.tp-types { margin-top: 18px; }
.tp-types h3 { font-size: 1rem; margin: 0 0 10px; }
.tp-areas small { color: var(--sub); font-weight: 400; }
.tp-areas a:hover { border-color: var(--navy); color: var(--navy); }
.tp-areas a:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

/* 新しいコラム */
.tp-cols { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tp-cols a { display: grid; gap: 8px; align-content: start; color: var(--ink); text-decoration: none; }
.tp-cols img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 6px; border: 1px solid var(--rule); }
.tp-cols b { line-height: 1.6; }
.tp-cols time { font-size: .8125rem; color: var(--sub); }
.tp-cols a:hover b { text-decoration: underline; }
.tp-cols a:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

@media (max-width: 860px) {
  /* スマホ：写真は上に帯で見せ、文字はその下（写真に文字を重ねない） */
  .tp-hero { padding-block: calc(min(100vw, 860px) * .56 + 20px) 32px; }
  .tp-hero::before { bottom: auto; height: calc(min(100vw, 860px) * .56);
    background: linear-gradient(180deg, rgba(243, 241, 236, 0) 70%, #f3f1ec 100%), var(--tp-hero) 72% 40% / cover no-repeat; }
  .tp-works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-tools, .tp-cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .tp-sec { padding-block: 40px; }
}
@media (prefers-reduced-motion: reduce) { .tp-pick, .tp-works img { transition: none; } }
/* 工事の種類が3つ以上なら、選ぶボタンを2列に（2026-11-01 カテゴリを6つに） */
.tp-picker > div:has(> .tp-pick:nth-child(3)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tp-picker > div:has(> .tp-pick:nth-child(3)) .tp-pick b { font-size: 1rem; }
@media (max-width: 560px) { .tp-picker > div:has(> .tp-pick:nth-child(3)) { grid-template-columns: 1fr; } }
/* コラムを工事の種類から見る：横に並ぶボタン（2026-11-01 縦に6行並んで見にくかったため） */
.tp-colnav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.tp-colnav > span { font-weight: 700; margin-right: 6px; }
.tp-colnav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; }
.tp-colnav a:hover { border-color: var(--navy); color: var(--navy); }
.tp-colnav a:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

/* 診断の仕組み：STEP と小さな見本（2026-10-31）。見本の紙は、どちらのテーマでも紙の色 */
.mech { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: mech; }
.mech-step { position: relative; display: grid; gap: 12px; align-content: start; padding: 22px 20px 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--rule); }
.mech-step + .mech-step::before { content: ""; position: absolute; left: -22px; top: 112px; width: 16px; height: 16px;
  border-top: 3px solid var(--navy); border-right: 3px solid var(--navy); transform: rotate(45deg); opacity: .55; }
.mech-num { margin: 0; display: flex; align-items: baseline; gap: 6px; font-size: .8125rem; font-weight: 700; letter-spacing: .12em; color: var(--navy); }
.mech-num b { font-size: 2rem; line-height: 1; letter-spacing: 0; }
.mech-art { height: 150px; border-radius: 10px; padding: 14px; display: grid; align-content: center; overflow: hidden;
  background: linear-gradient(135deg, #eef3f8, #f7f4ec); border: 1px solid var(--rule); color: #1f2933; font-size: .8125rem; }
.mech-step h3 { margin: 4px 0 0; font-size: 1.125rem; display: flex; gap: 8px; align-items: baseline; }
.mech-step h3 i { color: var(--navy); }
.mech-step > p:last-child { margin: 0; font-size: .9375rem; color: var(--sub); line-height: 1.8; }
.ma-read { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; background: #fffdf8; border: 1px solid #d9d2c3; border-radius: 4px; box-shadow: 0 4px 10px rgba(0, 0, 0, .06); }
.ma-read span { padding: 7px 8px; border-bottom: 1px solid #ece5d6; white-space: nowrap; }
.ma-read span:nth-child(3n) { text-align: right; font-variant-numeric: tabular-nums; }
.ma-read span:nth-last-child(-n+3) { border-bottom: 0; }
.ma-read .ma-unk { background: #fbe9e6; color: #b03a2e; font-weight: 700; }
.ma-check { list-style: none; margin: 0; padding: 10px 12px; display: grid; gap: 6px; background: #fff; border-radius: 6px; box-shadow: 0 4px 10px rgba(0, 0, 0, .06); }
.ma-check li { display: flex; gap: 8px; align-items: center; }
.ma-check li i { width: 18px; height: 18px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .625rem; color: #fff; }
.ma-check .ok i { background: #2f6d4a; }
.ma-check .ng { color: #b03a2e; font-weight: 700; }
.ma-check .ng i { background: #b03a2e; }
.ma-check .law { color: #1f4e79; font-size: .75rem; }
.ma-check .law i { background: none; color: #1f4e79; font-size: .75rem; }
.ma-ask { position: relative; display: grid; gap: 6px; padding: 12px 14px; background: #fff; border-radius: 10px 10px 10px 2px; box-shadow: 0 4px 10px rgba(0, 0, 0, .06); border-left: 4px solid #ecc94b; }
.ma-ask p { margin: 0; }
.ma-ask-h { font-weight: 700; color: #1f4e79; display: flex; gap: 6px; align-items: center; }
.ma-ask-b { line-height: 1.6; }
.ma-copy { justify-self: end; display: inline-flex; gap: 4px; align-items: center; font-size: .75rem; font-weight: 700; color: #1f4e79; border: 1px solid #1f4e79; border-radius: 4px; padding: 2px 8px; }
@media (max-width: 860px) {
  .mech { grid-template-columns: 1fr; gap: 26px; }
  .mech-step + .mech-step::before { left: 50%; top: -20px; margin-left: -8px; transform: rotate(135deg); }
  .mech-art { height: auto; min-height: 120px; }
}

/* 工事の種類から業者を探す（2026-10-31）。6つを同じ形のカードで。工事名は改行しない。取り込み前は「準備中」でリンクにしない */
.tp-dirs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tp-dir { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; column-gap: 14px; row-gap: 2px; padding: 16px 18px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; height: 100%; }
a.tp-dir:hover { border-color: var(--navy); box-shadow: 0 6px 16px rgba(19, 49, 79, .08); }
a.tp-dir:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.tp-dir img { width: 44px; height: 44px; grid-row: span 2; }
.tp-dir-name { font-weight: 700; font-size: 1.0625rem; white-space: nowrap; }
.tp-dir-n { font-size: .875rem; color: var(--sub); white-space: nowrap; }
a.tp-dir .tp-dir-n::after { content: "\203A"; margin-left: 8px; color: var(--navy); font-weight: 700; }
.tp-dir.is-off { border-style: dashed; color: var(--sub); background: transparent; }
.tp-dir.is-off img { opacity: .5; }
@media (max-width: 960px) { .tp-dirs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tp-dirs { grid-template-columns: 1fr; } }
/* 3枚の見出しの帯の高さをそろえる（手順の文の長さが違っても本文の始まりがそろう） */
.tp-tools > li { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
.tp-tools .tp-tool { grid-row: span 2; grid-template-rows: subgrid; }
.tp-tool .tool-app-steps { flex-direction: column; gap: 2px; }
@media (max-width: 860px) { .tp-tools > li, .tp-tools .tp-tool { grid-row: auto; grid-template-rows: auto 1fr; } }
