/* 特集・解説ページ共通デザイン（.guide-*）
   使い方は AGENTS.md「特集ページの作り方」を参照。
   追従インデックスは /js/guide-toc.js、アイコンは assets-src/icons/core-line/（Streamline Core Line）をインラインSVGで使う */
/* ===== 解説ガイド共通（保育園ガイド・支援金ガイドで同じ定義） ===== */
.guide { max-width: 720px; margin: 0 auto; padding: 8px 20px 72px; }
.guide a { color: var(--accent-ink); }

/* ヒーロー */
.guide-hero { padding: 32px 0 8px; }
.guide-eyebrow {
  margin: 0 0 12px; font-family: var(--font-en, inherit); font-size: 11px; letter-spacing: .16em;
  font-weight: 700; color: var(--accent-ink); text-transform: uppercase;
}
.guide-hero h1 { font-size: 26px; line-height: 1.45; margin: 0 0 16px; word-break: auto-phrase; line-break: strict; }
.guide-hero-lead { margin: 0; font-size: 15px; line-height: 1.9; color: var(--ink-2); }

/* 要点カード */
.guide-points { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 12px; }
.guide-point {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 18px 20px; height: 100%; display: flex; flex-direction: column; gap: 6px;
}
.guide-point-label { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.guide-point-value { font-size: 20px; font-weight: 700; line-height: 1.35; color: var(--ink); word-break: auto-phrase; }
.guide-point-desc { font-size: 13.5px; line-height: 1.75; color: var(--ink-2); flex: 1 0 auto; }

/* 目次 */
.guide-toc { margin: 48px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.guide-toc-title { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: var(--ink-3); letter-spacing: .08em; }
.guide-toc ol { list-style: none; margin: 0; padding: 0; display: grid; }
.guide-toc li { border-bottom: 1px solid var(--line-soft); }
.guide-toc a {
  display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 8px 4px;
  color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.5;
}
.guide-toc a::after { content: '→'; margin-left: auto; color: var(--ink-3); font-size: 14px; }
.guide-toc a:hover { color: var(--accent-ink); }
.guide-toc a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 4px var(--accent-bg); border-radius: 4px; }
.guide-toc-num { font-family: var(--font-en, inherit); font-size: 13px; font-weight: 700; color: var(--accent-ink); min-width: 22px; }

/* セクション */
.guide-sec { margin: 80px 0 0; scroll-margin-top: 16px; }
.guide-num { margin: 0 0 8px; font-family: var(--font-en, inherit); font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--accent-ink); }
.guide-sec h2 { font-size: 22px; line-height: 1.5; margin: 0 0 16px; word-break: auto-phrase; line-break: strict; }
.guide-sec h3 { font-size: 16.5px; line-height: 1.6; margin: 40px 0 12px; word-break: auto-phrase; line-break: strict; }
.guide-lead { font-size: 16px; line-height: 1.9; color: var(--ink); margin: 0 0 24px; }
.guide-sec p { font-size: 15px; line-height: 1.95; margin: 0 0 16px; }
.guide-sec strong { color: var(--ink); }

/* 罫線区切りのリスト */
.guide-list { list-style: none; margin: 0 0 24px; padding: 0; border-top: 1px solid var(--line-soft); }
.guide-list li { padding: 14px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; line-height: 1.85; }
.guide-list-term { display: block; font-weight: 700; margin-bottom: 4px; }

/* チップ（短い項目の並び） */
.guide-chips { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; }
.guide-chips li {
  display: flex; align-items: center; min-height: 48px; padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  font-size: 14.5px; line-height: 1.6;
}

/* 並列カード */
.guide-cards { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; align-items: stretch; }
.guide-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 20px; height: 100%; display: flex; flex-direction: column; gap: 8px;
}
.guide-card-tag {
  display: inline-flex; align-items: center; justify-content: center; line-height: 1; align-self: flex-start;
  padding: 6px 12px; border-radius: 999px; background: var(--accent-bg); color: var(--accent-ink);
  font-size: 13px; font-weight: 700;
}
.guide-card-title { font-size: 17px; font-weight: 700; line-height: 1.5; }
.guide-card-body { font-size: 14px; line-height: 1.8; color: var(--ink-2); flex: 1 0 auto; }
.guide-card-foot { font-size: 13px; line-height: 1.7; color: var(--ink-3); padding-top: 10px; border-top: 1px solid var(--line-soft); }

/* 手順 */
.guide-steps { list-style: none; margin: 0 0 24px; padding: 0; counter-reset: step; }
.guide-steps li { position: relative; padding: 0 0 28px 52px; }
.guide-steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; font-family: var(--font-en, inherit);
}
.guide-steps li::after { content: ''; position: absolute; left: 16px; top: 40px; bottom: 6px; width: 2px; background: var(--line); }
.guide-steps li:last-child { padding-bottom: 0; }
.guide-steps li:last-child::after { display: none; }
.guide-step-title { display: block; font-size: 16px; font-weight: 700; line-height: 1.6; padding-top: 4px; }
.guide-step-body { display: block; font-size: 14.5px; line-height: 1.85; color: var(--ink-2); margin-top: 4px; }

/* 注意 */
.guide-notes { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }
.guide-notes li { background: var(--accent-bg); border-radius: 8px; padding: 18px 20px; font-size: 14.5px; line-height: 1.9; }
.guide-notes-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--accent-ink); margin-bottom: 4px; }

