/* ==========================================================
   CORE AI Experts — 共通デザインシステム拡張 v1.0
   design-system.css を継承し、Experts固有のトークン・コンポーネントのみ追加する。
   このファイル単体では動作しない。必ず design-system.css の後に読み込むこと。
   <link rel="stylesheet" href="../../design-system.css">
   <link rel="stylesheet" href="assets/experts-design.css">
   ========================================================== */

:root{
  /* --- カテゴリ基準色（2.2節） --- */
  --cat-legal:#1F5C8B;      /* 士業・法務 */
  --cat-business:#C7752E;   /* ビジネス・経営 */
  --cat-realestate:#B8863B; /* 不動産 */
  --cat-hr:#3E8FC7;         /* 人事・採用 */
  --cat-life:#C77B8E;       /* ライフ・福祉 */

  /* --- AI個別色は各ページの<style>内で --expert-accent に上書きする ---
     例: 税務AI(士業・法務・1番目) → --expert-accent: var(--cat-legal);
         労務AI(士業・法務・2番目) → --expert-accent: color-mix(in srgb, var(--cat-legal) 92%, white 8%);
     具体的な明度バリエーションは 2.2節の「±8%刻み」ルールに従う。
     ここでは基準値としてカテゴリ色をそのままデフォルト値にしておく。 */
  --expert-accent: var(--cat-legal);
  --expert-accent-soft: color-mix(in srgb, var(--expert-accent) 10%, white 90%);
  --expert-accent-line: color-mix(in srgb, var(--expert-accent) 30%, white 70%);
}

/* --- FAQ（design-system.cssに定義が無いため、ここで共通定義する） --- */
.faq-list{max-width:760px;margin:0 auto;}
.faq-item{border-bottom:1px solid var(--line);}
.faq-q{
  display:flex;justify-content:space-between;align-items:center;gap:20px;
  width:100%;padding:26px 4px;background:none;border:none;text-align:left;cursor:pointer;
  font-family:inherit;font-size:16px;font-weight:600;color:var(--ink);line-height:1.6;
}
.faq-q .plus{font-size:20px;color:var(--ink-mute);flex-shrink:0;transition:transform .2s ease;}
.faq-item.open .plus{transform:rotate(45deg);}
.faq-a{max-height:0;overflow:hidden;transition:max-height .25s ease;}
.faq-a p{font-size:14.5px;color:var(--ink-soft);line-height:1.9;margin:0 4px 26px;}

/* --- 縦リズム共通ルール（完成テンプレート基準・Day2確定） --- */
section{padding:88px 0;}
.section-head{text-align:center;max-width:640px;margin:0 auto 44px;}
.section-head h2{font-size:26px;margin:0 0 10px;}
.section-head p{color:var(--ink-soft);font-size:14.5px;margin:0;}

/* --- パンくず（5.6節） --- */
.breadcrumb{
  font-size:12.5px;color:var(--ink-mute);padding:14px 0;
  display:flex;align-items:center;gap:6px;flex-wrap:wrap;
}
.breadcrumb a{color:var(--ink-mute);}
.breadcrumb a:hover{color:var(--ink);}
.breadcrumb .sep{opacity:.5;}
.breadcrumb .current{color:var(--ink);font-weight:600;}

/* --- Expert Hero（3.1節・Day2改善版） --- */
.expert-hero{padding:64px 0 48px;}
.expert-hero-ctas{display:flex;gap:14px;flex-wrap:wrap;margin-top:26px;}
.expert-badge{
  display:inline-flex;align-items:center;justify-content:center;
  width:52px;height:52px;border-radius:50%;
  background:var(--expert-accent-soft);margin-bottom:20px;
}
.expert-badge svg{width:26px;height:26px;stroke:var(--expert-accent);fill:none;stroke-width:1.6;}
.expert-hero h1{font-size:34px;margin:0 0 12px;}
.expert-hero .lead{font-size:15.5px;color:var(--ink-soft);max-width:52ch;margin:0 0 22px;line-height:1.9;}
.trust-badges{display:flex;gap:10px;flex-wrap:wrap;}
.trust-badge{
  font-size:12.5px;font-weight:600;color:var(--ink-soft);
  background:var(--bg-alt);border:1px solid var(--line);
  padding:7px 14px;border-radius:999px;
}

