@charset "UTF-8";
/* =========================================================
   経済指標チャート (/chart/) 専用スタイル
   色・フォントは css/style.css の CSS変数に従う
   ========================================================= */

.econ {
  padding: 76px 0 90px;
}
.econ__inner {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

/* ---------- 見出し ---------- */
.econ-hero { margin-bottom: 22px; }
.econ-hero__eyebrow {
  font-family: var(--en);
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.econ-hero h1 {
  font-family: var(--serif);
  font-size: clamp(25px, 4.2vw, 40px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.econ-hero__lead {
  font-size: 15.5px;
  color: var(--text-dim);
  line-height: 2;
  max-width: 62em;
}
.econ-hero__lead strong { color: var(--text); font-weight: 600; }
.econ-hero__updated {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.econ-hero__updated b { color: var(--gold-light); font-weight: 600; }

/* ---------- アプリ本体 ---------- */
.econ-app {
  background: var(--navy-900);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 18px 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

/* ---------- プリセット(分類つきプルダウン) ---------- */
.econ-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 14px;
}
.econ-select__label {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-weight: 600;
  flex: 0 0 auto;
}
.econ-select {
  position: relative;
  flex: 1 1 320px;
  max-width: 460px;
}
.econ-select__btn {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--navy-700);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  text-align: left;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.econ-select__btn:hover { border-color: rgba(201, 162, 39, 0.6); }
.econ-select__btn:focus-visible { outline: 1px solid var(--gold); outline-offset: 1px; }
.econ-select.is-open .econ-select__btn {
  border-color: var(--gold);
  background: var(--navy-600);
}
.econ-select__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.econ-select.is-custom .econ-select__value { color: var(--text-dim); font-weight: 400; }
.econ-select__caret {
  flex: none;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--gold-light);
  border-bottom: 1.5px solid var(--gold-light);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.18s;
}
.econ-select.is-open .econ-select__caret { transform: translateY(1px) rotate(225deg); }

.econ-select__menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--navy-900);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.6);
  padding: 6px;
}
.econ-select.is-up .econ-select__menu { top: auto; bottom: calc(100% + 6px); }
.econ-select__menu[hidden] { display: none; }
.econ-select__cat {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 600;
  padding: 10px 10px 5px;
  border-top: 1px solid var(--line-dim);
  margin-top: 4px;
}
.econ-select__group:first-child .econ-select__cat { border-top: 0; margin-top: 0; padding-top: 4px; }
.econ-select__opt {
  display: flex;
  align-items: center;
  min-height: 44px;              /* スマホのタップ領域 */
  padding: 8px 10px 8px 26px;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
  position: relative;
}
.econ-select__opt:hover { background: rgba(201, 162, 39, 0.1); }
.econ-select__opt:focus { outline: none; background: rgba(201, 162, 39, 0.16); }
.econ-select__opt:focus-visible { box-shadow: inset 0 0 0 1px var(--gold); }
.econ-select__opt.is-selected { color: var(--gold-pale); font-weight: 600; }
.econ-select__opt.is-selected::before {
  content: "";
  position: absolute;
  left: 10px; top: 50%;
  width: 5px; height: 9px;
  margin-top: -6px;
  border-right: 1.5px solid var(--gold-light);
  border-bottom: 1.5px solid var(--gold-light);
  transform: rotate(45deg);
}

/* ---------- チャート ---------- */
.econ-chartwrap {
  position: relative;
  height: clamp(340px, 52vh, 560px);
  border: 1px solid var(--line-dim);
  border-radius: 8px;
  background: var(--navy-800);
  overflow: hidden;
}
.econ-chart { position: absolute; inset: 0; }

/* 透かし(描画領域の内側・右下)。ヘッダーロゴと同じ書体のゴールドを薄く置く。
   価格軸・時間軸には重ねず、左下のTradingView帰属ロゴにも触れない。 */
.econ-watermark {
  position: absolute;
  right: 14px;
  bottom: 34px;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  white-space: nowrap;
  color: var(--gold-light);
  /* スクショで引用されたときにブランド名が読める濃さ。これ以上濃くすると
     右下を通る線の判読を邪魔する(PNG書き出し側の globalAlpha と必ずそろえる) */
  opacity: 0.46;
}
/* 右に価格軸が出ているときは、その内側へ寄せる */
.econ-chartwrap.has-axis-r .econ-watermark { right: 84px; }

/* イベントの帯・縦線(チャートの上に重ねる。操作は下に通す) */
.econ-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}
.econ-band {
  position: absolute;
  top: 0; bottom: 26px;
  background: rgba(154, 163, 181, 0.09);   /* 線の邪魔をしない薄さ(縁取りは全期間表示で縞に見えるので付けない) */
}
.econ-band--1 { background: rgba(86, 180, 233, 0.07); }
/* 出来事は「旗竿」。竿=ゴールドの細い実線(カーソルの十字は白の点線なので混ざらない)、
   旗=竿にぴったり付いたラベル。旗の左の縁がそのまま竿になるので、どの線の話かを
   目でたどれる。上端に小さな▼を付けて、線の始まりを示す。 */
