/* ひとさじBot サイト共通のスタイル。外部のフォントや CDN は使わない */

:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #24221f;
  --muted: #6b665e;
  --border: #e4e0d8;
  --accent: #b5652b;
  --accent-text: #8f4c1d;
  --max: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1a18;
    --surface: #242320;
    --text: #ece8e1;
    --muted: #a8a299;
    --border: #3a3833;
    --accent: #e09a62;
    --accent-text: #eaa874;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
  line-break: strict;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}

/* ヘッダー */
.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.site-name {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

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

/* 本文 */
main {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

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

h2 {
  font-size: 1.2rem;
  line-height: 1.5;
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}

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

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

ul,
ol {
  padding-left: 1.5rem;
}

li + li {
  margin-top: 0.25rem;
}

.lead {
  font-size: 1.05rem;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin: 0 0 1rem;
}

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

.card h3 {
  margin-top: 0;
}

/* フッター */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer .wrap {
  padding-top: 1.25rem;
  padding-bottom: 2rem;
}

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