:root {
  --bg: #f8f7f4;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #4a5fc1;
  --border: #e5e3dd;
  --code-bg: #efede7;
  --container: 720px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--fg);
  background: var(--bg);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 12px;
}

.site-title {
  font-weight: 700;
  font-size: 18px;
  color: var(--fg);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

/* Main */
.site-main {
  padding: 48px 0 96px;
}

.prose {
  max-width: var(--container);
}

.prose h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 24px;
  line-height: 1.4;
}

.prose h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 40px 0 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  line-height: 1.4;
}

.prose h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 12px;
  line-height: 1.5;
}

.prose h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 20px 0 8px;
}

.prose p {
  margin: 0 0 16px;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose ul, .prose ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.prose li {
  margin: 4px 0;
}

.prose blockquote {
  margin: 16px 0;
  padding: 12px 20px;
  border-left: 3px solid var(--accent);
  background: #fff;
  color: var(--muted);
  font-size: 14px;
}

.prose p.meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: -8px;
  margin-bottom: 28px;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: #fff;
  font-weight: 700;
}

.prose code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  font-size: 13px;
  color: var(--muted);
}

.site-footer p {
  margin: 4px 0;
}

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

/* Index (目次) */
.toc-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.toc-list li {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 12px 0;
  background: #fff;
}

.toc-list a {
  font-weight: 700;
  font-size: 17px;
  color: var(--fg);
  text-decoration: none;
}

.toc-list a:hover {
  color: var(--accent);
}

.toc-list .desc {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: normal;
}

/* FAQ */
.faq-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  letter-spacing: 0.05em;
  margin-right: 6px;
  vertical-align: 2px;
}

details.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 10px 0;
  padding: 14px 18px;
  background: #fff;
}

details.faq-item[open] {
  background: #fdfdfc;
}

details.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  list-style: none;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::before {
  content: "＋";
  margin-right: 8px;
  color: var(--accent);
  font-weight: 700;
}

details.faq-item[open] summary::before {
  content: "−";
}

details.faq-item > *:not(summary) {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