/* --- 関連記事（3.6b節・新規） --- */
.expert-articles{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;}
.expert-article-card{
  display:block;background:#fff;border:1px solid var(--line);border-radius:var(--radius-md);
  padding:22px;text-decoration:none;transition:box-shadow .2s ease;
}
.expert-article-card:hover{box-shadow:var(--shadow-card);}
.expert-article-card .cat{font-size:11px;font-weight:700;color:var(--expert-accent);margin-bottom:8px;display:block;}
.expert-article-card h4{font-size:14.5px;color:var(--ink);margin:0 0 8px;line-height:1.6;}
.expert-article-card p{font-size:12.5px;color:var(--ink-mute);margin:0;}

/* --- 説明エリア（3.2節）:design-system.cssの.cardを流用、上部ラインのみ追加 --- */
.expert-feature-card{position:relative;overflow:hidden;}
.expert-feature-card::before{
  content:"";position:absolute;top:0;left:0;right:0;height:3px;
  background:var(--expert-accent);
}

/* --- おすすめ質問チップ（3.3節） --- */
.expert-quick{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 0;}
.expert-quick button{
  border:1px solid var(--expert-accent-line);background:#fff;color:var(--ink);
  border-radius:999px;padding:9px 16px;font-size:13px;font-family:inherit;cursor:pointer;
  transition:background .15s ease;
}
.expert-quick button:hover{background:var(--expert-accent-soft);}

/* --- チャットエリア（3.4節） --- */
.expert-chat-panel{
  background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-panel);overflow:hidden;
}
.expert-chat-head{
  padding:16px 20px;border-bottom:1px solid var(--line);
  display:flex;align-items:center;justify-content:space-between;
}
.expert-chat-head .status{display:flex;align-items:center;gap:8px;font-size:13.5px;font-weight:700;}
.expert-chat-head .dot{width:8px;height:8px;border-radius:50%;background:#22C55E;}
.expert-chat-head .limit{font-size:12px;color:var(--ink-mute);}
.expert-chat-log{padding:20px;min-height:220px;max-height:360px;overflow-y:auto;}
.expert-chat-msg{
  background:var(--bg-alt);border-radius:10px 10px 10px 2px;
  padding:12px 16px;font-size:14px;line-height:1.7;margin-bottom:14px;max-width:88%;
  white-space:pre-wrap;
}
.expert-chat-msg.user{
  background:var(--ink);color:#fff;border-radius:10px 10px 2px 10px;margin-left:auto;
}
.expert-chat-msg.ai{border-left:3px solid var(--expert-accent);}
.expert-chat-disclaimer{
  font-size:11px;color:var(--ink-mute);margin-top:8px;padding-top:8px;
  border-top:1px dashed var(--line);
}
.expert-chat-input-row{display:flex;gap:10px;padding:16px 20px;border-top:1px solid var(--line);}
.expert-chat-input-row input{
  flex:1;padding:13px 16px;border-radius:var(--radius-sm);border:1.5px solid var(--line);
  font-size:14.5px;font-family:inherit;
}
.expert-chat-input-row input:focus{outline:2px solid var(--expert-accent);outline-offset:1px;}
.expert-chat-input-row button{
  width:46px;height:46px;border-radius:var(--radius-sm);border:none;
  background:var(--ink);color:#fff;font-size:17px;cursor:pointer;flex-shrink:0;
}
.expert-chat-input-row button:disabled{opacity:.5;cursor:not-allowed;}

/* --- 導入事例（3.7節）:「このAIはこんな企業・業種で活用できます」 --- */
.expert-usecases{display:flex;flex-wrap:wrap;gap:10px;}
.expert-usecase-tag{
  display:inline-flex;align-items:center;gap:7px;
  background:var(--expert-accent-soft);color:var(--ink);
  border-radius:999px;padding:9px 16px;font-size:13.5px;font-weight:600;
}
.expert-usecase-tag svg{width:14px;height:14px;stroke:var(--expert-accent);stroke-width:2.2;flex-shrink:0;}

/* --- CTAカスタマイズ項目タグ（3.9節） --- */
.expert-cta-features{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-bottom:26px;}
.expert-cta-features span{
  background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.2);
  border-radius:999px;padding:8px 16px;font-size:12.5px;color:#fff;
}

