/* civilingual — トップページ v7 の設計を元にしたスタイル
   色: 紺（文字・線）＋力の流れの4色（藍・緑青・朱・金）。色は「力」と「道しるべ」にだけ使う */
:root {
  --ink: #13163a; --body: #3d4256; --muted: #6a7086; --line: rgba(19, 22, 58, .14); --guide: rgba(19, 22, 58, .055);
  --ai: #4f5bd5; --rokusho: #1f9e8f; --shu: #e8654f; --kin: #e3a12f;
  --ai-t: #3a45b8; --rokusho-t: #157a6e; --shu-t: #c24a35; --kin-t: #9a6008;
  --tint: #f5f7fc; --ph: #d6dae4;
  --pad: clamp(16px, 4vw, 64px);
  --sans: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.9; letter-spacing: .02em; }
a { color: var(--ink); text-underline-offset: .2em; }
a:hover { color: var(--ai-t); }
:focus-visible { outline: 2px solid var(--ai); outline-offset: 3px; }
.mono { font-family: var(--mono); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 4px 8px; z-index: 10; }

/* ページ全体と背景の方眼線 */
.wrap { position: relative; z-index: 0; overflow-x: clip; }
.guides { position: absolute; inset: 0; z-index: -1; pointer-events: none; padding: 0 var(--pad); display: grid; grid-template-columns: repeat(4, 1fr); }
.guides i { position: relative; border-left: 1px solid var(--guide); overflow: hidden; }
.guides i:last-child { border-right: 1px solid var(--guide); }
.guides i::after { content: ""; position: absolute; left: -1px; top: -160px; width: 1px; height: 160px; background: linear-gradient(transparent, var(--g), transparent); opacity: .55; animation: drop var(--d) linear infinite; animation-delay: var(--w); }
@keyframes drop { to { transform: translateY(6000px); } }

