/* PQC 移行チェック — satokan.tech
   方針: 「移行管制票」。大きな数字と短い判断文を先に置き、色は信号（期限・適否・拘束力）に使う。
   区切りは枠線ではなく余白・背景差・文字で作る。 */
:root {
  --bg: #f5f3ee;
  --band: #ece9f2;
  --surface: #ffffff;
  --surface-2: #eeece7;
  --ink: #1c2028;
  --ink-2: #414752;
  --muted: #626b75;
  --line: #d9d5cb;
  --line-soft: #eae6de;
  --primary: #51407e;
  --primary-ink: #ffffff;
  --primary-soft: #e9e3f4;
  --primary-tint: rgba(81, 64, 126, 0.08);
  --link: #493679;
  --focus: #6d50ad;
  --ok: #247448;
  --ok-soft: #e2f2e8;
  --caution: #98520a;
  --caution-soft: #f8e9d4;
  --ng: #a73548;
  --ng-soft: #f8e1e6;
  --chart-grid: #ddd9d1;
  --chart-axis: #7a838b;
  /* 通常の板は影を付けず 1px の枠線にする（影は最重要の結果だけ --shadow-lift） */
  --shadow-1: 0 0 0 1px var(--panel-line);
  --shadow-lift: 0 1px 2px rgba(28, 32, 40, 0.06), 0 12px 32px rgba(28, 32, 40, 0.08);

  /* データ分類の6色 */
  --data-blue: #2f6495;
  --data-teal: #1f7063;
  --data-violet: #6a4c93;
  --data-amber: #98520a;
  --data-rose: #a73548;
  --data-slate: #626b75;

  --font-sans: "IBM Plex Sans", "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  --wrap: 1184px;
  --radius-panel: 12px;
  --radius-control: 10px;
  --radius-tag: 4px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121216; --band: #1c1926; --surface: #1b1b21; --surface-2: #25242b; --ink: #f0eef4; --ink-2: #d1cdd9; --muted: #aaa4b4;
    --line: #3d3947; --line-soft: #2d2a35; --primary: #b9a7f4; --primary-ink: #22163d; --primary-soft: #302846; --primary-tint: rgba(185, 167, 244, 0.1);
    --link: #c7b7ff; --focus: #d8ccff; --ok: #71d39a; --ok-soft: #193326; --caution: #f0b66c; --caution-soft: #3a2b19; --ng: #ff9baa; --ng-soft: #44232b;
    --chart-grid: #34313c; --chart-axis: #827c8f; --shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 32px rgba(0, 0, 0, 0.32);
    --data-blue: #8fc2f2; --data-teal: #76d3c1; --data-violet: #c4aef0; --data-amber: #f0b66c; --data-rose: #ff9baa; --data-slate: #aaa4b4;
  }
}
/* 分類色の割り当て（すべて6色から） */
:root {
  --bind-mandatory: var(--data-rose); --bind-proposed: var(--data-violet); --bind-guidance: var(--data-blue); --bind-target: var(--data-amber); --bind-none: var(--data-slate);
  --src-cryptrec: var(--data-rose); --src-nist: var(--data-blue); --src-bsi: var(--data-amber); --src-anssi: var(--data-violet); --src-cnsa2: var(--data-teal); --src-asd: var(--data-slate); --src-cccs: var(--ink-2);
  --hw-superconducting: var(--data-blue); --hw-atom: var(--data-amber); --hw-ion: var(--data-violet); --hw-photonic: var(--data-teal); --hw-spin: var(--data-rose); --hw-hybrid: var(--data-slate); --hw-unspecified: var(--ink-2);
  --kind-est: var(--data-blue); --kind-hw: var(--data-amber); --kind-std: var(--data-teal); --kind-pol: var(--data-violet); --kind-op: var(--data-slate);
}

