/* 学習ガイド。色・書体・ヘッダーは教材の styles.css をそのまま使い、ここにはこのページの部品だけを足す。 */
.hub-page {
  --hub-blue: var(--accent);       /* ボタン・番号・縦線の青はこの1つで決める */
  --hub-blue-dark: #223c88;
  --hub-soft: #eaf1ff;
  --hub-frame: #d9e2f0;
  --hub-rule: #e4eaf4;
  --hub-tile: #f6f9fd;
}
.hub-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* 章の先頭を「ここから」と示す。今いるページではないので aria-current は付けない。 */
.hub-page .chapter-nav .hub-nav-start { color: var(--brand); background: var(--hub-soft); }
.hub-page .site-header a:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ---------- hero ---------- */
.hub-hero { padding: 20px 0 22px; }
.hub-hero .crumb { margin: 0 0 4px; font-size: 14px; line-height: 1.6; }
.hub-hero h1 { margin: 0; font-size: clamp(30px, 4.6vw, 44px); line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
.hub-hero .lead { max-width: none; margin: 2px 0 0; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }

/* ---------- 1枚の白い枠と、左の順路 ---------- */
.hub-sheet {
  --gutter: 96px;
  --mark: 46px;
  --mark-left: 21px;
  --pad-y: 28px;
  --pad-right: 18px;
  --rule-inset: 18px;
  margin: 0 0 28px;
  background: var(--paper);
  border: 1px solid var(--hub-frame);
  border-radius: 10px;
}
.hub-route { list-style: none; margin: 0; padding: 0; }
.hub-step { position: relative; display: grid; grid-template-columns: var(--gutter) minmax(0, 1fr); }
.hub-step + .hub-step::after { content: ""; position: absolute; top: 0; left: var(--rule-inset); right: var(--rule-inset); height: 1px; background: var(--hub-rule); }
.hub-step:not(:last-child)::before {
  content: ""; position: absolute; z-index: 1;
  left: calc(var(--mark-left) + var(--mark) / 2 - 2px);
  top: calc(var(--pad-y) + var(--mark) - 1px);
  bottom: calc(-1 * var(--pad-y) - 1px);
  width: 4px;
  background: var(--hub-blue);
}
.hub-number {
  position: relative; z-index: 2;
  display: grid; place-items: center; align-self: start;
  width: var(--mark); height: var(--mark);
  margin: var(--pad-y) 0 0 var(--mark-left);
  border-radius: 50%;
  background: var(--hub-blue);
  color: #fff;
  font-size: 24px; font-weight: 700; line-height: 1; letter-spacing: 0;
}

/* ---------- 共通の部品 ---------- */
.hub-phase {
  justify-self: start; width: fit-content;
  margin: 0; padding: 2px 12px;
  border-radius: 6px;
  background: var(--hub-soft);
  color: var(--hub-blue);
  font-size: 15px; font-weight: 700; line-height: 1.6;
}
.hub-art { display: block; width: 100%; height: auto; max-width: 100%; }
.hub-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; justify-self: start; align-self: start;
  width: 204px; max-width: 100%; min-height: 46px;
  padding: 8px 18px;
  border-radius: 6px;
  background: var(--hub-blue);
  color: #fff;
  font-size: 16px; font-weight: 700; line-height: 1.4; letter-spacing: .04em;
  text-decoration: none;
}
.hub-cta:hover { background: var(--hub-blue-dark); }
.hub-cta:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.hub-arrow { flex: none; }

/* ---------- 1・2段目：左に文字、右に絵 ---------- */
.hub-learn {
  --art-width: min(520px, 58%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--art-width);
  grid-template-rows: auto auto auto 1fr;
  grid-template-areas: "phase art" "title art" "sub art" "cta art";
  column-gap: 20px;
  padding: var(--pad-y) var(--pad-right) var(--pad-y) 0;
}
.hub-learn > .hub-phase { grid-area: phase; }
.hub-learn > .hub-title { grid-area: title; }
.hub-learn > .hub-sub { grid-area: sub; }
.hub-learn > .hub-cta { grid-area: cta; }
.hub-learn > .hub-art { grid-area: art; align-self: end; }
.hub-learn.is-examples { --art-width: min(600px, 64%); }
.hub-learn.is-examples > .hub-art { align-self: center; }
.hub-learn.is-capabilities { --art-width: min(300px, 42%); }
.hub-capabilities-art { grid-area: art; display: block; align-self: center; justify-self: center; width: 100%; max-width: 300px; height: auto; }
.hub-title {
  margin: 6px 0 0;
  font-family: var(--serif); font-size: clamp(24px, 3.1vw, 33px); line-height: 1.35; letter-spacing: .04em;
  word-break: keep-all; overflow-wrap: anywhere;
}
.hub-sub { margin: 2px 0 10px; color: var(--muted); font-size: 17px; line-height: 1.6; }

