/* 制作キットの共通スタイル（2026-11-05。題材によらない）。
   見た目の型は lab の standards/site-design.md の「人気サイトの型」と knowledge/notes/web-design-popular.md §4 の10点
   （クリーム色の帯＋紺の文字・2色の大見出し・平たいイラスト・色の付いた大きなボタン1つ・数字は色の札・色の丸のアイコン・
   サムネイル付きの横長カード・運営者情報をフッターに）。2つ目のサイト（site2/assets/style.css）の「人気サイトの型 2回目」を元に、
   題材の色は --brand と --cta の2つだけ変えれば済むようにまとめた。外部のフォント・ライブラリは読み込まない。常に明るい表示。 */

/* ===== 変数（サイトごとに変えるのは --brand・--brand-soft・--cta・--cta-dark） ===== */
:root {
  --brand: #1d6b55;       /* 基調色（白地で 4.5:1 以上） */
  --brand-soft: #e3f3ec;
  --cta: #c84a0c;         /* 大きなボタン（白い文字で約4.7:1） */
  --cta-dark: #9c3807;
  --navy: #1d2f55;        /* 見出しの紺（白地で約13:1） */
  --cream: #fff4dc;       /* 頭の帯 */
  --cream-line: #f0d9a8;
  --bg: #ffffff;
  --fg: #1f2328;
  --muted: #59636e;       /* 白地で約6:1 */
  --line: #d1d9e0;
  --line-strong: #8c959f; /* 入力欄の枠（3:1 以上） */
  --soft: #f6f8fa;
  --good: #1a7f37; --good-bg: #dafbe1;
  --warn: #9a6700; --warn-bg: #fff8c5;
  --error: #cf222e; --error-bg: #ffebe9;
  --dot-orange: #e0661a; --dot-blue: #2f6fd0; --dot-green: #1f8f5f;
  --dot-purple: #7a4fc4; --dot-teal: #0f7f8a; --dot-red: #d23f3f;
  --shadow: 0 2px 8px rgba(29,47,85,.10);
  color-scheme: only light;
}

/* ===== 土台 ===== */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); line-height: 1.75;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif; }
a { color: var(--brand); }
img, svg { max-width: 100%; }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
.wrap-wide { max-width: 960px; margin: 0 auto; padding: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

/* ===== ヘッダー（スマホは横にスクロールできるタブ） ===== */
header.site { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 960px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 16px; min-height: 56px; }
.site-logo { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--navy); font-weight: 800; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.site-logo svg { width: 28px; height: 28px; color: var(--cta); }
.header-nav { display: flex; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.header-nav::-webkit-scrollbar { display: none; }
.header-nav a { padding: 16px 10px; color: var(--muted); font-size: .9rem; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.header-nav a:hover, .header-nav a[aria-current] { color: var(--brand); border-bottom-color: var(--brand); }

/* ===== パンくず ===== */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0; padding: 0; font-size: .85rem; color: var(--muted); }
.breadcrumb li::before { content: ">"; margin: 0 6px; }
.breadcrumb li:first-child::before { content: ""; margin: 0; }
.breadcrumb a { display: inline-block; padding: 12px 0; color: var(--muted); text-decoration: none; }

/* ===== 見出し・文 ===== */
h1 { font-size: 1.5rem; line-height: 1.4; margin: 16px 0 8px; color: var(--navy); }
h2 { font-size: 1.25rem; line-height: 1.45; margin: 40px 0 12px; color: var(--navy); display: flex; align-items: center; gap: 8px; }
h2::before { content: ""; flex-shrink: 0; width: 6px; height: 1.2em; border-radius: 3px; background: var(--cta); }
h2[id], h3[id] { scroll-margin-top: 64px; }
h3 { font-size: 1.05rem; margin: 24px 0 4px; color: var(--navy); }
.meta { color: var(--muted); font-size: .85rem; }

/* ===== 頭の帯（人気サイトの型 1・2・3・4） ===== */
.hero { display: grid; grid-template-columns: 1fr 120px; grid-template-areas: "eyebrow eyebrow" "title title" "lead art" "cta cta" "pills pills";
  column-gap: 8px; margin: -16px -16px 16px; padding: 20px 16px 16px; background: var(--cream); color: var(--navy); }
@media (min-width: 720px) {
  .hero { margin: 8px 0 16px; padding: 28px 32px; border-radius: 20px; grid-template-columns: 1fr 220px;
    grid-template-areas: "eyebrow art" "title art" "lead art" "cta art" "pills art"; column-gap: 24px; }
}
.hero-eyebrow { grid-area: eyebrow; justify-self: start; margin: 0 0 8px; padding: 2px 12px; border-radius: 999px; background: #fff; color: var(--cta-dark); font-weight: 700; font-size: .85rem; }
.hero h1 { grid-area: title; margin: 0 0 8px; font-size: 1.9rem; line-height: 1.3; font-weight: 800; }
.hero h1 .hl { color: var(--cta); }
.hero-lead { grid-area: lead; margin: 0; font-size: .95rem; line-height: 1.6; align-self: center; }
.hero-art { grid-area: art; width: 100%; height: auto; align-self: center; }
.hero .btn-cta { grid-area: cta; }
.hero .pill-row { grid-area: pills; }
/* 計算・比較のページの帯は低く（入力の始まりを1画面目に残す） */
.hero.page { display: block; margin: 0 -16px 16px; padding: 16px; }
.hero.page::after { content: ""; display: block; clear: both; }
.hero.page h1 { font-size: 1.6rem; }
.hero.page .hero-art { float: right; width: 96px; margin: 0 0 4px 8px; }
@media (min-width: 720px) { .hero.page { margin: 8px 0 16px; padding: 24px 28px; } .hero.page .hero-art { width: 140px; } .hero.page h1 { font-size: 2rem; } }
.hero-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 0 0 8px; font-size: .85rem; }
.hero-meta a { color: var(--navy); padding: 11px 0; margin: -11px 0; }

/* ===== 大きなボタン（1画面目に1つ） ===== */
.btn-cta { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; margin-top: 14px; padding: 12px 16px;
  border: 0; border-radius: 12px; background: var(--cta); color: #fff; font: inherit; font-weight: 800; font-size: 1.1rem; line-height: 1.3;
  text-decoration: none; text-align: center; box-shadow: 0 4px 0 var(--cta-dark); cursor: pointer; width: 100%; }
.btn-cta:hover { filter: brightness(1.06); }
.btn-cta:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--cta-dark); }

