@charset "utf-8";

/* =========================================================
   FAKE DOCUMENTARY "Q" 特別増刊号
   図版（f01〜f24）の紙面に合わせた基調
   ========================================================= */

:root {
  --paper:        #f4f0e6;
  --paper-deep:   #ece7da;
  --ink:          #23201c;
  --ink-soft:     #55504a;
  --ink-faint:    #8a837a;
  --rule:         #cfc7b6;
  --rule-soft:    #e0d9ca;

  /* 予約色：二つの読み。本文でもこの対応を崩さない */
  --soma:         #2c4a6e;
  --ours:         #b4552c;

  --measure:      36em;   /* 本文の行長 */
  --gutter:       14px;   /* モバイル左右余白（研修まとめの規約） */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  font-size: 17px;
  line-height: 1.95;
  letter-spacing: .02em;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 見出し ---------- */

h1, h2, h3 {
  line-height: 1.55;
  letter-spacing: .04em;
  font-weight: 600;
}

h1 {
  font-size: 1.85rem;
  margin: 0 0 .6em;
}

h2 {
  font-size: 1.3rem;
  margin: 3.2em 0 1em;
  padding-bottom: .5em;
  border-bottom: 1px solid var(--rule);
}

h3 {
  font-size: 1.06rem;
  margin: 2.4em 0 .8em;
  color: var(--ink-soft);
}

p { margin: 0 0 1.5em; }

a { color: var(--soma); text-decoration: underline; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

/* ---------- ヘッダー ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  padding: 56px 0 34px;
  margin-bottom: 44px;
}
.masthead--hero {
  position: relative;
  isolation: isolate;
  background-image:
    linear-gradient(90deg, rgba(244, 240, 230, .98) 0%, rgba(244, 240, 230, .96) 62%, rgba(244, 240, 230, .52) 100%),
    url("../brand/hero-archive-desk.webp");
  background-size: cover;
  background-position: center;
}
.masthead--hero > * { position: relative; z-index: 1; }
.masthead--hero .lede { max-width: 22em; }
.chapter-icon {
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 0 10px;
  color: var(--ink-soft);
}
.masthead .kicker {
  font-size: .78rem;
  letter-spacing: .22em;
  color: var(--ink-faint);
  margin: 0 0 1.6em;
  font-family: system-ui, sans-serif;
}
.masthead .lede {
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* ---------- 章内ナビゲーション ---------- */

.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5em 1em;
  margin: -18px 0 2.6em;
  padding-bottom: 1em;
  border-bottom: 1px solid var(--rule-soft);
  font-family: system-ui, sans-serif;
  font-size: .78rem;
  line-height: 1.6;
}
.chapter-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.chapter-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .35em;
}

/* ---------- 章本文 ---------- */

.episode {
  margin: 3em 0;
  padding-top: 1.6em;
  border-top: 1px solid var(--rule-soft);
}
.episode h3 { margin-top: 0; color: var(--ink); }
.episode-meta {
  display: block;
  margin-bottom: .8em;
  color: var(--ink-faint);
  font-family: system-ui, sans-serif;
  font-size: .73rem;
  letter-spacing: .08em;
}
.pending {
  background: rgba(236, 231, 218, .62);
  border: 1px dashed var(--rule);
  padding: 1em 1.2em;
  color: var(--ink-soft);
  font-size: .94rem;
}
.pending::before {
  content: "未照合";
  display: block;
  margin-bottom: .35em;
  color: var(--ink-faint);
  font-family: system-ui, sans-serif;
  font-size: .7rem;
  letter-spacing: .14em;
}
.pending p:last-child { margin-bottom: 0; }
.claim {
  margin: 1.7em 0;
  padding: .85em 1em;
  border: 1px solid var(--rule);
  font-size: .94rem;
}
.claim.inference { border-style: dashed; }
.claim.unresolved { border-style: dotted; background: rgba(255, 255, 255, .2); }
.claim p:last-child { margin-bottom: 0; }
.figure-scroll { overflow-x: auto; }
.figure-scroll figure { min-width: 520px; }
.source-note {
  color: var(--ink-faint);
  font-family: system-ui, sans-serif;
  font-size: .78rem;
  line-height: 1.8;
}
.source-note a { overflow-wrap: anywhere; }
.episode-index,
.source-list {
  margin: 1.8em 0;
  padding-left: 1.4em;
}
.episode-index li,
.source-list li { margin: .65em 0; }
.pending-mark {
  color: var(--ink-faint);
  font-family: system-ui, sans-serif;
  font-size: .78rem;
  white-space: nowrap;
}
.appendix-section { margin: 3.5em 0; }

/* ---------- 図版 ---------- */

