/* Practice quiz styles */
.practice-main { min-height: 70vh; background: #f7f8fb; }
.practice-hero { background: linear-gradient(135deg, #0f2a4a 0%, #1e3a6a 100%); color: #fff; padding: 72px 0 56px; }
.practice-hero .badge { display:inline-block; background:#ff9a3c; color:#1a1a1a; padding:4px 12px; border-radius:999px; font-size:0.82rem; font-weight:700; letter-spacing:0.02em; }
.practice-hero h1 { font-size: 2.6rem; margin: 14px 0 10px; }
.practice-hero .lede { max-width: 780px; font-size: 1.05rem; opacity: 0.92; line-height: 1.55; }

.practice-section { padding: 48px 20px; }
.practice-section h2 { font-size: 1.6rem; margin: 0 0 18px; color: #152238; }
.hidden { display: none !important; }
.muted { color: #5b6780; }
.eyebrow { display:inline-block; text-transform:uppercase; font-size:0.75rem; letter-spacing:0.08em; color:#6f7a94; font-weight:700; }

.method-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 18px; }
.method-card { background:#fff; border:1px solid #e3e7ef; border-radius:14px; padding:22px 20px; display:flex; flex-direction:column; gap:10px; transition: transform .15s ease, box-shadow .15s ease; }
.method-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(21,34,56,0.08); }
.method-card .icon { font-size: 2rem; }
.method-card h3 { margin:0; font-size:1.2rem; color:#152238; }
.method-card .pool { color:#5b6780; font-size:0.9rem; }
.method-card button { margin-top:auto; align-self:flex-start; }

.quiz-header { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom: 20px; }

.question-card { background:#fff; border:1px solid #e3e7ef; border-radius:14px; padding:22px 24px; margin-bottom:16px; }
.question-card .q-num { font-size:0.82rem; color:#6f7a94; text-transform:uppercase; letter-spacing:0.06em; font-weight:700; }
.question-card .q-text { margin: 6px 0 14px; font-size:1.05rem; color:#152238; line-height:1.5; font-weight:600; }
.choice { display:flex; gap:10px; align-items:flex-start; padding: 11px 14px; border:1.5px solid #dfe3ec; border-radius:10px; margin-bottom:8px; cursor:pointer; transition: background .12s ease, border-color .12s ease; }
.choice:hover { background:#f3f6fc; border-color:#c6d0e2; }
.choice input { margin-top: 3px; accent-color:#1e3a6a; }
.choice.selected { background:#eaf1ff; border-color:#1e3a6a; }
.choice .letter { font-weight:700; color:#1e3a6a; margin-right:6px; }

.quiz-footer { position: sticky; bottom: 0; background: rgba(247,248,251,0.95); backdrop-filter: blur(6px); padding: 16px 0; display:flex; align-items:center; gap:16px; flex-wrap:wrap; border-top:1px solid #e3e7ef; margin-top:10px; }
.progress-track { flex:1 1 300px; height:8px; background:#e3e7ef; border-radius:999px; overflow:hidden; }
.progress-fill { height:100%; background: linear-gradient(90deg,#1e3a6a,#3a9efb); width:0%; transition: width .25s ease; }
.progress-label { color:#5b6780; font-size:0.92rem; min-width: 130px; text-align:right; }

.results-summary { background:#fff; border:1px solid #e3e7ef; border-radius:14px; padding:28px; margin-bottom: 20px; display:grid; grid-template-columns: auto 1fr; gap: 24px; align-items:center; }
.score-circle { width: 140px; height: 140px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-direction:column; color:#fff; font-weight:700; }
.score-circle.pass { background: linear-gradient(135deg,#1a9a5c,#2bb771); }
.score-circle.fail { background: linear-gradient(135deg,#c0392b,#e04a3a); }
.score-circle .pct { font-size: 2.1rem; }
.score-circle .label { font-size: 0.85rem; opacity:0.9; }
.summary-detail h2 { margin:0 0 6px; font-size:1.6rem; }
.summary-detail p { margin:4px 0; color:#43506b; }

.result-item { background:#fff; border:1px solid #e3e7ef; border-radius:14px; padding:20px 22px; margin-bottom:14px; border-left: 5px solid #2bb771; }
.result-item.wrong { border-left-color:#e04a3a; background:#fff7f6; }
.result-item.unanswered { border-left-color:#b58100; background:#fffaf0; }
.result-item .q-head { display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom:6px; }
.result-item .badge-status { font-size:0.78rem; padding:3px 10px; border-radius:999px; font-weight:700; letter-spacing:0.04em; }
.badge-status.ok { background:#dff5e8; color:#0e7a45; }
.badge-status.bad { background:#fcdcd7; color:#a6291b; }
.badge-status.na { background:#fcefcd; color:#7a5800; }
.result-item .q-text { font-weight:600; color:#152238; margin: 4px 0 10px; }
.result-item .choice-row { display:flex; gap:8px; padding:8px 12px; border-radius:8px; margin-bottom:5px; border:1px solid #e3e7ef; }
.result-item .choice-row.is-correct { background:#eaf7ef; border-color:#b7e0c6; }
.result-item .choice-row.is-user-wrong { background:#fce4df; border-color:#f1b5aa; }
.result-item .choice-row .letter { font-weight:700; width:22px; color:#334; }
.result-item .choice-row.is-correct .letter { color:#0e7a45; }
.result-item .choice-row.is-user-wrong .letter { color:#a6291b; }
.explanation { margin-top: 10px; padding: 12px 14px; background:#f3f6fc; border-radius:10px; border-left: 3px solid #1e3a6a; }
.explanation .lbl { font-size:0.78rem; text-transform:uppercase; font-weight:700; letter-spacing:0.06em; color:#1e3a6a; display:block; margin-bottom:4px; }

.results-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top: 12px; }

.loading { padding: 30px; color:#5b6780; text-align:center; }

@media (max-width: 680px) {
  .practice-hero h1 { font-size: 2rem; }
  .results-summary { grid-template-columns: 1fr; text-align:center; }
  .score-circle { margin: 0 auto; }
}

/* Additional styles to match the rendered markup from practice.js */
#practice-quiz { background:#fff; border:1px solid #e4e9f0; border-radius:14px; padding:26px 28px; margin-top:8px; }
.quiz-topbar { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:18px; padding-bottom:14px; border-bottom:1px solid #eef2f8; }
.quiz-topbar h2 { margin:0; font-size:22px; color:#13253f; }
.quiz-progress { font-size:14px; color:#5a6b85; font-weight:600; }

.quiz-body .q-text { font-size:18px; color:#13253f; font-weight:600; line-height:1.45; margin:6px 0 18px; }
.quiz-body .options { display:flex; flex-direction:column; gap:10px; }
.quiz-body .opt {
  display:flex; align-items:flex-start; gap:12px;
  padding:14px 16px; border:1px solid #e4e9f0; border-radius:10px;
  background:#fbfcfe; cursor:pointer; transition:border-color .15s ease, background .15s ease;
  font-size:15px; color:#2a3a56; line-height:1.5;
}
.quiz-body .opt:hover { border-color:#b9d3f1; background:#f3f8fd; }
.quiz-body .opt input[type=radio] { margin-top:3px; flex-shrink:0; }
.quiz-body .opt:has(input:checked) { border-color:#1566c0; background:#eaf3fd; }
.quiz-body .opt.selected { border-color:#1566c0; background:#eaf3fd; }

.quiz-nav {
  display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap;
  margin-top:22px; padding-top:16px; border-top:1px solid #eef2f8;
}
.quiz-nav .btn { min-width:110px; }
#btn-submit { margin-left:auto; background:#159a4e; }
#btn-submit:hover { background:#0d7a3c; }

/* Results rendering from practice.js */
#practice-results { background:#fff; border:1px solid #e4e9f0; border-radius:14px; padding:26px 28px; margin-top:8px; }
#score-card {
  display:flex; align-items:center; gap:24px; flex-wrap:wrap;
  background:#f7f9fc; border-radius:12px; padding:22px 24px; margin-bottom:20px;
}
#score-card .pct { font-size:44px; font-weight:800; color:#1566c0; }
#score-card.pass .pct { color:#159a4e; }
#score-card.fail .pct { color:#dc3545; }
#score-card h3 { margin:0 0 4px; color:#13253f; }
#score-card p { margin:0; color:#5a6b85; }

.review-heading { margin:22px 0 12px; color:#13253f; }
.review-list { display:flex; flex-direction:column; gap:14px; }
.review-item {
  background:#fff; border:1px solid #e4e9f0; border-radius:12px; padding:18px 20px;
  border-left:5px solid #159a4e;
}
.review-item.wrong { border-left-color:#dc3545; }
.review-item .r-status {
  display:inline-block; padding:3px 10px; border-radius:99px; font-size:12px; font-weight:700;
  background:#eefaf2; color:#0d6934; margin-bottom:6px;
}
.review-item.wrong .r-status { background:#fdf0f2; color:#8a1a25; }
.review-item .r-q { font-weight:600; color:#13253f; margin:4px 0 10px; }
.review-item .r-opt { padding:8px 12px; border-radius:8px; margin:4px 0; font-size:14px; background:#f7f9fc; color:#2a3a56; }
.review-item .r-opt.correct { background:#eefaf2; color:#0d6934; font-weight:600; }
.review-item .r-opt.picked-wrong { background:#fdf0f2; color:#8a1a25; }
.review-item .r-explain {
  margin-top:10px; padding:12px 14px; background:#f7f9fc; border-radius:8px;
  border-left:3px solid #1566c0; font-size:15px; line-height:1.55; color:#2a3a56;
}
.review-item .r-explain strong { color:#13253f; }

.results-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:22px; }
.hidden { display:none !important; }

/* ============================================ */
/* PRACTICE QUIZ ENHANCEMENT LAYER (Udacity-inspired) */
/* Purely additive - safe to remove if needed   */
/* ============================================ */

.practice-main { background: linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%); min-height: 100vh; }
.practice-hero { position: relative; overflow: hidden; }
.practice-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(800px 400px at 80% 20%, rgba(249,115,22,0.14), transparent 60%), radial-gradient(700px 380px at 20% 80%, rgba(42,92,142,0.20), transparent 55%); z-index: 0; }
.practice-hero > * { position: relative; z-index: 1; }
.practice-hero h1, .practice-hero .lede { letter-spacing: -0.02em; }
.practice-hero h1 { font-size: clamp(32px, 4vw, 52px); font-weight: 800; line-height: 1.1; }
.lede { font-size: clamp(15px, 1.2vw, 18px); line-height: 1.6; opacity: 0.92; }
.eyebrow { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #f97316; font-weight: 800; }

.method-card { transition: transform 240ms cubic-bezier(.2,.8,.2,1), box-shadow 240ms ease, border-color 240ms ease; border-radius: 16px; cursor: pointer; }
.method-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(15,23,42,0.10); border-color: rgba(249,115,22,0.40); }
.method-card .icon { transition: transform 220ms ease; }
.method-card:hover .icon { transform: scale(1.10) rotate(-4deg); }

.question-card { background: #fff; border-radius: 16px; box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 4px 12px rgba(15,23,42,0.06); padding: 28px; transition: box-shadow 220ms ease; }
.question-card:hover { box-shadow: 0 6px 20px rgba(15,23,42,0.10); }
.q-num { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #5a6b85; font-weight: 800; }
.q-text { font-size: clamp(16px, 1.4vw, 20px); font-weight: 700; color: #0f172a; line-height: 1.4; }

.choice { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid rgba(15,23,42,0.10); border-radius: 12px; margin-top: 10px; cursor: pointer; transition: background 160ms ease, border-color 160ms ease, transform 120ms ease; }
.choice:hover { background: rgba(21,102,192,0.04); border-color: rgba(21,102,192,0.35); transform: translateX(2px); }
.choice.selected { background: rgba(21,102,192,0.08); border-color: #1566c0; box-shadow: 0 0 0 3px rgba(21,102,192,0.12); }
.letter { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; border-radius: 8px; background: #eef3fb; color: #1566c0; font-weight: 800; font-size: 14px; transition: background 160ms ease, color 160ms ease; }
.choice.selected .letter { background: #1566c0; color: #fff; }

.progress-track { background: #e8eef6; border-radius: 100px; overflow: hidden; height: 8px; }
.progress-fill { background: linear-gradient(90deg, #f97316, #fb923c); box-shadow: 0 0 8px rgba(249,115,22,0.4); transition: width 400ms ease; }
.progress-label { font-size: 13px; color: #5a6b85; font-weight: 600; letter-spacing: 0.02em; }

.results-summary { background: #fff; border-radius: 20px; box-shadow: 0 8px 24px rgba(15,23,42,0.08); padding: 32px; }
.score-circle { width: 140px; height: 140px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-direction: column; box-shadow: inset 0 0 0 8px rgba(15,23,42,0.05), 0 6px 18px rgba(15,23,42,0.10); transition: transform 300ms ease; }
.score-circle:hover { transform: scale(1.03); }
.score-circle.pass { background: linear-gradient(135deg, rgba(22,163,74,0.10), rgba(22,163,74,0.04)); }
.score-circle.fail { background: linear-gradient(135deg, rgba(239,68,68,0.10), rgba(239,68,68,0.04)); }
.pct { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; }
.score-circle.pass .pct { color: #16a34a; }
.score-circle.fail .pct { color: #ef4444; }
.label { font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase; font-weight: 700; opacity: 0.75; }

.result-item { transition: transform 200ms ease, box-shadow 200ms ease; border-radius: 12px; }
.result-item:hover { transform: translateX(2px); box-shadow: 0 4px 12px rgba(15,23,42,0.06); }


/* Issue #58: brand-color icons on practice method tiles */
.method-card .icon { color: var(--secondary, #e8821a); }
.method-card .icon svg { stroke: currentColor; }
