:root {
  color-scheme: light dark;
  --background: #f4f7fb;
  --surface: #ffffff;
  --text: #172033;
  --muted: #526077;
  --border: #d9e1ec;
  --accent: #1d4ed8;
  --shadow: 0 18px 48px rgba(23, 32, 51, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 34rem),
    var(--background);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

a:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 4px;
  border-radius: 4px;
}

.shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.site-header,
.document,
.link-card {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.site-header,
.document {
  border-radius: 24px;
}

.site-header {
  padding: clamp(28px, 7vw, 56px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  line-height: 1.35;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3.4rem);
  letter-spacing: -0.03em;
}

h2 {
  margin: 2.25em 0 0.6em;
  font-size: 1.3rem;
}

.lead {
  max-width: 42rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.document {
  margin-top: 24px;
  padding: clamp(24px, 6vw, 52px);
}

.document > :first-child {
  margin-top: 0;
}

.document-meta {
  color: var(--muted);
  font-size: 0.94rem;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.link-card {
  display: block;
  padding: 24px;
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

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

.link-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 1.08rem;
}

.link-card span,
.muted {
  color: var(--muted);
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
}

footer {
  padding: 28px 8px 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

ul,
ol {
  padding-left: 1.5em;
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 920px);
    padding-top: 20px;
  }

  .site-header,
  .document {
    border-radius: 18px;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .link-card {
    transition: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0d1422;
    --surface: #151f30;
    --text: #edf3ff;
    --muted: #b7c2d6;
    --border: #2b3950;
    --accent: #8db4ff;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
  }
}
