/* MSE eCast — UTM更新・多拠点VPN比較
   配色は夕景の写真から：濃い紫（建物の影）、窓明かりの琥珀、空の薔薇色 */
:root {
  --ink: #1e1726;
  --sub: #5d5468;
  --plum: #2c1a38;
  --plum-2: #3d2650;
  --violet: #5a3294;
  --violet-dark: #44246f;
  --amber: #f2b55f;
  --amber-dark: #e5a245;
  --rose: #b23a5e;
  --bg: #f7f5f9;
  --surface: #ffffff;
  --tint: #efeaf3;
  --line: #e0d9e6;
  --line-strong: #c9bfd2;
  --wrap: 1120px;
  --font: "IBM Plex Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  font-feature-settings: "palt";
  overflow-wrap: anywhere;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--violet); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--violet-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber-dark); outline-offset: 3px; border-radius: 2px; }
.wrap { width: min(var(--wrap), calc(100% - 40px)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -80px; background: var(--surface); color: var(--ink); padding: 8px 14px; z-index: 300; border-radius: 4px; }
.skip:focus { top: 8px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

h1, h2, h3, h4 { line-height: 1.4; margin: 0; font-weight: 700; letter-spacing: .01em; }
p { margin: 0 0 1.1em; }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--tint); padding: .1em .4em; border-radius: 3px; }

/* ── ヘッダー ─────────────────────── */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--plum); }
.brand img { width: 32px; height: 32px; display: block; }
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: .08em; line-height: 1; white-space: nowrap; }
.brand-tag { font-size: 11.5px; color: var(--sub); border-left: 1px solid var(--line-strong); padding-left: 10px; line-height: 1.3; }
.gnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.gnav a { display: block; padding: 8px 12px; font-size: 14.5px; font-weight: 700; color: var(--ink); text-decoration: none; border-radius: 4px; }
.gnav a:hover { background: var(--tint); color: var(--violet-dark); }
.gnav a[aria-current="page"] { color: var(--violet); box-shadow: inset 0 -2px 0 var(--violet); border-radius: 0; }
.menu-btn { display: none; }

