/* スーパーサイクル検証：長い時間を読む経済の読み物。紙の地に銅の差し色、見出しは明朝、ヘッダーの下に1900年からの波の細い線。
   データの色は dataviz の検証済みパレットの先頭3色（青・オレンジ・緑青）と、年代を表す青の段階（ordinal）。
   このサイトの面の色（ライト #fffaf3・ダーク #1b1916）で検証し直して合格。銅の色は飾りと文字だけに使い、データには使わない */
:root {
  color-scheme: light;
  --page: #f4ede3; --surface: #fffaf3; --surface-2: #f8f1e7;
  --ink: #1d1a16; --ink-2: #4e473e; --muted: #6b6358;
  --grid: #e9e0d3; --axis: #cfc3b2; --border: rgba(60,40,20,0.13);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --v1: #86b6ef; --v2: #5598e7; --v3: #2a78d6; --v4: #1c5cab; --v5: #104281;
  --accent: #8a3f12; --copper: #b4561f; --teal: #1d6b63;
  --band: rgba(180,86,31,0.10); --placebo: rgba(107,99,88,0.22);
  --pos: #8a3f12; --neg: #1d5f99;
  --bar: #2a211b; --bar-ink: #f1e6d6; --bar-dim: #c7b59d;
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #11100e; --surface: #1b1916; --surface-2: #221f1b;
    --ink: #efe8dc; --ink-2: #c4baa9; --muted: #9b917f;
    --grid: #2c2823; --axis: #3d3831; --border: rgba(255,230,200,0.10);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --v1: #184f95; --v2: #256abf; --v3: #3987e5; --v4: #6da7ec; --v5: #9ec5f4;
    --accent: #e39a62; --copper: #d27a3f; --teal: #62b3a6;
    --band: rgba(210,122,63,0.13); --placebo: rgba(155,145,127,0.25);
    --pos: #e39a62; --neg: #7fb2ea;
    --bar: #0b0a09;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #11100e; --surface: #1b1916; --surface-2: #221f1b;
  --ink: #efe8dc; --ink-2: #c4baa9; --muted: #9b917f;
  --grid: #2c2823; --axis: #3d3831; --border: rgba(255,230,200,0.10);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --v1: #184f95; --v2: #256abf; --v3: #3987e5; --v4: #6da7ec; --v5: #9ec5f4;
  --accent: #e39a62; --copper: #d27a3f; --teal: #62b3a6;
  --band: rgba(210,122,63,0.13); --placebo: rgba(155,145,127,0.25);
  --pos: #e39a62; --neg: #7fb2ea;
  --bar: #0b0a09;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--page);
  font: 15.5px/1.85 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: rgba(180,86,31,0.25); }
h1, h2, h3 { font-family: var(--serif); word-break: auto-phrase; text-wrap: balance; }

