/* =========================================================
   数量経済分析 ― 原文に忠実な全文和訳（reading layout）
   econ.css のトークン・コンポーネントを前提に、
   「図解」ではなく「通読できる訳文」のための最小追加スタイル。
   ========================================================= */

/* ===== 図解 ⇄ 和訳 切替え ===== */
.yaku-switch {
  position: sticky; top: 10px; z-index: 50;
  display: inline-flex; gap: 4px; margin: 20px 0 16px;
  background: var(--surface); border: 1px solid var(--indigo-100);
  border-radius: 999px; padding: 4px;
  box-shadow: 0 6px 18px rgba(30,27,75,0.12);
}
.yaku-switch .ys-opt {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  padding: 7px 16px; border-radius: 999px;
  text-decoration: none; color: var(--muted-strong);
  transition: background 0.15s, color 0.15s;
}
.yaku-switch .ys-opt i { width: 15px; height: 15px; }
.yaku-switch a.ys-opt:hover { color: var(--canopy); background: var(--indigo-50); }
.yaku-switch .ys-opt.active { background: var(--forest); color: #FFFFFF; }
.yaku-switch .ys-opt.disabled { color: var(--muted); opacity: 0.55; cursor: default; }

/* ===== 原典ページマーカー ===== */
.page-marker {
  display: flex; align-items: center; gap: 10px;
  margin: 34px 0 14px; color: var(--forest);
}
.page-marker::before {
  content: attr(data-page);
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  white-space: nowrap; flex-shrink: 0;
}
.page-marker::after {
  content: ''; flex: 1; height: 1px;
  background: var(--indigo-100);
}

/* ===== 訳文本体 ===== */
.yaku-body { max-width: 760px; margin: 0 auto; }
.yaku-body h2 {
  font-size: clamp(20px, 2.3vw, 26px); font-weight: 700;
  color: var(--midnight-soil); letter-spacing: -0.01em; line-height: 1.4;
  margin: 40px 0 14px; padding-bottom: 8px;
  border-bottom: 2px solid var(--indigo-100);
}
.yaku-body h2 .en {
  display: block; font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 600; color: var(--muted);
  letter-spacing: 0; margin-top: 3px;
}
.yaku-body h3 {
  font-size: 17px; font-weight: 700; color: var(--canopy);
  margin: 26px 0 10px;
}
.yaku-body h3 .en {
  font-family: 'Inter', sans-serif; font-size: 13px;
  font-weight: 600; color: var(--muted); margin-left: 8px;
}
.yaku-body p { margin-bottom: 14px; font-size: 16px; line-height: 1.9; }
.yaku-body ul, .yaku-body ol { margin: 0 0 16px 1.5em; }
.yaku-body li { font-size: 16px; line-height: 1.85; margin-bottom: 7px; }
.yaku-body ul ul, .yaku-body ol ol { margin-top: 7px; margin-bottom: 0; }

/* 原語併記（術語の英語） */
.term-en {
  font-family: 'Inter', sans-serif; font-size: 0.86em;
  color: var(--muted); font-weight: 500;
}

/* リード・エピグラフ（章頭の引用句） */
.epigraph {
  border-left: 3px solid var(--indigo-300);
  padding: 4px 0 4px 18px; margin: 8px 0 24px;
  font-size: 16px; line-height: 1.8; color: var(--muted-strong);
}
.epigraph .src {
  display: block; font-size: 13px; color: var(--muted);
  margin-top: 6px; font-family: 'Inter', sans-serif;
}

/* 訳注・原注 */
.translator-note {
  background: var(--indigo-50); border: 1px dashed var(--indigo-200);
  border-radius: 8px; padding: 12px 16px; margin: 16px 0;
  font-size: 14px; line-height: 1.75; color: var(--muted-strong);
}
.translator-note strong { color: var(--canopy); }

/* ===== 脚注 ===== */
sup.fnref { font-size: 0.7em; font-weight: 700; }
sup.fnref a { color: var(--forest); text-decoration: none; padding: 0 1px; }
sup.fnref a:hover { text-decoration: underline; }
.footnotes {
  margin-top: 40px; padding-top: 18px;
  border-top: 1px solid var(--indigo-100);
}
.footnotes-title {
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 700;
  color: var(--forest); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 10px;
}
.footnotes ol { margin: 0 0 0 1.4em; padding: 0; }
.footnotes li {
  font-size: 13px; line-height: 1.7; color: var(--muted-strong);
  margin-bottom: 8px;
}
.footnotes li a.fnback { color: var(--forest); text-decoration: none; margin-left: 4px; }

/* ===== ダークモード ===== */
@media (prefers-color-scheme: dark) {
  .yaku-switch { background: #1B1A33; border-color: #353275; }
  .yaku-switch a.ys-opt:hover { background: #232150; }
  .yaku-body h2 { border-bottom-color: #353275; }
  .page-marker::after { background: #353275; }
  .translator-note { background: #1E1D3A; border-color: #353275; }
  .footnotes { border-top-color: #353275; }
}
