/*
  GitHub Pages 用の共通スタイル。
  外部フォント・外部 CDN には依存しない（読み込み失敗と追跡を避けるため）。
*/

:root {
  --bg: #ffffff;
  --bg-subtle: #f6f7f9;
  --text: #1c1c1e;
  --text-muted: #6b7280;
  --border: #e3e5e8;
  --accent: #0a66c2;
  --accent-contrast: #ffffff;
  --radius: 12px;
  --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111315;
    --bg-subtle: #1a1d20;
    --text: #e9eaec;
    --text-muted: #9aa1a9;
    --border: #2b2f34;
    --accent: #6cb6ff;
    --accent-contrast: #10161c;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
}

/* ── ヘッダー ───────────────────────────── */

header.site {
  padding: 2.5rem 0 1.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

/* index では h1、下層ページでは p（見出しの重複を避けるため） */
header.site .app-name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

header.site .app-name a {
  color: inherit;
  text-decoration: none;
}

header.site .tagline {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── 本文 ───────────────────────────────── */

h1 {
  font-size: 1.75rem;
  line-height: 1.4;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.15rem;
  line-height: 1.5;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.25rem;
}

h3 {
  font-size: 1rem;
  margin: 1.75rem 0 0.5rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4em;
}

li {
  margin-bottom: 0.35rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

.updated {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0 0 2rem;
}

.lead {
  font-size: 1.05rem;
}

/* ── パーツ ─────────────────────────────── */

.card {
  display: block;
  padding: 1rem 1.15rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  margin-bottom: 0.75rem;
}

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

.card .card-title {
  font-weight: 600;
  display: block;
}

.card .card-desc {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.note {
  padding: 0.9rem 1.15rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.925rem;
}

.note :last-child {
  margin-bottom: 0;
}

.button {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
  margin: 0 0 1rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  white-space: nowrap;
  color: var(--text-muted);
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
}

/* ── フッター ───────────────────────────── */

footer.site {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

footer.site nav a {
  margin-right: 1rem;
  display: inline-block;
}
