/* ============================================================
   伝わる技術 — 共通スタイル
   ============================================================ */

:root {
  --bg: #F4F6F5;
  --surface: #FFFFFF;
  --ink: #1A2238;
  --ink-soft: #545E6B;
  --ink-faint: #8A93A0;
  --accent: #FFB627;      /* マリーゴールド：ポップ・強調 */
  --accent-2: #0E7C86;    /* ティール：リンク・インタラクティブ */
  --accent-2-soft: #E4F1F1;
  --accent-3: #FF5A5F;    /* コーラル：Before・注意喚起 */
  --accent-3-soft: #FFECEC;
  --accent-soft: #FFF3D9;
  --line: #DEE4E1;
  --line-strong: #C7CFCB;
  --radius-s: 6px;
  --radius-m: 14px;
  --shadow-card: 0 1px 0 var(--line), 0 10px 24px -18px rgba(26, 34, 56, 0.35);
  --font-display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  --measure: 42rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.5;
  margin: 0 0 0.6em;
  font-weight: 700;
}

p { margin: 0 0 1.1em; }

a {
  color: var(--accent-2);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { color: #0a5d64; }

:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
}

img, svg { max-width: 100%; display: block; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.prose {
  max-width: var(--measure);
}

/* ---------------- ヘッダー / ナビ ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 246, 245, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand .brand-mark {
  color: var(--accent-2);
  font-size: 1.4rem;
  line-height: 1;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.main-nav a:hover { color: var(--ink); background: var(--surface); }

.main-nav a.is-active {
  color: var(--ink);
  background: var(--accent-soft);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 800px) {
  .main-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 14px; }
  .nav-toggle { display: inline-flex; }
}

/* ---------------- 章番号（進行を示すもの） ---------------- */

.chapter-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 14px;
}
.chapter-eyebrow .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-2-soft);
  font-size: 0.95rem;
}

/* ---------------- ヒーロー ---------------- */

.hero {
  padding: 64px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  letter-spacing: 0.01em;
}

.hero .lead {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 34rem;
}

.underline-pop {
  background-image: linear-gradient(transparent 62%, var(--accent) 62%);
  padding: 0 2px;
}

.page-header {
  padding: 56px 0 24px;
  border-bottom: 1px solid var(--line);
}

.page-header h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.page-header .lead { color: var(--ink-soft); max-width: var(--measure); }

/* ---------------- セクション共通 ---------------- */

section.block {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}
section.block:last-of-type { border-bottom: none; }

.block h2 {
  font-size: 1.4rem;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.block .section-note {
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* ---------------- Before / After ---------------- */

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 22px 0 8px;
}

@media (max-width: 700px) {
  .compare { grid-template-columns: 1fr; }
}

.compare-card {
  background: var(--surface);
  border-radius: var(--radius-m);
  padding: 20px 22px;
  border: 1px solid var(--line);
}

.compare-card.before {
  border-color: #F3D4D3;
  background: var(--accent-3-soft);
}
.compare-card.after {
  border-color: #C9E4E2;
  background: var(--accent-2-soft);
}

.compare-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.compare-card.before .compare-tag { background: #FFD9D8; color: #9C2B2E; }
.compare-card.after .compare-tag { background: #CDEAE8; color: #0a5d64; }

.compare-card p:last-child { margin-bottom: 0; }
.compare-text {
  font-size: 0.98rem;
  white-space: pre-line;
}

.compare-why {
  margin-top: 24px;
  padding-left: 20px;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
}

/* ---------------- カード群 ---------------- */

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 8px;
}

@media (max-width: 700px) {
  .chapter-grid { grid-template-columns: 1fr; }
}

.chapter-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 24px 26px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.chapter-card:hover {
  border-color: var(--accent-2);
  transform: translateY(-2px);
}
.chapter-card .cc-num {
  font-family: var(--font-display);
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.88rem;
}
.chapter-card h3 {
  margin: 6px 0 8px;
  font-size: 1.18rem;
}
.chapter-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ---------------- チェックリスト ---------------- */

.checklist {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 22px 26px;
  margin: 20px 0;
}
.checklist h3 { font-size: 1.05rem; margin-bottom: 14px; }
.checklist ul { margin: 0; padding: 0; list-style: none; }
.checklist li {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.checklist li:first-child { border-top: none; padding-top: 0; }
.checklist li:last-child { padding-bottom: 0; }
.checklist .box {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 4px;
  border: 2px solid var(--accent-2);
}
.checklist strong { display: block; }
.checklist span.desc { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------------- テンプレート枠 ---------------- */

.template-box {
  background: #FCFBF7;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-m);
  padding: 22px 24px;
  font-size: 0.96rem;
  white-space: pre-line;
  margin: 18px 0;
}
.template-box .fill {
  color: var(--accent-2);
  font-weight: 700;
  border-bottom: 1.5px solid var(--accent-2);
}

/* ---------------- インタラクティブ・デモ（トップページ） ---------------- */

.demo {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.demo-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.demo-tab {
  font-family: var(--font-body);
  font-size: 0.88rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.demo-tab.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.demo-body {
  font-size: 0.98rem;
  min-height: 148px;
  white-space: pre-line;
}
.demo-body .demo-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 8px;
  font-size: 0.88rem;
}

/* ---------------- ケース（実践編） ---------------- */

.case {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 26px 28px;
  margin: 24px 0;
}
.case-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.case-title .icon {
  flex: none;
  width: 34px;
  height: 34px;
}
.case h3 { margin: 0; font-size: 1.12rem; }
.case .scene { color: var(--ink-faint); font-size: 0.88rem; margin-bottom: 18px; }

/* ---------------- 章送りナビ ---------------- */

.chapter-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 40px 0 60px;
}
.pager-link {
  flex: 1;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 18px 20px;
  color: var(--ink);
  background: var(--surface);
}
.pager-link:hover { border-color: var(--accent-2); }
.pager-link .dir { display: block; font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 4px; }
.pager-link.next { text-align: right; }
.pager-link .title { font-family: var(--font-display); font-weight: 700; }

/* ---------------- フッター ---------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 44px;
  color: var(--ink-faint);
  font-size: 0.88rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer .foot-brand {
  font-family: var(--font-display);
  color: var(--ink-soft);
  font-weight: 700;
}

/* ---------------- 見出し用の小さな装飾（吹き出しの角） ---------------- */

.bubble-corner {
  position: relative;
}
.bubble-corner::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--accent-soft);
  bottom: -6px;
  left: 26px;
  transform: rotate(45deg);
  border-radius: 2px;
}