figure {
  margin: 2.8em 0;
}
figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule-soft);
  background: var(--paper);
}
figcaption {
  margin-top: .9em;
  font-size: .84rem;
  line-height: 1.8;
  color: var(--ink-faint);
  font-family: system-ui, sans-serif;
  letter-spacing: .01em;
}
figcaption .fig-title {
  display: block;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: .2em;
}

/* 図版の前後に置く伴走文 */
.fig-why, .fig-read {
  border-left: 2px solid var(--rule);
  padding-left: 1.1em;
  color: var(--ink-soft);
  font-size: .95rem;
}

/* ---------- 二つの読み ---------- */

.reading { padding-left: 1.1em; border-left: 3px solid; }
.reading.soma { border-color: var(--soma); }
.reading.ours { border-color: var(--ours); }
.reading h3 { margin-top: 0; }
.reading.soma h3 { color: var(--soma); }
.reading.ours h3 { color: var(--ours); }

/* ---------- 注記・確度 ---------- */

.note {
  background: var(--paper-deep);
  border: 1px solid var(--rule-soft);
  padding: 1.2em 1.4em;
  margin: 2.4em 0;
  font-size: .92rem;
  line-height: 1.85;
}
.note > :last-child { margin-bottom: 0; }
.note .note-label {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: .74rem;
  letter-spacing: .16em;
  color: var(--ink-faint);
  margin-bottom: .7em;
}

/* 主張のラベル。色だけに頼らず、必ず文字を出す */
.tag {
  display: inline-block;
  font-family: system-ui, sans-serif;
  font-size: .68rem;
  letter-spacing: .12em;
  padding: .18em .7em;
  border: 1px solid var(--ink-faint);
  color: var(--ink-soft);
  vertical-align: .12em;
  margin-right: .5em;
  white-space: nowrap;
}
.tag.fact        { border-style: solid; }
.tag.inference   { border-style: dashed; }
.tag.unresolved  { border-style: dotted; }
.tag.optional    { border-style: dotted; color: var(--ink-faint); }

/* ---------- ロードマップ ---------- */

.roadmap { margin: 2.4em 0; padding: 0; list-style: none; counter-reset: ch; }
.roadmap li {
  counter-increment: ch;
  border-top: 1px solid var(--rule-soft);
  padding: 1.1em 0 1.1em 3.2em;
  position: relative;
}
.roadmap li:last-child { border-bottom: 1px solid var(--rule-soft); }
.roadmap li::before {
  content: counter(ch);
  position: absolute;
  left: .6em; top: 1.15em;
  font-family: system-ui, sans-serif;
  font-size: .82rem;
  color: var(--ink-faint);
  border: 1px solid var(--rule);
  border-radius: 50%;
  width: 1.9em; height: 1.9em;
  display: grid; place-items: center;
}
.roadmap .ch-title { display: block; font-weight: 600; }
.roadmap .ch-desc { display: block; font-size: .9rem; color: var(--ink-soft); }

/* ---------- 章送り ---------- */

.next {
  border-top: 1px solid var(--rule);
  margin-top: 4em;
  padding-top: 1.6em;
}
.next a { display: block; font-size: 1.05rem; }
.next .next-label {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: .72rem;
  letter-spacing: .16em;
  color: var(--ink-faint);
  margin-bottom: .5em;
}

/* ---------- 外部注釈（既定で閉じる） ---------- */

details.optional {
  border: 1px dotted var(--rule);
  padding: .9em 1.2em;
  margin: 2em 0;
  background: transparent;
}
details.optional summary {
  cursor: pointer;
  font-size: .9rem;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
}
details.optional[open] summary { margin-bottom: .9em; }
details.optional p:last-child { margin-bottom: 0; }

/* ---------- フッター ---------- */

.colophon {
  border-top: 1px solid var(--rule);
  margin-top: 5em;
  padding: 2.4em 0 5em;
  font-size: .82rem;
  line-height: 1.9;
  color: var(--ink-faint);
  font-family: system-ui, sans-serif;
}

/* ---------- モバイル ---------- */

@media (max-width: 640px) {
  body { font-size: 16px; line-height: 1.9; }
  .wrap { padding: 0 var(--gutter); }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.16rem; margin-top: 2.6em; }
  .masthead { padding: 36px 0 26px; margin-bottom: 32px; }
  .masthead--hero { background-position: 62% center; }
  .chapter-nav { margin-top: -8px; }
  figure { margin: 2.2em calc(var(--gutter) * -1); }
  figure img { border-left: 0; border-right: 0; }
  figcaption { padding: 0 var(--gutter); }
  .roadmap li { padding-left: 2.9em; }
  .figure-scroll { margin-right: calc(var(--gutter) * -1); }
  .figure-scroll figure { min-width: 520px; margin-right: var(--gutter); }
}

@media (max-width: 420px) {
  .masthead--hero { background-image: none; }
}
