/* ═══════════════════════════════════════════════
   MOKUTO — 白神山地カラーパレット (Unified v8.0)
   フォレストグリーン基調・和紙/木漏れ日デザイン
   ═══════════════════════════════════════════════ */

:root {
  /* ── 背景系：和紙・木漏れ日の光 ── */
  --ink:         #2C2A29;
  --ink-2:       #3D3A38;
  --ink-3:       #4A4643;
  --paper:       #F9F8F5;
  --paper-2:     #F3F1EC;
  --paper-3:     #EBE8E2;

  /* ── アクセント：白神ブナ林の緑 ── */
  --green:       #2D6A4F;
  --green-light: #40916C;
  --green-pale:  rgba(45,106,79,0.08);

  /* ── サブアクセント：樹皮と木漏れ日 ── */
  --bark:        #8B7355;
  --bark-light:  #A89279;
  --komorebi:    #C9B97B;

  /* ── ユーティリティ ── */
  --muted:       #7A756E;
  --rule:        rgba(45,106,79,0.12);
  --rule-strong: rgba(45,106,79,0.25);

  /* ── 危険・警告・コラム・広告 ── */
  --accent-red:    #B5493A;
  --accent-purple: #7C5E99;

  /* ── フォント ── */
  --serif: 'Playfair Display', 'Noto Serif JP', Georgia, serif;
  --sans:  'Noto Sans JP', system-ui, sans-serif;
  --mono:  'JetBrains Mono', monospace;
}

/* ═════ BASE & RESET ═════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
}
img, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}
body {
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--green-light);
}

/* ═════ MASTHEAD (読売新聞風 二段型スティッキーヘッダー) ═════ */

/* --- 第一階層: マストヘッド全体 (通常フロー、スクロールアウトする) --- */
.masthead {
  padding: 0 2.5rem;
  position: relative;
  z-index: 99;
  background: var(--paper);
  border-bottom: none; /* ボーダーはnavに移管 */
}

/* --- 内部要素の中央寄せ制限 --- */
.masthead-top,
.masthead-brand {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* --- 日付行 --- */
.masthead-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.back-link {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}
.back-link::before { content: '←'; }
.back-link:hover { color: var(--green); }
.dateline {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--green);
  text-transform: uppercase;
}
.issue-info {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

/* --- ブランドロゴ領域 (第一階層) --- */
.masthead-brand {
  text-align: center;
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
  margin-top: 0;
  background: linear-gradient(to bottom, transparent, var(--paper) 40%);
  overflow: hidden;
}

/* インデックスページのカバー画像付き masthead-brand */
.masthead.is-index .masthead-brand {
  height: 240px;
  background-image:
    linear-gradient(
      rgba(249, 248, 245, 0.15) 0%,
      rgba(249, 248, 245, 0.25) 30%,
      rgba(249, 248, 245, 0.8) 70%,
      rgba(249, 248, 245, 1) 100%
    ),
    url("cover-mokuto.png");
  background-size: cover;
  background-position: center 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--rule-strong);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.brand-name {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: 0.25em;
  line-height: 1;
  color: var(--ink);
  text-transform: uppercase;
  text-decoration: none;
  display: block;
}
.brand-name:hover { color: var(--green); }
.brand-rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem auto 0.4rem;
  max-width: 600px;
}
.brand-rule::before,
.brand-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule-strong);
}
.brand-sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--green);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ═════ 第二階層: ナビゲーションバー (スティッキー固定) ═════ */
.masthead-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.6rem 2.5rem;
  background: rgba(249, 248, 245, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-strong);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease;
  will-change: transform;
  max-width: none; /* ナビは全幅 */
}
.masthead-nav.is-hidden {
  transform: translateY(-100%);
}
.masthead-nav.is-sticky {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* --- インラインロゴ (スティッキー時のみ出現) --- */
.nav-brand {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease,
              margin 0.35s ease;
  margin-right: 0;
}
.nav-brand-logo {
  font-family: var(--serif);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--ink);
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  padding-right: 1.2rem;
  border-right: 1px solid var(--rule-strong);
}
.nav-brand-logo:hover { color: var(--green); }

