@charset "UTF-8";
/* ビジネススタート教材 — 教材サイトのスタイル
   このファイルは build.py が書き出します。直すときは build.py の STYLE_CSS を直してください。
   色を変えたいときは、下の --accent を1ヶ所だけ変えれば全体が変わります。 */

:root {
  --accent: #2d7a5f;              /* ← ここ1ヶ所で、サイト全体の色が変わります */

  /* 下の2つは --accent から自動で作ります（古いブラウザ用に、ひかえの値も置いています） */
  --accent-weak: rgba(45, 122, 95, 0.12);
  --accent-line: rgba(45, 122, 95, 0.28);

  --bg: #fbfaf6;
  --panel: #ffffff;
  --fg: #475569;                  /* 本文の文字色（青みのあるグレー） */
  --fg-soft: #5a697f;             /* 補足・キャプションの文字色 */
  --line: #e4e0d6;

  --measure: 42rem;
  --radius: 10px;

  /* 本文はゴシック、大見出しは明朝。Webフォントが読めない環境でも
     うしろのフォントで自然に読めるように並べています。 */
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans",
               "Yu Gothic UI", "Yu Gothic", "YuGothic", "Meiryo", "MS PGothic",
               sans-serif;
  --font-head: "Shippori Mincho B1", "Yu Mincho", "YuMincho",
               "Hiragino Mincho ProN", "MS PMincho", serif;
  --font-mono: "SFMono-Regular", Consolas, "BIZ UDGothic", "MS Gothic",
               "Courier New", monospace;
}

@supports (color: color-mix(in srgb, red 50%, transparent)) {
  :root {
    --accent-weak: color-mix(in srgb, var(--accent) 12%, transparent);
    --accent-line: color-mix(in srgb, var(--accent) 30%, transparent);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 2.0;
  letter-spacing: 0.03em;
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
}

a { color: var(--accent); }

/* 外に開くリンク（押すと新しいタブで開きます） */
.exlink {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  word-break: break-all;
}
.exlink:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- 上のおび ---- */
.sitebar {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 10;
}
.sitebar__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.6rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.sitebar__title {
  font-size: 0.8rem;
  color: var(--fg-soft);
  text-decoration: none;
  line-height: 1.4;
}
.sitebar__title:hover { color: var(--accent); }
.sitebar__links {
  display: flex;
  gap: 0.4rem;
  flex: 0 0 auto;
}
.sitebar__btn {
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 0.2rem 0.85rem;
  white-space: nowrap;
  background: transparent;
}
.sitebar__btn:hover { background: var(--accent-weak); }
.sitebar__btn--tool { background: var(--accent-weak); }
.sitebar__now {
  flex: 1 1 auto;
  font-size: 0.8rem;
  color: var(--fg-soft);
  font-weight: 700;
  white-space: nowrap;
  padding-left: 0.7rem;
  border-left: 1px solid var(--line);
}
/* 狭い画面では、教材名の下の行に回り込ませる */
@media (max-width: 640px) {
  .sitebar__inner { flex-wrap: wrap; row-gap: 0.15rem; }
  .sitebar__now { order: 3; flex-basis: 100%; border-left: none; padding-left: 0; }
}

/* ---- 本文の幅 ---- */
.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1.1rem 4rem;
}
.page--top { padding-top: 3rem; }

/* ---- 見出し ----
   大見出し（h1・h2）だけ明朝。h3から下は本文と同じゴシックのままにしています
   （小見出しまで明朝にすると、画面が重たくなるため）。 */
.doc h1,
.doc h2,
.toptitle,
.toc__head,
.log__head {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.doc h1 {
  font-size: 1.6rem;
  line-height: 1.55;
  margin: 0 0 2rem;
  padding-bottom: 0.9rem;
  border-bottom: 3px solid var(--accent);
}
.doc h2 {
  font-size: 1.25rem;
  line-height: 1.6;
  margin: 3.2rem 0 1.1rem;
  padding-left: 0.7rem;
  border-left: 5px solid var(--accent);
}
.doc h3 {
  font-size: 1.06rem;
  line-height: 1.6;
  margin: 2.4rem 0 0.8rem;
  color: var(--accent);
}
.doc h4, .doc h5, .doc h6 {
  font-size: 1rem;
  margin: 1.8rem 0 0.6rem;
}

/* ---- 章の顔になる画像（見出しのすぐ下） ---- */
.hero {
  margin: 0 0 2.2rem;
}
.hero__img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
}
.hero--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 7.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.hero__note {
  font-size: 0.82rem;
  color: var(--fg-soft);
}

/* ---- 段落・リスト ---- */
.doc p { margin: 1.15rem 0; }
.doc strong { font-weight: 700; }
.doc ul, .doc ol { margin: 1.15rem 0; padding-left: 1.5rem; }
.doc li { margin: 0.5rem 0; }
.doc ul li::marker { color: var(--accent); }
.doc ol li::marker { color: var(--accent); font-weight: 700; }

.doc hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.6rem 0;
}

/* ---- 引用 ---- */
.doc blockquote {
  margin: 1.6rem 0;
  padding: 0.9rem 1.15rem;
  background: var(--accent-weak);
  border-left: 4px solid var(--accent-line);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.doc blockquote > :first-child { margin-top: 0; }
.doc blockquote > :last-child { margin-bottom: 0; }
.doc blockquote h1,
.doc blockquote h2,
.doc blockquote h3 {
  font-size: 1.05rem;
  color: inherit;
  border: 0;
  padding: 0;
  margin: 0.2rem 0;
  line-height: 1.7;
}

/* ---- インラインのコード ---- */
.doc code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: #f0eee7;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.08em 0.35em;
}

