/* ======================
   AI入門 読みやすさ最適化版
   h3を細字に変更
   ====================== */

/* リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本設定 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    background-color: #fff;
    padding: 0;
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
}

/* ヘッダー */
header {
    padding: 30px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 30px;
}

.site-logo h1 {
    font-size: 22px;
    font-weight: normal;
    color: #333;
}

/* パンくずリスト */
.breadcrumb {
    font-size: 13px;
    color: #666;
    margin-bottom: 40px;
    padding: 15px 0;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    margin: 0 10px;
    color: #999;
}

.breadcrumb a {
    color: #0066cc;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* タイトルセクション */
.title-section {
    padding: 40px 0;
    margin-bottom: 50px;
}

.page-title {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.5;
}

.page-description {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

.update-info {
    margin-top: 15px;
    font-size: 13px;
    color: #999;
}

/* コンテンツセクション */
.content-section {
    margin: 50px 0;
}

.article-content {
    max-width: 800px;
}

/* 見出し - 本文との差を大きく */
h2 {
    font-size: 20px;
    font-weight: bold;
    margin: 60px 0 25px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
    color: #000;
    line-height: 1.5;
}

.content-section > h2:first-child,
.article-content > h2:first-child {
    margin-top: 0;
}

h3 {
    font-size: 17px;
    font-weight: normal;  /* bold→normal 細字に変更 */
    margin: 40px 0 20px 0;
    color: #000;
    line-height: 1.5;
}

h4 {
    font-size: 15px;
    font-weight: bold;
    margin: 30px 0 15px 0;
    color: #000;
    line-height: 1.5;
}

h5 {
    font-size: 14px;
    font-weight: bold;
    margin: 25px 0 12px 0;
    color: #000;
    line-height: 1.5;
}

/* 段落 - 区切りを明確に */
p {
    margin-bottom: 1.8em;
    line-height: 1.7;
    color: #333;
}

/* リスト - 箇条書き記号なし、インデントのみ */
ul, ol {
    margin: 20px 0 25px 20px;
    line-height: 1.7;
    list-style: none;
}

/* 番号付きリストは番号を表示 */
ol {
    list-style: decimal;
    margin-left: 25px;
}

li {
    margin-bottom: 8px;
}

ul ul, ol ul, ul ol, ol ol {
    margin: 8px 0 8px 20px;
}

/* リスト内の強調（太字）を無効化 */
li strong {
    font-weight: normal;
    color: #333;
}

/* リンク */
a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:visited {
    color: #551a8b;
}

/* 強調（段落内などは太字のまま） */
strong, b {
    font-weight: bold;
    color: #000;
}

/* ただし、見出し直下のリスト内は太字を残す場合もある */
h3 + ul li strong,
h4 + ul li strong {
    font-weight: normal;
}

em, i {
    font-style: italic;
}

/* テーブル */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    border: 1px solid #ddd;
    font-size: 13px;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    line-height: 1.6;
}

th {
    background: #f8f8f8;
    font-weight: bold;
    font-size: 14px;
}

/* 引用 */
blockquote {
    margin: 30px 0;
    padding: 15px 15px 15px 20px;
    border-left: 4px solid #ddd;
    background: #f9f9f9;
    color: #666;
    line-height: 1.7;
    font-size: 13px;
}

/* コード */
code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    background: #f5f5f5;
    padding: 2px 5px;
    border-radius: 3px;
}

