@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&family=Patrick+Hand&display=swap');

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Nunito', sans-serif;
    color: #2d3b2d;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #2d5a3d; }
a:hover { color: #4a7c59; }

img, video { max-width: 100%; border-radius: 6px; }

/* === Layout === */
.site-header {
    background: #2d5a3d;
    color: #e8f5e0;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    border-bottom: 3px solid #4a7c59;
}
.site-logo {
    font-family: 'Patrick Hand', cursive;
    font-size: 22px;
    color: #c8e6a0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-logo:hover { color: #e8f5e0; }
.site-nav {
    display: flex;
    gap: 24px;
    list-style: none;
}
.site-nav a {
    color: #a8d5a0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.site-nav a:hover { color: #e8f5e0; }
.site-nav a.active {
    color: #e8f5e0;
    border-bottom-color: #c8e6a0;
}

.content-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px;
    width: 100%;
    flex: 1;
}

.site-footer {
    background: #2d5a3d;
    color: #8ab880;
    text-align: center;
    padding: 16px;
    font-size: 13px;
    border-top: 3px solid #4a7c59;
    margin-top: auto;
}
.site-footer a { color: #a8d5a0; }

/* === Journal (home) theme === */
.page-journal {
    background: #faf6ee;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(200, 180, 140, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(160, 200, 140, 0.1) 0%, transparent 50%);
}

/* === Base page theme (blog, how-it-works) === */
.page-base {
    background: #f0f7e8;
}

/* === Journal Entries === */
.journal-entry {
    background: #fffdf7;
    border: 1px solid #e0d8c8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(80, 60, 20, 0.06);
    position: relative;
}
.journal-entry::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 30px;
    height: 12px;
    background: #e8dcc4;
    border-radius: 2px;
    opacity: 0.6;
}
.journal-date {
    font-family: 'Patrick Hand', cursive;
    font-size: 13px;
    color: #8a7a5a;
    margin-bottom: 4px;
}
.journal-mood {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #7a9a5a;
    background: #eef5e4;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 8px;
}
.mood-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.mood-dot.content { background: #8ac46a; }
.mood-dot.anxious { background: #d4a84a; }
.mood-dot.worried { background: #d4a84a; }
.mood-dot.happy { background: #6ac46a; }
.mood-dot.sad { background: #7a8aaa; }

.journal-title {
    font-family: 'Patrick Hand', cursive;
    font-size: 22px;
    color: #3a5a2a;
    margin-bottom: 8px;
}
.journal-title a {
    color: inherit;
    text-decoration: none;
}
.journal-title a:hover {
    text-decoration: underline;
}
.journal-body {
    font-size: 15px;
    color: #4a5a3a;
    line-height: 1.7;
}
.journal-body p { margin-bottom: 0.8em; }

.journal-photos {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}
.journal-photos img {
    border: 1px solid #d0c8b0;
    max-height: 200px;
    object-fit: cover;
}
.journal-photos video {
    border: 1px solid #d0c8b0;
    max-height: 200px;
}

/* Model comparison controls */
.journal-controls {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #f0ead6;
    border-radius: 10px;
    border: 1px solid #d8ccaa;
}
.journal-run-label {
    font-weight: 700;
    color: #2d5a3d;
    margin-bottom: 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.model-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.model-tab {
    all: unset;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border: 2px solid #c8d8b8;
    border-radius: 8px;
    background: #fff;
    color: #2d5a3d;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.model-tab:hover {
    background: #e8f0d8;
    border-color: #9ab88a;
}
.model-tab.active {
    background: #2d5a3d;
    color: #fff;
    border-color: #2d5a3d;
    box-shadow: 0 2px 8px rgba(45, 90, 61, 0.3);
}
.model-tab .entry-count {
    opacity: 0.6;
    font-size: 12px;
    font-weight: 400;
}

.journal-doodle {
    text-align: center;
    font-size: 16px;
    color: #c8b888;
    margin: 12px 0;
    font-family: 'Patrick Hand', cursive;
    opacity: 0.5;
}

/* === Purchase Requests (inline in journal) === */
.purchase-request {
    background: #fef9e7;
    border: 1px dashed #d4b84a;
    border-radius: 6px;
    padding: 12px 14px;
    margin-top: 12px;
}
.purchase-request .pr-label {
    font-family: 'Patrick Hand', cursive;
    font-size: 14px;
    color: #8a6a2a;
    font-weight: 700;
}
.purchase-request .pr-item {
    color: #5a4a2a;
    font-weight: 600;
}
.purchase-request .pr-cost {
    float: right;
    font-weight: 700;
    color: #8a6a2a;
}
.purchase-request .pr-urgency {
    font-size: 11px;
    color: #c44a2a;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 6px;
}
.purchase-request .pr-reason {
    font-size: 13px;
    color: #6a5a3a;
    font-style: italic;
    margin-top: 4px;
    line-height: 1.5;
}

/* === Blog === */
.blog-post-card {
    background: #ffffff;
    border: 1px solid #d0e0c0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(40, 80, 40, 0.06);
}
.blog-meta {
    font-size: 12px;
    color: #6a8a5a;
    margin-bottom: 6px;
}
.blog-post-title {
    font-size: 20px;
    font-weight: 700;
    color: #2d5a3d;
    margin-bottom: 8px;
}
.blog-post-title a {
    color: inherit;
    text-decoration: none;
}
.blog-post-title a:hover { text-decoration: underline; }
.blog-summary {
    font-size: 14px;
    color: #4a6a4a;
    line-height: 1.6;
}
.blog-tags {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.tag {
    font-size: 11px;
    background: #e4f0d8;
    color: #4a7a3a;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
}
.tag:hover {
    background: #d0e8c0;
}

/* Blog post body (rendered markdown) */
.blog-body h1, .blog-body h2, .blog-body h3 {
    color: #2d5a3d;
    margin: 1.2em 0 0.5em;
}
.blog-body h1 { font-size: 24px; }
.blog-body h2 { font-size: 20px; }
.blog-body h3 { font-size: 17px; }
.blog-body p { margin-bottom: 0.8em; }
.blog-body ul, .blog-body ol { margin: 0.5em 0 0.8em 1.5em; }
.blog-body blockquote {
    border-left: 3px solid #4a7c59;
    padding-left: 16px;
    margin: 0.8em 0;
    color: #5a7a5a;
    font-style: italic;
}
.blog-body video {
    margin: 1em 0;
    width: 100%;
}

/* Code blocks */
.blog-body pre, .codehilite {
    background: #1e2d1e;
    color: #c8e8c0;
    border-radius: 6px;
    padding: 14px 16px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    margin: 0.8em 0;
}
.blog-body code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
}
.blog-body p code, .blog-body li code {
    background: #e4f0d8;
    padding: 1px 5px;
    border-radius: 3px;
    color: #2d5a3d;
}

/* Tables inside blog posts */
.blog-body table {
    border-collapse: collapse;
    margin: 1em 0;
    width: 100%;
    font-size: 14px;
    display: block;
    overflow-x: auto;
}
.blog-body table thead {
    background: #e4f0d8;
}
.blog-body table th,
.blog-body table td {
    border: 1px solid #c8dcbe;
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
}
.blog-body table th {
    color: #2d5a3d;
    font-weight: 600;
}
.blog-body table tbody tr:nth-child(even) {
    background: #f6faf1;
}

/* === How It Works === */
.how-it-works-body h1, .how-it-works-body h2, .how-it-works-body h3 {
    color: #2d5a3d;
    margin: 1.2em 0 0.5em;
}
.how-it-works-body h1 { font-size: 26px; font-family: 'Patrick Hand', cursive; }
.how-it-works-body p { margin-bottom: 0.8em; }
.how-it-works-body ol, .how-it-works-body ul { margin: 0.5em 0 0.8em 1.5em; }
.how-it-works-body strong { color: #2d5a3d; }

/* === Page titles === */
.page-title {
    font-size: 28px;
    color: #2d5a3d;
    margin-bottom: 4px;
}
.page-subtitle {
    font-size: 14px;
    color: #6a8a5a;
    margin-bottom: 24px;
}

/* === Responsive === */
@media (max-width: 600px) {
    .site-header {
        flex-direction: column;
        height: auto;
        padding: 12px 16px;
        gap: 8px;
    }
    .site-nav { gap: 16px; }
    .content-wrap { padding: 16px 12px; }
}

/* === Activity Dashboard === */
.activity-summary {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 16px;
    background: #fffdf7;
    border: 1px solid #e0d8c8;
    border-radius: 8px;
}
.activity-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}
.stat-value {
    font-family: 'Patrick Hand', cursive;
    font-size: 24px;
    color: #2d5a3d;
}
.stat-label {
    font-size: 12px;
    color: #6a8a5a;
}

.activity-timeline {
    margin-bottom: 24px;
}
.activity-timeline h2 {
    font-size: 18px;
    color: #2d5a3d;
    margin-bottom: 12px;
}
.activity-timeline svg {
    width: 100%;
    background: #fffdf7;
    border: 1px solid #e0d8c8;
    border-radius: 8px;
}

.activity-log h2 {
    font-size: 18px;
    color: #2d5a3d;
    margin-bottom: 12px;
}
.activity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.activity-table th {
    text-align: left;
    padding: 8px 10px;
    background: #e4f0d8;
    color: #2d5a3d;
    font-weight: 600;
    border-bottom: 2px solid #c8e6a0;
}
.activity-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e8e0d0;
    vertical-align: top;
}
.activity-table tr:hover {
    background: #faf6ee;
}
.log-time {
    font-family: 'Patrick Hand', cursive;
    white-space: nowrap;
    color: #8a7a5a;
}
.log-summary {
    color: #4a5a3a;
    line-height: 1.5;
}
.chicken-tag {
    display: inline-block;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    margin: 1px 2px;
    font-weight: 600;
}
.chicken-chicken-1 { background: #fde8a0; color: #7a5a00; }
.chicken-chicken-2 { background: #e0d4f0; color: #5a3a7a; }
.chicken-chicken-3 { background: #d0d0d0; color: #3a3a3a; }
.chicken-chicken-4 { background: #c0c0c0; color: #2a2a2a; }

.level-low { color: #6a8a5a; }
.level-moderate { color: #b08a20; }
.level-high { color: #c44a2a; font-weight: 600; }

/* === Benchmark === */
.bench-controls {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.bench-controls label {
    font-weight: 600;
    color: #2d5a3d;
}
.bench-controls select {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    padding: 6px 12px;
    border: 1px solid #c8d8b8;
    border-radius: 6px;
    background: #fffdf7;
    color: #2d3b2d;
}

.bench-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.bench-table th {
    text-align: left;
    padding: 8px 8px;
    background: #e4f0d8;
    color: #2d5a3d;
    font-weight: 600;
    border-bottom: 2px solid #c8e6a0;
    white-space: nowrap;
    user-select: none;
}
.bench-table th:hover {
    background: #d4e8c4;
}
.bench-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e8e0d0;
    vertical-align: top;
}
.bench-row {
    cursor: pointer;
}
.bench-row:hover {
    background: #faf6ee;
}
.bench-model {
    font-weight: 600;
    color: #2d5a3d;
}

.bench-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}
.badge-green { background: #d4f0c8; color: #2a6a1a; }
.badge-yellow { background: #fef0c8; color: #8a6a1a; }
.badge-red { background: #f0d4c8; color: #8a2a1a; }

.bench-detail {
    background: #fffdf7;
    border: 1px solid #e0d8c8;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(80, 60, 20, 0.06);
}
.bench-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.bench-detail-header h2 {
    font-size: 18px;
    color: #2d5a3d;
}
.bench-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #8a7a5a;
    cursor: pointer;
    padding: 0 4px;
}
.bench-close:hover { color: #2d3b2d; }

.bench-detail-section {
    margin-bottom: 20px;
}
.bench-detail-section h3 {
    font-size: 15px;
    color: #2d5a3d;
    margin-bottom: 10px;
    border-bottom: 1px solid #e0d8c8;
    padding-bottom: 4px;
}
.bench-timeline-scores {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.bench-empty {
    color: #8a7a5a;
    font-style: italic;
    font-size: 14px;
}

.bench-journal-entry {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px dashed #e0d8c8;
}
.bench-journal-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.bench-journal-meta {
    margin-bottom: 8px;
}

.bench-chicken {
    margin-bottom: 12px;
}
.bench-chicken strong {
    color: #2d5a3d;
}
.bench-lastseen {
    font-size: 12px;
    color: #8a7a5a;
    margin-left: 8px;
}
.bench-chicken ul {
    margin: 4px 0 0 20px;
    font-size: 13px;
    color: #4a5a3a;
}
.bench-health {
    font-size: 13px;
    color: #8a5a3a;
    margin-top: 4px;
}

.bench-obs-list {
    margin-left: 20px;
    font-size: 13px;
    color: #4a5a3a;
}
.bench-obs-list li {
    margin-bottom: 6px;
    line-height: 1.5;
}
.bench-obs-list strong {
    color: #8a7a5a;
    font-weight: 600;
}

.page-base .bench-leaderboard {
    overflow-x: auto;
}

.bench-charts {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.bench-chart-container {
    flex: 1 1 340px;
    background: #fffcf5;
    border: 1px solid #e0d8c8;
    border-radius: 10px;
    padding: 16px;
}
.bench-chart-container h3 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #5a4a2a;
}
.bench-chart-container svg {
    width: 100%;
    height: auto;
}
.bench-chart-wide {
    flex-basis: 100%;
    max-width: 760px;
    margin-bottom: 24px;
}
