/* デジタル庁デザインシステム(DADS)のトークンと規定に沿う。値の出典は @digital-go-jp/design-tokens */
:root {
  color-scheme: light;
  --gray-50: #f2f2f2;
  --gray-200: #cccccc;
  --gray-536: #767676;
  --gray-700: #4d4d4d;
  --gray-900: #1a1a1a;
  --link: #00118f;       /* blue-1000 */
  --link-hover: #000060; /* blue-1200 */
  --visited: #8b008b;    /* magenta-900 */
  --focus: #ffd43d;      /* yellow-300。規定により変えない */
  --s1: .5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2rem;
  --s5: 2.5rem;
  --s8: 4rem;
  --measure: 44rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--s3); }

body {
  margin: 0;
  background: #fff;
  color: var(--gray-900);
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 1.125rem;   /* Std-18 */
  line-height: 1.75;
  letter-spacing: .02em;
  overflow-wrap: break-word;
  font-feature-settings: "palt" 0;
}

/* リンク: 下線を必ず残し、色だけに頼らない */
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:visited { color: var(--visited); }
a:hover { color: var(--link-hover); text-decoration-thickness: 3px; }

/* フォーカス: DADSの黄と黒 */
:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  background-color: var(--focus);
  color: #000;
  box-shadow: 0 0 0 2px var(--focus);
  border-radius: 2px;
}

.skip {
  position: absolute; left: var(--s2); top: -10rem;
  padding: var(--s1) var(--s2);
  background: var(--focus); color: #000; font-weight: 700; z-index: 10;
}
.skip:focus { top: var(--s1); }

.wrap { width: 100%; max-width: calc(var(--measure) + 2 * var(--s3)); margin-inline: auto; padding-inline: var(--s3); }
.wrap--wide { max-width: calc(60rem + 2 * var(--s3)); }

/* ヘッダー */
.site-head { border-top: 8px solid var(--key); border-bottom: 1px solid var(--gray-200); background: #fff; }
.site-head__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s4); padding-block: var(--s2); }
.site-name { font-size: 1.25rem; font-weight: 700; line-height: 1.4; color: var(--gray-900); text-decoration: none; }
.site-name:visited { color: var(--gray-900); }
.site-name:hover { color: var(--key); text-decoration: underline; text-decoration-thickness: 3px; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 var(--s3); margin: 0; padding: 0; list-style: none; }
.site-nav a { display: inline-block; padding-block: .625rem; line-height: 1.5; font-size: 1rem; }

/* パンくず */
.crumbs { padding-block: var(--s2) 0; font-size: 1rem; line-height: 1.5; }
.crumbs ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "›"; margin-inline: .5em; color: var(--gray-536); }
.crumbs [aria-current] { color: var(--gray-700); }

/* 見出し。下の階層ほど余白を詰める */
h1, h2, h3 { font-weight: 700; color: var(--gray-900); }
h1 { margin: var(--s3) 0 var(--s2); font-size: 2.25rem; line-height: 1.4; letter-spacing: .01em; }
h2 { margin: var(--s8) 0 var(--s3); padding-top: var(--s3); border-top: 1px solid var(--gray-900); font-size: 1.625rem; line-height: 1.5; }
h3 { margin: var(--s5) 0 var(--s2); font-size: 1.25rem; line-height: 1.5; }

p { margin: 0 0 var(--s3); }
ul, ol { margin: 0 0 var(--s3); padding-left: 1.5em; }
li { margin-bottom: var(--s1); }
li::marker { font-weight: 700; }
strong { font-weight: 700; }

/* 記事の冒頭 */
.meta { margin: 0 0 var(--s4); color: var(--gray-700); font-size: 1rem; line-height: 1.6; }
.lead > p:last-child { margin-bottom: var(--s4); }

