/* グランドリーチ課題ホームページ 共通スタイル
   色・フォントは :root の変数で一括管理する． */
:root {
  --navy: #0b2545;
  --navy-2: #13315c;
  --accent: #1d9bb2;      /* 流れをイメージしたティール（線・枠・背景用） */
  --accent-text: #12707f; /* 文字に使うティール（白地でのコントラスト比 4.5:1 以上を確保．--accent は文字には薄すぎる） */
  --accent-2: #e07a3f;    /* 強調用（ラベル等） */
  /* サブ課題の色：トップのイメージ画の渦度の2色と同じ（tools/make_hero.py の C_POS / C_NEG） */
  --c-platform: #e07a3f;  /* 共通基盤（サブ課題1・2）＝ 渦度の赤（オレンジ）．枠・帯用 */
  --c-app: #2f6fd6;       /* キラーアプリ（サブ課題3〜5）＝ 渦度の青 */
  --ink: #1b2430;
  --muted: #5b6776;
  --line: #dfe5ec;
  --bg: #ffffff;
  --bg-soft: #f4f7fa;
  --radius: 12px;
  --max: 1120px;
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.8; font-size: 16px; }
img { max-width: 100%; height: auto; }
a { color: var(--navy-2); text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }
h1, h2, h3 { line-height: 1.4; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* 未記入箇所（公開前に python build.py --check で確認） */
.todo { background: #fff3c4; color: #8a5a00; border-radius: 4px; padding: 0 .25em; font-size: .9em; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); flex: 0 1 auto; min-width: 0; }   /* 幅が足りないときはロゴ横の文字が縮む */
.global-nav { flex: none; }
.brand-mark { color: var(--accent); display: flex; flex: none; }
.brand-mark img { height: 36px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; max-width: 280px; }
.brand-program { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.global-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; gap: 2px; }   /* 日本語・英語とも1行に収める（収まらない幅ではメニューボタンに切り替え） */
.global-nav a { display: block; white-space: nowrap; padding: 8px 9px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 500; }
.global-nav a:hover { background: var(--bg-soft); color: var(--navy); }
.global-nav a[aria-current="page"] { color: var(--accent-text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.lang-switch a { border: 1px solid var(--line); margin-left: 6px; }
.nav-toggle, .nav-toggle-label { display: none; }

/* キーボード操作のフォーカス表示・本文へのスキップリンク */
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
main:focus { outline: none; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }
/* ページ内リンクで飛んだ見出しが固定ヘッダーの下に隠れないようにする */
[id] { scroll-margin-top: 84px; }

/* ---------- Hero ---------- */
.home-hero { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #1b5c7a 100%); color: #fff; }
.flow-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.flow-bg path { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 1.5; }
.home-hero-inner { position: relative; padding: 96px 20px 88px; }
.home-hero h1 { font-size: clamp(26px, 4vw, 42px); margin: 12px 0 16px; max-width: 900px; }
.home-hero .tagline { font-size: clamp(16px, 2vw, 20px); opacity: .9; margin: 0; }
.eyebrow { font-size: 13px; letter-spacing: .04em; margin: 0; opacity: .85; }
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-hero .container { padding-top: 48px; padding-bottom: 40px; }
.page-hero .eyebrow { color: var(--muted); }
.page-hero h1 { font-size: clamp(26px, 3.5vw, 36px); margin: 8px 0 6px; color: var(--navy); }
.page-hero .lead { margin: 0; color: var(--muted); }

/* ---------- Sections ---------- */
.content { padding-top: 24px; padding-bottom: 64px; }
.section { padding: 32px 0; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section h2 { font-size: 22px; color: var(--navy); margin: 0 0 20px; padding-left: 12px; border-left: 4px solid var(--accent); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; }
.prose > * { max-width: 820px; }
.more { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--accent-text); }
.empty { color: var(--muted); }
.breadcrumb { font-size: 13px; color: var(--muted); padding-top: 16px; }

/* Stats */
.stats { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stats li { background: var(--bg-soft); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat-value { display: block; font-size: 34px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.stat-label { font-size: 14px; color: var(--muted); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: inherit; background: #fff; transition: box-shadow .15s, transform .15s, border-color .15s; }
a.card:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgba(11,37,69,.08); transform: translateY(-2px); color: inherit; }
.card h3 { margin: 0 0 8px; font-size: 18px; color: var(--navy); }
.card p { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.group-code { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.kind-cross .group-code { background: var(--accent); }
.group-code.big { width: 44px; height: 44px; font-size: 22px; vertical-align: middle; margin: 0 6px 0 0; }

/* News */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: grid; grid-template-columns: 110px 90px 1fr; gap: 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.news-list li.empty { display: block; }
.news-list time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.news-list .lang-note { color: var(--muted); font-size: 12px; white-space: nowrap; }
.label { display: inline-block; text-align: center; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg-soft); color: var(--navy-2); border: 1px solid var(--line); }
.label-event { background: #e6f5f8; color: #12707f; border-color: #c4e6ed; }
.label-result { background: #fdeee5; color: #a24c1d; border-color: #f6d4c0; }
.label-job { background: #eef0fb; color: #3b47a0; border-color: #d4d9f3; }

/* Members */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.member-card { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.member-card h3 { margin: 0; font-size: 16px; }
.member-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-blank { display: grid; place-items: center; background: var(--bg-soft); color: var(--navy-2); font-weight: 700; font-size: 22px; }

/* About */
.goal-list { padding-left: 1.4em; }
.goal-list li { margin-bottom: 8px; }
.message-body { display: flow-root; background: var(--bg-soft); border-radius: var(--radius); padding: 24px; }
.message-body > p { display: block; width: auto; max-width: none; clear: none; margin: 0 0 1em; }
.message-body > p:last-child { margin-bottom: 0; }
.message-profile { float: right; width: 42%; max-width: 420px; margin: 0 0 0 24px; }
.message-photo { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.message-profile .signature { text-align: center; margin: 12px 0 0; }
.message-profile .message-date { color: var(--muted); }
@media (max-width: 800px) {
  .message-body { padding: 20px; }
  .message-profile { float: none; width: 100%; margin: 0 auto 24px; }
}
.info-table { border-collapse: collapse; width: 100%; max-width: 820px; }
.info-table th, .info-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.info-table th { width: 30%; color: var(--muted); font-weight: 500; white-space: nowrap; }

/* Organization diagram */
.org-diagram { margin: 0; }
.org-diagram svg { width: 100%; max-width: 820px; display: block; margin: 0 auto; }
.org-diagram figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 8px; }
.org-diagram .link { stroke: var(--line); stroke-width: 3; }
.org-diagram .node-field { fill: #fff; stroke: var(--navy-2); stroke-width: 2; }
.org-diagram .node-core { fill: var(--navy); }
.org-diagram .node-cross { fill: #e6f5f8; stroke: var(--accent); stroke-width: 2; }
.org-diagram text { text-anchor: middle; font-family: var(--font); }
.org-diagram .node-code { font-size: 13px; font-weight: 700; fill: var(--accent); }
.org-diagram .node-label { font-size: 17px; font-weight: 700; fill: var(--navy); }
.org-diagram .core-label { font-size: 22px; font-weight: 700; fill: #fff; }
.org-diagram .core-sub { font-size: 13px; fill: rgba(255,255,255,.75); }

/* Group page */
.group-image { border-radius: var(--radius); margin-bottom: 16px; }
.pager { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 24px; }
.pager a { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 6px; text-decoration: none; font-size: 14px; }
.pager .group-code { width: 26px; height: 26px; font-size: 13px; margin: 0; }

/* Results */
.toc { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 16px; }
.toc a { padding: 6px 14px; border-radius: 999px; background: var(--bg-soft); text-decoration: none; font-size: 14px; }
.pub-list li { margin-bottom: 10px; }

/* Events */
.event { display: grid; grid-template-columns: 84px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.event-date { background: var(--navy); color: #fff; border-radius: 10px; text-align: center; padding: 8px 0; line-height: 1.2; height: fit-content; }
.event-date .m { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.event-date .d { display: block; font-size: 28px; font-weight: 700; }
.event-date .y { display: block; font-size: 12px; opacity: .8; }
.event h3 { margin: 0 0 4px; font-size: 17px; }
.event .label { margin-bottom: 4px; }
.event p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.85); font-size: 13px; }
.site-footer a { color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; padding-top: 40px; padding-bottom: 24px; }
.footer-title { font-weight: 700; font-size: 15px; color: #fff; }
.footer-heading { font-weight: 700; color: #fff; }
.site-footer p { margin: 0 0 8px; line-height: 1.7; }
.copyright { border-top: 1px solid rgba(255,255,255,.15); padding-top: 14px; padding-bottom: 20px; opacity: .7; }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  /* チェックボックスは見えなくするが display:none にはしない（Tab でフォーカスでき，読み上げソフトからも操作できるように） */
  .nav-toggle { display: block; position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
  .nav-toggle:focus-visible + .nav-toggle-label { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 8px; }
  .nav-toggle-label { display: block; flex: none; width: 40px; height: 40px; position: relative; cursor: pointer; }
  .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after { position: absolute; left: 9px; width: 22px; height: 2px; background: var(--navy); content: ""; }
  .nav-toggle-label span { top: 19px; }
  .nav-toggle-label span::before { top: -7px; left: 0; }
  .nav-toggle-label span::after { top: 7px; left: 0; }
  .global-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 8px 20px rgba(0,0,0,.06); }
  .nav-toggle:checked ~ .global-nav { display: block; }
  .global-nav ul { flex-direction: column; padding: 8px 20px 16px; }
  .global-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }
  .lang-switch a { margin: 8px 0 0; text-align: center; }
}
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .news-list li { grid-template-columns: 1fr; gap: 4px; }
  .news-list .label { justify-self: start; }
  .home-hero-inner { padding: 64px 20px 56px; }
  .event { grid-template-columns: 64px 1fr; }
}

/* ---------- 提案資料反映後の追加スタイル ---------- */
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.home-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(11,37,69,.95) 0%, rgba(11,37,69,.85) 45%, rgba(11,37,69,.3) 100%); }
.home-hero-inner { z-index: 1; }
.home-hero-inner { padding-top: 120px; padding-bottom: 112px; }
.section-lead { color: var(--muted); margin: -8px 0 20px; }  /* 幅はヘッダーのメニューと同じ（コンテナ幅） */
.grid-5 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.card-image { width: calc(100% + 44px); max-width: none; margin: -22px -22px 14px; height: 130px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; display: block; }
.group-card .group-code { margin-top: -2px; }
.kind-platform .group-code, .group-code.kind-platform { background: var(--accent-2); }
.kind-app .group-code, .group-code.kind-app { background: var(--navy); }
.app-name { font-weight: 700; color: var(--accent-text) !important; margin: -4px 0 6px !important; font-size: 14px; }
.group-overview { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }
.group-figure { margin: 0; }
.group-figure img { border-radius: var(--radius); border: 1px solid var(--line); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 24px; padding: 16px 20px; background: var(--bg-soft); border-radius: var(--radius); }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; font-weight: 600; }
.item-list { padding-left: 1.2em; }
.item-list li { margin-bottom: 8px; }
.item-code { color: var(--accent-text); font-weight: 700; }
.plan-list { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--line); }
.plan-list li { position: relative; padding: 0 0 16px 22px; }
.plan-list li::before { content: ""; position: absolute; left: -8px; top: 8px; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.partner-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.partner-list li { background: #fff; border: 1px solid var(--line, #dfe5ec); border-radius: 8px; padding: 4px 12px; font-size: 14px; line-height: 1.5; }
.partner-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px 20px; align-items: start; }
.partner-group h3 { font-size: 15px; line-height: 1.4; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.partner-group h3 a { color: inherit; text-decoration: none; }
.partner-group h3 a:hover { text-decoration: underline; }
.partner-group .group-code { flex: none; width: 26px; height: 26px; font-size: 13px; margin: 0; }
.org-kind { display: inline-block; margin-left: 12px; padding: 2px 10px; border-radius: 999px; background: #eef3f8; color: var(--muted); font-size: 13px; font-weight: 600; vertical-align: middle; }
@media (max-width: 480px) { .partner-groups { grid-template-columns: 1fr; } }
.partner-groups.is-rows { grid-template-columns: repeat(3, 1fr); }
.partner-groups.is-rows + .partner-groups.is-rows { margin-top: 24px; }
@media (max-width: 900px) { .partner-groups.is-rows { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .partner-groups.is-rows { grid-template-columns: 1fr; } }
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding: 10px 0 10px 32px; border-bottom: 1px dashed var(--line); }
.check-list li::before { content: "✓"; position: absolute; left: 6px; top: 10px; color: var(--accent); font-weight: 700; }
.pill-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pill-list li { background: #eaf7ee; color: #1f7a3a; border: 1px solid #c9ead3; padding: 6px 16px; border-radius: 999px; font-weight: 600; }
.domains { background: var(--bg-soft); padding: 12px 16px; border-radius: 10px; }
/* organization diagram (v2) */
.org-diagram svg { max-width: 960px; }
.org-diagram .band-platform { fill: #fdf1ea; stroke: var(--accent-2); stroke-width: 2; }
.org-diagram .band-app { fill: #eef3f9; stroke: var(--navy-2); stroke-width: 2; }
.org-diagram .band-consortium { fill: #eaf7ee; stroke: #2e9a51; stroke-width: 2; }
.org-diagram .band-codesign { fill: #e6f5f8; stroke: var(--accent); stroke-width: 2; }
.org-diagram .band-title { font-size: 17px; font-weight: 700; fill: var(--ink); }
.org-diagram .node-platform { fill: #fff; stroke: var(--accent-2); stroke-width: 2; }
.org-diagram .node-app { fill: #fff; stroke: var(--navy-2); stroke-width: 2; }
.org-diagram a:hover rect { fill: #fffbe6; }
.org-diagram .small-label { font-size: 14px; fill: var(--ink); }
.org-diagram .node-platform + text + text, .org-diagram .plat-label { font-size: 15px; font-weight: 700; fill: var(--navy); }
.org-diagram .app-label { font-size: 15px; font-weight: 700; fill: var(--accent); }
.org-diagram .codesign-label { font-size: 15px; font-weight: 700; fill: #12707f; }
.org-diagram .link-arrow { stroke: var(--muted); stroke-width: 2.5; }
.org-diagram .arrow-head { fill: var(--muted); }
@media (max-width: 900px) { .group-overview { grid-template-columns: 1fr; } }

/* サブ課題ページの図（gallery） */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: block; }
.gallery-placeholder { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--bg-soft); border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: 14px; }
.gallery figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.6; }

/* 研究体制図（写真入り HTML 版） */
.org-chart { display: flex; flex-direction: column; gap: 14px; }
.org-top { display: grid; grid-template-columns: 150px 28px 1fr 28px 190px; align-items: stretch; gap: 0; }
.org-arrow { display: grid; place-items: center; font-size: 22px; color: var(--muted); }
.org-box { border-radius: 16px; padding: 16px; }
.org-band-title { margin: 0 0 12px; text-align: center; font-weight: 700; font-size: 16px; color: var(--ink); }
.org-platform { background: #fdf1ea; border: 2px solid var(--accent-2); }
.org-apps { background: #eef3f9; border: 2px solid var(--navy-2); }
.org-consortium { background: #eaf7ee; border: 2px solid #2e9a51; display: flex; flex-direction: column; justify-content: center; }
.org-consortium ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.org-consortium li { background: #fff; border-radius: 999px; padding: 4px 12px; text-align: center; font-size: 13px; font-weight: 600; color: #1f7a3a; }
.org-linked { background: #fff; border: 2px dashed var(--line); display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 4px; }
.org-linked-name { font-weight: 700; color: var(--navy); font-size: 17px; }
.org-linked-name a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.org-linked-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
.org-linked-rel { font-size: 12px; color: var(--accent-text); font-weight: 700; }
.org-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.org-node { display: flex; flex-direction: column; background: #fff; border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; border: 1px solid var(--line); transition: transform .15s, box-shadow .15s; }
.org-node:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(11,37,69,.12); color: inherit; }
.org-thumb { width: 100%; height: 120px; object-fit: cover; object-position: center 40%; display: block; background: #fff; }
.org-node-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.org-node-head { display: flex; align-items: center; gap: 8px; }
.org-node-head .group-code { width: 28px; height: 28px; font-size: 14px; margin: 0; flex: none; }
.org-node-title { font-weight: 700; color: var(--navy); line-height: 1.35; font-size: 15px; word-break: keep-all; overflow-wrap: anywhere; }   /* 「・」の後（build.py の wbr）でだけ改行する */
.org-app { font-size: 13px; font-weight: 700; color: var(--accent-text); }
.org-people { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px 10px; }
.org-people li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.org-people img, .org-avatar-blank { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.org-avatar-blank { display: grid; place-items: center; background: var(--bg-soft); color: var(--navy-2); font-weight: 700; }
.org-name { font-size: 13px; font-weight: 700; line-height: 1.25; display: flex; flex-direction: column; }
.org-name small { font-weight: 400; color: var(--muted); font-size: 11px; }
.org-codesign { display: flex; align-items: center; justify-content: center; gap: 14px; background: #e6f5f8; border: 2px solid var(--accent); border-radius: 999px; padding: 10px 20px; font-weight: 700; color: #12707f; text-align: center; font-size: 15px; }
.org-codesign span { font-size: 20px; }
.org-caption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 14px; }
@media (max-width: 1000px) {
  .org-top { grid-template-columns: 1fr; }
  .org-arrow { transform: rotate(90deg); height: 28px; }
  .org-linked, .org-consortium { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; }
  .org-consortium .org-band-title { margin: 0; width: 100%; }
  .org-consortium ul { display: flex; flex-wrap: wrap; justify-content: center; }
}

/* トップの背景：サブ課題1〜5のモザイク */
.hero-mosaic { display: flex; flex-direction: column; min-height: 560px; background: var(--navy); }
.hero-mosaic::after { display: none; }
.mosaic { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.mosaic-tile { position: relative; overflow: hidden; border-left: 2px solid rgba(255,255,255,.18); }
.mosaic-tile:first-child { border-left: 0; }
.mosaic-tile img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.1); }
.hero-mosaic .mosaic::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,37,69,.88) 0%, rgba(11,37,69,.72) 45%, rgba(11,37,69,.25) 72%, rgba(11,37,69,.85) 100%); }
.hero-mosaic .home-hero-inner { position: relative; z-index: 1; flex: 1; padding-top: 36px; padding-bottom: 40px; }
.hero-mosaic h1, .hero-mosaic .tagline { text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.mosaic-labels { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, 1fr); }
.mosaic-name { word-break: keep-all; overflow-wrap: anywhere; }   /* サブ課題名は「・」の後（build.py の wbr）でだけ改行する */
.mosaic-label { display: flex; align-items: center; gap: 10px; padding: 14px 16px 18px; color: #fff; text-decoration: none; border-top: 3px solid transparent; transition: background .15s, border-color .15s; }
.mosaic-label.kind-platform { border-top-color: var(--accent-2); }
.mosaic-label.kind-app { border-top-color: #5aa9e6; }
.mosaic-label:hover { background: rgba(255,255,255,.12); color: #fff; }
.mosaic-label .group-code { width: 30px; height: 30px; font-size: 15px; margin: 0; flex: none; }
.mosaic-label .kind-app.group-code { background: #fff; color: var(--navy); }
.mosaic-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.mosaic-name { font-weight: 700; font-size: 14px; }
.mosaic-app { font-size: 12px; opacity: .85; }
@media (max-width: 900px) {
  .hero-mosaic { min-height: 520px; }
  .mosaic-label { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 8px 14px; }
  .mosaic-name { font-size: 12px; }
  .mosaic-app { display: none; }
}
@media (max-width: 600px) {
  .mosaic-name { display: none; }
  .mosaic-label { align-items: center; }
}

/* 合成画像1枚の背景 */
.mosaic { display: block; }
.mosaic-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-mosaic .mosaic::after { background: linear-gradient(180deg, rgba(6,22,44,.82) 0%, rgba(6,22,44,.55) 45%, rgba(6,22,44,.15) 70%, rgba(6,22,44,.75) 100%); }
.mosaic-label { border-left: 1px solid rgba(255,255,255,.12); }
.mosaic-label:first-child { border-left: 0; }

/* トップ：イメージ画（明るい配色） */
.hero-mosaic { background: #f4fafd; color: var(--navy); min-height: 580px; }
.hero-mosaic .mosaic::after { background: linear-gradient(180deg, rgba(247,251,253,.9) 0%, rgba(247,251,253,.72) 40%, rgba(247,251,253,0) 58%); }
.hero-mosaic .eyebrow { color: var(--muted); opacity: 1; }
.hero-mosaic h1 { color: var(--navy); text-shadow: none; }
.hero-mosaic .tagline { color: var(--navy-2); text-shadow: none; opacity: 1; }
.hero-mosaic .mosaic-labels { background: rgba(255,255,255,.82); backdrop-filter: blur(6px); border-top: 1px solid var(--line); }
.hero-mosaic .mosaic-label { color: var(--navy); border-left-color: var(--line); }
.hero-mosaic .mosaic-label:hover { background: #fff; color: var(--navy); }
.hero-mosaic .mosaic-app { color: var(--accent-text); opacity: 1; font-weight: 600; }
.hero-mosaic .mosaic-label .kind-app.group-code { background: var(--navy); color: #fff; }
.hero-mosaic .mosaic-label.kind-app { border-top-color: var(--navy-2); }
@media (max-width: 900px) { .hero-mosaic .mosaic::after { background: linear-gradient(180deg, rgba(247,251,253,.95) 0%, rgba(247,251,253,.8) 55%, rgba(247,251,253,.2) 100%); } }

.h1-line { display: block; }
/* トップの大見出し：スマートフォン幅では改行位置を変える（site.yaml の title_lines_mobile） */
.h1-sp { display: none; }
@media (max-width: 600px) { .h1-pc { display: none; } .h1-sp { display: inline; } }
@media (max-width: 900px) { .hero-mosaic .mosaic-bg { object-position: 12% center; } }

/* サブ課題の色（渦度の2色に合わせる） */
.kind-platform .group-code, .group-code.kind-platform,
.hero-mosaic .mosaic-label .kind-platform.group-code { background: var(--c-platform); color: #fff; }
.kind-app .group-code, .group-code.kind-app,
.hero-mosaic .mosaic-label .kind-app.group-code { background: var(--c-app); color: #fff; }
.mosaic-label.kind-platform, .hero-mosaic .mosaic-label.kind-platform { border-top-color: var(--c-platform); }
.mosaic-label.kind-app, .hero-mosaic .mosaic-label.kind-app { border-top-color: var(--c-app); }
.org-platform { background: #fdf1ea; border-color: var(--c-platform); }
.org-apps { background: #eaf1fc; border-color: var(--c-app); }
.org-diagram .band-platform, .org-diagram .node-platform { stroke: var(--c-platform); }
.org-diagram .band-app { fill: #eaf1fc; stroke: var(--c-app); }
.org-diagram .node-app { stroke: var(--c-app); }

/* 画像の保存をしにくくする（ドラッグ・選択・iPhone などの長押しメニューを抑止） */
img, svg { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* サブ課題ページの図を全幅で大きく表示（groups.yaml の image_wide: true） */
.group-overview.is-wide { grid-template-columns: 1fr; }
.group-figure-wide { margin: 8px 0 8px; }
.group-figure-wide img { width: 100%; display: block; border-radius: 16px; box-shadow: 0 10px 30px rgba(11, 37, 69, .10); }

/* サブ課題の代表者 */
.member-card { position: relative; }
.member-card .member-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
.member-groups-label { font-size: 11px; margin-right: 2px; }
.member-groups .group-code { width: 22px; height: 22px; font-size: 12px; border-radius: 6px; margin: 0; text-decoration: none; }
.member-groups .group-code:hover { color: #fff; opacity: .8; }
.software-group { margin: 10px 0 0; font-size: 13px; }
.software-group a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.software-group .group-code, .pub-group { width: 22px; height: 22px; font-size: 12px; border-radius: 6px; margin: 0; flex: none; text-decoration: none; }
.pub-group { margin-left: 6px; vertical-align: middle; }
.pub-group:hover { color: #fff; opacity: .8; }
.member-card.is-leader { border-color: var(--c-platform); box-shadow: 0 0 0 1px var(--c-platform) inset; }
.leader-badge { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--c-platform); border-radius: 999px; padding: 1px 9px; margin-bottom: 2px; }
.org-people li.is-leader img, .org-people li.is-leader .org-avatar-blank { box-shadow: 0 0 0 3px var(--c-platform); }
@media (max-width: 600px) {
  .brand-program { white-space: normal; }
  .brand-mark img { height: 28px; }
}

/* 動きを減らす設定（OS の「視差効果を減らす」など）のときはスクロール・カードの動きを止める */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  a.card:hover, .org-node:hover { transform: none; }
}

/* 印刷：ヘッダーのメニュー・ページ送りなどを除き，本文だけを印刷する */
@media print {
  .site-header { position: static; border-bottom: 1px solid #999; }
  .global-nav, .nav-toggle-label, .skip-link, .pager, .toc, .mosaic-labels { display: none !important; }
  .card, .org-node, .member-card { box-shadow: none !important; transform: none !important; break-inside: avoid; }
  .site-footer { background: none; color: var(--ink); }
  .copyright { border-top-color: #999; opacity: 1; }
  a { color: inherit; }
}