/* --- 注意事項ブロック（3.8節） --- */
.expert-notice{
  background:var(--bg-alt);border-radius:var(--radius-lg);padding:32px;
  font-size:13.5px;color:var(--ink-soft);line-height:1.9;
}
.expert-notice h3{font-size:15px;color:var(--ink);margin:0 0 14px;}
.expert-notice ul{margin:0;padding-left:1.3em;}
.expert-notice li{margin-bottom:8px;}

/* --- CTA（3.8節）:営業導線。埋没させないよう独立ブロックとして強調 --- */
.expert-cta{
  background:var(--navy-deep);color:#fff;border-radius:var(--radius-lg);
  padding:48px 40px;text-align:center;
}
.expert-cta h2{color:#fff;font-size:26px;margin:0 0 14px;}
.expert-cta p{color:rgba(255,255,255,.72);font-size:14.5px;margin:0 0 28px;max-width:52ch;margin-left:auto;margin-right:auto;}
.expert-cta-ctas{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;}

/* --- 他の専門AIも見る（5.7節） --- */
.expert-related{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;}
.expert-related-card{
  display:block;background:#fff;border:1px solid var(--line);border-radius:var(--radius-md);
  padding:20px;text-decoration:none;transition:box-shadow .2s ease;
}
.expert-related-card:hover{box-shadow:var(--shadow-card);}
.expert-related-card .tag{
  font-size:11px;font-weight:700;color:var(--expert-accent);margin-bottom:8px;display:block;
}
.expert-related-card h4{font-size:14.5px;color:var(--ink);margin:0;}

/* --- Expertsトップ:カテゴリ見出し・AI一覧カード --- */
.expert-category-block{margin-bottom:56px;}
.expert-category-head{display:flex;align-items:center;gap:10px;margin-bottom:24px;}
.expert-category-head .emoji{font-size:22px;}
.expert-category-head h2{font-size:20px;margin:0;}
.expert-category-head .count{font-size:12.5px;color:var(--ink-mute);}
.expert-list-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;}
.expert-list-card{
  display:block;background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);
  padding:24px;text-decoration:none;position:relative;overflow:hidden;
  transition:transform .2s ease, box-shadow .2s ease;
}
.expert-list-card::before{
  content:"";position:absolute;top:0;left:0;right:0;height:3px;
  background:var(--card-accent, var(--ink));
}
.expert-list-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-panel);}
.expert-list-card h3{font-size:16px;margin:10px 0 6px;}
.expert-list-card p{font-size:13px;color:var(--ink-soft);margin:0;}