/* ---------- 基本 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-h, 112px) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.75; letter-spacing: 0; font-synthesis: none; line-break: strict; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .nav, .eyebrow, .logo { font-feature-settings: "palt" 1; }
h1, h2, h3 { color: var(--ink); font-weight: 700; }
h2 { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.4; margin: 80px 0 var(--s2); }
h2 + .help, h2 + p { margin-top: 0; }
h3 { font-size: 18px; line-height: 1.55; margin: var(--s6) 0 var(--s3); }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
button, input, select { font: inherit; color: inherit; }
input, select, table, .num { font-variant-numeric: tabular-nums; }
table { border-collapse: collapse; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s6); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; }
.skip:focus { left: 8px; }
.help { color: var(--muted); font-size: 14px; line-height: 1.7; margin: var(--s2) 0; }
.lede { color: var(--ink-2); font-size: 18px; line-height: 1.8; margin: 0 0 var(--s3); }
.stamp, .src-line, .meta { font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.stamp { margin: 0 0 var(--s5); }
.loading { padding: var(--s8) var(--s6); color: var(--muted); }
.note-box { margin-top: var(--s5); padding: var(--s4); background: var(--caution-soft); border-radius: var(--radius-control); }
.page { padding-bottom: var(--s9); }
.ph { font-size: clamp(32px, 3.6vw, 44px); line-height: 1.3; margin: var(--s7) 0 var(--s3); }
.more { font-size: 14px; margin: var(--s4) 0 0; }
.more a { font-weight: 600; text-decoration: none; }
.more a::after { content: " →"; }
.panel { background: var(--surface); border-radius: var(--radius-panel); box-shadow: var(--shadow-1); }

/* ---------- ヘッダ ---------- */
.hdr { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.hdr-in { display: flex; align-items: center; gap: var(--s6); min-height: 68px; }
.subnav-row { border-top: 1px solid var(--line-soft); background: var(--surface-2); position: relative; }
.subnav-row::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 32px; pointer-events: none; background: linear-gradient(90deg, transparent, var(--surface-2)); }
.subnav { display: flex; gap: var(--s5); overflow-x: auto; scrollbar-width: none; min-height: 44px; align-items: center; scroll-snap-type: x proximity; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: none; scroll-snap-align: start; font-size: 13px; color: var(--muted); text-decoration: none; padding: 9px 0 7px; border-bottom: 2px solid transparent; white-space: nowrap; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--ink-2); font-weight: 600; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; white-space: nowrap; font-size: 16px; }
.logo-mark { display: inline-block; padding: 2px 7px; border-radius: var(--radius-tag); background: var(--primary); color: var(--primary-ink); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; }
.nav { display: flex; gap: 28px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink-2); text-decoration: none; white-space: nowrap; font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--primary); border-bottom: 3px solid var(--primary); font-weight: 700; }
.contact { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s4); border: 1px solid var(--line); border-radius: var(--radius-control); color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.contact:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- 移行チェック ---------- */
.intro-band { background: var(--band); padding: var(--s7) 0 var(--s4); }
.eyebrow { color: var(--primary); font-weight: 700; font-size: 13px; margin: 0 0 var(--s2); letter-spacing: 0.04em; }
.intro-band h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.3; letter-spacing: 0.01em; margin: 0 0 var(--s4); }
.check-grid { display: grid; grid-template-columns: minmax(320px, 360px) minmax(0, 1fr); gap: 40px; align-items: start; padding-top: 40px; }
.steps { position: sticky; top: calc(var(--hdr-h, 112px) + 20px); padding: 0 var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); box-shadow: var(--shadow-1); }
.step { margin: 0; padding: var(--s5) 0; border: 0; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.step:last-child { border-bottom: 0; }
.step legend { float: left; width: 100%; padding: 0; margin-bottom: var(--s3); font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: var(--s2); }
.step legend + * { clear: both; }
.step .no { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-size: 12px; }
.opts { display: grid; gap: 2px; }
.opt { display: grid; grid-template-columns: 22px 1fr; gap: var(--s2); align-items: start; min-height: 56px; padding: var(--s3); border-radius: var(--radius-control); cursor: pointer; }
.opt:hover { background: var(--primary-tint); }
.opt:has(input:checked) { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.opt input { margin-top: 5px; accent-color: var(--primary); width: 16px; height: 16px; }
.opt b { display: block; font-size: 15px; font-weight: 600; }
.opt small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.foreign { margin-top: var(--s3); }
.foreign summary, .keydetails summary { cursor: pointer; font-size: 14px; color: var(--link); font-weight: 600; padding: var(--s1) 0; }
.fgroup { margin-top: var(--s3); }
.fgroup .gname { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: var(--s1); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 12px; font-size: 13px; cursor: pointer; line-height: 1.7; color: var(--ink-2); }
.pill:hover { border-color: var(--primary); }
.pill[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
.yearrow, .keyrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.keyrow { margin-top: var(--s3); }
.yearrow input, .keyrow input, .keyrow select, .toolbar input[type=search] { border: 1px solid var(--line); border-radius: var(--radius-control); padding: 8px 12px; background: var(--surface); min-height: 44px; }
.yearrow input { width: 6em; font-size: 22px; font-weight: 700; color: var(--primary); }
.keyrow input { width: 7em; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.quick button { border: 1px solid var(--line); background: transparent; border-radius: var(--radius-control); padding: 4px 12px; font-size: 13px; cursor: pointer; min-height: 32px; }
.quick button[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.to-result { display: none; }
.result { display: grid; gap: var(--s5); min-width: 0; }
.first-due { background: var(--surface); border-radius: var(--radius-panel); box-shadow: var(--shadow-lift); padding: var(--s6); border-top: 4px solid var(--caution); }
.first-due .fd-label { font-size: 13px; font-weight: 700; color: var(--caution); letter-spacing: 0.04em; }
.first-due .fd-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s5); margin: var(--s2) 0; }
.first-due .fd-count { font-size: 40px; line-height: 1.15; font-weight: 700; color: var(--ink); }
.first-due .fd-date { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.first-due .fd-what { font-size: 16px; margin: 0; }
.first-due .fd-meta { font-size: 14px; color: var(--muted); margin: var(--s2) 0 0; }
.first-due.empty { border-top-color: var(--line); }
.r-block { background: var(--surface); border-radius: var(--radius-panel); box-shadow: var(--shadow-1); padding: 28px 32px 32px; }
.r-block h2 { margin: 0 0 var(--s4); font-size: 20px; }
.due-list { list-style: none; margin: 0; padding: 0; }
.due-list li { display: grid; grid-template-columns: 8.5em 1fr; gap: var(--s4); padding: var(--s4) 0; border-top: 1px solid var(--line-soft); }
.due-list li:first-child { border-top: 0; }
.due-list .left { padding: 2px 0 2px var(--s3); border-left: 3px solid var(--line); align-self: start; }
.due-list .left b { display: block; font-size: 18px; line-height: 1.4; color: var(--ink); }
.due-list .left small { display: block; font-size: 12.5px; color: var(--muted); }
.due-list .left.soon { border-left-color: var(--caution); }
.due-list .left.soon b { color: var(--caution); }
.due-list .who { font-weight: 600; }
.due-list .what { display: block; font-size: 15px; color: var(--ink-2); }
.due-list .meta { display: block; margin-top: var(--s1); }
.due-list li.empty { display: block; color: var(--muted); }
.kres { display: grid; gap: var(--s4); }
.kbox { border-radius: var(--radius-control); padding: var(--s4) var(--s5); background: var(--surface-2); }
.kbox.jp { background: var(--primary-tint); box-shadow: inset 3px 0 0 var(--src-cryptrec); }
.kbox h3 { margin: 0 0 var(--s3); font-size: 15px; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2); }
.kbox h3 small { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.kgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); margin: 0 0 var(--s3); }
.kgrid .kc { display: flex; flex-direction: column; }
.kgrid .k-name { font-size: 13px; color: var(--muted); }
.kgrid .k-num { font-size: 28px; line-height: 1.2; font-weight: 700; color: var(--ink); }
.kgrid .k-unit { font-size: 14px; color: var(--ink-2); }
.kgrid .k-num.ret { color: var(--ng); font-size: 18px; padding-top: 8px; }
.kgrid .k-num.trn, .kgrid .k-num.none { color: var(--caution); font-size: 18px; padding-top: 8px; }
.kgrid .k-num.none { color: var(--muted); }
.verdict { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-tag); font-weight: 700; font-size: 14px; }
.verdict::before { font-size: 13px; }
.verdict.ok { background: var(--ok-soft); color: var(--ok); }
.verdict.ok::before { content: "✓"; }
.verdict.ng { background: var(--ng-soft); color: var(--ng); }
.verdict.ng::before { content: "✕"; }
.verdict.na { background: var(--surface); color: var(--muted); }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { border-top: 1px solid var(--line-soft); padding: var(--s4) 0; }
.todo li:first-child { border-top: 0; }
.todo label { display: grid; grid-template-columns: 24px 1fr; gap: var(--s3); cursor: pointer; font-weight: 600; font-size: 16px; }
.todo input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--ok); }
.todo li.done label span { color: var(--muted); text-decoration: line-through; }
.todo p { margin: var(--s1) 0 0 36px; font-size: 15px; color: var(--ink-2); }
.todo .cite { margin: var(--s2) 0 0 36px; font-size: 12.5px; color: var(--muted); }
.actions { margin: var(--s5) 0 0; }
.btn { border: 0; background: var(--primary); color: var(--primary-ink); border-radius: var(--radius-control); padding: 10px 20px; cursor: pointer; font-weight: 600; min-height: 44px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 0 6px; border-radius: var(--radius-tag); line-height: 1.7; white-space: nowrap; vertical-align: 1px; margin-left: 6px; }
.tag.lane-a { background: color-mix(in srgb, var(--data-rose) 14%, var(--surface)); color: var(--data-rose); }
.tag.lane-b { background: color-mix(in srgb, var(--data-teal) 14%, var(--surface)); color: var(--data-teal); }
.tag.lane-both { background: var(--surface-2); color: var(--ink-2); }
.tag.b-mandatory { background: var(--ng-soft); color: var(--bind-mandatory); }
.tag.b-proposed { background: var(--primary-soft); color: var(--bind-proposed); }
.tag.b-guidance { background: var(--surface-2); color: var(--bind-guidance); }
.tag.b-target { background: var(--caution-soft); color: var(--bind-target); }
.tag.b-none { background: var(--surface-2); color: var(--bind-none); }
.tag.jp { background: var(--src-cryptrec); color: var(--surface); }
.tag.sec { background: var(--caution-soft); color: var(--caution); }
.tag.draft { background: var(--primary-soft); color: var(--bind-proposed); }
.tag.en { background: var(--surface-2); color: var(--muted); font-weight: 400; }

