/*
 * ニュース（/news/）の見た目。一覧・カテゴリ一覧・記事ページで共用する。
 *
 * デザイン: Figma PErjKt90phR15m35Ce1yve（v1）。DS v1.1 のトークンに準拠。
 * ヘッダー・フッターはサイト共通の common.css が担当し、このファイルは
 * その間のコンテンツだけを扱う。クラスは n- 接頭辞（common.css の l- / u- と衝突させない）。
 *
 * ⚠️ common.css は html { font-size: 62.5% } と全要素のリセット
 *    （margin/padding 0・リストの list-style なし・a は color:inherit）を持つ。
 *    rem はその 62.5% 基準になるので、このファイルは px で書いている。
 *    本文（.n-body）では、リセットで消えたリストの行頭記号や余白をここで戻している。
 *
 * ⚠️ Web フォントは読み込まない（2026-10-08 デザイナー確認済み）。
 *    common.css の body は "Noto Sans JP" 指定だが、読み込まなければ環境依存の
 *    フォールバックになるため、ページ全体を DS のシステムフォントスタックに寄せる。
 */

:root {
  --n-text-primary: #212121;
  --n-text-muted: #666;
  --n-text-inverse: #fff;
  --n-action: #0049bb;
  --n-action-hover: #003077;
  --n-focus: #998a00;
  --n-border: #d2d2d2;
  --n-border-subtle: #e5e5e5;
  --n-surface-base: #fff;
  --n-surface-canvas: #f7f7f7;
  --n-font: Helvetica, Roboto, Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

body {
  font-family: var(--n-font);
}

/* ---------------------------------------------------------------
 * ページ枠
 * 共通ヘッダーは position: fixed なので、その高さ分だけ下げる。
 * 値は common.css の .l-header の height と同じ（PC 80 / タブレット 70 / SP 16.53vw）。
 * ------------------------------------------------------------- */
.n-page {
  padding-top: 80px;
  color: var(--n-text-primary);
  font-size: 16px;
  line-height: 1.7;
  word-break: break-word;
  overflow-wrap: anywhere;
}

@media screen and (max-width: 1024px) and (min-width: 769px) {
  .n-page { padding-top: 70px; }
}

@media screen and (max-width: 768px) {
  .n-page { padding-top: 16.5333333333vw; }
}

.n-container {
  max-width: 1120px; /* 1072 + 左右 24 */
  margin: 0 auto;
  padding: 0 24px;
}

.n-container--narrow {
  max-width: 848px; /* 800 + 左右 24 */
}

/* リンク・フォーカスの共通状態（仕様メモ「状態」） */
.n-page a:focus-visible {
  outline: 4px solid var(--n-focus);
  outline-offset: 0;
  border-radius: 4px;
}

.n-link {
  color: var(--n-action);
  text-decoration: underline;
}

.n-link:hover {
  color: var(--n-action-hover);
}

/* ---------------------------------------------------------------
 * パンくず
 * ------------------------------------------------------------- */
.n-breadcrumb__list {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.n-breadcrumb__item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

/* 区切りは2つ目以降の項目の前に出す */
.n-breadcrumb__item + .n-breadcrumb__item::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  background: url(/news/assets/images/icons/chevron-right.svg) no-repeat center / 24px 24px;
}

.n-breadcrumb__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 8px;
  color: var(--n-action);
  text-decoration: underline;
}

.n-breadcrumb__link:hover {
  color: var(--n-action-hover);
}

/* 現在ページ。記事名は長いので1行で省略する */
.n-breadcrumb__item--current {
  flex-shrink: 1;
  overflow: hidden;
}

