/* MCQsExam contributor tools: post form check, profiles, badges. Uses the Emerald theme colours. */
.ct-post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ct-post-aside { display: grid; gap: 16px; position: sticky; top: 84px; }
@media (max-width: 991px) { .ct-post-layout { grid-template-columns: 1fr; } .ct-post-aside { position: static; } }
.ct-form .form-label { font-weight: 600; margin-bottom: .3rem; }

.ct-status { border-radius: 10px; font-size: .92rem; min-height: 0; }
.ct-status:empty { display: none; }
.ct-status:not(:empty) { padding: .65rem .85rem; background: var(--brand-50, #ecfdf5); border: 1px solid var(--line, #dfe7e3); }
.ct-status.is-ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.ct-status.is-sim { background: #fffbeb; border-color: #fcd34d; color: #78350f; }
.ct-status.is-dup { background: #fef2f2; border-color: #fca5a5; color: #7f1d1d; }
.ct-confirm { margin-top: .6rem; padding: .6rem .85rem; border: 1px dashed #f59e0b; border-radius: 10px; background: #fffbeb; color: #78350f; }
.ct-confirm label { display: flex; gap: .5rem; align-items: flex-start; cursor: pointer; }
.ct-confirm input { margin-top: .25rem; }
.ct-shake { animation: ct-shake .5s; }
@keyframes ct-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.ct-dup-box { background: rgba(255, 255, 255, .6); border-radius: 8px; padding: .6rem .75rem; }

.ct-matches #ctMatchList { display: grid; gap: 10px; max-height: 60vh; overflow: auto; }
.ct-match { border: 1px solid var(--line, #dfe7e3); border-radius: 10px; padding: .6rem .7rem; font-size: .9rem; }
.ct-match.is-sim { border-color: #fcd34d; background: #fffdf5; }
.ct-match.is-dup { border-color: #fca5a5; background: #fff7f7; }
.ct-match-head { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: .3rem; }
.ct-score { font-weight: 700; font-size: .78rem; padding: 1px 8px; border-radius: 99px; background: var(--brand-50, #ecfdf5); color: var(--brand, #047857); }
.is-sim .ct-score { background: #fef3c7; color: #92400e; }
.is-dup .ct-score { background: #fee2e2; color: #991b1b; }
.ct-tag { font-size: .75rem; padding: 1px 8px; border-radius: 99px; background: #f1f5f4; color: var(--muted, #5b6763); }
.ct-match-q { font-weight: 600; margin-bottom: .25rem; overflow-wrap: anywhere; }
.ct-match-opts { margin: 0 0 .3rem; padding-left: 1.2rem; list-style: upper-alpha; color: var(--muted, #5b6763); font-size: .85rem; }
.ct-match-opts .is-correct { color: #047857; font-weight: 600; }

.ct-progress { height: 8px; border-radius: 99px; background: #e5ece8; overflow: hidden; }
.ct-progress span { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #059669); border-radius: 99px; }
.ct-needed { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ct-needed li { display: flex; flex-direction: column; }

/* Badges */
.ct-badge { display: inline-flex; align-items: center; gap: 3px; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: #f1f5f4; color: #334155; white-space: nowrap; vertical-align: middle; }
.ct-bronze { background: #fdf0e6; color: #8a4b16; }
.ct-silver { background: #eef2f6; color: #475569; }
.ct-gold { background: #fef7d7; color: #8a6100; }
.ct-platinum { background: #e6f6fb; color: #0e6a85; }
.ct-legend { background: linear-gradient(90deg, #fde68a, #a7f3d0); color: #1f2937; }
.ct-starter { background: var(--brand-50, #ecfdf5); color: var(--brand, #047857); }
.ct-verified { color: #1d9bf0; margin-left: 2px; vertical-align: middle; }
.mcq-foot .ct-author { color: inherit; text-decoration: none; }
.mcq-foot .ct-author:hover { text-decoration: underline; }

/* Contributor dashboard / profiles */
.ct-hero { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.ct-hero img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--brand-100, #d1fae5); }
.ct-hero h1, .ct-hero h2 { margin: 0; }
.ct-hero .ct-sub { color: var(--muted, #5b6763); }
.ct-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.ct-stat { border: 1px solid var(--line, #dfe7e3); border-radius: 12px; padding: .75rem .9rem; background: var(--surface, #fff); text-decoration: none; color: inherit; display: block; }
a.ct-stat:hover { border-color: var(--brand-600, #059669); }
.ct-stat strong { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1.1; color: var(--ink, #111c18); }
.ct-stat span { font-size: .82rem; color: var(--muted, #5b6763); }
.ct-stat.is-warn strong { color: #b45309; }
.ct-stat.is-bad strong { color: #b91c1c; }
.ct-stat.is-ok strong { color: #047857; }
.ct-level { display: flex; gap: 14px; align-items: center; }
.ct-level-icon { font-size: 2.2rem; line-height: 1; }
.ct-ladder { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .5rem; }
.ct-ladder span { font-size: .78rem; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line, #dfe7e3); color: var(--muted, #5b6763); }
.ct-ladder span.is-done { background: var(--brand-50, #ecfdf5); color: var(--brand, #047857); border-color: var(--brand-100, #d1fae5); font-weight: 600; }
.ct-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .9rem; }
.ct-check li::before { content: "○ "; color: #f59e0b; }
.ct-socials { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-socials a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line, #dfe7e3); border-radius: 99px; font-size: .85rem; text-decoration: none; color: inherit; }
.ct-socials a:hover { border-color: var(--brand-600, #059669); color: var(--brand, #047857); }
.ct-sublist { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ct-sublist th, .ct-sublist td { padding: .55rem .5rem; border-bottom: 1px solid var(--line, #dfe7e3); vertical-align: top; }
.ct-sublist th { font-size: .76rem; text-transform: uppercase; color: var(--muted, #5b6763); }
.ct-pill { display: inline-block; font-size: .76rem; font-weight: 700; padding: 1px 9px; border-radius: 99px; white-space: nowrap; }
.ct-pill.is-ok { background: #d1fae5; color: #065f46; }
.ct-pill.is-warn { background: #fef3c7; color: #92400e; }
.ct-pill.is-bad { background: #fee2e2; color: #991b1b; }
.ct-pill.is-muted { background: #f1f5f4; color: #5b6763; }
.ct-note { font-size: .85rem; color: #7f1d1d; background: #fef2f2; border-radius: 8px; padding: .35rem .55rem; margin-top: .3rem; }
.ct-top { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ct-top li { display: flex; align-items: center; gap: 10px; }
.ct-top img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.ct-top .n { margin-left: auto; font-weight: 800; color: var(--brand, #047857); white-space: nowrap; }
.ct-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.ct-benefits div { border: 1px solid var(--line, #dfe7e3); border-radius: 12px; padding: .9rem; background: var(--surface, #fff); }
.ct-benefits strong { display: block; margin-bottom: .2rem; }
.ct-benefits small { color: var(--muted, #5b6763); }
.ct-avatar-edit { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ct-avatar-edit img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.ct-input-icon { position: relative; }
.ct-input-icon > i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted, #5b6763); pointer-events: none; }
.ct-input-icon > input { padding-left: 34px; }

html[data-theme="dark"] .ct-match, html[data-theme="dark"] .ct-stat, html[data-theme="dark"] .ct-benefits div { background: var(--surface, #13201b); }
html[data-theme="dark"] .ct-match.is-sim, html[data-theme="dark"] .ct-confirm, html[data-theme="dark"] .ct-status.is-sim { background: #2a2312; color: #fde68a; border-color: #78591a; }
html[data-theme="dark"] .ct-match.is-dup, html[data-theme="dark"] .ct-status.is-dup, html[data-theme="dark"] .ct-note { background: #2a1515; color: #fecaca; border-color: #7f1d1d; }
html[data-theme="dark"] .ct-status.is-ok { background: #0f2a20; color: #a7f3d0; border-color: #1f5a43; }
html[data-theme="dark"] .ct-tag, html[data-theme="dark"] .ct-badge, html[data-theme="dark"] .ct-pill.is-muted { background: #1c2a25; color: #cbd5d1; }
html[data-theme="dark"] .ct-progress { background: #1c2a25; }
html[data-theme="dark"] .ct-dup-box { background: rgba(0, 0, 0, .2); }
