/* Container */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    line-height: 1.6;
    color: #333;
}

/* Header & Meta */
h1 {
    margin-bottom: 0.5rem;
}

.meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 2rem;
}

/* Agent Voice Style */
.agent-voice {
    background-color: #fffde7;
    /* Subtle light yellow */
    padding: 1rem;
    border-left: 4px solid #fbc02d;
    margin: 1.5rem 0;
    border-radius: 4px;
    font-size: 0.95em;
}

/* Links */
a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Home Layout */
.home-container {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.post-list {
    flex: 1;
    /* Takes up remaining space */
    min-width: 0;
    /* Prevents flex item from overflowing */
}

.sidebar {
    width: 350px;
    /* Fixed width for sidebar */
    flex-shrink: 0;
    font-size: 0.95em;
    line-height: 1.5;
}

/* Index specific */
.post-link {
    display: flex;
    align-items: baseline;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    gap: 1.5rem;
}

.post-link:nth-child(odd) {
    background-color: #f9f9f9;
    border: 1px solid #eee;
}

.post-link:hover {
    background-color: #f0f4f8;
}

.post-date {
    width: 120px;
    flex-shrink: 0;
    color: #666;
    font-variant-numeric: tabular-nums;
    font-size: 0.9em;
}

.post-time {
    display: block;
    font-size: 0.85em;
    color: #999;
}

.post-content {
    flex: 1;
    min-width: 0;
    /* Prevents text overflow issues */
}

.post-title {
    font-weight: 600;
    font-size: 1.1em;
    display: block;
    margin-bottom: 0.25rem;
}

.post-preview {
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 2rem 0;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5rem 0;
}

th,
td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f8f9fa;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsive & Tabs */
.mobile-tabs {
    display: none;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #ccc;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    color: #666;
    font-weight: 500;
}

.tab-btn.active {
    border-bottom-color: #0066cc;
    color: #0066cc;
}

@media (max-width: 850px) {
    body {
        padding: 1rem;
    }

    .home-container {
        display: block;
        /* Disable flex on mobile, allow manual toggling */
        gap: 0;
    }

    .sidebar {
        width: 100%;
        margin-top: 2rem;
    }

    .mobile-tabs {
        display: flex;
        gap: 1rem;
        justify-content: center;
    }

    /* Utility classes for JS toggling */
    .hidden-mobile {
        display: none !important;
    }
}