/* ==========================================================================
   HR Terrace Lab — SEO記事デザインシステム v1（案）
   --------------------------------------------------------------------------
   設計の出典: SmartHR Mag. の記事ページから「構造の型」だけを抽出し、
   色・フォント・角丸は CoTerrace のブランド（lp/assets/css/style.css）に翻訳した。
   借りたのは (a) 縦リズム 40px の一貫、(b) 見出しの区切りの付け方、
   (c) 記事本文で使えるブロックの語彙、(d) 監修者の見せ方。

   名前空間は .sa-*（seo article）。既存の .article* とは完全に別系統なので、
   同じ style.css に同居させても衝突しない。

   詳細は同ディレクトリの DESIGN_SYSTEM.md を参照。
   ========================================================================== */

/* トークンは .sa-breadcrumb にも配る。パンくずは .sa-article の外に出るため */
.sa-article,
.sa-breadcrumb {
  /* ----- Color: SmartHR のグレー階調構造を、CoTerrace のウォーム系に置換 ----- */
  --sa-ink:        #241610;  /* 本文・見出し */
  --sa-ink-mute:   #7A7268;  /* 日付・注釈・キャプション */
  --sa-link:       #C15F16;  /* リンク（--color-orange を濃くしてコントラスト確保 4.6:1） */
  --sa-accent:     #E3823D;  /* CoTerrace オレンジ。CTA枠・アクセント */
  --sa-marker:     #FFEEAE;  /* マーカー線（--color-pale-yellow） */

  --sa-bg:         #FFFAE7;  /* ページ地（--color-cream） */
  --sa-surface:    #FFFFFF;  /* 記事カード面 */
  --sa-fill:       #FBF7EC;  /* ボックス・吹き出しの塗り */
  --sa-fill-2:     #F5EFE0;  /* 目次の見出し帯 */
  --sa-line:       #EDE5D4;  /* 弱い罫線（区切り） */
  --sa-line-2:     #DCD2BC;  /* 強い罫線（枠線） */

  /* ----- Rhythm: すべての縦間隔はこの4値のいずれか ----- */
  --sa-rhythm:     40px;     /* ブロック間の基本リズム */
  --sa-rhythm-sm:  30px;     /* 同種ブロックが連続するとき */
  --sa-rhythm-xs:  20px;     /* 見出しと直後の本文 */
  --sa-section:    64px;     /* 記事本体と付随セクションの間 */

  --sa-radius:     6px;
  --sa-pad:        clamp(20px, 3vw, 30px);  /* ボックス内の左右パディング */
  --sa-measure:    760px;                    /* 本文の最大幅 */

  color: var(--sa-ink);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  background: var(--sa-bg);
}

/* ==========================================================================
   1. パンくず — 地と同じクリームに黒文字。帯で分断せず、記事へそのまま繋げる
   ========================================================================== */
.sa-breadcrumb {
  /* ヘッダーが position:fixed のため、記事ページ先頭のこの要素で高さぶんを確保する */
  margin-top: var(--header-height, 72px);
  background: var(--sa-bg);
  color: var(--sa-ink);
  overflow-x: auto;
  scrollbar-width: none;
}
.sa-breadcrumb::-webkit-scrollbar { display: none; }

.sa-breadcrumb__list {
  display: flex;
  align-items: center;
  gap: 0 10px;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(12px, 2vw, 16px) clamp(20px, 4vw, 40px);
  list-style: none;
  font-size: 12px;
  line-height: 1.8;
  white-space: nowrap;
}
.sa-breadcrumb__list li { display: flex; align-items: center; gap: 0 10px; }
.sa-breadcrumb__list li + li::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--sa-line-2);
  border-right: 1px solid var(--sa-line-2);
  transform: rotate(45deg);
}
.sa-breadcrumb a { color: var(--sa-ink); text-decoration: none; }
.sa-breadcrumb a:hover { text-decoration: underline; }
/* 現在地は本文と同じ黒だと過剰なので、1段落とす */
.sa-breadcrumb [aria-current="page"] { color: var(--sa-ink-mute); }

