/* ComputeFit — Recommendation UI v0.1.1 (candidate-only stylesheet).
 * Loaded AFTER the checker/context styles; scoped under .cf-recommendation so
 * it never touches existing card/explorer layout. No fixed px widths (hScroll
 * safe), mobile-first, matching the existing cf design tokens.
 *
 * v0.1.1 additions (presentation-only):
 *   - ISSUE 4: duplicate "View measured evidence" CTA removed from the model
 *     cards (the Recommendation card CTA is the single recommendation ->
 *     evidence CTA). The card View button keeps its DOM/data attributes so
 *     existing checker regression (querySelector / click dispatch) is
 *     untouched; it is visually removed here.
 *   - ISSUE 5: Measured Evidence Model control gets visual primacy over the
 *     Artifact source / Quantization / Workload controls (desktop + mobile).
 *   - ISSUE 8: "Read guide →" renders as ONE compact pill (label + arrow in a
 *     single shape, single focus stop). Arrow never gets its own background.
 */
.cf-recommendation {
    display: block;
    margin: 0 0 1.25rem;
    padding: 1rem 1.125rem;
    border: 1px solid var(--cf-line, rgba(128, 128, 128, 0.25));
    border-radius: 10px;
    background: var(--cf-surface, #faf9f6);
    font-size: 0.9375rem;
    line-height: 1.5;
    max-width: 100%;
    box-sizing: border-box;
}
.cf-recommendation__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.35rem;
}
.cf-recommendation__status {
    display: inline-block;
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}
.cf-recommendation__status--recommended {
    color: #fff;
    background: #1f6f43;
}
.cf-recommendation__status--unknown {
    color: #5a5a5a;
    background: rgba(128, 128, 128, 0.14);
}
.cf-recommendation__config {
    font-weight: 600;
    color: var(--cf-ink, #1a1a1a);
}
.cf-recommendation__basis {
    margin: 0.2rem 0 0.5rem;
    color: var(--cf-ink-soft, #444);
}
.cf-recommendation__basis--unknown {
    margin: 0.2rem 0 0.6rem;
}
.cf-recommendation__wl-note {
    margin: 0 0 0.5rem;
    padding: 0.4rem 0.6rem;
    border-left: 3px solid rgba(128, 128, 128, 0.35);
    background: rgba(128, 128, 128, 0.07);
    color: #555;
    font-size: 0.8125rem;
}
.cf-recommendation__why {
    margin: 0.4rem 0 0.6rem;
    padding-left: 1.1rem;
    color: #333;
}
.cf-recommendation__why li {
    margin: 0.1rem 0;
}
.cf-recommendation__evidence {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    margin-top: 0.35rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(128, 128, 128, 0.3);
    color: #555;
    font-size: 0.875rem;
}
.cf-recommendation__view {
    appearance: none;
    border: 1px solid rgba(128, 128, 128, 0.4);
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    cursor: pointer;
}
.cf-recommendation__view:hover {
    border-color: currentColor;
}
.cf-recommendation__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.25rem 0 0.5rem;
}
.cf-recommendation__chip {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(128, 128, 128, 0.1);
    color: #555;
}
.cf-recommendation__confidence {
    margin: 0.4rem 0 0;
    font-size: 0.8125rem;
    color: #666;
}

/* ------------------------------------------------------------------ *
 * ISSUE 4 — single recommendation->evidence CTA.
 * The Recommendation card CTA is the only visible "View measured evidence"
 * control. Model-card View buttons are visually removed (DOM + click paths
 * preserved for regression / keyboard-free test dispatch). The card keeps its
 * guide link (Read guide is a different action — article, not evidence).
 * ------------------------------------------------------------------ */
.cf-fit-card__view-evidence {
    display: none !important;
}

/* ------------------------------------------------------------------ *
 * ISSUE 8 — "Read guide →" as ONE compact pill.
 * Single anchor (already one element in the checker markup); we restyle it so
 * the label and arrow share one shape/background/border/hover/focus. The
 * arrow span never gets its own circular background. Fallbacks mirror the
 * card button pill so the two CTA shapes feel consistent.
 * ------------------------------------------------------------------ */
.cf-fit-card__guide {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    margin: 0 !important;
    padding: 0.35rem 0.85rem !important;
    border: 1px solid var(--color-border, #d8d8d8) !important;
    border-radius: 999px !important;
    background: var(--color-card, #fff) !important;
    color: var(--color-accent, #3b5bfd) !important;
    text-decoration: none !important;
    font-size: 1.0rem !important;
    line-height: 1.3 !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    white-space: nowrap !important;
}
.cf-fit-card__guide:hover {
    background: var(--color-lighter-gray, #f6f6f6) !important;
    text-decoration: none !important;
}
.cf-fit-card__guide:focus-visible {
    outline: 2px solid var(--color-accent, #3b5bfd);
    outline-offset: 2px;
}
.cf-fit-card__guide-label {
    font-weight: 700 !important;
}
.cf-fit-card__guide-arrow {
    font-weight: 700 !important;
    line-height: 1 !important;
}

/* ------------------------------------------------------------------ *
 * ISSUE 5 — Measured Evidence controls: Model is the primary control.
 * Desktop: the Model row grows and the label/select read larger; the three
 * secondary selects (Artifact source / Quantization / Workload) keep their
 * row but sit visually below the model hierarchy (slightly reduced weight).
 * Mobile (<=480px): all controls stack full width; Model never shrinks.
 * ------------------------------------------------------------------ */
.cf-me-explorer__model {
    align-items: center !important;
}
.cf-me-explorer__model-label {
    font-size: 1.05rem !important;
}
.cf-me-explorer__model-select {
    min-width: 260px !important;
    flex: 1 1 auto !important;
    font-size: 1.2rem !important;
    padding: 6px 10px !important;
    max-width: 480px !important;
}
.cf-me-explorer__selectors {
    gap: 8px 14px !important;
}
.cf-me-explorer__selectors .cf-checker__field {
    flex: 0 1 auto !important;
    min-width: 150px !important;
}
.cf-me-explorer__selectors .cf-checker__field > span,
.cf-me-explorer__selectors select {
    font-size: 0.95rem !important;
}

@media (max-width: 480px) {
    .cf-fit-card__guide {
        white-space: nowrap !important;
    }
    .cf-me-explorer__model {
        width: 100% !important;
    }
    .cf-me-explorer__model-select {
        min-width: 0 !important;
        width: 100% !important;
        flex: 1 1 100% !important;
    }
    .cf-me-explorer__selectors,
    .cf-me-explorer__selectors .cf-checker__field {
        flex-basis: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
}

/* ------------------------------------------------------------------ *
 * Context Selector v0.1 — visual parity with the Workload selector
 * (same --wide row, same control height), but the select itself is kept
 * compact (3 options: 32K/64K/128K) so the row does not stretch absurdly
 * on desktop. 375px falls back to the existing full-width stack.
 * ------------------------------------------------------------------ */
[data-cf-context] {
    min-width: 180px !important;
    max-width: 220px !important;
}
@media (max-width: 480px) {
    [data-cf-context] {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}
