/* ==========================================================================
   偽物と粗悪な互換品に怒りを込めて — 共通スタイル
   1ファイルで全ページを賄う。ビルド不要、外部依存なし。
   色は :root の変数だけを書き換えれば全ページに反映される。
   ========================================================================== */

:root {
  --bg:          #faf9f7;
  --surface:     #ffffff;
  --surface-alt: #f3f0eb;
  --border:      #e2ddd4;
  --text:        #1c1b19;
  --muted:       #605d57;
  --accent:      #1f5f6e;
  --accent-soft: #e7f0f2;
  --warn:        #8a5a0f;
  --warn-soft:   #fbf4e6;

  --maxw:   44rem;   /* 本文の最大幅。日本語は詰めすぎない */
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #15161a;
    --surface:     #1d1f24;
    --surface-alt: #24272d;
    --border:      #343841;
    --text:        #e7e5e1;
    --muted:       #a5a29b;
    --accent:      #7fb9c7;
    --accent-soft: #1b2e34;
    --warn:        #d7a44a;
    --warn-soft:   #2a2519;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium",
               "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: .02em;
  line-break: strict;
  overflow-wrap: break-word;
}

/* --- レイアウトの基本 ---------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 16px;   /* スマホの左右余白 */
}

.wrap--wide { max-width: 56rem; }

main { display: block; }

section { margin-block: 3rem; }

/* --- ヘッダー ------------------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem 1.2rem;
  padding-block: .9rem;
}

.site-title {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.5;
  color: var(--text);
  text-decoration: none;
}

/* 狭い画面ではサイト名を少し詰める（長いタイトルでも横にはみ出さない） */
@media (max-width: 26rem) {
  .site-title { font-size: .92rem; }
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1rem;
  font-size: .85rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-block: .15rem;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible { color: var(--accent); border-bottom-color: var(--accent); }

.site-nav a[aria-current="page"] { color: var(--text); font-weight: 700; }

/* --- 見出し -------------------------------------------------------------- */

h1, h2, h3 {
  line-height: 1.5;
  letter-spacing: .01em;
  font-weight: 700;
}

h1 {
  font-size: 1.65rem;
  margin-block: 0 1rem;
}

h2 {
  font-size: 1.2rem;
  margin-block: 2.8rem .9rem;
  padding-bottom: .45rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.02rem;
  margin-block: 2rem .6rem;
}

p { margin-block: 0 1.4rem; }

a { color: var(--accent); }

/* --- リード文・補足 ------------------------------------------------------ */

.lead {
  font-size: 1.02rem;
  color: var(--text);
}

.meta {
  font-size: .82rem;
  color: var(--muted);
  letter-spacing: .04em;
  margin-block: 0 1.6rem;
}

.note {
  font-size: .87rem;
  color: var(--muted);
  line-height: 1.8;
}

/* --- ヒーロー（トップ） -------------------------------------------------- */

.hero {
  padding-block: 3.2rem 2.4rem;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
}

.hero .lead { max-width: 34rem; }

/* --- カード類 ------------------------------------------------------------ */

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  padding: 0;
  margin: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .cards--3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 1.3rem;
}

.card h3 {
  margin-block: 0 .5rem;
  font-size: .98rem;
}

.card p { margin-block: 0; font-size: .9rem; line-height: 1.85; color: var(--muted); }

.card__num {
  display: block;
  font-size: .75rem;
  letter-spacing: .12em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: .5rem;
}

/* 記事一覧のカード（リンク全体がクリック可能） */

.entry {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.4rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s;
}

.entry:hover,
.entry:focus-visible {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.entry__kicker {
  font-size: .74rem;
  letter-spacing: .12em;
  color: var(--accent);
  font-weight: 700;
}

.entry__title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.6;
  margin-block: .4rem .5rem;
}

.entry__excerpt {
  font-size: .89rem;
  color: var(--muted);
  line-height: 1.85;
  margin: 0;
}

/* --- 囲み（ポイント・注意） ---------------------------------------------- */

.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.2rem;
  margin-block: 1.8rem;
}

.callout > :last-child { margin-bottom: 0; }

.callout__label {
  display: block;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: .5rem;
}

.callout--warn {
  background: var(--warn-soft);
  border-left-color: var(--warn);
}

.callout--warn .callout__label { color: var(--warn); }

/* --- 本文（記事） -------------------------------------------------------- */

.article { padding-block: 2.6rem 1rem; }

.article ul,
.article ol { margin-block: 0 1.4rem; padding-left: 1.4rem; }

.article li { margin-bottom: .5rem; }

.article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

.article figure { margin: 1.8rem 0; }

.article figcaption {
  font-size: .83rem;
  color: var(--muted);
  margin-top: .6rem;
  line-height: 1.75;
}

blockquote {
  margin: 1.8rem 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

/* --- 表（比較表） -------------------------------------------------------- */

.table-scroll { overflow-x: auto; margin-block: 1.6rem; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: .89rem;
  line-height: 1.7;
}

th, td {
  border: 1px solid var(--border);
  padding: .6rem .7rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-alt);
  font-weight: 700;
  white-space: nowrap;
}

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

.checklist { list-style: none; padding: 0; margin-block: 1.4rem; }

.checklist li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .7rem;
}

.checklist label {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  padding: .9rem 1rem;
  cursor: pointer;
}

.checklist input[type="checkbox"] {
  margin-top: .45rem;
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

.checklist strong { display: block; font-size: .95rem; line-height: 1.7; }

.checklist span {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.8;
  margin-top: .25rem;
}

.checklist input:checked + div strong { color: var(--muted); text-decoration: line-through; }

/* --- 外部リンクカード（相談窓口） ---------------------------------------- */

.links { list-style: none; padding: 0; margin-block: 1.4rem; }

.links li {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.1rem 1.2rem;
  margin-bottom: .9rem;
}

.links a { font-weight: 700; text-decoration: none; }
.links a:hover { text-decoration: underline; }

.links p { margin: .4rem 0 0; font-size: .87rem; color: var(--muted); line-height: 1.8; }

/* --- 次に読む導線 -------------------------------------------------------- */

.next {
  display: grid;
  gap: .9rem;
  margin-block: 2.6rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 40rem) {
  .next { grid-template-columns: 1fr 1fr; }
}

.next a {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}

.next a:hover { border-color: var(--accent); }

.next small {
  display: block;
  font-size: .74rem;
  letter-spacing: .1em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: .3rem;
}

.next strong { font-size: .95rem; line-height: 1.6; }

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

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding-block: 2rem 3rem;
  font-size: .84rem;
  color: var(--muted);
  line-height: 1.85;
}

.site-footer a { color: var(--muted); }

.site-footer p { margin-block: 0 .7rem; }

/* --- ユーティリティ ------------------------------------------------------ */

.stack-sm > * + * { margin-top: .6rem; }

.center { text-align: center; }

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 16px;
  top: 8px;
  z-index: 10;
  background: var(--surface);
  border: 1px solid var(--accent);
  padding: .5rem .8rem;
  border-radius: var(--radius);
}

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

/* 印刷時はナビを落とす */
@media print {
  .site-header, .site-nav, .next { display: none; }
  body { background: #fff; color: #000; }
}
