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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f5f5;
    color: #333;
    padding: 24px;
}

.container { max-width: 900px; margin: 0 auto; }

h1 { font-size: 1.8rem; margin-bottom: 24px; color: #1a1a2e; }

.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-box input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus { border-color: #5b6af0; }

.search-box button {
    padding: 10px 24px;
    background: #5b6af0;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover { background: #4a57d6; }

.hidden { display: none; }

.loader { text-align: center; color: #666; font-style: italic; margin: 16px 0; }

.status {
    padding: 12px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c00;
    margin-bottom: 16px;
}

.summary-box {
    background: #fff;
    border-left: 4px solid #5b6af0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.summary-box > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    color: inherit;
}

.summary-box > summary::before {
    content: '▾';
    font-size: 0.9rem;
    color: #5b6af0;
    transition: transform 0.2s;
}

.summary-box:not([open]) > summary::before { transform: rotate(-90deg); }

.summary-box h2 { font-size: 1rem; margin: 0; color: #5b6af0; display: inline; }

.summary-box p { margin-top: 12px; }

#summary-text { white-space: pre-wrap; line-height: 1.6; font-size: 0.9rem; }

#results-header h2 { font-size: 1rem; color: #666; margin-bottom: 12px; }

.card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: #888;
}

.id { font-weight: 600; color: #333; }
.score { color: #5b6af0; font-weight: 600; }

.tags {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 8px;
}

.desc { margin-bottom: 10px; font-size: 0.9rem; }

details { margin-top: 8px; }

summary {
    cursor: pointer;
    font-size: 0.82rem;
    color: #5b6af0;
    user-select: none;
}

details p {
    margin-top: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #555;
    padding-left: 12px;
}