.econ-mark {
  position: absolute;
  top: 0; bottom: 26px;
  border-left: 1px solid rgba(201, 162, 39, 0.5);
}
.econ-mark::before {           /* 線の上端の▼マーカー */
  content: "";
  position: absolute;
  top: 0; left: -3.5px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(201, 162, 39, 0.85);
}
.econ-mark__flag {
  position: absolute;
  left: 0;                     /* 竿にぴったり接続する(浮かせない) */
  display: block;
  white-space: nowrap;
  color: var(--gold-pale);
  background: rgba(8, 15, 30, 0.88);
  border: 1px solid var(--line-dim);
  border-left: 2px solid rgba(201, 162, 39, 0.85);
  border-radius: 0 4px 4px 0;
  padding: 3px 7px 4px;
}
.econ-mark__flag b { display: block; font-size: 10.5px; font-weight: 600; line-height: 1.35; }
.econ-mark__flag i {
  display: block;
  font-style: normal;
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-dim);
}
/* 右端に近い出来事は左右反転して、右の縁を竿に付ける */
.econ-mark--flip .econ-mark__flag {
  left: auto; right: 0;
  border-left: 1px solid var(--line-dim);
  border-right: 2px solid rgba(201, 162, 39, 0.85);
  border-radius: 4px 0 0 4px;
  text-align: right;
}

/* 軸ラベル */
.econ-axis {
  position: absolute;
  top: 6px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--gold-light);
  background: rgba(8, 15, 30, 0.78);
  border: 1px solid var(--line-dim);
  border-radius: 3px;
  padding: 3px 7px;
  z-index: 3;
  pointer-events: none;
}
.econ-axis--l { left: 76px; }   /* 価格軸の数字(最上段)に重ならないよう描画領域の内側へ */
.econ-axis--r { right: 76px; }

