/* site.css — 1hp.jp の装飾（サイト所有）。
   配色トークンは theme.css、アイコンは icons.css、構造は cms.css（コア。編集しない）。
   目次:
     1. 共通（ロゴ・ヘッダー・フッター・見出し）
     2. トップページ（.hero / .worry / .feature / .steps / .guide-cards / .cta-band）
     3. 記事の部品（.point-box / .stat-row / .compare / .check-list）
     4. 一覧・404 */

/* ── 1. 共通 ─────────────────────────────────────────────── */

.site-header { border-bottom: 0; box-shadow: 0 1px 0 var(--color-border); }
.site-logo { display: inline-flex; align-items: center; gap: .6rem; }
.site-logo__mark { width: 36px; height: 36px; flex-shrink: 0; }
.site-logo__text { display: flex; flex-direction: column; line-height: 1.15; font-size: 1.25rem; letter-spacing: .01em; }
.site-logo__text small { font-size: .62rem; font-weight: 600; color: var(--color-text-muted); letter-spacing: .08em; }
.site-logo:hover .site-logo__text small { color: var(--color-text-muted); }

.site-nav__item.is-active > a { color: var(--color-accent); background: var(--color-accent-soft); }

.page__body h2 {
  border-bottom: 0; padding: 0 0 0 .9rem; position: relative; font-size: 1.45rem;
}
.page__body h2::before {
  content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px;
  border-radius: 3px; background: var(--color-accent);
}
.page__body h3 { color: var(--color-teal); }
.page__body a { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.page__body a.cms-btn, .page__body .guide-cards a, .page__body .child-list a { text-decoration: none; }

.page__hero { background: var(--color-surface); aspect-ratio: 1200 / 630; object-fit: cover; }
.page__icon { color: var(--color-accent); width: 2.2rem; height: 2.2rem; margin-bottom: .4rem; }
.page__meta { margin-top: .3rem; }

.toc { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }

.cms-btn { border-radius: 999px; padding: .8rem 1.6rem; box-shadow: 0 2px 0 var(--color-accent-strong); }
.cms-btn:hover { transform: translateY(1px); box-shadow: 0 1px 0 var(--color-accent-strong); }
.cms-btn--ghost {
  background: transparent; color: var(--color-text); box-shadow: inset 0 0 0 2px var(--color-text);
}
.cms-btn--ghost:hover { background: var(--color-text); color: var(--color-bg); box-shadow: inset 0 0 0 2px var(--color-text); }
.cta-row { text-align: left; }

.site-footer__operator { margin: 0 0 .3rem; font-size: .85rem; color: var(--color-text-muted); }

/* ── 2. トップページ ─────────────────────────────────────── */

.container:has(> .page--home) { max-width: var(--container-width-wide); }
.page--home .page__header { text-align: center; margin: 1.5rem auto 0; max-width: 780px; }
.page--home h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem); letter-spacing: .01em; line-height: 1.3; text-wrap: balance; word-break: auto-phrase; }
.page--home .page__body > h2 { text-align: center; padding-left: 0; margin-top: 4rem; font-size: 1.7rem; }
.page--home .page__body > h2::before {
  position: static; display: block; width: 44px; height: 5px; margin: 0 auto .9rem;
}
.page--home .page__body > p { max-width: 720px; margin-inline: auto; }

.hero { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin: 0 0 1rem; text-align: center; }
.page__body .hero__lead { font-size: 1.08rem; color: var(--color-text-muted); max-width: 680px; margin: 0 auto; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin: 1.4rem 0 0; }
.hero__art {
  width: 100%; max-width: 900px; margin: .5rem auto 0; border-radius: var(--radius-lg);
  border: 1px solid var(--color-border); background: var(--color-surface);
}
.page__body .hero__badges { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; list-style: none; padding: 0; margin: 1.2rem 0 0; }
.page__body .hero__badges li {
  display: inline-flex; align-items: center; gap: .35rem; margin: 0; padding: .3rem .8rem;
  border-radius: 999px; background: var(--color-teal-soft); color: var(--color-teal);
  font-size: .85rem; font-weight: 700;
}
.hero__badges .icon { width: 1.1em; height: 1.1em; vertical-align: 0; }

