/* Stage 3 / Week 3 group organogram — shared by dashboard.html (Contestants tab) and contestants.html (public Week 3 Qualifiers page) */
.org-chart { --org-line: #c7d4ea; --org-blue: var(--primary, #0b4ea2); }
.org-root { max-width: 420px; margin: 0 auto; text-align: center; background: linear-gradient(135deg, #0b4ea2, #1a7bd2); color: #fff; border-radius: 18px; padding: 18px 20px; box-shadow: 0 10px 24px rgba(11,78,162,.18); position: relative; }
.org-root-title { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.org-root-meta { font-size: .8rem; opacity: .8; }
.org-spine { width: 2px; height: 28px; background: var(--org-line); margin: 0 auto; }
.org-bus { border-top: 2px solid var(--org-line); margin: 0 auto 0; height: 0; width: 70%; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 28px 22px; padding-top: 22px; }
@media (max-width: 575.98px) { .org-grid { grid-template-columns: 1fr; gap: 22px; } .org-bus { width: 0; } }
.org-tree { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 18px 12px 16px; position: relative; }
.org-tree::before { content: ''; position: absolute; top: -22px; left: 50%; height: 22px; border-left: 2px solid var(--org-line); }
.org-tree.is-mine { border-color: var(--org-blue); box-shadow: 0 0 0 3px rgba(11,78,162,.18); }
.org-group-wrap { position: relative; padding-bottom: 18px; text-align: center; }
.org-group-wrap::after { content: ''; position: absolute; bottom: 0; left: 50%; height: 18px; border-left: 2px solid var(--org-line); }
.org-group-node { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-width: 170px; padding: 12px 18px; border-radius: 14px; background: #f1f6ff; border: 2px solid var(--org-blue); }
/* Top 11 (Stage 4 finalists) = green, the rest = light red */
.is-qualified .org-group-node { background: #e9f9ef; border-color: #16a34a; }
.is-qualified .org-rank { background: #16a34a; color: #fff; }
.is-qualified .org-score strong { color: #15803d; }
.is-qualified .org-status { background: #16a34a; color: #fff; }
.not-qualified .org-group-node { background: #fdeeee; border-color: #f1a7a7; }
.not-qualified .org-rank { background: #f08a8a; color: #fff; }
.not-qualified .org-score strong { color: #b42318; }
.not-qualified .org-status { background: #fbd5d5; color: #9b1c1c; }
.org-status { font-size: .66rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; letter-spacing: .02em; }
.org-legend { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: #475569; }
.org-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.org-group-name { font-weight: 800; color: #0f172a; font-size: 1.05rem; }
.org-yours { font-size: .62rem; vertical-align: middle; }
.org-score strong { font-size: 1.35rem; color: var(--org-blue); line-height: 1; }
.org-score span { font-size: .75rem; color: #64748b; margin-left: 2px; }
.org-score em { font-size: .78rem; color: #94a3b8; font-style: normal; }
.org-rank { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--org-blue); color: #fff; }
.org-rank svg { width: 12px; height: 12px; }
.org-rank-none { background: #e2e8f0; color: #64748b; }
.org-children { display: flex; justify-content: center; }
.org-child { flex: 1 1 0; min-width: 0; position: relative; padding: 18px 4px 0; text-align: center; }
.org-child::before { content: ''; position: absolute; top: 0; left: 50%; height: 18px; border-left: 2px solid var(--org-line); }
.org-child::after { content: ''; position: absolute; top: 0; left: 0; right: 0; border-top: 2px solid var(--org-line); }
.org-child:first-child::after { left: 50%; }
.org-child:last-child::after { right: 50%; }
.org-child:only-child::after { display: none; }
.org-member { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 12px; border: 1px solid #e2e8f0; background: #fff; height: 100%; }
.org-member.is-me { border-color: var(--org-blue); background: #f5f9ff; }
.org-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid #e2e8f0; flex-shrink: 0; }
.org-initials { display: inline-flex; align-items: center; justify-content: center; background: var(--org-blue); color: #fff; font-weight: 700; font-size: .85rem; }
.org-member-name { font-size: .78rem; font-weight: 600; color: #0f172a; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.org-you { font-size: .6rem; }
@media (max-width: 380px) { .org-avatar { width: 46px; height: 46px; } .org-member-name { font-size: .72rem; } .org-group-node { min-width: 0; width: 100%; } }