/* スティッキー時にインラインロゴをスライドイン */
.masthead-nav.is-sticky .nav-brand {
  max-width: 240px;
  opacity: 1;
  margin-right: 0.5rem;
}

/* --- ナビリンク群コンテナ --- */
.nav-links-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
}

.nav-link {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0.3rem 1.2rem;
  border-right: 1px solid var(--rule);
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-link:first-child {
  border-left: 1px solid var(--rule);
}
.nav-link:hover, .nav-link.active {
  color: var(--green);
}

/* 🌿 他の個別ページ用ヘッダー微調整 */

/* masthead-top 内のパンくずナビ (archive_run用) */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-links .back-link {
  border-right: 1px solid var(--rule);
  padding-right: 0.5rem;
}
.nav-links .back-link::before { content: ''; }
.nav-links .back-link:first-child::before { content: '←'; margin-right: 0.3rem; }

/* archive_run 企業タグ */
.tag-company {
  background: var(--green-glass);
  color: var(--green);
}

.back-link + .dateline,
.back-link + .issue-info,
.nav-links + .dateline {
  margin-left: auto;
}
header.masthead:not(.is-index) .masthead-brand {
  margin-top: 0;
  background: none;
  padding: 1.25rem 0 1rem;
}
header.masthead:not(.is-index) .brand-name {
  font-size: clamp(1.4rem, 4vw, 2.5rem);
}
header.masthead:not(.is-index) .brand-rule {
  max-width: 400px;
  margin: 0.4rem auto 0;
}
header.masthead:not(.is-index) .brand-sub {
  font-size: 0.58rem;
}

/* ═════ LAYOUT CONTAINERS ═════ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2.5rem;
}
.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.main-col {
  border-right: 1px solid var(--rule);
  padding: 2.5rem 2.5rem 2.5rem 0;
}
.side-col {
  padding: 2.5rem 1.25rem 2.5rem 2rem;
}
.page-hero {
  max-width: 1100px;
  margin: 2.5rem auto 1.5rem;
  padding: 0 2rem;
}
.page-hero h1 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.page-hero p {
  color: var(--muted);
  font-size: 0.88rem;
}
.articles-list {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.article-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

/* ═════ SECTION HEADERS & DIVIDERS ═════ */
.section-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  white-space: nowrap;
}
.section-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
}
.section-divider-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  white-space: nowrap;
}
.section-divider::before, .section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ═════ TAGS & BADGES ═════ */
.tag, .badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border: 1px solid currentColor;
  display: inline-flex;
  align-items: center;
}
.badge {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
}
.tag-critical, .tag-badge-critical, .badge-sponsored { color: var(--accent-red); border-color: var(--accent-red); }
.tag-high, .tag-important, .badge-editorial      { color: var(--komorebi); border-color: var(--komorebi); }
.badge-editorial { color: var(--green); border-color: var(--green); }
.tag-medium, .tag-notable, .badge-column          { color: var(--bark); border-color: var(--bark); }
.badge-column { color: var(--accent-purple); border-color: var(--accent-purple); }
.tag-low, .tag-general, .badge-category           { color: var(--muted); border-color: var(--muted); }
.badge-category { color: var(--bark); border-color: var(--bark); }
.tag-info, .badge-info                            { color: var(--muted); border-color: var(--rule-strong); }
.tag-cat                                          { color: var(--ink-3); border-color: var(--rule-strong); }
.tag-source, .tag-badge-source                    { color: var(--muted); border-color: transparent; }

