* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  text-align: center;
}

header h1 {
  font-size: 1.8em;
  margin-bottom: 10px;
}

header p {
  font-size: 1em;
  opacity: 0.95;
}

nav {
  background: #f8f9fa;
  padding: 15px;
  text-align: center;
}

nav a {
  margin: 0 20px;
  text-decoration: none;
  color: #667eea;
  font-weight: 500;
}

nav a:hover {
  text-decoration: underline;
}

main {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

h2 {
  color: #667eea;
  margin-top: 30px;
  margin-bottom: 15px;
  border-bottom: 2px solid #667eea;
  padding-bottom: 10px;
}

h3 {
  color: #333;
  margin-top: 20px;
  margin-bottom: 10px;
}

p {
  margin-bottom: 15px;
}

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.service-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.service-card h3 {
  color: #667eea;
  margin-bottom: 10px;
}

.service-card p {
  margin-bottom: 15px;
  font-size: 0.95em;
}

.service-card a {
  display: inline-block;
  padding: 10px 20px;
  background: #667eea;
  color: white;
  text-decoration: none;
  border-radius: 4px;
}

.service-card a:hover {
  background: #764ba2;
}

.service-card h3 a,
.service-card p a {
  display: inline;
  padding: 0;
  background: transparent;
  color: #667eea;
  border-radius: 0;
}

.service-card h3 a:hover,
.service-card p a:hover {
  background: transparent;
  text-decoration: underline;
}

.about-section {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
  margin: 40px 0;
}

.about-section h2 {
  color: #333;
  margin-bottom: 15px;
}

.about-section p {
  margin-bottom: 10px;
  line-height: 1.8;
}

.company-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.company-info dt {
  font-weight: 600;
  color: #667eea;
  margin-top: 10px;
}

.company-info dd {
  margin-left: 20px;
  margin-bottom: 10px;
}

footer {
  background: #333;
  color: white;
  padding: 20px;
  text-align: center;
  margin-top: 40px;
}

footer a {
  color: #667eea;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.footer-links {
  margin-top: 10px;
  font-size: 0.9em;
}

.article-back-link {
  margin-top: 40px;
}

/* --- E-3: article card / about ページのインライン style 代替クラス --- */

.article-card-image-link {
  display: block;
  margin: -20px -20px 15px -20px;
}

.article-card-image-link img {
  width: 100%;
  height: auto;
  border-radius: 8px 8px 0 0;
  display: block;
}

.article-card-title-link {
  color: #667eea;
  text-decoration: none;
}

.article-card-date {
  font-size: 0.85em;
  color: #666;
}

.article-card-category-link {
  color: #667eea;
}

.category-pill {
  display: inline-block;
  margin: 0 10px 10px 0;
  padding: 4px 12px;
  background: #f8f9fa;
  border-radius: 4px;
  text-decoration: none;
  color: #667eea;
}

/* 記事一覧トップの常設カテゴリー説明 (dt=ラベル pill / dd=意図説明)。
   表示破綻はしないが dl のブラウザ既定スタイルだけだと素朴なため、
   行間と余白だけ既存トーンに揃える最小スタイル。色やフォントは継承させる。 */
.category-guide {
  margin: 0;
}

.category-guide dt {
  margin-top: 12px;
}

.category-guide dd {
  margin: 4px 0 0 0;
  line-height: 1.7;
  color: #444;
}

.article-list-back-link {
  margin-top: 30px;
}

.about-service-link {
  color: #667eea;
  text-decoration: none;
}

/* --- パンくずリスト (breadcrumb): 記事の縦方向内部リンク経路 --- */

.breadcrumb {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.8;
}

.breadcrumb a {
  color: #667eea;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  margin: 0 8px;
  color: #999;
}

.breadcrumb-current {
  color: #666;
}

/* --- F-1: post.html / privacy.html / terms.html / 404.html のインライン style 代替クラス --- */

.article-meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 30px;
}

.article-meta a {
  color: #667eea;
  text-decoration: none;
}

.article-meta a:hover {
  text-decoration: underline;
}