.page__body .worry { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1.8rem 0; padding: 0; list-style: none; }
.page__body .worry li {
  margin: 0; padding: 1.1rem 1.2rem 1.1rem 3.4rem; position: relative;
  background: var(--color-surface); border-radius: var(--radius-md); border: 1px solid var(--color-border);
  font-weight: 600; line-height: 1.6;
}
.worry li .icon { position: absolute; left: 1.1rem; top: 1.1rem; color: var(--color-accent); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; margin: 2rem 0; }
.feature {
  padding: 1.5rem 1.4rem; border-radius: var(--radius-lg); background: var(--color-bg);
  border: 1px solid var(--color-border); box-shadow: var(--shadow-sm);
}
.feature__icon {
  display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 16px;
  background: var(--color-accent-soft); color: var(--color-accent); margin-bottom: .9rem;
}
.feature:nth-child(even) .feature__icon { background: var(--color-teal-soft); color: var(--color-teal); }
.feature__icon .icon { width: 1.7rem; height: 1.7rem; vertical-align: 0; }
.feature h3 { margin: 0 0 .5rem; font-size: 1.12rem; color: var(--color-text); }
.feature p { margin: 0; color: var(--color-text-muted); font-size: .95rem; }

.page__body .steps { list-style: none; counter-reset: step; padding: 0; margin: 2rem auto; max-width: 760px; display: grid; gap: .9rem; }
.page__body .steps li {
  counter-increment: step; margin: 0; position: relative; padding: 1.1rem 1.3rem 1.1rem 4.6rem;
  background: var(--color-surface); border-radius: var(--radius-md); border: 1px solid var(--color-border);
}
.steps li::before {
  content: counter(step); position: absolute; left: 1.2rem; top: 1.1rem;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--color-accent); color: var(--color-accent-contrast); font-weight: 800; font-size: 1.1rem;
}
.steps strong { display: block; font-size: 1.05rem; }
.steps span { color: var(--color-text-muted); font-size: .95rem; }

.page__body .guide-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; margin: 2rem 0; padding: 0; list-style: none; }
.page__body .guide-cards li { margin: 0; }
.guide-cards a {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; color: var(--color-text);
  border-radius: var(--radius-lg); border: 1px solid var(--color-border); background: var(--color-bg);
  box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.guide-cards a:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--color-accent); text-decoration: none; }
.guide-cards img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 0; border-bottom: 1px solid var(--color-border); }
.guide-cards__body { padding: 1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .4rem; }
.guide-cards__title { font-weight: 800; line-height: 1.5; }
.guide-cards__desc { color: var(--color-text-muted); font-size: .9rem; line-height: 1.7; }