pre {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 15px;
    overflow-x: auto;
    margin: 30px 0;
    line-height: 1.4;
    font-size: 13px;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

/* セクション - 明確な区切り */
section {
    margin-bottom: 70px;
    padding-bottom: 30px;
}

section:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

/* カードグリッド */
.category-grid,
.topics-grid,
.use-case-grid,
.japan-info-grid,
.pricing-grid,
.milestone-grid,
.takeaway-grid,
.research-areas,
.practice-grid,
.importance-grid {
    margin: 30px 0;
}

.category-card,
.topic-card,
.use-case-card,
.info-card,
.pricing-card,
.milestone-card,
.takeaway-item,
.research-card,
.practice-item,
.importance-item,
.reason-item {
    display: block;
    margin-bottom: 15px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    background: #fff;
    text-decoration: none;
    color: #333;
}

.category-card:hover,
.topic-card:hover {
    background: #fafafa;
}

/* シンプルなトピックアイテム（枚線なし） */
.topic-item {
    margin-bottom: 30px;
}

.topic-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.topic-item p {
    margin-bottom: 0.8em;
    color: #666;
}

.card-title,
.topic-card h2,
.use-case-card h3,
.info-card h3 {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 12px 0;
    padding: 0;
    border: none;
    color: #000;
    line-height: 1.4;
}

.card-description,
.card-content p {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* カード内のリストも記号なし */
.card-topics {
    list-style: none;
    margin: 12px 0 0 15px;
    padding: 0;
}

.card-topics li {
    margin-bottom: 6px;
    font-size: 13px;
}

/* アイコン非表示 */
.card-icon,
.fas, .far, .fab,
i[class*="fa-"] {
    display: none;
}

/* 情報ボックス */
.intro-section,
.info-box,
.warning-box,
.next-steps,
.summary-section,
.best-practices {
    margin: 30px 0;
    padding: 20px;
    border: 1px solid #e0e0e0;
    background: #f9f9f9;
    line-height: 1.7;
    font-size: 14px;
}

.intro-section {
    border-left: 4px solid #0066cc;
}

.warning-box {
    border-left: 4px solid #d9534f;
    background: #fff5f5;
}

.info-box h4,
.warning-box h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: bold;
    color: #000;
}

/* ステップ表示 */
.step-guide,
.selection-steps,
.workflow-steps {
    margin: 30px 0;
}

.step-item,
.step,
.flow-step {
    margin-bottom: 30px;
    padding-left: 45px;
    position: relative;
}

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border: 2px solid #0066cc;
    background: #fff;
    color: #0066cc;
    font-weight: bold;
    text-align: center;
    line-height: 28px;
    border-radius: 50%;
    font-size: 15px;
}

.step-content h3,
.step-content h4 {
    margin-top: 0;
}

/* タイムライン */
.timeline {
    margin: 30px 0;
}

.timeline-item {
    margin-bottom: 25px;
    padding-left: 100px;
    position: relative;
}

.timeline-year {
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.timeline-content {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #0066cc;
    background: #f9f9f9;
    font-size: 13px;
    line-height: 1.6;
}

/* 比較テーブル */
.comparison-table {
    margin: 30px 0;
    overflow-x: auto;
}

/* トレンド */
.trends-content {
    margin: 30px 0;
}

.trend-item {
    margin-bottom: 20px;
    padding: 15px;
    border-left: 4px solid #0066cc;
    background: #f9f9f9;
}

.trend-item h3 {
    margin: 0 0 10px 0;
    font-size: 15px;
}

/* その他のセクション */
.metric-item,
.solution-item,
.method-item,
.technique-item,
.concept-item,
.component-item {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    background: #f9f9f9;
}

/* 目次 */
.toc,
.table-of-contents {
    margin: 0 0 50px 0;
    padding: 20px;
    border: 1px solid #e0e0e0;
    background: #f9f9f9;
}

.toc h2,
.table-of-contents h2 {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 15px 0;
    padding: 0;
    border: none;
    color: #000;
}

.toc ol,
.table-of-contents ol {
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
    list-style: decimal;
}

.toc li,
.table-of-contents li {
    margin-bottom: 10px;
}

.toc a,
.table-of-contents a {
    color: #0066cc;
    text-decoration: none;
}

.toc a:hover,
.table-of-contents a:hover {
    text-decoration: underline;
}

/* フッター */
footer {
    margin-top: 100px;
    padding-top: 40px;
    border-top: 1px solid #ddd;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.footer-links {
    margin-bottom: 25px;
}

.footer-links a {
    color: #0066cc;
    margin: 0 15px;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* ナビゲーション */
.article-navigation {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #ddd;
}

.nav-button,
.nav-link,
.read-more {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: #fff;
    color: #0066cc;
    text-decoration: none;
    margin-right: 10px;
    font-size: 14px;
}

.nav-button:hover,
.nav-link:hover,
.read-more:hover {
    background: #f5f5f5;
}

/* レスポンシブ（モバイル） */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        line-height: 1.7;
    }
    
    .container {
        padding: 0 20px;
    }
    
    header {
        padding: 20px 0;
        margin-bottom: 25px;
    }
    
    .site-logo h1 {
        font-size: 18px;
    }
    
    .breadcrumb {
        font-size: 12px;
        margin-bottom: 25px;
    }
    
    .title-section {
        padding: 25px 0;
        margin-bottom: 35px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .page-description {
        font-size: 13px;
    }
    
    h2 {
        font-size: 18px;
        margin: 45px 0 20px 0;
    }
    
    h3 {
        font-size: 16px;
        margin: 30px 0 15px 0;
    }
    
    h4 {
        font-size: 15px;
        margin: 25px 0 12px 0;
    }
    
    p {
        margin-bottom: 1.5em;
    }
    
    ul, ol {
        margin-left: 15px;
    }
    
    section {
        margin-bottom: 50px;
    }
    
    .toc {
        margin-bottom: 35px;
    }
    
    .category-card,
    .topic-card {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
        font-size: 12px;
    }
    
    .step-item,
    .step {
        padding-left: 40px;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
        line-height: 24px;
    }
    
    .timeline-item {
        padding-left: 70px;
    }
    
    footer {
        margin-top: 70px;
        padding-top: 30px;
    }
    
    .footer-links a {
        margin: 5px;
        font-size: 12px;
    }
}

/* タブレット */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        padding: 0 40px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    h2 {
        font-size: 19px;
    }
}