/* ---------- 期限 ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); align-items: center; margin: var(--s4) 0; }
.tl-lbl { font-size: 12px; color: var(--muted); font-weight: 600; margin-right: var(--s2); }
.toolbar > div { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.check { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.check input { accent-color: var(--primary); width: 16px; height: 16px; }
.year-block { display: grid; grid-template-columns: 7em 1fr; gap: var(--s5); padding: var(--s6) 0 var(--s4); border-top: 1px solid var(--line); }
.year-block .y { font-size: 32px; font-weight: 700; color: var(--ink); line-height: 1.1; position: sticky; top: calc(var(--hdr-h, 112px) + 12px); align-self: start; }
.year-block .y small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: var(--s1); }
.year-block.past .y { color: var(--muted); }
.ev { list-style: none; margin: 0; padding: 0; }
.ev li { padding: var(--s3) var(--s4); margin: 0 calc(var(--s4) * -1); border-radius: var(--radius-control); }
.ev li + li { margin-top: 2px; }
.ev li.is-jp { background: var(--primary-tint); box-shadow: inset 3px 0 0 var(--src-cryptrec); }
.ev .when { font-weight: 700; font-size: 15px; }
.ev .who { font-weight: 600; }
.ev .what { display: block; color: var(--ink-2); font-size: 15px; }
.ev details { font-size: 13px; color: var(--muted); margin-top: var(--s1); }
.ev summary { cursor: pointer; color: var(--link); width: fit-content; }

/* ---------- 鍵長 ---------- */
.tabs, .fw-pick { display: flex; gap: var(--s5); border-bottom: 1px solid var(--line); margin-bottom: var(--s5); overflow-x: auto; scrollbar-width: none; }
.tabs, .fw-pick { flex-wrap: wrap; gap: 0 var(--s5); overflow: visible; }
.tabs button, .fw-pick button { border: 0; background: none; padding: var(--s3) 0; cursor: pointer; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 15px; min-height: 44px; }
.tabs button:hover, .fw-pick button:hover { color: var(--ink); }
.tabs button[aria-selected="true"], .fw-pick button[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.scroll-hint { display: none; font-size: 12.5px; color: var(--muted); margin: 0 0 var(--s2); }
table.ptable { width: 100%; min-width: 760px; font-size: 15px; }
.ptable th, .ptable td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); text-align: right; vertical-align: middle; }
.ptable tr:last-child th, .ptable tr:last-child td { border-bottom: 0; }
.ptable thead th { background: var(--surface-2); font-size: 12px; line-height: 1.5; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.ptable thead th:first-child, .ptable tbody th { text-align: left; }
.ptable thead th.cur { box-shadow: inset 0 3px 0 var(--primary); color: var(--primary); }
.ptable td.cur, .ptable thead th.cur { background-color: var(--primary-tint); }
.ptable tbody th { font-weight: 600; white-space: nowrap; }
.ptable tbody th .sw { display: inline-block; width: 3px; height: 1.1em; border-radius: 2px; margin-right: var(--s2); vertical-align: -2px; }
.ptable tbody th small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 16em; font-weight: 400; color: var(--muted); font-size: 12px; white-space: normal; }
.ptable td .v { display: inline-block; min-width: 4.4em; padding: 2px 8px; border-radius: var(--radius-tag); font-weight: 700; text-align: right; }
.ptable td .x { font-size: 13px; color: var(--muted); }
.ptable td .x.ret { color: var(--ng); font-weight: 600; }
.ptable td .x.trn { color: var(--caution); font-weight: 600; }
.ptable tbody tr:hover td, .ptable tbody tr:hover th { background-color: var(--primary-tint); }
.ptable tr.jp th { box-shadow: inset 3px 0 0 var(--src-cryptrec); }
.ptable tr.sep td { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding-top: var(--s5); background: var(--surface); }
.notes { padding-left: 1.2em; margin: 0; }
.notes li { margin-bottom: var(--s2); font-size: 15px; }
.pq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s4); }
.pq-card { background: var(--surface); border-radius: var(--radius-panel); padding: var(--s5); box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.pq-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.pq-card h3 { margin: 0 0 var(--s2); font-size: 16px; }
.pq-card dl { margin: 0; font-size: 14px; }
.pq-card dt { color: var(--muted); font-size: 12px; margin-top: var(--s3); font-weight: 600; }
.pq-card dd { margin: 0; }
table.dtable { width: 100%; font-size: 15px; }
.dtable th, .dtable td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.dtable tbody tr:last-child th, .dtable tbody tr:last-child td { border-bottom: 0; }
.dtable thead th { background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.dtable td.r { text-align: right; white-space: nowrap; }
.dtable tr.grp th { background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.dtable tbody th { font-weight: 400; }
.dtable tbody tr:hover td, .dtable tbody tr:hover th { background-color: var(--primary-tint); }
#ruleTable { min-width: 680px; }
#intlTable { min-width: 620px; }
#ruleTable tbody th { white-space: nowrap; }
.refs { padding-left: 1.2em; font-size: 14px; }
.refs li { margin-bottom: var(--s2); }

/* ---------- 統制要件 ---------- */
.fw-view { background: var(--surface); border-radius: var(--radius-panel); box-shadow: var(--shadow-1); overflow: hidden; }
.fw-head { padding: var(--s5) var(--s6); background: var(--primary-tint); box-shadow: inset 4px 0 0 var(--primary); }
.fw-head h2 { margin: 0 0 var(--s1); font-size: 22px; }
.fw-head p { margin: 0; font-size: 14px; color: var(--ink-2); }
.area { border-top: 1px solid var(--line-soft); }
.area > summary { cursor: pointer; padding: var(--s4) var(--s6); min-height: 56px; display: grid; grid-template-columns: 28px 14em 1fr 20px; gap: var(--s3); align-items: center; list-style: none; }
.area > summary::-webkit-details-marker { display: none; }
.area > summary::after { content: "›"; color: var(--muted); font-size: 20px; transition: transform 0.18s; justify-self: end; }
.area[open] > summary::after { transform: rotate(90deg); }
.area > summary:hover { background: var(--primary-tint); }
.area .an { font-weight: 600; }
.area .sm { color: var(--ink-2); font-size: 15px; }
.area .body { padding: 0 var(--s6) var(--s5) calc(var(--s6) + 28px + var(--s3)); font-size: 15px; }
.area .body p { margin: 0 0 var(--s2); }
.area .why { color: var(--muted); font-size: 14px; }
table.lvgrid { min-width: 720px; width: 100%; font-size: 14px; }
.lvgrid th, .lvgrid td { border-bottom: 1px solid var(--line-soft); padding: 10px 8px; text-align: center; }
.lvgrid tbody tr:last-child th, .lvgrid tbody tr:last-child td { border-bottom: 0; }
.lvgrid thead th { background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--ink-2); vertical-align: bottom; }
.lvgrid tbody th { text-align: left; font-weight: 600; white-space: nowrap; padding-left: 16px; }
.lvgrid tbody tr:hover th, .lvgrid tbody tr:hover td { background: var(--primary-tint); }
.lvgrid button { border: 0; background: none; cursor: pointer; width: 100%; min-height: 36px; border-radius: var(--radius-tag); }
.lvgrid button:hover { background: var(--primary-soft); }
/* 要件の強さの印: 路線図の駅の形。色は観点の群（--g）に従う */
.g-a { --g: var(--line-a); } .g-prep { --g: var(--primary); } .g-b { --g: var(--line-b); } .g-base { --g: var(--ink-2); }
.stn-lv { display: inline-block; box-sizing: border-box; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--g, var(--primary)); background: var(--surface); vertical-align: -3px; }
.stn-lv.explicit { background: var(--g, var(--primary)); box-shadow: inset 0 0 0 2px var(--surface); }
.stn-lv.implied { background: linear-gradient(90deg, var(--g, var(--primary)) 50%, var(--surface) 50%); }
.stn-lv.absent { width: 9px; height: 9px; border: 1.5px solid var(--muted); background: transparent; vertical-align: 0; }
.lvgrid thead tr.grp th { text-align: left; padding: 10px 10px 6px; border-top: 4px solid var(--g); background: var(--surface-2); color: var(--g); font-size: 13px; font-weight: 700; line-height: 1.4; }
.lvgrid thead tr.grp th small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.lvgrid thead tr.grp td { background: var(--surface-2); border-bottom: 0; }
.lvgrid .gs { border-left: 1px solid var(--line); }
.lvgrid tbody th > span:first-child { display: block; }
@media (max-width: 640px) {
  table.lvgrid { min-width: 600px; font-size: 13px; }
  .lvgrid tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); white-space: normal; min-width: 8.5em; max-width: 9.5em; padding-left: 12px; box-shadow: 1px 0 0 var(--line); }
  .lvgrid thead tr:last-child th:first-child, .lvgrid thead tr.grp td { position: sticky; left: 0; z-index: 1; }
  .lvgrid th, .lvgrid td { padding: 8px 4px; }
}
.lvgrid tbody th .mix.mini { width: 96px; height: 5px; margin-top: 6px; }
.fw-grp { margin: 0; padding: 14px var(--s6) 8px; border-top: 1px solid var(--line-soft); border-left: 4px solid var(--g); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 14px; color: var(--g); background: var(--surface-2); }
.fw-grp small { font-size: 12px; font-weight: 500; color: var(--muted); }
.fw-grp + .area { border-top: 0; }
.mix { display: flex; height: 8px; border-radius: 4px; overflow: hidden; width: 180px; background: var(--surface-2); }
.mix i { display: block; }
.mix .m-explicit { background: var(--primary); }
.mix .m-implied { background: color-mix(in srgb, var(--primary) 40%, var(--surface)); }
.mix .m-absent { background: var(--line); }
.mix-row { display: flex; align-items: center; gap: var(--s3); margin: var(--s3) 0 var(--s2); flex-wrap: wrap; }
.mix-row .help { margin: 0; }