.cta-band {
  margin: 4rem 0 0; padding: 2.4rem 1.6rem; border-radius: var(--radius-lg); text-align: center;
  background: var(--color-ink); color: #fffdf9;
  background-image: radial-gradient(circle at 12% 20%, rgba(217, 72, 15, .35) 0, transparent 42%),
                    radial-gradient(circle at 88% 85%, rgba(11, 107, 99, .5) 0, transparent 45%);
}
.page__body .cta-band p { margin: 0 auto 1.4rem; max-width: 640px; color: rgba(255, 253, 249, .85); }
.page__body .cta-band .cta-band__title { margin: 0 auto .8rem; font-size: 1.5rem; font-weight: 800; line-height: 1.4; color: #fffdf9; }
.page__body .cta-band .cta-band__action { margin-bottom: 0; }
/* 帯の中の名前付きリンク（{{link:キー|ラベル}} が出す a.cms-link）をボタンとして見せる */
.page__body .cta-band a.cms-link {
  display: inline-block; padding: .85rem 1.8rem; border-radius: 999px; font-weight: 800;
  background: #ff8a5c; color: #1c1006; box-shadow: 0 2px 0 #b23a0a; text-decoration: none;
}
.page__body .cta-band a.cms-link:hover { background: #ffa582; color: #1c1006; transform: translateY(1px); box-shadow: 0 1px 0 #b23a0a; }
.page__body .cta-band a.cms-link::after { content: " \2197"; font-weight: 400; }

/* トップページは節が少ないので、自動の目次は出さない */
.page--home .toc { display: none; }

/* ── 3. 記事の部品 ───────────────────────────────────────── */

/* 要点ボックス（記事の冒頭に置く） */
.point-box {
  margin: 1.8rem 0; padding: 1.3rem 1.4rem 1.2rem; border-radius: var(--radius-lg);
  background: var(--color-teal-soft); border: 1px solid color-mix(in srgb, var(--color-teal) 30%, transparent);
}
.point-box__title {
  display: flex; align-items: center; gap: .5rem; margin: 0 0 .7rem;
  font-weight: 800; color: var(--color-teal); font-size: 1.05rem;
}
.point-box ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.point-box li { margin: 0; padding-left: 1.7rem; position: relative; }
.point-box li::before {
  content: ""; position: absolute; left: .2rem; top: .62em; width: .75rem; height: .4rem;
  border-left: 3px solid var(--color-teal); border-bottom: 3px solid var(--color-teal); transform: rotate(-45deg);
}

/* 数字のタイル */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1.8rem 0; }
.stat {
  padding: 1.1rem 1.2rem; border-radius: var(--radius-md); background: var(--color-surface);
  border: 1px solid var(--color-border); text-align: center;
}
.stat__value { display: block; font-size: 2.1rem; font-weight: 800; color: var(--color-accent); line-height: 1.2; }
.stat__value small { font-size: 1rem; }
.stat__label { display: block; margin-top: .3rem; font-size: .88rem; color: var(--color-text-muted); line-height: 1.6; }

/* 2 つの選択肢を並べるボックス */
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1.8rem 0; }
.compare__item {
  padding: 1.2rem 1.3rem; border-radius: var(--radius-md); background: var(--color-bg);
  border: 1px solid var(--color-border); border-top: 5px solid var(--color-accent);
}
.compare__item:nth-child(even) { border-top-color: var(--color-teal); }
.compare__title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; font-weight: 800; font-size: 1.05rem; }
.compare__title .icon { color: var(--color-accent); }
.compare__item:nth-child(even) .compare__title .icon { color: var(--color-teal); }
.compare__item ul { margin: 0; padding-left: 1.2rem; }
.compare__item li { margin: .3rem 0; font-size: .95rem; }

/* 表 */
table.data-table { border-radius: var(--radius-md); overflow: hidden; }
table.data-table thead th { background: var(--color-surface-alt); }

/* ── 4. 一覧・404 ────────────────────────────────────────── */

.child-list a { padding: 1.1rem 1.3rem 1.1rem 3.3rem; position: relative; background: var(--color-bg); box-shadow: var(--shadow-sm); }
.child-list a::before {
  content: ""; position: absolute; left: 1.2rem; top: 1.25rem; width: 1.4rem; height: 1.4rem;
  background-color: var(--color-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v4h4M9 12h6M9 15.5h6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v4h4M9 12h6M9 15.5h6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.child-list__title { font-size: 1.05rem; }
.child-list__desc { display: block; margin-top: .2rem; line-height: 1.7; }

.notfound { text-align: center; padding: 3rem 0; }
.notfound__code { font-size: clamp(4rem, 2rem + 12vw, 8rem); font-weight: 800; line-height: 1; margin: 0; color: var(--color-accent); letter-spacing: .04em; }
.notfound .cms-btn-row { justify-content: center; }

@media (max-width: 600px) {
  .site-logo__text small { display: none; }
  .steps li { padding-left: 4rem; }
  .cta-band { padding: 2rem 1.1rem; }
}
