/* Comments under every post (kafka-comments.js). v4, 2026-12-02: a quiet, modern comment section.
   One translucent warm panel with a gold hairline; a header with a count; comments as clean rows with a round
   initial and a hairline between them (no boxes inside the box); one-line composer (name, comment, Send) that
   grows as you write. No red anywhere. The theme's own .comments-box rules are overridden here, so the selectors
   are long on purpose. Folds in the "v2 comment bar" from the site check-up (PR 232). */

html body section.comments-box#comments{--kc-ink:#2b211c;--kc-mute:#7a6f64;--kc-line:rgba(160,128,80,.18);--kc-gold:#c9a24f;--kc-goldtx:#f3d89a;
  margin:18px auto 14px!important;padding:16px 20px 14px!important;border:1px solid rgba(201,162,79,.3)!important;border-top:1px solid rgba(201,162,79,.3)!important;border-radius:16px!important;
  background:linear-gradient(135deg,rgba(253,247,234,.76),rgba(246,239,228,.62))!important;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:0 8px 26px -20px rgba(43,33,28,.4)!important}

/* header: title and a small count */
html body section.comments-box#comments>h2{display:flex!important;align-items:center;justify-content:flex-start!important;gap:8px;margin:0 0 2px!important;padding:0!important;border:0!important;font:600 17px/1.3 Fraunces,Martel,Georgia,serif!important;color:var(--kc-ink)!important;letter-spacing:-.01em}
html body section.comments-box#comments>h2::after,html body section.comments-box#comments>h2::before{display:none!important}
html body section.comments-box#comments>h2 .kc-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:rgba(201,162,79,.16);color:#7a5a1e;font:600 12px/1 Inter,system-ui,sans-serif}
html body section.comments-box#comments>h2 .kc-count:empty{display:none}

/* the list: rows, not boxes */
html body section.comments-box#comments .comments{margin:8px 0 2px!important;padding:0!important;border:0!important;background:none!important}
html body section.comments-box#comments .comments[data-num-comments="0"]{display:none!important}
html body section.comments-box#comments .comments-content,html body section.comments-box#comments #comment-holder,html body section.comments-box#comments .comment-thread{margin:0!important;padding:0!important;border:0!important;background:none!important}
html body section.comments-box#comments ol#top-ra{list-style:none!important;margin:0!important;padding:0!important}
html body section.comments-box#comments li.comment{list-style:none!important;margin:0!important;padding:12px 0!important;border:0!important;border-top:1px solid var(--kc-line)!important;background:none!important}
html body section.comments-box#comments li.comment:first-child{border-top:0!important;padding-top:6px!important}
html body section.comments-box#comments li.comment::before,html body section.comments-box#comments li.comment::marker{content:none!important;display:none!important}
html body section.comments-box#comments .comment-block{display:grid!important;grid-template-columns:34px minmax(0,1fr);column-gap:12px;row-gap:3px;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important}
html body section.comments-box#comments .kc-av{grid-row:1/3;width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:var(--kc-avbg,#e9dfcf);color:var(--kc-avtx,#5c4a33);font:600 14px/1 Inter,Martel,system-ui,sans-serif;box-shadow:inset 0 0 0 1px rgba(43,33,28,.06);user-select:none}
html body section.comments-box#comments .comment-header{grid-column:2;display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 8px;margin:0!important;padding:0!important;border:0!important;line-height:1.3}
html body section.comments-box#comments cite.user,html body section.comments-box#comments cite.user a{font:600 14.5px/1.3 Inter,Martel,system-ui,sans-serif!important;font-style:normal!important;color:var(--kc-ink)!important;text-decoration:none!important}
html body section.comments-box#comments .datetime,html body section.comments-box#comments .datetime a{font:400 12.5px/1.3 Inter,system-ui,sans-serif!important;color:var(--kc-mute)!important;text-decoration:none!important}
html body section.comments-box#comments .comment-content{grid-column:2;margin:0!important;padding:0!important;font:400 15.5px/1.6 Lora,Martel,Georgia,serif!important;color:#3a322b!important;white-space:pre-line;overflow-wrap:anywhere}
html body section.comments-box#comments[data-lang=ne] .comment-content{font-family:Martel,Lora,Georgia,serif!important;line-height:1.75!important}
html body section.comments-box#comments .comment-actions,html body section.comments-box#comments .comment-replies,html body section.comments-box#comments .thread-toggle{display:none!important}
/* a reader's own comment, shown to them while it waits for review */
html body section.comments-box#comments li.kc-wait .comment-block{opacity:.75}
html body section.comments-box#comments .kc-tag{display:inline-flex;align-items:center;gap:5px;font:600 11px/1 Inter,system-ui,sans-serif;letter-spacing:.02em;color:#7a5a1e;background:rgba(201,162,79,.14);border-radius:999px;padding:4px 9px}
html body section.comments-box#comments .kc-tag::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--kc-gold)}
html body section.comments-box#comments li.kc-new{animation:kc-in .35s ease-out}
@keyframes kc-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}

