/* ==========================================================================
   Cards — Accent-bar tool cards (Layout D)
   ========================================================================== */

/* --- Grid ---------------------------------------------------------------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    padding-bottom: 3rem;
}

/* --- Card ---------------------------------------------------------------- */

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

/* --- Card header: title + badges ----------------------------------------- */

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 0.75rem;
}

.card-top h3 {
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.3;
}

.card-top h3 i {
    color: var(--primary-color);
    font-size: 1.35rem;
    flex-shrink: 0;
}

/* --- Badges -------------------------------------------------------------- */

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

/* --- Description --------------------------------------------------------- */

.card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex: 1;
    line-height: 1.55;
}

/* --- Launch link (dbc.Button with color="link") ------------------------- */

.card-launch.btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-decoration: none;
    align-self: flex-end;
    margin-top: 0.75rem;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
}

.card-launch.btn:hover,
.card-launch.btn:focus {
    color: var(--accent-color);
    text-decoration: none;
    box-shadow: none;
}

/* --- Data-warning badge + note ------------------------------------------- */

.card-data-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 2px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--status-failure) 12%, white);
    color: var(--status-failure);
    border: 1px solid color-mix(in srgb, var(--status-failure) 35%, transparent);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: help;
    white-space: nowrap;
}

.card-data-badge i {
    font-size: 0.75rem;
}

/* Advisory variant: files were skipped but the tool still runs, so it must not
   read as the blocking red badge.  Modifier only — it overrides the three
   colour declarations and inherits the rest, and must stay below the base
   rule, which it ties on specificity (0,1,0). */
.card-data-badge-advisory {
    background: color-mix(in srgb, var(--accent-color) 12%, white);
    /* Not var(--accent-color) itself: #D69E2E on this fill is 2.2:1, and even
       70% of it reaches only 4.2:1.  60% gives 5.3:1, clearing AA at 0.7rem. */
    color: color-mix(in srgb, var(--accent-color) 60%, black);
    border: 1px solid color-mix(in srgb, var(--accent-color) 35%, transparent);
}

/* The visible reason a blocked tool cannot run, under the card footer — the
   badge's tooltip is invisible on a touch screen. */
.card-data-note {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* The html.Code holding the fetch script: smaller, but darker so the path
   stays the thing the eye lands on. */
.card-data-note code {
    font-size: 0.7rem;
    color: var(--text-primary);
}