/* 見本-サイト の共通の形（頼み H・席 A が持つ）。全頁がこの 1 枚だけを読む。
   頁ごとの CSS は作らない。足りない形は席 A に頼むか、ここに「節」を足して commit（他の節は消さない）。
   色はロゴの青（#2556a3）に合わせた。手本の作りの軸＝n8n の棚・Cursor の画面が主役。 */
:root {
  --brand: #2556a3;      /* ロゴの青 */
  --brand-d: #1b3f7a;
  --brand-soft: #eaf1fb;
  --accent: #4fc0e8;     /* 拡張のアイコンの水色 */
  --ink: #111827;
  --ink-2: #374151;
  --gray: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-2: #f6f8fb;
  --dark: #0b1220;       /* 画面の写しを置く暗い帯 */
  --radius: 14px;
  --shadow: 0 10px 30px rgba(17, 24, 39, .10);
  --wrap: 1160px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  line-height: 1.8; font-size: 16px; overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.35; letter-spacing: .01em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--gray); }
.small { font-size: 13px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 頭（ヘッダー）: 中身は _kit/header.html。build.py が全頁へ差し込む */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 18px; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.gnav { display: flex; gap: 18px; font-size: 14px; flex: 1; }
.gnav a { color: var(--ink-2); text-decoration: none; padding: 6px 0; }
.gnav a:hover, .gnav a[aria-current="page"] { color: var(--brand); }
.head-cta { display: flex; gap: 10px; align-items: center; }
.head-cta .login { font-size: 14px; color: var(--ink-2); text-decoration: none; }
.site-head .menu-btn { display: none; }
/* 日本語の見出しは語の切れ目（空白・句読点）で折る。はみ出しそうなら折る */
h1, h2, h3 { word-break: keep-all; overflow-wrap: anywhere; }

/* ---------- ボタン（導線）: 主＝入れる／副＝棚を見る。主の行き先は 2 つまで（門 R4） */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 700;
  border-radius: 10px; padding: 13px 22px; font-size: 16px; border: 1.5px solid var(--brand); line-height: 1.2; white-space: nowrap; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(37, 86, 163, .28); }