/* ── ボタン ─────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 22px; border-radius: 4px; border: 1px solid var(--violet); background: var(--violet); color: #fff; font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--violet-dark); border-color: var(--violet-dark); color: #fff; }
.btn-amber { background: var(--amber); border-color: var(--amber); color: var(--plum); }
.btn-amber:hover { background: var(--amber-dark); border-color: var(--amber-dark); color: var(--plum); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.14); border-color: #fff; color: #fff; }
.btn-line { background: var(--surface); color: var(--violet); }
.btn-line:hover { background: var(--tint); color: var(--violet-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── トップ：ヒーロー ─────────────── */
.hero { position: relative; isolation: isolate; color: #fff; background: var(--plum); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 62%; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(34,19,45,.96) 0%, rgba(34,19,45,.9) 38%, rgba(34,19,45,.45) 68%, rgba(34,19,45,.12) 100%); }
.hero .wrap { padding-block: 92px 84px; }
.hero h1 { font-size: clamp(29px, 4.6vw, 54px); line-height: 1.32; letter-spacing: .02em; }
.nb { display: inline-block; }
.hero-lead { max-width: 33em; margin: 22px 0 32px; font-size: 16.5px; color: #ece4f2; }
.hero-note { margin: 26px 0 0; font-size: 13px; color: #cfc3d9; }

/* 検討の順序（実際に順番のある4段階） */
.stages { background: var(--surface); border-bottom: 1px solid var(--line); }
.stages ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: stage; }
.stages li { counter-increment: stage; border-left: 1px solid var(--line); }
.stages li:last-child { border-right: 1px solid var(--line); }
.stages a { display: block; height: 100%; padding: 22px 22px 24px; text-decoration: none; color: var(--ink); }
.stages a:hover { background: var(--bg); }
.stages a::before { content: "検討 " counter(stage); display: block; font-size: 12.5px; font-weight: 700; color: var(--violet); margin-bottom: 4px; }
.stages strong { display: block; font-size: 16.5px; line-height: 1.5; }
.stages span { display: block; font-size: 13px; color: var(--sub); line-height: 1.6; margin-top: 4px; }

/* ── セクション ─────────────────── */
.band { padding-block: 76px; }
.band-tint { background: var(--tint); }
.band-white { background: var(--surface); border-block: 1px solid var(--line); }
.band-head { max-width: 46em; margin-bottom: 34px; }
.band-head h2 { font-size: clamp(24px, 2.7vw, 32px); }
.band-head p { margin: 14px 0 0; color: var(--sub); }

/* ── 表 ─────────────────────── */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.7; }
caption { text-align: left; padding: 14px 18px; font-weight: 700; font-size: 14px; color: var(--sub); border-bottom: 1px solid var(--line); }
th, td { text-align: left; vertical-align: top; padding: 15px 18px; border-bottom: 1px solid var(--line); }
thead th { background: var(--plum); color: #fff; font-size: 13.5px; font-weight: 700; white-space: nowrap; border-bottom: 0; }
tbody th { font-weight: 700; color: var(--plum); min-width: 12.5em; }
tbody tr:last-child > * { border-bottom: 0; }
.vendor { display: block; font-size: 12.5px; font-weight: 400; color: var(--sub); }
.trait { display: block; font-size: 12px; font-weight: 700; color: var(--violet); margin-bottom: 2px; }
.note { font-size: 13.5px; color: var(--sub); margin: 14px 0 0; }
.ext::after { content: "（外部サイト）"; font-size: .85em; color: var(--sub); }

/* 製品別の向き・不向き：罫線だけの一覧 */
.fit-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; margin-top: 48px; }
.fit-list article { border-top: 2px solid var(--plum); padding: 22px 0 30px; }
.fit-list h3 { font-size: 19px; }
.fit-list p { font-size: 15px; margin: 10px 0 12px; }
.fit-list dl { margin: 0; font-size: 14px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.fit-list dt { font-weight: 700; color: var(--violet); white-space: nowrap; }
.fit-list dd { margin: 0; color: var(--sub); }

/* ── 構成図 ─────────────────── */
.diagrams { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin: 0 0 12px; }
.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 22px 22px 18px; margin: 0; }
.diagram svg { display: block; width: 100%; }
.diagram figcaption { font-size: 14px; line-height: 1.7; margin-top: 12px; }
.diagram figcaption strong { display: block; font-size: 16px; color: var(--plum); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 13px; color: var(--sub); margin: 0 0 40px; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; width: 30px; height: 0; border-top: 3px solid var(--violet); }
.legend i.dash { border-top: 3px dashed var(--rose); }
.svg-text { font-family: var(--font); }

.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; }
.tiers article { border-top: 1px solid var(--line-strong); padding-top: 20px; }
.tiers h3 { font-size: 18px; }
.tiers p { font-size: 14.5px; margin: 10px 0 0; color: var(--sub); }
.tiers p strong { color: var(--ink); }

/* ── 根拠データの帯 ─────────────── */
.fact { background: var(--plum); color: #fff; }
.fact .wrap { display: grid; grid-template-columns: auto 1fr; gap: 20px 56px; align-items: center; padding-block: 60px; }
.fact-num { font-size: clamp(54px, 8vw, 88px); font-weight: 700; line-height: 1; color: var(--amber); letter-spacing: -.01em; white-space: nowrap; }
.fact-num small { font-size: .42em; margin-left: .08em; }
.fact h2 { font-size: clamp(20px, 2.3vw, 26px); }
.fact p { margin: 12px 0 0; color: #e4dbea; font-size: 15px; max-width: 44em; }
.fact a { color: var(--amber); }

/* ── ガイド一覧 ─────────────────── */
.guides { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; }
.guides li { border-top: 1px solid var(--line-strong); }
.guides a { display: block; padding: 20px 0 22px; text-decoration: none; color: var(--ink); }
.guides strong { display: block; font-size: 17px; line-height: 1.55; color: var(--violet); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; }
.guides a:hover strong { color: var(--violet-dark); text-decoration-thickness: 2px; }
.guides span { display: block; font-size: 14px; color: var(--sub); line-height: 1.7; margin-top: 4px; }

/* ── FAQ ─────────────────────── */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--line-strong); }
.faq details:last-child { border-bottom: 1px solid var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 44px 18px 0; font-weight: 700; font-size: 16px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--violet); border-bottom: 2px solid var(--violet); transform: translateY(-70%) rotate(45deg); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0 0 20px; font-size: 15px; color: var(--sub); max-width: 46em; }

