@charset "utf-8";
/* CSS Document */
:root {
  color-scheme: light;
  --ink: #1f2833;
  --ink-sub: #4a5562;
  --muted: #6b7684;
  --line: #d9dfe7;
  --line-soft: #e8ecf1;
  --bg: #ffffff;
  --bg-page: #f6f8fb;
  --brand: #1d3f72;
  --brand-mid: #2f5d9e;
  --brand-tint: #eaf0f9;
  --brand-tint2: #f5f8fe;
  --ok: #1f6f5c;
  --ok-tint: #e9f5f1;
  --ng: #b3362f;
  --ng-tint: #fbeeed;
  --side-w: 300px;
  --content-w: 820px;
  --radius: 6px;
}
* { box-sizing: border-box; }
 body {
  font-size: 16px;
}div#content {
    width: auto;
    max-width: 1080px;
}
a { color: var(--brand-mid); text-underline-offset: 3px; word-break: break-all; }
a:hover { color: var(--brand); }

/* 読み進み具合 */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--brand-mid); z-index: 60; }

/* ===== 左の目次 ===== */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--side-w);
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  z-index: 40;
}
.side-head { padding: 22px 22px 16px; border-bottom: 1px solid var(--line-soft); }
.side-head .side-title { margin: 0; font-size: 14px; line-height: 1.6; font-weight: 700; color: var(--brand); }
.side-head .side-sub { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
#toc_container { flex: 1; overflow-y: auto; padding: 14px 12px 40px; overscroll-behavior: contain; }
#toc_container .mokuji { padding: 0 10px 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
#toc_container ul { list-style: none; margin: 0; padding: 0; }
.toc-ch { margin: 2px 0; }
.toc-row { display: flex; align-items: stretch; border-radius: var(--radius); }
.toc-row > a {
  flex: 1; display: flex; gap: 8px; align-items: baseline;
  padding: 8px 10px; border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.55; font-weight: 500;
  word-break: normal;
}
.toc-row > a:hover { background: var(--brand-tint2); }
.toc_depth_1 { flex: none; min-width: 2.6em; font-size: 12px; font-weight: 700; color: var(--brand-mid); }
.toc-toggle {
  flex: none; width: 34px; border: 0; background: transparent; cursor: pointer; border-radius: var(--radius);
  display: grid; place-items: center;
}
.toc-toggle:hover { background: var(--brand-tint2); }
.toc-toggle:focus-visible, .toc-row > a:focus-visible, .toc-sub a:focus-visible { outline: 2px solid var(--brand-mid); outline-offset: -2px; }
.chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; }
.toc-toggle[aria-expanded="true"] .chev { transform: rotate(-135deg) translate(-2px, -2px); }
.toc-sub { margin: 2px 0 8px 18px !important; padding-left: 10px !important; border-left: 2px solid var(--line-soft); }
.toc-sub a {
  display: flex; gap: 6px; padding: 5px 8px; border-radius: var(--radius);
  color: var(--ink-sub); text-decoration: none; font-size: 13px; line-height: 1.55; word-break: normal;
}
.toc-sub a:hover { background: var(--brand-tint2); color: var(--ink); }
.toc_depth_2 { flex: none; color: var(--muted); font-size: 12px; min-width: 2.2em; }
.toc-ch.is-active > .toc-row > a { background: var(--brand-tint); color: var(--brand); font-weight: 700; }
.toc-sub a.is-active { color: var(--brand); font-weight: 700; background: var(--brand-tint2); }
.toc-sub a.is-active .toc_depth_2 { color: var(--brand-mid); }

