/* =========================================================
   お知らせ（一覧 / 詳細）固有スタイル
   リストUIは style.css の .news-list 系に準拠（index.html #news と同じ）
   ========================================================= */

/* ページ枠 — .container のパディング（左レール考慮）は style.css に任せる */
.news-page {
  padding: 84px 0 72px;
}
@media (min-width: 768px) {
  .news-page { padding-top: 80px; padding-bottom: 104px; }
}

.news-page__back {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  margin-bottom: 20px;
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--c-mut);
  transition: color .3s var(--ease);
}
.news-page__back:hover { color: var(--c-fg); }

/* 記事詳細 — microCMS 公式ブログ（blog.microcms.io）を参考にした2カラム */
.article-wrap {
  width: 100%;          /* sticky footer 時の flex アイテムが自動マージンで縮まないよう定幅化 */
  max-width: 1080px;
  margin: 0 auto;
  padding: 70px 20px;
}
@media (min-width: 768px) {
  .article-wrap {
    padding-top: 80px;
    padding-bottom: 104px;
    padding-left: calc(var(--rail) + 24px);
    padding-right: 24px;
  }
}

.article-layout {
  display: grid;
  /* 単一カラムでも min-content（パンくずの nowrap 幅）で広がらないよう 0 まで縮める */
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}
@media (min-width: 960px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 56px;
    align-items: start;
  }
}
/* グリッドアイテムの自動最小幅(min-content)を無効化し、内側の overflow:hidden を効かせる */
.article-main { min-width: 0; }

.article-back {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  margin-bottom: 28px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--c-mut);
  transition: color .3s var(--ease);
}
.article-back:hover { color: var(--c-fg); }

/* パンくず — 1 行固定。折り返さず、はみ出したら末尾を … で省略する */
.article-breadcrumb {
  margin-bottom: 20px;
}
.article-breadcrumb__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.5;
  color: var(--c-mut);
  /* inline 要素を 1 行に流し、溢れたぶんを ellipsis でカット */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.article-breadcrumb__item {
  display: inline;
  vertical-align: baseline;
}
.article-breadcrumb__item:not(:last-child)::after {
  content: '>';
  margin: 0 .45em;
  color: #c8c8c4;
}
.article-breadcrumb__item a {
  color: var(--c-mut);
  text-decoration: none;
  transition: color .25s var(--ease);
}
.article-breadcrumb__item a:hover { color: var(--c-fg); }
.article-breadcrumb__item [aria-current="page"] {
  color: var(--c-fg);
  line-height: 1.5;
}

/* カテゴリ（タイトル上のアイブロウ・チップ） */
.article-cat {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 13px;
  border-radius: 999px;
  background: var(--c-fg);
  color: #fff;
  font-family: var(--ff-jp);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.5;
}

/* 記事タイトル — SP 22px → PC 32px の可変 */
.article-title {
  margin: 0 0 18px;
  font-family: var(--ff-jp);
  font-weight: 700;
  font-size: clamp(22px, 4.4vw, 32px);
  line-height: 1.45;
  letter-spacing: .01em;
  color: #1f2024;
}

/* メタ情報 — 公開日 / 更新日 / 著者。本文との間にヘアラインで区切る */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-bottom: 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--c-line);
  font-size: 13px;
  color: var(--c-mut);
}
.article-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}
.article-meta__icon {
  flex: none;
  width: 15px;
  height: 15px;
  color: #9a9a96;
}
.article-meta__item time {
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
/* 著者は広い行では右端に寄せて公開/更新と視覚的に分離 */
@media (min-width: 768px) {
  .article-meta__author { margin-left: auto; }
}

.article-thumb { margin: 0 0 32px; }
.article-thumb img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 0, 0, .08);
}

/* 本文 — 14px / PC 16px。ブロック間は margin-top のみで積む（wysiwyg 準拠） */
.article-body {
  font-size: 14px;
  line-height: 1.85;
  letter-spacing: .02em;
  /* 日本語は自然に改行しつつ、長い英単語/URLだけ折る（break-all の不自然な分断を回避） */
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
}
@media (min-width: 768px) {
  .article-body { font-size: 16px; }
}

/* 直下ブロック — 先頭以外は 1em 空ける */
.article-body > * {
  margin: 1em 0 0;
}
.article-body > *:first-child {
  margin-top: 0;
}

