.comments-widget { text-align:left; min-width:0; }
.comments-widget p { margin:0 0 12px; }
.comments-status { color:var(--color-text-secondary); min-height:1.6em; }
.comments-widget button,.comments-widget textarea,.comments-widget select { font:inherit; }
.comments-widget button { border:1px solid var(--color-accent); border-radius:8px; background:var(--color-light-surface); color:var(--color-text-primary); padding:10px 14px; cursor:pointer; }
.comments-widget button:disabled { opacity:.55; cursor:wait; }
.comments-widget :is(button,textarea,select,a):focus-visible { outline:3px solid var(--color-accent); outline-offset:3px; }
.comments-auth,.comment-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:12px 0; }
.comments-auth p { margin:0; }
.comments-form { display:grid; gap:12px; margin:24px 0; }
.comments-form label,.comments-admin label { font-weight:600; }
.comments-form textarea { box-sizing:border-box; width:100%; min-height:130px; resize:vertical; padding:12px; border:1px solid var(--color-accent); border-radius:8px; background:var(--color-light-base); color:var(--color-text-primary); }
.comments-form p,.comment-state { color:var(--color-text-secondary); font-size:14px; }
.comments-form button[type=submit] { justify-self:start; }
.comment { margin:18px 0; padding:16px; border:1px solid var(--color-accent); border-radius:10px; min-width:0; }
.comment-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.comment-meta { font-size:14px; overflow-wrap:anywhere; }
.comment-state { margin:8px 0; }
.comment-replies { margin-left:16px; min-width:0; }
.comments-admin { margin-top:28px; padding-top:20px; border-top:1px solid var(--color-accent); }
.comments-admin select { display:block; max-width:100%; margin:12px 0; }
.comment-block { overflow-wrap:anywhere; margin:12px 0; }
.comment-block button { margin-left:12px; }
@media(max-width:480px) { .comment { padding:12px; } .comment-replies { margin-left:6px; } .comments-widget button { max-width:100%; overflow-wrap:anywhere; } }

.article-discussion[hidden], .article-discussion__header[hidden] { display:none !important; }
.comments-read-only { color:var(--color-text-secondary); }

/* Compact discussion styling; no nested card borders. */
.article-discussion { scroll-margin-top:80px; margin-top:clamp(32px,4vw,56px); padding:clamp(28px,4vw,48px) clamp(16px,4vw,48px); }
.article-discussion__header { margin-bottom:20px; }
.comments-status:empty { display:none; }
.comments-widget button { border-color:var(--color-border, #cbd7cf); transition:transform 160ms ease,background-color 160ms ease,color 160ms ease; touch-action:manipulation; }
.comments-widget .comments-primary,.comments-form button[type=submit] { background:#143528; border-color:#143528; color:#fff; }
.comments-widget button:disabled { cursor:not-allowed; transition:none; transform:none; }
.comments-widget :is(button,textarea,select,input,a):focus-visible { outline:3px solid #527860; outline-offset:3px; }
.comments-auth,.comment-actions { gap:8px; margin:8px 0; }
.comments-form { gap:8px; margin:16px 0 24px; }
.comments-form p { margin:0; }
.comment { margin:0; padding:14px 0; border:0; border-radius:0; }
.comments-list > .comment + .comment,.comments-admin-queue > .comment + .comment { border-top:1px solid var(--color-border, #cbd7cf); }
.comments-widget .comment-meta { margin:0 0 6px; }
.comments-widget .comment-text { margin:0; line-height:1.6; }
.comments-widget .comment-state { margin:6px 0 0; font-size:13px; line-height:1.5; }
.comment-replies { margin:10px 0 0 12px; padding-left:12px; border-left:1px solid var(--color-border, #cbd7cf); }
.comment-replies:empty { display:none; }
.comment-replies .comment { padding:8px 0; }
.comment-danger { display:flex; flex-wrap:wrap; gap:8px; width:100%; padding-top:8px; border-top:1px dashed var(--color-border, #cbd7cf); }
.comment-danger button { color:#823b32; }
.comments-admin { margin-top:24px; padding-top:20px; border-color:var(--color-border, #cbd7cf); }
.comments-admin :is(h3,h4) { margin:0 0 12px; }
.comments-admin-settings,.comments-admin-backups { margin-top:24px; padding-top:20px; border-top:1px solid var(--color-border, #cbd7cf); }
.comments-admin-settings label { display:block; }
.comments-admin-settings input { margin:8px 0 16px; width:20px; height:20px; accent-color:#143528; }
.comments-admin-settings select { box-sizing:border-box; width:100%; padding:10px; color:var(--color-text-primary); background:var(--color-light-base); border:1px solid var(--color-border, #cbd7cf); border-radius:6px; }
.comments-admin-backups { display:flex; flex-wrap:wrap; gap:10px; }
.comments-admin-backups h3 { width:100%; }
.comments-admin-settings + h4 { margin-top:24px; }
@media(hover:hover) and (pointer:fine) {
 .comments-widget button:not(:disabled):hover { transform:scale(1.02); background:#e0e9e3; color:#143528; }
 .comments-widget .comments-primary:not(:disabled):hover,.comments-form button[type=submit]:not(:disabled):hover { background:#234c3a; color:#fff; }
 .comment-danger button:not(:disabled):hover { background:#f4e9e5; color:#713027; }
}
@media(max-width:480px) {
 .comment { padding:12px 0; }
 .comment-replies { margin-left:6px; padding-left:8px; }
 .comment-replies .comment-replies { margin-left:0; padding-left:0; border-left:0; }
 .comments-widget button { min-height:44px; }
}
@media(prefers-reduced-motion:reduce) {
 .comments-widget button,.comments-widget button:not(:disabled):hover { transition:none; transform:none; }
}
.comments-form .comments-confirmation { display:flex; align-items:flex-start; gap:10px; font-weight:400; line-height:1.5; }
.comments-confirmation input { flex:0 0 20px; width:20px; height:20px; margin:3px 0 0; accent-color:#143528; }

.comments-confirmation input:focus-visible{outline:3px solid #527860;outline-offset:3px}