.n-breadcrumb__current {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media screen and (max-width: 768px) {
  .n-breadcrumb { font-size: 14px; }
  /* 記事ページの SP は現在ページ名を省く（仕様メモ「レイアウト」）。aria-current は残す */
  .n-breadcrumb--article .n-breadcrumb__item--current {
    display: none;
  }
}

/* ---------------------------------------------------------------
 * 一覧の見出し帯
 * ------------------------------------------------------------- */
.n-heading {
  background: var(--n-surface-canvas);
  padding: 16px 0 56px;
}

.n-heading__body {
  margin-top: 24px;
}

.n-heading__eyebrow {
  color: var(--n-action);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.75;
}

.n-heading__title {
  margin-top: 12px;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.4;
}

.n-heading__lead {
  margin-top: 12px;
  color: var(--n-text-muted);
}

@media screen and (max-width: 768px) {
  .n-heading { padding: 8px 0 40px; }
  .n-heading__body { margin-top: 16px; }
  .n-heading__title { margin-top: 8px; font-size: 28px; line-height: 1.5; }
  .n-heading__lead { margin-top: 8px; font-size: 14px; line-height: 1.75; }
}

/* ---------------------------------------------------------------
 * カテゴリタブ
 * ------------------------------------------------------------- */
.n-tabs {
  padding-top: 40px;
}

.n-tabs__bar {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--n-border);
}

.n-tabs__list {
  display: flex;
  flex: 1 0 auto;
}

.n-tabs__link {
  position: relative;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 16px;
  white-space: nowrap;
}

.n-tabs__link:hover {
  color: var(--n-action-hover);
}

.n-tabs__link[aria-current="page"] {
  color: var(--n-action);
  font-weight: 700;
}

.n-tabs__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--n-action);
}

.n-ir-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 48px;
  padding: 0 8px;
  color: var(--n-action);
  font-size: 14px;
  line-height: 1.75;
  text-decoration: underline;
  white-space: nowrap;
}

.n-ir-link:hover {
  color: var(--n-action-hover);
}

.n-ir-link::after {
  content: "";
  width: 16px;
  height: 16px;
  background: url(/news/assets/images/icons/open-in-new.svg) no-repeat center / 16px 16px;
}

@media screen and (max-width: 768px) {
  .n-tabs { padding-top: 24px; }
  /* タブは横スクロール。IR リンクはタブの下に右寄せで出す */
  .n-tabs__bar {
    display: block;
    border-bottom: 0;
  }
  .n-tabs__list {
    overflow-x: auto;
    margin: 0 -24px;
    padding: 0 24px;
    border-bottom: 1px solid var(--n-border);
    scrollbar-width: none;
  }
  .n-tabs__list::-webkit-scrollbar { display: none; }
  .n-tabs__ir {
    display: flex;
    justify-content: flex-end;
  }
  .n-ir-link { padding: 0; }
}

/* ---------------------------------------------------------------
 * 記事一覧（行リスト）
 * ------------------------------------------------------------- */
.n-list {
  padding-top: 8px;
}

.n-list__item {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--n-border);
}

.n-list__thumb {
  flex-shrink: 0;
  display: block;
  width: 240px;
  aspect-ratio: 240 / 126;
  overflow: hidden;
  border: 1px solid var(--n-border-subtle);
  border-radius: 8px;
  background: var(--n-surface-canvas);
}

.n-list__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .3s;
}

/* アイキャッチ未設定。淡いグレー面にロゴの原形を置く（Figma: 幅46%・中央） */
.n-list__thumb--noimage {
  display: flex;
  align-items: center;
  justify-content: center;
}

.n-list__thumb--noimage img {
  width: 46%;
  height: auto;
  object-fit: contain;
}

.n-list__body {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.n-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  font-size: 14px;
  line-height: 1.75;
}

.n-meta__date {
  color: var(--n-text-muted);
}

.n-meta__category {
  color: var(--n-action);
  font-weight: 700;
}

a.n-meta__category {
  text-decoration: underline;
}

a.n-meta__category:hover {
  color: var(--n-action-hover);
}

.n-list__title {
  color: var(--n-action);
  font-size: 18px;
  line-height: 1.6;
  text-decoration: underline;
}