/* ---- コードブロック（コピーする枠） ---- */
.codebox {
  margin: 1.6rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f6f4ee;
  overflow: hidden;
}
.codebox__bar {
  display: flex;
  justify-content: flex-end;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line);
  background: #efece4;
}
.copy-btn {
  font: inherit;
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.45rem 0.9rem;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.copy-btn:hover { filter: brightness(1.08); }
.copy-btn.is-done { background: var(--fg-soft); }
/* ボタンのない枠（読むための箱）は、少しだけ静かに */
.codebox--plain { background: #f4f2ec; }
.codebox__pre {
  margin: 0;
  padding: 0.9rem 1rem 1.1rem;
  overflow-x: auto;
}
.codebox__pre code {
  display: block;
  /* 枠の中身はClaudeに貼りつける日本語の文なので、本文と同じゴシックにそろえます */
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  white-space: pre-wrap;
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
}

/* ---- 表（スマホでは横スクロール） ---- */
.table-wrap {
  margin: 1.6rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.table-wrap table {
  border-collapse: collapse;
  width: 100%;
  min-width: 22rem;
  font-size: 0.94rem;
}
.table-wrap th, .table-wrap td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.table-wrap th {
  background: var(--accent-weak);
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}
.table-wrap tbody tr:last-child td { border-bottom: 0; }

/* ---- チェックリスト ---- */
.checklist {
  list-style: none;
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.checklist li { margin: 0.35rem 0; }
.checkitem {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
}
.checkitem__box {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.32rem 0 0;
  border: 2px solid var(--accent-line);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  position: relative;
}
.checkitem__box:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.checkitem__box:checked::after {
  content: "";
  position: absolute;
  left: 0.36rem;
  top: 0.12rem;
  width: 0.3rem;
  height: 0.62rem;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.checkitem__box:checked + .checkitem__text {
  color: var(--fg-soft);
  text-decoration: line-through;
  text-decoration-color: var(--accent-line);
}

/* ---- 画面の写真（スクショ） ---- */
.shot {
  margin: 1.6rem 0;
  padding: 1.4rem 1rem;
  border: 2px dashed var(--accent-line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
}
/* 写真が入ったら、点線の枠をやめて写真そのものを見せる */
.shot--filled {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
/* width:auto ＋ max-width:100% にしてあるのは、小さい画像を
   むりに引き伸ばしてぼやけさせないためです（大きい画像は画面幅に収まります）。 */
.shot__img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.shot__mark { font-size: 1.4rem; line-height: 1; margin-bottom: 0.5rem; }
.shot__caption {
  font-size: 0.86rem;
  color: var(--fg-soft);
  line-height: 1.7;
}
.shot--filled .shot__caption {
  margin-top: 0.55rem;
  text-align: left;
}

/* ---- 教材の図（図解）。写真とちがい、枠線もキャプションも付けません ---- */
.zukai { margin: 1.8rem 0; }
.zukai__img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.zukai--empty {
  padding: 1.4rem 1rem;
  border: 2px dashed var(--accent-line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
}

/* ---- 画像を大きく見る（押すと開きます） ---- */
.zoomable { cursor: zoom-in; }

body.is-zoomlocked { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(20, 20, 22, 0.86);
  cursor: zoom-out;
  overscroll-behavior: contain;
}
.lightbox[hidden] { display: none; }
.lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 94vw;
  max-height: 86vh;     /* 小さい画像は原寸のまま。引き伸ばしません */
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  cursor: zoom-out;
}
.lightbox__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2.75rem;
  height: 2.75rem;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  cursor: pointer;
}
.lightbox__close:hover { background: rgba(0, 0, 0, 0.75); }
.lightbox__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.6rem;
  padding: 0 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}
.shot__hint {
  display: inline;
  margin-left: 0.3em;
  font-size: 0.92em;
  opacity: 0.85;
}

/* ---- 前後のナビ ---- */
.pagenav {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.pagenav__link {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  justify-content: center;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--panel);
  text-decoration: none;
  color: var(--fg);
  font-size: 0.82rem;
  line-height: 1.5;
}
.pagenav__link:hover { background: var(--accent-weak); }
.pagenav__link--index {
  flex: 0 0 auto;
  align-items: center;
  color: var(--accent);
  font-weight: 700;
}
.pagenav__link--next { text-align: right; }
.pagenav__dir { color: var(--accent); font-weight: 700; }
.pagenav__name { color: var(--fg-soft); }
.pagenav__spacer { flex: 1 1 0; }

/* ---- トップページ ---- */
.toptitle {
  font-size: 1.7rem;
  line-height: 1.5;
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--accent);
}
.lead { margin: 0 0 2.6rem; color: var(--fg-soft); }
.toc__head, .log__head {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  padding-left: 0.7rem;
  border-left: 5px solid var(--accent);
}
.toc { list-style: none; margin: 0 0 3rem; padding: 0; }
.toc__item { margin: 0 0 0.55rem; }
.toc__link {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--fg);
}
.toc__link:hover {
  border-color: var(--accent-line);
  background: var(--accent-weak);
}
.toc__no {
  flex: 0 0 4.2rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}
.toc__name { line-height: 1.6; }

.log {
  padding: 1.1rem 1.2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.log__list { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.log__list li { display: flex; gap: 1rem; }
.log__date { color: var(--fg-soft); flex: 0 0 6.5rem; }

/* ---- 画面が広いとき ---- */
@media (min-width: 768px) {
  body { font-size: 18px; }
  .page { padding: 2.8rem 1.5rem 5rem; }
  .doc h1 { font-size: 1.9rem; }
  .doc h2 { font-size: 1.35rem; }
  .sitebar__title { font-size: 0.85rem; }
}

@media print {
  .sitebar, .pagenav, .copy-btn { display: none; }
  body { background: #fff; }
}