/* ── 下層ページ ─────────────────── */
.crumbs { font-size: 13px; color: var(--sub); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.crumbs a { color: var(--sub); }
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 26px 44px; }
.page-head h1 { font-size: clamp(27px, 3.5vw, 40px); line-height: 1.38; margin-top: 26px; max-width: 22em; }
.page-head .lede { font-size: 16.5px; color: var(--sub); max-width: 44em; margin: 18px 0 0; }
.page-head .meta { font-size: 13px; color: var(--sub); margin: 20px 0 0; }

.layout { display: grid; grid-template-columns: minmax(0, 760px) 250px; justify-content: space-between; gap: 56px; padding-block: 52px 84px; }
.layout-single { grid-template-columns: minmax(0, 760px); justify-content: start; }
.toc { order: 2; }
.toc-inner { position: sticky; top: 92px; border-left: 2px solid var(--line); padding-left: 20px; }
.toc h2 { font-size: 13.5px; color: var(--sub); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.6; }
.toc li { margin: 0 0 10px; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--violet); text-decoration: underline; }

.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: clamp(21px, 2.3vw, 26px); margin: 60px 0 18px; padding-top: 22px; border-top: 2px solid var(--plum); }
.prose h3 { font-size: 18px; margin: 34px 0 10px; color: var(--plum); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin: .45em 0; }
.prose li::marker { color: var(--violet); }
.prose .table-wrap { margin: 22px 0; }
.prose .diagrams { margin-top: 8px; }
.prose strong { font-weight: 700; }

.callout { border-left: 4px solid var(--rose); background: var(--surface); border-block: 1px solid var(--line); border-right: 1px solid var(--line); padding: 18px 22px; margin: 26px 0; font-size: 15px; border-radius: 0 6px 6px 0; }
.callout > *:last-child { margin-bottom: 0; }
.callout strong:first-child { display: block; color: var(--rose); margin-bottom: 4px; }
.callout-info { border-left-color: var(--violet); }
.callout-info strong:first-child { color: var(--violet); }

.sources { font-size: 14px; border-top: 1px solid var(--line-strong); margin-top: 60px; padding-top: 22px; }
.sources h2 { all: unset; display: block; font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.sources ul { padding-left: 1.3em; margin: 0; }
.sources li { margin: .4em 0; }
.sources p { color: var(--sub); margin: 12px 0 0; font-size: 13px; }

.next { background: var(--tint); padding-block: 56px; }
.next h2 { font-size: 20px; margin-bottom: 20px; }
.next .guides li:nth-last-child(-n+2) { border-bottom: 1px solid var(--line-strong); }

/* 入れ替えの4フェーズ（順序のある工程） */
.phases { list-style: none; margin: 26px 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: ph; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.phases li { counter-increment: ph; padding: 20px 18px 22px; border-left: 1px solid var(--line); margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--sub); }
.phases li:first-child { border-left: 0; }
.phases li::before { content: "フェーズ " counter(ph); display: block; font-size: 12.5px; font-weight: 700; color: var(--violet); }
.phases strong { display: block; font-size: 15.5px; color: var(--plum); margin-bottom: 6px; line-height: 1.5; }

/* チェックリスト */
.check-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--plum); color: #fff; border-radius: 6px; padding: 14px 20px; margin: 26px 0 0; position: sticky; top: 76px; z-index: 5; }
.check-bar output { font-weight: 700; font-size: 19px; color: var(--amber); margin-left: 6px; }
.check-bar .btn { min-height: 38px; padding: 6px 16px; font-size: 14px; }
.checks { list-style: none; margin: 14px 0 26px; padding: 0 !important; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.checks li { margin: 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks label { display: flex; align-items: flex-start; gap: 14px; padding: 15px 18px; cursor: pointer; font-size: 15px; line-height: 1.7; }
.checks label:hover { background: var(--bg); }
.checks input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--violet); }
.checks input:checked + span { color: var(--sub); }
.checks small { display: block; font-size: 13px; color: var(--sub); }