/* 吹き出し */
.econ-tip {
  position: absolute;
  top: 0; left: 0;
  display: none;
  z-index: 4;
  pointer-events: none;
  min-width: 168px;
  max-width: 264px;
  background: rgba(6, 11, 22, 0.94);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  font-size: 12px;
  line-height: 1.6;
}
.econ-tip__date {
  font-size: 11.5px;
  color: var(--gold-light);
  border-bottom: 1px solid var(--line-dim);
  padding-bottom: 5px;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
.econ-tip__row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}
.econ-tip__row i {
  width: 9px; height: 3px;
  border-radius: 2px;
  flex: none;
  transform: translateY(-3px);
}
.econ-tip__name { color: var(--text-dim); flex: 1 1 auto; }
.econ-tip__val { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.econ-tip__val small { font-size: 10px; font-weight: 400; color: var(--text-dim); margin-left: 1px; }
.econ-tip__as { color: #8b93a5; font-size: 10px; flex: 0 0 100%; text-align: right; }
/* 旗を出していない出来事(狭い画面)の名前。線に触れたときだけ出す */
.econ-tip__ev {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid var(--line-dim);
  color: var(--gold-pale);
  font-size: 11.5px;
  line-height: 1.5;
  white-space: normal;
}
.econ-tip__ev span { display: block; color: var(--text-dim); font-size: 10px; }

/* 凡例(現在値) */
.econ-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 12px 2px 0;
  font-size: 12.5px;
}
.econ-legend__empty { color: var(--text-dim); }
.econ-legend__item { display: inline-flex; align-items: baseline; gap: 6px; }
.econ-legend__item i { width: 11px; height: 3px; border-radius: 2px; transform: translateY(-3px); }
.econ-legend__item b { font-weight: 600; color: var(--text-dim); }
.econ-legend__item em {
  font-style: normal; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums lining-nums;
}
.econ-legend__item em small { font-size: 10px; font-weight: 400; color: var(--text-dim); margin-left: 1px; }
/* 値がいつ時点のものか(更新は半年に1回なので必ず出す) */
.econ-legend__as { font-size: 10px; color: #7d8598; font-variant-numeric: lining-nums; }
.econ-legend__item u {
  text-decoration: none; font-size: 10px; color: #7d8598;
  border: 1px solid var(--line-dim); border-radius: 3px; padding: 0 4px;
}

/* ---------- 操作パネル ---------- */
.econ-panel {
  margin-top: 18px;
  border-top: 1px solid var(--line-dim);
  padding-top: 16px;
  display: grid;
  gap: 16px;
}

.econ-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  align-items: start;      /* 系列数の少ないグループが縦に間延びしないように */
  gap: 12px;
}
.econ-group {
  border: 1px solid var(--line-dim);
  border-radius: 8px;
  padding: 10px 12px 12px;
  background: var(--navy-800);
  transition: opacity 0.2s;
}
.econ-group.is-locked { opacity: 0.45; }
.econ-group__title {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--gold);
  padding: 0 4px;
  font-weight: 600;
}
.econ-group__items { display: grid; grid-template-columns: 1fr; gap: 2px; margin-top: 4px; }
@media (min-width: 861px) {
  /* PER列は「東証プライムPER」、株価列は「S&P500円換算」が入るので少し広くとる
     (折り返すと1行だけ2行になって行がガタつく) */
  .econ-groups { grid-template-columns: 2fr 0.95fr 1.2fr 1.2fr; }
  .econ-group:first-child .econ-group__items { grid-template-columns: 1fr 1fr; }
}
.econ-group__lock {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-dim);
}

.econ-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;           /* スマホのタップ領域 */
  padding: 2px 4px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
}
.econ-check:hover { background: rgba(201, 162, 39, 0.07); }
.econ-check input { width: 17px; height: 17px; accent-color: #c9a227; cursor: pointer; flex: none; }
.econ-check input:disabled { cursor: not-allowed; }
.econ-check__swatch { width: 14px; height: 3px; border-radius: 2px; flex: none; }
.econ-check__label { color: var(--text); }
.econ-check input:disabled ~ .econ-check__label { color: var(--text-dim); }
/* 収録の開始年(線が途中から始まる理由が選ぶ前に分かるように) */
.econ-check__yr {
  margin-left: auto;
  font-size: 10.5px;
  color: #7d8598;
  font-variant-numeric: lining-nums;
  flex: none;
}

/* 行: オプション / 期間 / 縦軸 / 操作 */
.econ-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}
.econ-row__label {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-weight: 600;
  flex: 0 0 auto;
  min-width: 68px;
}
.econ-opt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
}
.econ-opt input[type=checkbox] { width: 16px; height: 16px; accent-color: #c9a227; cursor: pointer; }
.econ-opt.is-off { opacity: 0.4; }
.econ-opt.is-off input { cursor: not-allowed; }

.econ-num, .econ-year {
  width: 74px;
  background: var(--navy-700);
  border: 1px solid var(--line-dim);
  border-radius: 5px;
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  font-variant-numeric: lining-nums;
  padding: 8px 8px;
  min-height: 38px;
}
.econ-num:focus, .econ-year:focus { outline: 1px solid var(--gold); border-color: var(--gold); }
.econ-num::placeholder { color: #6b7386; }

.econ-range__btn, .econ-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--navy-700);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12.5px;
  padding: 8px 14px;
  min-height: 38px;
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
}
.econ-range__btn:hover, .econ-btn:hover { color: var(--text); border-color: rgba(201, 162, 39, 0.6); }
.econ-btn--gold {
  background: var(--gold-grad);
  border-color: transparent;
  color: #16243c;
  font-weight: 700;
}
.econ-sep { color: var(--text-dim); font-size: 12px; }

