/* Option A: calm editorial
   見出し = Source Serif 4（OFL・自前のファイル）、本文 = 端末の標準フォント */
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f8f5ef;
  --surface: #fffdf9;
  --tint: #f0e9dc;
  --answer: #f4eee3;
  --ink: #1e1c19;
  --muted: #5c5650;
  --link: #1d4e89;
  --accent: #9c3f19;
  --line: #e3ddd2;
  --line-strong: #8c8172;
  --shadow: 0 1px 2px rgba(30, 28, 25, .06);
  --radius-s: 4px;
  --radius-m: 8px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171513;
    --surface: #201d1a;
    --tint: #2a251f;
    --answer: #241f1a;
    --ink: #ece6dc;
    --muted: #a99f93;
    --link: #8fb9ec;
    --accent: #e59b74;
    --line: #34302b;
    --line-strong: #7a6f62;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}
.wrap { max-width: 42rem; margin: 0 auto; padding: 0 var(--s4); }
.home .wrap { max-width: 60rem; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; top: .5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.site-header { border-bottom: 1px solid var(--line); padding: var(--s3) 0 var(--s2); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--s5); }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--serif); font-weight: 600; font-size: 1.1875rem; letter-spacing: -.005em; color: var(--ink); text-decoration: none; }
.brand svg { width: 22px; height: 22px; flex: none; position: relative; top: 1px; }
.site-header nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--s4); }
.site-header nav a { display: inline-block; padding: var(--s1) 0; font-size: .9375rem; line-height: 1.5; color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--ink); text-decoration: underline; }
.site-header nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }

main { padding-top: var(--s4); padding-bottom: var(--s7); }

/* 冒頭の1行の開示 */
.notice {
  margin: 0 0 var(--s5);
  padding: var(--s2) var(--s3);
  background: var(--tint);
  border-radius: var(--radius-s);
  font-size: .875rem;
  line-height: 1.5;
  color: var(--ink);
}
.notice strong { font-weight: 600; }

/* headings */
h1, h2, h3, .toc-title, .stage { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: 1.875rem; line-height: 1.18; margin: var(--s2) 0 var(--s3); }
h2 { font-size: 1.5rem; line-height: 1.25; margin: var(--s7) 0 var(--s3); }
h3 { font-size: 1.1875rem; line-height: 1.35; margin: var(--s6) 0 var(--s2); }
h2, h3 { scroll-margin-top: 1rem; }

