.comments { max-width: 46rem; margin: 48px auto 0; padding-top: 28px; scroll-margin-top: 120px; }
.comments-heading { margin: 0 0 28px; color: var(--ink); font: 600 16px/1.6 var(--font-heading); letter-spacing: .04em; }
.comment-list { margin: 0; padding: 0; list-style: none; }
.comment-body { --comment-avatar: 36px; --comment-gap: 13px; min-width: 0; margin-top: 28px; scroll-margin-top: 110px; }
.comment-list > .comment-body:first-child { margin-top: 0; }
.comment-item { position: relative; min-width: 0; min-height: var(--comment-avatar); padding-left: calc(var(--comment-avatar) + var(--comment-gap)); }
.comment-author .avatar { position: absolute; top: 1px; left: 0; width: var(--comment-avatar); height: var(--comment-avatar); margin: 0; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); object-fit: cover; }
.comment-author-details { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.comment-author .fn, .moment-header strong { color: var(--muted); font: 700 13.6px/1.15 var(--font-ui); overflow-wrap: anywhere; }
.comment-author .fn a { color: inherit; text-decoration: none; }
.comment-author .fn a:hover { color: var(--accent); }
.comment-time, .moment-header time { color: var(--muted); font: 600 12.8px/1.15 var(--font-ui); font-variant-numeric: tabular-nums; text-decoration: none; }
.comment-time:hover { color: var(--accent); }
.comment-content, .moment-body.entry-content { min-width: 0; color: var(--ink); font: 400 14.7px/1.6 var(--font-body); overflow-wrap: anywhere; }
.comment-content { margin-top: 8px; }
.comment-content > :first-child { margin-top: 0; }
.comment-content > :last-child { margin-bottom: 0; }
.comment-content p, .moment-body.entry-content p { margin: 0 0 9px; }
.comment-content a { color: var(--accent); }
.comment-content .comment-parent-link { color: var(--muted); text-decoration: none; }
.comment-content .comment-parent-link:hover { color: var(--accent); }
.comment-reply-prefix { margin-right: .2em; }
.comment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; margin-top: 2px; }
.comment-reply a, .moment-reply, .comment-like { display: inline-flex; align-items: center; justify-content: flex-start; min-width: 44px; min-height: 44px; padding: 0; border: 0; color: var(--muted); background: transparent; font: 12px/1.6 var(--font-ui); text-decoration: none; cursor: pointer; transition: color 160ms ease; }
.comment-like { font-weight: 600; }
.comment-like [data-like-count] { min-width: .6em; text-align: center; font-variant-numeric: tabular-nums; }
.comment-reply a:hover, .moment-reply:hover, .comment-like:hover, .comment-like[aria-pressed="true"] { color: var(--accent); }
.comment-like:disabled { opacity: .55; cursor: wait; }
.comment-awaiting-moderation { color: var(--muted); font: 11px/1.6 var(--font-ui); }
.comment-children { margin: 3px 0 0 49px; padding: 0; border: 0; overflow-anchor: none; }
.comment-children .comment-body { --comment-avatar: 30px; --comment-gap: 11px; margin-top: 20px; }
.comment-children > .comment-list:not([hidden]) { padding-top: 13px; }
.comment-expand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 5px; padding: 0; border: 0; border-radius: 0; color: var(--muted); background: transparent; font: 500 12px/1.7 var(--font-ui); text-decoration: none; cursor: pointer; overflow-anchor: none; transition: color 180ms ease; }
.comment-expand::before { width: 24px; height: 1px; flex-shrink: 0; background: var(--line); content: ""; }
.comment-expand:hover { color: var(--accent); }
.comment-expand[aria-busy="true"] { opacity: .65; cursor: wait; }
.comment-expand[aria-busy="true"]::before { width: 12px; height: 12px; border: 1px solid currentColor; border-left-color: transparent; border-radius: 50%; background: transparent; animation: aurora-load-spin .7s linear infinite; }
.comment-thread-status { display: block; margin-top: 5px; color: var(--muted); font: 11px/1.7 var(--font-ui); }
.comment-thread-status:empty, .comment-action-status:empty { display: none; }
.comment-body:target > .comment-item .fn, .comment-body.is-reply-target > .comment-item .fn { color: var(--accent); }
.respond { min-width: 0; margin-top: 28px; scroll-margin-top: 120px; }
.respond > form { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); transition: border-color 180ms ease; }
.respond:focus-within > form, .respond.is-replying > form { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.comment-body > .respond { margin: 12px 0 20px calc(var(--comment-avatar) + var(--comment-gap)); }
.comment-editor-area { position: relative; min-height: 180px; }
.respond textarea { display: block; box-sizing: border-box; width: 100%; min-width: 0; height: 180px; min-height: 180px; margin: 0; padding: 14px 15px; resize: vertical; border: 0; outline: 0; color: var(--ink); background: transparent; font: 14px/1.8 var(--font-body); }
.respond.is-replying textarea { padding-top: 42px; }
.respond textarea::placeholder { color: var(--muted); opacity: 1; }
.comment-reply-context { position: absolute; z-index: 1; top: 13px; right: 15px; left: 15px; margin: 0; overflow: hidden; color: var(--muted); font: 13px/1.7 var(--font-body); text-overflow: ellipsis; white-space: nowrap; }
.comment-reply-context a { color: var(--accent); text-decoration: none; }
.comment-reply-context a:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.comment-bottom-area { position: relative; }
.comment-bottom-area::before { position: absolute; z-index: 3; top: 0; right: 0; left: 0; height: 1px; background: var(--line); content: ""; pointer-events: none; }
.comment-toolbar { display: flex; align-items: center; gap: 4px; height: 64px; padding: 8px 10px; }
.comment-toolbar-spacer { flex: 1; }
.respond .comment-tool { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; transition: color 160ms ease; }
.comment-tool svg, .comment-emoji-close svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.respond .comment-tool:hover, .respond .comment-tool[aria-expanded="true"] { color: var(--accent); }
.comment-send, .comment-cancel { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; min-width: 68px; height: 40px; margin: 0; padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius); font: 500 13px/1 var(--font-ui); text-decoration: none; cursor: pointer; transition: background 160ms ease, border-color 160ms ease, color 160ms ease; }
.comment-send { color: var(--paper); background: var(--accent); }
.comment-send:hover { background: color-mix(in srgb, var(--ink) 14%, var(--accent)); }
.comment-cancel { margin-left: 6px; border-color: var(--line); color: var(--muted); background: var(--paper); }
.comment-cancel:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); color: var(--ink); }
.comment-session { min-width: 0; max-width: 180px; overflow: hidden; color: var(--muted); font: 11px/1.7 var(--font-ui); text-overflow: ellipsis; white-space: nowrap; }
.comment-profile-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: center; gap: 7px; min-height: 64px; padding: 8px 10px; }
.comment-profile-fields > div { min-width: 0; }
.comment-profile-fields input { display: block; width: 100%; min-width: 0; height: 44px; padding: 7px 8px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: transparent; font: 12px/1.6 var(--font-ui); }
.comment-profile-fields input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.comment-profile-save { min-width: 48px; height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: transparent; font: 12px/1.6 var(--font-ui); cursor: pointer; }
.comment-profile-save:hover { border-color: var(--accent); color: var(--accent); }
.comment-emoji-picker { display: flex; flex-direction: column; min-height: 0; background: var(--paper); }
.comment-emoji-heading { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; height: 44px; padding-left: 15px; }
.comment-emoji-heading [role="tablist"] { display: flex; align-items: center; gap: 12px; }
.comment-emoji-heading [role="tab"] { min-width: 44px; min-height: 44px; padding: 0; border: 0; color: var(--muted); background: transparent; font: 12px/1.6 var(--font-ui); cursor: pointer; }
.comment-emoji-heading [aria-selected="true"] { color: var(--ink); font-weight: 600; }
.comment-emoji-close { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.comment-emoji-status { position: absolute; inset: 66px 12px auto; margin: 0; color: var(--muted); font: 13px/1.7 var(--font-ui); text-align: center; }
.comment-emoji-grid { display: grid; flex: 1; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); grid-auto-rows: 44px; align-content: start; min-height: 0; padding: 0 10px 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.comment-emoji-grid button { display: grid; min-width: 44px; min-height: 44px; padding: 5px; place-items: center; border: 0; border-radius: var(--radius); background: transparent; cursor: pointer; }
.comment-emoji-grid button:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.comment-emoji-grid img { display: block; width: 30px; height: 30px; border: 0; object-fit: contain; }
.comment-note, .comment-action-status { margin: 10px 0 0; color: var(--muted); font: 12px/1.7 var(--font-ui); }
.comment-sr-only, .comment-profile-fields label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.comment-content .comment-emoticon { display: inline-block; width: 24px; height: 24px; margin: 0 2px; vertical-align: middle; border: 0; object-fit: contain; }
.comment-content .comment-sticker { width: 48px; height: 48px; }
/* The textarea and toolbar keep their geometry while their alternatives overlay them. */
[data-comment-enhanced] .comment-bottom-area { height: 64px; }
[data-comment-enhanced] .comment-emoji-picker, [data-comment-enhanced] .comment-profile-fields { position: absolute; z-index: 2; inset: 0; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(4px); transition: opacity 180ms ease, transform 220ms ease, visibility 220ms step-end; }
[data-comment-enhanced] textarea, [data-comment-enhanced] .comment-toolbar, [data-comment-enhanced] .comment-reply-context { transition: opacity 160ms ease, transform 200ms ease, visibility 200ms step-end; }
[data-comment-enhanced].is-emoji-open .comment-emoji-picker, [data-comment-enhanced].is-profile-open .comment-profile-fields { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); transition: opacity 180ms ease, transform 220ms ease, visibility 0ms; }
[data-comment-enhanced].is-emoji-open textarea, [data-comment-enhanced].is-emoji-open .comment-reply-context, [data-comment-enhanced].is-profile-open .comment-toolbar { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-4px); }
[data-comment-enhanced]:not(.is-emoji-open) textarea, [data-comment-enhanced]:not(.is-emoji-open) .comment-reply-context, [data-comment-enhanced]:not(.is-profile-open) .comment-toolbar { transition: opacity 180ms ease, transform 220ms ease, visibility 0ms; }
/* Reveal visitor details from left to right inside the existing toolbar track. */
[data-comment-enhanced] .comment-profile-fields { clip-path: inset(0 100% 0 0); transform: none; transition: clip-path 260ms cubic-bezier(.2, .7, .2, 1), opacity 180ms ease, visibility 260ms step-end; }
[data-comment-enhanced].is-profile-open .comment-profile-fields { clip-path: inset(0); transform: none; transition: clip-path 260ms cubic-bezier(.2, .7, .2, 1), opacity 180ms ease, visibility 0ms; }
[data-comment-enhanced].is-profile-open .comment-toolbar { transform: translateX(4px); }
.comment-toast { position: fixed; z-index: 1100; top: max(24px, env(safe-area-inset-top)); right: max(24px, env(safe-area-inset-right)); display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 32px); padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line)); border-radius: var(--radius); color: var(--ink); background: var(--paper); box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 10%, transparent); font: 13px/1.65 var(--font-ui); opacity: 0; visibility: hidden; transform: translateY(-6px); pointer-events: none; transition: opacity 180ms ease, transform 220ms ease, visibility 220ms step-end; }
.comment-toast svg { flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.comment-toast.is-visible { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity 180ms ease, transform 220ms ease, visibility 0ms; }
.comment-toast[data-tone="error"] svg { stroke: var(--ink); }
.comments [hidden] { display: none; }
.comments a:focus-visible, .comments button:focus-visible, .comments .comment-body:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 700px) {
    .comment-body { --comment-avatar: 32px; --comment-gap: 11px; }
    .comment-children { margin-left: 32px; }
    .comment-children .comment-body { --comment-avatar: 28px; --comment-gap: 10px; }
    .comment-body > .respond { margin-left: 0; }
    .comment-toolbar, [data-comment-enhanced] .comment-bottom-area { height: 60px; }
    .comment-send, .comment-cancel { min-width: 62px; padding-inline: 12px; }
    .comment-cancel { margin-left: 2px; }
    .comment-profile-fields { min-height: 60px; gap: 5px; }
    .comment-profile-fields input { padding-inline: 5px; font-size: 11px; }
    .comment-profile-save { min-width: 44px; padding-inline: 7px; }
    .comment-session { max-width: 80px; }
    .comment-toast { top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); }
}
@media (prefers-reduced-motion: reduce) {
    .comments *, .comments *::before, .comments *::after, .comment-toast { transition: none !important; animation: none !important; }
    [data-comment-enhanced] .comment-emoji-picker, [data-comment-enhanced] .comment-profile-fields, [data-comment-enhanced] textarea, [data-comment-enhanced] .comment-toolbar, [data-comment-enhanced] .comment-reply-context { transform: none !important; }
}
