@charset "utf-8";

/* ============================================================
   株式会社Ｙ’ｚコーポレーション　サイト共通スタイル

   色は四つ。文字色・背景色・罫線色・基調の色。
   基調の色は、リンクと現在位置の標識にしか用いない。
   階層は、文字の大きさ・太さと余白で作る。罫は表と区切りのみ。
   動きは、スクロール駆動アニメーションによる。
   対応しない環境では動かないだけで、内容はそのまま読める。
   ============================================================ */

:root {
  --c-text:        #2b2b2b;
  --c-bg:          #ffffff;
  --c-rule:        #eeece9;
  --c-rule-strong: #9b9891;
  --c-key:         #1e3d5c;
  --c-shadow:   rgba(43, 43, 43, 0.13);   /* 文字色の薄い影。横送りの手がかりにのみ用いる */
  --c-bg-clear: rgba(255, 255, 255, 0);   /* 背景色の透明。transparent だと灰色に転ぶ */

  /* 三区分の色。頁をまたいで同じ分類に同じ色を当てる。
     色だけで区別させない。語と記号を必ず併記する。 */
  --c-ok:   #2f6b45;   /* 可　　　　彩度を抑えた緑 */
  --c-cond: #8a5a12;   /* 条件付き可　彩度を抑えた橙 */
  --c-no:   #5f5f5f;   /* 不可　　　灰 */

  --c-head: #f7f6f4;   /* 表の見出し行の地色。罫線色をさらに薄めたもの */

  --font:
    "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "BIZ UDPGothic",
    "Yu Gothic Medium", "Yu Gothic",
    "Noto Sans JP", sans-serif;

  /* 大きく組む数値のための欧文書体。和文書体を含めない */
  --font-num:
    "Helvetica Neue", Helvetica, Arial,
    "Segoe UI", Roboto, sans-serif;

  --measure: 40em;       /* 本文の行長。全角約40字 */
  --content: 46rem;      /* 本文の欄 */
  --rail:    15rem;      /* 節の一覧の欄 */
  --page:    calc(46rem + 3.5rem);  /* 頁全体。節の一覧が出る幅で広げる */
  --masth:   4.25rem;    /* 追従する頭書きの高さの目安 */
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 1.0625rem;   /* 17px */
  line-height: 1.9;
}

.layout {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 1.75rem;
}

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { position: static; display: inline-block; padding: 0.5em 0; }

/* 小さな標識　本文の〇・七五倍、字間を広く */
.tag {
  font-size: 0.8rem;
  line-height: 1.7;
  letter-spacing: 0.14em;
}