/* ==========================================================================
   2. レイアウト — 本文カラム + サイドバー（PC 2:1 / SP 1カラム）
   ========================================================================== */
.sa-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas:
    "header  side"
    "hero    side"
    "content side"
    "footer  side";
  gap: 0 48px;
  /* 記事ページだけ --container-max(1080px) より広い。
     サイドバー300pxを引いても本文760pxを確保するための例外。 */
  max-width: 1188px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px) clamp(20px, 4vw, 40px) var(--sa-section);
}
.sa-layout__header  { grid-area: header; }
.sa-layout__hero    { grid-area: hero; }
.sa-layout__content { grid-area: content; min-width: 0; }
.sa-layout__footer  { grid-area: footer; }
.sa-layout__side    { grid-area: side; }

@media (max-width: 900px) {
  .sa-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "header" "hero" "content" "footer" "side";
    gap: 0;
  }
}

/* ==========================================================================
   3. 記事ヘッダー — カテゴリ → タイトル → 日付 → 監修者 の順で信頼を積む
   ========================================================================== */
.sa-head__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 16px;
}
.sa-cat {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 4px;
  background: var(--color-yellow, #F1CF25);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--sa-ink);
  text-decoration: none;
}
.sa-date {
  font-family: "DM Sans", "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--sa-ink-mute);
}
.sa-date + .sa-date::before { content: "更新 "; }

.sa-head__title {
  font-size: clamp(23px, 3.4vw, 32px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .01em;
  margin: 0;
}

.sa-head__hero {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 670;
  object-fit: cover;
  border-radius: var(--sa-radius);
  margin-top: var(--sa-rhythm);
  background: linear-gradient(160deg, #FFF8EF, #FFF1E0);
}

/* ==========================================================================
   4. 記事本文の器 — 白面に載せて、地のクリームと分ける
   ========================================================================== */
.sa-body {
  max-width: var(--sa-measure);
  margin-top: var(--sa-rhythm);
  padding: clamp(28px, 4vw, 44px) var(--sa-pad);
  border-radius: var(--sa-radius);
  background: var(--sa-surface);
  word-wrap: break-word;
}

/* --- 縦リズムの単一ルール ------------------------------------------------
   「最初の子でなければ 40px 空ける」。個別に margin を積まない。
   これで h2 の前も、表の前も、CTA の前も、常に同じ間隔になる。 */
.sa-body > * + * { margin-top: var(--sa-rhythm); }
.sa-body > p + p { margin-top: var(--sa-rhythm-sm); }
.sa-body > h2 + *,
.sa-body > h3 + *,
.sa-body > h4 + * { margin-top: var(--sa-rhythm-xs); }
.sa-body > :first-child { margin-top: 0; }

/* ==========================================================================
   5. リード文 — 本文より少し大きく、記事の約束を先に置く
   ========================================================================== */
.sa-lead {
  font-size: 17px;
  line-height: 1.9;
  padding-bottom: var(--sa-rhythm-sm);
  border-bottom: 1px solid var(--sa-line);
}
/* リードが複数段落のときは div.sa-lead で束ねる。中の p にも同じ級数を効かせる */
.sa-body .sa-lead p { font-size: 17px; line-height: 1.9; }
.sa-lead > * + * { margin-top: var(--sa-rhythm-sm); }

/* ==========================================================================
   6. 見出し — 階層ごとに「区切りの強さ」を変える
      h2 = 下線で面を割る / h3 = 左バーで塊を示す / h4 = 太字のみ
   ========================================================================== */
.sa-body h2 {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 700;
  line-height: 1.6;
  padding-bottom: 19px;
  border-bottom: 2px solid var(--sa-line-2);
  scroll-margin-top: 88px;
}
.sa-body h3 {
  position: relative;
  font-size: clamp(18px, 2vw, 20px);
  font-weight: 700;
  line-height: 1.6;
  padding-left: 14px;
  scroll-margin-top: 88px;
}
.sa-body h3::before {
  content: "";
  position: absolute;
  top: .15em;
  bottom: .15em;
  left: 0;
  width: 4px;
  border-radius: 2px;
  background: var(--sa-accent);
}
.sa-body h4 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.8;
  scroll-margin-top: 88px;
}

/* ==========================================================================
   7. 本文のインライン要素
   ========================================================================== */
.sa-body p { font-size: 16px; line-height: 1.8; }
/* :where() で詳細度を 0 に落とす。
   カードリンク・CTA など「面でリンクになっている」ブロックが後から上書きできるようにするため */
.sa-body :where(a) {
  color: var(--sa-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.sa-body :where(a):hover { text-decoration-thickness: 2px; }
.sa-body strong { font-weight: 700; }
.sa-body em { font-style: italic; }
/* マーカー: 下端 .625em にだけ色を敷く。太字と併用しても潰れない */
.sa-body mark {
  background: linear-gradient(transparent calc(100% - .625em), var(--sa-marker) calc(100% - .625em));
  color: inherit;
}
.sa-body sup { vertical-align: super; font-size: smaller; }

.sa-body blockquote {
  margin: 0;
  padding: 20px var(--sa-pad);
  border-left: 4px solid var(--sa-line-2);
  border-radius: 0 var(--sa-radius) var(--sa-radius) 0;
  background: var(--sa-fill);
}
.sa-body blockquote > * + * { margin-top: 14px; }
.sa-body hr { border: none; border-top: 1px dashed var(--sa-line-2); }

.sa-body ul, .sa-body ol { padding-left: 1.5em; }
.sa-body li { margin-top: 8px; }
.sa-body li:first-child { margin-top: 0; }
.sa-body li > ul, .sa-body li > ol { margin-top: 8px; }

/* 注釈 — 本文より小さく、灰色 */
.sa-note {
  font-size: 12px;
  line-height: 1.8;
  color: var(--sa-ink-mute);
}
.sa-note + .sa-note { margin-top: 10px !important; }

/* ==========================================================================
   8. 目次 — details/summary。SP では閉じた状態から始めてもよい
   ========================================================================== */
.sa-toc {
  border-radius: var(--sa-radius);
  overflow: hidden;
}
.sa-toc__summary {
  position: relative;
  padding: 18px clamp(48px, 6vw, 64px) 18px var(--sa-pad);
  background: var(--sa-fill-2);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  transition: color .12s;
}
.sa-toc__summary::-webkit-details-marker { display: none; }
.sa-toc__summary:hover { color: var(--sa-link); }
.sa-toc__summary::after {
  content: "";
  position: absolute;
  top: calc(50% - 5px);
  right: clamp(22px, 3vw, 30px);
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s;
}
.sa-toc[open] .sa-toc__summary::after { transform: rotate(-135deg); }
.sa-toc[open] .sa-toc__summary { border-radius: var(--sa-radius) var(--sa-radius) 0 0; }

.sa-toc__body {
  padding: 28px var(--sa-pad);
  background: var(--sa-fill);
}
.sa-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}
.sa-toc__list > li + li { margin-top: 18px; }
.sa-toc a { color: var(--sa-link); text-decoration: underline; }

.sa-toc__child {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-weight: 400;
}
.sa-toc__child li {
  position: relative;
  padding-left: 21px;
  margin-top: 6px;
}
.sa-toc__child li::before {
  content: "";
  position: absolute;
  top: .75em;
  left: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sa-link);
}

/* ==========================================================================
   9. 監修者カード — 左上の三角が「人が担保している」印
   ========================================================================== */
/* 監修者が2名（HR＝山永・技術＝村上）並ぶことがあるのでラッパーで束ねる */
.sa-speakers {
  display: grid;
  gap: 16px;
  max-width: var(--sa-measure);
}

.sa-speaker {
  position: relative;
  display: grid;
  grid-template: "avatar role" max-content
                 "avatar name" max-content
                 "profile profile" 1fr / max-content 1fr;
  gap: 4px 20px;
  padding: 28px var(--sa-pad);
  border-radius: var(--sa-radius);
  box-shadow: inset 0 0 0 1px var(--sa-line-2);
  background: var(--sa-surface);
  overflow: hidden;
}
.sa-speaker::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 15px 15px 0 0;
  border-color: var(--sa-accent) transparent transparent transparent;
}
.sa-speaker__avatar {
  grid-area: avatar;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--sa-fill-2);
  font-size: 20px;
  font-weight: 700;
  color: var(--sa-ink-mute);
  overflow: hidden;
}
.sa-speaker__role {
  grid-area: role;
  width: max-content;
  padding: 5px 14px;
  border: 1px solid var(--sa-ink);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}
