/* ===================================================
   文書ページ共通CSS（079〜091）
   =================================================== */

/* Webフォントの読み込み（Noto Sans JP、標準と太字） */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #e2e8f0;
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  font-size: 14px;
  font-weight: normal;
  color: #000000;
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

/* 用紙 */
.pdf-page {
  width: 794px;
  min-height: 1123px;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 94px 76px 76px;
}

/* 見出し */
.document-title {
  text-align: center;
  margin-top: 15px;
  margin-bottom: 25px;
  letter-spacing: 0.5px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  line-height: 1.5;
}

h1 {
  font-size: 20px;
  margin-top: 32px;
  margin-bottom: 16px;
}

h2 {
  font-size: 18px;
  margin-top: 32px;
  margin-bottom: 12px;
}

h3 {
  font-size: 16px;
  margin-top: 24px;
  margin-bottom: 8px;
}

h4 {
  font-size: 15px;
  margin-top: 16px;
  margin-bottom: 6px;
}

h5, h6 {
  font-size: 14px;
  margin-top: 16px;
  margin-bottom: 6px;
}

/* 段落 */
p {
  line-height: 1.7;
  margin-top: 0;
  margin-bottom: 8px;
  text-align: justify;
  text-indent: 1em;
}

/* 字下げしない段落 */
.no-indent,
td p,
th p {
  text-indent: 0;
}

/* 表タイトル */
.table-title {
  margin-top: 12px;
  margin-bottom: 2px;
  text-indent: 0;
}

/* リスト（行頭記号はCSSで表示し、折り返した行の頭をそろえる） */
ul, ol {
  margin-left: 2em;
  margin-bottom: 8px;
}

li {
  line-height: 1.3;
  list-style: disc outside;
  margin-bottom: 2px;
}

ol > li {
  list-style: decimal outside;
}

/* ○の箇条書き */
.circle > li {
  list-style: circle outside;
}

/* 番号付きリスト（番号は本文の文字として書き、番号の幅だけぶら下げて行頭をそろえる）
   番号の頭は段落の字下げ位置（1em）、本文は番号の直後から始める */
ol.num-list {
  margin-left: 1em;
}

ol.num-list > li {
  position: relative;
  list-style: none;
  padding-left: 1.6em;
}

ol.num-list > li > .num {
  position: absolute;
  left: 0;
  width: 1.6em;
}

/* 10）以上を含むリスト：番号を右寄せにして、本文の頭を1桁のリストとそろえる */
ol.num-wide {
  margin-left: 0.4em;
}

ol.num-wide > li {
  padding-left: 2.2em;
}

ol.num-wide > li > .num {
  width: 2.2em;
  text-align: right;
}

/* （1）形式 */
ol.num-paren > li {
  padding-left: 2.6em;
}

ol.num-paren > li > .num {
  width: 2.6em;
}

/* ア、①など1字の番号 */
ol.num-short > li {
  padding-left: 1.5em;
}

ol.num-short > li > .num {
  width: 1.5em;
}

/* 番号付きリストの中の箇条書き */
ol.num-list ul {
  margin-left: 0.5em;
}

/* リンク */
a {
  word-break: break-all;
}

a:link,
.toc a:link {
  color: #0056b3;
  text-decoration: underline;
}

a:visited,
.toc a:visited {
  color: #551a8b;
  text-decoration: underline;
}

a:hover,
.toc a:hover {
  color: #003366;
  text-decoration: none;
}

a.btn-page-top-fixed,
a.btn-page-top-fixed:visited {
  color: #ffffff;
  text-decoration: none;
}

/* 表 */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
  margin-bottom: 12px;
}

th, td {
  border: 1px solid #000000;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
  line-height: 1.3;
}

th {
  font-weight: normal;
  background-color: #f2f2f2;
}

/* 補助クラス */
.center {
  text-align: center;
}

/* 小さい文字（注記・補足） */
.small {
  font-size: 12px;
  font-weight: normal;
}

p.small {
  text-indent: 0;
}

/* 図 */
figure {
  margin-top: 16px;
  margin-bottom: 16px;
  text-align: center;
}

img {
  max-width: 100%;
  height: auto;
}

figcaption {
  margin-top: 4px;
  font-size: 13px;
}

/* 条文の枠 */
.section-box {
  border: 1px solid #000000;
  padding: 12px 15px;
  margin-bottom: 4px;
}

.section-box > :first-child {
  margin-top: 0;
}

.section-box > :last-child {
  margin-bottom: 0;
}

.commentary-block {
  margin-top: 10px;
  margin-bottom: 15px;
}

/* 黄色帯（原稿の黄色マーカー） */
.yellow-highlight {
  display: inline-block;
  background-color: #ffff7f;
  padding: 2px 4px;
  margin-top: 10px;
  margin-bottom: 4px;
  text-indent: 0;
}

/* 注釈番号（※1など）：右上に小さく */
sup.note-ref {
  font-size: 12px;
  vertical-align: super;
  line-height: 0;
}

/* 目次 */
.toc {
  border: 1px solid #cbd5e1;
  padding: 16px 20px;
  margin-top: 20px;
  margin-bottom: 30px;
}

.toc-title {
  font-weight: bold;
  text-indent: 0;
  text-align: center;
  margin-bottom: 12px;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 4px;
}

.toc ul {
  list-style: none;
  margin-left: 0;
  margin-bottom: 0;
  padding-left: 0;
}

.toc ul ul {
  padding-left: 18px;
}

.toc li {
  list-style: none;
  line-height: 1.8;
  margin-bottom: 2px;
}

.toc-link:hover {
  text-decoration: none;
}

.toc-link:hover .toc-text {
  text-decoration: underline;
}

/* ページ内リンクの移動位置 */
h1[id],
h2[id],
h3[id],
h4[id],
div[id],
section[id] {
  scroll-margin-top: 30px;
}

/* TOPボタン */
a.btn-page-top-fixed {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: auto;
  top: auto;
  z-index: 999999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #000000;
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

a.btn-page-top-fixed:hover {
  background-color: #333333;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

/* 欄外の注釈（区切り線＋本文より小さい注釈文。※番号の後ろで行頭をそろえる） */
.footnotes {
  position: relative;
  margin-top: 24px;
  margin-bottom: 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.footnotes::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 35%;
  border-top: 1px solid #000000;
}

.footnotes dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 6px;
  row-gap: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.footnotes dt {
  white-space: nowrap;
}

.footnotes dd {
  margin: 0;
}

/* 別紙ラベル（右寄せ・字下げなし） */
.appendix-label {
  text-align: right;
  text-indent: 0;
}
