
@font-face {
  /* 游ゴシックは Regular が細すぎて長文が読めない。**Medium を掴ませる**。
     ウェイト500として登録しておくと、body の font-weight:300 でも
     ブラウザは一番近いこの実体を選ぶ（Light に落ちない）。 */
  font-family: "Site Yu Gothic";
  font-weight: 500;
  src: local("Yu Gothic Medium"), local("YuGothic-Medium");
}
@font-face {
  font-family: "Site Yu Gothic";
  font-weight: bold;
  src: local("Yu Gothic Bold"), local("YuGothic-Bold");
}

:root {
  --ink: #0f131a;
  --ink2: #596580;
  --muted: #8b93a3;
  --line: #dfe3eb;
  --bg: #fff;
  --bg2: #f2f4f7;
  --accent: #0049e5;
  --accent-hover: #000eb1;
  --attention: #e62002;
  --conversion: #ed5300;
  --marker: #fff7ab;
  --font-jp: "Hiragino Sans", "Site Yu Gothic", "Yu Gothic", "Noto Sans JP",
             system-ui, sans-serif;
  --font-en: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: .5rem;
  --radius-sm: .25rem;
  --content: 74rem;   /* ヘッダー・フッターの版面 */
  --main: 48rem;      /* 記事本体（図はここまで広げる） */
  --measure: 40rem;   /* 本文の一行の長さ */
  --rail: 17rem;      /* 目次の柱 */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 300 16px/1.8 var(--font-jp);
  letter-spacing: .01em;
  font-feature-settings: "palt" 1;
  overflow-wrap: anywhere;
  line-break: strict;
  -webkit-font-smoothing: subpixel-antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

/* ---- ヘッダー ------------------------------------------------------- */
.wrap { max-width: var(--content); margin: 0 auto; padding: 0 1.5rem; }
.masthead {
  position: sticky; top: 0; z-index: 200;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.masthead .wrap {
  display: flex; align-items: center; gap: 1rem;
  height: 3.5rem;
}
.masthead .logo {
  font-weight: 700; font-size: 1.02rem; letter-spacing: .02em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.masthead .logo:hover { color: var(--accent); }
.masthead .tag {
  font-size: .75rem; color: var(--muted); line-height: 1.4;
  border-left: 1px solid var(--line); padding-left: 1rem;
}
.masthead .gnav { margin-left: auto; font-size: .8rem; white-space: nowrap; }
.masthead .gnav a { text-decoration: none; font-weight: 600; }
@media (max-width: 46rem) {
  .masthead .tag { display: none; }
}

/* ---- 版面 ----------------------------------------------------------- */
main .wrap { padding-top: 2.4rem; padding-bottom: 4rem; }
/* 記事は「見出し部（.ahead）／本文（article）／目次（.rail）」の3つ。
   狭い画面は 見出し→目次→本文 の縦並び、広い画面は目次を右の柱に立てる。
   HTMLの順番は 見出し→本文→目次（読み上げとタブ移動で本文を先に届ける）で、
   見え方だけを order と grid で入れ替えている。 */
.layout { display: flex; flex-direction: column; max-width: var(--main); }
/* ★これが無いと**横スクロールが出る**。flex/grid の子は既定で min-width:auto の
   ため、`white-space:nowrap` の表を含む article が中身の幅まで広がってしまい、
   スマホで本文が画面からはみ出した（実際に切れた）。 */
.layout > * { min-width: 0; }
.ahead { order: 0; }
.rail { order: 1; }
.layout article { order: 2; }
@media (min-width: 68rem) {
  .layout {
    display: grid; max-width: none;
    grid-template-columns: var(--main) var(--rail);
    gap: 0 3.5rem; align-items: start;
  }
  .ahead { grid-column: 1; grid-row: 1; }
  .layout article { grid-column: 1; grid-row: 2; }
  .rail { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 5rem; }
}

article > p, article > ul, article > ol, article > h2, article > h3,
article > h4, article > blockquote, article > .note, article > .missing {
  max-width: var(--measure);
}

/* ---- 記事の頭 ------------------------------------------------------- */
.label {
  display: inline-block; margin: 0 0 1rem;
  padding: .18rem .6rem; border: 1px solid var(--accent);
  color: var(--accent); background: var(--bg);
  font-size: .74rem; font-weight: 600; line-height: 1.6;
  border-radius: var(--radius-sm); letter-spacing: .04em;
}
h1 {
  font-size: clamp(1.6rem, 3.6vw, 2rem); line-height: 1.5;
  margin: 0 0 1.2rem; font-weight: 700; letter-spacing: 0;
}
.lead {
  font-size: 1.06rem; color: var(--ink2); line-height: 1.85;
  margin: 0 0 1.6rem; max-width: var(--measure);
}
.byline {
  font-size: .78rem; color: var(--muted); font-family: var(--font-en);
  margin: 0 0 2.4rem; padding-bottom: 1.2rem;
  border-bottom: 2px solid var(--ink);
}
.byline span + span::before { content: "／"; margin: 0 .5rem; color: var(--line); }

/* ---- 目次 ----------------------------------------------------------- */
.toc {
  background: var(--bg2); border-radius: var(--radius);
  padding: 1.1rem 1.3rem; margin: 0 0 2.6rem;
}
.toc p {
  margin: 0 0 .6rem; font-size: .72rem; color: var(--ink2);
  letter-spacing: .1em; font-weight: 700;
  padding-bottom: .5rem; border-bottom: 1px solid var(--line);
}
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li {
  font-size: .82rem; line-height: 1.6; margin-bottom: .55rem;
  counter-increment: toc; display: flex; gap: .5rem;
}
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-en); font-size: .7rem; color: var(--muted);
  padding-top: .12rem;
  /* 番号は絶対に折り返させない。flex の縮みに任せると
     2桁が縦に割れて「1 / 3」に見える（実際にそうなった）。 */
  flex: 0 0 auto; white-space: nowrap;
}
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); }
@media (min-width: 68rem) {
  .toc { margin: 0; background: none; padding: 0; }
  .toc p { font-size: .7rem; }
}