/* 費用シミュレーター */
.sim { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; margin: 26px 0; }
.sim-head { padding: 22px 26px 0; }
.sim-head h2 { all: unset; display: block; font-size: 19px; font-weight: 700; color: var(--plum); }
.sim-head p { font-size: 14px; color: var(--sub); margin: 6px 0 0; }
.sim fieldset { border: 0; margin: 0; padding: 22px 26px; border-top: 1px solid var(--line); min-width: 0; }
.sim-head + fieldset { border-top: 0; }
.sim legend { font-weight: 700; font-size: 15px; padding: 0; margin-bottom: 14px; color: var(--plum); }
.sim-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 5px; line-height: 1.5; }
.field small { display: block; font-size: 12.5px; color: var(--sub); line-height: 1.5; margin-top: 4px; }
.field input, .field select { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; font: inherit; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--ink); }
.sim-out { background: var(--plum); color: #fff; padding: 24px 26px; border-radius: 0 0 5px 5px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.sim-out div span { display: block; font-size: 13px; color: #d9cee2; }
.sim-out div strong { display: block; font-size: 26px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.sim-out div small { font-size: 13px; color: #d9cee2; font-variant-numeric: tabular-nums; }
.sim-verdict { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.22); padding-top: 16px; margin: 0; font-size: 15.5px; color: var(--amber); font-weight: 700; }

/* コピーできるテンプレート */
.copybox { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; margin: 22px 0; }
.copybox-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 10px 20px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--plum); }
.copybox-bar .btn { min-height: 36px; padding: 5px 14px; font-size: 13.5px; }
.copybox pre { margin: 0; padding: 20px; font-family: var(--font); font-size: 14px; line-height: 1.85; white-space: pre-wrap; max-height: 460px; overflow: auto; }

