/* 特集ページ共通スタイル（自動生成: scripts/build_feature_pages.py） */
.feature-scope {
  --fa: #2E86AB;
  --fa-light: #4A90B8;
  --fa-dark: #1F6386;
  --f-ink: #1F2937;
  --f-surface: #ffffff;
  --f-surface-alt: #F8FAFC;
  --f-border: #E5E7EB;
  --f-link: #1F6386;
  --f-font: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic Medium', Meiryo, sans-serif;
  font-family: var(--f-font);
  padding-top: 80px;
}

/* --- ヒーロー --- */
.feature-hero { position: relative; overflow: hidden; background: var(--f-ink); }
.feature-hero-media { position: absolute; inset: 0; }
.feature-hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.42; }
.feature-hero-inner {
  position: relative; max-width: 1200px; margin: 0 auto;
  padding: 4.5rem 2rem 3.5rem; color: #fff;
}
.feature-eyebrow {
  display: inline-block; margin-bottom: 1rem; padding: 0.35rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.45); border-radius: 999px;
  font-size: 0.78rem; letter-spacing: 0.12em; color: #fff;
}
.feature-hero h1 {
  margin: 0 0 1rem; color: #fff; font-size: clamp(1.6rem, 3.6vw, 2.7rem);
  line-height: 1.4; font-weight: 800;
}
.feature-hero-thin { display: block; margin-top: 0.5rem; font-size: 0.62em; font-weight: 600; color: rgba(255,255,255,0.9); }
.feature-hero .feature-hero-sub {
  margin: 0; max-width: 46rem; color: rgba(255,255,255,0.88);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem); line-height: 1.9;
}
.feature-breadcrumb {
  max-width: 1200px; margin: 0 auto; padding: 1rem 2rem 0;
  font-size: 0.82rem; color: #6b7280;
}
.feature-breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.feature-breadcrumb li + li::before { content: "›"; margin-right: 0.4rem; color: #9ca3af; }
.feature-breadcrumb a { color: var(--f-link); text-decoration: none; }
.feature-breadcrumb a:hover { text-decoration: underline; }

/* --- 2カラムレイアウト --- */
.feature-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem;
  max-width: 1200px; margin: 0 auto; padding: 2.5rem 2rem 4rem;
  align-items: start;
}
.feature-main { min-width: 0; }
.feature-side { min-width: 0; position: sticky; top: calc(80px + 1rem); }

/* --- 本文 --- */
.feature-main h2 {
  margin: 3rem 0 1.1rem; padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--fa);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.5;
  color: var(--f-ink); font-weight: 700;
}
.feature-main h2:first-child { margin-top: 0; }
.feature-main h3 {
  margin: 2rem 0 0.8rem; padding-left: 0.7rem;
  border-left: 4px solid var(--fa-light);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--f-ink); font-weight: 700;
}
.feature-main p { margin: 0 0 1.3rem; line-height: 2; color: #333; }
.feature-main a { color: var(--f-link); }
.feature-lead {
  margin-bottom: 2rem; padding: 1.3rem 1.5rem;
  background: var(--f-surface-alt); border-left: 4px solid var(--fa);
  border-radius: 0 8px 8px 0;
}
.feature-lead p { margin: 0; font-size: 1.02rem; }
.feature-list, .feature-steps { margin: 0 0 1.5rem; padding-left: 1.4rem; }
.feature-list li, .feature-steps li { margin-bottom: 0.6rem; line-height: 1.9; }
.feature-list { list-style: disc; }
.feature-steps { list-style: decimal; }

.feature-table-wrap { overflow-x: auto; margin: 0 0 1.8rem; }
.feature-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 520px; }
.feature-table caption { caption-side: top; text-align: left; padding-bottom: 0.5rem; font-size: 0.85rem; color: #6b7280; }
.feature-table th, .feature-table td { padding: 0.7rem 0.9rem; border: 1px solid var(--f-border); text-align: left; vertical-align: top; line-height: 1.8; }
.feature-table thead th { background: var(--fa); color: #fff; font-weight: 700; }
.feature-table tbody th { background: var(--f-surface-alt); font-weight: 700; white-space: nowrap; }

.feature-note {
  margin: 0 0 1.8rem; padding: 1.1rem 1.3rem;
  background: var(--f-surface-alt); border: 1px solid var(--f-border);
  border-radius: 8px;
}
.feature-note-title { margin: 0 0 0.5rem !important; font-weight: 700; color: var(--fa-dark); }
.feature-note p:last-child { margin-bottom: 0 !important; }

.feature-figure { margin: 0 0 2rem; }
.feature-figure img { width: 100%; height: auto; display: block; border-radius: 10px; }
.feature-figure figcaption { margin-top: 0.6rem; font-size: 0.82rem; color: #6b7280; line-height: 1.7; }

/* --- 広告枠 --- */
.feature-ad { margin: 2rem 0; }
.feature-ad-side { margin: 0 0 1.5rem; }
.feature-ad .amazon-banner, .feature-ad-side .amazon-banner {
  padding: 0.8rem 1rem; border: 1px dashed var(--f-border);
  border-radius: 8px; background: var(--f-surface-alt); font-size: 0.9rem; line-height: 1.7;
}
.feature-ad .amazon-banner a, .feature-ad-side .amazon-banner a { color: var(--f-link); text-decoration: none; }
.feature-ad .amazon-banner a:hover, .feature-ad-side .amazon-banner a:hover { text-decoration: underline; }

/* --- サイドナビ --- */
.side-block { margin-bottom: 1.8rem; padding: 1.1rem 1.2rem; background: var(--f-surface-alt); border: 1px solid var(--f-border); border-radius: 10px; }
.side-block h2 { margin: 0 0 0.8rem; font-size: 0.95rem; font-weight: 700; color: var(--f-ink); border: none; padding: 0; }
.side-block ol, .side-block ul { margin: 0; padding-left: 1.2rem; }
.side-block li { margin-bottom: 0.5rem; font-size: 0.88rem; line-height: 1.7; }
.side-block a { color: var(--f-link); text-decoration: none; }
.side-block a:hover { text-decoration: underline; }
.side-toc a.active { font-weight: 700; color: var(--fa-dark); }
.side-block .side-current { color: var(--f-ink); font-weight: 700; }

/* --- 章カード（特集トップ） --- */
.feature-chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.feature-chapter-card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--f-border); border-radius: 12px; background: #fff;
  text-decoration: none; color: inherit; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-chapter-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,0.1); }