/* ヘッダー */
.site-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 28px; padding: 22px var(--pad); }
.brand { font-weight: 700; font-size: 20px; letter-spacing: -.01em; text-decoration: none; }
.site-header nav { display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: center; font-size: 14px; font-weight: 500; }
.site-header nav a { text-decoration: none; }
.pill { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px; background: var(--ai); color: #fff !important; text-decoration: none; }
.pill:hover { background: var(--ai-t); }

/* ボタン */
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 26px; border-radius: 999px; font-size: 15px; text-decoration: none; transition: background .2s; }
.btn.primary { background: var(--ai); color: #fff; font-weight: 700; }
.btn.primary:hover { background: var(--ai-t); color: #fff; }
.btn.ghost { border: 1.5px solid var(--ink); font-weight: 500; }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.arw { display: inline-block; margin-left: 6px; font-weight: 400; transition: transform .3s; }
a:hover .arw { transform: translateX(4px); }

/* ヒーロー */
.hero { padding: clamp(40px, 6vw, 96px) var(--pad) clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 28px; }
.hero h1 { margin: 0; max-width: 15em; font-weight: 700; font-size: clamp(30px, 6.4vw, 84px); line-height: 1.15; letter-spacing: -.03em; text-wrap: balance; }
.hero-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 20px 56px; align-items: end; }
.hero-row p { margin: 0; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.95; color: var(--body); max-width: 30em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.figure { margin: 0; padding: 0 var(--pad) clamp(48px, 6vw, 88px); }
.figure figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.bridge { width: 100%; height: auto; display: block; overflow: visible; }

/* 橋の線画の動き */
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.draw path { stroke-dasharray: 1; animation: draw 1.8s cubic-bezier(.6, 0, .2, 1) both; }
.draw path:nth-child(2) { animation-delay: .15s; } .draw path:nth-child(3) { animation-delay: .3s; }
.draw path:nth-child(4) { animation-delay: .4s; } .draw path:nth-child(5) { animation-delay: .5s; } .draw path:nth-child(6) { animation-delay: .6s; }
@keyframes beads { to { stroke-dashoffset: -22; } }
.beads { stroke-dasharray: 0 22; stroke-linecap: round; animation: beads 1.6s linear infinite; }
.beads.v { stroke-dasharray: 0 16; animation-duration: 1.4s; }
@keyframes drive { 0% { transform: translateX(100px); opacity: 0; } 6% { opacity: 1; } 94% { opacity: 1; } 100% { transform: translateX(1100px); opacity: 0; } }
.load { animation: drive 11s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.in { animation: up .9s cubic-bezier(.2, .7, .2, 1) both; }
.in2 { animation-delay: .12s; } .in3 { animation-delay: .24s; }

/* 数字の帯 */
.stats { position: relative; color: #fff; clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%); padding: clamp(80px, 9vw, 128px) var(--pad);
  background: radial-gradient(55% 90% at 100% 0%, rgba(238, 125, 110, .55), transparent 64%), radial-gradient(50% 80% at 0% 100%, rgba(111, 124, 240, .5), transparent 62%), radial-gradient(40% 60% at 60% 110%, rgba(233, 169, 59, .42), transparent 62%), var(--ink);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 40px 48px; }
.stats .edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@keyframes edge { from { stroke-dashoffset: 220; } to { stroke-dashoffset: -1300; } }
.edge { stroke-dasharray: 220 3000; animation: edge 7s cubic-bezier(.45, 0, .55, 1) infinite; }
.st { position: relative; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 20px; }
.st .num { font-size: clamp(48px, 5vw, 72px); font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.st .num small { font-size: .45em; font-weight: 500; }
.st p { margin: 0; font-size: 15px; line-height: 1.7; color: rgba(255, 255, 255, .86); }
.st .src { font-size: 11px; letter-spacing: .02em; color: rgba(255, 255, 255, .68); }

/* 色の短い線（柱・数字） */
.pl, .st { --c: var(--ai); }
.pl::before, .st::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 44px; background: var(--c); transition: width .6s cubic-bezier(.2, .7, .2, 1); }
a.pl:hover::before { width: 100%; }

/* 写真 */
.photo { position: relative; margin: 0; }
.photo img { display: block; width: 100%; height: clamp(320px, 42vw, 560px); object-fit: cover; }
.photo svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.photo figcaption { padding: 10px var(--pad) 0; font-size: 13px; color: var(--muted); }

/* 判断を、言葉にする */
.concept { padding: clamp(56px, 7vw, 104px) var(--pad); display: flex; flex-direction: column; gap: 36px; }
.eyebrow { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.kicker { font-size: 13px; font-weight: 700; }
.concept h2 { margin: 6px 0 0; font-weight: 400; font-size: clamp(30px, 3.6vw, 48px); letter-spacing: -.02em; line-height: 1.25; }
.concept h2 strong { font-weight: 700; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 32px; }
.pl { position: relative; text-decoration: none; border-top: 1px solid var(--line); padding-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.pl .no { font-family: var(--mono); font-size: 12px; color: var(--t); }
.pl h3 { margin: 0; font-size: 22px; font-weight: 500; }
.pl p { margin: 0; font-size: 15px; line-height: 1.85; color: var(--body); }
.pl .status { font-size: 12px; color: var(--muted); }
.c-ai { --c: var(--ai); --t: var(--ai-t); } .c-rokusho { --c: var(--rokusho); --t: var(--rokusho-t); }
.c-shu { --c: var(--shu); --t: var(--shu-t); } .c-kin { --c: var(--kin); --t: var(--kin-t); }
.st.c-ai { --c: #8d96ff; } .st.c-shu { --c: #ff8f7a; } .st.c-kin { --c: #f2b84b; }

/* 記事 */
.articles { padding: 0 var(--pad) clamp(56px, 7vw, 104px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 32px 64px; align-items: start; }
.articles .lead { display: flex; flex-direction: column; gap: 14px; }
.articles .lead h2 { margin: 0; font-size: clamp(26px, 3vw, 40px); font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
.articles .lead p { margin: 0; font-size: 16px; line-height: 1.95; color: var(--body); }
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.post-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 20px 0; border-bottom: 1px solid #e3e5ec; font-size: 17px; font-weight: 500; }
.post-list a { text-decoration: none; }
.post-list time, .post-list .status { flex: none; font-size: 13px; font-weight: 400; color: var(--muted); }

/* 検算集 */
.kensan { background: linear-gradient(180deg, #f5f7fc, #eef1fa); padding: clamp(48px, 6vw, 88px) var(--pad); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 24px 64px; align-items: center; }
.kensan .lead { display: flex; flex-direction: column; gap: 10px; }
.kensan h2 { margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.kensan p { margin: 0; font-size: 16px; line-height: 1.9; color: var(--body); }
.code { margin: 0; overflow-x: auto; padding: 22px; background: var(--ink); color: #eef0f2; border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(19, 22, 58, .55); font-family: var(--mono); font-size: 13px; line-height: 1.85; }
.code .k { color: #8d96ff; display: inline-block; min-width: 6.5em; } .code .a { color: #f2b84b; } .code .c { color: #ff8f7a; } .code .t { color: #5fd3c3; }

/* つくる人 */
.people { padding: clamp(56px, 7vw, 104px) var(--pad); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 32px 56px; align-items: center; }
.people.no-photo { grid-template-columns: minmax(0, 44rem); }
.people img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.people .lead { display: flex; flex-direction: column; gap: 14px; }
.people h2 { margin: 0; font-size: clamp(26px, 2.8vw, 38px); font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.people p { margin: 0; font-size: 16px; line-height: 1.95; color: var(--body); }

/* 購読 */
.subscribe-band { position: relative; overflow: hidden; color: #fff; padding: clamp(48px, 6vw, 88px) var(--pad); display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap;
  background-color: #262b80;
  background-image: radial-gradient(60% 130% at 100% 100%, rgba(240, 176, 64, 1), transparent 72%), radial-gradient(55% 120% at 78% 0%, rgba(238, 125, 110, 1), transparent 72%), linear-gradient(115deg, #262b80 0%, #4f5bd5 50%, #7b63d6 100%);
  background-size: 140% 140%, 140% 140%, 200% 200%; background-position: 100% 100%, 100% 0%, 0% 50%; animation: mesh 26s ease-in-out infinite; }
@keyframes mesh { 0%, 100% { background-position: 100% 100%, 100% 0%, 0% 50%; } 50% { background-position: 60% 85%, 65% 15%, 100% 50%; } }
.subscribe-band .contours { position: absolute; inset: 0 -6% 0 0; width: 106%; height: 100%; pointer-events: none; animation: drift 22s ease-in-out infinite; }
@keyframes drift { 50% { transform: translateX(-4%); } }
.subscribe-band h2 { position: relative; margin: 0; font-size: clamp(26px, 3.2vw, 42px); font-weight: 700; letter-spacing: -.02em; line-height: 1.35; max-width: 16em; }
.subscribe-band .side { position: relative; display: flex; flex-direction: column; gap: 10px; max-width: 26em; }
.subscribe-band .side p { margin: 0; font-size: 14px; line-height: 1.8; text-shadow: 0 1px 2px rgba(19, 22, 58, .35); }
.subscribe-band form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.subscribe-band label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; text-shadow: 0 1px 2px rgba(19, 22, 58, .35); }
.subscribe-band input { min-height: 52px; min-width: min(16em, 70vw); padding: 0 20px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .45); background: rgba(19, 22, 58, .5); color: #fff; font: inherit; font-size: 15px; font-weight: 400; }
.subscribe-band button, .btn.white { min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; align-self: flex-start; }

/* フッター */
.site-footer { padding: 24px var(--pad) 36px; display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.site-footer nav { display: flex; gap: 6px 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* 読みもののページ（記事・著者など） */
.prose { max-width: 42rem; margin: 0 auto; padding: clamp(32px, 5vw, 64px) var(--pad) 80px; color: var(--ink); }
.prose h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.35; letter-spacing: -.02em; margin: 0 0 .6em; }
.prose h2 { font-size: 1.3rem; margin: 2.4em 0 .6em; }
.prose p, .prose li { color: var(--body); }
.prose .meta { font-size: 13px; color: var(--muted); }
.prose blockquote { margin: 1.4em 0; padding-left: 1em; border-left: 2px solid var(--ai); color: var(--muted); }
.prose pre { overflow-x: auto; padding: 16px; background: var(--ink); color: #eef0f2; border-radius: 8px; font-family: var(--mono); font-size: .85em; }
.prose .post-list li { font-size: 16px; }
.embed { margin: 2em 0; }
.embed iframe { display: block; width: 100%; height: 720px; border: 0; border-radius: 8px; background: #f4f4f2; }
.embed figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }

/* スクロールで現れる（対応ブラウザのみ） */
@supports (animation-timeline: view()) {
  .rv { animation: up linear both; animation-timeline: view(); animation-range: entry 0% cover 22%; }
  @keyframes grow { from { width: 0; } to { width: 44px; } }
  .st::before { animation: grow linear both; animation-timeline: view(); animation-range: entry 10% cover 30%; }
}

/* 動きを減らす設定 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .guides i::after, .draw path, .beads, .load, .in, .edge, .rv, .st::before, .subscribe-band, .subscribe-band .contours { animation: none !important; }
  .beads { stroke-dasharray: none; stroke-width: 1.6; }
  .load { opacity: 0; }
}