/* 用語集 */
.terms-index { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; margin: 0 0 12px; }
.terms-index a { display: block; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); text-decoration: none; font-size: 14px; font-weight: 700; }
.terms dt { font-weight: 700; font-size: 17px; color: var(--plum); margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.terms dt span { font-weight: 400; font-size: 13px; color: var(--sub); margin-left: 10px; }
.terms dd { margin: 8px 0 0; font-size: 15px; }

/* ── フッター ─────────────────── */
.site-foot { background: var(--plum); color: #d9cee2; font-size: 14px; }
.site-foot .wrap { padding-block: 56px 28px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.foot-brand { font-size: 20px; font-weight: 700; letter-spacing: .08em; color: #fff; }
.foot-grid p { margin: 12px 0 0; line-height: 1.8; max-width: 26em; }
.foot-grid h2 { font-size: 13.5px; color: #fff; margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin: 0 0 8px; }
.site-foot a { color: #d9cee2; text-decoration: none; }
.site-foot a:hover { color: var(--amber); text-decoration: underline; }
.foot-base { border-top: 1px solid rgba(255,255,255,.16); margin-top: 40px; padding-top: 20px; font-size: 12.5px; color: #b5a8c0; line-height: 1.8; }
.foot-base p { margin: 0; }

/* 404 */
.lost { padding-block: 96px; }
.lost h1 { font-size: clamp(26px, 3.4vw, 38px); }
.lost p { color: var(--sub); max-width: 40em; margin: 16px 0 28px; }

/* ── レスポンシブ ─────────────── */
@media (max-width: 1020px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block: 36px 64px; }
  .toc { order: 0; margin-bottom: 36px; }
  .toc-inner { position: static; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 18px 20px 10px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
  .menu-btn::before { content: ""; width: 16px; height: 10px; border-block: 2px solid currentColor; }
  .js .gnav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(44,26,56,.12); }
  .js .gnav.open { display: block; }
  .gnav ul { flex-direction: column; gap: 0; padding: 8px 20px 16px; }
  .gnav a { padding: 13px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 15.5px; }
  .gnav a[aria-current="page"] { box-shadow: none; }
  html:not(.js) .site-head .wrap { flex-wrap: wrap; padding-block: 10px; }
  html:not(.js) .menu-btn { display: none; }
  .stages ol { grid-template-columns: repeat(2, 1fr); }
  .stages li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stages li:nth-child(2) { border-right: 1px solid var(--line); }
  .tiers { grid-template-columns: 1fr; gap: 26px; }
  .phases { grid-template-columns: repeat(2, 1fr); }
  .phases li:nth-child(3) { border-left: 0; }
  .phases li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .brand-tag { display: none; }
  .hero .wrap { padding-block: 56px 52px; }
  .hero::before { background: linear-gradient(180deg, rgba(34,19,45,.9), rgba(34,19,45,.82)); }
  .band { padding-block: 52px; }
  .fit-list, .guides, .diagrams { grid-template-columns: 1fr; }
  .fact .wrap { grid-template-columns: 1fr; padding-block: 44px; }
  .sim-grid, .sim-out { grid-template-columns: 1fr; }
  .sim-head, .sim fieldset, .sim-out { padding-inline: 18px; }
  .next .guides li:nth-last-child(2) { border-bottom: 0; }
  .check-bar { top: 68px; }

  /* 表を1製品ずつの縦積みに組み替える */
  .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .stack, .stack caption, .stack tbody, .stack tr, .stack th, .stack td { display: block; width: 100%; }
  .stack tr { padding: 18px; border-bottom: 1px solid var(--line); }
  .stack tr:last-child { border-bottom: 0; }
  .stack th, .stack td { padding: 0; border: 0; }
  .stack tbody th { font-size: 17px; margin-bottom: 10px; }
  .stack td { margin-top: 10px; }
  .stack td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--violet); }
}
@media (max-width: 520px) {
  .stages ol, .phases { grid-template-columns: 1fr; }
  .stages li, .phases li { border-left: 0 !important; border-right: 0 !important; }
  .stages li + li, .phases li + li { border-top: 1px solid var(--line); }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .btn-row .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .site-head, .site-foot, .toc, .next, .check-bar .btn, .menu-btn { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .layout { display: block; padding: 0; }
  .check-bar { position: static; background: none; color: #000; padding: 0; }
  .check-bar output { color: #000; }
  a { color: inherit; text-decoration: none; }
}

/* ── 調整 ─────────────────────── */
.prose .phases { padding: 0; }
.prose .diagrams { grid-template-columns: 1fr; gap: 16px; }
.prose .diagram { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px 28px; align-items: center; }
.prose .diagram figcaption { margin-top: 0; }
.sim fieldset, .sim-head + fieldset { border-top: 1px solid var(--line); }
.sim-head { padding-bottom: 20px; }
.sim legend { float: left; width: 100%; }
.sim-grid { clear: both; }
@media (max-width: 760px) {
  .prose .diagram { grid-template-columns: 1fr; }
  .prose .diagram figcaption { margin-top: 12px; }
  .check-bar { position: static; }
  .check-bar .btn-row { width: 100%; flex-wrap: nowrap; }
  .check-bar .btn-row .btn { width: auto; flex: 1; padding-inline: 8px; }
}
