/*
  トップ (index.html) とガイド (guides.html, guides/*.html) の共通スタイル。
  どれもスクリプトを持たない静的なページで、ハッシュ付きのバンドルは参照できないので /pages.css として配信する。
  色は編集画面 (shell/src/styles.css) と揃える。
*/
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-alt: #f2f4f7;
  --border: #eaecf0;
  --border-strong: #ccd3dc;
  --text: #101828;
  --muted: #525c6b;
  --accent: #2f56d9;
  --accent-hover: #2545b8;
  --accent-weak: #eef1fd;
  --success: #067647;
  --success-weak: #ecfdf3;
  --warning: #b54708;
  --warning-weak: #fffaeb;
  --warning-border: #fedf89;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-xs: 0 1px 2px rgb(16 24 40 / 5%);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

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

h1,
h2,
h3 {
  font-feature-settings: "palt" 1;
  line-height: 1.45;
}

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

/* ---------- 上部 ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
}

.site-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(140deg, #4c72ef, var(--accent));
  color: #fff;
  box-shadow: var(--shadow-xs);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  font-size: 14px;
}

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

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

.site-nav .button-primary {
  color: #fff;
}

/* ---------- ボタン ---------- */

.button,
.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}

.button:hover {
  background: var(--surface-alt);
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button-primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.site-nav .button-primary {
  min-height: 34px;
  padding: 4px 14px;
  font-size: 14px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}

/* ---------- 本文の枠 ---------- */

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.article {
  max-width: 760px;
  margin: 32px auto 0;
  padding: 32px 40px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.article h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.article h2 {
  margin: 40px 0 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 20px;
}

.article h3 {
  margin: 24px 0 6px;
  font-size: 17px;
}

.article p,
.article ul,
.article ol {
  margin: 0 0 14px;
}

.article ul,
.article ol {
  padding-left: 24px;
}

.article li {
  margin-bottom: 6px;
}

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

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

.lead {
  font-size: 17px;
}

.summary {
  margin: 0 0 20px;
  padding: 14px 18px;
  background: var(--surface-alt);
  border-radius: var(--radius);
}

.summary p:last-child,
.summary ul:last-child {
  margin-bottom: 0;
}

.note {
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 1px solid var(--warning-border);
  border-radius: var(--radius);
  background: var(--warning-weak);
}

.note strong {
  color: var(--warning);
}

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

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

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

th {
  background: var(--surface-alt);
  font-weight: 600;
}

.next {
  margin: 36px 0 0;
  padding: 16px 18px;
  background: var(--accent-weak);
  border-radius: var(--radius);
}

.next p {
  margin: 0 0 6px;
}

.next p:last-child {
  margin: 0;
}

/* ---------- トップ ---------- */

.hero {
  padding: 56px 0 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--success-weak);
  color: var(--success);
  font-size: 13px;
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.01em;
}

.hero .lead {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
}

.points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}

.points li::before {
  content: "✓ ";
  color: var(--success);
  font-weight: 700;
}

.section {
  padding: 36px 0 8px;
  border-top: 1px solid var(--border);
}

.section h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.section > p {
  max-width: 720px;
  margin: 0 0 14px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 20px 0 16px;
  padding: 0;
  list-style: none;
}

.card {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

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

a.card {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.card:hover {
  border-color: var(--border-strong);
}

a.card h3 {
  color: var(--accent);
}

/* ---------- 下部 ---------- */

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

.site-footer-inner {
  max-width: 960px;
  margin: 0 auto;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0 0 12px;
}

.site-footer p {
  margin: 0;
}

/* ---------- 404 ---------- */

.not-found-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 48px 16px;
  text-align: center;
}

.not-found-body .site-brand {
  margin-bottom: 40px;
  font-size: 15px;
}

.not-found-code {
  margin: 0;
  font-size: clamp(96px, 22vw, 168px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(140deg, #4c72ef, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.not-found-body h1 {
  margin: 20px 0 8px;
  font-size: 22px;
}

.not-found-text {
  max-width: 420px;
  margin: 0 0 28px;
  color: var(--muted);
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .site-header {
    padding: 10px 16px;
  }

  .page {
    padding: 0 16px 48px;
  }

  .article {
    margin-top: 16px;
    padding: 22px 18px 28px;
  }

  .article h1 {
    font-size: 22px;
  }

  .hero {
    padding: 36px 0 28px;
  }

  .site-footer {
    padding: 24px 16px 32px;
  }
}