.econ-status {
  font-size: 12px;
  color: var(--gold-light);
  min-height: 18px;
  flex: 1 1 100%;
}
.econ-hint {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.8;
  margin-top: 2px;
}
.econ-error { padding: 28px; color: var(--text-dim); text-align: center; }

/* ---------- 静的セクション ---------- */
.econ-sec { margin-top: 56px; }
.econ-sec h2 {
  font-family: var(--serif);
  font-size: clamp(19px, 2.6vw, 25px);
  font-weight: 700;
  margin-bottom: 16px;
  padding-left: 13px;
  border-left: 3px solid var(--gold);
  line-height: 1.5;
}
.econ-sec h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--gold-light);
  margin: 22px 0 8px;
}
.econ-sec p { font-size: 14.5px; line-height: 2; color: var(--text-dim); margin-bottom: 12px; }
.econ-sec p strong { color: var(--text); font-weight: 600; }
.econ-steps { display: grid; gap: 10px; margin: 6px 0 4px; }
.econ-steps li {
  display: flex; gap: 11px; align-items: flex-start;
  font-size: 14px; line-height: 1.9; color: var(--text-dim);
}
.econ-steps li b {
  font-family: var(--en); font-size: 15px; color: var(--gold);
  flex: none; min-width: 22px; font-weight: 600;
}

/* 収録データ一覧表 */
.econ-table-wrap { overflow-x: auto; }
.econ-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 620px;
}
.econ-table th, .econ-table td {
  text-align: left;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line-dim);
  vertical-align: top;
  line-height: 1.7;
}
.econ-table thead th {
  color: var(--gold);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.econ-table td { color: var(--text-dim); }
.econ-table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.econ-table td.econ-table__period { white-space: nowrap; font-variant-numeric: lining-nums; }
/* 頻度・単位は短い語なので折り返させない(「四半期」が2行になって行が伸びる) */
.econ-table td:nth-child(3), .econ-table td:nth-child(4) { white-space: nowrap; }
.econ-table a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 2px; }
.econ-table a:hover { color: var(--gold-pale); }
.econ-table__group {
  background: rgba(201, 162, 39, 0.06);
  color: var(--gold-light) !important;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ===========================================================
   指標別チャートページ(/chart/<slug>/)
   ハブ(/chart/)と同じ部品を使い、操作盤の代わりに本文と数値表を主役にする。
   =========================================================== */
.econ--page .econ-hero { margin-bottom: 26px; }

/* 答えブロック: 検索して来た人の「いま何倍か」に最初の画面で答える。
   数字が主役。枠は控えめ(左のゴールド罫+濃紺)で、見出しの一部に見えるようにする。 */
.econ-answer {
  margin: 18px 0 16px;
  padding: 15px 20px 16px;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.07), rgba(11, 20, 38, 0.6) 55%);
  border: 1px solid var(--line-dim);
  border-left: 3px solid var(--gold);
  border-radius: 4px 10px 10px 4px;
  max-width: 820px;
}
.econ-answer__head {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--gold-pale);
  margin-bottom: 6px;
}
.econ-answer__figs {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 30px;
}
.econ-answer__fig {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-variant-numeric: tabular-nums lining-nums;
}
.econ-answer__fig span {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}
.econ-answer__fig b {
  font-family: var(--en);
  font-size: 38px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: 0.01em;
}
.econ-answer__fig i {
  font-style: normal;
  font-size: 14px;
  color: var(--text-dim);
  margin-left: -3px;
}
/* 2つ目以降は主役より一段小さく(主役は加重平均) */
.econ-answer__fig + .econ-answer__fig b { font-size: 27px; color: var(--text-dim); }
.econ-answer__ctx {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--text-dim);
}
.econ-answer__ctx b { color: var(--text); font-weight: 600; white-space: nowrap; }
.econ-answer__note {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.85;
  color: #8b93a5;
}
.econ--page .econ-sec--chart .econ-app { margin-top: 14px; }
.econ--page .econ-sec + .econ-sec { margin-top: 52px; }
/* 指標別ページの本文は1行が長くなりすぎないよう幅を抑える(表とチャートは全幅のまま) */
.econ--page .econ-sec > p,
.econ--page .econ-sec > ul,
.econ--page .econ-sec > h3 { max-width: 820px; }
.econ--page .econ-sec h3 { margin-top: 26px; }
.econ--page .econ-sec h3:first-child { margin-top: 6px; }