.sa-speaker__name {
  grid-area: name;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}
.sa-speaker__name small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--sa-ink-mute);
}
.sa-speaker__profile {
  grid-area: profile;
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--sa-ink-mute);
}
@media (max-width: 560px) {
  .sa-speaker { grid-template: "avatar role" max-content "avatar name" max-content "profile profile" 1fr / 48px 1fr; gap: 4px 14px; }
  .sa-speaker__avatar { width: 48px; height: 48px; }
}

/* ==========================================================================
   10. 囲みボックス — 補足・条件・手順をまとめる。枠線のみで主張を抑える
   ========================================================================== */
.sa-box {
  padding: 28px var(--sa-pad);
  border: 1px solid var(--sa-line-2);
  border-radius: var(--sa-radius);
  background: var(--sa-surface);
}
.sa-box > * + * { margin-top: var(--sa-rhythm-xs); }
.sa-box__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}
.sa-box--fill { background: var(--sa-fill); border-color: transparent; }

/* 注意喚起 — 左に太いオレンジ。多用しない（1記事に1〜2個まで） */
.sa-box--alert {
  border: none;
  border-left: 4px solid var(--sa-accent);
  border-radius: 0 var(--sa-radius) var(--sa-radius) 0;
  background: #FFF6EC;
}

/* ==========================================================================
   11. 吹き出し — ヒアリングで得た一次情報を「誰の発言か」ごと見せる
   ========================================================================== */