/* ═════ HERO ARTICLE ═════ */
.hero-article {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
  animation: fadeUp 0.6s ease both;
}
.hero-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/7;
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: var(--paper-3);
  border-radius: 2px;
}
.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.hero-img-wrap:hover img {
  transform: scale(1.02);
}
.hero-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(249,248,245,0.4) 0%, transparent 50%);
  pointer-events: none;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.9rem;
  color: var(--ink);
}
.hero-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.hero-title a:hover {
  color: var(--green);
}
.hero-body {
  font-size: 1.0rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 1rem;
}
.read-more {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s, color 0.2s;
}
.read-more::after {
  content: '→';
}
.read-more:hover {
  gap: 0.7rem;
  color: var(--green-light);
}

/* ═════ ARTICLE GRID & LIST ═════ */
.article-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 2.5rem;
  border-top: 1px solid var(--rule);
}
.grid-article {
  padding: 1.5rem 1.5rem 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.grid-article:nth-child(even) {
  padding-left: 1.5rem;
  padding-right: 0;
  border-right: none;
}
.grid-article-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 0.9rem;
  transition: transform 0.3s;
  background: var(--paper-3);
  display: block;
  border-radius: 2px;
}
.grid-article:hover .grid-article-img {
  transform: scale(1.02);
}
.grid-title {
  font-family: var(--serif);
  font-size: 1.0rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0.6rem 0 0.5rem;
  color: var(--ink);
}
.grid-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.grid-title a:hover {
  color: var(--green);
}
.grid-excerpt {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-list {
  border-top: 1px solid var(--rule);
}
.list-article {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.list-article-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.3s;
  background: var(--paper-3);
  display: block;
  border-radius: 2px;
}
.list-article:hover .list-article-img {
  transform: scale(1.02);
}
.list-title {
  font-family: var(--serif);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0.3rem 0 0.25rem;
  color: var(--ink);
}
.list-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.list-title a:hover {
  color: var(--green);
}
.list-excerpt {
  font-size: 0.82rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═════ SIDEBAR ═════ */
.sidebar-block {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
.sidebar-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.sidebar-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.85rem;
}
.stat-row:last-child {
  border-bottom: none;
}
.stat-label {
  color: var(--muted);
  font-size: 0.8rem;
}
.stat-val {
  font-family: var(--mono);
  color: var(--ink);
  font-size: 0.85rem;
}
.archive-day {
  margin-bottom: 1.5rem;
}
.archive-date {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  display: block;
}
.archive-items {
  list-style: none;
}
.archive-item {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--rule);
}
.archive-item:last-child {
  border-bottom: none;
}
.archive-tag {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--green);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}
.archive-item a {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.archive-item a:hover {
  color: var(--green);
}
.archive-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--rule-strong);
  transition: background 0.2s, color 0.2s;
}
.archive-cta:hover {
  background: var(--green);
  color: var(--paper);
}
.source-list {
  list-style: none;
}
.source-item {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--rule);
}
.source-item:last-child {
  border-bottom: none;
}
.source-item a {
  font-size: 0.84rem;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}
.source-item a::before {
  content: '↗';
  font-size: 0.65rem;
  color: var(--green);
}
.source-item a:hover {
  color: var(--ink);
}
.about-text {
  font-size: 0.84rem;
  line-height: 1.8;
  color: var(--muted);
}

/* ═════ FILTER TABS ═════ */
.filter-bar {
  display: flex;
  margin-bottom: 2rem;
  border: 1px solid var(--rule);
  flex-wrap: wrap;
}
.filter-btn {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  border-right: 1px solid var(--rule);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.filter-btn:last-child {
  border-right: none;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--green-pale);
  color: var(--green);
}