/* 表 */
.guide-table-wrap { overflow-x: auto; margin: 0 0 12px; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.guide-table th, .guide-table td { border-bottom: 1px solid var(--line); padding: 12px 12px; text-align: left; vertical-align: top; line-height: 1.6; }
.guide-table thead th { font-size: 12.5px; color: var(--ink-3); font-weight: 700; border-bottom: 2px solid var(--line-strong, var(--line)); }
.guide-table tbody th { font-weight: 700; white-space: nowrap; }
.guide-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.guide-table-note { font-size: 12.5px; line-height: 1.8; color: var(--ink-3); margin: 0 0 24px; }

/* 出典（折りたたみ） */
.guide-src { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }
.guide-src summary {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; list-style: none;
  font-weight: 700; color: var(--ink-3);
}
.guide-src summary::-webkit-details-marker { display: none; }
.guide-src summary::before { content: '+'; font-family: var(--font-en, inherit); }
.guide-src[open] summary::before { content: '−'; }
.guide-src summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.guide-src ul { margin: 0 0 8px; padding-left: 1.2em; }
.guide-src li { font-size: 13px; line-height: 1.8; }

.guide-back { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--ink-3); text-decoration: none; }
.guide .guide-back { color: var(--ink-3); }

/* FAQ */
.guide-faq details { border-bottom: 1px solid var(--line); }
.guide-faq details:first-of-type { border-top: 1px solid var(--line); }
.guide-faq summary {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 0;
  cursor: pointer; list-style: none; font-weight: 700; font-size: 15px; line-height: 1.6;
}
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary::after { content: '+'; margin-left: auto; color: var(--ink-3); font-weight: 400; font-size: 18px; }
.guide-faq details[open] summary::after { content: '−'; }
.guide-faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.guide-faq details p { margin: 0 0 20px; font-size: 14.5px; line-height: 1.95; color: var(--ink-2); }

.guide-disclaimer { margin: 56px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.9; }

@media (min-width: 640px) {
  .guide-hero { padding-top: 48px; }
  .guide-hero h1 { font-size: 32px; }
  .guide-points { grid-template-columns: repeat(3, 1fr); }
  .guide-points.is-4 { grid-template-columns: repeat(2, 1fr); }
  .guide-toc ol { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .guide-sec { margin-top: 104px; }
  .guide-sec h2 { font-size: 26px; }
  .guide-cards { grid-template-columns: repeat(3, 1fr); }
  .guide-cards.is-2 { grid-template-columns: repeat(2, 1fr); }
  .guide-chips { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 639px) {
  .guide-table { font-size: 13px; }
  .guide-table th, .guide-table td { padding: 10px 6px; }
}

/* 追従インデックス（js/guide-toc.js が生成） */
.guide-sec { scroll-margin-top: 72px; }
.guide-bar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 55;
  background: var(--surface); border-bottom: 1px solid var(--line);
  transform: translateY(-110%); visibility: hidden;
  transition: transform .2s ease, visibility .2s;
}
.guide-bar.is-visible { transform: translateY(0); visibility: visible; }
.guide-bar-inner { max-width: 720px; margin: 0 auto; padding: 0 20px; position: relative; }
.guide-bar-toggle {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0;
  background: none; border: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.guide-bar-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 4px var(--accent-bg); border-radius: 4px; }
.guide-bar-num { font-family: var(--font-en, inherit); font-size: 13px; font-weight: 700; color: var(--accent-ink); min-width: 22px; }
.guide-bar-title { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 700; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide-bar-label {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1;
  min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap;
}
.guide-bar-label::after { content: '+'; font-family: var(--font-en, inherit); font-weight: 400; }
.guide-bar.is-open .guide-bar-label::after { content: '−'; }
.guide-bar-panel {
  list-style: none; margin: 0; padding: 4px 0 12px; max-height: 60vh; overflow-y: auto;
  border-top: 1px solid var(--line-soft);
}
.guide-bar-panel[hidden] { display: none; }
.guide-bar-panel a {
  display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 4px 4px;
  color: var(--ink); text-decoration: none; font-size: 14.5px; line-height: 1.5;
}
.guide-bar-panel a.is-active { font-weight: 700; color: var(--accent-ink); }
.guide-bar-panel a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.guide-bar-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
}
@media (min-width: 641px) {
  .guide-sec { scroll-margin-top: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .guide-bar { transition: none; }
}

/* アイコン（Streamline Core Line をインラインSVGで。色は currentColor） */
.guide-ic {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 999px; background: var(--accent-bg); color: var(--accent-ink);
}
.guide-ic svg { width: 22px; height: 22px; }
.guide-point .guide-ic, .guide-card .guide-ic { margin-bottom: 6px; }
.guide-notes-label { display: flex; align-items: center; gap: 8px; }
.guide-notes-label .guide-ic { width: auto; height: auto; background: none; }
.guide-notes-label .guide-ic svg { width: 20px; height: 20px; }


/* ヒーローの主要アクション（ツールのあるページで、ツールへ直接飛ばす） */
.guide-cta-row { margin: 24px 0 0; }
.guide-cta {
  display: inline-flex; align-items: center; justify-content: center; line-height: 1.2; gap: 8px;
  min-height: 52px; padding: 14px 24px; border-radius: 999px; width: 100%; max-width: 360px;
  background: var(--accent-ink); color: #fff; font-size: 15.5px; font-weight: 700; text-decoration: none;
}
.guide .guide-cta { color: #fff; }
.guide-cta::after { content: '↓'; font-family: var(--font-en, inherit); }
.guide-cta:hover { background: var(--accent); }
.guide-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; box-shadow: 0 0 0 5px var(--accent-bg); }