/* --- 記事ページ（Day7新規：SEOコンテンツ用共通スタイル） --- */
.article-hero{padding:56px 0 32px;}
.article-hero .eyebrow{color:var(--expert-accent);}
.article-hero h1{font-size:28px;margin:14px 0 16px;line-height:1.5;}
.article-hero .lead{font-size:15px;color:var(--ink-soft);line-height:1.9;}
.article-body{font-size:15px;line-height:2;color:var(--ink);}
.article-body h2{font-size:20px;margin:44px 0 18px;padding-top:4px;border-top:1px solid var(--line);padding-top:32px;}
.article-body h2:first-child{border-top:none;padding-top:0;margin-top:0;}
.article-body h3{font-size:16.5px;margin:28px 0 12px;}
.article-body p{margin:0 0 18px;color:var(--ink-soft);}
.article-body ul,.article-body ol{margin:0 0 18px;padding-left:1.4em;color:var(--ink-soft);}
.article-body li{margin-bottom:8px;}
.article-body table{width:100%;border-collapse:collapse;margin:0 0 24px;font-size:13.5px;}
.article-body th,.article-body td{border:1px solid var(--line);padding:10px 12px;text-align:left;}
.article-body th{background:var(--bg-alt);font-weight:700;}
.article-summary{background:var(--bg-alt);border-radius:var(--radius-lg);padding:28px 30px;margin:20px 0;}
.article-summary h2{margin-top:0;border-top:none;padding-top:0;}
.article-summary ul{margin-bottom:0;}
.article-meta{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px;}
.article-meta span{font-size:11.5px;color:var(--ink-mute);background:var(--bg-alt);border:1px solid var(--line);border-radius:999px;padding:5px 12px;}
.article-inline-cta{
  background:var(--bg-alt);border-radius:var(--radius-lg);padding:26px 28px;margin:32px 0;
  display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;
}
.article-inline-cta p{margin:0;font-size:14px;color:var(--ink);font-weight:600;}
.article-list-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px;}

/* --- Day10:人気記事・回遊導線・監修情報 --- */
.article-dates{display:flex;gap:14px;flex-wrap:wrap;font-size:11.5px;color:var(--ink-mute);margin-top:10px;}
.popular-badge{
  display:inline-block;background:var(--gold);color:#fff;font-size:10.5px;font-weight:700;
  padding:3px 9px;border-radius:999px;margin-bottom:8px;
}
.recirculation-block{margin:40px 0;}
.recirculation-block h3{font-size:15px;margin:0 0 14px;}
.recirculation-ai-list{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:28px;}
.recirculation-ai-list a{
  display:inline-flex;align-items:center;gap:6px;background:var(--bg-alt);border:1px solid var(--line);
  border-radius:999px;padding:9px 16px;font-size:13px;font-weight:600;color:var(--ink);text-decoration:none;
}
.recirculation-ai-list a:hover{border-color:var(--expert-accent);}
.category-badge-link{
  display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--ink-mute);
  text-decoration:none;border:1px dashed var(--line);border-radius:999px;padding:7px 14px;
}
.category-badge-link:hover{border-color:var(--expert-accent);color:var(--expert-accent);}
.editorial-note{
  background:var(--bg-alt);border-left:3px solid var(--expert-accent);border-radius:0 var(--radius-md) var(--radius-md) 0;
  padding:20px 24px;margin:32px 0;font-size:12.5px;color:var(--ink-soft);line-height:1.9;
}
.editorial-note strong{color:var(--ink);}
.popular-articles-section{margin:40px 0 8px;}

@media(max-width:860px){
  .article-hero{padding:36px 0 24px;}
  .article-hero h1{font-size:22px;}
  .article-body{font-size:14px;}
  .article-body h2{font-size:18px;margin-top:36px;padding-top:24px;}
  .article-inline-cta{flex-direction:column;align-items:stretch;text-align:center;}
  .article-list-grid{grid-template-columns:1fr;}
  .recirculation-ai-list{flex-direction:column;}
  .recirculation-ai-list a{justify-content:center;}
}
@media(max-width:860px){
  .faq-q{font-size:15px;padding:22px 2px;gap:14px;}
  .faq-a p{font-size:14px;margin:0 2px 22px;}
  section{padding:52px 0;}
  .section-head{margin-bottom:32px;}
  .section-head h2{font-size:21px;}
  .expert-hero{padding:36px 0 32px;}
  .expert-hero h1{font-size:26px;}
  .expert-hero-ctas{flex-direction:column;align-items:stretch;}
  .expert-articles{grid-template-columns:1fr;}
  .expert-cta{padding:36px 24px;}
  .expert-cta h2{font-size:21px;}
  .expert-related{grid-template-columns:1fr;}
  .expert-list-grid{grid-template-columns:1fr 1fr;}
  .expert-chat-log{max-height:280px;}
}
@media(max-width:520px){
  .expert-list-grid{grid-template-columns:1fr;}
}
