/* Claude Code導入講座 復習ノート — 方眼ノートの紙・紺のペン・黄色のマーカー */
:root {
  --paper: #fbfaf6;
  --grid: #e2e4e2;
  --navy: #24467a;
  --ink: #33363b;
  --yellow: #f4cf57;
  --sticky: #fbe7a1;
  --white: #ffffff;
  --grid-size: 20px;
  --col-image: 520px;
  --col-text: 560px;
  --gap: 56px;
  --radius: 10px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.85;
  font-feature-settings: "palt" 0;
}

h1, h2, h3, .part__title {
  word-break: auto-phrase;
  text-wrap: balance;
  line-break: strict;
}

.nw { display: inline-block; }

a { color: var(--navy); text-underline-offset: 3px; }
/* フォーカス表示：内側に黄・外側に紺の二重線。白地でも黄色地でも見分けられる */
a:focus-visible, summary:focus-visible, .checklist label:has(input:focus-visible) {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--yellow);
}
.checklist input:focus-visible { outline: none; }
#steps { scroll-margin-top: 12px; }
#steps:focus { outline: none; }

img { display: block; max-width: 100%; height: auto; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--white);
  border: 2px solid var(--navy);
}

/* ---------- 上端の題字 ---------- */
.masthead {
  border-bottom: 2px solid var(--navy);
  background: rgba(251, 250, 246, 0.92);
}
.masthead__inner {
  max-width: calc(var(--col-image) + var(--col-text) + var(--gap));
  margin: 0 auto;
  padding: 14px 16px 12px;
}
.masthead__kicker {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}
.masthead__title {
  margin: 2px 0 0;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--navy);
}
.masthead__sub {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
}

/* ---------- パート（画像＋書き起こし） ---------- */
.part {
  max-width: calc(var(--col-image) + var(--col-text) + var(--gap));
  margin: 0 auto;
  padding: 0 0 48px;
}
.part + .part { border-top: 1px dashed rgba(36, 70, 122, 0.35); padding-top: 0; }

.part__figure {
  margin: 0 auto;
  max-width: var(--col-image);
}
.part__figure img {
  width: 100%;
  box-shadow: 0 1px 0 rgba(36, 70, 122, 0.12);
}

.part__text {
  margin: 20px 16px 0;
  padding: 24px 20px 26px;
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
}
.part__text > :first-child { margin-top: 0; }
.part__text > :last-child { margin-bottom: 0; }

.part__label {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  border-radius: 999px;
}
.part__title {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--navy);
}
.part__h3 {
  margin: 30px 0 8px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--navy);
}

.answer {
  padding: 12px 14px;
  background: var(--sticky);
  border-radius: 6px;
}
.answer strong { color: var(--navy); font-weight: 600; }

.list, .steps { margin: 12px 0; padding-left: 1.4em; }
.list li, .steps li { margin: 6px 0; }
.steps li::marker { color: var(--navy); font-weight: 600; }
.steps strong { color: var(--navy); font-weight: 600; }

.facts, .defs, .trouble, .footer__meta { margin: 16px 0; }
.facts div, .defs div, .footer__meta div {
  padding: 10px 0;
  border-bottom: 1px solid var(--grid);
}
.facts dt, .defs dt, .footer__meta dt {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}
.facts dd, .defs dd, .footer__meta dd { margin: 2px 0 0; }

.trouble div {
  padding: 12px 0;
  border-bottom: 1px solid var(--grid);
}
.trouble dt { font-weight: 600; color: var(--navy); }
.trouble dd { margin: 4px 0 0; padding-left: 1.4em; position: relative; }
.trouble dd::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--navy);
}

.note {
  font-size: 15px;
  line-height: 1.8;
  color: #4a4e55;
}

.toc {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--paper);
  border-radius: 6px;
}
.toc__title { margin: 0 0 4px; font-weight: 600; color: var(--navy); }
.toc ol { margin: 0; padding-left: 1.4em; }
.toc li { margin: 4px 0; }
.toc a { display: inline-block; padding: 6px 0; min-height: 44px; line-height: 32px; }

