@charset "UTF-8";

/* =========================================
   基本設定・リセット（分かりやすさ・読みやすさ重視）
   ========================================= */
:root {
  --bg-page: #f4f6f8;
  --bg-card: #ffffff;
  --bg-accent-light: #eef5fc;
  --bg-step-badge: #1d4ed8;
  --bg-highlight: #fffbeb;
  --text-main: #1f2937;
  --text-sub: #4b5563;
  --border-color: #d1d5db;
  --border-strong: #9ca3af;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --secondary: #ea580c;
  --secondary-hover: #c2410c;
  --link-color: #0369a1;
  --link-hover: #0c4a6e;
  --max-width: 1000px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", Meiryo, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.85;
  -webkit-text-size-adjust: 100%;
}

/* リンクはリンクと一目で分かるスタイル */
a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  font-weight: 600;
  transition: color 0.15s ease, background-color 0.15s ease;
}

a:hover,
a:focus {
  color: var(--link-hover);
  background-color: #e0f2fe;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================================
   レイアウト共通（最大幅1000px）
   ========================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* =========================================
   ヘッダー・グローバルナビゲーション
   ========================================= */
.site-header {
  background-color: #ffffff;
  border-bottom: 3px solid var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.3;
}

.site-title a {
  color: #111827;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-title a:hover {
  background-color: transparent;
  color: var(--primary);
}

.site-title-badge {
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 700;
}

.site-subtitle {
  font-size: 0.9rem;
  color: var(--text-sub);
}

/* 順序がすぐわかるステップ型ナビゲーション */
.global-nav {
  background-color: #1e293b;
  border-top: 1px solid #334155;
}

.global-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px 16px;
}

.nav-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.nav-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #334155;
  color: #ffffff;
  text-decoration: none;
  padding: 8px 6px;
  border-radius: 6px;
  border: 2px solid #475569;
  font-size: 0.85rem;
  line-height: 1.3;
  min-height: 58px;
  box-shadow: 0 2px 0 #0f172a;
}

.nav-item a:hover,
.nav-item a:focus {
  background-color: #2563eb;
  border-color: #93c5fd;
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-item a.active {
  background-color: var(--secondary);
  border-color: #fdba74;
  color: #ffffff;
  font-weight: 800;
}

.nav-step-num {
  font-size: 0.72rem;
  background-color: rgba(0, 0, 0, 0.25);
  padding: 1px 8px;
  border-radius: 999px;
  margin-bottom: 3px;
  letter-spacing: 0.03em;
}

/* =========================================
   パンくずリスト・現在位置ステップバー
   ========================================= */
.breadcrumb {
  max-width: var(--max-width);
  margin: 14px auto 0;
  padding: 0 16px;
  font-size: 0.9rem;
  color: var(--text-sub);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.breadcrumb li+li::before {
  content: "＞";
  margin-right: 6px;
  color: #6b7280;
}

/* 学習順序インジケーター */
.reading-order-bar {
  background-color: var(--bg-accent-light);
  border: 2px solid #93c5fd;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 16px 0 24px;
}

.reading-order-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reading-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.reading-steps li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}

.reading-steps li+li::before {
  content: "➡";
  color: var(--primary);
  font-size: 1rem;
}

.reading-step-link {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  background-color: #ffffff;
  border: 1px solid #93c5fd;
  color: #1e40af;
  text-decoration: underline;
  font-weight: 700;
}

.reading-step-current {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  background-color: var(--secondary);
  color: #ffffff;
  font-weight: 800;
  border: 1px solid var(--secondary);
}

/* =========================================
   メインコンテンツ領域
   ========================================= */
.main-content {
  max-width: var(--max-width);
  margin: 20px auto 48px;
  padding: 0 16px;
}

.content-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 28px 24px;
  margin-bottom: 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* 見出しスタイル */
.page-header {
  border-bottom: 4px solid var(--primary);
  padding-bottom: 14px;
  margin-bottom: 24px;
}

.page-step-label {
  display: inline-block;
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.4;
}

.page-lead {
  font-size: 1.05rem;
  color: #374151;
  background-color: #f8fafc;
  border-left: 5px solid var(--primary);
  padding: 14px 16px;
  margin-bottom: 24px;
  border-radius: 0 6px 6px 0;
}

h2.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1e3a8a;
  background-color: #eff6ff;
  border-left: 6px solid var(--primary);
  border-bottom: 2px solid #bfdbfe;
  padding: 12px 16px;
  margin: 36px 0 18px;
  border-radius: 0 6px 6px 0;
}

h3.subsection-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #1f2937;
  border-bottom: 2px dashed var(--border-strong);
  padding-bottom: 6px;
  margin: 26px 0 14px;
}

p {
  margin-bottom: 16px;
  font-size: 1rem;
}

/* =========================================
   図解・イラストボックス（画像＋キャプション）
   ========================================= */
