/* Double Click Test — Micro-Switch Debounce Lab (Signal Green Accent) */
.dct-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.dct-top h1 { margin: 8px 0 4px; font-size: clamp(1.55rem, 2.5vw, 2.1rem); letter-spacing: -0.03em; }
.dct-top p { margin: 0; color: var(--text-muted); font-size: 0.94rem; max-width: 600px; }
.dct-top-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dct-thresh-opt { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }

.dct-health-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.dct-health-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.16s ease;
}
.dct-health-card.is-fault { border-color: #ef4444; background: rgba(239, 68, 68, 0.05); }
.dct-health-card.is-ok    { border-color: #16a34a; }

.dct-h-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-soft);
}
.dct-status-pill {
    font-style: normal;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
}
.dct-health-card.is-ok .dct-status-pill    { background: rgba(22, 163, 74, 0.16); color: #16a34a; }
.dct-health-card.is-fault .dct-status-pill { background: rgba(239, 68, 68, 0.18); color: #dc2626; }

.dct-h-nums {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.dct-h-nums small { display: block; font-size: 0.72rem; color: var(--text-soft); }
.dct-h-nums strong { font-family: var(--font-mono); font-size: 1.15rem; }

.dct-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.dct-pad-col { display: flex; flex-direction: column; gap: 16px; }

.dct-click-pad {
    min-height: 230px;
    border-radius: 20px;
    border: 2px solid var(--tool-accent);
    background: linear-gradient(160deg, color-mix(in srgb, var(--tool-accent) 10%, var(--bg-elev)), var(--bg-elev));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px;
    cursor: pointer;
    user-select: none;
    box-shadow: var(--shadow-md);
    transition: background-color 0.12s ease, border-color 0.12s ease;
}
.dct-click-pad.is-fault-flash {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.14);
}
.dct-pad-icon { color: var(--tool-accent); margin-bottom: 10px; }
.dct-click-pad.is-fault-flash .dct-pad-icon { color: #ef4444; }
.dct-click-pad strong { font-family: var(--font-mono); font-size: 2.2rem; line-height: 1.1; margin-bottom: 6px; }
.dct-click-pad span { font-size: 0.9rem; color: var(--text-muted); }

.dct-bar-card, .dct-log-panel {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}
.dct-bar-card h2, .dct-log-head h2 {
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-soft);
}
.dct-bar-card h2 { margin-bottom: 10px; }
#dct-bar-canvas {
    width: 100%;
    height: 140px;
    border-radius: 10px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
}

.dct-log-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
#dct-total-faults {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.dct-log-table {
    max-height: 375px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}
.dct-log-empty { color: var(--text-soft); font-family: var(--font-sans); font-size: 0.86rem; }
.dct-log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--bg-subtle);
}
.dct-log-item.is-fault {
    background: rgba(239, 68, 68, 0.14);
    color: #dc2626;
    font-weight: 700;
}
[data-theme="dark"] .dct-log-item.is-fault { color: #fca5a5; }

@media (max-width: 900px) {
    .dct-health-row { grid-template-columns: 1fr; }
    .dct-workspace { grid-template-columns: 1fr; }
}