/* タイトルとサムネイルのどちらに乗っても両方の状態を変える（仕様メモ「状態」） */
.n-list__item:has(a:hover) .n-list__title {
  color: var(--n-action-hover);
}

.n-list__item:has(a:hover) .n-list__thumb img {
  opacity: .7;
}

.n-list__empty {
  padding: 40px 0;
  color: var(--n-text-muted);
}

@media screen and (max-width: 768px) {
  .n-list { padding-top: 0; }
  .n-list__item {
    align-items: flex-start;
    gap: 16px;
    padding: 20px 0;
  }
  .n-list__thumb { width: 120px; }
  .n-list__body { gap: 4px; }
  .n-list__title { font-size: 16px; line-height: 1.7; }
}

/* ---------------------------------------------------------------
 * ページ送り
 * ------------------------------------------------------------- */
.n-pager {
  padding: 48px 0 104px;
}

.n-pager__list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.n-pager__link,
.n-pager__current,
.n-pager__disabled,
.n-pager__ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  border-radius: 8px;
}

.n-pager__link {
  color: var(--n-action);
}

.n-pager__link:hover {
  background: var(--n-surface-canvas);
}

.n-pager__current {
  background: var(--n-action);
  color: var(--n-text-inverse);
  font-weight: 700;
}

.n-pager__disabled,
.n-pager__ellipsis {
  color: var(--n-text-muted);
}

/* 前へ・次へは 72×48 */
.n-pager__item--step > * {
  min-width: 72px;
}

@media screen and (max-width: 768px) {
  .n-pager { padding: 32px 0 72px; }
  /* SP は現在ページの近く3つだけ（仕様メモ「状態」） */
  .n-pager__item--pc { display: none; }
}

/* ---------------------------------------------------------------
 * 記事ページ
 * ------------------------------------------------------------- */
.n-article-breadcrumb {
  padding-top: 16px;
}

.n-article__header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--n-border);
}

.n-article__title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.5;
}

.n-article__lead {
  color: var(--n-text-muted);
  font-size: 18px;
  line-height: 1.6;
}

@media screen and (max-width: 768px) {
  .n-article-breadcrumb { padding-top: 8px; }
  .n-article__header { margin-top: 24px; padding-bottom: 24px; }
  .n-article__title { font-size: 24px; }
  .n-article__lead { font-size: 16px; line-height: 1.7; }
}

/* ---------------------------------------------------------------
 * 記事本文（Markdown の出力）
 * 記事ファイルは素の要素だけを持つので、要素セレクタで当てる。
 * ブロック間は 24px（Figma の Body の gap）。見出しは上にだけ余白を足す。
 * ------------------------------------------------------------- */
.n-body {
  padding-top: 40px;
}

.n-body > * + * {
  margin-top: 24px;
}

.n-body h2 {
  padding: 32px 0 12px;
  border-bottom: 1px solid var(--n-border);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
}

.n-body h3 {
  padding-top: 16px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

.n-body h4 {
  padding-top: 16px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
}

/* h5 は Figma に無い（117・196 の2記事だけ）。h4 より一段小さい太字にする */
.n-body h5,
.n-body h6 {
  padding-top: 8px;
  font-size: 16px;
  font-weight: 700;
}

.n-body a {
  color: var(--n-action);
  text-decoration: underline;
}

.n-body a:hover {
  color: var(--n-action-hover);
}

.n-body strong {
  font-weight: 700;
}

.n-body ul,
.n-body ol {
  padding-left: 1.5em;
}

.n-body ul { list-style: disc; }
.n-body ol { list-style: decimal; }

.n-body li + li {
  margin-top: 4px;
}

.n-body li > ul,
.n-body li > ol {
  margin-top: 4px;
}

.n-body blockquote {
  padding: 16px 24px;
  border-left: 4px solid var(--n-border);
  background: var(--n-surface-canvas);
}

.n-body blockquote > * + * {
  margin-top: 16px;
}

.n-body hr {
  border-top: 1px solid var(--n-border);
}

.n-body img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 本文の CTA（cta ショートコード）。Figma の「CTA（ショートコード cta）」 */
.n-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 56px;
  padding: 0 40px;
  border-radius: 8px;
  background: var(--n-action);
  font-weight: 700;
}

