.student-compose{margin:0 0 18px;padding:18px 20px;border:1px solid #d8e5ef;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(21,62,92,.06)}
.student-compose[hidden],#student-post-form[hidden]{display:none!important}.student-compose-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.student-compose-head h2{margin:0 0 4px;font-size:1.25rem}.student-compose-head p{margin:0;color:#5e7180}.student-new-post,.student-form-actions button,.community-reply-button,.community-reply-form button{border:0;border-radius:9px;background:#0875bd;color:#fff;padding:10px 14px;font-weight:700;cursor:pointer}#student-post-form{margin-top:18px;display:grid;gap:12px}#student-post-form label{display:grid;gap:6px;font-weight:700}#student-post-form input,#student-post-form select,#student-post-form textarea,.community-reply-form textarea{width:100%;box-sizing:border-box;border:1px solid #cbd8e2;border-radius:9px;padding:10px 12px;font:inherit;background:#fff}.student-form-actions{display:flex;gap:10px}.student-form-actions #student-cancel{background:#eef4f8;color:#244b65}.community-replies{border-top:1px solid #e4edf3;margin:12px 20px 0;padding:14px 0 18px}.community-replies h3{font-size:.95rem;margin:0 0 10px}.community-reply{background:#f7fafc;border-radius:10px;padding:10px 12px;margin:8px 0}.community-reply strong{font-size:.86rem;color:#17699e}.community-reply p{margin:4px 0 0}.community-reply-button{margin-top:8px;background:#eef6fb;color:#09679f;border:1px solid #cfe3f0}.community-reply-form{display:grid;gap:8px;margin-top:10px}.community-reply-status,#student-form-status{margin:0;font-size:.9rem;color:#526d7e}@media(max-width:620px){.student-compose-head{align-items:flex-start;flex-direction:column}.student-new-post{width:100%}}
.student-tools{display:flex;justify-content:flex-end;margin:12px 0}.student-tools select{min-height:42px;border:1px solid #cbd8e6;border-radius:12px;padding:0 12px;background:#fff;font-weight:700}

.student-context-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.community-chip-context{background:#eef6ff;color:#174f7c}.student-share{margin-top:10px}@media(max-width:700px){.student-context-grid{grid-template-columns:1fr}}

.community-thread-state{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:14px 0 6px;padding:10px 12px;border-radius:12px;background:#f6f8fb}.thread-resolved,.thread-open,.thread-count{font-size:.8rem;font-weight:800;border-radius:999px;padding:5px 9px}.thread-resolved{background:#e7f7ed;color:#176b3a}.thread-open{background:#fff4d8;color:#785600}.thread-count{background:#eaf2fb;color:#234f77}.thread-related{font-size:.82rem;font-weight:750;margin-left:auto}.community-replies{border-left:3px solid #dbe7f2;padding-left:14px}.community-reply{background:#f8fafc;border-radius:12px;padding:10px 12px;margin:8px 0}

.student-tools{gap:8px;flex-wrap:wrap}.student-tools input{min-height:42px;border:1px solid #cbd8e6;border-radius:12px;padding:0 12px;min-width:180px}.community-resolve-button{margin:8px 0;border:1px solid #8bc5a4;background:#eefaf2;color:#176b3a;border-radius:10px;padding:8px 11px;font-weight:800;cursor:pointer}

/* P4 mobile/readability finish */
@media(max-width:700px){.student-tools{display:grid;grid-template-columns:1fr 1fr;align-items:stretch}.student-tools input{grid-column:1/-1;width:100%;min-width:0}.student-tools select{width:100%;min-width:0}.community-card{padding:14px}.community-card h2{font-size:1.08rem;line-height:1.35}.community-card-meta{gap:6px}.community-chip{font-size:.74rem}.community-thread-state{align-items:flex-start}.thread-related{width:100%;margin-left:0}.community-replies{padding-left:10px}.community-reply{padding:10px}.community-attachment-viewer{max-height:280px}.student-share,.community-resolve-button{min-height:42px}}
@media(max-width:430px){.student-tools{grid-template-columns:1fr}.student-tools input{grid-column:auto}.student-context-grid{grid-template-columns:1fr}.community-thread-state{display:grid;grid-template-columns:auto auto}.thread-related{grid-column:1/-1}}

.student-compose-guidance{margin:4px 0 14px;padding:11px 13px;border-radius:10px;background:#f4f8fc;line-height:1.5}.student-compose-guidance strong{font-weight:800}
