:root {
    --cp-bg: #f4f5f7;
    --cp-surface: #ffffff;
    --cp-border: #dfe1e6;
    --cp-text: #172b4d;
    --cp-text-muted: #6b778c;
    --cp-accent: #0052cc;
    --cp-accent-soft: #deebff;
    --cp-pill-bg: #ebecf0;
    --cp-pill-text: #172b4d;
    --cp-warn-bg: #fffae6;
    --cp-warn-border: #ffe380;
    --cp-err-bg: #ffebe6;
    --cp-err-border: #ff8f73;
}

@media (prefers-color-scheme: dark) {
    :root {
        --cp-bg: #1d2125;
        --cp-surface: #22272b;
        --cp-border: #2c333a;
        --cp-text: #dee4ea;
        --cp-text-muted: #8c959f;
        --cp-accent: #579dff;
        --cp-accent-soft: #1c2b41;
        --cp-pill-bg: #2c333a;
        --cp-pill-text: #dee4ea;
        --cp-warn-bg: #2a2617;
        --cp-warn-border: #4a3e1a;
        --cp-err-bg: #342626;
        --cp-err-border: #5a2f2a;
    }
}

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    background: var(--cp-bg);
    color: var(--cp-text);
}

.cp-root {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100%;
}

.cp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 2px;
}

.cp-page-type {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--cp-text-muted);
}

.cp-refresh {
    color: var(--cp-text-muted);
    text-decoration: none;
    font-size: 16px;
    padding: 2px 6px;
    border-radius: 3px;
}
.cp-refresh:hover { background: var(--cp-pill-bg); }

.cp-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cp-card {
    background: var(--cp-surface);
    border: 1px solid var(--cp-border);
    border-radius: 4px;
    padding: 12px;
}

.cp-card__head {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.cp-key {
    color: var(--cp-accent);
    font-weight: 600;
    text-decoration: none;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.cp-key:hover { text-decoration: underline; }

.cp-pill {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 3px;
    background: var(--cp-pill-bg);
    color: var(--cp-pill-text);
}

.cp-summary {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 10px;
}

.cp-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 10px;
    font-size: 12px;
}

.cp-meta dt {
    color: var(--cp-text-muted);
    font-weight: 500;
}

.cp-meta dd {
    color: var(--cp-text);
}

.cp-empty {
    padding: 20px;
    text-align: center;
    color: var(--cp-text-muted);
}

.cp-empty p { margin-bottom: 8px; }

.cp-hint {
    font-size: 12px;
    color: var(--cp-text-muted);
}

.cp-mono {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    word-break: break-all;
}

code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    background: var(--cp-pill-bg);
    padding: 1px 4px;
    border-radius: 2px;
}
