/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Charter', Georgia, serif;
    line-height: 1.6;
    color: #242424;
    background-color: #ffffff;
    font-size: 20px;
}

/* Article container */
.article {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Header styles */
.article-header {
    margin-bottom: 48px;
}

.article-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: #242424;
    letter-spacing: -0.02em;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid #e6e6e6;
    border-bottom: 1px solid #e6e6e6;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #6b6b6b;
}

.author-info {
    display: flex;
    align-items: center;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 500;
    color: #242424;
    margin-bottom: 2px;
}

.publish-date {
    font-size: 13px;
}

.reading-time {
    font-size: 13px;
}

/* Content styles */
.article-content {
    font-size: 20px;
    line-height: 1.6;
}

.lead {
    font-size: 24px;
    line-height: 1.5;
    color: #6b6b6b;
    margin-bottom: 32px;
    font-style: italic;
}

h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 48px 0 24px 0;
    color: #242424;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 32px 0 16px 0;
    color: #242424;
}

p {
    margin-bottom: 24px;
    color: #242424;
}

/* Lists */
ul,
ol {
    margin: 24px 0;
    padding-left: 32px;
}

li {
    margin-bottom: 8px;
}

li strong {
    font-weight: 600;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.stat-card {
    text-align: center;
    padding: 12px 24px;
    border-radius: 12px;
    background: #ffffff;
    border: 2px solid #f1f5f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-icon {
    font-size: 48px;
    margin-bottom: 6px;
    display: block;
}

.stat-image {
    width: 140px;
    height: 140px;
    object-fit: contain;
}

.stat-card h3 {
    margin: -30px 0 12px 0;
    font-size: 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #1f2937;
}

.stat-card p {
    margin: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #4b5563;
}

/* Actions grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 16px;
    margin: 32px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.action-card {
    padding: 16px;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.action-card.cooperative {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.action-card.selfish {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.action-card.aggressive {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
}

.action-card.neutral {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.action-card h4 {
    margin: -30px 0 4px 0;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.2;
}

.action-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.3;
    color: #6b7280;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Personality grid */
.personality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.personality-card {
    padding: 24px;
    border-radius: 8px;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.personality-card.productive {
    background-color: #f0f9f0;
    border-left-color: #22c55e;
}

.personality-card.intellectual {
    background-color: #eff6ff;
    border-left-color: #3b82f6;
}

.personality-card.antisocial {
    background-color: #fefce8;
    border-left-color: #eab308;
}

.personality-card.aggressive {
    background-color: #fef2f2;
    border-left-color: #ef4444;
}

.personality-card h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
}

.personality-card p {
    margin-bottom: 12px;
    font-size: 16px;
}

.personality-card em {
    font-size: 14px;
    color: #6b6b6b;
}

/* Blockquote */
blockquote {
    margin: 32px 0;
    padding: 24px 32px;
    border-left: 4px solid #e6e6e6;
    background-color: #fafafa;
    font-style: italic;
    font-size: 22px;
    color: #4a4a4a;
}

.blobs-row {
    align-items: center;
    justify-content: center;
    display: flex;
}

.blobs-row img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    margin-top: -30px;
}

/* Code block */
.code-block {
    margin: 32px 0;
    background-color: #f6f8fa;
    border-radius: 8px;
    padding: 24px;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.4;
    color: #24292e;
}

.code-block code {
    background: none;
    padding: 0;
}



/* Footer */
.article-footer {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid #e6e6e6;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.tag {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f1f5f9;
    color: #475569;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    .article {
        padding: 40px 16px;
    }

    .article-title {
        font-size: 32px;
    }

    h2 {
        font-size: 28px;
    }

    .article-content {
        font-size: 18px;
    }

    .lead {
        font-size: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stat-card {
        padding: 24px 20px;
    }

    .stat-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }

    .stat-image {
        width: 40px;
        height: 40px;
    }

    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 12px;
        max-width: 400px;
    }

    .action-card {
        padding: 12px;
        min-height: 100px;
    }

    .action-card h4 {
        font-size: 12px;
    }

    .action-card p {
        font-size: 10px;
    }

    .personality-grid {
        grid-template-columns: 1fr;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    blockquote {
        padding: 16px 20px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    ul,
    ol {
        padding-left: 24px;
    }
}

/* Print styles */
@media print {
    .article {
        max-width: none;
        padding: 0;
    }

    .article-title {
        font-size: 28px;
    }

    h2 {
        font-size: 22px;
    }

    .article-content {
        font-size: 14px;
    }
}

/* Plot container */
.plot-container {
    margin: 32px 0;
    text-align: center;
}

.plot-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.plot-caption {
    font-size: 16px;
    color: #6b7280;
    font-style: italic;
    margin: 0;
    line-height: 1.4;
}

/* Trajectory grid */
.trajectory-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px 0;
}

.trajectory-card {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    border-radius: 12px;
    background: #ffffff;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.trajectory-card.stable {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.trajectory-card.boom-bust {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.trajectory-card.collapse {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
}

.trajectory-icon {
    width: 164px;
    height: 100px;
    object-fit: contain;
    flex-shrink: 0;
}

.trajectory-content {
    flex: 1;
}

.trajectory-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.trajectory-card h3 {
    margin: 0;
    font-size: 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #1f2937;
}

.rarity-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1;
}

.rarity-tag.common {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.rarity-tag.uncommon {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.rarity-tag.rare {
    background-color: #fecaca;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.trajectory-card p {
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.4;
    color: #374151;
}

/* Responsive adjustments for new elements */
@media (max-width: 768px) {
    .trajectory-card {
        flex-direction: column;
        text-align: center;
        padding: 16px;
        gap: 12px;
    }

    .trajectory-icon {
        width: 64px;
        height: 64px;
    }

    .trajectory-header {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .trajectory-card h3 {
        font-size: 18px;
    }

    .rarity-tag {
        font-size: 10px;
        padding: 3px 6px;
    }

    .trajectory-card p {
        font-size: 14px;
    }

    .plot-caption {
        font-size: 14px;
    }
}