/* ============================================================
   Double-Elimination Bracket — tool-specific styles on base.css.
   No :root / theme; consumes base tokens only.
   ============================================================ */

.deb-tool { background: var(--bg); transition: background 0.5s; }
.deb-tool .tool-instructions-wrapper { text-align: center; margin-bottom: 24px; }
.deb-tool .tool-section-title {
    font-family: var(--font-head); font-weight: 800;
    font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--text);
    margin: 0 0 12px; letter-spacing: -0.3px;
}
.deb-tool .text-primary-red { color: var(--accent-2); }
.deb-tool .tool-section-texte {
    color: var(--text-muted); font-size: 0.95rem; line-height: 1.7;
    max-width: 720px; margin: 0 auto;
}

.deb-panel {
    background: var(--panel-bg); border: 1px solid var(--panel-border);
    border-radius: var(--radius); box-shadow: var(--shadow-soft);
    padding: 24px; max-width: 640px; margin: 0 auto;
}
.deb-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.deb-textarea {
    width: 100%; box-sizing: border-box; padding: 12px 14px;
    background: var(--card-bg); color: var(--text);
    border: 1.5px solid var(--border-color); border-radius: var(--radius-sm);
    font-family: var(--font-head); font-size: 1rem; font-weight: 500; resize: vertical;
    min-height: 200px;
}
.deb-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(231,76,60,0.15); }
.deb-check { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--text); font-size: 0.9rem; cursor: pointer; }
.deb-check input { accent-color: var(--purple); cursor: pointer; }
.deb-error { color: var(--accent); font-size: 0.9rem; font-weight: 600; margin: 0 0 14px; min-height: 1em; text-align: center; }

/* Output */
.deb-output { max-width: 1100px; margin: 30px auto 0; }
.deb-meta {
    display: flex; gap: 18px; flex-wrap: wrap; justify-content: center;
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); padding: 12px 18px; margin-bottom: 24px;
    color: var(--text-muted); font-size: 0.9rem;
}
.deb-meta strong { color: var(--accent-2); }

.deb-section { margin-bottom: 30px; }
.deb-section-title { color: var(--text); font-size: 1.2rem; font-weight: 800; margin: 0 0 6px; }
.deb-section--losers .deb-section-title { color: var(--accent-2); }
.deb-section--final .deb-section-title { color: var(--purple); }
.deb-section-note { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 14px; }

.deb-scroll { overflow-x: auto; padding-bottom: 8px; }
.deb-rounds { display: flex; gap: 24px; min-width: min-content; }
.deb-round { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; min-width: 160px; }
.deb-round-label {
    font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-muted); text-align: center; margin-bottom: 4px;
}
.deb-match {
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); overflow: hidden;
}
.deb-match--live { border-color: var(--purple); box-shadow: 0 0 0 1px rgba(168,85,247,0.3); }
.deb-slot {
    padding: 10px 12px; color: var(--text); font-size: 0.9rem; font-weight: 600;
}
.deb-slot:first-child { border-bottom: 1px solid var(--border-color); }
.deb-slot em { color: var(--text-muted); font-style: italic; font-weight: 500; }

@media (max-width: 600px) {
    .deb-round { min-width: 140px; }
    .deb-slot { font-size: 0.82rem; }
}

/* --- Interactive states --- */
.deb-slot--click { cursor: pointer; }
.deb-slot--click:hover { background: var(--purple); color: #fff; }
.deb-slot--win { background: rgba(46, 204, 113, 0.16); color: var(--text); font-weight: 800; }
.deb-slot--win::after { content: " ✓"; color: var(--success, #2ecc71); }
.deb-slot--lose { color: var(--text-muted); text-decoration: line-through; opacity: 0.65; }
.deb-match--done { border-color: var(--border-color); }
.deb-champ { color: var(--purple) !important; font-weight: 700; }
.deb-champ strong { color: var(--accent-2); }