/* 見出し — 上 2em。連続見出し・画像直後は詰める */
.article-body > :is(h2, h3, h4, h5, h6) {
  margin-top: 2em;
  margin-bottom: 0;
  line-height: 1.5;
  font-weight: 700;
}
.article-body > :is(h2, h3, h4, h5, h6) + :is(h2, h3, h4, h5, h6) {
  margin-top: 1em;
}
.article-body > :is(figure, p:has(img:only-child)) + :is(h2, h3, h4, h5, h6) {
  margin-top: 1em;
}

.article-body > h2 {
  padding-bottom: .35em;
  border-bottom: 1px solid var(--c-line);
  font-size: 1.35em;
}
.article-body > h3 {
  font-size: 1.2em;
}
.article-body > h4 {
  font-size: 1.1em;
}
.article-body > h5,
.article-body > h6 {
  font-size: 1em;
}

.article-body a {
  color: var(--c-fg);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.article-body a:hover { text-decoration: none; }

.article-body strong {
  font-weight: 700;
  background: linear-gradient(transparent 92%, rgba(37, 37, 37, .18) 92%);
}

.article-body em { font-style: italic; }

.article-body > :is(figure, p:has(img:only-child), img, video) {
  display: block;
  max-width: 100%;
  margin-top: 2em;
}
.article-body figure img,
.article-body p img,
.article-body img,
.article-body video {
  height: auto;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 0, 0, .08);
}

.article-body > ul {
  padding: 0;
  list-style: none;
}
.article-body ul > li {
  line-height: 2;
}
.article-body ul > li::before {
  content: '-';
  margin-right: 10px;
}

.article-body > ol {
  padding: 0 0 0 1.2em;
  list-style: decimal inside;
}
.article-body ol > li { line-height: 2; }

.article-body > blockquote {
  padding: 1.2em 1.4em;
  border-radius: 3px;
  background: var(--c-card);
  color: var(--c-mut);
}

.article-body > pre {
  padding: 12px 16px;
  border-radius: 3px;
  background: var(--c-card);
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
}
.article-body p > code,
.article-body pre > code {
  padding: 2px 6px;
  border: 1px solid var(--c-line);
  border-radius: 3px;
  background: var(--c-bg);
  font-size: .92em;
}

.article-body > table {
  width: 100%;
  border-collapse: collapse;
}
.article-body table th,
.article-body table td {
  padding: .65em .75em;
  border: 1px solid var(--c-line);
}

.article-body > iframe {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  border: 0;
}

/* サイドバー — 最新の記事 */
.article-aside {
  padding-top: 8px;
}
@media (min-width: 960px) {
  .article-aside {
    position: sticky;
    top: 20px;
    padding-top: 0;
  }
}

.article-recent {
  padding: 20px;
  border: 1px solid var(--c-line);
  border-radius: 6px;
  background: #fff;
}
/* 見出し — 主張しすぎないよう小さく・ミュートに。区切りは細いヘアラインのみ */
.article-recent__head {
  margin: 0 0 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-line);
  font-size: 14px;
  font-weight: normal;
  letter-spacing: .12em;
}
.article-recent__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.article-recent__list a {
  display: block;
  padding: 15px 0;
  border-bottom: 1px solid #ececea;
  color: inherit;
}
.article-recent__list li:last-child a { border-bottom: 0; }
/* 上段: 日付 + カテゴリを 1 行に */
.article-recent__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  min-width: 0;
}
.article-recent__meta time {
  flex: none;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--c-mut);
  font-variant-numeric: tabular-nums;
}
.article-recent__cat {
  flex: none;
  max-width: 100%;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--c-card);
  color: #5c5c5c;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 下段: タイトルは 2 行でクランプ。本文より一段控えめなサイズ・色に */
.article-recent__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.6;
  color: #3a3a3a;
  transition: color .25s var(--ease);
}
.article-recent__list a:hover .article-recent__title,
.article-recent__list a:focus-visible .article-recent__title {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.article-recent__more {
  /* margin: 16px 0 0; */
  text-align: center;
}
.article-recent__more a {
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--c-mut);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-recent__more a:hover { color: var(--c-fg); }

.article-footer {
  border-top: 1px solid var(--c-line);
  margin-top: 48px;
  padding-top: 28px;
  text-align: center;
}
.article-footer a {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  color: var(--c-fg);
  font-size: .9rem;
  letter-spacing: .06em;
}

/* ページ送り */
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  font-size: 13px;
  letter-spacing: .06em;
}
.pager a {
  color: var(--c-fg);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 8px 18px;
  transition: background .25s var(--ease);
}
.pager a:hover { background: var(--c-card); }
.pager span.is-disabled {
  color: #c8c8c4;
  border: 1px solid #ececea;
  border-radius: 999px;
  padding: 8px 18px;
}
.pager__count { color: var(--c-mut); }