.sa-bubble {
  display: grid;
  grid-template-columns: clamp(40px, 6vw, 56px) 1fr;
  gap: 0 clamp(16px, 2.5vw, 24px);
}
.sa-bubble__speaker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px 0;
}
.sa-bubble__avatar {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  background: var(--sa-fill-2);
  font-size: 16px;
  font-weight: 700;
  color: var(--sa-ink-mute);
  overflow: hidden;
}
.sa-bubble__name {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .08em;
  color: var(--sa-ink-mute);
  text-align: center;
}
.sa-bubble__body {
  position: relative;
  padding: 24px var(--sa-pad);
  border-radius: var(--sa-radius);
  background: var(--sa-fill);
  overflow: hidden;
}
.sa-bubble__body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 15px 15px 0 0;
  border-color: var(--sa-accent) transparent transparent transparent;
}
.sa-bubble__body > * + * { margin-top: 14px; }

/* ==========================================================================
   12. 表 — 横スクロールを前提にする。SP で潰さない
   ========================================================================== */
.sa-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sa-table table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--sa-line-2);
  font-size: 14px;
  line-height: 1.7;
  background: var(--sa-surface);
}
.sa-table th,
.sa-table td {
  min-width: 120px;
  padding: 14px 15px;
  border: 1px solid var(--sa-line-2);
  text-align: left;
  vertical-align: top;
}
.sa-table th {
  background: var(--sa-fill-2);
  font-weight: 700;
}
.sa-table__caption {
  margin-top: 10px !important;
  font-size: 12px;
  color: var(--sa-ink-mute);
}

