/* 基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #303e4e;
    --secondary-color: #5296d5;
    --accent-color: #d55252;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e9ecef;
    --highlight-color: #f0f7ff;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --border-radius: 8px;
}

body {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', 'メイリオ', Meiryo, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-size: 16px;
}

/* ヘッダー */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 目次 */
.table-of-contents {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    box-shadow: var(--shadow);
}

.table-of-contents h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.table-of-contents ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 0.5rem;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    display: block;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.table-of-contents a:hover {
    background: var(--secondary-color);
    color: white;
    border-left-color: var(--accent-color);
    transform: translateX(5px);
}

.table-of-contents a.active {
    background: var(--highlight-color);
    border-left-color: var(--secondary-color);
    font-weight: 600;
}

/* メインコンテンツ */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    background: white;
    margin-bottom: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

section > h2 {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem 2rem;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

section > h3,
section > h4,
section > h5 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding: 0 2rem;
}

section > h3 {
    font-size: 1.4rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

section > h4 {
    font-size: 1.2rem;
}

section > h5 {
    font-size: 1.1rem;
}

section > p,
section > ul,
section > ol {
    padding: 0 2rem;
    margin-bottom: 1.5rem;
}

section > p:last-child {
    padding-bottom: 2rem;
}

/* 特別なボックス */
.highlight-box,
.finding-box,
.summary-box,
.advantages-box,
.validity-box,
.modern-applications,
.final-conclusion {
    background: var(--highlight-color);
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1.5rem 2rem;
}

.highlight-box h4,
.finding-box h4,
.summary-box p:first-child,
.advantages-box h4,
.validity-box p:first-child,
.modern-applications p:first-child {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* 目的・結論リスト */
.objectives-list,
.conclusions-list {
    display: grid;
    gap: 1.5rem;
    margin: 1.5rem 2rem;
}

.objective,
.conclusion {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.objective h4,
.conclusion h4 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding: 0;
}

.objective p,
.conclusion p {
    margin: 0;
    padding: 0;
}

/* 発見グリッド */
.findings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 2rem;
}

.finding-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.finding-item h5 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.finding-item p {
    margin: 0;
    padding: 0;
}

/* 分類テーブル */
.classification-table {
    margin: 1.5rem 2rem;
}

.classification-table h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

th {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tr:last-child td {
    border-bottom: none;
}

tr:nth-child(even) {
    background: var(--bg-light);
}

/* 比較セクション */
.comparison-section {
    margin: 2rem 0;
}

.comparison-section h3 {
    color: var(--primary-color);
    margin: 2rem 2rem 1rem 2rem;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1.5rem 2rem;
}

.era-1960s,
.era-current {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.era-1960s {
    border-left: 4px solid var(--accent-color);
}

.era-current {
    border-left: 4px solid var(--secondary-color);
}

.era-1960s h4,
.era-current h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    padding: 0;
}

.era-1960s h4 {
    color: var(--accent-color);
}

.era-current h4 {
    color: var(--secondary-color);
}

.era-1960s ul,
.era-current ul {
    margin: 0;
    padding: 0 0 0 1.5rem;
}

/* 制限事項グリッド */
.limitations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 2rem;
}

.limitation {
    background: #fff0f0;
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.limitation h5 {
    color: var(--accent-color);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.limitation p {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin: 0;
    padding: 0;
}

/* メリットセクション */
.merits-section h4 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin: 2rem 2rem 1rem 2rem;
    padding: 0;
}

.merits-section p {
    margin: 0 2rem 1.5rem 2rem;
    padding: 0;
}

/* 参考文献 */
.references-list {
    padding: 0 2rem 2rem 3rem;
    line-height: 1.8;
}

.references-list li {
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

/* フッター */
footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    main {
        padding: 0 1rem;
    }
    
    .table-of-contents {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .table-of-contents ul {
        grid-template-columns: 1fr;
    }
    
    section > h2 {
        font-size: 1.5rem;
        padding: 1rem 1.5rem;
    }
    
    section > h3,
    section > h4,
    section > h5,
    section > p,
    section > ul,
    section > ol {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .highlight-box,
    .finding-box,
    .summary-box,
    .advantages-box,
    .validity-box,
    .modern-applications,
    .final-conclusion,
    .objectives-list,
    .conclusions-list,
    .findings-grid,
    .classification-table,
    .comparison-grid,
    .limitations-grid {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .findings-grid {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 2rem 1rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    section > h2 {
        font-size: 1.3rem;
        padding: 1rem;
    }
    
    section > h3,
    section > h4,
    section > h5,
    section > p,
    section > ul,
    section > ol {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .highlight-box,
    .finding-box,
    .summary-box,
    .advantages-box,
    .validity-box,
    .modern-applications,
    .final-conclusion,
    .objectives-list,
    .conclusions-list,
    .findings-grid,
    .classification-table,
    .comparison-grid,
    .limitations-grid {
        margin-left: 1rem;
        margin-right: 1rem;
        padding: 1rem;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
}

/* スクロール動作の改善 */
html {
    scroll-behavior: smooth;
}

/* セクション間の区切りを明確に */
section:not(:last-child) {
    margin-bottom: 2rem;
}

/* 印刷スタイル */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    header {
        background: none !important;
        color: black !important;
        text-align: center;
        border-bottom: 2px solid black;
    }
    
    .table-of-contents {
        display: none;
    }
    
    section {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    section > h2 {
        background: none !important;
        color: black !important;
        border-bottom: 2px solid black;
    }
    
    .highlight-box,
    .finding-box,
    .summary-box,
    .advantages-box,
    .validity-box,
    .modern-applications,
    .final-conclusion {
        background: #f0f0f0 !important;
        border: 1px solid #303e4e !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline !important;
    }
    
    footer {
        background: none !important;
        color: black !important;
        border-top: 1px solid black;
    }
} 