/* この記事の内容 */
.toc { margin: var(--s4) 0 0; padding: var(--s3); background: var(--gray-50); border-radius: 8px; }
.toc h2 { margin: 0 0 var(--s1); padding: 0; border: 0; font-size: 1.125rem; line-height: 1.6; }
.toc ol { margin: 0; padding-left: 1.5em; }
.toc li { margin-bottom: 0; }
.toc a { display: inline-block; padding-block: .3125rem; line-height: 1.6; }

/* 写真 */
figure { margin: var(--s4) 0; }
figure img { display: block; max-width: 100%; width: auto; height: auto; max-height: 26rem; border-radius: 4px; }
figcaption { margin-top: var(--s1); color: var(--gray-700); font-size: .875rem; line-height: 1.6; }

/* 表: 上寄せ・左寄せ・見出しは太字で黒罫線。幅が足りなければ領域内で横に動かす */
.table-box { margin: var(--s4) 0; }
.table-hint { display: none; margin: 0 0 var(--s1); color: var(--gray-700); font-size: 1rem; line-height: 1.5; }
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* 続きがあるときだけ端に影が出る */
  background:
    linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left center / 2.5rem 100% no-repeat local,
    linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right center / 2.5rem 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.28), rgba(0,0,0,0)) left center / .875rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.28), rgba(0,0,0,0)) right center / .875rem 100% no-repeat scroll;
}
table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.7; }
th, td { padding: .875rem var(--s2) .875rem 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--gray-536); }
th + th, td + td { padding-left: var(--s2); }
thead th { font-weight: 700; border-bottom: 2px solid #000; }
.table-box--wide tbody td:first-child { font-weight: 700; }
tbody tr:last-child td { border-bottom: 1px solid #000; }

/* 記事の一覧 */
.list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--gray-536); }
.list li { margin: 0; border-bottom: 1px solid var(--gray-536); }
.list a { display: block; padding-block: var(--s3); text-decoration: none; color: inherit; }
.list a:visited .list__title { color: var(--visited); }
.list__title { display: block; color: var(--link); font-size: 1.25rem; font-weight: 700; line-height: 1.5; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.list a:hover .list__title { color: var(--link-hover); text-decoration-thickness: 3px; }
.list__text { display: block; margin-top: var(--s1); color: var(--gray-900); font-size: 1rem; line-height: 1.75; }
.list a:focus-visible .list__title, .list a:focus-visible .list__text { color: #000; }

/* トップの冒頭 */
.hero { padding-block: var(--s4) var(--s5); background: var(--key-bg); }
.hero h1 { margin-top: 0; }
.hero p { margin-bottom: 0; max-width: var(--measure); }
.section-title { margin-top: var(--s5); }

/* 読む前の案内・関連記事 */
.next { margin-top: var(--s8); }
.next h2 { margin-top: 0; }
.sources { font-size: 1rem; }
.sources li { overflow-wrap: anywhere; }
h2#sources { font-size: 1.25rem; }

/* フッター */
.site-foot { margin-top: var(--s8); padding-block: var(--s4); background: var(--gray-50); border-top: 1px solid var(--gray-200); font-size: 1rem; line-height: 1.6; }
.site-foot ul { display: flex; flex-wrap: wrap; gap: 0 var(--s3); margin: 0 0 var(--s2); padding: 0; list-style: none; }
.site-foot li { margin: 0; }
.site-foot li a { display: inline-block; padding-block: .625rem; }
.site-foot p { margin: 0; color: var(--gray-700); }

/* DADSのブレークポイント 768px */
@media (max-width: 767.98px) {
  .wrap, .wrap--wide { padding-inline: var(--s2); }
  h1 { font-size: 1.75rem; line-height: 1.45; letter-spacing: .02em; }
  h2 { margin-top: var(--s5); font-size: 1.5rem; }
  .site-head__in { padding-block: .75rem; }
  .table-box--wide .table-hint { display: block; }
  .table-box--wide table { min-width: 40rem; }
  .table-scroll:focus-visible { background-color: #fff; }
  figure img { max-height: 22rem; }
}

@media print {
  .site-head, .site-foot, .toc, .next, .skip { display: none; }
  body { font-size: 11pt; }
  a { color: #000; }
}