p, ul, ol { margin: 0 0 var(--s4); }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: .4rem; }
.lead { font-size: 1.125rem; line-height: 1.6; color: var(--muted); }
.todo { background: #fff3a3; color: #1e1c19; padding: 0 .25rem; }

/* home: hero */
.hero { display: grid; gap: var(--s5); padding: var(--s4) 0 var(--s6); border-bottom: 1px solid var(--line); align-items: center; }
.kicker { margin: 0 0 var(--s2); font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: 2.125rem; margin-top: 0; }
.hero .lead { max-width: 34rem; }
.hero-art { display: none; color: var(--ink); }
.hero-art svg { width: 100%; height: auto; }
.promises { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s1); font-size: .9375rem; }
.promises li { padding-left: 1.5rem; position: relative; margin: 0; }
.promises li::before { content: ""; position: absolute; left: .1rem; top: .55em; width: .7rem; height: .35rem; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* home: stages and cards */
#guides { margin-top: var(--s6); }
.stage { display: flex; align-items: baseline; gap: var(--s3); font-size: 1.3125rem; margin: var(--s6) 0 var(--s1); }
.stage-num { font-size: .875rem; color: var(--accent); font-family: var(--sans); font-weight: 600; letter-spacing: .06em; }
.stage-lead { margin: 0 0 var(--s2); color: var(--muted); font-size: .9375rem; }
.cards { border-top: 1px solid var(--ink); }
.card {
  display: grid;
  grid-template-columns: 1fr 4.5rem;
  gap: var(--s4);
  align-items: start;
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.card-thumb { grid-column: 2; grid-row: 1; width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--tint); }
.card-body { grid-column: 1; grid-row: 1; min-width: 0; }
.card-title { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.125rem; line-height: 1.35; color: var(--ink); }
.card:hover .card-title { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.card-meta { display: block; font-size: .8125rem; color: var(--muted); margin: var(--s1) 0 var(--s1); }
.card-text { display: block; font-size: .9375rem; line-height: 1.55; color: var(--muted); }
.card-start { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s1); }
.card + .card { margin-top: 0; }

/* article: byline, Short answer, note */
.byline { margin: 0 0 var(--s3); font-size: .8125rem; line-height: 1.5; color: var(--muted); }
.byline a { color: var(--muted); }
.article .notice { margin: 0 0 var(--s4); }
.short-answer {
  margin: 0 0 var(--s4);
  padding: var(--s3) var(--s4);
  background: var(--answer);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}
.short-answer strong:first-child { display: block; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.note {
  padding: var(--s3) 0 0;
  border-top: 1px solid var(--line);
  font-size: .875rem;
  line-height: 1.55;
  color: var(--muted);
}
.note a { color: var(--muted); }

/* 目次 */
.toc { margin: 0 0 var(--s5); padding: var(--s3) 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.toc-title { margin: 0 0 var(--s1); font-size: 1rem; }
.toc ol { margin: 0; padding-left: 1.4rem; font-size: .9375rem; }
.toc li { margin: .2rem 0; }
.toc li::marker { color: var(--accent); font-weight: 600; }

/* 比較表 */
.table-wrap { margin: 0 0 var(--s5); }
table.compare { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
table.compare th, table.compare td { border-bottom: 1px solid var(--line); padding: .6rem .625rem; text-align: left; vertical-align: top; }
table.compare thead th { border-bottom: 2px solid var(--ink); font-size: .8125rem; font-weight: 600; letter-spacing: .03em; color: var(--muted); }
table.compare tbody th { font-weight: 600; }
table.compare tbody tr:hover { background: var(--surface); }

@media (max-width: 40rem) {
  table.compare, table.compare tbody, table.compare tr, table.compare th, table.compare td { display: block; width: 100%; }
  table.compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.compare tr { margin: 0 0 var(--s3); border: 1px solid var(--line); border-top: 2px solid var(--ink); background: var(--surface); }
  table.compare th, table.compare td { border-bottom: 1px solid var(--line); }
  table.compare tr > :last-child { border-bottom: 0; }
  table.compare tbody th { font-family: var(--serif); font-size: 1rem; }
  table.compare td::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 600; color: var(--muted); }
}

/* 要約動画 */
.video { max-width: 26rem; margin: 0 auto var(--s5); }
.video video { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: var(--radius-s); background: #f4f8f7; border: 1px solid var(--line); }
.video figcaption { margin-top: var(--s2); font-size: .8125rem; line-height: 1.5; color: var(--muted); }
.video details { margin-top: .375rem; }
.video summary { cursor: pointer; color: var(--link); }
.video ol { margin: .5rem 0 0; padding-left: 1.2rem; }

blockquote { margin: var(--s4) 0; padding: var(--s1) 0 var(--s1) var(--s4); border-left: 3px solid var(--line-strong); font-family: var(--serif); font-size: 1.0625rem; }
blockquote p { margin: 0; }

.fix { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--line); font-size: .9375rem; color: var(--muted); }

/* 関連ガイド */
.more { margin-top: var(--s6); border-top: 1px solid var(--ink); padding-top: var(--s4); }
.more h2 { font-size: 1.1875rem; margin: 0 0 var(--s2); }
.more ul { list-style: none; padding: 0; margin: 0 0 var(--s3); }
.more li { margin: 0; border-bottom: 1px solid var(--line); }
.more li a { display: block; padding: var(--s3) 0; font-family: var(--serif); font-weight: 600; color: var(--ink); text-decoration: none; }
.more li a::after { content: " →"; color: var(--accent); }
.more li a:hover { color: var(--link); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: var(--s5) 0 var(--s6); color: var(--muted); font-size: .875rem; line-height: 1.6; }
.site-footer p { margin: 0 0 var(--s2); }
.site-footer a { color: var(--muted); }
.footer-brand { font-family: var(--serif); font-weight: 600; font-size: 1rem; color: var(--ink); }

/* 問い合わせフォーム */
.contact-form { max-width: 34rem; }
.contact-form label { display: block; font-weight: 600; margin-bottom: .3rem; }
.contact-form .req, .contact-form .opt { font-weight: 400; color: var(--muted); font-size: .9em; }
.contact-form input, .contact-form textarea { display: block; width: 100%; font: inherit; padding: .65rem .75rem; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); color: inherit; }
.contact-form textarea { resize: vertical; min-height: 9rem; }
.contact-form input:focus, .contact-form textarea:focus { outline: 3px solid var(--link); outline-offset: 1px; }
.contact-form button { font: inherit; font-weight: 600; padding: .7rem 1.4rem; border: 0; border-radius: var(--radius-s); background: var(--ink); color: var(--bg); cursor: pointer; }
.contact-form .hp { display: none; }
.small { font-size: .9rem; color: var(--muted); }

@media (min-width: 40.0625rem) {
  body { font-size: 1.125rem; }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }
  .hero h1 { font-size: 3rem; }
  .card { grid-template-columns: 1fr 6rem; gap: var(--s5); padding: var(--s5) 0; }
  .card-thumb { width: 6rem; height: 6rem; }
  .card-title { font-size: 1.25rem; }
}
@media (min-width: 56rem) {
  .hero { grid-template-columns: 1.5fr 1fr; padding: var(--s6) 0 var(--s7); }
  .hero-art { display: block; }
  .stage-block { display: grid; grid-template-columns: 13rem 1fr; gap: var(--s6); margin-top: var(--s6); }
  .stage-block .stage { margin-top: var(--s4); flex-direction: column; gap: var(--s1); }
}
@media (prefers-reduced-motion: no-preference) {
  .card-title { transition: color .15s; }
}

/* 自作のイラスト（線画）。色はトークンから取る */
.brand .acc { stroke: var(--accent); }
.hero-art .ln { stroke: var(--line); stroke-width: 1.5; }
.hero-art .fl { fill: var(--tint); stroke: var(--ink); stroke-width: 1.5; }
.hero-art .pg { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.hero-art .ink { stroke: var(--ink); stroke-width: 1.5; }
.hero-art .acc { stroke: var(--accent); stroke-width: 2; }

/* 調整（スクショ確認後） */
main.wrap { padding-top: var(--s3); padding-bottom: var(--s7); }
.site-header .wrap { align-items: center; }
.site-header nav li { margin: 0; }
.short-answer strong:first-child { display: inline; font-size: .8125rem; margin-right: .2rem; }
@media (max-width: 40rem) {
  body { line-height: 1.6; }
  .article h1 { font-size: 1.625rem; line-height: 1.2; }
}
@media (max-width: 40rem) {
  .site-header { padding: var(--s2) 0 var(--s1); }
  .site-header nav a { padding-top: .125rem; padding-bottom: .125rem; }
  .article h1 { margin-bottom: var(--s2); }
  .short-answer { line-height: 1.5; padding: var(--s3); }
}
