/* Jump from Hot/Cold to the article's moderated comments. */
.topic-reactions-actions{grid-template-columns:repeat(3,minmax(70px,auto));column-gap:4px}
.topic-reactions-actions::after{display:none}
.topic-reactions-actions .topic-comments-jump{position:relative;display:grid;grid-template-columns:30px minmax(2ch,auto);align-items:center;justify-content:start;gap:6px;min-width:76px;min-height:44px;padding:5px 8px;border:0;border-radius:11px;background:transparent;color:#4e7656;font:inherit;font-weight:700;font-variant-numeric:tabular-nums;line-height:1;text-decoration:none}
.topic-reactions-actions .topic-comments-jump::before{display:none}
.topic-reactions-actions .topic-comments-jump:hover{background:color-mix(in srgb,currentColor 9%,transparent)}
.topic-reactions-actions .topic-comments-jump:focus-visible{outline:3px solid #6888ec;outline-offset:3px}
[data-theme=dark] .topic-reactions-actions .topic-comments-jump{color:#b2d0aa}
.topic-comments{clear:both;scroll-margin-top:calc(var(--home-nav-height,73px) + 20px);margin:28px 0 0;padding:24px;border:1px solid var(--border,#d8e0d5);border-radius:16px;background:var(--surface,#fff)}
.topic-comments h2{display:flex;align-items:center;gap:8px;margin:0 0 12px;font-size:24px}.topic-comments h2 span{font-size:16px;color:var(--text-muted,#67746a)}
.topic-comments .topic-comments-participate{display:grid;gap:14px;margin:0 0 18px;padding:15px;border:1px solid var(--border,#d8e0d5);border-radius:12px;background:var(--green-soft,#eef2e9)}
.topic-comments .topic-comments-participate[hidden],.topic-comments .topic-comments-participate [hidden]{display:none}
.topic-comments .topic-comments-rating{display:grid;gap:5px}
.topic-comments .topic-comments-rating>div{display:flex;flex-wrap:wrap;gap:4px}
.topic-comments .topic-comments-rating button{width:44px;height:44px;padding:0;border:0;border-radius:8px;background:transparent;color:#bd812b;font-size:29px;cursor:pointer}
.topic-comments .topic-comments-rating button[aria-pressed=true]{background:var(--surface,#fff)}
.topic-comments .topic-comments-participate small{display:block;color:var(--text-muted,#67746a);font-size:12px}
.topic-comments [data-topic-comment-new] label{display:block;margin-bottom:7px;font-weight:700}
.topic-comments [data-topic-comment-new] textarea{box-sizing:border-box;width:100%;min-height:96px;padding:10px;border:1px solid var(--border,#d8e0d5);border-radius:9px;background:var(--surface,#fff);color:var(--text,#243329);font:inherit;resize:vertical}
.topic-comments [data-topic-comment-new] button,.topic-comments .topic-comments-login{min-height:44px;margin:9px 0 5px;padding:9px 14px;border:0;border-radius:9px;background:#51684c;color:#fff;font:inherit;font-weight:700;cursor:pointer}
.topic-comments .topic-comments-rating button:focus-visible,.topic-comments [data-topic-comment-new] textarea:focus-visible,.topic-comments [data-topic-comment-new] button:focus-visible,.topic-comments .topic-comments-login:focus-visible{outline:3px solid var(--focus,#6888ec);outline-offset:2px}
.topic-comments [data-topic-comments-note]{margin:0;color:var(--text-muted,#67746a);font-size:14px}
.topic-comments [data-topic-comments-list]{display:grid;gap:14px}.topic-comments [data-topic-comments-list] article{padding:12px;border-radius:10px;background:var(--green-soft,#eef2e9)}
.topic-comments [data-topic-comments-list] article>div{display:flex;align-items:center;gap:8px}.topic-comments [data-topic-comments-list] img{width:36px;height:36px;border-radius:50%}.topic-comments [data-topic-comments-list] time{margin-left:auto;font-size:12px;color:var(--text-muted,#67746a)}
.topic-comments [data-topic-comments-list] p{margin:9px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.topic-comments .topic-comment-pending{display:block;margin-top:8px;color:var(--text-muted,#67746a);font-size:13px}
.topic-comments .topic-comment-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.topic-comments .topic-comment-actions[hidden]{display:none}
.topic-comments .topic-comment-actions button{min-height:44px;padding:6px 12px;border:1px solid var(--border,#d8e0d5);border-radius:8px;background:var(--surface,#fff);color:var(--text,#243329);font:inherit;font-size:14px;cursor:pointer}
.topic-comments .topic-comment-actions button:disabled{opacity:.65;cursor:wait}
.topic-comments .topic-comment-editor,.topic-comments .topic-comment-report{margin-top:10px}
.topic-comments .topic-comment-editor textarea{display:block;box-sizing:border-box;width:100%;min-height:96px;margin-top:4px;padding:8px;border:1px solid var(--border,#d8e0d5);border-radius:8px;background:var(--surface,#fff);color:var(--text,#243329);font:inherit;resize:vertical}
.topic-comments .topic-comment-report select{display:block;box-sizing:border-box;width:100%;min-height:44px;margin-top:4px;padding:6px 9px;border:1px solid var(--border,#d8e0d5);border-radius:8px;background:var(--surface,#fff);color:var(--text,#243329);font:inherit}
.topic-comments .topic-comment-actions button:focus-visible,.topic-comments .topic-comment-editor textarea:focus-visible,.topic-comments .topic-comment-report select:focus-visible{outline:3px solid var(--focus,#6888ec);outline-offset:2px}
.topic-comments .topic-comment-status{margin:10px 0 0;font-size:14px}
.topic-comments-dialog>.topic-comment-status{padding-inline:18px}
.topic-comments .topic-comment-status[data-error]{color:var(--text-muted,#515e54);font-weight:700}
@media(max-width:620px){.topic-comments{padding:18px}}

/* Three recent comments inline; full discussion in a compact dialog. */
.article-layout>.topic-comments{box-sizing:border-box;width:min(var(--article-reading-width,800px),calc(100% - 40px));margin:26px auto}
.topic-comments [data-topic-comments-list] article,.topic-comments [data-topic-comments-dialog-list] article{box-sizing:border-box;width:fit-content;max-width:90%;padding:12px 14px;border-radius:14px 14px 14px 4px;background:var(--green-soft,#eef2e9)}
.topic-comments [data-topic-comments-list] article.topic-comment-own,.topic-comments [data-topic-comments-dialog-list] article.topic-comment-own{justify-self:end;border-radius:14px 14px 4px 14px}
.topic-comments [data-topic-comments-list] article>div,.topic-comments [data-topic-comments-dialog-list] article>div{display:flex;align-items:center;flex-wrap:wrap;gap:7px}
.topic-comments .topic-comment-level{padding:3px 6px;border-radius:6px;background:var(--surface,#fff);color:var(--text-muted,#526055);font-size:11px;font-weight:700;white-space:nowrap}
.topic-comments .topic-comments-more{min-height:44px;margin-top:12px;padding:8px 12px;border:1px solid var(--border,#d8e0d5);border-radius:9px;background:transparent;color:var(--text,#243329);font:inherit;font-weight:700;cursor:pointer}
.topic-comments .topic-comments-more[hidden]{display:none}
.topic-comments-dialog{box-sizing:border-box;width:min(640px,calc(100vw - 24px));max-height:min(82dvh,760px);padding:0;border:1px solid var(--border,#d8e0d5);border-radius:16px;background:var(--surface,#fff);color:var(--text,#243329);box-shadow:0 20px 60px #0006;overflow:auto}
.topic-comments-dialog::backdrop{background:#080e16b8}
.topic-comments-dialog-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--border,#d8e0d5);background:var(--surface,#fff)}
.topic-comments-dialog-head h2{margin:0;font-size:19px}
.topic-comments-dialog-head button{min-width:36px;min-height:36px;border:0;border-radius:8px;background:var(--green-soft,#eef2e9);color:inherit;font-size:23px;cursor:pointer}
.topic-comments [data-topic-comments-dialog-list]{display:grid;gap:12px;padding:18px}
.topic-comments .topic-comment-thread{display:grid;gap:8px;min-width:0}
.topic-comments .topic-comment-replies{display:grid;gap:8px;margin-left:30px;padding-left:14px;border-left:2px solid var(--border,#d8e0d5)}
.topic-comments .topic-comment-replies article{max-width:100%;border-radius:12px 12px 12px 4px}
.topic-comments .topic-comment-replies-more{display:grid;gap:8px}
.topic-comments .topic-comment-replies-more>summary{width:fit-content;padding:7px 0;color:var(--text-muted,#526055);font-size:13px;font-weight:700;cursor:pointer}
.topic-comments .topic-comment-replies-more[open]>summary{margin-bottom:8px}
.topic-comments .topic-comment-replies-more>article+article{margin-top:8px}
.topic-comments .topic-comment-reply-form label{display:block;font-size:13px;font-weight:700}
.topic-comments .topic-comments-more:focus-visible,.topic-comments-dialog-head button:focus-visible{outline:3px solid var(--focus,#6888ec);outline-offset:2px}
@media(max-width:620px){.topic-comments-dialog{width:100vw;max-width:none;max-height:100dvh;height:100dvh;border-radius:0}.topic-comments [data-topic-comments-list] article,.topic-comments [data-topic-comments-dialog-list] article{max-width:100%}.topic-comments .topic-comment-replies{margin-left:12px;padding-left:10px}}

.topic-reactions.has-account-reactions [data-reaction],
.topic-reactions.has-account-reactions [data-reaction-score] { display: none; }
.topic-emoji-picker [role="group"], .topic-comment-reactions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.topic-emoji-picker button, .topic-comment-reactions button, .topic-comment-reactions > span {
  min-height: 44px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit;
}
.topic-comment-reactions > span { min-height: 0; }
.topic-emoji-picker button[aria-pressed="true"], .topic-comment-reactions button[aria-pressed="true"] {
  background: var(--green-soft); border-color: var(--green);
}
.topic-emoji-picker [data-emoji-count] { font-variant-numeric: tabular-nums; color: var(--text-muted); }
.topic-emoji-picker > small { color: var(--text-muted); display: block; margin-top: 8px; }
.topic-emoji-picker > small[hidden] { display: none; }

/* Article discussion lobby: compact entry, responsive slide-in panel. */
.article-layout>.topic-comments{width:min(var(--article-reading-width,800px),calc(100% - 40px));padding:20px 24px;margin:30px auto;border:0;border-top:1px solid var(--border,#d8e0d5);border-radius:0;background:transparent}
.topic-comments>h2{margin:0 0 3px;font-size:21px}
.topic-comments-open{display:inline-flex;align-items:center;gap:8px;min-height:44px;margin-top:10px;padding:10px 17px;border:0;border-radius:999px;background:var(--green,#51684c);color:#fff;font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.topic-comments-open>span:first-child{font-size:19px;line-height:1}
.topic-comments-open:focus-visible{outline:3px solid var(--focus,#6888ec);outline-offset:3px}
.topic-comments-dialog{position:fixed;inset:0 0 0 auto;display:none;flex-direction:column;box-sizing:border-box;width:min(500px,100vw);height:100dvh;max-height:none;max-width:none;margin:0;padding:0;border:0;border-left:1px solid var(--border,#d8e0d5);border-radius:0;background:var(--surface,#fff);color:var(--text,#243329);box-shadow:-16px 0 48px #0005;overflow:hidden}
.topic-comments-dialog[open]{display:flex;animation:topic-lobby-in .36s cubic-bezier(.2,.8,.2,1) both}
.topic-comments-dialog.is-closing{animation:topic-lobby-out .28s ease-in both}
.topic-comments-dialog::backdrop{background:#080e16aa;animation:topic-lobby-backdrop-in .28s ease-out both}
.topic-comments-dialog.is-closing::backdrop{animation:topic-lobby-backdrop-out .28s ease-in both}
@keyframes topic-lobby-in{from{transform:translateX(102%)}to{transform:translateX(0)}}
@keyframes topic-lobby-out{from{transform:translateX(0)}to{transform:translateX(102%)}}
@keyframes topic-lobby-backdrop-in{from{opacity:0}to{opacity:1}}
@keyframes topic-lobby-backdrop-out{from{opacity:1}to{opacity:0}}
.topic-comments-dialog-head{position:relative;flex:none;top:auto;padding:18px 20px 14px}
.topic-comments-dialog-head h2{font-size:19px}
.topic-comments-dialog-head small{display:block;margin-top:3px;color:var(--text-muted,#67746a);font-size:12px}
.topic-comments-dialog-head button{min-width:44px;min-height:44px}
.topic-comments-dialog-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.topic-comments-dialog .topic-comments-participate{margin:14px 18px 0;padding:12px;background:var(--green-soft,#eef2e9)}
.topic-comments-dialog [data-topic-comments-note]{padding:0 18px;margin:15px 0;color:var(--text-muted,#67746a);font-size:13px}
.topic-comments-dialog [data-topic-comments-dialog-list]{gap:16px;padding:4px 18px 24px}
.topic-comments-dialog [data-topic-comments-dialog-list] article{max-width:100%;background:var(--green-soft,#eef2e9)}
.topic-comments-composer{flex:none;padding:12px 18px max(14px,env(safe-area-inset-bottom));border-top:1px solid var(--border,#d8e0d5);background:var(--surface,#fff)}
.topic-comments-composer[hidden]{display:none}
.topic-comments-composer label{display:block;margin-bottom:7px;font-size:13px;font-weight:700}
.topic-comments-composer>div{display:flex;align-items:stretch;gap:8px}
.topic-comments-composer textarea{flex:1;min-width:0;min-height:44px;max-height:130px;padding:10px;border:1px solid var(--border,#d8e0d5);border-radius:9px;background:var(--surface,#fff);color:var(--text,#243329);font:inherit;font-size:16px;resize:vertical}
.topic-comments-composer button{flex:none;min-height:44px;padding:9px 14px;border:0;border-radius:9px;background:var(--green,#51684c);color:#fff;font:inherit;font-weight:700;cursor:pointer}
.topic-comments-composer small{display:block;margin-top:6px;color:var(--text-muted,#67746a);font-size:11px}
.topic-comments-composer :is(textarea,button):focus-visible,.topic-comment-replies-more>summary:focus-visible{outline:3px solid var(--focus,#6888ec);outline-offset:2px}
@media(max-width:620px){.topic-comments-dialog{inset:auto 0 0;width:100vw;height:min(90dvh,780px);max-height:none;border:0;border-top:1px solid var(--border,#d8e0d5);border-radius:18px 18px 0 0}.topic-comments-dialog[open]{animation-name:topic-lobby-up}.topic-comments-dialog.is-closing{animation-name:topic-lobby-down}.topic-comments-dialog-head{padding:14px 16px 11px}.topic-comments-dialog [data-topic-comments-dialog-list]{padding-inline:14px}.topic-comments-composer{padding-inline:14px}}
@keyframes topic-lobby-up{from{transform:translateY(102%)}to{transform:translateY(0)}}
@keyframes topic-lobby-down{from{transform:translateY(0)}to{transform:translateY(102%)}}
@media(prefers-reduced-motion:reduce){.topic-comments-dialog[open],.topic-comments-dialog.is-closing,.topic-comments-dialog::backdrop,.topic-comments-dialog.is-closing::backdrop{animation:none}}

/* Compact icons at the article entry; labelled controls repeat beside comments. */
.topic-reactions-legacy[hidden]{display:none!important}
.article-reaction-dock{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:6px;min-height:46px}
.article-reaction-choices{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.article-comment-button,.article-reaction-choices button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 12px;border:1px solid var(--border,#d8e0d5);border-radius:999px;background:var(--surface,#fff);color:var(--text,#243329);font:inherit;font-size:14px;font-weight:700;cursor:pointer;white-space:nowrap}
.article-reaction-choices button>span:first-child{font-size:20px;line-height:1}
.article-comment-button svg,.article-engagement-bottom .topic-comments-open svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.article-reaction-choices [data-emoji-count],.article-comment-button [data-comment-count]{color:var(--text-muted,#67746a);font-size:12px;font-variant-numeric:tabular-nums}
.article-reaction-choices button:hover,.article-reaction-choices button[aria-pressed=true]{background:var(--green-soft,#eef2e9)}
.article-reaction-choices button.is-reacting{position:relative;overflow:visible}
.article-reaction-choices button.is-reacting>span:first-child{transform-origin:50% 75%}
.article-reaction-choices [data-article-emoji-choice=hot].is-reacting>span:first-child{animation:article-hot-flame .62s cubic-bezier(.2,.8,.25,1)}
.article-reaction-choices [data-article-emoji-choice=cold].is-reacting>span:first-child{animation:article-cold-freeze .62s cubic-bezier(.2,.8,.25,1)}
.article-reaction-choices button.is-reacting::after{position:absolute;z-index:3;left:50%;top:42%;pointer-events:none;font-size:15px;line-height:1;opacity:0}
.article-reaction-choices [data-article-emoji-choice=hot].is-reacting::after{content:'🔥';text-shadow:-12px 7px #ff8a35,12px 5px #ffc35c;animation:article-hot-sparks .62s ease-out}
.article-reaction-choices [data-article-emoji-choice=cold].is-reacting::after{content:'❄';color:#8ed9ff;text-shadow:-12px 6px #d9f5ff,12px 4px #5eb8ed;animation:article-cold-crystals .62s ease-out}
@keyframes article-hot-flame{0%{transform:scale(1)}35%{transform:translateY(-4px) scale(1.35) rotate(-7deg)}65%{transform:translateY(-1px) scale(1.12) rotate(5deg)}100%{transform:none}}
@keyframes article-hot-sparks{0%{opacity:0;transform:translate(-50%,4px) scale(.35)}30%{opacity:1}100%{opacity:0;transform:translate(-50%,-27px) scale(1.05)}}
@keyframes article-cold-freeze{0%{filter:none;transform:scale(1)}35%{filter:drop-shadow(0 0 6px #8ed9ff);transform:scale(1.28) rotate(12deg)}70%{filter:drop-shadow(0 0 3px #d9f5ff);transform:scale(1.08) rotate(-4deg)}100%{filter:none;transform:none}}
@keyframes article-cold-crystals{0%{opacity:0;transform:translate(-50%,0) scale(.3) rotate(0)}35%{opacity:1}100%{opacity:0;transform:translate(-50%,-23px) scale(1.15) rotate(45deg)}}
.article-reaction-dock button:focus-visible{outline:3px solid var(--focus,#6888ec);outline-offset:2px}
.article-reaction-status{position:absolute;top:100%;right:0;z-index:2;width:max-content;max-width:min(360px,90vw);margin:5px 0 0;padding:5px 8px;border-radius:7px;background:var(--surface,#fff);font-size:12px}.article-reaction-status:empty{display:none}.article-reaction-status[data-error]{color:#a82d2d}
.article-reaction-dock-top .article-reaction-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.article-reaction-dock-top .article-reaction-choices button,.article-reaction-dock-top .article-comment-button{position:relative;width:44px;padding:0}
.article-reaction-dock-top :is([data-emoji-count],[data-comment-count]){position:absolute;right:3px;bottom:1px;min-width:14px;padding:1px 3px;border-radius:999px;background:var(--green-soft,#eef2e9);font-size:10px;line-height:1.2;text-align:center}
.article-engagement-bottom{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0 0}
.article-engagement-bottom .topic-comments-open{margin:0;background:var(--green,#51684c)}
.article-engagement-bottom :is(button):focus-visible{outline:3px solid var(--focus,#6888ec);outline-offset:2px}
@media(max-width:620px){.article-reaction-dock{justify-content:center}.article-engagement-bottom{justify-content:center}.article-engagement-bottom .article-reaction-choices{justify-content:center}.article-engagement-bottom .article-reaction-choices button{padding-inline:10px}}
@media(prefers-reduced-motion:reduce){.article-reaction-choices .is-reacting,.article-reaction-choices .is-reacting::after,.article-reaction-choices .is-reacting>span:first-child{animation:none!important}}
.article-layout[data-article-category] .article-layout-section>p.image-credit{position:static;inset:auto;width:auto;max-width:100%;margin:0 0 18px;padding:10px 13px;transform:none;border-radius:9px;background:var(--surface-soft);color:var(--text-muted);font-size:13px;line-height:1.55;overflow-wrap:anywhere}