/* ===== 本文 ===== */
.main { margin-left: var(--side-w); padding: 0 40px 120px; }
.doc { max-width: var(--content-w); margin: 0 auto; }
.hero { padding: 72px 0 40px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.hero h1 { margin: 0 0 18px; font-size: 34px; line-height: 1.45; letter-spacing: .04em; color: var(--brand); }
.hero p { margin: 0; color: var(--ink-sub); font-size: 14px; line-height: 1.9; }

.chapter { background: #fff; border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 48px 40px; margin-top: 40px; }
h2, h3, h4 { scroll-margin-top: 24px; }
#content #main h2:nth-of-type(1), h2:nth-of-type(1) {
    margin-top: 60px;
}
h2 {
  margin: 32px 0 28px; padding: 0 0 16px;
  font-size: 26px; line-height: 1.5; color: var(--brand); letter-spacing: .03em;
  border-bottom: 3px solid var(--brand);
}
h3 {
  margin: 56px 0 20px; padding: 2px 0 2px 14px;
  font-size: 21px; line-height: 1.55; color: var(--ink);
  border-left: 5px solid var(--brand-mid);
}
h4 {
  margin: 44px 0 16px; padding: 9px 14px;
  font-size: 17.5px; line-height: 1.6; color: var(--brand);
  background: var(--brand-tint2); border-radius: var(--radius);
}
h5 {
  margin: 32px 0 10px; font-size: 16px; line-height: 1.7; color: var(--ink);
  display: flex; gap: 10px; align-items: baseline;
}
h5::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--brand-mid); transform: translateY(-2px); }
p { margin: 0 0 1.1em; }
strong { font-weight: 700; }
.cite { color: var(--muted); font-size: .82em; letter-spacing: 0; white-space: nowrap; }
[data-ch="references"] .cite { color: var(--brand); font-size: 1em; font-weight: 700; }

/* 箇条書き（全体で共通） */
.doc ul, .doc ol { margin: 0 0 1.4em; padding-left: 1.5em; }
.doc li { margin: .35em 0; padding-left: .2em; }
.doc ul > li::marker { color: var(--brand-mid); }
.doc ol > li::marker { color: var(--brand-mid); font-weight: 700; }
.doc li ul, .doc li ol { margin: .3em 0 .4em; }
.li-desc { display: block; color: var(--ink-sub); }
.chapter > ul, .chapter > ol {
  background: var(--brand-tint2); border-radius: var(--radius);
  padding: 14px 20px 14px 2.6em; border: 1px solid var(--line-soft);
}