/* the composer */
.comments-box .kc-form{margin:10px 0 0;padding-top:12px;border-top:1px solid var(--kc-line,rgba(160,128,80,.18));display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2.4fr) auto;gap:8px 10px;align-items:end}
.comments-box .comments[data-num-comments="0"]+.kc-form{border-top:0;padding-top:0;margin-top:4px}
.comments-box .kc-lead{grid-column:1/-1;margin:0 0 2px;font:400 13px/1.45 Inter,Martel,system-ui,sans-serif;color:var(--kc-mute,#7a6f64)}
.comments-box .kc-form label{display:flex;flex-direction:column;margin:0;min-width:0}
.comments-box .kc-form label>span{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important}
.comments-box .kc-form input,.comments-box .kc-form textarea{box-sizing:border-box;width:100%;margin:0;border:1px solid rgba(160,128,80,.24);border-radius:12px;background:rgba(255,255,255,.7);
  font:400 14.5px/1.45 Inter,Martel,system-ui,sans-serif;color:#191918;padding:9px 13px;outline:none;transition:border-color .15s,box-shadow .15s,background .15s}
.comments-box .kc-form input{height:42px}
.comments-box .kc-form textarea{resize:none;height:42px;min-height:42px;max-height:360px;overflow:hidden}
.comments-box .kc-form input::placeholder,.comments-box .kc-form textarea::placeholder{color:#a3978a}
.comments-box .kc-form input:focus,.comments-box .kc-form textarea:focus{background:#fff;border-color:rgba(201,162,79,.75);box-shadow:0 0 0 3px rgba(201,162,79,.18)}
.comments-box .kc-form[lang=ne] input,.comments-box .kc-form[lang=ne] textarea,.comments-box .kc-form[lang=ne] .kc-lead{font-family:Martel,Inter,system-ui,sans-serif}
.comments-box .kc-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
.comments-box .kc-row{grid-column:3;display:flex;align-items:center;gap:12px;align-self:end}
.comments-box .kc-form:has(.kc-check:not(:empty)) .kc-row{grid-column:1/-1;justify-content:space-between}
.comments-box .kc-form:has(.kc-check:not(:empty)) .kc-body{grid-column:2/-1}
.comments-box .kc-check{min-width:0;flex:0 1 auto}
.comments-box .kc-check:empty{display:none}
.comments-box .kc-row button{margin-left:auto;flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;height:42px;border:0;border-radius:999px;background:#2b211c;color:#f3d89a;
  font:600 13px/1 Inter,Martel,system-ui,sans-serif;letter-spacing:.01em;padding:0 18px 0 20px;cursor:pointer;transition:background .15s,transform .1s,opacity .15s}
.comments-box .kc-row button::after{content:"";width:14px;height:14px;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat}
.comments-box .kc-row button:hover{background:#3a2c24}
.comments-box .kc-row button:active{transform:scale(.97)}
.comments-box .kc-row button:disabled{opacity:.55;cursor:default}
.comments-box .kc-msg{grid-column:1/-1;margin:0;font:400 13.5px/1.45 Inter,Martel,system-ui,sans-serif;color:#4f6b4a}
.comments-box .kc-msg:empty{display:none}
.comments-box .kc-msg.err{color:#a5554b}

@media (max-width:640px){
  html body section.comments-box#comments{padding:14px 14px 12px!important;border-radius:14px!important}
  .comments-box .kc-form{grid-template-columns:1fr;gap:8px}
  .comments-box .kc-row,.comments-box .kc-form:has(.kc-check:not(:empty)) .kc-row,.comments-box .kc-form:has(.kc-check:not(:empty)) .kc-body{grid-column:1;flex-wrap:wrap}
  .comments-box .kc-row button{width:100%;justify-content:center;margin-left:0}
  html body section.comments-box#comments .comment-block{grid-template-columns:30px minmax(0,1fr);column-gap:10px}
  html body section.comments-box#comments .kc-av{width:30px;height:30px;font-size:13px}
}

/* the search button under the post matches: dark ink with gold text, not red (from PR 232) */
html body nav.postnav .postnav-search button{background:#2b211c!important;color:#f3d89a!important;border-color:#2b211c!important}