/* ═════ TIMELINE ═════ */
.timeline-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.timeline {
  position: relative;
  padding-left: 1.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--green) 0%,
    var(--green-light) 40%,
    var(--bark-light) 100%
  );
  border-radius: 1px;
}
.tl-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tl-date {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--bark);
}
.tl-item {
  position: relative;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  animation: fadeUp 0.5s ease both;
}
.tl-item:last-child {
  border-bottom: none;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 1.1rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--green);
  transform: translateX(-3px);
}
.tl-item.tl-high::before {
  border-color: var(--accent-red);
}
.tl-item.tl-cluster::before {
  border-color: var(--komorebi);
  box-shadow: 0 0 0 3px rgba(201,185,123,0.15);
}
.tl-time {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--green);
}
.tl-source {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.tl-domain {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  color: var(--bark-light);
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
}
.tl-title {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-2);
  margin-top: 0.3rem;
}
.tl-title a {
  color: inherit;
  text-decoration: none;
}
.tl-title a:hover {
  color: var(--green);
}

/* ═════ ARCHIVE SECTION SPECIFICS ═════ */
.page-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
.date-group {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.date-group h2 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.4rem;
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.5rem;
}
.history-table th,
.history-table td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.history-table th {
  background: var(--paper-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.history-table td {
  font-size: 0.88rem;
  color: var(--ink);
}
.history-table a {
  color: var(--green);
}
.history-table a:hover {
  color: var(--green-light);
}
.history-table tr:hover {
  background: var(--green-pale);
}
.run-preview {
  list-style: none;
  padding: 0.5rem 0 1rem 1rem;
}
.run-preview li {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--rule);
}
.run-preview li:last-child {
  border-bottom: none;
}
.run-preview .more {
  font-size: 0.78rem;
  color: var(--bark);
}
.empty-state {
  color: var(--muted);
  margin-top: 2rem;
  font-size: 0.9rem;
}

/* ═════ HUMAN COLUMNS SPECIFICS ═════ */
.column-card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1.25rem;
  transition: border-color 0.2s;
}
.column-card:hover {
  border-color: var(--rule-strong);
}
.column-card-image {
  width: 120px;
  height: 80px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--paper-3);
}
.column-card-body {
  flex: 1;
  min-width: 0;
}
.column-card-body .badges {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.column-card-body h2 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}
.column-card-body h2 a {
  color: var(--ink);
}
.column-card-body h2 a:hover {
  color: var(--green);
}
.column-card-body .lead {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.column-card-body .meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.ad-notice {
  background: rgba(181,73,58,0.06);
  border: 1px solid rgba(181,73,58,0.2);
  padding: 0.6rem 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent-red);
  text-align: center;
  max-width: 860px;
  margin: 1rem auto 0;
}
.ad-footer-notice {
  background: rgba(181,73,58,0.06);
  border: 1px solid rgba(181,73,58,0.2);
  padding: 0.75rem 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent-red);
  margin-top: 2.5rem;
  text-align: center;
}
.hero-image-wrap {
  max-width: 1280px;
  margin: 2rem auto 0;
  padding: 0 2.5rem;
  width: 100%;
}
.hero-image-wrap img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  display: block;
  background: var(--paper-3);
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.hero-image {
  width: calc(100% - 5rem);
  max-width: 1200px;
  max-height: 500px;
  object-fit: cover;
  display: block;
  margin: 2rem auto 0;
  background: var(--paper-3);
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.author-box {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.author-box .author-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}
.author-box .author-title {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ═════ TYPOGRAPHY & ARTICLE INTERIOR ═════ */
.article-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 2rem 5rem;
}
.article-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.article-headline {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 1.25rem;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}
.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.article-lead {
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--ink-3);
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--green);
  background: var(--green-pale);
}
.article-body {
  font-size: 1.05rem;
  line-height: 1.95;
  color: var(--ink-3);
  margin-bottom: 2.5rem;
}
.article-body p {
  margin-bottom: 1.3rem;
}
.article-body p:last-child {
  margin-bottom: 0;
}
.article-body h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.article-body h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--green);
}
.article-body ul, .article-body ol {
  margin: 0.75rem 0 1.2rem 1.5rem;
}
.article-body li {
  margin-bottom: 0.4rem;
}
.article-body blockquote {
  border-left: 3px solid var(--green);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: var(--green-pale);
  color: var(--ink-3);
}
.article-body code {
  background: var(--paper-3);
  padding: 0.15rem 0.4rem;
  font-family: var(--mono);
  font-size: 0.9em;
}
.article-body pre {
  background: var(--paper-3);
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.2rem;
}
.article-body pre code {
  background: none;
  padding: 0;
}
.article-body strong {
  color: var(--ink);
  font-weight: 700;
}
.article-body a {
  color: var(--green);
}
.article-body a:hover {
  color: var(--green-light);
}
.article-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