/* チャート直下の1行ツールバー(期間ボタン+PNG)。操作盤は出さない */
.econ-row--single { margin-top: 12px; padding-top: 0; }
.econ-chart__note {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.9;
  color: #8b93a5;
}
.econ-chart__note strong { color: var(--text-dim); font-weight: 600; }
/* 網掛け・点線が何なのかの1行(チャート注記のすぐ下) */
.econ-chart__key {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.85;
  color: #7d8598;
}
.econ-chart__key strong { color: #8b93a5; font-weight: 600; }

/* 自動計算の数値表(直近値・n年前・最高最低・平均中央値 / 年末値一覧) */
.econ-stats { min-width: 0; }
.econ-stats th[scope="row"] {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  text-align: left;
  vertical-align: top;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line-dim);
  font-size: 13px;
}
.econ-stats td {
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
/* 数値の列(3列目以降)は右寄せ+明色。表の主役は数字 */
.econ-stats td:nth-child(n+3) { color: var(--text); font-weight: 600; text-align: right; }
.econ-stats thead th:nth-child(n+3) { text-align: right; }
.econ-stats td:first-of-type { color: var(--text-dim); font-weight: 400; }
.econ-stats tbody tr:hover { background: rgba(201, 162, 39, 0.045); }
.econ-stats--years tbody tr.is-current th[scope="row"] { color: var(--gold-light); }
.econ-table__note {
  margin-top: 11px;
  font-size: 12.5px;
  line-height: 1.9;
  color: #8b93a5;
}
.econ-table__note strong { color: var(--text-dim); font-weight: 600; }

/* 本文中のリンク(出典・ガイドなど)。style.css の a はcolor:inheritなので必ず指定する */
.econ-sec p a,
.econ-sec li a {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.econ-sec p a:hover,
.econ-sec li a:hover { color: var(--gold-pale); }

/* 他の組み合わせへ送るリンク */
.econ-xlinks { display: grid; gap: 8px; margin-top: 14px; }
.econ-xlinks li {
  border: 1px solid var(--line-dim);
  border-radius: 8px;
  background: var(--navy-800);
  padding: 12px 15px;
  transition: border-color 0.2s;
}
.econ-xlinks li:hover { border-color: rgba(201, 162, 39, 0.55); }
.econ-xlinks a {
  display: block;
  color: var(--gold-light);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
}
.econ-xlinks a::after { content: " ›"; color: var(--gold); }
.econ-xlinks span {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.8;
}

/* ---------- 「その他の経済指標のチャート」(全リンクの集約・タブ) ----------
   初期HTMLには全タブの全リンクが入っており、JSが動いたときだけ
   .econ-nav.is-tabbed が付いてタブに畳まれる(JS無効でも全リンクが読める)。 */
.econ-nav__lead { margin-bottom: 4px; }
.econ-nav__all {
  display: block;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.10), rgba(201, 162, 39, 0.02));
  padding: 15px 18px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.econ-nav__all:hover { border-color: rgba(201, 162, 39, 0.6); transform: translateY(-2px); }
.econ-nav__all-name {
  display: block;
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--gold-pale);
  letter-spacing: 0.02em;
}
.econ-nav__all-name::after { content: " ›"; color: var(--gold); }
.econ-nav__all-text {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--text-dim);
}
.econ-nav__tabs {
  display: none;                      /* JSが動いたときだけ出す */
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 20px;
  border-bottom: 1px solid var(--line-dim);
}
.econ-nav.is-tabbed .econ-nav__tabs { display: flex; }
.econ-nav__tab {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  padding: 10px 14px;
  min-height: 42px;
  font: inherit;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  cursor: pointer;
  margin-bottom: -1px;
}
.econ-nav__tab:hover { color: var(--gold-light); }
.econ-nav__tab:focus-visible { outline: 1px solid var(--gold); outline-offset: -2px; }
.econ-nav__tab.is-on {
  color: var(--gold-pale);
  background: var(--navy-700);
  border-color: var(--line-dim);
  border-bottom: 1px solid var(--navy-700);
}
.econ-nav__panel { margin-top: 16px; }
.econ-nav__panel[hidden] { display: none; }
.econ-nav__panel:focus-visible { outline: none; }
/* 分類の見出しはJS無効時の道しるべ。タブが出ているときは重複するので隠す */
.econ-nav.is-tabbed .econ-nav__cat { display: none; }
.econ-nav__cat {
  margin: 22px 0 9px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold-light);
}
.econ-nav__chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.econ-nav__chips li { display: flex; }   /* li をそのままグリッドの1マスにする */
.econ-nav__chips li::before { content: none; }
/* .econ-sec li a の下線・ゴールドを打ち消す(チップは下線を引かない) */
.econ-sec .econ-nav__chips a { color: var(--text); text-decoration: none; }
.econ-sec .econ-nav__chips a:hover { color: var(--gold-pale); }
.econ-nav__chips .econ-nav__chip { flex: 1 1 auto; }
.econ-nav__chip {
  display: flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line-dim);
  border-radius: 8px;
  background: var(--navy-800);
  padding: 9px 13px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