/* ---- 本文 ----------------------------------------------------------- */
h2 {
  font-size: 1.4rem; line-height: 1.55; font-weight: 700;
  margin: 3.4rem 0 1.2rem; padding-left: .8rem;
  border-left: 4px solid var(--accent);
}
h3 {
  font-size: 1.12rem; line-height: 1.6; font-weight: 700;
  margin: 2.4rem 0 .8rem;
}
p { margin: 0 0 1.6rem; }
ul, ol { margin: 0 0 1.6rem; padding-left: 1.4rem; }
li { margin-bottom: .5rem; }
strong { font-weight: 700; }
code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .85em; background: var(--bg2); padding: .1em .36em;
  border-radius: var(--radius-sm);
}
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
blockquote {
  margin: 0 0 1.6rem; padding: .2rem 0 .2rem 1.1rem;
  border-left: 3px solid var(--line); color: var(--ink2);
}
blockquote p { margin: 0; }

/* 本文中で強調したい数字 */
.num {
  font-weight: 700;
  background: linear-gradient(transparent 60%, var(--marker) 60%);
  padding: 0 .1em;
}

/* ---- 図 ------------------------------------------------------------- */
figure { margin: 2.6rem 0; }
figure img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--line); border-radius: var(--radius);
}
figcaption {
  font-size: .8rem; color: var(--ink2); line-height: 1.75; margin-top: .7rem;
}
.figtitle {
  display: block; font-weight: 700; color: var(--ink); margin-bottom: .25rem;
  font-size: .84rem;
}
.figlinks {
  display: block; margin-top: .5rem; font-size: .74rem; color: var(--muted);
  font-family: var(--font-en);
}
.figlinks a { color: var(--muted); }

