/* ============================================================
   reducer / AWS 請求データ取得手順書 — ページ固有スタイル
   準拠: RHEMS-Japan/reducer-lp  design/design-system（tokens/*.css）
   値は DS の変数のみを参照。DS 側ファイル（assets/css/ds/）は無改変。
   html の font-size は base.css の 62.5%（10px 基準）に従う。
   ============================================================ */

body { letter-spacing: 0; }

/* .inner は /assets/css/common.css（サイト共通）の定義を使う */

section { padding: var(--space-24) 0; }
/* 白面どうしの区切りは DS の lightgray ヘアライン1本で */
main > section + section:not(.cta-band) { border-top: 1px solid var(--reducer-lightgray); }
@media (max-width: 768px) {
  section { padding: var(--space-20) 0; }
}

h1, h2, h3 { letter-spacing: var(--ls-wide); line-height: var(--lh-heading); font-weight: var(--fw-semibold); }

/* ---------------- 目次（旧ヘッダーのメニューをページ内へ） ---------------- */
.toc {
  padding: 2.4rem 0;
  background: var(--reducer-pale);
  border-top: 1px solid var(--reducer-border-blue);
  border-bottom: 1px solid var(--reducer-border-blue);
}
.toc-inner { display: flex; align-items: center; gap: 2.4rem; flex-wrap: wrap; }
.toc-title {
  margin: 0;
  flex: none;
  font-size: 1.4rem;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  color: var(--reducer-darkblue);
}
.toc-list { display: flex; gap: 1.2rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.toc-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--reducer-white);
  border: 1px solid var(--reducer-blue);
  border-radius: var(--radius-full);
  padding: 0.5rem 1.6rem 0.5rem 0.6rem;
  font-size: 1.4rem;
  font-weight: var(--fw-semibold);
  color: var(--reducer-darkblue);
  line-height: 1.6;
}
.toc-list a:hover { background: var(--reducer-hover-blue); }
.toc-list .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--reducer-blue);
  color: var(--reducer-white);
  font-size: 1.2rem;
  font-weight: var(--fw-bold);
  flex: none;
}
@media (max-width: 600px) {
  .toc-inner { gap: 1.2rem; }
  .toc-list { width: 100%; }
  .toc-list li { width: 100%; }
  .toc-list a { width: 100%; }
}

/* ---------------- ヒーロー ---------------- */
.hero { padding: var(--space-20) 0 var(--space-16); }
.hero .inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: var(--space-10);
  align-items: center;
}
.hero-copy { min-width: 0; }
.hero-figure {
  margin: 0;
  min-width: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  justify-self: end;
}
/* 生成した正方形の図版は、切り取らずにそのまま収める（背景は白） */
.hero-figure img { width: 100%; height: 100%; object-fit: contain; }

/* 珊瑚色のチップ（DS の StepLabel 相当） */
.step-label {
  display: inline-block;
  color: var(--reducer-coral);
  border: 1px solid var(--reducer-coral);
  border-radius: var(--radius-pill);
  background: var(--reducer-white);
  padding: 0.2em 1em;
  font-weight: var(--fw-semibold);
  font-size: 1.4rem;
  line-height: 1.7;
}
.hero h1 {
  font-size: var(--fs-display);
  font-weight: var(--fw-semibold);
  margin: 1.4rem 0 0;
}
.hero .lead {
  font-size: var(--fs-lead);
  font-weight: var(--fw-semibold);
  line-height: 1.6;
  margin: 1.6rem 0 0;
}
/* 20px + 700 は WCAG の「大きな文字」に該当（青 on 白 3.83:1 で AA 可） */
.hero .lead .em { color: var(--reducer-blue); font-weight: var(--fw-bold); }
.hero .desc {
  font-size: var(--fs-body);
  margin: 1.2rem 0 0;
  color: var(--reducer-ink);
}

