/* Unified comments UI — feed cards and post detail. */
:root {
  --comments-surface: #09150f;
  --comments-surface-raised: #0d1d15;
  --comments-border: rgba(142, 190, 164, .16);
  --comments-border-strong: rgba(73, 232, 135, .30);
  --comments-text: #eaf5ee;
  --comments-muted: #82998c;
  --comments-accent: #35f27a;
  --comments-danger: #ff7184;
}

.cc-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.community-comments-panel,
.community-thread {
  color: var(--comments-text);
}

.community-comments-panel {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--comments-border);
  background: rgba(3, 10, 7, .38);
}

.community-thread {
  margin-top: 22px;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--comments-border);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(13, 29, 21, .98), rgba(5, 13, 9, .99));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.community-thread-title {
  margin: 0 !important;
  padding: 18px 22px;
  border-bottom: 1px solid var(--comments-border);
  background: rgba(255, 255, 255, .014);
}

.community-thread-title h2 { margin: 0; font-size: 1rem; }

/* Composer */
.community-page .community-compose {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 16px 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.community-thread > .community-compose { margin: 18px 22px !important; }

.community-compose-avatar {
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 38px !important;
  border-radius: 11px !important;
}

.community-page .community-compose .comment-fields {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--comments-border);
  border-radius: 14px;
  background: var(--comments-surface);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 10px 30px rgba(0, 0, 0, .12);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.community-page .community-compose .comment-fields:focus-within {
  border-color: var(--comments-border-strong);
  box-shadow: 0 0 0 3px rgba(53, 242, 122, .055), 0 12px 32px rgba(0, 0, 0, .16);
}

.community-page .community-compose .cc-textarea {
  display: block;
  width: 100%;
  min-height: 68px;
  max-height: 180px;
  margin: 0;
  padding: 13px 14px 9px;
  resize: vertical;
  border: 0 !important;
  border-radius: 0;
  outline: 0;
  background: transparent !important;
  color: var(--comments-text);
  box-shadow: none !important;
  font: inherit;
  font-size: .82rem;
  line-height: 1.55;
}

.community-page .community-compose .cc-textarea::placeholder { color: #64796d; }

.comment-compose-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 7px 8px 7px 10px;
  border-top: 1px solid rgba(142, 190, 164, .10);
  background: rgba(255, 255, 255, .012);
}

.comment-compose-tools { display: flex; min-width: 0; align-items: center; gap: 7px; }

.community-page .community-compose .compose-icon-btn,
.compose-anonymous-toggle {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 32px !important;
  min-height: 32px !important;
  margin: 0;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: var(--comments-muted) !important;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}

.community-page .community-compose .compose-icon-btn {
  position: relative;
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  padding: 7px !important;
  flex: 0 0 32px !important;
  align-self: center;
  line-height: 0 !important;
}

.community-page .community-compose .compose-icon-btn:hover,
.compose-anonymous-toggle:hover,
.compose-anonymous-toggle:has(input:checked) {
  border-color: rgba(53, 242, 122, .22) !important;
  background: rgba(53, 242, 122, .07) !important;
  color: var(--comments-accent) !important;
}

.compose-anonymous-toggle { gap: 6px; padding: 0 9px; font-size: .64rem; font-weight: 700; }
.compose-anonymous-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.compose-anonymous-icon { display: inline-flex; }

.community-page .community-compose :is(.compose-icon-btn, .compose-anonymous-icon) svg {
  display: block !important;
  width: 15px !important;
  min-width: 15px !important;
  max-width: 15px !important;
  height: 15px !important;
  min-height: 15px !important;
  max-height: 15px !important;
  margin: 0 !important;
  padding: 0 !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle !important;
  pointer-events: none;
}

/* Pin recorder microphones to the exact visual center, independent of SVG baseline rules. */
.community-page [data-record-toggle] .icon-mic {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 15px !important;
  height: 15px !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  transform-origin: center;
}

.community-page [data-record-toggle].is-recording::before {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff7184;
  box-shadow: 0 0 0 3px rgba(255, 113, 132, .12);
  animation: comment-recorder-pulse 1s ease-in-out infinite;
}

@keyframes comment-recorder-pulse {
  50% { opacity: .45; transform: scale(.78); }
}

.community-page .community-compose .comment-submit {
  display: inline-flex !important;
  width: auto !important;
  min-width: 82px !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 15px !important;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  border-radius: 9px !important;
  background: var(--comments-accent) !important;
  color: #031108 !important;
  box-shadow: 0 8px 22px rgba(53, 242, 122, .12);
  font-size: .7rem !important;
  font-weight: 850 !important;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}

.community-page .community-compose .comment-submit:hover { background: #70f4a1 !important; transform: translateY(-1px); }

.community-page .community-compose .anon-name-field {
  display: block;
  width: calc(100% - 20px);
  margin: 0 10px 10px;
  padding: 9px 11px;
  border: 1px solid var(--comments-border-strong);
  border-radius: 9px;
  outline: 0;
  background: #050e0a;
  color: var(--comments-text);
  font-size: .72rem;
}

.community-page .community-compose .anon-name-field[hidden],
.community-page .community-compose [data-record-remove][hidden],
.community-page .community-compose .record-preview[hidden],
.community-page .community-compose .record-status[hidden] { display: none !important; }

.community-page .community-compose .record-status {
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 113, 132, .22);
  border-radius: 8px;
  background: rgba(255, 113, 132, .06);
  color: #ff9aaa;
  font-size: .58rem;
}

.community-page .community-compose .record-preview { width: calc(100% - 20px); height: 36px; margin: 0 10px 10px; }
.community-page .community-compose .compose-remove-recording { color: var(--comments-danger) !important; }

.community-page .community-compose .record-status.is-processing {
  border-color: rgba(117, 207, 255, .25);
  background: rgba(75, 172, 226, .07);
  color: #91d8ff;
}
.community-page .community-compose .record-preview-shell audio.is-enhanced { display:none !important; }

.community-page .cc-reply-form .record-preview-shell {
  width: 100%;
  margin-top: 7px;
}
.community-page .cc-reply-form .record-preview-shell audio.is-enhanced,
.community-page .cc-edit-form .record-preview-shell audio.is-enhanced { display:none !important; }

.community-page .record-preview-play {
  display: inline-grid;
  width:34px;
  height:34px;
  align-items: center;
  place-items:center;
  padding:0;
  border: 1px solid rgba(53, 242, 122, .24);
  border-radius: 8px;
  background: rgba(53, 242, 122, .08);
  color: #a8f4c3;
  font-size: .61rem;
  font-weight: 800;
  cursor: pointer;
}
.community-page .record-preview-play:hover,
.community-page .record-preview-play.is-playing { background: rgba(53, 242, 122, .15); color: #d8ffe6; }
.community-page .record-preview-play:disabled { cursor:wait;opacity:.48; }
.community-page .record-status.is-warning,
.community-page .cc-record-status.is-warning {
  border-color:rgba(245,174,66,.28);
  background:rgba(245,174,66,.07);
  color:#e5c07b;
}
.community-page .record-preview-play svg {
  width: 14px !important;
  height: 14px !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}
.community-page .record-preview-controls {
  display:grid;
  grid-template-columns:34px 34px minmax(90px,1fr) 34px;
  align-items:center;
  gap:7px;
  width:100%;
}
.community-page .record-preview-controls>span {
  color:#9eb3a7;
  font:750 .61rem/1 "DM Sans",sans-serif;
  text-align:center;
  font-variant-numeric:tabular-nums;
}
.community-page .record-preview-controls input[type="range"] {
  width:100%;
  height:5px;
  margin:0;
  accent-color:var(--comments-accent);
  cursor:pointer;
}

/* Comment list and cards */
.community-comment-list { display: flex; flex-direction: column; }
.community-comment-list-detail { padding: 0 22px 18px !important; }

.cc-comment {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px 2px;
  border-bottom: 1px solid rgba(142, 190, 164, .09);
  background: transparent !important;
}

.cc-comment:last-child { border-bottom: 0; }
.cc-avatar { width: 38px; height: 38px; border-radius: 11px; }
.cc-avatar img { border-radius: 11px; }
.cc-body { min-width: 0; flex: 1; }
.cc-header { margin-bottom: 5px; }
.cc-author { font-size: .78rem; }
.cc-time { color: #687d72; font-size: .58rem; }
.cc-text { color: #bdcec4; font-size: .79rem; line-height: 1.62; overflow-wrap: anywhere; }
.cc-text p { margin: 0 0 6px; }
.cc-text p:last-child { margin-bottom: 0; }

.cc-actions {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  padding: 3px;
  border: 1px solid rgba(142, 190, 164, .10);
  border-radius: 11px;
  background: rgba(2, 9, 6, .42);
  opacity: 1;
}
.cc-action-form { display: contents; margin: 0; }

.community-page .cc-btn,
.community-page .cc-icon-action,
.community-page .cc-compose-send {
  box-sizing: border-box !important;
  display: inline-grid !important;
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  flex: 0 0 30px !important;
  padding: 7px !important;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(142, 190, 164, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
  color: #80958a;
}

.community-page .cc-record-btn.cc-icon-action {
  position: relative;
  align-self: center;
  line-height: 0 !important;
}

.community-page :is(.cc-btn, .cc-icon-action, .cc-compose-send) > svg {
  display: block !important;
  width: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;
  height: 14px !important;
  min-height: 14px !important;
  max-height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.community-page .cc-btn:hover { border-color: rgba(53, 242, 122, .28); background: rgba(53, 242, 122, .07); color: var(--comments-accent); }
.community-page .cc-btn-delete:hover { border-color: rgba(255, 113, 132, .30); background: rgba(255, 113, 132, .07); color: var(--comments-danger); }

.community-page .cc-btn-edit { color: #75cfff; }
.community-page .cc-btn-edit:hover,
.community-page .cc-btn-edit:focus-visible {
  border-color: rgba(117, 207, 255, .34);
  background: rgba(75, 172, 226, .11);
  color: #a4ddff;
  box-shadow: 0 0 0 3px rgba(75, 172, 226, .07);
}

.community-page .cc-btn-delete { color: #ff8796; }
.community-page .cc-btn-delete:hover,
.community-page .cc-btn-delete:focus-visible {
  border-color: rgba(255, 113, 132, .36);
  background: rgba(255, 113, 132, .10);
  color: #ffacb7;
  box-shadow: 0 0 0 3px rgba(255, 113, 132, .07);
}

.community-page .cc-btn-reply { color: #7df2a8; }
.community-page .cc-btn-reply:hover,
.community-page .cc-btn-reply:focus-visible {
  border-color: rgba(53, 242, 122, .34);
  background: rgba(53, 242, 122, .10);
  color: #a3f8c2;
  box-shadow: 0 0 0 3px rgba(53, 242, 122, .07);
}

.community-page .cc-btn-private { color: #cf9dff !important; text-decoration: none !important; }
.community-page .cc-btn-private:hover,
.community-page .cc-btn-private:focus-visible {
  border-color: rgba(198, 139, 255, .36);
  background: rgba(157, 91, 221, .11);
  color: #e0bbff !important;
  box-shadow: 0 0 0 3px rgba(157, 91, 221, .07);
}

.community-page :is(.cc-btn-edit, .cc-btn-delete, .cc-btn-reply):focus-visible {
  outline: 0;
}

.cc-is-reply {
  position: relative;
  margin-left: 52px;
  padding-left: 17px;
  border-bottom-color: rgba(142, 190, 164, .06);
}

.cc-is-reply::before {
  content: "";
  position: absolute;
  top: -16px;
  left: -36px;
  width: 38px;
  height: 38px;
  border-left: 2px solid rgba(83, 236, 143, .30);
  border-bottom: 2px solid rgba(83, 236, 143, .30);
  border-bottom-left-radius: 14px;
  filter: drop-shadow(0 0 0 5px rgba(53, 242, 122, .06));
  pointer-events: none;
}

.cc-is-reply::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 0;
  width: 7px;
  height: 7px;
  border: 2px solid #0a1711;
  border-radius: 50%;
  background: var(--comments-accent);
  box-shadow: 0 0 0 3px rgba(53, 242, 122, .10), 0 0 14px rgba(53, 242, 122, .24);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cc-avatar-anon svg { padding: 4px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.cc-avatar-anon .cc-hacker-hood { fill: rgba(53, 242, 122, .08); stroke: rgba(122, 255, 173, .65); }
.cc-avatar-anon .cc-hacker-face { fill: #06110c; stroke: #7df2a8; }
.cc-avatar-anon .cc-hacker-eyes { stroke: #b1ffcd; stroke-width: 1.8; }

.cc-reply-context {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 7px;
  padding: 4px 8px;
  border: 1px solid rgba(53, 242, 122, .11);
  border-radius: 999px;
  background: rgba(53, 242, 122, .045);
  color: #789184;
  font-size: .58rem;
}
.cc-reply-context strong { color: #9be7b6; font-weight: 750; }
.cc-reply-icon { width: 12px; height: 12px; flex: none; color: var(--comments-accent); }
.cc-voice { width: min(100%, 350px); border-radius: 10px; }

.cc-edit-form,
.cc-reply-form {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--comments-border);
  border-radius: 11px;
  background: rgba(255, 255, 255, .018);
}

.cc-edit-form .cc-textarea,
.cc-reply-form .cc-textarea {
  min-height: 68px;
  border-color: var(--comments-border);
  background: #06100c;
}

.community-empty-small { margin: 0; padding: 20px 8px 8px; color: var(--comments-muted); text-align: center; font-size: .72rem; }

.community-comments-closed {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 13px;
  padding: 13px 15px;
  border: 1px solid rgba(245, 174, 66, .22);
  border-radius: 12px;
  color: #d9b777;
  background: linear-gradient(135deg, rgba(245, 174, 66, .09), rgba(255, 255, 255, .015));
}
.community-comments-closed > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.community-comments-closed > div { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.community-comments-closed strong { color: #f2d39a; font-size: .72rem; }
.community-comments-closed span { color: #987f56; font-size: .61rem; line-height: 1.5; }
.community-comments-toggle.is-closed { color: #c69b54; }
.community-comments-toggle.is-closed svg { stroke: currentColor; fill: none; }
.community-status-dot.is-closed { background: #e5a847; box-shadow: 0 0 0 4px rgba(229, 168, 71, .12); }

@media (max-width: 600px) {
  /* A small optical nudge requested for the standalone post body only. */
  .community-detail-page .community-article-content {
    padding-left: 26px;
    padding-right: 14px;
  }
  .community-comments-panel { padding: 12px; }
  .community-thread { border-radius: 15px; }
  .community-thread-title { padding: 15px 16px; }
  .community-thread > .community-compose { margin: 13px !important; }
  .community-comment-list-detail { padding: 0 14px 14px !important; }
  .community-compose-avatar { display: none !important; }
  .community-page .community-compose .comment-fields { border-radius: 12px; }
  .comment-compose-toolbar { align-items: stretch; flex-direction: column; gap: 7px; padding: 8px; }
  .comment-compose-tools { justify-content: space-between; }
  .compose-anonymous-toggle { margin-right: auto; }
  .community-page .community-compose .comment-submit { width: 100% !important; }
  .cc-comment { gap: 9px; padding: 13px 0; }
  .cc-avatar { width: 34px; height: 34px; border-radius: 9px; }
  .cc-avatar img { border-radius: 9px; }
  .cc-header { align-items: flex-start; flex-direction: column; gap: 3px; }
  .cc-is-reply { margin-left: 22px; padding-left: 13px; }
  .cc-is-reply::before { left: -17px; width: 20px; }
  .cc-is-reply::after { left: 3px; }
  .cc-actions { flex-wrap: wrap; padding: 3px; }
  .cc-voice { width: 100%; }
  .cc-voice-player { width: 100%; max-width: 100%; }
}

@media (max-width: 380px) {
  .community-comments-panel { padding-inline: 10px; }
  .community-thread > .community-compose { margin-inline: 10px !important; }
  .community-comment-list-detail { padding-inline: 10px !important; }
  .cc-is-reply { margin-left: 14px; padding-left: 11px; }
  .cc-is-reply::before { left: -10px; width: 13px; }
}

/* Compact send action shared by the feed and the post detail composer. */
.community-page .community-compose .comment-submit,
.community-page .community-compose .comment-submit:hover {
  display: grid !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 9px !important;
  flex: 0 0 38px !important;
  place-items: center !important;
  border-radius: 11px !important;
}
.community-page .community-compose .comment-submit > svg {
  display: block !important;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  margin: 0 !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
@media (max-width: 600px) {
  .community-page .community-compose .comment-submit,
  .community-page .community-compose .comment-submit:hover {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    margin-left: auto !important;
  }
}


/* Reply thread refinement: quiet rail, clear hierarchy, and aligned actions. */
.community-thread .cc-comment{position:relative}

/* v20260930commentajax1: in-place comment action feedback. */
.cc-comment.is-just-added,.cc-comment.is-just-updated{
  animation:cc-ajax-highlight 1.15s ease both;
}
@keyframes cc-ajax-highlight{
  0%{background:rgba(49,233,129,.2);box-shadow:0 0 0 1px rgba(49,233,129,.42)}
  100%{background:transparent;box-shadow:0 0 0 1px transparent}
}
@media(prefers-reduced-motion:reduce){
  .cc-comment.is-just-added,.cc-comment.is-just-updated{animation:none}
}
.community-thread .cc-is-reply{margin-left:54px;padding-left:18px;border-bottom-color:rgba(142,190,164,.055)}
.community-thread .cc-is-reply::before{top:-18px;left:-37px;width:29px;height:49px;border-left:1px solid rgba(104,205,145,.38);border-bottom:1px solid rgba(104,205,145,.38);border-bottom-left-radius:16px;filter:drop-shadow(0 0 5px rgba(53,242,122,.08));}
.community-thread .cc-is-reply::after{top:31px;left:-8px;width:6px;height:6px;border:1px solid #173c28;background:#35f27a;box-shadow:0 0 0 3px rgba(53,242,122,.08),0 0 10px rgba(53,242,122,.18)}
.community-thread .cc-reply-context{margin:1px 0 8px;padding:5px 9px;border-color:rgba(53,242,122,.14);background:rgba(53,242,122,.035);color:#71877b;font-size:.59rem}
.community-thread .cc-reply-context .cc-reply-icon{width:11px;height:11px;opacity:.9}
.community-thread .cc-actions{display:flex;width:100%;justify-content:flex-end;gap:6px;margin-top:11px;padding:8px 0 0;border:0;border-top:1px solid rgba(142,190,164,.08);border-radius:0;background:transparent}
.community-thread .cc-actions .cc-btn{width:32px!important;min-width:32px!important;max-width:32px!important;height:30px!important;min-height:30px!important;max-height:30px!important;flex-basis:32px!important;padding:7px!important;border-color:rgba(142,190,164,.13);border-radius:8px;background:rgba(255,255,255,.025)}
.community-thread .cc-actions .cc-btn-reply{margin-left:2px}
.community-thread .cc-actions .cc-btn:focus-visible{outline:2px solid rgba(53,242,122,.58);outline-offset:2px}
.community-thread .cc-actions .cc-btn-private{border-color:rgba(198,139,255,.16)}
@media(max-width:600px){
 .community-thread .cc-is-reply{margin-left:28px;padding-left:14px}
 .community-thread .cc-is-reply::before{left:-20px;width:15px;height:43px}
 .community-thread .cc-is-reply::after{left:-6px;top:27px;width:5px;height:5px}
 .community-thread .cc-actions{padding-top:7px}
 .community-thread .cc-actions .cc-btn{width:34px!important;min-width:34px!important;max-width:34px!important;height:32px!important;min-height:32px!important;max-height:32px!important;flex-basis:34px!important}
}
@media(max-width:380px){.community-thread .cc-is-reply{margin-left:21px;padding-left:12px}.community-thread .cc-is-reply::before{left:-14px;width:10px}}