.article-body h2 {
  margin-top: 30px;
  margin-bottom: 15px;
  color: #667eea;
  border-bottom: 2px solid #667eea;
  padding-bottom: 10px;
}

.article-body h3 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: #333;
}

.article-body p {
  margin-bottom: 15px;
  line-height: 1.8;
}

.article-body ul,
.article-body ol {
  margin-left: 20px;
  margin-bottom: 15px;
}

.article-body li {
  margin-bottom: 10px;
}

.article-body code {
  background: #f4f4f4;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Monaco', 'Menlo', monospace;
}

.article-body pre {
  background: #f4f4f4;
  padding: 15px;
  border-radius: 4px;
  overflow-x: auto;
}

.article-tags {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.article-tags a {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 4px 12px;
  background: #f8f9fa;
  border-radius: 4px;
  text-decoration: none;
  color: #667eea;
  font-size: 0.9em;
}

/* --- 記事シェア (article share): はてな / Reddit / Hacker News の小アイコン横並び --- */

.article-share {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.article-share-buttons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
  vertical-align: middle;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  text-decoration: none;
  color: #fff;
  transition: opacity 0.15s ease;
}

.share-btn:hover {
  opacity: 0.85;
}

.share-icon {
  fill: currentColor;
}

.share-hatena {
  background: #00a4de;
}

.share-reddit {
  background: #ff4500;
}

.share-hackernews {
  background: #ff6600;
}

@media (max-width: 768px) {
  .article-share-buttons {
    gap: 8px;
    margin-left: 10px;
  }

  .share-btn {
    width: 32px;
    height: 32px;
  }
}

/* --- 関連記事レコメンド (related articles): 記事間の横方向内部リンク --- */

.related-articles {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.related-articles h2 {
  font-size: 1.2em;
  color: #667eea;
  margin-bottom: 15px;
}

/* 関連記事カード (cocoon リスト風): 横並びコンパクト = 左に小サムネ + 右に title + 抜粋 */

.related-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}

.related-card {
  display: flex;
  align-items: stretch;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.related-card:hover {
  box-shadow: 0 4px 14px rgba(102,126,234,0.25);
  transform: translateY(-2px);
}

.related-card-image-link {
  display: block;
  flex: 0 0 112px;
  width: 112px;
}

.related-card-image-link img {
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.related-card-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.related-card-title {
  font-size: 0.95em;
  margin: 0 0 6px 0;
  line-height: 1.4;
}

.related-card-title-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.related-card-title-link:hover {
  text-decoration: underline;
}

.related-card-desc {
  margin: 0;
  font-size: 0.85em;
  color: #666;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.policy-list {
  margin-left: 20px;
  margin-bottom: 15px;
}

.policy-list li {
  margin-bottom: 10px;
}

.last-updated {
  margin-top: 40px;
  font-size: 0.95em;
  color: #666;
}

.error-list {
  margin-left: 20px;
  margin-bottom: 15px;
}

/* --- 特集「未来に向けて」: 記事→ピラー戻りバナー (各回→表紙の相互リンク) --- */
.feature-banner {
  margin: 0 0 20px 0;
  padding: 8px 14px;
  background: #f8f9fa;
  border-left: 3px solid #667eea;
  border-radius: 4px;
  font-size: 0.9em;
}

.feature-banner a {
  color: #667eea;
  text-decoration: none;
}

.feature-banner a:hover {
  text-decoration: underline;
}

/* future ページの「この特集の各回」一覧 (ピラー→各回の相互リンク) */
.future-related-list {
  margin: 10px 0 0 0;
  line-height: 1.9;
}

.future-related-list a {
  color: #667eea;
  text-decoration: none;
}

.future-related-list a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  header h1 {
    font-size: 1.3em;
  }

  .services {
    grid-template-columns: 1fr;
  }

  .related-cards {
    grid-template-columns: 1fr;
  }

  .related-card-image-link {
    flex: 0 0 96px;
    width: 96px;
  }

  nav a {
    display: block;
    margin: 10px 0;
  }
}