/* ---------- 資料 ---------- */
.qtable tbody tr.row { cursor: pointer; }
.qtable { min-width: 760px; }
.qtable th, #qEst td:first-child, #qEst td:last-child, #qHw td.r, #qHw td:nth-child(4) { white-space: nowrap; }
#qHw td:first-child { min-width: 6.5em; max-width: 9em; }
#qHw td:nth-child(2) { min-width: 20em; }
#qHw td:last-child { min-width: 9em; font-size: 13.5px; }
#qHw td.r small { display: block; color: var(--muted); font-size: 11px; }
.hw-name { display: block; }
.hw-cond { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.qtable tr.open td { background: var(--primary-tint); }
.qtable tr.detail td { background: var(--surface-2); font-size: 14px; }
.feed { list-style: none; margin: var(--s4) 0 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 8em 1fr; gap: var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--line-soft); }
.feed .d { color: var(--muted); font-size: 13px; }
.feed .k { font-size: 12px; font-weight: 700; color: var(--c); display: block; }
.feed .t { font-weight: 600; }
.feed .b { display: block; font-size: 14px; color: var(--ink-2); }
details.qa { background: var(--surface); border-radius: var(--radius-control); margin-bottom: var(--s2); box-shadow: var(--shadow-1); }
details.qa > summary { cursor: pointer; padding: var(--s4) var(--s5); font-weight: 600; min-height: 56px; }
details.qa .a { padding: 0 var(--s5) var(--s3); border-top: 1px solid var(--line-soft); }
details.qa .a p { margin: var(--s3) 0; }
.qa-group { font-size: 16px; color: var(--primary); margin: var(--s6) 0 var(--s3); }
.srclist { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.srclist li { padding: var(--s3) 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.srclist .meta { display: block; }
.prose p { margin: 0 0 var(--s4); }

/* ---------- 図 ---------- */
.fig { width: 100%; margin: var(--s2) 0 var(--s4); }
.fig svg { display: block; overflow: visible; }
.fig text { font-family: var(--font-sans); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: 13px; color: var(--ink-2); margin: 0 0 var(--s5); align-items: center; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend .help { margin: 0; font-size: 13px; }
.legend > p { flex-basis: 100%; }
.sw { display: inline-block; width: 14px; height: 10px; border-radius: 3px; }
.no-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 50%; color: var(--surface); font-size: 11px; font-weight: 700; margin-right: var(--s2); vertical-align: 1px; }
.bullet { margin: var(--s3) 0 var(--s1); display: grid; gap: 6px; max-width: 480px; }
.b-row { display: grid; grid-template-columns: 2.8em 1fr 4.4em; gap: var(--s2); align-items: center; font-size: 12.5px; color: var(--muted); }
.b-track { position: relative; height: 10px; border-radius: 5px; background: var(--surface); }
.b-bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.b-bar.req { background: color-mix(in srgb, var(--primary) 30%, var(--surface)); }
.b-bar.ok { background: var(--ok); }
.b-bar.ng { background: var(--ng); }
.b-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--primary); }
.b-val { text-align: right; color: var(--ink-2); font-weight: 700; }
.progress { margin: 0 0 var(--s3); }
.p-head { font-size: 14px; color: var(--ink-2); }
.p-head b { font-size: 24px; color: var(--ok); margin-right: 2px; }
.p-track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: var(--s2); }
.p-track span { display: block; height: 100%; background: var(--ok); border-radius: 4px; transition: width 0.2s; }
.histo { margin: var(--s4) 0 var(--s3); }
.h-cols { display: flex; align-items: flex-end; gap: 12px; height: 168px; border-bottom: 1px solid var(--chart-axis); }
.h-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; border: 0; background: none; padding: 0; cursor: pointer; border-radius: var(--radius-tag) var(--radius-tag) 0 0; }
.h-col:hover:not(:disabled) { background: var(--primary-tint); }
.h-col:disabled { cursor: default; }
.h-n { font-size: 13px; color: var(--ink); font-weight: 700; min-height: 1.4em; }
.h-bar { width: 100%; max-width: 42px; display: flex; flex-direction: column-reverse; max-height: 130px; flex: 1; }
.h-seg { display: block; width: 100%; min-height: 2px; }
.h-seg:last-child { border-radius: 3px 3px 0 0; }
.h-yrow { display: flex; gap: 12px; }
.h-yrow span { flex: 1; text-align: center; font-size: 12px; color: var(--muted); padding-top: var(--s1); }


