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

:root {
    --claude-primary: #7c3aed;
    --claude-light:   #ede9fe;
    --claude-mid:     #c4b5fd;

    --gemini-primary: #1a73e8;
    --gemini-light:   #dbeafe;
    --gemini-mid:     #93c5fd;

    --codex-primary:  #10a37f;
    --codex-light:    #d1fae5;
    --codex-mid:      #6ee7b7;

    --bg:       #e9eaef;
    --surface:  #f4f5f8;
    --border:   #d8dae3;
    --text:     #1a1a1a;
    --muted:    #6b7280;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Lexend', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    padding: 0.75rem 1.5rem 6rem;
}

.page {
    max-width: 760px;
    margin: 0 auto;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
    margin-bottom: 1.75rem;
    padding-top: 0.5rem;
}

.back-link {
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.12s;
    display: inline-block;
    margin-bottom: 0.5rem;
}
.back-link:hover { color: var(--text); }

.page-title {
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 1.9rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--claude-primary), var(--gemini-primary), var(--codex-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.subtitle {
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--muted);
    margin-top: 0.2rem;
}

/* ── Summary bar ─────────────────────────────────────────── */
.summary-bar {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.9rem 1.4rem;
    margin-bottom: 1.25rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
}

.summary-label {
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.summary-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.summary-divider {
    width: 1px;
    height: 2.2rem;
    background: var(--border);
    margin: 0 1.2rem;
    flex-shrink: 0;
}

/* ── Cards grid ──────────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .cards-grid { grid-template-columns: 1fr; }
}

.agent-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.1rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: box-shadow 0.15s;
}
.agent-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.07); }

/* Card header */
.card-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.agent-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.claude-icon { color: var(--claude-primary); background: var(--claude-light); }
.gemini-icon { color: var(--gemini-primary); background: var(--gemini-light); }
.codex-icon  { color: var(--codex-primary);  background: var(--codex-light);  }

.agent-icon svg { width: 100%; height: 100%; }

.agent-info { flex: 1; }

.agent-name {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
}

.agent-maker {
    font-size: 0.68rem;
    font-weight: 300;
    color: var(--muted);
}

/* Stat row */
.card-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
}

.card-stat {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.62rem;
    font-weight: 400;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Usage bar */
.usage-bar-track {
    height: 4px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.claude-fill { background: var(--claude-primary); }
.gemini-fill { background: var(--gemini-primary); }
.codex-fill  { background: var(--codex-primary);  }

/* ── Activity section ────────────────────────────────────── */
.activity-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.1rem;
    border-bottom: 1px solid var(--border);
}

.activity-title {
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-transform: lowercase;
}

.activity-list {
    max-height: 320px;
    overflow-y: auto;
}

.activity-empty {
    padding: 1.5rem 1.1rem;
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 300;
}

.activity-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
    transition: background 0.1s;
}
.activity-row:last-child { border-bottom: none; }
.activity-row:hover { background: var(--bg); }

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-dot.claude { background: var(--claude-primary); }
.activity-dot.gemini { background: var(--gemini-primary); }
.activity-dot.codex  { background: var(--codex-primary);  }

.activity-agent {
    font-weight: 500;
    width: 52px;
    flex-shrink: 0;
}

.activity-note {
    flex: 1;
    color: var(--muted);
    font-weight: 300;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-tokens {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
    color: var(--muted);
    flex-shrink: 0;
    width: 44px;
    text-align: right;
}

.activity-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
    color: var(--muted);
    flex-shrink: 0;
}