/* ---- 表 ------------------------------------------------------------- */
.tablewrap { overflow-x: auto; margin: 0 0 2rem; }
table { border-collapse: collapse; font-size: .86rem; min-width: 100%; }
th, td {
  padding: .5rem .9rem; border-bottom: 1px solid var(--line);
  line-height: 1.6; vertical-align: top;
  /* ★折り返しを許す。以前は全セル nowrap にしていて、会社概要のような
     文章のセルが**画面の外へ切れた**（横スクロールに逃げるので気づきにくい）。
     数字の列だけ下で nowrap に戻す。 */
  white-space: normal;
}
thead th {
  background: var(--bg2); color: var(--ink2);
  font-size: .76rem; font-weight: 700; text-align: left;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.ta-right { text-align: right; font-variant-numeric: tabular-nums;
             font-family: var(--font-en); white-space: nowrap; }
.ta-center { text-align: center; white-space: nowrap; }
/* 1列目は見出し扱いの短い語が入る（「研究開発費」が2行に割れた）。
   長い語が来たときは .tablewrap の横スクロールに逃がす。 */
tbody td:first-child { white-space: nowrap; }

/* ---- 但し書き ------------------------------------------------------- */
.note {
  background: var(--bg2); border-radius: var(--radius);
  padding: 1rem 1.3rem; margin: 2rem 0;
  font-size: .84rem; color: var(--ink2); line-height: 1.8;
}
.note p { margin: 0 0 .7rem; }
.note p:last-child { margin: 0; }
.missing { color: var(--attention); font-size: .86rem; }

/* ---- 記事末尾の収益導線 ---------------------------------------------
   本文と地続きに見せない。「ここから先は広告」と分かる見た目にする。
   ステマ規制の要件は文言（disclosure）だが、見た目でも切っておく。 */
.cta {
  max-width: var(--main);
  margin: 4rem 0 2rem; padding: 1.6rem 1.8rem;
  background: var(--bg2); border-radius: var(--radius);
  border-top: 3px solid var(--conversion);
}
/* ★セレクタを `.cta p.cta-label` にしているのは、下の `.cta p` に色を
   上書きされて**濃い地色の上に濃い文字**になり、広告表示が消えたため（実際に消えた）。
   規制対応の表示なので、詳細度で確実に勝たせる。 */
.cta p.cta-label {
  display: inline-block; margin: 0 0 .8rem; padding: .2rem .6rem;
  background: var(--ink); color: #fff; border-radius: var(--radius-sm);
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; line-height: 1.6;
}
.cta-h {
  font-size: 1.15rem; line-height: 1.6; margin: 0 0 .8rem;
  border: 0; padding: 0; font-weight: 700;
}
.cta p { font-size: .9rem; line-height: 1.85; margin: 0 0 1.2rem; color: var(--ink2); }
.cta-actions { margin: 0 0 1.2rem; }
.cta-btn {
  display: inline-block; background: var(--conversion); color: #fff;
  padding: .75rem 1.6rem; border-radius: var(--radius); text-decoration: none;
  font-weight: 600; font-size: .95rem; line-height: 1.5;
}
.cta-btn:hover { background: #c74600; color: #fff; }
.cta-note { display: block; margin-top: .6rem; font-size: .78rem; color: var(--muted); }
.cta p.cta-disclosure {
  margin: 0; padding-top: .9rem; border-top: 1px solid var(--line);
  font-size: .76rem; line-height: 1.8; color: var(--ink2);
}

/* ---- トップページ --------------------------------------------------- */
.hero { padding: 2.6rem 0 2.2rem; border-bottom: 1px solid var(--line); }
.hero h1 { max-width: 38rem; font-size: clamp(1.4rem, 3vw, 1.75rem); }
.hero p { max-width: 42rem; color: var(--ink2); margin: 0; font-size: .95rem; }

.sec-head {
  display: flex; align-items: baseline; gap: .8rem;
  margin: 2.6rem 0 0; padding-bottom: .7rem;
  border-bottom: 2px solid var(--ink);
}
.sec-head h2 {
  font-size: 1.1rem; margin: 0; padding: 0; border: 0; font-weight: 700;
}
.sec-head span { font-size: .74rem; color: var(--muted); font-family: var(--font-en); }

/* 記事一覧は横並びのカードではなく、上から下へ読む「行」にする。
   1本ずつの分量が多い読み物なので、並べるより積む方が合う。 */
.feed { margin: 0; }
.feed .row {
  display: grid; grid-template-columns: 15rem 1fr; gap: 1.6rem;
  padding: 1.6rem 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.feed .row:hover h3 { color: var(--accent); }
.feed .thumb {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg2);
}
.feed h3 { font-size: 1.15rem; line-height: 1.55; margin: .2rem 0 .6rem; font-weight: 700; }
.feed .row .label { margin: 0 0 .5rem; }
.feed p { font-size: .86rem; color: var(--ink2); margin: 0; line-height: 1.8; }
.feed .meta {
  font-size: .74rem; color: var(--muted); margin-top: .8rem;
  font-family: var(--font-en);
}
@media (max-width: 46rem) {
  .feed .row { grid-template-columns: 1fr; gap: .9rem; }
  .feed .thumb { aspect-ratio: 16 / 9; }
}

/* ---- フッター ------------------------------------------------------- */
footer {
  border-top: 1px solid var(--line); background: var(--bg2);
  font-size: .78rem; color: var(--ink2); line-height: 1.85;
}
footer .wrap { padding-top: 2rem; padding-bottom: 2.6rem; }
footer p { max-width: 46rem; margin: 0 0 .6rem; }
footer .fnav {
  margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1.4rem; font-size: .8rem;
}
footer .fnav a { color: var(--ink2); text-decoration: none; }
footer .fnav a:hover { color: var(--accent); text-decoration: underline; }
footer .copy { color: var(--muted); font-family: var(--font-en); margin-top: 1rem; }

/* 問い合わせ先。押せることが分かるように大きめに出す */
.contact {
  font-size: 1.05rem; font-weight: 700;
  background: var(--bg2); border-radius: var(--radius);
  padding: 1rem 1.3rem; margin: 1.6rem 0 2rem; max-width: var(--measure);
}

@media (max-width: 46rem) {
  main .wrap { padding-top: 1.8rem; }
  h2 { margin-top: 2.6rem; font-size: 1.24rem; }
}

@media print {
  body { background: #fff; }
  .masthead, .toc, .figlinks, .cta { display: none; }
  figure { break-inside: avoid; }
}