a.econ-nav__chip:hover { border-color: rgba(201, 162, 39, 0.55); color: var(--gold-pale); }
.econ-nav__chip.is-current {
  color: var(--gold-pale);
  background: var(--navy-700);
  border-color: var(--line);
}
.econ-nav__chip em {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-left: 7px;
  white-space: nowrap;
}

/* チャート直下の「この指標を重ねて比較」チップ */
.econ-cmp {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.econ-cmp__label { font-size: 12px; color: var(--text-dim); letter-spacing: 0.04em; }
.econ-cmp__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line-dim);
  border-radius: 999px;
  background: var(--navy-800);
  padding: 7px 15px;
  font-size: 13px;
  color: var(--gold-light);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.econ-cmp__chip:hover { border-color: rgba(201, 162, 39, 0.55); color: var(--gold-pale); }
.econ-cmp__chip em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--navy-900);
  background: var(--gold-grad);
  border-radius: 3px;
  padding: 2px 6px;
}

.econ-notes ul { display: grid; gap: 9px; }
.econ-notes__list { display: grid; gap: 10px; margin: 12px 0 18px; }
.econ-notes__list li {
  font-size: 13.5px; line-height: 1.9; color: var(--text-dim);
  padding-left: 15px; position: relative;
}
.econ-notes__list li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}
.econ-notes__list strong { color: var(--text); font-weight: 600; }
.econ-notes__list a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 2px; }
.econ-notes li {
  font-size: 13.5px; line-height: 1.9; color: var(--text-dim);
  padding-left: 15px; position: relative;
}
.econ-notes li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}
.econ-disclaimer {
  margin-top: 40px;
  font-size: 12px;
  color: #7d8598;
  line-height: 1.9;
  border-top: 1px solid var(--line-dim);
  padding-top: 16px;
}