/* 表（全体で共通） */
.table-block { margin: 8px 0 28px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14.5px; line-height: 1.75; }
th, td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
tr:first-child > * { border-top: 0; }
tr > *:first-child { border-left: 0; }
tr > *:last-child { border-right: 0; }
tr:last-child > * { border-bottom: 0; }
th { background: var(--brand-tint); color: var(--brand); font-weight: 700; }
th { min-width: 5em; }
td { min-width: 7.5em; }
tr > th:first-child { min-width: 6em; }
table.summary tr:nth-child(2) th:nth-child(1) { width: 24%; }
table.summary tr:nth-child(2) th:nth-child(2) { width: 26%; }
td p, th p { margin: 0 0 .5em; }
td p:last-child, th p:last-child { margin-bottom: 0; }
td ul, td ol { margin: 0 !important; padding-left: 1.2em !important; }
table.kv th { width: 30%; background: var(--brand-tint2); }
table.summary tr:first-child th { background: var(--brand); color: #fff; text-align: center; font-size: 15px; }
table.summary tr:nth-child(2) th { text-align: center; }
table.summary td:first-child[rowspan], table.summary td:first-child { background: #fbfcfe; }
.table-caption { margin: 8px 2px 0; font-size: 13px; color: var(--muted); }

/* 結論 */
.attention { margin: 4px 0 28px; padding: 18px 22px; border: 2px solid var(--brand); border-radius: var(--radius); background: #fff; }
.attention-label { display: inline-block; margin: 0 0 8px; padding: 0 12px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; border-radius: 3px; line-height: 1.9; }
.attention p:last-child { margin: 0; font-weight: 500; }

/* 〇✖の例 */
.judge-box, .note-box { margin: 8px 0 28px; padding: 16px 20px; background: var(--brand-tint2); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.judge-title { margin: 0 0 8px; font-weight: 700; }
.judge-box + .judge-box { margin-top: -12px; }
.doc .judge-list { list-style: none; margin: 0; padding: 0; }
.doc .judge-list li { display: flex; gap: 10px; align-items: baseline; margin: .3em 0; padding: 0; }
.judge-mark { flex: none; display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; font-size: 12px; font-weight: 700; line-height: 1; transform: translateY(-1px); }
.judge-list li.ok .judge-mark { background: var(--ok-tint); color: var(--ok); }
.judge-list li.ng .judge-mark { background: var(--ng-tint); color: var(--ng); }
td .judge-list li { margin: .15em 0; }

/* リスクのある姿／あるべき姿 */
.contrast { margin: 4px 0 28px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.contrast-row { padding: 16px 20px; border-left: 5px solid; }
.contrast-row p:last-child { margin: 0; }
.contrast-row + .contrast-row { border-top: 1px solid var(--line); }
.contrast-label { margin: 0 0 4px; font-size: 13px; font-weight: 700; }
.contrast-row.risk { border-left-color: var(--ng); background: #fff; }
.contrast-row.risk .contrast-label { color: var(--ng); }
.contrast-row.ideal { border-left-color: var(--ok); background: #fff; }
.contrast-row.ideal .contrast-label { color: var(--ok); }

/* カード（ドキュメント上のパネル型の表） */
.cards { display: grid; gap: 14px; margin: 8px 0 28px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-3, .cards-4 { grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--brand-mid); border-radius: var(--radius); padding: 16px 18px; }
.card-icon { display: block; width: auto; height: 44px; margin-bottom: 8px; }
.card-title { margin: 0 0 6px; font-weight: 700; color: var(--brand); line-height: 1.6; }
.card p:last-child { margin-bottom: 0; }
.card p:not(.card-title) { font-size: 14.5px; line-height: 1.8; color: var(--ink-sub); }

/* 概要の一覧（ラベル：内容） */
.spec-list { margin: 8px 0 28px; padding: 14px 20px; background: var(--brand-tint2); border-radius: var(--radius); border: 1px solid var(--line-soft); font-size: 15px; }
.spec-list > div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.spec-list > div:last-child { border-bottom: 0; }
.spec-list dt { font-weight: 700; color: var(--brand); }
.spec-list dd { margin: 0; }
.spec-list .dl-note { grid-template-columns: 1fr; color: var(--ink-sub); font-size: 14px; }

/* 図 */
figure { margin: 8px 0 28px; text-align: center; }
.fig-title { margin: 0 0 6px; font-weight: 700; font-size: 14px; color: var(--ink-sub); }
.fig-img { max-width: 100%; height: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); background: #fff; }
figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.figure-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 8px 0 28px; }
.figure-grid figure { margin: 0; }

/* スマホ用の上部バー */
.topbar { display: none; }
.scrim { display: none; }
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 30;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(20, 40, 70, .12); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top span { width: 10px; height: 10px; border-left: 2px solid var(--brand); border-top: 2px solid var(--brand); transform: rotate(45deg) translate(2px, 2px); }

@media (max-width: 1100px) {
  .chapter { padding: 8px 28px 32px; }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; width: min(86vw, 340px); box-shadow: 0 0 24px rgba(0,0,0,.18); z-index: 70; }
  body.toc-open .sidebar { transform: none; }
  body.toc-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 25, 40, .35); z-index: 65; }
  .main { margin-left: 0; padding: 0 16px 96px; }
  .topbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 50;
    margin: 0 -16px; padding: 10px 16px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line);
  }
  .topbar-title { flex: 1; font-size: 13px; font-weight: 700; color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .toc-open-btn {
    flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px;
    border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  }
  .burger { display: grid; gap: 3px; }
  .burger i { display: block; width: 14px; height: 2px; background: var(--brand); }
  h2, h3, h4 { scroll-margin-top: 64px; }
  .hero { padding: 40px 0 28px; }
  .hero h1 { font-size: 26px; }
  .chapter { padding: 4px 18px 28px; margin-top: 24px; }
  h2 { font-size: 22px; }
  h3 { font-size: 19px; margin-top: 44px; }
  h4 { font-size: 16.5px; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .cards-2, .cards-3, .cards-4, .figure-grid { grid-template-columns: 1fr; }
  .spec-list > div { grid-template-columns: 1fr; gap: 0; }
  .chapter { border-radius: 0; border-left: 0; border-right: 0; margin-left: -16px; margin-right: -16px; padding: 4px 16px 28px; }
}
@media print {
  .sidebar, .topbar, .to-top, .progress { display: none !important; }
  .main { margin: 0; padding: 0; }
  .chapter { border: 0; padding: 0; }
  .table-scroll { overflow: visible; }
}

/* ===== 固定ページ（未来トレンド研究機構サイト）のデザインに合わせる上書き ===== */
:root {
  --ink: #303030;
  --brand: #111761;
  --brand-mid: #111761;
  --brand-tint: #f3f5f7;
  --brand-tint2: #f3f5f7;
  --bg-page: #ffffff;
  --gold: #c09b51;
  --table-line: #bfbfbf;
}
body { background: #fff; color: var(--ink); }

/* タイトル帯（サイトのページタイトル部分に相当） */
.hero { margin: 0 -40px 8px; padding: 56px 40px; background: var(--brand); border-bottom: 0; }
.hero h1 { color: #fff; font-size: 32px; }
.hero p { color: rgba(255,255,255,.85); }

/* 章の白い枠は使わず、背景と同じ白でつなげる */
.chapter { background: transparent; border: 0; border-radius: 0; padding: 0; margin-top: 0; }
.chapter.lead { margin-top: 40px; }

/* 見出し：サイトの固定ページと同じ形 */
h2 {
  position: relative;
  margin: 60px 0 30px; padding: 20px 0;
  font-size: 28px; font-weight: 700; line-height: normal; letter-spacing: 2px;
  color: #000; border-bottom: 2px solid #111760;
}
h2::before { content: ""; position: absolute; left: 0; bottom: -2px; width: 100px; height: 2px; background: var(--gold); }
h3 {
  position: relative;
  margin: 30px 0; padding: 20px 0;
  font-size: 22px; font-weight: 700; line-height: normal; letter-spacing: 2px;
  color: var(--ink); border-left: 0; border-bottom: 1px solid #d0d0d0;
}
h3::before { content: ""; position: absolute; left: 0; bottom: -1px; width: 100px; height: 1px; background: var(--brand); }
h4 {
  position: relative;
  margin: 20px 0 0; padding: 20px 0 20px 50px;
  font-size: 20px; font-weight: 700; line-height: normal; letter-spacing: 2px;
  color: var(--ink); background: none; border-radius: 0;
}
h4::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; margin: auto; width: 25px; height: 1px; background: #333; }

/* 表：サイトの表と同じ線・見出しセル */
.table-scroll { border: 0; border-radius: 0; }
.doc th, .doc td { border: 1px solid var(--table-line); padding: 10px; }
.doc th { background: #f3f5f7; color: var(--brand); }
table.kv th { background: #f3f5f7; }
table.summary tr:first-child th { background: var(--brand); color: #fff; }
table.summary td:first-child[rowspan], table.summary td:first-child { background: #fff; }

/* 枠もの：サイトの sq2 / sq3 の色に合わせる */
.attention { border: 1px solid var(--brand); border-radius: 0; background: #f3f5f7; padding: 20px; }
.judge-box, .note-box { border: 1px solid var(--brand); border-radius: 0; background: #fff; padding: 20px; }
.chapter > ul, .chapter > ol { border: 1px solid #eee; border-radius: 0; background: #fff; }
.card { border-top-color: var(--gold); border-radius: 0; }
.spec-list { border-radius: 0; }

@media (max-width: 960px) {
  .hero { margin: 0 -16px 8px; padding: 36px 16px; }
  .hero h1 { font-size: 24px; }
  h2 { font-size: 23px; }
  h3 { font-size: 18px; }
  h4 { font-size: 17px; }
}

/* ===== 2026-10-22 修正指示の反映 ===== */
/* ①⑨⑰ カード上部の金の線をなくす */
.card { border-top: 1px solid var(--line); }

/* ②③④ 注記・補足（文字は1px小さく、色は注記と同じ） */
.dd-note { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-sub); }
.note-text { font-size: 13px; color: var(--ink-sub); }

/* ⑤ 円グラフと場面別のグラフは縦に並べ、表と同じ幅に。タイトルは左寄せ */
.figure-grid { grid-template-columns: 1fr; }
.figure-grid .fig-img { width: 100%; }
.figure-grid .fig-title { text-align: left; }

/* ⑦⑧⑪⑭ 「太字の見出し（改行）説明」：説明は1px小さく */
.term { margin: 0 0 1.1em; }
.term-desc { display: block; font-size: calc(1em - 1px); }

/* ⑯ グラフを表と同じ幅に */
.fig-img.fig-wide { width: 100%; }

/* ⑱ 結論の枠線をなくす */
.attention { border: 0; }

/* ⑳ リスクのある姿／あるべき姿：角丸をやめ、本文を1px小さく */
.contrast { border-radius: 0; }
.contrast-row p:not(.contrast-label) { font-size: calc(1em - 1px); }
.contrast-row { border-left: 0; }
.contrast-row.risk .th-mark { background: var(--ng-tint); }
.contrast-row.ideal .th-mark { background: var(--ok-tint); }

/* ㉒ 参考資料のカテゴリーごとの枠線をなくす */
[data-ch="references"] > ul { border: 0; background: none; padding: 0 0 0 1.5em; }
[data-ch="references"] > ul { font-size: 14px; line-height: 1.8; }
[data-ch="references"] > ul a { font-size: 13px; }

/* 適合・不適合の表の列見出し（6-3-5 ②の〇✖と同じ色） */
.doc th.th-ok { background: var(--ok-tint); color: var(--ok); }
.doc th.th-ng { background: var(--ng-tint); color: var(--ng); }
.th-mark {
  display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; margin-right: 8px;
  border-radius: 50%; background: #fff; font-size: 12px; font-weight: 700; line-height: 1; vertical-align: 1px;
}

/* 発行者・初版発行日（タイトル帯の下に右寄せ） */
.hero h1 { margin-bottom: 0; }
.pub-info { margin: 12px 0 0; text-align: right; }
.pub-info p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--muted); }

/* タイトル帯は本文エリアの左右いっぱい（目次の右側すべて） */
/* 2026-10-23 本文の最大幅は1000px */
:root { --content-w: 1000px; }

/* 2026-10-23 本文は画面の中央。目次はヘッダー・フッターにかからない、横から出るパネル */
@media (min-width: 961px) {
  :root { --site-header: 110px; --toc-w: 280px; }
  .main { margin-left: 0; overflow-x: clip; }
  .hero {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: max(40px, calc((100vw - var(--content-w)) / 2));
    padding-right: max(40px, calc((100vw - var(--content-w)) / 2));
  }
  .sidebar {
    top: calc(var(--site-header) + 20px); bottom: auto;
    width: var(--toc-w); max-height: calc(100vh - var(--site-header) - 40px);
    background: #f3f5f7; border: 0;
    transform: translateX(-100%); transition: transform .3s;
  }
  .side-head { display: none; }
  #toc_container { padding: 16px 10px 16px; }
  .toc-row, .toc-row > a, .toc-toggle, .toc-sub a { border-radius: 0; }
  body.toc-shown .sidebar { transform: none; }
  /* 本文の左に目次が入りきらない幅では、つまみを押したときだけ出す */
  .toc-tab {
    position: fixed; left: 0; top: calc(var(--site-header) + 20px); z-index: 39;
    padding: 14px 8px; border: 0; background: var(--brand); color: #fff; cursor: pointer;
    font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .2em; writing-mode: vertical-rl;
    transform: translateX(-100%); transition: transform .3s;
  }
  body.toc-ready .toc-tab { transform: none; }
  body.toc-ready.toc-shown .toc-tab { transform: translateX(-100%); }
  body.toc-shown .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 25, 40, .2); z-index: 35; }
}
@media (min-width: 1600px) {
  .toc-tab { display: none; }
  body.toc-shown .scrim { display: none; }
}
@media (max-width: 960px) {
  .toc-tab { display: none; }
}
@media print {
  .toc-tab { display: none !important; }
}
/* 目次のマウスオーバーは文字色だけ変える（帯は出さない） */
.toc-row > a:hover, .toc-toggle:hover, .toc-sub a:hover { background: none; color: var(--brand); }
.toc-toggle:hover .chev { border-color: var(--brand); }
.toc-ch.is-active > .toc-row > a, .toc-sub a.is-active { background: none; }

/* ⑲ 6-1〜6-5冒頭の表 */
.overview { margin: 8px 0 28px; }
.doc .ov { min-width: 0; table-layout: fixed; font-size: 14.5px; line-height: 1.75; }
.doc .ov .c-title { width: 26%; }
.doc .ov .c-item { width: 28%; }
.doc .ov .c-detail { width: 46%; }
.doc .ov th, .doc .ov td { min-width: 0; border: 0; background: none; text-align: left; vertical-align: top; }
.doc .ov thead th {
  padding: 0 10px 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .12em; color: #8a919c;
  border-bottom: 2px solid var(--brand);
}
.doc .ov tbody th, .doc .ov tbody td { padding: 14px 10px; }
.doc .ov tbody tr + tr td { border-top: 1px solid #e9ecf1; }
.doc .ov tbody tr.group-start th, .doc .ov tbody tr.group-start td { border-top: 1px solid #d5d9e1; }
.doc .ov tbody tr:first-child th, .doc .ov tbody tr:first-child td { border-top: 0; }
.doc .ov tbody tr:last-child th, .doc .ov tbody tr:last-child td, .doc .ov tbody th[rowspan] { border-bottom: 1px solid #d5d9e1; }
.doc .ov tbody th { font-weight: 700; color: var(--ink); }
.doc .ov .sub-num { display: block; margin-bottom: 4px; font-size: 17px; line-height: 1.3; letter-spacing: .02em; color: var(--brand); }
.doc .ov .sub-name { display: block; font-size: 14.5px; line-height: 1.6; }
.doc .ov .item { font-weight: 500; }
.doc .ov .item-num { margin-right: .3em; font-weight: 700; color: var(--brand); }
.doc .ov .detail { font-size: 13.5px; line-height: 1.8; color: var(--ink-sub); }

/* ㉑ 終章の基準のまとめ */
.std-list { margin: 8px 0 28px; border-top: 2px solid var(--brand); }
.std { padding: 26px 0 28px; border-bottom: 1px solid #d5d9e1; }
.doc .std h3 {
  display: flex; align-items: baseline; gap: 14px;
  margin: 0 0 14px; padding: 0; border: 0;
  font-size: 18px; line-height: 1.5; letter-spacing: 1px; color: var(--ink);
}
.doc .std h3::before { content: none; }
.std-num { flex: none; font-size: 18px; font-weight: 700; letter-spacing: .04em; color: var(--brand); }
.std dl { margin: 0; }
.std dt { font-size: 12px; font-weight: 700; letter-spacing: .12em; line-height: 1.6; }
.std dd { margin: 0; }
.std .row-std { padding: 14px 18px; background: var(--brand-tint); border-left: 3px solid var(--brand); }
.std .row-std dt { margin-bottom: 4px; color: var(--brand); }
.std .row-std dd { font-size: 14.5px; line-height: 1.8; }
.std .row-ref { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-top: 16px; padding: 0 2px; }
.std .row-ref dt { margin-bottom: 2px; color: #8a919c; }
.std .row-ref dd { font-size: 13.5px; line-height: 1.8; color: var(--ink-sub); }
.std .row-ref dd.none { color: #8a919c; }

@media (max-width: 720px) {
  .doc .ov, .doc .ov tbody, .doc .ov tr, .doc .ov th, .doc .ov td { display: block; width: 100%; }
  .doc .ov colgroup, .doc .ov thead { display: none; }
  .doc .ov { border-top: 2px solid var(--brand); }
  .doc .ov tbody th, .doc .ov tbody td { padding: 0; border: 0 !important; }
  .doc .ov tbody tr { padding: 14px 0; border-top: 1px solid #e9ecf1; }
  .doc .ov tbody tr.group-start { border-top: 1px solid #d5d9e1; }
  .doc .ov tbody tr:first-child { border-top: 0; }
  .doc .ov tbody th { margin-bottom: 10px; }
  .doc .ov .sub-num { font-size: 16px; }
  .doc .ov .item { margin-bottom: 4px; }
}
@media (max-width: 640px) {
  .doc .std h3, .std-num { font-size: 17px; }
  .doc .std h3 { gap: 10px; }
  .std .row-std { padding: 12px 14px; }
  .std .row-ref { grid-template-columns: 1fr; gap: 12px; }
}

/* 前文の前の導線（資料ダウンロード・確認チェックリスト） */


/* ===== QAページ ===== */
.lead-text { margin-top: 40px; font-size: 15px; color: var(--ink-sub); }

/* 検索欄 */
.qa-search { margin: 32px 0 0; }
.qa-search-box { display: flex; border: 2px solid var(--brand); background: #fff; }
.qa-search-box input {
  flex: 1; min-width: 0; height: 56px; padding: 0 16px; border: 0; outline: 0;
  font: inherit; font-size: 17px; color: var(--ink); background: transparent;
}
.qa-search-box input::placeholder { color: #9aa3ad; }
.qa-search-box button {
  flex: none; width: 96px; border: 0; background: var(--brand); color: #fff;
  font: inherit; font-size: 15px; font-weight: 700; letter-spacing: .1em; cursor: pointer;
}
.qa-search-box button:hover { opacity: .85; }
.qa-search-box:focus-within { box-shadow: 0 0 0 3px var(--brand-tint); }

/* よく検索されるキーワード */
.qa-tags { margin: 16px 0 0; }
.qa-tags-title { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.qa-tags ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.qa-tags li { margin: 0; padding: 0; }
.qa-tags button {
  padding: 4px 14px; border: 1px solid #d5d9e1; background: #fff; color: var(--brand);
  font: inherit; font-size: 14px; line-height: 1.7; cursor: pointer;
}
.qa-tags button:hover, .qa-tags button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 検索結果 */
.qa-result { margin: 32px 0 0; }
.qa-result[hidden] { display: none; }
.qa-result-head { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.qa-result-head .qa-count { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--muted); }
.qa-more { margin-top: 24px; }
.qa-result-note { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.qa-empty { margin: 8px 0 0; padding: 20px; background: #f3f5f7; font-size: 15px; }
.qa-clear { margin: 12px 0 0; padding: 0; border: 0; background: none; color: var(--brand-mid); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Q&A */
.qa-list { margin: 8px 0 28px; }
.qa-result .qa-list { border-top: 2px solid var(--brand); }
.qa { border-bottom: 1px solid #d5d9e1; }
.qa summary {
  display: grid; grid-template-columns: 2em 1fr 1.5em; align-items: baseline; gap: 8px;
  padding: 16px 4px; cursor: pointer; list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); text-align: center; }
.qa[open] summary::after { content: "−"; }
.qa summary:hover .qa-q { color: var(--brand); }
.qa-mark { font-size: 18px; font-weight: 700; line-height: 1.4; color: var(--brand); }
.qa-mark-a { color: #b08d3c; }
.qa-q { font-weight: 700; line-height: 1.7; }
.qa-body { display: grid; grid-template-columns: 2em 1fr; gap: 8px; padding: 0 4px 18px; }
#content #main .qa-a p { margin: 0 0 8px; font-size: 15px; line-height: 1.9; }
#content #main .qa-a .qa-ref { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.qa-ref a { color: var(--muted); }
.qa-ref a:hover { color: var(--brand); }
.ref-sep { margin: 0 .4em; }
.qa-cat { margin-top: 36px; }
/* 分類の目次 */
.qa-cat-nav ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 16px 0 8px; padding: 0; list-style: none; }
.qa-cat-nav li { margin: 0; padding: 0; }
.qa-cat-nav a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px; height: 100%; box-sizing: border-box;
  padding: 10px 14px; border: 1px solid #d5d9e1; background: #fff; color: var(--brand);
  font-size: 14px; font-weight: 700; line-height: 1.6; text-decoration: none;
}
.qa-cat-nav a:hover { border-color: var(--brand); background: var(--brand-tint2); }
.qa-cat-n { flex: none; font-size: 12px; font-weight: 400; color: var(--muted); }
@media (max-width: 960px) { .qa-cat-nav ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .qa-cat-nav ul { grid-template-columns: minmax(0, 1fr); gap: 6px; } .qa-cat-nav a { padding: 8px 14px; } }

/* 関連ページへの導線（ガイドライン冒頭と同じ形） */
/* 関連ページ（A案：カード2枚＋資料ダウンロードの帯） */
.rel-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rel-card {
  display: flex; flex-direction: column; padding: 28px 28px 24px;
  border: 1px solid #d5d9e1; background: #fff; color: var(--ink); text-decoration: none;
  transition: border-color .2s, background .2s;
}
.rel-card, .rel-btn { word-break: normal; overflow-wrap: anywhere; }
.rel-card:hover { border-color: #111760; background: var(--brand-tint2); }
.rel-en { font-size: 11px; font-weight: 700; letter-spacing: .2em; color: var(--gold); }
.rel-card .rel-ttl { margin-top: 6px; font-size: 19px; font-weight: 700; line-height: 1.5; color: #111760; }
.rel-card .rel-desc { flex: 1; margin-top: 8px; font-size: 14px; color: var(--muted); }
.rel-more { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 13px; font-weight: 700; color: #111760; }
.rel-dl {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
  margin-top: 16px; padding: 32px 36px; background: #111760; color: #fff;
}
#content #main .rel-dl .rel-ttl { margin: 4px 0 0; font-size: 21px; font-weight: 700; }
#content #main .rel-dl .rel-desc { margin: 6px 0 0; font-size: 14px; color: rgba(255,255,255,.8); }
.rel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 18px 36px;
    background: var(--gold);
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .05em;
    white-space: nowrap;
    text-decoration: none;
    transition: background .2s;
}
.rel-btn:hover { background: #a8853f; color: #fff; }
.rel-arrow { position: relative; flex: none; display: inline-block; width: 28px; height: 1px; background: currentColor; transition: width .2s; }
.rel-arrow::after { content: ""; position: absolute; right: 0; top: 0; width: 8px; height: 1px; background: currentColor; transform: rotate(35deg); transform-origin: 100% 50%; }
.rel-card:hover .rel-arrow, .rel-btn:hover .rel-arrow { width: 40px; }
.rel-card:focus-visible, .rel-btn:focus-visible { outline: 2px solid var(--brand-mid); outline-offset: 2px; }
@media (max-width: 720px) {
  .rel-cards, .rel-dl { grid-template-columns: 1fr; }
  .rel-card { padding: 22px 20px 20px; }
  .rel-dl { padding: 28px 20px; }
  .rel-btn { width: 100%; padding: 18px 20px; }
}
@media (prefers-reduced-motion: reduce) { .rel-card, .rel-btn, .rel-arrow { transition: none; } }

@media (max-width: 640px) {
  .qa-search-box input { height: 50px; font-size: 16px; }
  .qa-search-box button { width: 72px; }
  .qa summary { grid-template-columns: 1.6em 1fr 1.2em; padding: 14px 0; }
  .qa-body { grid-template-columns: 1.6em 1fr; padding: 0 0 16px; }
}