/* ---------- 2030年問題: 概要と観点のページ ---------- */
.page > .wrap > .eyebrow:first-child { margin-top: var(--s7); }
.page > .wrap > .eyebrow:first-child + .ph { margin-top: 0; }
.eyebrow.lane-a { color: var(--line-a); display: flex; align-items: center; gap: 8px; }
.eyebrow.lane-b { color: var(--line-b); display: flex; align-items: center; gap: 8px; }
.lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); margin-top: 40px; }
.lane { background: var(--surface); border-radius: var(--radius-panel); box-shadow: var(--shadow-1); padding: var(--s6); position: relative; overflow: hidden; }
.lane::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; }
.lane-a::before { background: var(--data-rose); }
.lane-b::before { background: var(--data-teal); }
.lane-tag { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; }
.lane-a .lane-tag { color: var(--data-rose); }
.lane-b .lane-tag { color: var(--data-teal); }
.lane h2 { margin: var(--s1) 0 0; font-size: 26px; }
.lane-sub { margin: 0 0 var(--s4); color: var(--muted); font-size: 14px; }
.lane-when { display: flex; align-items: baseline; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); margin-bottom: var(--s3); }
.lane-when span { font-size: 12px; color: var(--muted); font-weight: 600; }
.lane-when b { font-size: 28px; line-height: 1.2; }
.lane p { margin: 0 0 var(--s2); font-size: 15px; }
.callout { background: var(--surface); border-radius: var(--radius-control); box-shadow: inset 4px 0 0 var(--caution); padding: var(--s4) var(--s5); }
.callout p { margin: 0 0 var(--s2); }
.callout p:last-child { margin-bottom: 0; }
.next-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.next { display: block; background: var(--surface); border-radius: var(--radius-control); padding: var(--s5); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-1); }
.next:hover { box-shadow: inset 0 0 0 2px var(--primary); }
.next b { display: block; font-size: 17px; color: var(--primary); margin-bottom: var(--s1); }
.next b::after { content: " →"; }
.next span { font-size: 14px; color: var(--ink-2); }
.steps-line { list-style: none; margin: var(--s4) 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: st; }
.steps-line li { position: relative; padding: 28px var(--s3) 0 0; font-size: 14px; }
.steps-line li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); }
.steps-line li::after { content: ""; position: absolute; left: 14px; right: 0; top: 13px; height: 2px; background: var(--line); }
.steps-line li:last-child::after { display: none; }
.steps-line b { display: block; font-size: 15px; }
.steps-line span { color: var(--ink-2); }
.sys-list { background: var(--surface); border-radius: var(--radius-panel); box-shadow: var(--shadow-1); overflow: hidden; }
.sys { border-top: 1px solid var(--line-soft); }
.sys:first-child { border-top: 0; }
.sys > summary { cursor: pointer; list-style: none; padding: var(--s4) var(--s5); display: grid; grid-template-columns: minmax(0, 18em) auto 1fr; gap: var(--s3); align-items: baseline; }
.sys > summary::-webkit-details-marker { display: none; }
.sys > summary:hover { background: var(--primary-tint); }
.sys-name { font-weight: 600; }
.sys-now { color: var(--ink-2); font-size: 14px; }
.sys .body { padding: 0 var(--s5) var(--s4); font-size: 15px; }
.sys .body p { margin: 0 0 var(--s2); }
.todo li.todo-group { border-top: 0; padding: var(--s4) 0 var(--s1); }
.todo li.todo-group span { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); }
.todo li.todo-group.lane-a span { color: var(--data-rose); }
.todo li.todo-group.lane-b span { color: var(--data-teal); }
.todo li.todo-group + li { border-top: 0; }

