/* 決算報告（ir.html）専用。css/style.css の後に読む。
   表の行は js/ir.js が API から作り直す（クラスは付かない）ため、列の指定は #ir-reports と
   :nth-child だけで書き、静的行と差し替え後の行で見た目が変わらないようにする。
   法的な開示に近いページなので、枠・影・ゼブラ・行の hover などの装飾は足さない。 */

.ir-main .page-header__eyebrow { margin-top: 20px; }

/* 表と注記だけの節なので、下の余白を一段詰める */
@media (min-width: 769px) {
  .ir-main { --section-pad: var(--space-8); }
}

/* 3 列の短い表を全幅に引き伸ばすと日付が右端に離れるため、リードと同じ行長にそろえる */
.ir-main .table-wrap,
.ir-notes { max-width: var(--measure); }

#ir-reports { font-variant-numeric: tabular-nums; }
#ir-reports th,
#ir-reports td { padding: 16px 24px; }
#ir-reports th { white-space: nowrap; }
/* 日付の途中では折らず、幅が足りないときは会計期間の「〜」の後で折り返す */
#ir-reports td { word-break: keep-all; overflow-wrap: anywhere; }

/* 列見出しは小さく控えめにし、行見出し（期）と見分けられるようにする */
#ir-reports thead th {
  padding-block: 12px;
  font-size: var(--fs-note); font-weight: 600; letter-spacing: .08em;
  color: var(--color-text-muted);
}
/* 768px 以下の共通指定（.table th の 130px 固定）は 3 列の短い表には広すぎるので外す */
#ir-reports th { width: auto; }
#ir-reports tbody th { background: none; }
@media (min-width: 601px) {
  #ir-reports tbody th { width: 8em; }
  #ir-reports th:last-child,
  #ir-reports td:last-child { width: 11em; }
}

/* 狭い幅では 1 行を「期」の下に「会計期間」「掲載日」を並べる形に組み替える。
   見出し文字は列見出しと同じ語を CSS で添える（列見出しは読み上げ用に残す） */
@media (max-width: 600px) {
  #ir-reports thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  #ir-reports,
  #ir-reports tbody,
  #ir-reports tr,
  #ir-reports th,
  #ir-reports td { display: block; }
  #ir-reports tr { padding: 16px 4px; border-bottom: 1px solid var(--color-border); }
  #ir-reports th,
  #ir-reports td { padding: 0; border: 0; white-space: normal; }
  #ir-reports tbody th { margin-bottom: 6px; font-size: var(--fs-body-dense); }
  #ir-reports td {
    display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 12px;
    font-size: var(--fs-small); line-height: 1.9;
  }
  #ir-reports td::before { color: var(--color-text-muted); }
  #ir-reports td:nth-of-type(1)::before { content: "会計期間"; }
  #ir-reports td:nth-of-type(2)::before { content: "掲載日"; }
}