.btn-primary:hover { background: var(--brand-d); border-color: var(--brand-d); }
.btn-ghost { background: #fff; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-on-dark { background: #fff; color: var(--brand-d); border-color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions .note { flex-basis: 100%; font-size: 13px; color: var(--gray); margin: 0; }

/* ---------- ヒーロー: 左に約束・右（スマホは下）に本物の画面（門 R2・R3・R9） */
.hero { padding: 56px 0 40px; background: linear-gradient(180deg, var(--bg-2), #fff 70%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 4px 12px; margin: 0 0 14px; }
.hero h1 { font-size: 40px; margin: 0 0 14px; }
.hero .lead { font-size: 17px; color: var(--ink-2); margin: 0 0 24px; }
.hero-center .wrap { grid-template-columns: 1fr; text-align: center; }
.hero-center .actions { justify-content: center; }

/* ---------- 画面の写し（本物だけ。assets/shots/ の決まりは _kit/決まり.md §4） */
.shot { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.shot img { width: 100%; }
.shot figcaption { font-size: 12px; color: var(--gray); padding: 8px 12px; border-top: 1px solid var(--line); background: #fff; }
.shot-window::before { content: ""; display: block; height: 26px; background: #eef1f5 radial-gradient(circle at 14px 13px, #ff5f57 4px, transparent 5px), radial-gradient(circle at 30px 13px, #febc2e 4px, transparent 5px), radial-gradient(circle at 46px 13px, #28c840 4px, transparent 5px); background-color: #eef1f5; border-bottom: 1px solid var(--line); }
.shots-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

/* ---------- 節 */
.sec { padding: 64px 0; }
.sec-alt { background: var(--bg-2); }
.sec-dark { background: var(--dark); color: #e5e7eb; }
.sec-dark h2, .sec-dark h3 { color: #fff; }
.sec-head { max-width: 760px; margin: 0 0 32px; }
.sec-head.center { margin-left: auto; margin-right: auto; }
.sec h2 { font-size: 30px; margin: 0 0 10px; }
.sec-head p { margin: 0; color: var(--gray); font-size: 16px; }
.sec-dark .sec-head p { color: #9ca3af; }

/* 左右の段（説明＋画面）。.flip で入れ替え */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center; margin: 0 0 56px; }
.split.flip > :first-child { order: 2; }
.split h3 { font-size: 22px; margin: 0 0 8px; }
.split ul { padding-left: 1.2em; margin: 8px 0 0; }

/* 続きのリンク（カードの外） */
a.more { display: inline-block; margin-top: 10px; font-weight: 700; text-decoration: none; }

/* カード */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: inherit; text-decoration: none; display: block; }
a.card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.card h3 { font-size: 17px; margin: 0 0 6px; }
.card p { margin: 0; color: var(--ink-2); font-size: 14px; }
.card .more { display: inline-block; margin-top: 10px; font-size: 14px; color: var(--brand); font-weight: 700; }
.icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }

/* 棚のカード（n8n の棚の形）: エージェント 1 体＝1 枚 */
.agent-card { display: flex; flex-direction: column; gap: 8px; }
.agent-card .row { display: flex; align-items: center; gap: 10px; }
.agent-card .avatar { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--brand-soft); flex: none; }
.agent-card h3 { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li, .tag { font-size: 12px; color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }

/* 手順（始め方 3 手など） */
.steps { counter-reset: s; display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; margin: 0; list-style: none; }
.steps > li { counter-increment: s; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps > li::before { content: counter(s); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 10px; }
.steps h3 { font-size: 17px; margin: 0 0 6px; }

/* 証明（出所つきの事実だけ。決まり §3） */
.proof { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fact { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.fact b { display: block; font-size: 28px; color: var(--brand); line-height: 1.2; }
.fact cite { display: block; font-style: normal; font-size: 12px; color: var(--gray); margin-top: 8px; }
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0; }
.quote p { margin: 0 0 10px; }
.quote footer { font-size: 13px; color: var(--gray); }

/* 料金の枠（値は書かない＝🔒 H-1。決まり §5） */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.plan.featured { border: 2px solid var(--brand); }
.plan .price { font-size: 15px; color: var(--gray); border: 1px dashed var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.plan ul { padding-left: 1.2em; margin: 0; flex: 1; }

/* FAQ（details で畳む） */
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 8px 0 0; color: var(--ink-2); }

/* 頁の頭（トップ以外）とパンくず */
.page-head { padding: 40px 0 24px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 34px; margin: 6px 0 10px; }
.page-head .lead { margin: 0; color: var(--ink-2); max-width: 760px; }
.crumbs { font-size: 13px; color: var(--gray); margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--gray); }

/* 記事（/ai-agent/ の柱と枝） */
.article { max-width: 760px; margin: 0 auto; padding: 40px 20px 64px; }
.article h2 { font-size: 24px; margin: 40px 0 12px; }
.article h3 { font-size: 19px; margin: 28px 0 8px; }
.article table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.article th, .article td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.toc { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; font-size: 14px; }
.byline { font-size: 13px; color: var(--gray); }

/* 締めの帯（各頁の最後の導線） */
.cta-band { background: linear-gradient(135deg, var(--brand), #3a74c9); color: #fff; border-radius: 20px; padding: 40px 32px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.cta-band h2 { color: #fff; margin: 0 0 6px; font-size: 26px; }
.cta-band p { margin: 0; color: #dbe7fb; }

/* ---------- 足（フッター）: 中身は _kit/footer.html。運営会社・連絡の口・プライバシーの 3 つが必ず在る（門 R11） */
.site-foot { background: var(--dark); color: #9ca3af; font-size: 14px; padding: 48px 0 32px; margin-top: 0; }
.site-foot .cols { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 24px; }
.site-foot h3 { color: #fff; font-size: 14px; margin: 0 0 10px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 6px 0; }
.site-foot a { color: #cbd5e1; text-decoration: none; }
.site-foot a:hover { color: #fff; }
.site-foot .legal { border-top: 1px solid #1f2937; margin-top: 32px; padding-top: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.site-foot .brand { color: #fff; }

/* ---------- スマホ（390 で横はみ出し 0・覆い 0＝門 R12） */
@media (max-width: 900px) {
  .hero .wrap, .split { grid-template-columns: 1fr; gap: 24px; }
  .split.flip > :first-child { order: 0; }
  .grid, .grid-4, .proof, .plans, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-foot .cols { grid-template-columns: repeat(2, 1fr); }
  .gnav { display: none; }
  .site-head .menu-btn { display: inline-flex; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .hero { padding: 28px 0 24px; }
  .hero h1 { font-size: 27px; }
  .hero .lead { font-size: 15px; margin-bottom: 16px; }
  .sec { padding: 44px 0; }
  .sec h2 { font-size: 24px; }
  .page-head h1 { font-size: 26px; }
  .grid, .grid-2, .grid-4, .proof, .plans, .steps, .shots-2 { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; padding: 28px 20px; }
  .head-cta .login, .site-head .menu-btn { display: none; }
  .head-cta .btn-sm { padding: 8px 12px; font-size: 13px; }
  .brand img { width: 30px; height: 30px; }
  .site-head .wrap { gap: 10px; }
  .brand span { font-size: 16px; }
  .btn { padding: 12px 16px; font-size: 15px; }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
}

/* ---------- ロゴの壁（頼み J・R6 ②）: 白黒に揃えたロゴを 1 帯に（手本: Cursor・n8n・Zapier の白黒の帯）。
   画像は assets/logos/customers/（一色・透過に揃えた物）。⛔ 本番に写すのは掲載の許しが返った会社だけ（決まり §8） */
.logo-band { padding: 28px 0 32px; border-bottom: 1px solid var(--line); }
.logo-band-h { margin: 0 0 18px; text-align: center; font-size: 14px; font-weight: 700; color: var(--gray); letter-spacing: .02em; }
.logo-wall { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 22px 40px; }
.logo-wall li { display: flex; align-items: center; height: 44px; }
.logo-wall img { height: 26px; width: auto; max-width: 150px; object-fit: contain; opacity: .62; }
.logo-wall img.sq { height: 40px; }
.logo-band .small { text-align: center; margin: 16px 0 0; }
@media (max-width: 640px) {
  .logo-wall { gap: 14px 24px; }
  .logo-wall li { height: 34px; }
  .logo-wall img { height: 20px; max-width: 120px; }
  .logo-wall img.sq { height: 32px; }
}
/* 特許出願中の札（箱 n=3132・1 語だけ・番号やリンクは付けない） */
.patent { display: inline-block; vertical-align: middle; font-size: 12px; font-weight: 700; line-height: 1.6; color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; margin-left: 8px; white-space: nowrap; }
.patent-note { font-size: 13px; color: var(--gray); margin: 4px 0 0; }
