/* Feed-style question viewer: one question on the left, learner conversation on the right. */
#question-dialog{width:min(1120px,calc(100vw - 32px));max-height:92dvh;padding:0}
.practice-feed-shell{display:grid;grid-template-columns:minmax(0,1.18fr) minmax(290px,.82fr);gap:0;padding:0;min-height:0}
.practice-feed-main{padding:29px;min-width:0;overflow:auto;max-height:calc(92dvh - 130px)}
.practice-feed-comments{border-left:1px solid #e4ece7;min-width:0;display:flex;flex-direction:column;background:#fbfdfb;min-height:0}
.practice-feed-stats{display:grid;grid-template-columns:repeat(3,1fr);padding:19px 22px;border-bottom:1px solid #e4ece7;background:#f7faf7}
.practice-feed-stats>div{text-align:center}
.practice-feed-stats strong,.practice-feed-stats span{display:block}
.practice-feed-stats strong{font-size:21px;color:#1b5a4c}
.practice-feed-stats span{font-size:10px;color:#7e9088;margin-top:3px}
.practice-feed-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:16px 22px;border-bottom:1px solid #e4ece7}
.practice-like-button{display:inline-flex;align-items:center;gap:6px;color:#6c8178;font-size:13px;font-weight:700}
.practice-like-button svg{color:#84988e}
.practice-like-button.is-liked,.practice-like-button.is-liked svg{color:#c9675b}
.practice-like-button b{font-variant-numeric:tabular-nums}
.practice-solve-button{min-height:36px;padding:8px 12px;font-size:12px}
.practice-comments-pane{position:relative;flex:1;min-height:0;overflow:auto;padding:22px}
.practice-comments-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:14px}
.practice-comments-head h3{margin:0;color:#1d433b;font-size:17px}
.practice-comments-head h3 span{font-size:12px;color:#7d9589;font-weight:600;margin-left:5px}
.practice-comments-head p{margin:5px 0 0;color:#7b8c84;font-size:12px;line-height:1.5}
.practice-comment-list{display:grid;gap:9px}
.practice-comment{padding:12px 14px;border:1px solid #e0e9e3;border-radius:10px;background:#fff}
.practice-comment.is-sample{background:#f8fbf7}
.practice-comment>div{display:flex;align-items:center;gap:7px}
.practice-comment strong{font-size:12px;color:#356457}
.practice-comment time{margin-left:auto;color:#a0aca6;font-size:10px}
.practice-comment p{margin:7px 0 0;color:#536a60;font-size:13px;line-height:1.55;white-space:pre-wrap}
.practice-comment-form{display:grid;gap:8px;margin-top:14px;padding:14px;border-radius:10px;background:#f1f6f2}
.practice-comment-form>label{font-size:12px;font-weight:750;color:#3c6557}
.practice-comment-form textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:62px;border:1px solid #d5e3da;border-radius:8px;padding:10px;font:inherit;color:#20473d;background:#fff}
.practice-comment-form>div{display:flex;align-items:center;justify-content:space-between;gap:10px}
.practice-comment-form small{color:#87978f;font-size:10px;line-height:1.4}
.practice-comment-form .button{white-space:nowrap;padding:9px 13px;font-size:12px}
.practice-comment-status{margin:0;color:#a3674d;font-size:11px}
.practice-comment-status:empty{display:none}
.practice-feed-hint{color:#899a93;font-size:13px;margin:16px 0 0}
.practice-answer-state{display:flex;flex-direction:column;gap:4px;padding:13px 15px;border-radius:10px;margin-top:15px;background:#eef7ed;border-left:3px solid #7ba27e}
.practice-answer-state.error{background:#fff5ef;border-color:#c7826e}
.practice-answer-state strong{font-size:14px;color:#4f7945}
.practice-answer-state.error strong{color:#a16c4c}
.practice-answer-state span{font-size:12px;color:#718078}
.practice-provenance{margin-top:18px}
.practice-explanation-overlay{position:absolute;z-index:5;inset:12px;border:1px solid #c5dcb5;border-radius:13px;padding:18px;background:#f7fcf2;box-shadow:0 20px 45px #123f3a2e}
.practice-overlay-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.practice-overlay-head h3{margin:3px 0 0;color:#1e5146;font-size:20px}
.practice-explanation-overlay>strong{display:block;margin-top:15px;color:#285c4e;font-size:13px}
.practice-explanation-overlay>p{margin:8px 0 0;color:#4d6a5f;font-size:13px;line-height:1.7}
.practice-explanation-overlay>small{display:block;margin-top:12px;color:#80968b;font-size:11px;line-height:1.5}
@media(max-width:760px){
 #question-dialog{width:calc(100vw - 18px);max-height:94dvh}
 .practice-feed-shell{grid-template-columns:1fr}
 .practice-feed-main{padding:22px;max-height:none}
 .practice-feed-comments{border-left:0;border-top:1px solid #e4ece7;max-height:55dvh}
 .practice-comments-pane{padding:18px}
 .practice-feed-actions{padding:13px 18px}
}

/* Full-screen one-question feed viewer */
#question-dialog{inset:0;margin:0;width:100vw;max-width:none;height:100dvh;max-height:none;border:0;border-radius:0;padding:0;background:#f7faf8;overflow:hidden}
#question-dialog::backdrop{background:rgba(22,68,58,.16);backdrop-filter:none}
#question-dialog[open]{display:flex;flex-direction:column}
#question-dialog>.dialog-head{height:66px;min-height:66px;flex:0 0 66px;padding:0 clamp(22px,4vw,64px);background:#fff;border-bottom:1px solid #e2ebe6;position:relative;z-index:2;font-size:14px;color:#315d50}
#question-dialog>.dialog-head .practice-feed-key-hint{margin-left:auto;margin-right:16px;color:#91a39a;font-size:11px;letter-spacing:.1px}
#question-dialog>.dialog-body{flex:1;min-height:0;max-height:none;padding:0;overflow:hidden}
#question-dialog .practice-feed-shell{height:100%;max-width:1280px;margin:0 auto;grid-template-columns:minmax(0,1fr) minmax(320px,380px);background:#fff}
#question-dialog .practice-feed-main{display:flex;flex-direction:column;justify-content:center;padding:clamp(24px,6vh,72px) clamp(24px,4.5vw,76px);overflow:hidden;max-height:none;background:#fff}
#question-dialog .question-meta{flex:0 0 auto}
#question-dialog .question-stem{font-size:clamp(23px,2.2vw,34px);line-height:1.45;margin:26px 0 28px;max-width:900px;letter-spacing:-.7px}
#question-dialog .options{gap:10px;max-width:900px}
#question-dialog .option{min-height:54px;padding:12px 15px;font-size:16px;border-radius:10px}
#question-dialog .practice-feed-hint{margin-top:14px}
#question-dialog .practice-provenance{margin-top:14px}
#question-dialog .practice-feed-comments{height:100%;border-left:1px solid #e1ebe5;overflow:hidden}
#question-dialog .practice-comments-pane{overflow-y:auto;overscroll-behavior:contain}
#question-dialog>.dialog-actions{width:100%;max-width:1280px;height:72px;min-height:72px;flex:0 0 72px;margin:0 auto;padding:14px clamp(22px,4vw,64px);background:#fff;border-top:1px solid #e2ebe6}
@media(max-width:760px){
 #question-dialog>.dialog-head{height:58px;min-height:58px;flex-basis:58px;padding:0 16px}
 #question-dialog>.dialog-head .practice-feed-key-hint{display:none}
 #question-dialog .practice-feed-shell{height:auto;min-height:100%;grid-template-columns:1fr}
 #question-dialog .practice-feed-main{min-height:calc(100dvh - 130px);padding:28px 20px;justify-content:flex-start;overflow:auto}
 #question-dialog .question-stem{font-size:23px;margin:22px 0}
 #question-dialog .practice-feed-comments{height:auto;max-height:52dvh;border-left:0;border-top:1px solid #e1ebe5}
 #question-dialog>.dialog-body{overflow:auto}
 #question-dialog>.dialog-actions{height:auto;min-height:64px;flex-basis:auto;padding:11px 16px;position:sticky;bottom:0}
}

#question-dialog .practice-feed-main{justify-content:flex-start;padding-top:30px;padding-bottom:24px}
#question-dialog .practice-comments-pane{padding:18px}
#question-dialog .practice-comments-head{margin-bottom:10px}
#question-dialog .practice-comment{padding:9px 11px}
#question-dialog .practice-comment p{margin-top:5px;font-size:12px}
#question-dialog .practice-comment-form{margin-top:10px;padding:10px;gap:6px}
#question-dialog .practice-comment-form textarea{min-height:48px;height:52px;resize:none;padding:8px}
#question-dialog .practice-comment-form .button{min-height:34px;padding:7px 11px}
@media(max-width:760px){#question-dialog .practice-feed-main{justify-content:flex-start;padding-top:24px}}
#question-dialog .practice-comment-form{position:sticky;bottom:0;z-index:2;box-shadow:0 -8px 18px rgba(18,63,58,.06)}