/* ===== 札・バッジ ===== */
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 14px 0 0; padding: 0; }
.pill-row li { padding: 2px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--cream-line); font-size: .8rem; font-weight: 600; }
.tag { display: inline-block; padding: 0 6px; border-radius: 6px; font-weight: 800; white-space: nowrap; }
.tag.blue { background: #e3ecfb; color: #1f4fa3; }
.tag.red { background: #fde4e1; color: #b42318; }
.tag.green { background: #dcf3e6; color: #17603f; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-size: .8rem; font-weight: 700; }

/* ===== 入力（単位つき・数字の欄とスライダー） ===== */
.form-card { padding: 16px; border-radius: 16px; background: #f3f6fb; }
label { display: block; font-weight: 700; margin-top: 16px; }
.form-card > label:first-child, .form-card > .field:first-child label { margin-top: 0; }
.hint { display: block; color: var(--muted); font-size: .85rem; font-weight: 400; }
input[type="text"], input[type="number"], input[type="date"], select {
  width: 100%; min-height: 48px; margin-top: 4px; padding: 10px 12px; font-size: 1.1rem;
  border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--fg); }
.unit-input { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.unit-input input { margin-top: 0; }
.unit-input .unit { flex-shrink: 0; font-weight: 700; color: var(--navy); }
input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--cta); }
.field-error { color: var(--error); font-size: .9rem; margin: 4px 0 0; }
fieldset { border: 0; padding: 0; margin: 16px 0 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label, .kit-opt { display: flex; align-items: center; gap: 6px; margin: 0; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line-strong);
  border-radius: 999px; background: #fff; font-weight: 600; cursor: pointer; }
.seg label:has(input:checked), .kit-opt:has(input:checked) { border-color: var(--cta); background: #fff1e8; color: var(--cta-dark); }

/* ===== 結果（色の面に大きな数字） ===== */
.result { margin-top: 16px; padding: 20px; border-radius: 16px; background: var(--brand-soft); }
.result.warn { background: var(--warn-bg); }
.result.good { background: var(--good-bg); }
.result-head { margin: 0 0 4px; font-weight: 700; }
.result-num { margin: 0 0 8px; }
.result-num strong { font-size: 2.1rem; line-height: 1.25; color: var(--navy); }
.result p:last-child { margin-bottom: 0; }
#result { scroll-margin-top: 64px; }
.result table { table-layout: fixed; }
.result table th[scope="row"] { width: 40%; font-size: .9rem; } /* 内訳の表の見出しの列がスマホで細くならないように（11/5 の写真） */
.bars { display: grid; gap: 6px; margin: 12px 0; }
.bar { display: grid; grid-template-columns: 10.5em 1fr; align-items: center; gap: 8px; font-size: .9rem; }
.bar span.fill { display: block; height: 18px; border-radius: 4px; background: var(--cta); min-width: 2px; }
.bar.alt span.fill { background: var(--dot-blue); }
.bar.gray span.fill { background: var(--line-strong); }
.bar.navy span.fill { background: var(--navy); }
/* 結果を2列で並べる（例: 借りられる上限／同じ県の平均の負担率なら。11/6。スマホでも横に並べて比べられるように数字を少し小さく） */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plan { padding: 12px; border-radius: 12px; background: #fff; border-top: 6px solid var(--navy); } /* 橙は目立たせたい側だけ（上限の列を先に目立たせない。11/6 の ux-reviewer） */
.plan.alt { border-top-color: var(--dot-blue); }
.plan-title { margin: 0 0 8px; font-weight: 800; color: var(--navy); font-size: .9rem; line-height: 1.45; }
.plan-label { margin: 0; font-size: .8rem; color: var(--muted); font-weight: 700; }
.plan-num { margin: 0 0 6px; }
.plan-num strong { font-size: 1.75rem; line-height: 1.25; color: var(--navy); word-break: keep-all; }
.plan-sub { margin: 0 0 6px; font-weight: 700; font-size: 1rem; }
@media (min-width: 720px) { .plan { padding: 16px; } .plan-num strong { font-size: 2.1rem; } .plan-title { font-size: 1rem; } }
.btn-sub { min-height: 44px; padding: 8px 16px; border: 1px solid var(--navy); border-radius: 10px; background: #fff; color: var(--navy); font: inherit; font-weight: 700; cursor: pointer; }
.hero-diff { margin: 8px 0 0; padding-left: 1.2em; font-size: 1rem; line-height: 1.6; } /* 本文 16px 以上（11/6 の ux-reviewer） */
.plan-cost { margin: -4px 0 6px; font-size: .8rem; color: var(--muted); }
.plan-cost:empty { display: none; }
.result.is-stale .plans, .result.is-stale .bars, .result.is-stale table { opacity: .35; }
.result-stale { margin: 0 0 8px; padding: 8px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-weight: 700; }
.hero-pr { margin: 8px 0 0; font-size: 1rem; }

/* ===== 表（比較表・料金表。スマホは1社1枚のカードに組み替え） ===== */
.kit-table-wrap { margin-top: 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
caption { text-align: left; font-weight: 700; color: var(--navy); padding-bottom: 6px; }
.kit-compare thead th { background: var(--navy); color: #fff; font-size: .9rem; }
.kit-compare tbody th { color: var(--navy); }
.kit-src { font-size: .85rem; }
.kit-checked { color: var(--muted); font-size: .85rem; }
.kit-stale { color: var(--warn); font-weight: 700; font-size: .85rem; }
.kit-table-note { color: var(--muted); font-size: .95rem; margin: 8px 0 0; } /* 表の注も読める大きさに（11/6 の ux-reviewer） */
.kit-empty { padding: 12px; border-radius: 8px; background: var(--soft); }
.kit-sort { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 600; }
.kit-sort select { width: auto; margin: 0; }
@media (max-width: 640px) {
  .kit-compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .kit-compare, .kit-compare caption, .kit-compare tbody, .kit-compare tr, .kit-compare th, .kit-compare td { display: block; width: 100%; }
  .kit-compare tr { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
  .kit-compare tbody th { background: var(--cream); font-size: 1.05rem; }
  .kit-compare td { display: grid; grid-template-columns: 8em 1fr; gap: 8px; }
  .kit-compare td::before { content: attr(data-label); color: var(--muted); font-size: .85rem; font-weight: 600; }
}

/* ===== 診断 ===== */
.kit-q { margin: 0 0 16px; }
.kit-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.kit-dg-h { margin-top: 16px; }
.kit-dg-list { padding-left: 1.2em; }
.kit-dg-list li { margin: 8px 0; }

/* ===== 案件の枠（PR 表記は本文と同じ大きさ。結果の後と解説の区切りだけ・1ページ2件まで） ===== */
.kit-aff { position: relative; margin-top: 20px; padding: 16px; border: 2px solid var(--cream-line); border-radius: 16px; background: #fffaf0; font-size: 1rem; }
.kit-pr { display: inline-block; margin: 0 0 6px; padding: 0 8px; border: 1px solid var(--fg); border-radius: 4px; font-weight: 700; font-size: 1rem; }
.kit-aff-lead { margin: 0 0 4px; }
.kit-aff-btn { display: flex; align-items: center; justify-content: center; min-height: 52px; margin: 8px 0; padding: 10px 16px; border-radius: 12px;
  background: var(--cta); color: #fff; font-weight: 800; text-decoration: none; text-align: center; box-shadow: 0 3px 0 var(--cta-dark); }
.kit-aff-fee { margin: 4px 0 0; font-size: .9rem; color: var(--fg); }
.kit-imp { position: absolute; left: 0; bottom: 0; }
/* ASP の素材（もしもの自由テキストなど）は文言を変えないので、見た目だけボタンに */
.kit-aff a[href*="af.moshimo.com"], .kit-aff a[href*="px.a8.net"] { display: flex; align-items: center; justify-content: center; min-height: 52px; margin: 8px 0;
  padding: 10px 16px; border-radius: 12px; background: var(--cta); color: #fff; font-weight: 800; text-decoration: none; text-align: center; }

/* ===== 折りたたみ・要約・免責 ===== */
details { margin-top: 12px; border-top: 1px solid var(--line); }
details summary { cursor: pointer; font-weight: 700; padding: 12px 0; min-height: 44px; color: var(--navy); }
.summary-box { padding: 16px; border-radius: 16px; background: var(--brand-soft); }
.summary-box ul { margin: 0; padding-left: 1.2em; }
.disclaimer { margin-top: 24px; padding: 12px 16px; border-left: 4px solid var(--line-strong); background: var(--soft); font-size: .9rem; }
.disclaimer p { margin: 4px 0; }
.formula { font-family: ui-monospace, Consolas, monospace; background: var(--soft); padding: 12px 16px; border-radius: 8px; overflow-x: auto; }
ul.sources li { margin: 16px 0; }

/* ===== トップ: やりたいことのタイル（2列）・一覧のカード ===== */
.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 12px; border-radius: 16px; background: #fff8ec; }
@media (min-width: 720px) { .tile-grid { grid-template-columns: repeat(3, 1fr); } }
.tile { display: flex; flex-direction: column; gap: 6px; min-height: 128px; padding: 14px; border-radius: 14px; background: #fff; border: 2px solid transparent;
  box-shadow: var(--shadow); color: var(--fg); text-decoration: none; }
.tile:hover { border-color: var(--cta); }
.tile-title { font-weight: 800; color: var(--navy); line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.tile-desc { font-size: .9rem; color: var(--muted); line-height: 1.5; }
.dot { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; color: #fff; flex-shrink: 0; }
.dot svg { width: 28px; height: 28px; }
.c-orange { background: var(--dot-orange); } .c-blue { background: var(--dot-blue); } .c-green { background: var(--dot-green); }
.c-purple { background: var(--dot-purple); } .c-teal { background: var(--dot-teal); } .c-red { background: var(--dot-red); }
.card-list { display: grid; gap: 12px; margin-top: 12px; }
.card-link { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow); color: var(--fg); text-decoration: none; }
.card-link:hover { border-color: var(--cta); }
.card-link .card-title { font-weight: 800; color: var(--navy); }
.card-link .card-desc { font-size: .9rem; color: var(--muted); }

/* ===== フッター（運営者情報が見える形で） ===== */
footer.site { margin-top: 48px; border-top: 1px solid var(--line); background: var(--soft); color: var(--muted); font-size: .85rem; }
.footer-inner { max-width: 960px; margin: 0 auto; padding: 24px 16px; }
.footer-owner { margin: 0 0 8px; color: var(--fg); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 8px; }
.footer-nav a { display: inline-block; padding: 12px 0; color: var(--muted); }

@media (max-width: 600px) {
  .header-inner { gap: 8px; }
  .header-nav a { padding: 14px 6px; font-size: .8rem; } /* 4項目でも 390px に収まるように（11/6） */
  .header-nav a[href="/about"]:not([aria-current]) { display: none; } /* 運営者情報はスマホではフッターから（11/6） */
  .hero h1 { font-size: 1.65rem; }
  .tile { min-height: 120px; padding: 12px; }
}
