/* ========================================
   AI協調プログラミング入門
   シンプル・論文スタイル
   ======================================== */

/* ========================================
   基本設定
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Yu Gothic', 'Meiryo', sans-serif;
    line-height: 1.8;
    color: #333;
    background: #fff;
    font-size: 16px;
}

/* ========================================
   広告レイアウト（左側広告）
   ======================================== */

.vibe-page-wrapper {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.vibe-page-wrapper .ad-container {
    position: sticky;
    top: 20px;
    width: 160px;
    height: 600px;
    flex-shrink: 0;
}

.vibe-page-wrapper .ad-left {
    order: 1;
}

.vibe-page-wrapper .vibe-content {
    flex: 1;
    max-width: 1000px;
    margin: 0;
    padding: 0;
    order: 2;
}

/* ========================================
   サイトヘッダー
   ======================================== */

.site-header {
    background: #f5f5f5;
    padding: 20px;
    border-bottom: 2px solid #333;
}

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

/* ========================================
   パンくずリスト
   ======================================== */

.breadcrumb {
    background: #fff;
    padding: 12px 20px;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
}

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

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

/* ========================================
   レイアウト
   ======================================== */

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ========================================
   ページヘッダー
   ======================================== */

.page-header {
    margin-bottom: 60px;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

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

/* ========================================
   目次
   ======================================== */

.toc {
    margin-bottom: 60px;
}

.toc h2 {
    font-size: 24px;
    margin-bottom: 30px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

/* 章セクション */
.chapter {
    margin-bottom: 35px;
}

.chapter h3 {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: bold;
}

.chapter ul {
    list-style: none;
    padding-left: 0;
}

.chapter li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.chapter li::before {
    content: "・";
    position: absolute;
    left: 0;
}

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

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

/* 説明テキスト */
.desc {
    display: inline-block;
    font-size: 13px;
    color: #999;
    margin-left: 10px;
}

/* ========================================
   フッター
   ======================================== */

footer {
    margin-top: 80px;
    padding: 40px 20px;
    border-top: 2px solid #333;
    background: #f5f5f5;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
}

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

footer p {
    color: #666;
    font-size: 14px;
}

/* ========================================
   レスポンシブ対応
   ======================================== */

@media (max-width: 768px) {
    main {
        padding: 20px 15px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .toc h2 {
        font-size: 20px;
    }
    
    .chapter h3 {
        font-size: 16px;
    }
    
    .desc {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    /* モバイルでは広告を非表示 */
    .vibe-page-wrapper {
        flex-direction: column;
    }
    
    .vibe-page-wrapper .ad-container {
        display: none;
    }
    
    .vibe-page-wrapper .vibe-content {
        padding: 0 15px;
    }
}
