.article-comments {
  --comment-canvas: var(--bg);
  --comment-muted: color-mix(in srgb, var(--text-color) 16%, var(--muted));
  --comment-line: color-mix(in srgb, var(--text-color) 15%, transparent);
  --comment-surface: color-mix(in srgb, var(--text-color) 3%, var(--comment-canvas));
  --comment-step: polygon(8px 0, calc(100% - 8px) 0, calc(100% - 8px) 2px, calc(100% - 4px) 2px, calc(100% - 4px) 4px, calc(100% - 2px) 4px, calc(100% - 2px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 2px) calc(100% - 8px), calc(100% - 2px) calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) calc(100% - 2px), calc(100% - 8px) calc(100% - 2px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 2px), 4px calc(100% - 2px), 4px calc(100% - 4px), 2px calc(100% - 4px), 2px calc(100% - 8px), 0 calc(100% - 8px), 0 8px, 2px 8px, 2px 4px, 4px 4px, 4px 2px, 8px 2px);
  margin-top: 48px; padding: 28px 0 0; border-top: 1px solid var(--comment-line); color: var(--text-color);
}
.article-comments [hidden] { display: none !important; }
.comments-heading, .comments-heading-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.comments-heading .eyebrow { margin: 0 0 6px; color: var(--comment-muted); font: 500 11px/1.4 var(--font-pixel); letter-spacing: .1em; }
.comments-heading h2 { margin: 0; font: 600 26px/1.3 var(--font-pixel); }
.comments-count { display: inline-block; padding: 2px 7px; margin-left: 4px; vertical-align: middle; background: var(--comment-surface); color: var(--comment-muted); font: 14px/1.4 var(--font-pixel); }
.comments-intro, .comments-status { color: var(--comment-muted); font: 14px/1.7 var(--font-sans); }
.comments-intro { margin: 10px 0 20px; }
.article-comments button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.comments-refresh, .comments-more, .comment-reply, [data-cancel-reply] { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 4px; background: none; border: none; color: var(--comment-muted); font: 14px/1.4 var(--font-pixel); transition: color .18s ease; }
:is(.comments-refresh,.comments-more,.comment-reply,[data-cancel-reply]):hover { color: var(--text-color); }
.comments-list { margin: 8px 0 0; }
.comment-note { padding: 24px 0; border-top: 1px solid var(--comment-line); overflow-wrap: anywhere; scroll-margin-top: 32px; }
.comment-note:target { background: color-mix(in srgb, var(--blue) 8%, transparent); }
.comment-note-heading { display: flex; align-items: center; gap: 12px; }
.comment-avatar { display: block; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; }
.comment-meta { display: flex; min-width: 0; flex: 1; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font: 14px/1.6 var(--font-sans); }
.comment-author { padding: 0 5px; background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); font: 12px/1.6 var(--font-pixel); }
.comment-meta time { margin-left: auto; color: var(--comment-muted); font-size: 12px; }
.comment-text { margin: 10px 0 6px 48px; white-space: pre-wrap; font: 16px/1.8 var(--font-sans); }
.comment-actions { display: flex; align-items: center; gap: 14px; margin-left: 42px; }
.comment-like, .comment-submit { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 14px; border: 0; clip-path: var(--comment-step); font: 500 14px/1.4 var(--font-pixel); font-variant-numeric: tabular-nums; transition: color .18s ease, background-color .18s ease, translate .15s ease; }
.comment-like { min-width: 64px; color: var(--comment-muted); background: var(--comment-line); }
.comment-like::before, .comment-submit::before { content: ''; position: absolute; z-index: -1; inset: 1px; clip-path: var(--comment-step); pointer-events: none; }
.comment-like::before { background: linear-gradient(color-mix(in srgb, var(--text-color) 5%, var(--comment-canvas)), var(--comment-canvas)); }
.article-comments button svg { flex: 0 0 auto; width: 16px; height: 16px; shape-rendering: crispEdges; }
.comment-like svg { fill: none; stroke: currentColor; stroke-width: 1; stroke-linejoin: miter; }
.comment-like[aria-pressed='true'] { color: var(--blue); background: color-mix(in srgb, var(--blue) 45%, transparent); }
.comment-like[aria-pressed='true']::before { background: color-mix(in srgb, var(--blue) 10%, var(--comment-canvas)); }
.comment-like[aria-pressed='true'] svg { fill: currentColor; }
.comment-actions .comment-like { min-width: 48px; padding: 6px; background: transparent; clip-path: none; }
.comment-actions .comment-like::before { display: none; }
.comment-actions .comment-like:hover { color: var(--blue); }
.comment-reply svg { width: 12px !important; height: 12px !important; fill: currentColor; }
.comment-like:disabled { cursor: wait; opacity: .6; }
.comment-replies { margin: 16px 0 0 48px; padding-left: 16px; border-left: 1px solid var(--comment-line); }
.comment-replies .comment-note { padding: 16px 0 0; border: 0; }
.comment-form { position: relative; min-width: 0; margin: 20px 0 28px; border-radius: 18px; border: 1px solid var(--comment-line); background: var(--comment-surface); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text-color) 4%, transparent), 0 8px 24px rgb(0 0 0 / 10%); transition: border-color .2s ease, box-shadow .2s ease; }
.comment-form:focus-within { border-color: color-mix(in srgb, var(--blue) 40%, var(--comment-line)); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--blue) 8%, transparent), 0 8px 24px rgb(0 0 0 / 10%), 0 0 0 3px color-mix(in srgb, var(--blue) 7%, transparent); }
.comment-identity { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--comment-line); }
.comment-name-field, .comment-email-field { display: flex; align-items: center; min-width: 0; padding: 10px 12px; }
.comment-email-field { border-left: 1px solid var(--comment-line); }
.comment-form input, .comment-form textarea { --radius: 8px; display: block; box-sizing: border-box; width: 100%; min-width: 0; padding: 8px; border: none; border-radius: 8px; background: transparent; color: var(--text-color); font: 16px/1.6 var(--font-sans); }
.comment-form :is(input,textarea)::placeholder { color: var(--comment-muted); opacity: .8; }
.comment-form textarea { --radius: 12px; border-radius: 12px; resize: vertical; min-height: 132px; padding: 18px; }
.comment-form-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 4px 16px 16px; }
.comment-form-footer p, .comment-feedback, .comment-reply-target { margin: 0; color: var(--comment-muted); font: 12px/1.6 var(--font-sans); }
.comment-form-footer p { max-width: 260px; }
.comment-submit { flex-shrink: 0; min-height: 40px; padding: 9px 16px 11px; color: var(--bg); background: color-mix(in srgb, var(--blue) 75%, var(--text-color)); }
.comment-submit::before { inset: 1px 1px 3px; background: linear-gradient(color-mix(in srgb, white 4%, var(--blue)), var(--blue)); box-shadow: inset 0 1px 0 #ffffff35; }
.comment-submit svg { fill: currentColor; }
html[data-scheme='light'] .comment-submit { color: #fff; }
.comment-submit:disabled { opacity: .55; cursor: wait; }
@media (hover: hover) { .comment-like:not(:disabled):hover { color: var(--blue); } .comment-submit:not(:disabled):hover { translate: 0 -1px; } }
:is(.comment-submit,.comment-like):not(:disabled):active { translate: 0 1px; }
.comment-submit:not(:disabled):active::before { inset-block-end: 1px; }
.comment-feedback:not(:empty) { padding: 0 16px 12px; color: var(--text-color); }
.comment-reply-target { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--comment-line); }
.comment-verification { margin: 0 16px; }
.comment-avatar-picker { position: relative; flex: 0 0 36px; margin-right: 6px; }
.comment-avatar-toggle, .comment-avatar-option { display: grid; place-items: center; padding: 0; border: none; background: transparent; }
.comment-avatar-toggle img, .comment-avatar-option img { display: block; border-radius: 50%; }
.comment-avatar-toggle { min-width: 36px; min-height: 36px; transition: translate .18s ease; }
.comment-avatar-toggle:hover { translate: 0 -1px; }
.comment-avatar-options { position: absolute; z-index: 10; left: -4px; top: calc(100% + 12px); display: grid; grid-template-columns: repeat(3, 44px); gap: 10px; padding: 12px; border-radius: 16px; border: 1px solid var(--comment-line); background: var(--bg); box-shadow: 2px 3px 0 color-mix(in srgb, var(--text-color) 12%, transparent); animation: avatar-appear .18s ease-out; }
.comment-avatar-option { --radius: 50%; width: 44px; height: 44px; border-radius: 50%; }
.comment-avatar-option[aria-pressed='true'] { outline: 2px solid var(--blue); outline-offset: 1px; }
.comment-honeypot, .comment-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.article-comments :is(button,input,textarea):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
/* Clipped buttons keep their keyboard focus ring inside the pixel contour. */
.article-comments :is(.comment-like,.comment-submit):focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--blue); }
.article-comments .comment-submit:focus-visible { box-shadow: inset 0 0 0 3px var(--text-color); }
.article-comments :is(.comment-like,.comment-submit):focus-visible::before { outline: 2px solid currentColor; outline-offset: -4px; }
.comment-form :is(input,textarea):focus-visible { outline-offset: -2px; }
.comment-note.is-new { animation: comment-appear .35s ease-out; }
@keyframes comment-appear { from { opacity: 0; translate: 0 5px; } to { opacity: 1; translate: 0 0; } }
@keyframes avatar-appear { from { opacity: 0; translate: 0 -4px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 600px) {
  .article-comments { --comment-canvas: var(--panel); margin-top: 36px; padding: 20px 14px 4px; border-radius: 20px; border: 1px solid var(--comment-line); background: var(--panel); }
  .comments-heading { flex-wrap: wrap; gap: 12px; } .comments-heading-actions { margin-left: auto; gap: 8px; }
  .comments-heading h2 { font-size: 24px; white-space: nowrap; }
  .comment-identity { grid-template-columns: 1fr; }
  .comment-email-field { border-left: 0; border-top: 1px solid var(--comment-line); padding-left: 54px; }
  .comment-form-footer { align-items: flex-end; gap: 8px; }
  .comment-form-footer p { max-width: 190px; font-size: 11px; }
  .comment-submit [data-submit-label] { display: none; }
  .comment-submit { min-width: 44px; min-height: 44px; padding: 10px; }
  .comment-submit svg { width: 18px; height: 18px; }
  .comment-replies { margin-left: 16px; padding-left: 12px; }
  .comment-meta time { flex-basis: 100%; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .comment-note.is-new, .comment-avatar-options { animation: none; }
  .article-comments button, .comment-form { transition: none; }
}

.comment-compose-status {display:flex;justify-content:space-between;gap:12px;padding:0 18px 12px;color:var(--comment-muted);font:12px/1.5 var(--font-sans);font-variant-numeric:tabular-nums;}
.comment-compose-status [data-character-count] {margin-left:auto;white-space:nowrap;}
.comment-recipient {margin:8px 0 0 48px;color:var(--comment-muted);font:12px/1.5 var(--font-sans);}
.comments-updates {display:block;margin:12px auto;padding:10px 18px;border:1px solid var(--comment-line);border-radius:16px;background:var(--comment-surface);color:var(--blue);font:14px/1.5 var(--font-sans);}
.comment-note > .comments-more {margin-left:48px;}