/* 事実の行（pale 面 + 平たい影 = back_shadow） */
.facts {
  margin: 2.4rem 0 0;
  background: var(--reducer-pale);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-flat);
  padding: 2rem 2.4rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem 3rem;
}
.facts dt {
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  color: var(--reducer-darkblue);
  line-height: 1.6;
}
.facts dd { font-size: 1.5rem; line-height: 1.7; }
/* ---------------- セクション見出し ---------------- */
.sec-head { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.sec-head .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--reducer-blue);
  color: var(--reducer-white);
  font-size: 1.4rem;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  padding: 0.6rem 2rem;
}
.sec-head h2 { font-size: var(--fs-h2); }
.sec-lead {
  font-size: var(--fs-body);
  margin-top: 1.6rem;
  max-width: 78rem;
}

/* ---------------- 段階リスト（LP flow.html の dl 構成） ---------------- */
.flow-rows { margin-top: var(--space-10); }
.flow-row {
  margin-bottom: var(--space-10);
}
.flow-row:last-child { margin-bottom: 0; }
.flow-body { min-width: 0; }
.flow-body h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  margin: 0.4rem 0 0;
}
.flow-panel {
  background: var(--reducer-pale);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-flat);
  padding: 2rem 2.4rem;
  margin-top: 1.2rem;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
.flow-panel > p + p { margin-top: 0.8rem; }
.flow-panel ul { margin-top: 1rem; }
.flow-panel li {
  position: relative;
  padding-left: 2.2rem;
  font-size: 1.5rem;
  line-height: 1.75;
  margin-bottom: 0.4em;
}
.flow-panel li:last-child { margin-bottom: 0; }
.flow-panel .panel-note {
  margin-top: 1rem;
  font-size: var(--fs-fine);
  line-height: 1.8;
  color: #56606e;
}
.flow-panel li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.95em;
  width: 1rem;
  height: 2px;
  background: var(--reducer-blue);
}

/* URL チップ */
.url {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 1.4rem;
  background: var(--reducer-white);
  border: 1px solid var(--reducer-border-blue);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.2rem;
}
.url-link { display: block; flex: 1; min-width: 0; text-decoration: none; }
.url-link:hover code { text-decoration: underline; }
.url code {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: var(--fw-medium);
  /* #007FFF on white は 3.83:1 のため、小さめの文字は DS の darkblue（7.07:1）を使う */
  color: var(--reducer-darkblue);
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.url button {
  flex: none;
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  color: var(--reducer-darkblue);
  background: var(--reducer-white);
  border: 1.5px solid var(--reducer-blue);
  border-radius: var(--radius-sm);
  padding: 0.45em 1.1em;
  cursor: pointer;
  transition: background 200ms ease;
}
.url button:hover { background: var(--reducer-hover-blue); }
.url button.done { background: var(--reducer-blue); color: var(--reducer-white); }

/* スクリーンショット */
figure.shot { margin: 2rem 0 0; max-width: 76rem; }
.shot-frame {
  border: 1px solid var(--reducer-border-blue);
  border-radius: var(--radius-md);
  background: var(--reducer-white);
  overflow: hidden;
}
.shot-frame img { width: 100%; height: auto; display: block; }
figure.shot.narrow { max-width: 30rem; }
figcaption {
  font-size: var(--fs-caption);
  line-height: 1.7;
  color: #56606e;
  margin-top: 0.8rem;
}

/* ---------------- チェックリスト ---------------- */
.check-card {
  margin-top: var(--space-12);
  background: var(--reducer-white);
  border: 1px solid var(--reducer-border-blue);
  border-radius: var(--radius-md);
  padding: var(--space-8);
}
.check-card h3 { font-size: var(--fs-title-pill); }
.check-card > p { font-size: 1.5rem; margin-top: 0.8rem; }
.check-grid {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem 2.4rem;
}
.check-grid li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: 1.5rem;
  line-height: 1.6;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--reducer-lightgray);
}
.check-grid img { width: 24px; height: 24px; flex: none; margin-top: 1px; }
.check-note {
  font-size: var(--fs-fine);
  line-height: 1.7;
  color: #56606e;
  margin-top: 1.6rem;
}

