/* ============================================================================
   MOBILE TOUCH TARGETS (Phase 2). Standalone interactive controls get a >=44px
   hit area on touch screens. In-grid status dots are intentionally left dense.
   ============================================================================ */
@media (max-width: 768px) {
    .pagination-btn,
    .pagination-page,
    .ci-hud-page-btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .failure-modal-close,
    .modal-close,
    .mar-tree-close {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ============================================================================
   COMPONENT PRIMITIVES + VALUE-ACCURATE UTILITIES (design-system foundation)
   Shared building blocks so the ~10 button families / 4 badge vocabularies /
   inline chips converge on one look. Utilities below only encode values that
   exactly match common inline styles, so migrating to them is value-preserving.
   ============================================================================ */
.btn {
    display: inline-flex; align-items: center; gap: var(--space-2);
    padding: var(--space-2) var(--space-4); border: 1px solid var(--card-border);
    border-radius: var(--radius-md); background: var(--bg-elevated);
    color: var(--text-primary); font-size: var(--text-sm); font-weight: var(--fw-medium);
    cursor: pointer; transition: background .15s, border-color .15s; line-height: 1.2;
}
.btn:hover { background: var(--bg-overlay); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--status-fail); border-color: var(--status-fail); color: #fff; }
.btn-icon { padding: var(--space-2); width: 36px; height: 36px; justify-content: center; }

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px var(--space-2); border-radius: var(--radius-sm);
    font-size: var(--text-xs); font-weight: var(--fw-semibold); line-height: 1.4;
}
.badge-pass    { color: var(--status-pass);    background: var(--status-pass-bg); }
.badge-fail    { color: var(--status-fail);    background: var(--status-fail-bg); }
.badge-running { color: var(--status-running); background: var(--status-running-bg); }
.badge-warn    { color: var(--status-warn);    background: var(--status-warn-bg); }

/* Value-accurate layout utilities (each equals a common inline value exactly). */
.u-flex { display: flex; }
.u-flex-center { display: flex; align-items: center; }
.u-gap-1 { gap: var(--space-1); }
.u-gap-2 { gap: var(--space-2); }
.u-gap-3 { gap: var(--space-3); }
.u-mt-1 { margin-top: var(--space-1); }
.u-mt-2 { margin-top: var(--space-2); }
.u-mla { margin-left: auto; }
.u-muted { color: var(--text-muted); }
.u-secondary { color: var(--text-secondary); }
.u-nowrap { white-space: nowrap; }

/* Scoped classes extracted from index.html inline styles (value-exact;
   px values preserved to keep the refactor visually identical). */
.field-inline-label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-secondary); }
.icon-14 { width: 14px; height: 14px; }
.digest-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
#summary-window-select { padding: 5px 26px 5px 10px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 6px; color: var(--text-primary); font-size: 0.82rem; font-weight: 600; cursor: pointer; }
