:root {
  /* particle-method-simulation のデモサイトと揃えたモノクロ・ダークのデザイン。流れの図だけ --accent を使う */
  --bg: #0d0d0d;
  --panel: #141414;
  --text: #ebebeb;
  --muted: #999999;
  --border: #2e2e2e;
  --primary: #f2f2f2;
  --accent: #8ecbbc;
  --radius: 2px;
  --serif: 'Shippori Mincho', serif;
  --sans: system-ui, 'Segoe UI', Roboto, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-padding-top: 72px; /* 固定ヘッダーの下にセクション見出しが隠れないように */
}

body {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
}

/* ===== 共通の枠 ===== */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.site-main {
  flex: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2.5rem;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
@media (max-width: 600px) {
  .site-header {
    height: 48px;
    padding: 0 16px;
  }
}
.site-logo {
  display: flex;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}
.lockup {
  display: inline-flex;
  align-items: baseline;
  gap: 1.2em;
  white-space: nowrap;
}
.lockup-mark {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
}
.lockup-sub {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
@media (max-width: 420px) {
  .lockup-sub {
    display: none;
  }
}
.site-nav {
  display: flex;
  gap: 24px;
}
@media (max-width: 600px) {
  .site-nav {
    gap: 16px;
  }
}
.site-nav-link {
  white-space: nowrap;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
}
.site-nav-link:hover {
  color: var(--text);
}

.site-footer {
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.site-copy {
  margin: 0;
}

/* ===== トップページ ===== */
.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 72px;
  padding: 96px 20px;
}
@media (max-width: 600px) {
  .home {
    gap: 56px;
    padding: 64px 16px;
  }
}
.home-hero {
  text-align: center;
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.24em;
}
.home-title {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 5vw, 44px);
  letter-spacing: 0.12em;
  line-height: 1.4;
}
.home-title span {
  display: inline-block; /* 狭い画面では読点の後で折り返す */
}
.home-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
  line-height: 1.8;
}

/* トップの流れの図 */
.hero-figure {
  width: 100%;
  max-width: 1040px;
  margin: -24px 0 0;
}
.hero-stage {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: radial-gradient(ellipse at center, #1a2826, #0f1514 75%);
  overflow: hidden;
}
#flow {
  display: block;
  width: 100%;
  height: clamp(220px, 34vw, 380px);
}
.hero-label {
  position: absolute;
  top: 14px;
  left: 18px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #9fb3ad;
  pointer-events: none;
}
.hero-caption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.home-section {
  width: 100%;
  max-width: 1040px;
}
.home-section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.1em;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.home-text {
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
  margin: 0;
}
.home-note {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 20px;
}

/* 質問の一覧（カード） */
.q-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.q-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 26px 26px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
a.q-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.q-no {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.q-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.5;
}
.q-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.q-go {
  margin-top: 4px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--primary);
}
.q-empty {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 26px 26px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.q-empty .q-no {
  color: var(--muted);
}
.q-empty p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* ===== 404 ===== */
.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 120px 20px;
  text-align: center;
}
.notfound h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: 0.12em;
}
.notfound p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.notfound a {
  color: var(--text);
  text-underline-offset: 4px;
}