.feature-chapter-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.feature-chapter-body { padding: 1.1rem 1.2rem 1.3rem; }
.feature-chapter-num { display: block; margin-bottom: 0.4rem; font-size: 0.75rem; letter-spacing: 0.1em; color: var(--fa-dark); font-weight: 700; }
.feature-chapter-card h3 { margin: 0 0 0.5rem; font-size: 1.03rem; line-height: 1.6; color: var(--f-ink); }
.feature-chapter-card p { margin: 0; font-size: 0.87rem; line-height: 1.8; color: #555; }

/* --- チェックリスト --- */
.feature-checklist { list-style: none; margin: 0 0 2rem; padding: 0; }
.feature-checklist li { position: relative; margin-bottom: 0.7rem; padding-left: 1.9rem; line-height: 1.9; }
.feature-checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 1.3rem; height: 1.3rem; border-radius: 4px;
  background: var(--fa); color: #fff; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
}

/* --- 参考リンク --- */
.feature-refs { margin: 0 0 2rem; padding: 1.2rem 1.4rem; border: 1px solid var(--f-border); border-radius: 10px; background: var(--f-surface-alt); }
.feature-refs h2 { margin-top: 0 !important; }
.feature-refs ul { margin: 0 0 1rem; padding-left: 1.3rem; }
.feature-refs ul:last-child { margin-bottom: 0; }
.feature-refs li { margin-bottom: 0.45rem; font-size: 0.92rem; line-height: 1.8; }
.feature-refs h3 { margin: 1.2rem 0 0.5rem !important; padding: 0 !important; border: none !important; font-size: 0.95rem !important; }
.feature-refs h3:first-of-type { margin-top: 0 !important; }

/* --- 章送り --- */
.feature-pager { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }
.feature-pager a {
  flex: 1 1 240px; padding: 1rem 1.2rem; border: 1px solid var(--f-border);
  border-radius: 10px; text-decoration: none; color: var(--f-ink); background: #fff;
  transition: border-color 0.2s ease;
}
.feature-pager a:hover { border-color: var(--fa); }
.feature-pager span { display: block; font-size: 0.75rem; color: var(--fa-dark); margin-bottom: 0.3rem; font-weight: 700; }
.feature-pager .feature-pager-next { text-align: right; }

/* --- 特集バナー（TOPページ設置用） --- */
.feature-promo { max-width: 1200px; margin: 32px auto; padding: 0 16px; }
.feature-promo a {
  position: relative; display: block; overflow: hidden; min-height: 260px;
  aspect-ratio: 16 / 5; border-radius: 16px; text-decoration: none; color: #fff;
  background: #0d1b2a; box-shadow: 0 14px 36px rgba(0,0,0,0.22); isolation: isolate;
}
.feature-promo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.feature-promo-shade { position: absolute; inset: 0; z-index: -1; }
.feature-promo-copy {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  justify-content: center; width: 100%; height: 100%; max-width: 760px; padding: 30px 44px;
}
.feature-promo-eyebrow { display: block; margin-bottom: 10px; font: 700 0.78rem/1.4 sans-serif; letter-spacing: 0.14em; }
.feature-promo-copy strong { display: block; color: #fff; font: 800 clamp(1.35rem, 2.8vw, 2.25rem)/1.35 sans-serif; }
.feature-promo-desc { display: block; margin-top: 10px; color: rgba(255,255,255,0.86); font: 500 clamp(0.8rem, 1.25vw, 1rem)/1.7 sans-serif; }
.feature-promo-cta {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 20px;
  padding: 10px 18px; border-radius: 999px; color: #fff;
  font: 700 0.85rem/1 sans-serif;
}
@media (max-width: 640px) {
  .feature-promo { margin: 20px auto; padding: 0 12px; }
  .feature-promo a { aspect-ratio: auto; min-height: 190px; height: 190px; border-radius: 12px; }
  .feature-promo-copy { padding: 22px; max-width: 88%; }
  .feature-promo-desc { font-size: 0.74rem; line-height: 1.55; }
  .feature-promo-cta { margin-top: 13px; padding: 8px 13px; font-size: 0.72rem; }
}

/* --- レスポンシブ --- */
@media (max-width: 1024px) {
  .feature-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .feature-side { position: static; }
}
@media (max-width: 640px) {
  .feature-hero-inner { padding: 3rem 1.2rem 2.5rem; }
  .feature-breadcrumb { padding: 0.8rem 1.2rem 0; }
  .feature-layout { padding: 1.8rem 1.2rem 3rem; }
  .feature-main h2 { margin-top: 2.2rem; }
  .feature-pager .feature-pager-next { text-align: left; }
}
