/**
 * Shared score card styles for showcase pages.
 * Used by compelling-readme, technical-writing, puns.
 * Tier colors are NOT included — each page defines its own
 * (.tier-hi, .tier-good, .tier-mid, .tier-weak, .fill-*)
 * to support dark and light themes.
 */

.score-cards { }
.score-card { padding: 0.6em 0 0.7em; }
.score-card-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 0.15em;
}
.score-card-name {
    font-size: 0.8em; color: var(--fg); font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-right: 0.5em;
}
.score-card-name[title] { cursor: help; }
.score-card-value { font-size: 0.85em; font-weight: 700; flex-shrink: 0; }

.score-card-polarity {
    display: flex; justify-content: space-between;
    font-size: 0.62em; color: var(--dim); margin-bottom: 0.2em;
}

/* Bar with threshold marker */
.score-card-bar {
    position: relative; height: 5px; background: var(--border);
    border-radius: 2px; overflow: visible; margin-bottom: 0.4em;
}
.score-card-fill {
    height: 100%; border-radius: 2px; transition: width 0.4s ease;
    position: relative; z-index: 1;
}
.score-card-threshold {
    position: absolute; top: -2px; bottom: -2px;
    width: 2px; border-radius: 1px; opacity: 0.5; z-index: 2;
}

/* Headroom callout */
.score-card-next {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.75em;
}
.score-card-next-label { font-weight: 600; }
.score-card-conf { color: var(--dim); letter-spacing: -1px; cursor: help; font-size: 0.9em; }

/* Meta row (top-tier, no headroom) */
.score-card-meta {
    display: flex; align-items: center; gap: 0.5em; font-size: 0.75em;
}
.score-card-meta-label { font-weight: 600; }

/* Composite — stands out through visual weight, not tier color.
 * Composite has no tier label, so it never takes tier coloring.
 * .tier-composite / .fill-composite are defined per-page (profile templates,
 * docs concept pages) using the surface's own accent. */
.score-composite {
    padding-top: 1em; margin-top: 0.8em;
}
.score-composite .score-card-name { font-size: 0.9em; }
.score-composite .score-card-value { font-size: 1.1em; }
.score-composite .score-card-bar {
    height: 8px; border-radius: 4px;
}
.score-composite .score-card-fill { border-radius: 4px; }

/* Result header with clear button */
.result-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.6em;
}
.result-title {
    font-size: 0.72em; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--dim);
}
.result-clear {
    background: none; border: none; color: var(--dim);
    font-family: inherit; font-size: 0.72em; cursor: pointer;
    padding: 0.2em 0.4em; transition: color 0.15s;
}
.result-clear:hover { color: var(--fg); }

/* Status messages */
.demo-error { color: var(--red); font-size: 0.85em; }
.demo-spinner { color: var(--dim); font-size: 0.85em; }
@keyframes pulse { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
.dot1, .dot2, .dot3 { animation: pulse 1.4s infinite; }
.dot2 { animation-delay: 0.2s; }
.dot3 { animation-delay: 0.4s; }