.sources-section {
  margin-bottom: 2.5rem;
  padding: 1.25rem;
  border: 1px solid var(--rule);
}
.sources-section h3 {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.sources-section ul {
  list-style: none;
}
.sources-section li {
  font-size: 0.84rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--rule);
  word-break: break-all;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.sources-section li:last-child {
  border-bottom: none;
}
.sources-section li::before {
  content: '↗';
  font-size: 0.6rem;
  color: var(--green);
  flex-shrink: 0;
}
.sources-section li a {
  color: var(--muted);
}
.sources-section li a:hover {
  color: var(--green);
}
.primary-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--green);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 3rem;
}
.primary-source-btn::after {
  content: '→';
}
.primary-source-btn:hover {
  background: var(--green);
  color: var(--paper);
}
.cite-ref {
  font-family: var(--mono);
  font-size: 0.78em;
  color: var(--green);
  text-decoration: none;
  vertical-align: super;
  line-height: 1;
}
.cite-ref:hover {
  color: var(--green-light);
  text-decoration: underline;
}

/* ═════ FOOTER ═════ */
.site-footer {
  border-top: 1px solid var(--rule-strong);
  padding: 2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}
.footer-brand {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ink);
  text-transform: uppercase;
}
.footer-copy {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.footer-disclaimer {
  font-size: 0.74rem;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.6;
}

/* 🌿 異なるフッター用微調整 */
footer.site-footer:not([class*="site-footer "]) {
  text-align: center;
  display: block;
}
footer.site-footer:not([class*="site-footer "]) p {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ═════ ANIMATIONS ═════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.grid-article:nth-child(1) { animation: fadeUp 0.6s ease 0.10s both; }
.grid-article:nth-child(2) { animation: fadeUp 0.6s ease 0.15s both; }
.grid-article:nth-child(3) { animation: fadeUp 0.6s ease 0.20s both; }
.grid-article:nth-child(4) { animation: fadeUp 0.6s ease 0.25s both; }

/* ═════ RESPONSIVE ═════ */
@media (max-width: 960px) {
  .content-wrap {
    grid-template-columns: 1fr;
  }
  .main-col {
    border-right: none;
    padding-right: 0;
  }
  .side-col {
    padding-left: 0;
    border-top: 1px solid var(--rule);
  }
}
@media (max-width: 640px) {
  .masthead {
    padding: 0 1.25rem;
  }
  /* カテゴリナビゲーションの横スクロールカルーセル化 */
  .masthead-nav {
    padding: 0.5rem 1rem;
  }
  .nav-links-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-links-wrap::-webkit-scrollbar {
    display: none;
  }
  .nav-link {
    flex-shrink: 0;
    padding: 0.3rem 0.8rem !important;
  }
  .container {
    padding: 0 1.25rem;
  }
  .article-wrap {
    padding: 1.5rem 1rem 3rem;
  }
  .article-headline {
    font-size: 1.3rem;
  }
  .site-footer {
    padding: 1.5rem 1.25rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .article-grid {
    grid-template-columns: 1fr;
  }
  .grid-article {
    padding: 1.5rem 0;
    border-right: none;
  }
  .grid-article:nth-child(even) {
    padding-left: 0;
  }
  .list-article {
    grid-template-columns: 80px 1fr;
  }
  .column-card {
    flex-direction: column;
  }
  .column-card-image {
    width: 100%;
    height: 160px;
  }
  .hero-image-wrap {
    padding: 0 1.25rem;
    margin: 1rem auto 0;
  }
  .hero-image-wrap img {
    max-height: 300px;
    border-radius: 0;
    box-shadow: none;
  }
  .hero-image {
    width: calc(100% - 2.5rem);
    max-height: 300px;
    border-radius: 0;
    box-shadow: none;
    margin: 1rem auto 0;
  }

  /* インデックスページの背景付きブランドヘッダー（モバイル） */
  .masthead.is-index .masthead-brand {
    height: 140px;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding: 1rem;
  }
  .masthead.is-index .brand-name {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    letter-spacing: 0.15em;
  }
  .masthead.is-index .brand-rule {
    max-width: 320px;
    width: 90%;
    margin-top: 0.25rem;
  }
  .masthead.is-index .brand-sub {
    font-size: 0.58rem;
  }

  /* スティッキー時のインラインロゴ: モバイルでは少し小さく */
  .nav-brand-logo {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    padding-right: 0.8rem;
  }
}

/* ============================================================
   Phase 4: Breadcrumb & Related Articles
   既存ルール変更禁止。本コメント以降が追記分。
   ============================================================ */

/* --- Breadcrumb --- */
.breadcrumb {
  max-width: 800px;
  margin: 16px auto 0;
  padding: 0 20px;
  font-size: 12px;
  color: #666;
  font-family: "Noto Sans JP", sans-serif;
}
.breadcrumb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.breadcrumb-item {
  display: inline-flex;
  align-items: center;
}
.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  margin-right: 6px;
  color: #999;
}
.breadcrumb-item a {
  color: #333;
  text-decoration: none;
}
.breadcrumb-item a:hover {
  text-decoration: underline;
}
.breadcrumb-current span {
  color: #666;
  /* 長すぎる記事タイトルは1行で省略 */
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
}

/* --- Related Articles --- */
.related-articles {
  max-width: 800px;
  margin: 48px auto 32px;
  padding: 0 20px;
  font-family: "Noto Sans JP", sans-serif;
}
.related-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.related-title {
  font-family: "Noto Serif JP", serif;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.05em;
}
.related-rule {
  flex: 1;
  height: 1px;
  background: #ddd;
}
.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.related-item {
  border-top: 1px solid #eee;
  padding-top: 12px;
}
.related-link {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.related-thumb-wrap {
  flex: 0 0 80px;
  width: 80px;
  height: 60px;
  overflow: hidden;
  background: #f5f5f5;
  border-radius: 2px;
}
.related-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.related-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.related-cat {
  font-size: 11px;
  color: #888;
  letter-spacing: 0.05em;
}
.related-headline {
  font-size: 13px;
  line-height: 1.5;
  color: #1a1a1a;
  /* 3行で省略 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 3;
}
.related-link:hover .related-headline {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .related-list {
    grid-template-columns: 1fr;
  }
  .breadcrumb-current span {
    max-width: 200px;
  }
}

/* ── Phase 6: Image Optimization & CLS Suppressions ── */
.hero-img-wrap img,
.grid-article-img,
.list-article-img,
.related-thumb,
.hero-image-wrap img {
  content-visibility: auto; /* optimize offscreen rendering */
}

.hero-image-wrap {
  aspect-ratio: 16/9;
  background: var(--paper-3);
  overflow: hidden;
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   Phase 7: Category / Archive / h1 markup change
   既存ルール変更禁止。本コメント以降が追記分。
   ============================================================ */

/* --- h1 マークアップ変更への対応（ビジュアル維持） --- */
.brand-heading {
  margin: 0;
  padding: 0;
  font-weight: inherit;
  font-size: inherit;
  display: block;
}
.brand-heading .brand-name {
  display: block;
}
/* brand-rule が元 <div> から <span> になったため、必要なら inline → block 復帰 */
.brand-heading .brand-rule {
  display: flex;
}

/* --- Category page --- */
.category-page,
.archive-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  font-family: "Noto Sans JP", sans-serif;
}
.category-head,
.archive-head {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ddd;
}
.category-title,
.archive-title {
  font-family: "Noto Serif JP", serif;
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: 0.05em;
}
.category-count,
.archive-count {
  font-size: 12px;
  color: #888;
  margin: 0;
}
.category-list,
.archive-month-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.category-item {
  border-bottom: 1px solid #eee;
  padding: 12px 0;
}
.category-link {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.category-thumb-wrap {
  flex: 0 0 100px;
  width: 100px;
  height: 75px;
  overflow: hidden;
  background: #f5f5f5;
  border-radius: 2px;
}
.category-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.category-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.category-date {
  font-size: 11px;
  color: #888;
  letter-spacing: 0.05em;
}
.category-headline {
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a1a;
}
.category-link:hover .category-headline {
  text-decoration: underline;
}

/* --- Archive month list --- */
.archive-month-item {
  border-bottom: 1px solid #eee;
}
.archive-month-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  text-decoration: none;
  color: inherit;
}
.archive-month-label {
  font-size: 14px;
}
.archive-month-count {
  font-size: 12px;
  color: #888;
}
.archive-month-link:hover .archive-month-label {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .category-thumb-wrap {
    flex: 0 0 80px;
    width: 80px;
    height: 60px;
  }
}

/* ============================================================
   Phase 8: E-E-A-T 強化 (About / Privacy / Contact / Footer)
   ============================================================ */

/* --- 静的ページ汎用レイアウト --- */
.static-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
  animation: fadeUp 0.6s ease both;
}
.static-content {
  background: var(--paper-2);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  padding: 3rem 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}
.static-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule-strong);
  line-height: 1.3;
}
.static-section {
  margin-bottom: 2.5rem;
}
.static-section:last-of-type {
  margin-bottom: 0;
}
.static-section h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1.2rem;
  position: relative;
  padding-left: 0.8rem;
  line-height: 1.4;
}
.static-section h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 4px;
  background: var(--green);
}
.static-section h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-2);
  margin: 1.5rem 0 0.8rem;
}
.static-section p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--ink-2);
  margin-bottom: 1.2rem;
}
.static-section p:last-child {
  margin-bottom: 0;
}
.static-section ul,
.static-section ol {
  margin: 0.8rem 0 1.2rem 1.5rem;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.static-section li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.static-dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.8rem 1rem;
  font-size: 0.95rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}
