/* ============================================================
 * Dhara — comments (reader)
 *
 * Appended to /css/components.css, or served as its own file. Every selector
 * is scoped under .comments or .comment-form so nothing here can reach the
 * article body, the hero, the nav or the subscribe band.
 *
 * If this file fails to load the comments section renders unstyled but the
 * article is untouched.
 * ============================================================ */

.comments {
  margin: 4rem 0 0;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule, #d9d2c3);
}

.comments .container { max-width: 42rem; margin: 0 auto; padding: 0 1.25rem; }

.comments-heading {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 1.5rem;
  color: var(--ink, #1c1a17);
}

/* ---- the list ---- */

.comment-list { list-style: none; margin: 0 0 2.5rem; padding: 0; }

.comment {
  border-left: 2px solid var(--rule, #d9d2c3);
  padding-left: 1rem;
  margin-bottom: 1.75rem;
}

.comment-meta {
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 0.8125rem;
  margin-bottom: 0.4rem;
  color: var(--ink-muted, #8a8172);
}

.comment-name { font-weight: 500; color: var(--ink, #1c1a17); }
.comment-meta time { margin-left: 0.5rem; }

.comment-body {
  font-family: var(--font-body, Georgia, serif);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink, #1c1a17);
}
.comment-body p { margin: 0 0 0.75rem; }
.comment-body p:last-child { margin-bottom: 0; }

/* ---- the form ---- */

.comment-form {
  border-top: 1px solid var(--rule, #d9d2c3);
  padding-top: 1.75rem;
  font-family: var(--font-ui, system-ui, sans-serif);
}

.comment-form h3 {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.0625rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
}

.comment-note {
  font-size: 0.8125rem;
  color: var(--ink-muted, #8a8172);
  margin: 0 0 1.25rem;
}

.comment-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 0.75rem; }

@media (max-width: 34rem) {
  .comment-row { grid-template-columns: 1fr; }
}

.comment-form label {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-soft, #6b6355);
  margin-bottom: 0.75rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem 0.65rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--ink, #1c1a17);
  background: var(--paper-raised, #fff);
  border: 1px solid var(--rule, #d9d2c3);
  border-radius: 3px;
  box-sizing: border-box;
}

.comment-form textarea { resize: vertical; min-height: 6rem; line-height: 1.55; }

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent, #8c2f16);
}

.comment-form .hint { display: block; margin-top: 0.2rem; color: var(--ink-muted, #8a8172); }

/* Honeypot. Hidden from people without display:none, which some bots detect.
   Never remove: it is the cheapest filter in the whole stack. */
.comment-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.comment-submit {
  font-family: inherit;
  font-size: 0.875rem;
  color: #fff;
  background: var(--accent, #8c2f16);
  border: none;
  border-radius: 3px;
  padding: 0.55rem 1.4rem;
  cursor: pointer;
}
.comment-submit:hover { opacity: 0.9; }
.comment-submit:disabled { opacity: 0.55; cursor: default; }

.comment-status {
  margin: 0.9rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-soft, #6b6355);
  min-height: 1rem;
}
.comment-status.is-error { color: var(--accent, #8c2f16); }

.cf-turnstile { margin: 0.75rem 0 1rem; }

@media (prefers-color-scheme: dark) {
  .comment-form input[type="text"],
  .comment-form input[type="email"],
  .comment-form textarea {
    background: rgba(255,255,255,0.04);
    color: #f2ede3;
  }
}