/* ---------- 3段目：道具の2列 ---------- */
.hub-tools {
  margin: var(--pad-y) var(--pad-right) var(--pad-y) -12px;
  padding: 12px;
  border: 1px solid var(--hub-rule);
  border-radius: 10px;
}
.hub-tools > .hub-phase { margin: 0 0 8px; }
.hub-practice { margin: 16px 0 0; }
.hub-practice a { font-weight: 700; }
.hub-tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hub-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 41%;
  grid-template-rows: auto auto 1fr;
  grid-template-areas: "title art" "sub art" "cta art";
  column-gap: 8px;
  min-width: 0;
  padding: 18px 10px 18px 16px;
  background: var(--paper);
  border: 1px solid var(--hub-rule);
  border-radius: 10px;
}
.hub-tool-title {
  grid-area: title;
  display: flex; align-items: center; gap: 8px;
  margin: 0;
  font-family: var(--serif); font-size: clamp(23px, 2.45vw, 26px); line-height: 1.35; letter-spacing: .02em;
}
.hub-tool-title > span { min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.hub-mark { display: block; flex: none; object-fit: contain; }
.hub-tool-sub { grid-area: sub; margin: 2px 0 8px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.hub-tool > .hub-art { grid-area: art; align-self: center; }
.hub-tool > .hub-cta { grid-area: cta; width: 208px; }

/* ---------- 同じ枠の下段：参考 ---------- */
.hub-reference {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 22px;
  padding: 20px 26px 20px 25px;
  border-top: 1px solid var(--hub-frame);
}
.hub-ref-label {
  margin: 0; padding: 5px 16px;
  border-radius: 6px;
  background: var(--hub-soft);
  color: var(--hub-blue);
  font-size: 15px; font-weight: 700; line-height: 1.6;
}
.hub-ref-title { margin: 0; font-family: var(--serif); font-size: clamp(23px, 2.7vw, 28px); line-height: 1.35; letter-spacing: .04em; word-break: keep-all; overflow-wrap: anywhere; }
.hub-ref-sub { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.hub-ref-tiles { display: flex; gap: 12px; }
.hub-tile {
  display: grid; place-items: center; align-content: center; gap: 2px;
  width: 84px; min-height: 72px;
  padding: 6px 4px;
  background: var(--hub-tile);
  border: 1px solid var(--hub-rule);
  border-radius: 8px;
  font-size: 14px; font-weight: 500; line-height: 1.3;
}
.hub-reference > .hub-cta { align-self: center; width: 172px; }

/* Claude と Codex は読める間は2列を保つ。1列にするのは狭いスマホだけ。 */
@media (max-width: 1080px) {
  .hub-tool { grid-template-columns: minmax(0, 1fr) 37%; }
}
@media (max-width: 980px) {
  .hub-sheet { --gutter: 72px; --mark: 42px; --mark-left: 15px; --pad-y: 24px; --pad-right: 14px; --rule-inset: 14px; }
  .hub-number { font-size: 22px; }
  .hub-learn { column-gap: 16px; }
  .hub-learn.is-overview { --art-width: 54%; }
  .hub-learn.is-examples { --art-width: 62%; }
  .hub-tool {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "title" "sub" "art" "cta";
    padding: 18px 12px;
  }
  .hub-tool > .hub-art { justify-self: center; width: min(100%, 260px); margin: 0 0 10px; }
  .hub-tool > .hub-cta { justify-self: stretch; width: 100%; }
  .hub-reference {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "label copy copy" "tiles tiles cta";
    row-gap: 10px;
    padding: 20px 14px;
  }
  .hub-ref-label { grid-area: label; }
  .hub-ref-copy { grid-area: copy; }
  .hub-ref-tiles { grid-area: tiles; }
  .hub-reference > .hub-cta { grid-area: cta; }
}
@media (max-width: 900px) {
  .hub-learn.is-examples {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "phase" "title" "sub" "art" "cta";
  }
  .hub-learn.is-examples > .hub-art { margin: 0 0 10px; }
}
@media (max-width: 720px) {
  .hub-learn.is-overview {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "phase" "title" "sub" "art" "cta";
  }
  .hub-learn.is-overview > .hub-art { margin: 0 0 10px; }
  .hub-learn.is-capabilities {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "phase" "title" "sub" "art" "cta";
  }
  .hub-capabilities-art { width: min(100%, 240px); margin: 0 0 10px; }
}
@media (max-width: 640px) {
  .hub-hero { padding: 14px 0 16px; }
  .hub-sheet { --gutter: 46px; --mark: 34px; --mark-left: 6px; --pad-y: 20px; --pad-right: 10px; --rule-inset: 10px; }
  .hub-number { font-size: 19px; }
  .hub-title { font-size: clamp(24px, 7vw, 27px); }
  .hub-learn > .hub-cta { justify-self: stretch; width: 100%; }
  .hub-tools { margin-left: -4px; padding: 12px 6px 6px; }
  .hub-tool-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hub-tool { padding: 18px 10px; }
  .hub-tool > .hub-art { width: min(100%, 220px); }
  .hub-tool-title { gap: 6px; font-size: 22px; }
  .hub-tool-title .hub-mark { width: 26px; height: 26px; }
}
@media (max-width: 560px) {
  .hub-reference { grid-template-columns: minmax(0, 1fr); grid-template-areas: "label" "copy" "tiles" "cta"; padding: 18px 10px; }
  .hub-ref-label { justify-self: start; }
  .hub-reference > .hub-cta { justify-self: stretch; width: 100%; }
  .hub-ref-tiles { justify-content: flex-start; gap: 8px; }
  .hub-tile { width: 78px; }
}
/* 320px幅でも見出しが1文字だけ次の行へ落ちないようにする。 */
@media (max-width: 360px) {
  .hub-sheet { --pad-right: 8px; }
  .hub-tool-title { gap: 5px; font-size: 21px; }
  .hub-tool-title .hub-mark { width: 24px; height: 24px; }
}
/* 最終更新: 2026-11-01 19:00 */
