/* 共通の骨格。色はサイトごとの theme(site.config の themeCss)で上書きする。
   11/30 夜 作り直し: 技術資料の出版社の紙面(紺の帯・ロゴ・見出し帯・PC は左に全表の目次・トップは棚)。
   影・グラデーション・大きな角丸・絵文字は使わない(lint が検査)。
   公開前の監査(research/us/audit/)で決めたことは残す: 文字の指定・列見出しの固定と繰り返し・横送りの止まる位置・
   索引の押せる大きさ(44px)・小数点そろえ・表の幅・印刷・読み上げ。 */
:root {
  --ink: #16202a;
  --ink-2: #44505c;
  --ink-3: #5f6b77;
  --paper: #ffffff;
  --band: #f3f5f7;
  --rule: #d5dce3;
  --rule-strong: #9aa7b4;
  --head: #e5ecf3;
  --zebra: #f6f8fa;
  --hover: #e8f1fa;
  --brand: #0f2b45;
  --brand-line: #29496a;
  --brand-muted: #aabdd0;
  --accent: #1b5a92;
  --accent-soft: #e7f0f9;
  --hi: #f2b33d;
  --mark: #ffe58a;
  --measure: 46rem;
  --wide: 76rem;
  --side: 15rem;
  --r: 4px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* system-ui は日本語の Windows で Yu Gothic UI になり、− や ′ が全角の幅になる(監査 A-13)。OS の UI フォントを名前で指定する */
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
.nw { white-space: nowrap; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.print-src { display: none; }
.in { max-width: var(--wide); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 20; background: var(--paper); color: var(--ink); padding: 8px 12px; border: 2px solid var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* 小さな見出しの文字(大文字・字間) */
.k, .side .sh, .fh, .kh, .jump .jl, .shelf .sec { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }

/* ---- 上の帯: 紺の帯(ロゴと社名)+ 白の帯(節) */
.masthead .bar { background: var(--brand); }
.masthead .bar .in { display: flex; align-items: center; gap: 18px; min-height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.16rem; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand svg { width: 30px; height: 30px; flex: none; display: block; }
.masthead .tag { margin: 0; color: var(--brand-muted); font-size: .86rem; padding-left: 18px; border-left: 1px solid var(--brand-line); line-height: 1.3; }
.secnav { background: var(--paper); border-bottom: 1px solid var(--rule); }
.secnav ul { display: flex; margin: 0 0 0 -10px; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.secnav ul::-webkit-scrollbar { display: none; }
.secnav a { display: block; padding: 12px 10px 9px; color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 500; white-space: nowrap; border-bottom: 3px solid transparent; }
.secnav a:hover { color: var(--ink); border-bottom-color: var(--rule-strong); }
.secnav a[aria-current] { color: var(--brand); font-weight: 700; border-bottom-color: var(--hi); }

/* ---- ページの見出し帯(パンくず・題・範囲・確認日など) */
.pagehead { background: var(--band); border-bottom: 1px solid var(--rule); }
.pagehead .in { padding-top: 18px; padding-bottom: 20px; }
.crumbs { font-size: .82rem; color: var(--ink-3); margin: 0 0 8px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs .sep { margin: 0 7px; color: var(--rule-strong); }
h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -.015em; margin: 0 0 8px; color: var(--brand); font-weight: 700; max-width: 52rem; }
.scope { font-size: 1.06rem; color: var(--ink-2); margin: 0 0 14px; max-width: var(--measure); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin: 0; padding: 0; list-style: none; font-size: .88rem; color: var(--ink); }
.meta li { display: flex; align-items: baseline; gap: 7px; }
.meta .print { font: inherit; font-size: .84rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--r); padding: 4px 12px; cursor: pointer; }
.meta .print:hover { border-color: var(--accent); color: var(--accent); }
.onpage { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--rule); font-size: .85rem; }
.onpage .k { margin-right: 4px; }
.onpage a { display: inline-block; padding: 3px 10px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper); text-decoration: none; color: var(--ink); }
.onpage a:hover { border-color: var(--accent); color: var(--accent); }
.onpage a .n { font-weight: 700; color: var(--accent); margin-right: 5px; }

/* ---- 本文と左の目次(PC) */
.layout { padding-top: 26px; padding-bottom: 56px; }
.body { min-width: 0; }
.side { display: none; font-size: .87rem; }
@media (min-width: 75rem) {
  .layout.has-side { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); grid-template-areas: "side body"; gap: 0 44px; }
  .layout.has-side .body { grid-area: body; }
  .layout.has-side .side { grid-area: side; display: block; position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow-y: auto; padding-right: 4px; }
}
.side .sh { margin: 20px 0 6px; }
.side .sh:first-child { margin-top: 2px; }
.side ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.side a { display: block; padding: 5px 8px 5px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; line-height: 1.35; }
.side a:hover { color: var(--accent); border-left-color: var(--rule-strong); }
.side a[aria-current] { color: var(--brand); font-weight: 700; border-left-color: var(--hi); background: var(--band); }

.body h2 { font-size: 1.32rem; line-height: 1.3; letter-spacing: -.01em; color: var(--brand); margin: 44px 0 10px; font-weight: 700; }
.body h2::before { content: ""; display: block; width: 32px; height: 3px; background: var(--hi); margin-bottom: 10px; }
.body h3 { font-size: 1.05rem; margin: 22px 0 6px; color: var(--ink); }
.body p, .body ul.plain, .body ol.plain { max-width: var(--measure); }
.body p { margin: 0 0 12px; }
.body > p:first-child { margin-top: 0; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: .92em; background: var(--band); border: 1px solid var(--rule); border-radius: 3px; padding: 6px 12px; display: inline-block; line-height: 1.4; }

/* ---- 寸法の索引(表の上) */
.jump { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; font-size: .85rem; }
.jump .jl { margin-right: 4px; }
.jump a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; padding: 3px 8px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper); color: var(--accent); text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jump a:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ---- 表。幅は中身なり。太い罫線は build が付ける区切り(.g) */
figure.tbl { margin: 0 0 8px; scroll-margin-top: 16px; }
figure.tbl figcaption { font-size: 1.02rem; font-weight: 700; color: var(--ink); margin: 0 0 8px; line-height: 1.35; }
figure.tbl figcaption .no { display: inline-block; vertical-align: 1px; margin-right: 9px; padding: 2px 7px; border-radius: 3px; background: var(--brand); color: #fff; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; line-height: 1.5; }
/* position: relative は、見出しの中の読み上げ用の文字(.vh・絶対配置)を箱の中に留めるため。無いと画面全体が横にはみ出す */
.scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule-strong); border-radius: var(--r); width: fit-content; max-width: 100%; background: var(--paper); }
table.data { border-collapse: separate; border-spacing: 0; width: auto; min-width: 20rem; font-variant-numeric: tabular-nums; font-size: .94rem; }
table.data th, table.data td { padding: 6px 14px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
table.data thead th { background: var(--head); color: var(--brand); font-weight: 700; font-size: .86rem; vertical-align: bottom; border-bottom: 2px solid var(--brand); line-height: 1.25; padding-top: 9px; padding-bottom: 7px; }
table.data thead th.grp { text-align: center; border-bottom: 1px solid var(--rule-strong); padding-bottom: 5px; }
table.data thead th .u { display: block; font-weight: 400; color: var(--ink-3); font-size: .76rem; }
table.data thead tr:first-child th:first-child { border-top-left-radius: 3px; }
table.data thead tr:first-child th:last-child { border-top-right-radius: 3px; }
table.data th.l, table.data td.l { text-align: left; }
table.data th.c1 { width: var(--c1, auto); }
table.data tbody th.c1 { font-weight: 700; color: var(--ink); position: sticky; left: 0; background: var(--paper); border-right: 1px solid var(--rule); }
table.data thead th.c1 { position: sticky; left: 0; z-index: 2; border-right: 1px solid var(--rule); }
/* 1行おきの地色(スマホ用の繰り返しの見出し行は数えない) */
table.data tbody tr:nth-child(even of :not(.rh)) > * { background: var(--zebra); }
table.data tbody tr.g > * { border-bottom-color: var(--rule-strong); }
table.data tbody tr:last-child > * { border-bottom: 0; }
/* 脚注の記号は幅を取らない(小数点そろえを崩さない) */
table.data td { position: relative; }
table.data td sup { position: absolute; margin-left: 1px; }
.pd::after { content: attr(data-p); visibility: hidden; }
/* 索引で飛んだ行・押した行: 色だけに頼らず上下に線 */
table.data tbody tr:target > *, table.data tbody tr.hit > * { background: var(--mark); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
/* スマホ用の繰り返しの見出し行 */
table.data tr.rh > * { background: var(--head); color: var(--brand); font-weight: 700; font-size: .78rem; padding-top: 3px; padding-bottom: 3px; border-bottom: 1px solid var(--rule-strong); }
table.data tr.rh .u { font-weight: 400; color: var(--ink-3); }
table.data tr.rh > .c1 { position: sticky; left: 0; z-index: 1; border-right: 1px solid var(--rule); }
.fn { font-size: .82rem; color: var(--ink-2); margin: 8px 0 0; padding: 0; list-style: none; max-width: var(--measure); }
.fn li { margin: 3px 0; }
.fn > li > sup { font-weight: 700; color: var(--accent); }
.fn sup, table.data sup { font-size: .7em; }
/* 2つの表を左右に(広い画面と印刷) */
@media (min-width: 45rem) {
  .pair { display: grid; grid-template-columns: repeat(2, max-content); gap: 0 36px; align-items: start; }
}

/* ---- 図・一覧 */
ul.plain { padding-left: 1.2em; }
ul.plain li, ol.plain li { margin: 4px 0; }
figure.fig { margin: 16px 0; max-width: var(--measure); }
figure.fig svg { max-width: 100%; height: auto; display: block; }
figure.fig figcaption { font-size: .85rem; color: var(--ink-2); margin-top: 6px; }

/* ---- 関連の表(タイル)・出典・確認日 */
ul.see { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 10px; }
ul.see a { display: block; height: 100%; padding: 12px 14px; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: var(--r); text-decoration: none; background: var(--paper); }
ul.see a:hover { background: var(--accent-soft); border-color: var(--accent); }
ul.see .t { display: block; font-weight: 700; color: var(--accent); line-height: 1.35; }
ul.see .d { display: block; font-size: .82rem; color: var(--ink-3); margin-top: 3px; }
.refs { font-size: .87rem; color: var(--ink-2); padding-left: 1.5em; max-width: var(--measure); }
.refs li { margin: 5px 0; padding-left: 2px; }
.refs li::marker { color: var(--ink-3); font-weight: 700; }
.rev { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .86rem; color: var(--ink-2); margin: 36px 0 0; padding: 12px 16px; background: var(--band); border: 1px solid var(--rule); border-radius: var(--r); max-width: var(--measure); }

/* ---- 広告の枠: 表の外にだけ置く。固定サイズの広告ユニットの高さを先に確保する(後から伸びて下のリンクが動くと誤クリックになる) */
.ad { margin: 36px 0 40px; max-width: var(--measure); }
.ad .lbl { font-size: .7rem; color: var(--ink-3); letter-spacing: .05em; margin: 0 0 2px; }
.ad .slot { min-height: 280px; display: flex; justify-content: center; }

/* ---- トップページ */
.intro { background: var(--band); border-bottom: 1px solid var(--rule); }
.intro .in { padding-top: 34px; padding-bottom: 30px; }
.intro h1 { font-size: 2.35rem; margin-bottom: 10px; }
.intro .lede { font-size: 1.1rem; color: var(--ink-2); margin: 0 0 22px; max-width: 44rem; }
.stats { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 0; padding: 0; list-style: none; }
.stats li { display: flex; flex-direction: column; padding-left: 14px; border-left: 3px solid var(--hi); }
.stats .n { font-size: 1.5rem; font-weight: 700; color: var(--brand); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stats .l { font-size: .84rem; color: var(--ink-2); }
.home { padding-top: 30px; padding-bottom: 56px; }
.kh { margin: 0 0 12px; }
.kh ~ .kh { margin-top: 40px; }
ul.feat { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 12px; }
ul.feat a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; background: var(--brand); color: #fff; border-radius: var(--r); text-decoration: none; border-top: 4px solid var(--hi); }
ul.feat a:hover { background: #163a5c; }
ul.feat .sec { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-muted); }
ul.feat .t { font-size: 1.06rem; font-weight: 700; line-height: 1.3; }
ul.feat .d { font-size: .84rem; color: var(--brand-muted); }
.shelves { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 16px; align-items: start; }
.shelf { border: 1px solid var(--rule); border-radius: var(--r); padding: 16px 18px 8px; background: var(--paper); scroll-margin-top: 12px; }
.shelf h3 { display: flex; align-items: center; gap: 12px; font-size: 1.1rem; color: var(--brand); margin: 0 0 8px; }
.shelf h3 .ico { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--r); background: var(--accent-soft); color: var(--brand); flex: none; }
.shelf h3 svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.shelf ul { list-style: none; margin: 0; padding: 0; }
.shelf li + li { border-top: 1px solid var(--rule); }
.shelf a { display: block; padding: 9px 0; text-decoration: none; }
.shelf a .t { display: block; font-weight: 600; color: var(--accent); line-height: 1.35; }
.shelf a:hover .t { text-decoration: underline; }
.shelf a .d { display: block; font-size: .82rem; color: var(--ink-3); margin-top: 2px; }
.shelf:target { border-color: var(--accent); }

/* ---- 固定ページ(About など) */
.prose { max-width: var(--measure); }

/* ---- 下の帯 */
footer.site { background: var(--brand); color: var(--brand-muted); font-size: .87rem; }
footer.site .cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 28px 44px; padding-top: 38px; padding-bottom: 26px; }
footer.site .about p { margin: 12px 0 0; max-width: 26rem; line-height: 1.55; }
footer.site .fh { color: #fff; margin: 4px 0 10px; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin: 5px 0; }
footer.site a { color: #dce7f1; text-decoration: none; }
footer.site a:hover { color: #fff; text-decoration: underline; }
footer.site .legal { border-top: 1px solid var(--brand-line); }
footer.site .legal .in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 14px; padding-bottom: 26px; font-size: .8rem; }

/* PC(表が本文の幅に収まる): 列見出しを画面の上に固定する。収まらない表(.over・.x)は箱の中で横に送る */
@media (min-width: 64rem) {
  .scroll { overflow: visible; }
  figure.tbl.x .scroll, figure.tbl.over .scroll { overflow-x: auto; }
  table.data thead { position: sticky; top: 0; z-index: 3; }
  table.data tbody tr { scroll-margin-top: 5rem; }
  table.data tr.rh { display: none; }
}
@media (hover: hover) and (min-width: 64rem) {
  table.data tbody tr:hover > * { background: var(--hover); }
  table.data tbody tr:target > *, table.data tbody tr.hit > * { background: var(--mark); }
}
/* スマホ・タブレット: 横送りは列の境目で止める(数字の頭が固定列の下に隠れて別の値に見えるのを防ぐ)。飛んだ行は画面の上の方に貼り付けない */
@media (max-width: 63.99rem) {
  .scroll { scroll-snap-type: x mandatory; scroll-padding-left: var(--c1, 0); }
  table.data td, table.data thead th:not(.c1) { scroll-snap-align: start; }
  table.data tbody tr { scroll-margin-top: 40vh; }
}
@media (max-width: 48rem) {
  footer.site .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  footer.site .about { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .in { padding-left: 16px; padding-right: 16px; }
  .masthead .bar .in { min-height: 52px; }
  .masthead .tag { display: none; }
  .secnav ul { margin-left: -8px; }
  .secnav a { padding: 10px 8px 8px; font-size: .86rem; }
  .pagehead .in { padding-top: 12px; padding-bottom: 16px; }
  h1 { font-size: 1.5rem; }
  .intro h1 { font-size: 1.75rem; }
  .intro .in { padding-top: 24px; padding-bottom: 24px; }
  .stats { gap: 12px 24px; }
  .stats .n { font-size: 1.25rem; }
  .scope { font-size: 1rem; }
  .layout { padding-top: 18px; }
  .body h2 { font-size: 1.18rem; margin-top: 36px; }
  table.data th, table.data td { padding: 5px 9px; }
  figure.tbl.over figcaption::after { content: " (scrolls sideways)"; font-weight: 400; font-size: .85rem; color: var(--ink-3); }
  .shelves { grid-template-columns: minmax(0, 1fr); }
  code { display: block; white-space: normal; }
}
/* 指で押す索引: 44px 角 */
@media (max-width: 600px), (pointer: coarse) {
  .jump { gap: 4px; }
  .jump a { min-width: 2.75rem; min-height: 2.75rem; padding: 0 .45rem; }
}
@media print {
  @page { margin: 0.5in; }
  .secnav, .side, .skip, .masthead .tag, .ad, footer.site, .jump, .crumbs, .meta, .onpage, ul.see, .rev, script { display: none !important; }
  .body h2.see-h { display: none !important; }
  body { background: #fff; font-size: 10.5pt; }
  .masthead .bar { background: none; border-bottom: 1.5pt solid #000; }
  .masthead .bar .in, .pagehead .in, .layout, .in { padding-left: 0; padding-right: 0; max-width: none; }
  .masthead .bar .in { min-height: 0; padding-bottom: 4pt; }
  .brand { color: #000; font-size: 11pt; }
  .brand svg { width: 16pt; height: 16pt; }
  .pagehead { background: none; border: 0; }
  .pagehead .in { padding-top: 8pt; padding-bottom: 4pt; }
  h1 { font-size: 15pt; color: #000; }
  .scope { font-size: 10pt; margin-bottom: 6pt; }
  .layout { padding-top: 6pt; padding-bottom: 0; display: block; }
  .body h2 { color: #000; font-size: 12pt; margin-top: 14pt; }
  .body h2::before { display: none; }
  .scroll { overflow: visible; width: fit-content; max-width: 100%; border-color: #666; }
  a { color: inherit; text-decoration: none; }
  table.data { font-size: 9.5pt; }
  table.data th, table.data td { padding: 1px 6px; line-height: 1.3; }
  table.data thead th { color: #000; border-bottom-color: #000; }
  figure.tbl figcaption .no { background: none; color: #000; padding: 0; font-size: 9pt; }
  figure.tbl.psm table.data { font-size: 8.5pt; }
  table.data tbody th.c1, table.data thead th.c1 { position: static; background: none; }
  table.data tr.rh { display: none; }
  figure.tbl.keep { break-inside: avoid; }
  figure.tbl figcaption, h2 { break-after: avoid; }
  .pair { display: grid; grid-template-columns: repeat(2, max-content); gap: 0 28px; align-items: start; }
  .print-src { display: block; font-size: 8.5pt; color: var(--ink-3); margin-top: 10px; }
}
/* 表・脚注の後ろに続くもの(次の索引・表・段落)との間をあける */
.body figure.tbl + :not(.fn), .body .fn + *, .body .pair + * { margin-top: 30px; }
/* 索引の名前は単位(mm)のこともあるので大文字にしない */
.jump .jl { text-transform: none; letter-spacing: .02em; font-size: .8rem; }
/* 行の見出しは左寄せ(列見出しと同じ) */
table.data tbody th.c1 { text-align: left; }
@media (max-width: 600px) {
  ul.feat a { padding: 12px 14px; }
  ul.feat .t { font-size: 1rem; }
}
@media print {
  .layout.has-side { display: block; }
}
/* 左右に並べた表の脚注は、表の幅で折り返す(脚注の長さで列が広がり、PC で右にはみ出すのを防ぐ。11/30 下書き担当の指摘) */
.pair .fn, .pair .jump { contain: inline-size; }

/* 許容差の組の区切り(+10 / 0)。12/1 */
.tsl { padding: 0 .2em; }

/* theme */