.n-body a.n-cta {
  color: var(--n-text-inverse);
  text-decoration: none;
}

.n-body a.n-cta:hover {
  background: var(--n-action-hover);
  color: var(--n-text-inverse);
}

@media screen and (max-width: 768px) {
  .n-cta { display: flex; width: 100%; padding: 0 16px; }
}

/* ---------------------------------------------------------------
 * 記事フッター（会社概要・お問い合わせ・シェア・X）
 * ------------------------------------------------------------- */
.n-article-footer {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 56px;
}

.n-profile {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  border-radius: 8px;
  background: var(--n-surface-canvas);
  font-size: 14px;
  line-height: 1.75;
}

.n-profile__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
}

.n-profile__list {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 4px 16px;
}

.n-profile__list dt {
  font-weight: 700;
}

.n-contact {
  padding: 24px;
  border: 1px solid var(--n-border);
  border-radius: 8px;
}

.n-contact__title {
  font-weight: 700;
}

.n-contact__text {
  margin-top: 8px;
}

.n-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  line-height: 1.75;
}

.n-share__label {
  font-weight: 700;
}

.n-share__list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.n-share__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--n-border);
  border-radius: 8px;
  font-weight: 700;
}

.n-share__link:hover {
  background: var(--n-surface-canvas);
}

.n-share__link img {
  width: 16px;
  height: 16px;
}

.n-official {
  font-size: 14px;
  line-height: 1.75;
}

.n-official__link {
  margin-left: 8px;
  color: var(--n-action);
  font-weight: 700;
  text-decoration: underline;
}

.n-official__link:hover {
  color: var(--n-action-hover);
}

@media screen and (max-width: 768px) {
  .n-article-footer { padding-top: 40px; }
  .n-profile { padding: 20px; }
  .n-profile__list { grid-template-columns: 1fr; gap: 0; }
  .n-profile__list dd + dt { margin-top: 4px; }
  .n-official__link { display: inline-block; margin: 8px 0 0; }
}

/* ---------------------------------------------------------------
 * 前後の記事・一覧へ戻る
 * ------------------------------------------------------------- */
.n-prevnext {
  display: flex;
  gap: 32px;
  margin-top: 56px;
  padding: 24px 0;
  border-top: 1px solid var(--n-border);
  border-bottom: 1px solid var(--n-border);
}

.n-prevnext__item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.n-prevnext__item--next {
  align-items: flex-end;
  text-align: right;
}

.n-prevnext__label {
  display: flex;
  gap: 12px;
  color: var(--n-text-muted);
  font-size: 14px;
  line-height: 1.75;
}

.n-prevnext__label b {
  font-weight: 700;
}

.n-prevnext__title {
  color: var(--n-action);
  text-decoration: underline;
}

.n-prevnext__title:hover {
  color: var(--n-action-hover);
}

.n-back {
  display: flex;
  justify-content: center;
  padding: 56px 0 104px;
}

.n-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 56px;
  padding: 0 32px;
  border: 1px solid var(--n-action);
  border-radius: 8px;
  background: var(--n-surface-base);
  color: var(--n-action);
  font-weight: 700;
}

.n-button-secondary:hover {
  background: var(--n-surface-canvas);
  color: var(--n-action-hover);
}

@media screen and (max-width: 768px) {
  .n-prevnext {
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
  }
  .n-prevnext__item--next {
    align-items: flex-start;
    text-align: left;
  }
  /* 前の記事が無いとき（最古の記事）の空枠。PC は次の記事を右に寄せるために要る */
  .n-prevnext__item:empty { display: none; }
  .n-back { padding: 40px 0 72px; }
}