/* 印刷 */
@media print {
    body {
        background: #fff;
        color: #000;
        font-size: 11pt;
        line-height: 1.6;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .breadcrumb,
    .footer-links,
    .nav-button,
    .nav-link,
    .read-more {
        display: none;
    }
    
    a {
        color: #000;
        text-decoration: none;
    }
    
    h2 {
        page-break-after: avoid;
    }
}

/* 外部リンク */
.link-note,
.warning-note,
.info-note {
    padding: 15px;
    margin: 25px 0;
    border-left: 4px solid #0066cc;
    background: #f9f9f9;
    font-size: 13px;
    color: #666;
}

.external-link i.fas {
    display: none;
}

/* 参考文献 */
.refs,
.references,
.citations {
    margin-top: 60px;
    padding: 20px;
    border-top: 1px solid #ddd;
    font-size: 13px;
    color: #666;
}

.refs strong,
.references strong {
    display: block;
    margin-bottom: 12px;
    color: #333;
    font-size: 14px;
}

/* 数式表示（KaTeX用） */
.katex-display {
    margin: 25px 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.katex {
    font-size: 1.1em;
}

/* 定義・定理ボックス */
.definition-box,
.theorem-box,
.proof-box {
    margin: 30px 0;
    padding: 20px;
    border-left: 4px solid #0066cc;
    background: #f9f9f9;
}

.definition-box h3,
.theorem-box h3,
.proof-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: bold;
}

.theorem-box {
    border-left-color: #28a745;
}

.proof-box {
    border-left-color: #6c757d;
    background: #f5f5f5;
}

/* 数式番号 */
.equation-number {
    float: right;
    color: #666;
    font-size: 14px;
}

/* 学術的リファレンス */
.citation {
    color: #0066cc;
    font-size: 13px;
    vertical-align: super;
}

.references-list {
    margin: 40px 0;
    padding: 20px;
    border-top: 2px solid #ddd;
}

.references-list h3 {
    margin-top: 0;
    font-weight: bold;
}

.references-list ol {
    list-style: decimal;
    margin-left: 25px;
    font-size: 13px;
    line-height: 1.8;
}

.references-list li {
    margin-bottom: 12px;
}

/* 学術的表記 */
.academic-note {
    margin: 25px 0;
    padding: 15px;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    font-size: 13px;
    color: #555;
}

/* 数式内のテキスト */
.math-text {
    font-family: 'Times New Roman', serif;
    font-style: italic;
}

/* 関連書籍セクション */
.recommended-books {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
}

.recommended-books h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

@media (max-width: 600px) {
    .books-grid {
        grid-template-columns: 1fr;
    }
}