/* ヘッダー */
.bar { position: sticky; top: 0; z-index: 10; background: var(--bar); color: var(--bar-ink); }
.bar-in { max-width: 1080px; margin: 0 auto; padding: 12px 20px 2px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; flex-direction: column; text-decoration: none; color: inherit; line-height: 1.3; }
.logo .mark { font: 600 12px/1.4 system-ui, sans-serif; letter-spacing: 0.28em; color: #d8905a; }
.logo .name { font: 700 21px/1.3 var(--serif); letter-spacing: 0.06em; color: #fff; }
.tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.lang, .theme { white-space: nowrap; font: 500 12px system-ui, sans-serif; color: var(--bar-ink); background: transparent;
  border: 1px solid #5a4a3c; border-radius: 999px; padding: 4px 11px; text-decoration: none; cursor: pointer; }
.lang:hover, .theme:hover { border-color: #d8905a; color: #fff; }
.tabs { max-width: 1080px; margin: 0 auto; padding: 0 12px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; color: var(--bar-dim); text-decoration: none; padding: 8px 10px 9px; font-size: 14px; white-space: nowrap; }
.tabs a:hover { color: #fff; }
.tabs a[aria-current] { color: #fff; font-weight: 700; }
.tabs a[aria-current]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: #d8905a; }
.wave-strip { display: block; width: 100%; height: 18px; background: var(--bar); }
.wave-strip polyline { fill: none; stroke: #b4561f; stroke-width: 1.5; vector-effect: non-scaling-stroke; }

main { max-width: 1080px; margin: 0 auto; padding: 8px 20px 24px; }
.alert { background: rgba(208,59,59,0.10); border: 1px solid rgba(208,59,59,0.35); border-radius: 8px; padding: 10px 14px; margin: 16px 0; }

/* 冒頭 */
.hero { padding: 44px 0 10px; }
.kicker { font: 600 12px/1.6 system-ui, sans-serif; letter-spacing: 0.2em; color: var(--accent); margin: 0 0 12px; }
.hero h1 { font-size: clamp(28px, 4.6vw, 44px); line-height: 1.35; margin: 0 0 18px; font-weight: 700; letter-spacing: 0.02em; }
.hero-sm { padding: 36px 0 0; }
.hero-sm h1 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 4px; }
.hero h1 em { font-style: normal; color: var(--accent); background: linear-gradient(transparent 72%, var(--band) 72%); }
.lead { color: var(--ink-2); font-size: 16px; margin: 0 0 16px; max-width: 46em; }

/* 4つの問いと答え */
.qas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0 8px; }
.qa { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--copper);
  border-radius: 10px; padding: 16px 18px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.qa:hover { border-color: var(--copper); transform: translateY(-1px); }
.qa .q { font: 700 17px/1.4 var(--serif); }
.qa p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.qa .go { margin-top: auto; color: var(--accent); font-size: 13px; font-weight: 600; }

/* 節 */
.block { margin: 48px 0; }
.block > h2 { font-size: 23px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--grid); position: relative; }
.block > h2::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 48px; height: 2px; background: var(--copper); }
.sec-kicker { font: 700 12px/1.4 system-ui, sans-serif; letter-spacing: 0.2em; color: var(--accent); margin: 0 0 4px; }
.block h3 { font-size: 17px; margin: 0 0 6px; }
.block p { max-width: 50em; }
.more { margin: 8px 0 0; }
.more a { text-decoration: none; font-weight: 600; font-size: 14px; }
.note { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.big { font: 600 19px/1.8 var(--serif); color: var(--ink); max-width: 42em; }
.updated { color: var(--muted); font-size: 12.5px; margin: 32px 0 0; }

/* 要点・3行のまとめ */
.summary { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--copper); border-radius: 10px; padding: 14px 18px 12px; margin: 26px 0 8px; }
.s-head { font: 700 13px/1.5 system-ui, sans-serif; letter-spacing: 0.1em; color: var(--accent); margin: 0 0 4px; }
.summary ol { margin: 0; padding-left: 1.4em; }
.summary li { font-size: 16px; line-height: 1.8; margin: 4px 0; }
.muted-s { color: var(--muted); font-size: 13px; }

/* 今の高さ：3つの列 */
.nowcols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 4px; }
.nowcol { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.nc-head { font: 700 15px/1.4 var(--serif); margin: 0 0 6px; }
.nowcol ul { list-style: none; margin: 0; padding: 0; }
.nowcol li { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; padding: 3px 0; border-bottom: 1px solid var(--grid); }
.nowcol li:last-child { border-bottom: 0; }
.nowcol .h { color: var(--muted); font-variant-numeric: tabular-nums; }

/* 用語の説明 */
.terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 6px; }
.terms > div { border-left: 3px solid var(--copper); padding: 2px 0 2px 12px; }
.terms dt { font: 700 15px/1.5 var(--serif); }
.terms dd { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }

/* グラフ */
.chart { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px 12px; margin: 14px 0; }
.chart figcaption { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.chart figcaption strong { font-size: 14.5px; }
.chart figcaption span { font-size: 13px; color: var(--ink-2); }
.canvas { position: relative; }
.data summary { cursor: pointer; font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.data .tbl-wrap { max-height: 360px; overflow: auto; margin-top: 6px; }

/* 数字のタイル */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tiles5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.t-label { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.t-value { font-size: 26px; font-weight: 700; line-height: 1.3; }
.t-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* 表 */
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 8px 12px; border-bottom: 1px solid var(--grid); text-align: left; vertical-align: top; }
thead th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: var(--surface-2); line-height: 1.4; vertical-align: bottom; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; }
table.num td { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.num td.txt, td.txt { white-space: normal; min-width: 10em; }
td.pos { color: var(--pos); font-weight: 600; }
tr.now-row th, tr.now-row td { background: var(--band); font-weight: 700; }
table.cmp th small { display: block; font-weight: 400; font-size: 12px; }
table.cmp td { font-size: 15px; font-weight: 600; }
table.cmp td small, table.similar td small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
table.cmp td.now-col { background: var(--band); }
.parts { padding-left: 1.4em; margin: 14px 0; }
.parts li { margin: 8px 0; }
.parts li p { margin: 2px 0 0; color: var(--ink-2); }
.big-s { font-size: 16.5px; font-weight: 600; }
.bar-cell { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.pbar { flex: 1; height: 8px; background: var(--grid); border-radius: 0 4px 4px 0; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--s1); border-radius: 0 4px 4px 0; }

/* 検証の判定 */
.verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 6px; max-width: 640px; }
.verdict > div { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; display: flex; flex-direction: column; }
.verdict > div:first-child { border-left: 4px solid var(--s2); }
.verdict > div:last-child { border-left: 4px solid var(--axis); }
.v-label { font-size: 13px; color: var(--ink-2); }
.v-num { font-size: 32px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.v-note { font-size: 12.5px; color: var(--muted); }

/* 注意の一覧・仕組み */
.caveats, .mech { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: cv; }
.caveats li { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px 12px 48px; position: relative; counter-increment: cv; }
.caveats li::before { content: counter(cv); position: absolute; left: 16px; top: 12px; font: 700 18px/1.4 var(--serif); color: var(--accent); }
.caveats p, .mech p { margin: 2px 0 0; color: var(--ink-2); font-size: 14.5px; }
.mech { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mech li { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.step { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--copper); color: var(--surface); font: 700 14px/28px system-ui, sans-serif; text-align: center; }

/* 波ごとの背景 */
.waves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wave { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.w-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.w-no { flex: none; font: 700 30px/1 var(--serif); color: var(--accent); }
.w-dates { margin: 2px 0 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wave dl { margin: 0; }
.wave dt { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-top: 6px; }
.wave dd { margin: 0; font-size: 14.5px; }

/* 42品目のカード */
.pick { scroll-margin-top: 120px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.pick select { font: inherit; font-weight: 400; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--axis); background: var(--surface); color: var(--ink); }
.item-summary { color: var(--ink-2); margin: 8px 0 0; }
.grp { font-size: 16px; margin: 22px 0 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.card { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.card:hover, .card:focus-visible { border-color: var(--copper); outline: none; }
.card.on { border-color: var(--copper); box-shadow: 0 0 0 2px var(--band); }
.c-name { font-weight: 700; font-size: 14.5px; }
.c-now { font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.c-now.pos { color: var(--pos); } .c-now.neg { color: var(--neg); }
.c-meta { grid-column: 1 / -1; font-size: 12px; color: var(--muted); line-height: 1.5; }
.spark { grid-column: 1 / -1; width: 100%; height: 54px; display: block; }
.sp-zero { stroke: var(--axis); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sp-tick { stroke: var(--grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sp-area { fill: var(--band); }
.sp-line { fill: none; stroke: var(--s2); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }

/* 主張 */
.claims { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.claims li { display: grid; grid-template-columns: 7em 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; }
.c-when { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.claims p { margin: 2px 0 0; }
.sources, .methods { padding-left: 1.2em; font-size: 14px; }
.sources li, .methods li { margin-bottom: 6px; }

footer.site-foot { max-width: 1080px; margin: 0 auto; padding: 18px 20px 40px; border-top: 1px solid var(--grid);
  display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); }
footer.site-foot a { color: var(--ink); }

@media (max-width: 860px) {
  .tiles, .tiles5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mech { grid-template-columns: 1fr; }
  .waves { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .bar-in { padding: 10px 14px 2px; }
  .logo .name { font-size: 18px; }
  .logo .mark { font-size: 12px; letter-spacing: 0.06em; white-space: nowrap; }
  .tabs { padding-right: 32px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
  .tabs a { font-size: 13.5px; }
  main { padding: 4px 14px 20px; }
  .hero { padding: 28px 0 6px; }
  .lead { font-size: 15px; }
  .qas { grid-template-columns: 1fr; }
  .terms { grid-template-columns: 1fr; }
  .nowcols { grid-template-columns: 1fr; }
  .summary li { font-size: 15px; }
  .block { margin: 36px 0; }
  .block > h2 { font-size: 20px; }
  .chart { padding: 12px 10px 8px; }
  .t-value { font-size: 22px; }
  .verdict { grid-template-columns: 1fr 1fr; }
  .v-num { font-size: 26px; }
  .claims li { grid-template-columns: 1fr; gap: 2px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 8px 10px; }
  .big { font-size: 17px; }

  /* 表はスマホ幅では1行を1枚のカードにする（列の見出しをセルの前に出す） */
  .tbl-wrap { overflow: visible; background: transparent; border: 0; border-radius: 0; }
  .data .tbl-wrap { overflow: auto; background: var(--surface); }
  table.nostack { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; border-collapse: separate; border-spacing: 0; }
  table.nostack th, table.nostack td { padding: 7px 8px; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr { display: block; width: 100%; }
  table.stack tr { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
  table.stack th[scope="row"] { display: block; padding: 0 0 6px; border: 0; font-size: 15px; }
  table.stack td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 3px 0; border: 0; text-align: right; white-space: normal; }
  table.stack td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; text-align: left; flex: 0 1 auto; }
  table.stack td.txt { display: block; text-align: left; min-width: 0; }
  table.stack td.txt::before { display: block; margin-bottom: 1px; }
  table.stack td.bar-cell { min-width: 0; }
  table.stack td.bar-cell::before { flex: 0 0 45%; }
}
@media (forced-colors: active) {
  .pbar i, .step { forced-color-adjust: none; }
}
