/* ===== Design tokens ===== */
:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --border: #e6e2db;
  --text: #1c1a17;
  --text-muted: #5f5950;
  --text-faint: #8a8378;
  --accent: #2f6f5e;
  --accent-soft: #eef4f2;
  --shadow: 0 1px 2px rgba(28, 26, 23, .04), 0 8px 24px rgba(28, 26, 23, .05);
  --radius: 12px;
  --maxw: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --surface: #1f1e1b;
    --border: #33312d;
    --text: #ece9e4;
    --text-muted: #b0aaa1;
    --text-faint: #837d74;
    --accent: #7dc4ae;
    --accent-soft: #22302c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

/* ===== Base ===== */
* { 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", "Noto Sans JP", "Segoe UI", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration: none; }

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

/* ===== Layout ===== */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

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

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text);
  text-decoration: none;
}

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

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

main { padding: 56px 0 72px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  font-size: 13px;
  color: var(--text-faint);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

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

/* ===== Typography ===== */
.page-title {
  font-size: 28px;
  line-height: 1.45;
  letter-spacing: .01em;
  margin: 0 0 8px;
}

.lead {
  color: var(--text-muted);
  margin: 0 0 40px;
}

.updated {
  font-size: 13px;
  color: var(--text-faint);
  margin: 0 0 40px;
}

h2 {
  font-size: 17px;
  line-height: 1.6;
  margin: 44px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

h2:first-of-type { border-top: none; padding-top: 0; }

h3 {
  font-size: 15px;
  margin: 24px 0 8px;
  color: var(--text);
}

p { margin: 0 0 16px; }

ul { margin: 0 0 16px; padding-left: 1.35em; }
li { margin-bottom: 6px; }
li::marker { color: var(--text-faint); }

.note {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== Components ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 0 0 16px;
}

.card h2 {
  border-top: none;
  padding-top: 0;
  margin: 0 0 6px;
}

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

.link-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 12px;
}

.link-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}

.link-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.link-card .t {
  display: block;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 2px;
}

.link-card .d {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { opacity: .9; }

@media (prefers-color-scheme: dark) {
  .btn { color: #12201c; }
}

/* ===== Embedded form ===== */
.form-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 0 0 20px;
}

.form-frame iframe {
  display: block;
  width: 100%;
  height: 800px;
  border: 0;
}

.fallback {
  font-size: 14px;
  color: var(--text-muted);
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.fallback p:last-child { margin-bottom: 0; }

/* ===== Small screens ===== */
@media (max-width: 600px) {
  body { font-size: 15px; }
  main { padding: 40px 0 56px; }
  .page-title { font-size: 23px; }
  .form-frame iframe { height: 880px; }
}