.static-dl dt {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--green);
}
.static-dl dd {
  color: var(--ink-2);
}
.static-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 3rem;
  text-align: right;
}

/* --- 全ページ共通フッター --- */
.site-footer {
  background: var(--paper-2);
  border-top: 1px solid var(--rule-strong);
  padding: 3.5rem 0;
  margin-top: 5rem;
}
.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-brand-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-transform: uppercase;
}
.footer-copyright {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
}
.footer-nav {
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 0.82rem;
  color: var(--muted);
  transition: color 0.2s;
  font-weight: 400;
}
.footer-nav a:hover {
  color: var(--green);
}
.footer-external a {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--rule-strong);
  padding: 0.35rem 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.footer-external a:hover {
  background: var(--green);
  color: var(--paper);
  border-color: var(--green);
}

/* --- フッターレスポンシブ --- */
@media (max-width: 768px) {
  .site-footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }
  .footer-nav {
    justify-content: center;
    gap: 1rem 1.5rem;
  }
  .static-content {
    padding: 2rem 1.5rem;
  }
  .static-dl {
    grid-template-columns: 1fr;
    gap: 0.3rem 0;
  }
}

/* ===== Phase 8.1: contact email styles ===== */
.contact-email {
  font-size: 1.1rem;
  margin: 1.2em 0;
  text-align: center;
}
.contact-email a {
  word-break: break-all;
}

.footer-contact {
  font-size: 0.82rem;
  color: var(--muted);
  transition: color 0.2s;
  font-weight: 400;
}
.footer-contact:hover {
  color: var(--green);
}