/* ==========================================================================
   13. 内部リンクカード — ラベルが枠に食い込む形。連続時は罫線を共有する
   ========================================================================== */
.sa-cardlink { isolation: isolate; }
.sa-cardlink__label {
  position: relative;
  z-index: 1;
  width: max-content;
  margin: 0 0 -10px 16px;
  padding: 7px 14px;
  border: 1px solid var(--sa-ink);
  border-radius: 999px;
  background: var(--sa-surface);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}
.sa-cardlink__item + .sa-cardlink__item { margin-top: -1px; }
.sa-cardlink__inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 19px var(--sa-pad);
  border: 1px solid var(--sa-line-2);
  background: var(--sa-surface);
  color: inherit;
  text-decoration: none;
  transition: border-color .12s;
}
.sa-cardlink__item:first-child .sa-cardlink__inner { border-radius: var(--sa-radius) var(--sa-radius) 0 0; }
.sa-cardlink__item:last-child  .sa-cardlink__inner { border-radius: 0 0 var(--sa-radius) var(--sa-radius); }
.sa-cardlink__item:only-child  .sa-cardlink__inner { border-radius: var(--sa-radius); }
.sa-cardlink__inner:hover { z-index: 1; border-color: var(--sa-ink); }
.sa-cardlink__thumb {
  /* flex アイテムの img は min-width:auto で intrinsic 幅まで広がる。
     width と min-width を明示して抑える */
  flex: 0 0 104px;
  width: 104px;
  min-width: 0;
  aspect-ratio: 1280 / 670;
  border-radius: 4px;
  object-fit: cover;
  background: linear-gradient(160deg, #FFF8EF, #FFF1E0);
}
.sa-cardlink__title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}
.sa-cardlink__inner:hover .sa-cardlink__title { text-decoration: underline; }

/* ==========================================================================
   14. CTA — オレンジ2px の枠。記事あたり1〜2個（PVエンジン記事では出さない）
   ========================================================================== */
.sa-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px var(--sa-pad);
  border: 2px solid var(--sa-accent);
  border-radius: var(--sa-radius);
  background: var(--sa-surface);
  color: inherit;
  text-decoration: none;
  transition: border-color .12s;
}
.sa-cta:hover { border-color: var(--sa-ink); }
.sa-cta__label {
  display: block;
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--sa-accent);
}
.sa-cta__title { display: block; margin-top: 4px; font-size: 15px; font-weight: 700; line-height: 1.6; }
.sa-cta__arrow { margin-left: auto; flex: none; color: var(--sa-accent); }
@media (max-width: 560px) {
  .sa-cta { flex-wrap: wrap; gap: 10px; }
  .sa-cta__arrow { margin-left: 0; }
}

/* ==========================================================================
   15. まとめ — 記事の約束を回収する。3〜5項目
   ========================================================================== */
.sa-summary {
  padding: 28px var(--sa-pad);
  border-radius: var(--sa-radius);
  background: var(--sa-fill);
}
.sa-summary__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}
.sa-summary__title::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sa-accent);
}
.sa-summary__title::after {
  content: "";
  flex: auto;
  height: 2px;
  margin-left: 2px;
  background-image: linear-gradient(90deg, var(--sa-line-2) 25%, transparent 25%);
  background-size: 8px 2px;
  background-repeat: repeat-x;
}
.sa-summary ul { margin: 18px 0 0; padding-left: 1.4em; }
.sa-summary li { margin-top: 10px; font-size: 15px; }

/* ==========================================================================
   16. 記事フッター — クレジット / タグ / シェア
   ========================================================================== */
.sa-foot { max-width: var(--sa-measure); margin-top: var(--sa-rhythm); }
.sa-foot > * + * { margin-top: var(--sa-rhythm-sm); }

