
/* ヘッダー */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem max(1.5rem, calc((100vw - 1200px) / 2));
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  align-items: center;
}

.site-header nav {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 750;
  letter-spacing: 0.06em;
}

.site-header a {
  text-decoration: none;
}

/* メインレイアウト */
.page-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width, 250px) minmax(0, 1fr);
  gap: 3rem;
  max-width: 1200px;
  margin: auto;
  padding: 2rem 1.5rem;
  min-height: 75vh;
}

#main-content {
  min-width: 0;
  max-width: 850px;
}

/* アウトライン */
#site-outline {
  position: sticky;
  top: 1rem;
  align-self: start;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.5rem;
}

/* フッター */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

/* スマートフォン */
@media (max-width: 768px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .page-layout {
    display: block;
    padding: 1.25rem;
  }

  #site-outline {
    display: none;
  }
}

/* 大画面 */
@media (min-width: 1440px) {
  .page-layout {
    max-width: 1440px;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 3.5rem;
  }

  #main-content {
    max-width: 950px;
  }
}