.warn {
  margin-top: 24px;
  padding: 14px 16px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: var(--paper);
}
.warn__title { margin: 0 0 4px; font-weight: 600; color: var(--navy); }
.warn__title::before { content: "× "; }
.warn p:last-child { margin-bottom: 0; }

/* ---------- 明日やることのチェックリスト ---------- */
.checklist {
  list-style: none;
  margin: 18px 0;
  padding: 0;
  counter-reset: step;
}
.checklist li {
  counter-increment: step;
  margin: 10px 0;
}
.checklist label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 44px;
  padding: 12px 14px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}
.checklist input {
  flex: none;
  width: 26px;
  height: 26px;
  margin: 2px 0 0;
  accent-color: var(--navy);
}
.checklist span::before {
  content: counter(step) ". ";
  color: var(--navy);
  font-weight: 600;
}
.checklist b {
  font-weight: 600;
  color: var(--navy);
}
.checklist b::after { content: ""; display: block; }
.checklist input:checked + span { color: #6b6f76; }
.checklist input:checked + span b { text-decoration: line-through; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }

.aside {
  padding: 12px 14px;
  background: var(--sticky);
  border-radius: 6px;
}

/* ---------- 画像のない段（実務例・FAQ） ---------- */
.plain {
  max-width: 760px;
  margin: 0 auto 40px;
  padding: 26px 20px;
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
}
main > .plain { margin-left: 16px; margin-right: 16px; }
.plain__title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--navy);
}

.faq__item {
  padding: 14px 0;
  border-bottom: 1px solid var(--grid);
}
.faq__q {
  margin: 0 0 6px;
  padding-left: 1.6em;
  text-indent: -1.6em;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--navy);
}
.faq__q::before { content: "Q. "; }
.faq__item p { margin: 0; }

/* ---------- フッター ---------- */
.footer {
  margin-top: 24px;
  padding: 32px 0 96px;
  border-top: 2px solid var(--navy);
  background: rgba(251, 250, 246, 0.94);
}
.footer__inner { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.footer__title { margin: 0 0 8px; font-size: 19px; font-weight: 500; color: var(--navy); }
.footer p { font-size: 15px; }

/* ---------- 「明日やる5つの手順」への導線 ----------
   1439px以下：画面に固定する帯は本文の行を覆うため置かず、各パートの本文末尾に
   本文フロー内のリンクを置く（スクロールのどの位置でも本文と重ならない）。
   1440px以上：本文の右の余白に収まる丸ボタンを追従させる（下のメディアクエリ）。 */
.next-link { margin: 20px 0 0; }
.next-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.jump {
  display: none;
  position: fixed;
  z-index: 5;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 18px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ---------- PC：画像と書き起こしを左右に ---------- */
@media (min-width: 1024px) {
  body { font-size: 17px; }
  .masthead__inner { padding: 18px 32px 14px; }
  .masthead__title { font-size: 22px; }
  .part {
    display: grid;
    grid-template-columns: var(--col-image) minmax(0, var(--col-text));
    gap: var(--gap);
    align-items: start;
    padding: 56px 32px;
  }
  .part + .part { padding-top: 56px; }
  .part__figure { margin: 0; position: sticky; top: 24px; }
  .part__text { margin: 0; padding: 32px 32px 34px; }
  .part__title { font-size: 28px; }
  main > .plain { margin: 0 auto 48px; padding: 32px; }
}

/* 本文の右に追従リンクが収まる幅（約1400px以上）だけ、右下の丸いボタンにする */
@media (min-width: 1440px) {
  .next-link { display: none; }
  .jump {
    display: flex;
    right: 32px;
    bottom: 32px;
    min-height: 48px;
    font-size: 15px;
    border: 2px solid var(--navy);
    border-radius: 999px;
    box-shadow: 0 2px 0 var(--navy);
  }
  .jump:focus-visible { outline-offset: 3px; box-shadow: 0 0 0 3px var(--yellow); }
  .jump[hidden] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .jump { transition: none; }
}