.figure-box {
  background-color: #fafafa;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px;
  margin: 24px 0;
  text-align: center;
}

.figure-box img {
  margin: 0 auto;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  max-height: 520px;
  width: auto;
  object-fit: contain;
}

.figure-caption {
  margin-top: 10px;
  font-size: 0.92rem;
  color: #334155;
  font-weight: 700;
  background-color: #e2e8f0;
  padding: 6px 12px;
  border-radius: 4px;
  display: inline-block;
}

/* =========================================
   目次ボックス・ポイント解説ボックス
   ========================================= */
.toc-box {
  background-color: #f8fafc;
  border: 2px solid #94a3b8;
  border-radius: 8px;
  padding: 18px 22px;
  margin: 20px 0 28px;
}

.toc-title {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: #0f172a;
}

.toc-list {
  padding-left: 22px;
}

.toc-list li {
  margin-bottom: 6px;
}

.point-box {
  background-color: var(--bg-highlight);
  border: 2px solid #f59e0b;
  border-radius: 8px;
  padding: 18px 20px;
  margin: 24px 0;
}

.point-box-title {
  font-weight: 800;
  color: #b45309;
  font-size: 1.05rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 工程ステップカード一覧（トップページ等） */
.step-card-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 24px 0;
}

.step-card {
  border: 2px solid #93c5fd;
  border-radius: 10px;
  background-color: #ffffff;
  padding: 20px;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.step-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.step-badge {
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
}

.step-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e3a8a;
}

.step-arrow-down {
  text-align: center;
  font-size: 1.6rem;
  color: var(--primary);
  font-weight: 800;
  margin: -8px 0;
}

/* =========================================
   表（テーブル）スタイル
   ========================================= */
.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  font-size: 0.95rem;
}

.info-table th,
.info-table td {
  border: 1px solid #cbd5e1;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.info-table th {
  background-color: #eff6ff;
  color: #1e3a8a;
  font-weight: 800;
  width: 28%;
}

.info-table tr:nth-child(even) td {
  background-color: #f8fafc;
}

/* =========================================
   ボタン（ボタンと一目で分かる立体・高視認性デザイン）
   ========================================= */
.btn-wrap {
  margin: 18px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--primary);
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 800;
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: 8px;
  border: 2px solid #1e3a8a;
  box-shadow: 0 4px 0 #1e3a8a;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.15s ease;
}

.btn:hover,
.btn:focus {
  background-color: var(--primary-hover);
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1e3a8a;
}

.btn-orange {
  background-color: var(--secondary);
  border-color: #9a3412;
  box-shadow: 0 4px 0 #9a3412;
}

.btn-orange:hover,
.btn-orange:focus {
  background-color: var(--secondary-hover);
  box-shadow: 0 2px 0 #9a3412;
}

.btn-outline {
  background-color: #ffffff;
  color: var(--primary) !important;
  border: 2px solid var(--primary);
  box-shadow: 0 4px 0 #93c5fd;
}

.btn-outline:hover,
.btn-outline:focus {
  background-color: #eff6ff;
  box-shadow: 0 2px 0 #93c5fd;
}

/* ページ下部の「前の工程 / 次の工程へ進む」ナビゲーション */
.pager-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 2px solid var(--border-color);
}

.pager-box {
  display: flex;
  flex-direction: column;
}

.pager-box.next {
  text-align: right;
  align-items: flex-end;
}

.pager-label {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-bottom: 6px;
  font-weight: 700;
}

/* =========================================
   フッター（全ページ共通仕様・AI免責表記）
   ========================================= */
.site-footer {
  background-color: #1e293b;
  color: #f1f5f9;
  border-top: 4px solid var(--primary);
  padding: 36px 0 28px;
  margin-top: 48px;
  font-size: 0.9rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

.footer-nav-section {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #334155;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.footer-links a {
  color: #93c5fd;
  text-decoration: underline;
  font-weight: 600;
}

.footer-links a:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

.footer-disclaimer {
  background-color: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 16px;
}

.copyright {
  text-align: center;
  font-size: 0.82rem;
  color: #94a3b8;
}

/* =========================================
   レスポンシブ対応（タブレット・スマートフォン）
   ========================================= */
@media (max-width: 768px) {
  .nav-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-title {
    font-size: 1.4rem;
  }

  h2.section-title {
    font-size: 1.2rem;
  }

  .content-card {
    padding: 20px 16px;
  }

  .pager-nav {
    grid-template-columns: 1fr;
  }

  .pager-box.next {
    text-align: left;
    align-items: flex-start;
  }

  .footer-nav-section {
    grid-template-columns: 1fr;
  }

  .info-table th,
  .info-table td {
    display: block;
    width: 100%;
  }

  .info-table th {
    border-bottom: none;
  }
}

@media (max-width: 480px) {
  .nav-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}