/* ---------- 頭書き　下へ送ると小さくなり、上端に留まる ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--c-bg);
  padding: 2.25rem 0 1.5rem;
}

.masthead .layout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

.masthead__name {
  margin: 0;
  max-width: none;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.masthead__name a { color: inherit; text-decoration: none; }
.masthead__name a:hover { text-decoration: underline; text-underline-offset: 0.25em; }

/* いま読んでいる節。JavaScriptが動くときだけ出す */
.nowsec {
  margin: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html:not(.js) .nowsec { display: none; }

/* 節の一覧が出る画面では、頭書きの節名は重複するので出さない */
@media (min-width: 66em) { .nowsec { display: none; } }

/* ---------- 頁の一覧 ---------- */

.pagenav { padding: 0 0 0.5rem; }

.pagenav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.15rem 2.25rem;
}
.pagenav li { margin: 0; max-width: none; }
.pagenav a, .pagenav .is-current { font-size: 0.875rem; line-height: 1.9; }
.pagenav a { color: var(--c-key); text-decoration: underline;
             text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
.pagenav .is-current {
  font-weight: 700; color: var(--c-text);
  text-decoration: underline; text-decoration-color: var(--c-key);
  text-decoration-thickness: 2px; text-underline-offset: 0.35em;
}
.pagenav .n { padding-right: 0.5em; }

/* ---------- 頁の骨組み ---------- */

.frame { display: grid; grid-template-columns: minmax(0, var(--content)); }

@media (min-width: 66em) {
  :root { --page: 63.5rem; }
  .frame {
    grid-template-columns: var(--rail) minmax(0, var(--content));
    gap: 0 2.5rem;
  }
}

/* 節の一覧　広い画面でのみ */
.toc { display: none; }

@media (min-width: 66em) {
  .toc {
    display: block;
    position: sticky;
    top: var(--masth);
    align-self: start;
    padding-top: 0.6rem;
  }
  .toc p { margin: 0 0 0.9rem; max-width: none; }
  .toc ol { list-style: none; margin: 0; padding: 0; }
  .toc li { margin: 0 0 0.55rem; max-width: none; }
  .toc a {
    display: block;
    font-size: 0.8125rem;
    line-height: 1.7;
    color: var(--c-text);
    text-decoration: none;
    padding-left: 0.9rem;
    text-indent: -0.9rem;
  }
  .toc a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
  .toc a[aria-current] { font-weight: 700; color: var(--c-key); }
  .toc a[aria-current]::before { content: "―"; padding-right: 0.25em; }
  .toc a::before { content: ""; display: inline-block; width: 0.9rem; }
}

main { padding-top: 4.5rem; }

/* ---------- 見出し ---------- */

h1 {
  font-size: 2.625rem;        /* 本文の二・五倍 */
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 2.75rem;
  max-width: 22em;
}

/* 題が二つのまとまりからなる頁（三頁〜五頁）。
   まとまりの途中で折り返さない。あいだの余白は全角空白でなくCSSで与える */
h1 .title-part { display: inline-block; }
h1 .title-part:not(:last-child) { margin-right: 0.5em; }

h2 {
  font-size: 1.25rem;
  line-height: 1.8;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 5.5rem 0 1.85rem;     /* 直前の余白は直後の三倍 */
  max-width: var(--measure);
  scroll-margin-top: calc(var(--masth) + 1rem);
}

main > h2:first-of-type { margin-top: 0; }

h3 {
  font-size: 1.0625rem;
  line-height: 1.8;
  font-weight: 700;
  margin: 3rem 0 1rem;
  max-width: var(--measure);
  scroll-margin-top: calc(var(--masth) + 1rem);
}

/* ---------- 本文 ---------- */

p, li { max-width: var(--measure); }
p { margin: 0 0 1.6em; }
strong { font-weight: 700; }

a {
  color: var(--c-key);
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
  transition: text-decoration-thickness 140ms ease-out,
              text-underline-offset 140ms ease-out;
}
a:hover, a:focus { text-decoration-thickness: 2px; text-underline-offset: 0.18em; }

/* ---------- 大きく組む数値 ---------- */

.stats {
  list-style: none;
  margin: 2.5rem 0 4rem;
  padding: 0;
  max-width: none;
  display: grid;
  gap: 2.75rem 2.5rem;
}

@media (min-width: 44em) {
  .stats { grid-template-columns: repeat(3, 1fr); gap: 0 2rem; }
}

.stats li { margin: 0; max-width: none; }

.stat__num {
  margin: 0;
  max-width: none;
  font-family: var(--font-num);
  font-size: clamp(2.25rem, 5.4vw, 3rem);   /* 本文の三倍弱。三等分の欄に収める */
  line-height: 1.1;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.stat__unit {
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding-left: 0.35em;
  color: var(--c-key);
}

.stat__label {
  margin: 0.9rem 0 0;
  max-width: none;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.7;
  padding-top: 0.7rem;
  border-top: 1px solid var(--c-rule-strong);
}

.stat__note {
  margin: 0.35rem 0 0;
  max-width: none;
  font-size: 0.875rem;
  line-height: 1.8;
}

.stat__date { margin: 0.5rem 0 0; max-width: none; }

/* ---------- 表 ---------- */

.tablewrap { margin: 2.5rem 0; }

/* 見出しの直後に来るときは、見出しの下の余白に任せる */
h2 + .tablewrap, h3 + .tablewrap,
h2 + figure,     h3 + figure,
h2 + h3 { margin-top: 0; }

table { width: 100%; border-collapse: collapse;
        font-size: 0.9375rem; line-height: 1.9; }

caption { text-align: left; font-weight: 700; line-height: 1.8; padding-bottom: 0.75rem; }

th, td {
  text-align: left; vertical-align: top;
  padding: 0.9em 0.75em;          /* 列と列のあいだは1.5em */
  border-bottom: 1px solid var(--c-rule);
}
th:first-child, td:first-child { padding-left: 0; }
th:last-child,  td:last-child  { padding-right: 0; }

thead th {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  padding-top: 0.7em; padding-bottom: 0.7em;
  background: var(--c-head);
  border-bottom: 1px solid var(--c-rule-strong);
}
/* 見出し行の文字は、本文の左端に揃える */
thead th:first-child { padding-left: 0; }
thead th:last-child  { padding-right: 0; }

tbody th { font-weight: 700; }

/* 触れたとき、背景がごく薄く変わる */
tbody tr { transition: background-color 120ms ease-out; }
tbody tr:hover { background-color: color-mix(in srgb, var(--c-rule) 45%, var(--c-bg)); }

.t-def tbody th { width: 34%; }
.t-matrix tbody th { width: 26%; }

/* 語が短い列は、幅を詰めて折り返さない */
th.w-narrow, td.w-narrow { width: 6.5rem; white-space: nowrap; }
.t-matrix tbody th.w-narrow { width: 6.5rem; }
/* 幅の指定を効かせるため、列幅の割り付けを固定にする */
.t-data, .t-groups { table-layout: fixed; }

/* 数値の表は、行見出しと数値が離れないよう欄を狭くする */
.t-data { max-width: 26rem; }

.t-data td.num, .t-data th.num {
  width: 30%;
  text-align: right; font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* 三つの群の表　四列。中身の量に応じて幅を配る */
.t-groups thead th:first-child,
.t-groups tbody th { width: 12%; }
.t-groups .c-what  { width: 26%; }
.t-groups .c-cost  { width: 30%; }
.t-groups .c-wait  { width: 32%; }
.t-compare thead th { text-align: center; }
.t-compare thead th:first-child { text-align: left; }
.t-compare td.mark { text-align: center; }
.t-compare tbody th { width: 28%; }

.legend { margin: 1rem 0 0; max-width: none; font-size: 0.875rem; line-height: 1.9; }
.legend dl { margin: 0; display: flex; flex-wrap: wrap; gap: 0.1em 2rem; }
.legend dl > div { display: flex; align-items: baseline; gap: 0.6em; }
.legend dt { font-weight: 700; margin: 0; min-width: 1.2em; }
.legend dd { margin: 0; }

/* ---------- 三区分の表示　四頁・五頁で用いる ---------- */
/* 色は補助。語と記号を必ず併記する */

.j-ok   { color: var(--c-ok); }
.j-cond { color: var(--c-cond); }
.j-no   { color: var(--c-no); }

.m { font-weight: 700; font-size: 1.15em; }
.m-ok   { color: var(--c-ok); }
.m-cond { color: var(--c-cond); }
.m-no   { color: var(--c-no); }

.t-judge tbody th .j-ok,
.t-judge tbody th .j-cond,
.t-judge tbody th .j-no { font-weight: 700; }

.legend .j-ok, .legend .j-cond, .legend .j-no { font-weight: 700; }

/* ---------- アイコン ---------- */
/* 線画。基調の色一色。意味は必ず語でも示す */

.icon {
  display: block;
  width: 48px;
  height: 48px;
  color: var(--c-key);
  flex: 0 0 auto;
}

.icon svg { display: block; width: 100%; height: 100%; }

.pagemark { margin: 0 0 1.25rem; }

td.mark-icon, th.mark-icon { width: 3.5rem; padding-left: 0; }
.icon--sm { width: 40px; height: 40px; }

/* ---------- 語と説明の並び　六頁の概要で用いる ---------- */

.deflist { margin: 1.5rem 0 2.5rem; max-width: var(--measure); }
.deflist > div { display: flex; flex-wrap: wrap; gap: 0 1.5em; margin-bottom: 0.7em; }
.deflist dt { margin: 0; font-weight: 700; min-width: 5em; }
.deflist dd { margin: 0; }

/* ---------- 図 ---------- */

figure {
  margin: 5rem 0 2.5rem;   /* 下は表と同じ間隔にする */
  scroll-margin-top: calc(var(--masth) + 1rem);
}
figure .figbody svg, figure .figbody img {
  display: block; width: 100%; height: auto; color: var(--c-text);
}
figcaption { font-size: 0.8125rem; line-height: 1.9; margin-top: 1.75rem; max-width: var(--measure); }
figcaption .figno { font-weight: 700; padding-right: 0.7em; }
.scrollnote { display: none; }

/* ---------- 前後の頁 ---------- */

.seq { margin: 5.25rem 0 0; display: grid; gap: 2rem; }
.seq__item { min-width: 0; }

@media (min-width: 44em) {
  .seq--pair { grid-template-columns: 1fr 1fr; gap: 0 2.5rem; }
}
.seq p { margin: 0; max-width: none; }
.seq .label { margin-bottom: 0.25rem; }
.seq a { font-size: 1.0625rem; font-weight: 700; }

/* ---------- 脚書き ---------- */

.colophon {
  border-top: 1px solid var(--c-rule);
  margin-top: 6rem;
  padding: 2rem 0 5rem;
  font-size: 0.8125rem;
  line-height: 1.9;
}
.colophon p { margin: 0 0 0.3em; max-width: none; }

/* ============================================================
   動き
   ============================================================ */

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes mast-shrink {
  to { padding-top: 0.6rem; padding-bottom: 0.6rem;
       box-shadow: 0 1px 0 var(--c-rule); }
}

@media (prefers-reduced-motion: no-preference) {

  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise 300ms ease-out both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }

  @supports (animation-timeline: scroll()) {
    .masthead {
      animation: mast-shrink linear both;
      animation-timeline: scroll(root);
      animation-range: 0 150px;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
  a, tbody tr { transition: none; }
}

/* ============================================================
   狭い画面
   ============================================================ */

@media (max-width: 40em) {

  body { font-size: 1rem; line-height: 1.85; }
  .layout { padding: 0 1.25rem; }

  /* 狭い画面では追従させない。図や表に重なって、送っている途中で隠れるため */
  .masthead { position: static; padding: 1.5rem 0 1rem; }
  /* 社名と並べる幅がない。節は、下へ送れば見出しで分かる */
  .nowsec { display: none; }

  .pagenav ul { gap: 0.1rem 1.5rem; }

  main { padding-top: 3rem; }

  h1 { font-size: clamp(1.625rem, 8.4vw, 2.25rem); margin: 0 0 2.25rem; line-height: 1.35; }
  h2 { font-size: 1.1875rem; margin: 4.2rem 0 1.4rem; }
  h3 { font-size: 1rem; margin: 2.5rem 0 0.9rem; }

  .stats { margin: 2rem 0 3.5rem; gap: 2.25rem 0; }
  .stat__num { font-size: 2.75rem; }

  figure { margin: 3.5rem 0 2rem; }
  figcaption { margin-top: 1.25rem; }
  /* 図は縮めすぎず、枠の中で横に送る。
     左右の影は、送れることを触る前に示すためのもの。
     background-attachment: local と scroll の組み合わせで、
     送りきった側の影が自然に消える。 */
  figure .figbody {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    background-image:
      linear-gradient(var(--c-bg), var(--c-bg)),
      linear-gradient(var(--c-bg), var(--c-bg)),
      linear-gradient(to right,  var(--c-shadow), var(--c-bg-clear)),
      linear-gradient(to left,   var(--c-shadow), var(--c-bg-clear));
    background-position: 0 0, 100% 0, 0 0, 100% 0;
    background-repeat: no-repeat;
    background-size: 10px 100%, 10px 100%, 10px 100%, 10px 100%;
    background-attachment: local, local, scroll, scroll;
  }

  figure .figbody:focus-visible { outline: 2px solid var(--c-key); outline-offset: 2px; }

  figure .figbody svg { width: 36rem; max-width: none; }
  .scrollnote { display: block; margin: 0.5rem 0 0; max-width: none;
                font-size: 0.75rem; line-height: 1.7; }

  /* 三列以上の表は、行ごとに縦積みにする */
  table.stack thead {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  table.stack tr { display: block; padding: 1.2em 0 1.3em;
                   border-bottom: 1px solid var(--c-rule); }
  /* 縦積みのときは、列幅の指定をすべて解除する。
     .c-what などの二重クラスが残ると、極端に狭い幅で折れる */
  table.stack { table-layout: auto; }
  table.stack th, table.stack td {
    display: block; padding: 0; border: 0;
    width: auto !important;
    white-space: normal;
  }
  table.stack tbody th { font-size: 1.0625em; margin-bottom: 0.7em; }
  table.stack tbody tr:last-child td { border-bottom: 0; }
  table.stack td { margin-bottom: 0.9em; }
  table.stack td:last-child { margin-bottom: 0; }
  table.stack td.num, table.stack td.mark { text-align: left; }
  table.stack td[data-label]::before {
    content: attr(data-label); display: block; font-weight: 700;
    font-size: 0.75rem; letter-spacing: 0.1em; line-height: 1.7;
  }
  /* 値が短い欄は、列の見出しと同じ行に置く */
  table.stack td.mark[data-label]::before,
  table.stack td.short[data-label]::before { display: inline-block; padding-right: 0.7em; }

  table:not(.stack) th, table:not(.stack) td { padding: 0.8em 0.8em; }
  table:not(.stack) th:first-child, table:not(.stack) td:first-child { padding-left: 0; }
  table:not(.stack) th:last-child,  table:not(.stack) td:last-child  { padding-right: 0; }
  .t-def tbody th { width: 30%; }
}

/* ---------- 印刷 ---------- */

@media print {
  .pagenav, .skip, .seq, .toc, .nowsec { display: none; }
  .masthead { position: static; }
  body { font-size: 10.5pt; line-height: 1.7; }
  a { color: inherit; text-decoration: none; }
  .reveal { animation: none; opacity: 1; }
  figure { break-inside: avoid; }
}
