*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root { --bg:#f8f7f3; --ink:#171a17; --green:#1e5c2e; --green2:#2d7a40; --green-l:#e8f2ea; --muted:#6b806b; --border:#ccdacc; --cream:#faf9f6; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: 'Noto Sans JP', sans-serif; font-weight: 400; overflow-x: hidden; }

/* ===== ホームに戻るボタン（サブページ共通） ===== */
.home-btn { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 14px); left: 14px; z-index: 1000; display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; font-family: 'Noto Sans JP', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--green); background: rgba(250,249,246,0.92); border: 1px solid var(--border); border-radius: 2em; text-decoration: none; backdrop-filter: blur(6px); transition: background 0.2s, color 0.2s, border-color 0.2s; }
.home-btn:hover { background: var(--green); color: #fff; border-color: var(--green); }

/* ===== HERO（トップ） ===== */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 0 2rem; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent, transparent calc(100% / 6 - 1px), rgba(30,92,46,0.06) calc(100% / 6 - 1px), rgba(30,92,46,0.06) calc(100% / 6)); }
.hero-inner { max-width: 900px; margin: 0 auto; width: 100%; position: relative; z-index: 1; }
.hero-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.35em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.5rem; animation: fadeUp 0.8s ease both; }
.hero-title { font-size: clamp(4rem, 14vw, 10rem); font-weight: 900; line-height: 0.95; color: var(--green); letter-spacing: -0.02em; margin-bottom: 1.5rem; animation: fadeUp 0.8s 0.1s ease both; }
.hero-title span { display: block; font-size: clamp(1.4rem, 4vw, 2.8rem); font-weight: 300; color: var(--muted); letter-spacing: 0.1em; margin-top: 0.4rem; }
.hero-catch { font-size: clamp(1rem, 2.5vw, 1.3rem); font-weight: 300; line-height: 1.8; max-width: 520px; margin-bottom: 3rem; animation: fadeUp 0.8s 0.2s ease both; border-left: 3px solid var(--green2); padding-left: 1.2rem; }
.hero-scroll { font-size: 11px; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; animation: fadeUp 0.8s 0.5s ease both; display: flex; align-items: center; gap: 10px; }
.hero-scroll::after { content: ''; display: block; width: 40px; height: 1px; background: var(--muted); animation: lineGrow 1.2s 1s ease both; }

/* ===== グループ＋カード ===== */
.nav-section { padding: 4rem 2rem 2rem; max-width: 900px; margin: 0 auto; }
.nav-label { font-size: 10px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.6rem; }
.group-title { font-size: 1.8rem; font-weight: 900; color: var(--green); margin-bottom: 0.4rem; }
.group-desc { font-size: 13px; font-weight: 300; color: var(--muted); margin-bottom: 1.8rem; line-height: 1.8; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--cream); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 0.6rem; position: relative; overflow: hidden; opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.2s, box-shadow 0.2s; }
.card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--green2); transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease; }
.card.visible { opacity: 1; transform: translateY(0); }
.card:hover { border-color: var(--green2); transform: translateY(-3px); box-shadow: 0 12px 40px rgba(30,92,46,0.1); }
.card:hover::after { transform: scaleX(1); }
.card-num { font-size: 10px; font-weight: 700; letter-spacing: 0.2em; color: var(--muted); }
.card-title { font-size: 1.4rem; font-weight: 900; color: var(--green); line-height: 1.2; }
.card-desc { font-size: 12px; color: var(--muted); line-height: 1.7; font-weight: 300; }
.card-arrow { margin-top: auto; padding-top: 1rem; font-size: 18px; color: var(--green2); transition: transform 0.2s; }
.card:hover .card-arrow { transform: translateX(4px); }
.card.featured { grid-column: 1 / -1; flex-direction: row; align-items: center; padding: 2.5rem; background: var(--green); border-color: var(--green); }
.card.featured .card-num { color: rgba(255,255,255,0.5); }
.card.featured .card-title { color: #fff; font-size: 2rem; }
.card.featured .card-desc { color: rgba(255,255,255,0.75); }
.card.featured .card-arrow { color: rgba(255,255,255,0.8); font-size: 24px; margin-left: auto; padding: 0; }
.card.featured:hover { box-shadow: 0 16px 48px rgba(30,92,46,0.25); }
.card.featured::after { background: rgba(255,255,255,0.3); }
.card-featured-text { display: flex; flex-direction: column; gap: 0.6rem; }

/* ===== ABOUT ===== */
.about-section { padding: 6rem 2rem; border-top: 1px solid var(--border); margin-top: 4rem; }
.about-inner { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; gap: 4rem; align-items: start; opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.about-inner.visible { opacity: 1; transform: translateY(0); }
.about-label { font-size: 10px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); padding-top: 6px; }
.about-content h2 { font-size: 1.6rem; font-weight: 900; color: var(--green); margin-bottom: 1.2rem; line-height: 1.3; }
.about-content p { font-size: 14px; font-weight: 300; line-height: 1.9; margin-bottom: 1rem; }
.about-content p + p { margin-top: 0.8rem; }
.about-tag, .tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.15em; background: var(--green-l); color: var(--green); border-radius: 2em; padding: 4px 12px; margin-right: 6px; margin-top: 1rem; }

