:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1d1f21;
  --muted: #5d6166;
  --line: #e2ded5;
  --accent: #0f6e5c;
  --accent-ink: #ffffff;
  --callout: #e9f3ef;
  --warn: #fbf1dc;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  --serif: "New York", "Iowan Old Style", Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181a; --surface: #1f2224; --text: #ecebe7; --muted: #a3a7ab; --line: #2e3235;
    --accent: #4cc3a6; --accent-ink: #0d1f1a; --callout: #1c2b27; --warn: #2b2618;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.7 var(--font); }
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.brand { white-space: nowrap; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.brand img { border-radius: 7px; }
.top nav { display: flex; gap: 18px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.top nav a:hover { color: var(--text); }

h1, h2, h3 { line-height: 1.3; }
h1 { font-family: var(--serif); font-size: clamp(30px, 5vw, 42px); font-weight: 700; margin: 36px 0 12px; letter-spacing: -0.01em; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 16px; }
.meta { font-size: 14px; color: var(--muted); margin: 0 0 28px; }
.crumbs { margin-top: 24px; font-size: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }

.hero { padding: 24px 0 8px; }
.list { display: grid; gap: 14px; margin: 24px 0 56px; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; color: var(--text); text-decoration: none; transition: border-color .15s; }
.card:hover { border-color: var(--accent); }
.card h2 { font-size: 20px; margin: 0 0 6px; }
.card p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.card .more { font-size: 14px; color: var(--accent); font-weight: 600; }

.prose h2 { font-size: 25px; margin: 44px 0 12px; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; }
.prose p, .prose li { margin: 0 0 14px; }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 8px; }
.prose strong { font-weight: 650; }
.prose code { font-size: .9em; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }

.callout { background: var(--callout); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 28px; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout.tldr { border-left: 4px solid var(--accent); }
.callout.warn { background: var(--warn); }

.checklist { list-style: none; padding: 0 !important; counter-reset: c; }
.checklist > li { counter-increment: c; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 6px 58px; margin-bottom: 12px; }
.checklist > li::before { content: counter(c); position: absolute; left: 16px; top: 15px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.checklist h3 { margin-top: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font-weight: 650; }

.path { font-family: var(--font); font-weight: 600; }
.sources { font-size: 14px; color: var(--muted); }
h3.sources { margin-top: 40px; }
ul.sources { padding-left: 1.1em; }

.cta { margin: 48px 0 56px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.cta h2 { font-size: 20px; margin: 0 0 8px; }
.cta p { color: var(--muted); margin: 0 0 14px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 650; padding: 10px 16px; border-radius: 10px; }

footer { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 14px; color: var(--muted); }
footer p { margin: 0 0 6px; }
footer a { color: var(--muted); }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .top nav { gap: 12px; font-size: 14px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand img { width: 24px; height: 24px; }
  .checklist > li { padding-left: 52px; }
}