/* ---------- スマホ ---------- */
@media (max-width: 860px) {
  /* 最初の画面でチャートの上端まで出すため、見出し周りの余白を詰める */
  .econ { padding: 30px 0 70px; }
  .econ-hero { margin-bottom: 16px; }
  .econ-hero h1 { font-size: clamp(23px, 6.2vw, 30px); margin-bottom: 12px; }
  .econ-hero__lead { font-size: 14.5px; line-height: 1.95; }
  .econ-hero__updated { margin-top: 9px; }
  .econ-app { padding: 13px 12px 15px; border-radius: 10px; }
  /* プルダウンは1行に収まるので、見出しの下に幅いっぱいで置く */
  .econ-presets { margin-bottom: 10px; gap: 4px 10px; }
  .econ-select { flex: 1 1 100%; max-width: none; }
  .econ-chartwrap { height: clamp(300px, 46vh, 420px); }
  .econ-watermark { right: 12px; bottom: 30px; font-size: 13px; }
  .econ-chartwrap.has-axis-r .econ-watermark { right: 68px; }
  .econ-groups { grid-template-columns: 1fr; }
  .econ-group__items { grid-template-columns: 1fr 1fr; }   /* 縦に長くなりすぎないよう2列 */
  .econ-axis--l { left: 62px; }
  .econ-axis--r { right: 62px; }
  .econ-row__label { flex: 1 1 100%; min-width: 0; }
  .econ-select__btn { font-size: 13px; }
  .econ-legend { font-size: 12px; gap: 6px 14px; }
  /* 狭い画面の旗は少し小さく。出すか出さないか(出来事が多いと線だけにする)の
     判断は js/econ-chart.js が幅と件数を見て行う */
  .econ-mark__flag { padding: 2px 6px 3px; }
  .econ-mark__flag b { font-size: 10px; }
  .econ-mark__flag i { font-size: 9.5px; }

  /* 答えブロック: 390x844 の最初の画面に必ず収める(数字は主役のまま小さくしすぎない) */
  .econ-answer {
    margin: 14px 0 13px;
    padding: 12px 14px 13px;
    border-radius: 3px 8px 8px 3px;
  }
  .econ-answer__head { font-size: 11.5px; margin-bottom: 4px; }
  .econ-answer__figs { gap: 2px 20px; }
  .econ-answer__fig b { font-size: 32px; }
  .econ-answer__fig + .econ-answer__fig b { font-size: 23px; }
  .econ-answer__ctx { font-size: 13px; line-height: 1.85; margin-top: 8px; }
  .econ-answer__note { font-size: 11.5px; margin-top: 6px; }

  /* 回遊リンクはスマホでは2列(1列だと縦に長くなりすぎ、3列だと名前が折り返す) */
  .econ-nav__chips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .econ-nav__chip { font-size: 12.5px; padding: 9px 11px; }
  .econ-nav__tab { font-size: 12.5px; padding: 9px 11px; }
  .econ-cmp__chip { font-size: 12.5px; padding: 7px 13px; }
}
@media (max-width: 560px) {
  .econ__inner { width: 94vw; }
  .econ-num, .econ-year { width: 66px; }
  .econ-sec { margin-top: 42px; }
  /* 2列だと「日政策金利 1882〜」が折り返して行がガタつくので1列に戻す */
  .econ-group__items { grid-template-columns: 1fr; }
  .econ-check__label { white-space: nowrap; }

  /* 収録データ一覧: 表のままだと注記列が画面外に出て、行が空白だらけの
     巨大な高さになる(390pxで4画面ぶん)。1件=1カードに組み替える。 */
  .econ-table-wrap { overflow-x: visible; }
  .econ-table { display: block; min-width: 0; font-size: 12.5px; }
  .econ-table thead { display: none; }
  .econ-table tbody { display: block; }
  .econ-table tr {
    display: block;
    border: 1px solid var(--line-dim);
    border-radius: 8px;
    background: var(--navy-800);
    padding: 11px 13px;
    margin-bottom: 9px;
  }
  .econ-table td {
    display: block;
    border: 0;
    padding: 0;
    line-height: 1.75;
  }
  .econ-table td:first-child {
    white-space: normal;
    font-size: 14px;
    margin-bottom: 4px;
  }
  /* 期間・頻度・単位は短いので1行に並べる */
  .econ-table td[data-label="期間"],
  .econ-table td[data-label="頻度"],
  .econ-table td[data-label="単位"] {
    display: inline-block;
    margin-right: 13px;
  }
  .econ-table td[data-label]::before {
    content: attr(data-label) "：";
    color: var(--gold-pale);
    opacity: 0.75;
    font-size: 11px;
    margin-right: 3px;
  }
  .econ-table td[data-label="出典"] { margin-top: 5px; }
  .econ-table td[data-label="注記"] { margin-top: 3px; color: #8b93a5; }
  /* グループ見出しの行はカードにしない */
  .econ-table tr.econ-table__grouprow {
    border: 0; background: none; padding: 0; margin: 14px 0 7px;
  }
  .econ-table tr.econ-table__grouprow:first-child { margin-top: 0; }
  .econ-table td.econ-table__group {
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 11.5px;
  }
}

/* ---------- 指標別ページのスマホ調整(既存の560pxブロックより後ろに置く) ---------- */
@media (max-width: 560px) {
  /* 数値表もスマホでは1件=1カードに(収録データ一覧と同じ組み替え) */
  .econ-stats th[scope="row"] {
    display: block;
    border: 0;
    padding: 0 0 4px;
    font-size: 14px;
    color: var(--gold-pale);
  }
  .econ-stats tbody tr:hover { background: none; }
  .econ-stats td { display: inline-block; margin-right: 13px; white-space: normal; }
  .econ-stats td:nth-child(n+3) { text-align: left; }
  /* 数値セルは「日経平均PER：17.19倍」と見出しを添えないと何の数字か分からない */
  .econ-stats td[data-label]::before {
    content: attr(data-label) "：";
    color: var(--gold-pale);
    opacity: 0.75;
    font-size: 11px;
    font-weight: 400;
    margin-right: 3px;
  }
  .econ-stats tr {
    display: block;
    border: 1px solid var(--line-dim);
    border-radius: 8px;
    background: var(--navy-800);
    padding: 11px 13px;
    margin-bottom: 8px;
  }
  .econ-stats thead { display: none; }
  .econ-stats tbody { display: block; }
  .econ-stats { display: block; }

  /* 年末値一覧は20行以上あり、カードに割ると3画面ぶんになる。
     列が短い(年・月・数値2つ)ので、ここだけ表のまま小さく詰める。 */
  .econ-table.econ-stats--years { display: table; width: 100%; font-size: 12px; }
  .econ-table.econ-stats--years thead { display: table-header-group; }
  .econ-table.econ-stats--years tbody { display: table-row-group; }
  .econ-table.econ-stats--years tr {
    display: table-row; border: 0; border-radius: 0; background: none;
    padding: 0; margin: 0;
  }
  .econ-table.econ-stats--years th[scope="row"] {
    display: table-cell; padding: 7px 6px 7px 0; font-size: 12.5px;
    color: var(--text); border-bottom: 1px solid var(--line-dim);
  }
  .econ-table.econ-stats--years thead th { display: table-cell; padding: 6px 6px 6px 0; font-size: 11px; }
  .econ-table.econ-stats--years thead th:nth-child(n+3) { text-align: right; }
  .econ-table.econ-stats--years td {
    display: table-cell; margin: 0; padding: 7px 0 7px 6px; white-space: nowrap;
    border-bottom: 1px solid var(--line-dim);
  }
  .econ-table.econ-stats--years td:nth-child(n+3) { text-align: right; }
  .econ-table.econ-stats--years td[data-label]::before { content: none; }
}
