:root {
  --bg: #fffaf3;
  --surface: #ffffff;
  --text: #2b2118;
  --muted: #6b5d50;
  --accent: #d6402f;
  --accent-text: #ffffff;
  --border: #eadfce;
  --code-bg: #f6efe4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1612;
    --surface: #261e18;
    --text: #f3ebe1;
    --muted: #b8a999;
    --accent: #ff6b57;
    --accent-text: #1c1612;
    --border: #3a2f26;
    --code-bg: #30261e;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans',
    'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
  line-height: 1.8;
  font-size: 16px;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

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

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

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

header.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 14px;
}

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

header.site nav a:hover,
header.site nav a[aria-current='page'] {
  color: var(--accent);
}

main {
  padding: 32px 0 56px;
}

h1 {
  font-size: 26px;
  line-height: 1.4;
  margin: 0 0 8px;
}

h2 {
  font-size: 20px;
  line-height: 1.5;
  margin: 40px 0 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

h3 {
  font-size: 16px;
  margin: 24px 0 4px;
}

p,
ul,
ol {
  margin: 8px 0 16px;
}

li {
  margin: 4px 0;
}

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

.meta {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
}

.lead {
  font-size: 18px;
  color: var(--muted);
}

.note {
  background: var(--code-bg);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 8px 0 16px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 15px;
}

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

th {
  background: var(--code-bg);
  font-weight: 600;
  white-space: nowrap;
}

.cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 16px 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.card h3 {
  margin-top: 0;
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

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

footer.site {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  padding: 24px 0 40px;
}

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

footer.site ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 8px;
}