.sa-credit {
  padding: 18px var(--sa-pad);
  border-radius: var(--sa-radius);
  background: var(--sa-surface);
  font-size: 14px;
}
.sa-credit dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.sa-credit dt { font-weight: 700; }
.sa-credit dd { margin: 0; }
.sa-credit a { color: var(--sa-link); text-decoration: underline; }

.sa-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.sa-tag {
  display: block;
  padding: 6px 12px;
  border: 1px solid var(--sa-line-2);
  border-radius: var(--sa-radius);
  background: var(--sa-surface);
  font-size: 12px;
  line-height: 1.4;
  color: inherit;
  text-decoration: none;
  transition: border-color .12s;
}
.sa-tag:hover { border-color: var(--sa-ink); }

.sa-share { display: flex; align-items: center; gap: 12px; }
.sa-share__label { font-size: 12px; font-weight: 700; color: var(--sa-ink-mute); }
.sa-share__btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--sa-line-2);
  border-radius: 50%;
  background: var(--sa-surface);
  color: var(--sa-ink);
  transition: border-color .12s, background .12s;
}
.sa-share__btn:hover { border-color: var(--sa-ink); background: var(--sa-fill); }

/* ==========================================================================
   17. サイドバー
   ========================================================================== */
/* ヘッダーが position:fixed（72px）なので、その分を足して止める。
   足さないと、追従したサイドバーの先頭がヘッダーの下に潜り込んで見出しが読めなくなる。 */
.sa-side {
  position: sticky;
  top: calc(var(--header-height, 72px) + 24px);
  /* 中身がビューポートより高いときに下端が見えなくなるのを防ぐ */
  max-height: calc(100vh - var(--header-height, 72px) - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.sa-side__block + .sa-side__block { margin-top: var(--sa-rhythm); }
.sa-side__heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 16px;
}
.sa-side__heading::after {
  content: "";
  flex: auto;
  height: 2px;
  background-image: linear-gradient(90deg, var(--sa-line-2) 25%, transparent 25%);
  background-size: 8px 2px;
  background-repeat: repeat-x;
}
.sa-side__item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--sa-line);
  color: inherit;
  text-decoration: none;
}
.sa-side__item:last-child { border-bottom: 1px solid var(--sa-line); }
.sa-side__thumb {
  flex: 0 0 80px;
  width: 80px;
  min-width: 0;
  aspect-ratio: 1280 / 670;
  border-radius: 4px;
  object-fit: cover;
  background: linear-gradient(160deg, #FFF8EF, #FFF1E0);
}
.sa-side__title { min-width: 0; font-size: 13px; font-weight: 700; line-height: 1.6; }
.sa-side__item:hover .sa-side__title { text-decoration: underline; }
@media (max-width: 900px) {
  .sa-side {
    position: static;
    max-height: none;
    overflow: visible;
    margin-top: var(--sa-section);
  }
}

/* ==========================================================================
   18. 関連記事（記事下・3カラム）
   ========================================================================== */
.sa-related { max-width: var(--sa-measure); margin-top: var(--sa-section); }
.sa-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 20px;
}
.sa-related__card { color: inherit; text-decoration: none; }
.sa-related__thumb {
  width: 100%;
  aspect-ratio: 1280 / 670;
  border-radius: var(--sa-radius);
  object-fit: cover;
  background: linear-gradient(160deg, #FFF8EF, #FFF1E0);
}
.sa-related__title { margin-top: 10px; font-size: 14px; font-weight: 700; line-height: 1.6; }
.sa-related__card:hover .sa-related__title { text-decoration: underline; }
@media (max-width: 720px) {
  .sa-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}

/* ==========================================================================
   19. 印刷・アクセシビリティ
   ========================================================================== */
:where(.sa-article) :focus-visible {
  outline: 3px solid var(--sa-accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .sa-article * { transition: none !important; }
}