/* ---------- フッタ ---------- */
.ftr { border-top: 1px solid var(--line); padding: var(--s6) 0 var(--s7); font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.ftr p { margin: 0 0 var(--s2); }

/* ---------- 狭幅 ---------- */
@media (max-width: 900px) {
  .lanes, .next-grid { grid-template-columns: 1fr; }
  .steps-line { grid-template-columns: 1fr; }
  .steps-line li { padding: 0 0 var(--s3) 28px; }
  .steps-line li::before { top: 4px; }
  .steps-line li::after { left: 6px; right: auto; top: 18px; bottom: 0; width: 2px; height: auto; }
  .sys > summary { grid-template-columns: 1fr auto; }
  .sys-now { grid-column: 1 / -1; }
  .check-grid { grid-template-columns: 1fr; gap: var(--s5); padding-top: var(--s5); }
  .steps { position: static; }
  .to-result { display: inline-block; margin-top: var(--s3); font-weight: 700; font-size: 14px; text-decoration: none; }
  .kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .hdr-in { flex-wrap: wrap; gap: 0 var(--s3); min-height: 0; padding-top: var(--s2); }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 18px; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 24px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { scroll-snap-align: start; min-height: 40px; }
  .contact { margin-left: auto; min-height: 36px; padding: 0 var(--s3); font-size: 13px; }
  h2 { font-size: 22px; margin-top: 56px; }
  .intro-band { padding-top: var(--s6); }
  .intro-band h1, .ph { font-size: 30px; line-height: 1.35; }
  .lede { font-size: 16px; line-height: 1.75; }
  .steps { padding: 0 20px; }
  .r-block, .first-due { padding: 20px; }
  .first-due .fd-count { font-size: 34px; }
  .year-block { grid-template-columns: 1fr; gap: var(--s2); }
  .year-block .y { position: static; font-size: 26px; }
  .area > summary { grid-template-columns: 24px 1fr 16px; padding: var(--s3) 20px; }
  .area .sm { grid-column: 2; }
  .area .body { padding: 0 20px var(--s4); }
  .fw-head { padding: 20px; }
  .feed li { grid-template-columns: 1fr; gap: 0; }
  .todo p, .todo .cite { margin-left: 0; }
  .scroll-hint { display: block; }
  .h-cols, .h-yrow { gap: 4px; }
  .h-cols { height: 140px; }
  .h-bar { max-height: 104px; }
  .h-yrow span { font-size: 11px; }
  .ptable tbody th, .ptable thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
  .ptable thead th:first-child { background: var(--surface-2); }
}
@media (max-width: 520px) {
  .due-list li { grid-template-columns: 1fr; gap: var(--s2); }
  .due-list .left { display: flex; align-items: baseline; gap: var(--s2); }
  .kgrid .k-num { font-size: 24px; }
}
@media print {
  .hdr, .steps, .actions, .more, .ftr, .skip, .to-result { display: none !important; }
  body { background: #fff; color: #000; }
  .check-grid { display: block; }
  .r-block, .first-due { box-shadow: none; border: 1px solid #999; break-inside: avoid; margin-bottom: 12px; }
  .page[hidden] { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* 概要: 路線図（観点 A と観点 B の2本の路線が今日の駅から分かれる） */
:root { --line-a: var(--data-rose); --line-b: var(--data-teal); }
.line-badge { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; color: var(--surface); flex: none; }
.line-badge.l-a { background: var(--line-a); } .line-badge.l-b { background: var(--line-b); }
.hero { background: var(--band); padding: 56px 0 40px; border-bottom: 1px solid var(--line-soft); }
.hero-in .eyebrow { margin-bottom: 12px; }
.hero-t { font-size: clamp(40px, 6vw, 76px); line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 20px; }
.hero-num { font-family: "IBM Plex Sans", var(--font-sans); font-weight: 700; letter-spacing: -0.03em; background: linear-gradient(90deg, var(--line-a), var(--line-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: clamp(16px, 1.5vw, 19px); color: var(--ink-2); margin-bottom: 8px; }
.route { position: relative; margin: 28px 0 8px; }
.route svg { display: block; overflow: visible; }
.route-tick { font-size: 11.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.route-casing { stroke: var(--band); stroke-width: 18; stroke-linecap: round; stroke-linejoin: round; }
.route-line { stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s cubic-bezier(.4,0,.2,1); }
.route.in .route-line { stroke-dashoffset: 0; }
.route-line.l-a { stroke: var(--line-a); } .route-line.l-b { stroke: var(--line-b); transition-delay: .15s; }
.route-seg { font-size: 12.5px; font-weight: 600; }
.route-seg.l-a { fill: var(--line-a); } .route-seg.l-b { fill: var(--line-b); }
.route-origin { fill: var(--surface); stroke: var(--ink); stroke-width: 3; }
.route-stn { cursor: pointer; outline: none; }
.stn { fill: var(--surface); stroke-width: 5; transition: r .15s; }
.stn.l-a { stroke: var(--line-a); } .stn.l-b { stroke: var(--line-b); }
.route-stn:hover .stn, .route-stn:focus-visible .stn { r: 14; }
.route-stn:focus-visible .stn { stroke: var(--focus); }
.route-band { fill: color-mix(in srgb, var(--primary) 10%, transparent); stroke: color-mix(in srgb, var(--primary) 40%, transparent); stroke-width: 1; transition: x .25s ease, y .25s ease; }
.route-labels { position: absolute; inset: 0; pointer-events: none; }
.route-lab { position: absolute; max-width: 230px; font-size: 13px; line-height: 1.55; }
.route-lab b { display: block; font-size: 15px; }
.route-lab span { display: block; color: var(--ink-2); }
.route-lab.l-a b { color: var(--line-a); } .route-lab.l-b b { color: var(--line-b); }
.route-lab.today b { font-size: 13px; color: var(--ink); background: var(--surface); padding: 1px 8px; border-radius: 999px; box-shadow: 0 0 0 1px var(--panel-line); }
.route .line-badge.term { position: absolute; }
.route-ctrl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 16px; }
.route-yl { font-size: 13px; color: var(--muted); }
#tlYear { flex: 1; min-width: 160px; max-width: 520px; accent-color: var(--primary); }
.route-year { font-size: 26px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; min-width: 4.5em; }
.tl-play { min-height: 40px; padding: 0 16px; border: 1px solid var(--panel-line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tl-play:hover, .tl-play[aria-pressed="true"] { border-color: var(--primary); color: var(--primary); }
.route-state { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.st { background: var(--surface); border-radius: 12px; padding: 16px 20px; box-shadow: 0 0 0 1px var(--panel-line); }
.st h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 12px; color: var(--ink-2); }
.st dl { margin: 0; display: grid; gap: 8px; }
.st dl div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; align-items: baseline; }
.st dt { font-weight: 700; font-size: 14px; }
.st dd { margin: 0; font-size: 14px; padding: 2px 8px; border-radius: var(--radius-tag); justify-self: start; }
.st dd.ok { background: var(--ok-soft); color: var(--ok); } .st dd.cau { background: var(--caution-soft); color: var(--caution); } .st dd.ng { background: var(--ng-soft); color: var(--ng); }
.st p { margin: 0; font-size: 15px; }
.st-num { font-size: 28px; color: var(--line-b); font-variant-numeric: tabular-nums; margin: 0 2px; }
.lane-tag { display: flex; align-items: center; gap: 8px; }
@media (max-width: 640px) {
  .hero { padding: 36px 0 28px; }
  .route-state { grid-template-columns: 1fr; }
  .route-lab { max-width: 40%; }
}
@media (prefers-reduced-motion: reduce) {
  .route-line { transition: none; stroke-dashoffset: 0; }
  .route-band, .stn { transition: none; }
}

/* PQC 移行: 国・機関ごとの期限 */
.ms-block { margin: var(--s6) 0 var(--s5); }
.ms-block h3, #byyear { font-size: 18px; margin: 0 0 var(--s2); }
#byyear { margin-top: var(--s6); }
.ms-mark { cursor: pointer; }
.ms-mark:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* PQC 移行: 暗号を使う場所ごとの移行の進み具合（二面4段の一覧） */
:root {
  --s-default: var(--ok); --s-available: var(--data-blue); --s-standardizing: var(--caution);
  --s-none: var(--muted); --s-redesign: var(--data-violet); --s-symmetric: var(--data-teal); --s-na: var(--muted);
  --panel-line: color-mix(in srgb, var(--ink) 14%, var(--surface));
}
.ad-summary { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin: var(--s5) 0 var(--s4); }
.ad-sum { border: 1px solid var(--panel-line); border-radius: 12px; background: var(--surface); padding: var(--s5); }
.ad-sum h3 { margin: 0; font-size: 18px; }
.ad-sum-note { margin: 2px 0 var(--s3); font-size: 13px; color: var(--muted); line-height: 1.6; }
.ad-big { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.ad-big span { font-size: 13px; color: var(--ink-2); }
.ad-big b { font-size: 40px; line-height: 1.1; color: var(--s-default); font-variant-numeric: tabular-nums; }
.ad-big small { font-size: 16px; color: var(--ink-2); }
.ad-sub { margin: 4px 0 var(--s3); font-size: 14px; color: var(--ink-2); }
.ad-sub b { color: var(--s-available); font-size: 16px; }
.ad-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.ad-steps b { font-variant-numeric: tabular-nums; }
.ad-extra { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.ad-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.ad-dot.s-default { background: var(--s-default); } .ad-dot.s-available { background: var(--s-available); }
.ad-dot.s-standardizing { background: var(--s-standardizing); } .ad-dot.s-none { background: transparent; box-shadow: inset 0 0 0 1.5px var(--s-none); }
#adFilter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.ad-board { border: 1px solid var(--panel-line); border-radius: 12px; background: var(--surface); overflow: clip; margin-top: var(--s3); }
.ad-colhead, .ad-row { display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(260px, 1fr) minmax(260px, 1fr) 20px; gap: 16px; align-items: center; padding: 8px 16px; }
.ad-colhead { position: sticky; top: var(--hdr-h, 112px); z-index: 2; background: var(--surface); border-bottom: 1px solid var(--panel-line); font-size: 12px; color: var(--muted); padding-top: 10px; padding-bottom: 8px; }
.ad-scale b { display: block; font-size: 13px; color: var(--ink); }
.ad-scale i { font-style: normal; font-size: 11px; }
.ad-ghead { margin: 0; padding: 10px 16px 8px; background: var(--surface-2); font-size: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; border-top: 1px solid var(--panel-line); }
.ad-group:first-of-type .ad-ghead { border-top: 0; }
.ad-ghead > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.ad-gmark { display: inline-block; width: 4px; height: 1.1em; border-radius: 2px; align-self: center; margin-right: 2px; background: var(--g, var(--muted)); }
.w-4 { --g: var(--s-default); } .w-3 { --g: var(--s-available); } .w-2 { --g: var(--s-standardizing); } .w-1 { --g: var(--s-redesign); } .w-0 { --g: var(--s-none); }
.ad-where { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.ad-lsum { margin: var(--s3) 0 0; font-size: 13.5px; color: var(--ink-2); }
.ad-select { border: 1px solid var(--line); border-radius: var(--radius-control); padding: 4px 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; min-height: 32px; }
.ad-ghead small { flex-basis: 100%; font-size: 12.5px; font-weight: 400; color: var(--ink-2); line-height: 1.6; }
.ad-list { list-style: none; margin: 0; padding: 0; }
.ad-list > li + li { border-top: 1px solid var(--line-soft); }
.ad-item > summary { list-style: none; cursor: pointer; min-height: 52px; }
.ad-item > summary::-webkit-details-marker { display: none; }
.ad-item > summary:hover, .ad-item[open] > summary { background: var(--primary-tint); }
.ad-item > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ad-name { font-weight: 600; font-size: 14.5px; line-height: 1.5; }
.ad-asp { display: none; font-size: 12px; color: var(--muted); }
.ad-line { display: grid; grid-template-columns: minmax(120px, 1fr) 6.5em; align-items: center; gap: 10px; --c: var(--s-none); }
.ad-line.s-default { --c: var(--s-default); } .ad-line.s-available { --c: var(--s-available); } .ad-line.s-standardizing { --c: var(--s-standardizing); }
.ad-line.o-redesign { --c: var(--s-redesign); } .ad-line.o-symmetric { --c: var(--s-symmetric); }
.ad-track { position: relative; display: flex; justify-content: space-between; align-items: center; height: 22px; }
.ad-track::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--line); }
.ad-track::after { content: ""; position: absolute; left: 6px; top: 50%; height: 5px; margin-top: -2.5px; border-radius: 3px; width: calc((100% - 12px) * var(--p, 0)); background: var(--c); }
.ad-track i { position: relative; z-index: 1; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); }
.ad-track i.past { box-shadow: inset 0 0 0 3px var(--c); }
.ad-track i.now { width: 18px; height: 18px; margin: 0 -3px; background: var(--c); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--c); }
.s-none .ad-track i.now { background: var(--surface); box-shadow: inset 0 0 0 2px var(--s-none); }
.ad-lab { font-size: 12.5px; font-weight: 700; color: var(--c); white-space: nowrap; }
.s-none .ad-lab { color: var(--muted); font-weight: 600; }
.ad-line.off .ad-track::before { background: repeating-linear-gradient(90deg, var(--c) 0 6px, transparent 6px 11px); height: 3px; opacity: .8; }
.ad-line.off .ad-track::after { display: none; }
.o-na .ad-track::before { background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 9px); }
.o-na .ad-lab { color: var(--muted); font-weight: 400; }
.ad-scale > span { display: flex; justify-content: space-between; margin-right: calc(6.5em + 10px); }
.ad-scale i { width: 0; display: flex; justify-content: center; white-space: nowrap; }
.ad-scale i:first-child { justify-content: flex-start; margin-left: 2px; } .ad-scale i:last-child { justify-content: flex-end; margin-right: 2px; }
.ad-chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); justify-self: center; transition: transform .15s; }
.ad-item[open] .ad-chev { transform: rotate(45deg); }
.ad-evidence { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 12px 16px 16px; background: var(--surface-2); }
.ad-evidence h4 { margin: 0 0 4px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.ad-ev-st { font-size: 12px; font-weight: 600; padding: 0 6px; border-radius: 4px; background: var(--surface); }
.ad-ev-st.s-default { color: var(--s-default); } .ad-ev-st.s-available { color: var(--s-available); } .ad-ev-st.s-standardizing { color: var(--s-standardizing); }
.ad-ev-st.s-redesign { color: var(--s-redesign); } .ad-ev-st.s-symmetric { color: var(--s-symmetric); } .ad-ev-st.s-none, .ad-ev-st.s-na { color: var(--muted); }
.ad-evidence p { margin: 0 0 8px; font-size: 14px; }
.src-list { margin: 0; padding-left: 1.4em; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
@media (max-width: 720px) {
  .ad-summary { grid-template-columns: 1fr; }
  .ad-sum { padding: 16px; }
  .ad-colhead { display: none; }
  .ad-row { grid-template-columns: minmax(0, 1fr) 20px; gap: 6px 8px; padding: 10px 16px; }
  .ad-name { grid-column: 1; }
  .ad-chev { grid-column: 2; grid-row: 1; }
  .ad-cellw { grid-column: 1 / -1; display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 8px; }
  .ad-asp { display: block; }
  .ad-evidence { grid-template-columns: 1fr; gap: 12px; }
}

/* 折りたたみ（全件の一覧や詳しい表） */
.fold { margin: var(--s5) 0; border: 1px solid var(--panel-line); border-radius: 12px; background: var(--surface); }
.fold > summary { display: flex; align-items: baseline; gap: 10px; min-height: 48px; padding: 12px 16px; cursor: pointer; list-style: none; font-weight: 700; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); align-self: center; transition: transform .15s; flex: none; }
.fold[open] > summary::before { transform: rotate(45deg); }
.fold > summary:hover { background: var(--primary-tint); }
.fold-n { font-size: 13px; font-weight: 400; color: var(--muted); }
.fold > :not(summary) { padding: 0 16px 16px; }
/* 要点の数字 */
.kpis { display: flex; flex-wrap: wrap; gap: 12px; margin: var(--s4) 0; }
.kpi { flex: 1 1 180px; border: 1px solid var(--panel-line); border-radius: 12px; background: var(--surface); padding: 12px 16px; }
.kpi span { display: block; font-size: 12.5px; color: var(--muted); }
.kpi b { display: block; font-size: 22px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.kpi b small { font-size: 13px; margin-left: 2px; color: var(--ink-2); }
.kpi > small { display: block; font-size: 12.5px; color: var(--ink-2); }
.route-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 10px; }
.route-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.route-list b { display: block; font-size: 14.5px; }
.route-list b.l-a { color: var(--line-a); } .route-list b.l-b { color: var(--line-b); }
.route-list span:not(.line-badge) { color: var(--ink-2); }

/* ページの見出しの帯。下端に路線の線を引く（A＝赤、B＝青緑、その他＝2本） */
.page-head { position: relative; background: var(--band); padding: 48px 0 40px; margin-bottom: 8px; }
.page-head .ph { margin: 0 0 12px; }
.page-head .eyebrow { margin: 0 0 10px; }
.page-head .lede { margin-bottom: 6px; }
.page-head::after, .hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 9px; }
.page-head.line-a::after { background: linear-gradient(var(--line-a), var(--line-a)) bottom / 100% 5px no-repeat; }
.page-head.line-b::after { background: linear-gradient(var(--line-b), var(--line-b)) bottom / 100% 5px no-repeat; }
.page-head.line-ab::after, .hero::after { background: linear-gradient(var(--line-a), var(--line-a)) top / 100% 3px no-repeat, linear-gradient(var(--line-b), var(--line-b)) bottom / 100% 3px no-repeat; }
.hero { position: relative; border-bottom: 0; }
@media (max-width: 640px) { .page-head { padding: 32px 0 28px; } }

/* フッター */
.ftr { margin-top: 96px; background: var(--band); border-top: 0; position: relative; padding: 0 0 32px; }
.ftr::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px; background: linear-gradient(var(--line-a), var(--line-a)) top / 100% 3px no-repeat, linear-gradient(var(--line-b), var(--line-b)) bottom / 100% 3px no-repeat; }
.ftr-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding: 40px 0 24px; border-bottom: 1px solid var(--line-soft); margin-bottom: 20px; }
.ftr-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--ink); text-decoration: none; }
.ftr-brand .line-badge { width: 26px; height: 26px; font-size: 13px; }
.ftr-brand .line-badge + .line-badge { margin-left: -14px; box-shadow: 0 0 0 2px var(--band); }
.ftr-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; }
.ftr-nav a { color: var(--ink-2); text-decoration: none; }
.ftr-nav a:hover { color: var(--primary); text-decoration: underline; }
.ftr p { font-size: 13px; color: var(--muted); line-height: 1.75; }
/* 見出しの帯のすぐ後の最初の見出しは、上の余白を詰める */
.page-head + .wrap > section:first-child > h2:first-child, .hero + .wrap > :first-child { margin-top: 48px; }
/* 路線図の動き: 車両の印、通過した駅、今日の駅の輪 */
.route-train { stroke: var(--surface); stroke-width: 3; transition: cx .45s cubic-bezier(.4,0,.2,1), cy .45s cubic-bezier(.4,0,.2,1); filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.route-train { fill: var(--ink); r: 9; }
.stn { transition: fill .3s; }
.stn.passed.l-a { fill: var(--line-a); } .stn.passed.l-b { fill: var(--line-b); }
.route-pulse { fill: none; stroke: var(--ink-2); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: route-pulse 2.4s ease-out infinite; }
@keyframes route-pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(2.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .route-pulse { animation: none; opacity: 0; } .route-train, .stn { transition: none; } }
.more-row { list-style: none; padding: 16px 0 0; border: 0 !important; }
.more-btn { min-height: 44px; padding: 0 20px; border: 1px solid var(--panel-line); border-radius: 999px; background: var(--surface); color: var(--primary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.more-btn:hover { border-color: var(--primary); }
