/* nokavi news 共通の見た目
   経済ニュース風:白地、明朝の見出し、細い罫線。差し色(朱)は大事な数字と見出しの印だけ */
:root {
  --paper: #fbfaf7;
  --ink: #16171f;
  --sub: #5f6170;
  --rule: #d8d6cf;
  --accent: #b8321f;
  --bar: #16171f;
  --bar-2: #8c8a84;
  --bar-3: #c9c6bd;
  --bar-soft: #a9a7a0;
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --mono: "Roboto Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.9;
}
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* サイトの帯 */
.site { border-bottom: 3px double var(--ink); padding: 14px 16px; }
.site-in, main, .foot-in { max-width: 680px; margin: 0 auto; }
.site-in { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.logo { font-family: var(--serif); font-weight: 800; font-size: 22px; letter-spacing: .04em; text-decoration: none; }
.site-tag { font-size: 13px; color: var(--sub); }

main { padding: 28px 16px 64px; }

/* 記事の頭 */
.kicker { font-size: 14px; font-weight: 700; color: var(--accent); letter-spacing: .06em; }
h1 {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(28px, 7vw, 40px); line-height: 1.35; margin-top: 8px;
  text-wrap: balance;
}
.nobr { white-space: nowrap; }
.meta { font-size: 13px; color: var(--sub); margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; }
.lead {
  margin-top: 22px; padding: 16px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
  font-size: 18px; font-weight: 700; line-height: 1.8;
}
.lead .num { color: var(--accent); }

h2 {
  font-family: var(--serif); font-weight: 800; font-size: 22px; line-height: 1.5;
  margin-top: 44px; padding-left: 12px; border-left: 4px solid var(--accent);
  text-wrap: balance;
}
h3 { font-size: 17px; font-weight: 700; margin-top: 28px; }
p { margin-top: 16px; }
.num { font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; }
.em { color: var(--accent); }

/* 図と表 */
figure { margin-top: 24px; border-top: 1px solid var(--ink); padding-top: 12px; }
figcaption.title { font-weight: 700; font-size: 15px; }
figcaption.title span { color: var(--sub); font-weight: 400; margin-left: 6px; }
.fig-note { font-size: 13px; color: var(--sub); line-height: 1.7; margin-top: 12px; }

/* 横棒(1本ずつ) */
.chart { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.grp-name { font-size: 13px; color: var(--sub); font-weight: 700; border-bottom: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: 9.5em 1fr; gap: 10px; align-items: center; margin-top: 6px; }
.co { font-weight: 700; font-size: 15px; line-height: 1.3; }
.co small { display: block; font-weight: 400; font-size: 12px; color: var(--sub); }
.track { position: relative; height: 22px; margin-right: 6.5em; }
.bar { position: absolute; inset: 0 auto 0 0; background: var(--bar); }
.bar.soft { background: none; border: 2px dashed var(--bar-soft); }
.val { position: absolute; top: 50%; transform: translateY(-50%); padding-left: 8px; white-space: nowrap; font-size: 15px; }
.val small { font-family: var(--sans); font-weight: 400; color: var(--sub); font-size: 12px; margin-left: 4px; }
.row.top .bar { background: var(--accent); }
.row.top .val { color: var(--accent); }

/* 積み上げ棒(内訳) */
.stack-row { margin-top: 14px; }
.stack-label { font-size: 14px; font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.stack-label small { font-weight: 400; color: var(--sub); }
.stack { display: flex; height: 30px; margin-top: 4px; }
.seg {
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap;
}
.seg.c1 { background: var(--bar); }
.seg.c2 { background: var(--bar-2); }
.seg.c3 { background: var(--bar-3); color: var(--ink); }
.seg.hi { background: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--sub); margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; }

.tbl-wrap { overflow-x: auto; margin-top: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
table.wide { min-width: 560px; }
th, td { padding: 8px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
th { font-weight: 700; font-size: 12px; color: var(--sub); border-bottom: 1px solid var(--ink); vertical-align: bottom; }
th:first-child, td:first-child { text-align: left; }
td.n { font-family: var(--mono); font-variant-numeric: tabular-nums; }
td.wrap { white-space: normal; text-align: left; }

/* 仮説の判定 */
.verdicts { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.verdict { display: grid; grid-template-columns: 3em 1fr; gap: 12px; border-bottom: 1px solid var(--rule); padding-bottom: 12px; }
.mark { font-family: var(--serif); font-weight: 800; font-size: 28px; line-height: 1.2; text-align: center; }
.mark.yes { color: var(--accent); }
.verdict b { display: block; }
.verdict span { font-size: 15px; }

.box { margin-top: 20px; border: 1px solid var(--ink); padding: 16px; }
.box h3 { font-size: 15px; margin-top: 0; }
.box ul { margin-top: 8px; padding-left: 1.2em; font-size: 15px; line-height: 1.8; }
.box li + li { margin-top: 6px; }

dl.words { margin-top: 12px; }
dl.words dt { font-weight: 700; margin-top: 14px; }
dl.words dd { font-size: 15px; }

.next { margin-top: 44px; border-top: 3px double var(--ink); padding-top: 16px; }
.next .k { font-size: 13px; color: var(--sub); }
.next .q { font-family: var(--serif); font-weight: 800; font-size: 20px; margin-top: 4px; }
.next a { text-decoration: none; }
.next a:hover .q { text-decoration: underline; }

.src { margin-top: 36px; font-size: 13px; color: var(--sub); line-height: 1.8; }
.src a { color: var(--sub); }

footer { border-top: 1px solid var(--rule); padding: 20px 16px 40px; font-size: 13px; color: var(--sub); }
.foot-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer b { font-family: var(--serif); color: var(--ink); }

/* トップページの一覧 */
.about { font-size: 15px; color: var(--sub); }
.series { margin-top: 36px; }
.series-name { font-family: var(--serif); font-weight: 800; font-size: 20px; border-bottom: 1px solid var(--ink); padding-bottom: 6px; }
.series-desc { font-size: 14px; color: var(--sub); margin-top: 8px; }
.list { list-style: none; margin-top: 8px; }
.list li { border-bottom: 1px solid var(--rule); }
.list a { display: block; padding: 14px 0; text-decoration: none; }
.list .no { font-family: var(--mono); font-size: 13px; color: var(--accent); font-weight: 700; }
.list .t { display: block; font-family: var(--serif); font-weight: 800; font-size: 19px; line-height: 1.5; margin-top: 2px; }
.list .d { display: block; font-size: 14px; color: var(--sub); margin-top: 4px; line-height: 1.7; }
.list a:hover .t { text-decoration: underline; }
.list .soon { padding: 14px 0; color: var(--sub); font-size: 15px; }

/* ---- 絵と図を増やした部分 ---- */
:root { --tint: #f1eee6; }
.site-nav { display: flex; gap: 16px; font-size: 14px; }
.site-nav a { text-decoration: none; color: var(--sub); }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }

.eyecatch { margin-top: 20px; }
.eyecatch img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 3; }

/* 号の表紙(1200×630 の比率。中の文字は枠の幅に合わせて伸び縮みする) */
.cover {
  --c-bg: #16171f; --c-fg: #fbfaf7; --c-sub: #b9b7b0; --c-hi: #f0643f;
  container-type: inline-size;
  position: relative; width: 100%; aspect-ratio: 1200 / 630; overflow: hidden;
  background: var(--c-bg); color: var(--c-fg);
  margin-top: 20px;
}
.cover.paper { --c-bg: #f1eee6; --c-fg: #16171f; --c-sub: #5f6170; --c-hi: #b8321f; }
.cover.red { --c-bg: #b8321f; --c-fg: #fbfaf7; --c-sub: #f3cfc4; --c-hi: #16171f; }
.cover-in { position: absolute; inset: 0; padding: 4.2cqw 4.6cqw; display: grid; grid-template-columns: 1.05fr 1fr; grid-template-rows: auto 1fr auto; column-gap: 3cqw; }
.cover-top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.cover-tag { font-family: var(--sans); font-weight: 700; font-size: 2.1cqw; padding: .5cqw 1.4cqw; background: var(--c-hi); color: var(--c-bg); letter-spacing: .06em; }
.cover.red .cover-tag { color: var(--c-fg); }
.cover-logo { font-family: var(--serif); font-weight: 800; font-size: 2.4cqw; letter-spacing: .04em; }
.cover-title {
  align-self: center; margin: 0; padding: 0; border: 0;
  font-family: var(--serif); font-weight: 800; font-size: 5.6cqw; line-height: 1.32; letter-spacing: .01em;
}
.cover-title small { display: block; font-size: .62em; color: var(--c-sub); margin-bottom: .4em; }
.cover-title em { font-style: normal; color: var(--c-hi); }
.cover-art { align-self: center; }
.cover-art svg { display: block; width: 100%; height: auto; }
.cover-foot { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 1.6cqw; flex-wrap: wrap; border-top: .25cqw solid var(--c-sub); padding-top: 1.6cqw; font-size: 2.1cqw; color: var(--c-sub); }
.cover-foot b { font-family: var(--mono); font-size: 3.4cqw; color: var(--c-fg); }
.cover-foot b.hi { color: var(--c-hi); }

/* 3行でいうと */
.points { margin-top: 24px; background: var(--tint); padding: 16px 16px 18px; }
.points-title { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .06em; }
.points ol { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 10px; counter-reset: pt; }
.points li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; font-size: 16px; font-weight: 700; line-height: 1.7; counter-increment: pt; }
.points li::before {
  content: counter(pt); display: grid; place-items: center; width: 28px; height: 28px; margin-top: 1px;
  background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 14px;
}

/* 目次 */
.toc { margin-top: 20px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 12px 0; }
.toc-title { font-size: 13px; color: var(--sub); font-weight: 700; }
.toc ol { margin-top: 4px; padding-left: 1.4em; font-size: 15px; line-height: 1.9; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
h2[id] { scroll-margin-top: 16px; }

/* 仮説を絵で並べる */
.hyps { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hyp { border: 1px solid var(--ink); padding: 12px 10px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--paper); }
.hyp svg { width: 100%; height: auto; max-height: 72px; }
.hyp .n { font-family: var(--mono); font-weight: 700; font-size: 13px; color: var(--accent); }
.hyp b { font-size: 15px; line-height: 1.5; }
.hyp span { font-size: 13px; line-height: 1.7; color: var(--sub); }
.hyp .result { margin-top: auto; padding-top: 6px; border-top: 1px solid var(--rule); font-size: 13px; font-weight: 700; color: var(--ink); }
.hyp .result .mk { font-family: var(--serif); font-size: 18px; margin-right: 4px; }
.hyp.win { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.hyp.win .result .mk { color: var(--accent); }

/* しくみ図(SVG) */
.diagram { margin-top: 12px; }
.diagram svg { display: block; width: 100%; height: auto; }

/* お金の流れ(横に並び、スマホでは縦に積む) */
.flow-title { font-family: var(--serif); font-weight: 800; font-size: 17px; margin-top: 16px; }
.flow { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.node { border: 2px solid var(--ink); padding: 10px 10px; background: var(--paper); text-align: center; line-height: 1.5; flex: 1 1 0; min-width: 0; }
.node b { display: block; font-size: 15px; }
.node small { display: block; font-size: 12px; color: var(--sub); }
.node.person { flex: 0 0 auto; border: none; background: none; padding: 0 4px; }
.node.person svg { width: 34px; height: 40px; display: block; margin: 0 auto; }
.node.gray { background: var(--bar-3); }
.node.tint { background: var(--tint); }
.node.result { border-color: var(--accent); flex: 0 0 auto; }
.node.result b { color: var(--accent); font-family: var(--mono); font-size: 20px; }
.arrow { flex: 0 0 auto; text-align: center; font-family: var(--mono); font-weight: 700; font-size: 14px; line-height: 1.3; }
.arrow .a::after { content: "→"; display: block; font-size: 20px; }
.arrow.red { color: var(--accent); }
.arrow small { display: block; font-family: var(--sans); font-weight: 400; font-size: 11px; color: var(--sub); }
.flow-sep { border-top: 1px solid var(--rule); margin-top: 16px; }

/* ---- 動き(news.js が html に .anim を付けたときだけ。動きを減らす設定では付かない) ---- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 20; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

.anim .grow .bar, .anim .grow .stack { transform: scaleX(0); transform-origin: left; transition: transform .9s cubic-bezier(.22,.8,.3,1); }
.anim .grow .row:nth-child(2) .bar, .anim .grow .stack-row:nth-child(3) .stack { transition-delay: .12s; }
.anim .grow .row:nth-child(3) .bar, .anim .grow .stack-row:nth-child(4) .stack { transition-delay: .24s; }
.anim .grow.in .bar, .anim .grow.in .stack { transform: scaleX(1); }
.anim .grow .val { opacity: 0; transition: opacity .4s .7s; }
.anim .grow.in .val { opacity: 1; }

.anim .flow > * { opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s; transition-delay: calc(var(--i, 0) * .18s); }
.anim .in .flow > * { opacity: 1; transform: none; }

/* 予想クイズ */
.quiz { margin-top: 28px; border: 2px solid var(--ink); padding: 18px 16px 16px; background: var(--paper); }
.quiz-k { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .06em; background: var(--accent); color: var(--paper); padding: 2px 10px; }
.quiz-q { font-family: var(--serif); font-weight: 800; font-size: 20px; line-height: 1.6; margin-top: 10px; }
.quiz-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 14px; }
.quiz-opts button {
  min-height: 52px; padding: 8px 12px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; transition: background .2s, color .2s, transform .15s;
}
.quiz-opts button:hover:not(:disabled) { background: var(--tint); }
.quiz-opts button:active:not(:disabled) { transform: scale(.97); }
.quiz-opts button:disabled { cursor: default; }
.quiz-opts button.right { background: var(--ink); color: var(--paper); }
.quiz-opts button.wrong { color: var(--sub); text-decoration: line-through; }
.quiz-opts button.picked.right::after { content: " ← あなたの予想"; font-weight: 400; font-size: 12px; }
.quiz-res { margin-top: 16px; border-top: 1px solid var(--rule); padding-top: 14px; }
.quiz-verdict { font-weight: 700; font-size: 17px; }
.quiz-verdict .ok { color: var(--accent); }
.quiz-res .chart { margin-top: 10px; }
.quiz-res p { margin-top: 10px; font-size: 16px; }
.anim .quiz-res { animation: pop .45s cubic-bezier(.22,.8,.3,1); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 業態アイコン */
.grp-name { display: flex; align-items: center; gap: 6px; }
.grp-name svg { width: 20px; height: 20px; flex: none; }

/* 前後の号・シェア */
.issue-nav { margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.issue-nav a, .issue-nav span { border: 1px solid var(--rule); padding: 12px; text-decoration: none; display: block; min-height: 72px; }
.issue-nav a:hover { border-color: var(--ink); }
.issue-nav .k { font-size: 12px; color: var(--sub); display: block; }
.issue-nav .t { font-size: 14px; font-weight: 700; line-height: 1.5; display: block; margin-top: 2px; }
.issue-nav .r { text-align: right; }
.issue-nav span { color: var(--sub); font-size: 14px; }
.share { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border: 1px solid var(--ink); background: var(--paper);
  font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; color: var(--ink);
}
.btn.dark { background: var(--ink); color: var(--paper); }
.btn:hover { background: var(--tint); }
.btn.dark:hover { background: #2b2c38; }

/* トップ */
.hero-copy { margin-top: 4px; }
.hero-art { margin-top: 18px; }
.hero-art svg { display: block; width: 100%; height: auto; }
.latest { margin-top: 28px; display: block; text-decoration: none; border-top: 3px double var(--ink); padding-top: 14px; }
.latest .lab { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .06em; }
.latest img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 3; margin-top: 10px; }
.latest .cover { margin-top: 10px; }
.latest .t { display: block; font-family: var(--serif); font-weight: 800; font-size: clamp(22px, 5.6vw, 28px); line-height: 1.45; margin-top: 12px; text-wrap: balance; }
.latest .d { display: block; font-size: 15px; color: var(--sub); margin-top: 6px; }
.latest:hover .t { text-decoration: underline; }
.cards { list-style: none; margin-top: 8px; }
.cards li { border-bottom: 1px solid var(--rule); }
.cards a { display: grid; grid-template-columns: 1fr 120px; gap: 14px; padding: 14px 0; text-decoration: none; align-items: center; }
.cards img { width: 120px; height: 72px; object-fit: cover; display: block; }
.cards .no { font-family: var(--mono); font-size: 12px; color: var(--accent); font-weight: 700; }
.cards .t { display: block; font-family: var(--serif); font-weight: 800; font-size: 17px; line-height: 1.5; margin-top: 2px; }
.cards a:hover .t { text-decoration: underline; }
.cards .soon { padding: 14px 0; color: var(--sub); font-size: 15px; }
.how { margin-top: 36px; }
.steps { list-style: none; margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.steps li { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.6; }
.steps svg { width: 100%; height: auto; max-height: 64px; background: var(--tint); }
.steps b { font-size: 14px; }

/* このサイトについて */
.about-list { margin-top: 12px; padding-left: 1.2em; }
.about-list li + li { margin-top: 8px; }
.contact { margin-top: 12px; font-family: var(--mono); font-size: 16px; user-select: all; }

@media (max-width: 480px) {
  .row { grid-template-columns: 1fr; gap: 2px; }
  .hyps { grid-template-columns: 1fr; }
  .hyp { display: grid; grid-template-columns: 76px 1fr; column-gap: 12px; }
  .hyp svg { grid-row: span 4; max-height: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .cards a { grid-template-columns: 1fr 96px; }
  .cards img { width: 96px; height: 58px; }
  .flow { flex-direction: column; align-items: stretch; gap: 2px; }
  .node.person, .node.result { align-self: center; }
  .node.result { min-width: 60%; }
  .arrow .a::after { content: "↓"; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