/* ===== 研究ページ（記事） ===== */
.article { max-width: 760px; margin: 0 auto; padding: 6rem 1.5rem 3rem; }
.article .eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.article h1 { font-size: clamp(1.9rem, 6vw, 3rem); font-weight: 900; color: var(--green); line-height: 1.25; margin-bottom: 1rem; }
.article .lead { font-weight: 300; line-height: 1.9; border-left: 3px solid var(--green2); padding-left: 1.2rem; margin-bottom: 2.5rem; }
.article section { margin-bottom: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.article h2 { font-size: 1.35rem; font-weight: 900; color: var(--green); margin-bottom: 1rem; line-height: 1.4; }
.article h3 { font-size: 1rem; font-weight: 700; color: var(--green2); margin: 1.4rem 0 0.5rem; }
.article p { font-size: 14px; font-weight: 300; line-height: 2; margin-bottom: 1rem; }
.article ul { margin: 0 0 1rem 1.3rem; }
.article li { font-size: 14px; font-weight: 300; line-height: 1.9; margin-bottom: 0.3rem; }
.article b { font-weight: 700; }
.box { background: var(--green-l); border-radius: 10px; padding: 1rem 1.3rem; margin-bottom: 1rem; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
.ex { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem 1rem; margin-bottom: 1rem; line-height: 1.8; overflow-x: auto; }
.refs li { font-size: 12px; word-break: break-all; }
.refs a { color: var(--green2); }
.pager { max-width: 760px; margin: 0 auto; padding: 0 1.5rem 3rem; display: flex; flex-wrap: wrap; gap: 10px; }
.pager a { font-size: 12px; font-weight: 700; color: var(--green); text-decoration: none; border: 1px solid var(--border); background: var(--cream); border-radius: 2em; padding: 8px 16px; transition: background 0.2s, color 0.2s; }
.pager a:hover { background: var(--green); color: #fff; }

footer { padding: 2.5rem 2rem; border-top: 1px solid var(--border); text-align: center; font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes lineGrow { from { width: 0; } to { width: 40px; } }

@media (max-width: 640px) {
  .cards, .cards.three { grid-template-columns: 1fr; }
  .card.featured { flex-direction: column; }
  .card.featured .card-arrow { margin-left: 0; }
  .about-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ===== 左右2カラムのトップ ===== */
.nav-section { max-width: 1100px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.group { border-top: 4px solid var(--green); padding-top: 1.2rem; }
.duo .cards, .duo .cards.three { grid-template-columns: 1fr; }
.duo .card { padding: 1.5rem 1.6rem; }
.duo .card.featured { flex-direction: column; align-items: flex-start; padding: 1.8rem 1.6rem; }
.duo .card.featured .card-arrow { margin-left: 0; padding-top: 1rem; font-size: 18px; }
@media (max-width: 820px) { .duo { grid-template-columns: 1fr; gap: 3rem; } }

/* ===== 研究ページの図解・強調 ===== */
.article mark { background: linear-gradient(transparent 60%, #cfe6d3 60%); color: inherit; font-weight: 700; }
.pull { font-size: clamp(1.1rem, 3.5vw, 1.4rem); font-weight: 900; color: var(--green); line-height: 1.7; border-top: 3px solid var(--green2); border-bottom: 1px solid var(--border); padding: 1.1rem 0; margin: 1.8rem 0; }
.fig { margin: 1.6rem 0; background: var(--cream); border: 1px solid var(--border); border-radius: 12px; padding: 1.2rem 1.4rem; }
.fig svg { display: block; width: 100%; height: auto; }
.fig-title { font-size: 10px; font-weight: 700; letter-spacing: 0.2em; color: var(--muted); margin-bottom: 0.9rem; text-transform: uppercase; }
.fig-note { font-size: 11px; color: var(--muted); margin-top: 0.7rem; line-height: 1.7; }
.article ul.tl { list-style: none; margin: 0.3rem 0 0 0.5rem; padding: 0 0 0 1.5rem; border-left: 2px solid var(--green2); }
.article .tl li { position: relative; margin-bottom: 1.1rem; font-size: 13px; line-height: 1.8; }
.article .tl li::before { content: ''; position: absolute; left: calc(-1.5rem - 7px); top: 0.45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 3px solid var(--green2); }
.article .tl .yr { display: block; font-weight: 900; color: var(--green); font-size: 14px; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.mini { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 0.9rem 1rem; }
.mini b { display: block; color: var(--green); font-size: 15px; font-weight: 900; margin-bottom: 4px; }
.mini small { display: block; font-size: 11px; color: var(--muted); line-height: 1.7; }
.mini.hi { background: var(--green); border-color: var(--green); }
.mini.hi b, .mini.hi small { color: #fff; }
.mini.x { background: #f3f1ec; }
.mini.x b { color: var(--muted); text-decoration: line-through; }
.chips2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips2 span { background: #fff; border: 1px solid var(--border); border-radius: 2em; padding: 6px 16px; font-size: 14px; font-weight: 700; }
.chips2 .arr { border: none; background: none; color: var(--green2); font-size: 20px; padding: 0; }
.chips2 .big { background: var(--green); color: #fff; border-color: var(--green); font-size: 18px; }
.bar-row { display: flex; height: 44px; border-radius: 8px; overflow: hidden; font-size: 12px; font-weight: 700; color: #fff; }
.bar-row span { display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.3; }
.bar-row .c1 { background: var(--green); } .bar-row .c2 { background: var(--green2); } .bar-row .c3 { background: #7fb08a; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; margin-bottom: 0.4rem; }
.stack span { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; text-align: center; font-weight: 900; font-size: 15px; color: var(--green); }
.stack span small { display: block; font-size: 10px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.stack .p { color: var(--muted); border: none; background: none; align-self: center; padding: 0 2px; }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cmp > div { border-radius: 10px; padding: 1rem 1.2rem; background: #fff; border: 1px solid var(--border); }
.cmp > div:last-child { background: var(--green-l); }
.cmp h3 { margin-top: 0; }
.gauge-row { margin-bottom: 1rem; font-size: 12px; }
.gauge-row b { display: block; margin-bottom: 4px; font-weight: 700; }
.gauge { height: 12px; background: var(--border); border-radius: 6px; overflow: hidden; }
.gauge i { display: block; height: 100%; background: var(--green2); }
.gauge i.low { background: #b5651d; }
.src-link { display: inline-block; margin-top: 0.4rem; font-size: 13px; font-weight: 700; color: var(--green); text-decoration: none; border: 1px solid var(--green2); border-radius: 2em; padding: 8px 18px; }
.src-link:hover { background: var(--green); color: #fff; }
@media (max-width: 640px) { .cmp { grid-template-columns: 1fr; } }