/* 補足（珊瑚のチップ + 文） */
.note-row {
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
  margin-top: var(--space-6);
  background: var(--reducer-white);
  border-radius: var(--radius-md);
  padding: 1.8rem 2.2rem;
  border: 1px solid var(--reducer-border-blue);
}
.note-row .step-label { flex: none; margin-top: 0.2rem; }
.note-row p { font-size: 1.5rem; line-height: 1.8; }

/* ---------------- よくあるご質問（DS の FaqItem 構成） ---------------- */
.faq dl {
  border: 2px solid var(--reducer-pale);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 2rem;
  background: var(--reducer-white);
}
.faq dl:last-child { margin-bottom: 0; }
.faq dt {
  background: var(--reducer-pale);
  padding: 2rem;
  font-size: 1.6rem;
  font-weight: var(--fw-medium);
  line-height: 1.7;
}
.faq dt .q { display: flex; align-items: flex-start; gap: 1.4rem; }
.faq dt .q-mark {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--reducer-blue);
  color: var(--reducer-white);
  font-size: 1.8rem;
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.faq dd { padding: 2rem; font-size: 1.6rem; line-height: 1.8; }
.faq dd p + p { margin-top: 0.8rem; }

/* ---------------- 提出バンド（LP の #footer_common_area） ---------------- */
.cta-band {
  background: var(--reducer-darkblue);
  color: var(--reducer-white);
  padding: 5rem 0;
}
.cta-band .inner {
  display: flex;
  align-items: center;
  gap: 4rem;
  flex-wrap: wrap;
}
.cta-band .fig { width: 20%; min-width: 16rem; flex: none; }
.cta-band .fig img { width: 100%; height: auto; }
.cta-band .copy { flex: 1; min-width: 30rem; max-width: 76rem; }
.cta-band h2 {
  color: var(--reducer-white);
  font-size: var(--fs-h2-band);
  letter-spacing: var(--ls-wide);
}
.cta-band p { font-size: 1.6rem; line-height: 1.8; margin-top: 1.2rem; }
.cta-band .fine {
  margin-top: 2rem;
  font-size: 1.2rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------------- レスポンシブ ---------------- */
@media (max-width: 900px) {
  .hero .inner { grid-template-columns: 1fr; }
  .hero { padding-top: var(--space-10); }
  .hero-figure { order: -1; max-width: 46rem; }
  .facts { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 2.8rem; }
  .hero .lead { font-size: 1.8rem; }
  .sec-head h2 { font-size: 2.2rem; }
  .flow-row { margin-bottom: var(--space-8); }
  .flow-body h3 { font-size: 1.9rem; }
  .flow-panel { padding: 1.6rem; }
  .check-grid { grid-template-columns: 1fr; }
}

/* ---------------- 印刷（A4） ---------------- */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  html { font-size: 58%; }
  body { background: #fff; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  section { padding: 16pt 0; }
  header, footer, .scrollTop { display: none !important; }
  /* 章の見出しだけがページ尻に残らないよう、章の頭で改ページする */
  #step1, #step2 { break-before: page; }
  .sec-head { break-inside: avoid; }
  .inner { padding: 0; max-width: none; }
  .hero { padding: 0 0 10pt; }
  .hero .inner { grid-template-columns: 1.1fr 0.9fr; gap: 8mm; }
  .flow-row, figure.shot, .check-card, .faq dl, .note-row { break-inside: avoid; }
  .flow-row { break-inside: avoid; margin-bottom: 14pt; }
  .check-card { margin-top: 16pt; padding: 14pt; }
  .sec-head, h1, h2, h3 { break-after: avoid; }
  figure.shot img { max-height: 62mm; width: auto; max-width: 100%; }
  .url button { display: none; }
  .cta-band { padding: 12pt 0; color: #fff; }
  .cta-band .fig { display: none; }
}
