/* Small additions on top of Tailwind. Keep this file minimal — prefer utility classes. */

/* Answer bodies in the voting view.
   Answers are rendered markdown, and Tailwind's preflight strips heading and list styling to
   nothing, so every element the renderer can emit needs a rule here or it arrives as
   undifferentiated body text — which defeats the point of rendering markdown at all. */
.answer-prose {
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.answer-prose > :first-child {
  margin-top: 0;
}
.answer-prose > :last-child {
  margin-bottom: 0;
}
.answer-prose p {
  margin: 0.6rem 0;
}

/* Headings step down in size but stay close to body text: these sit inside a card, and an
   h1 at browser-default scale would dwarf the answer it introduces. */
.answer-prose h1,
.answer-prose h2,
.answer-prose h3,
.answer-prose h4,
.answer-prose h5,
.answer-prose h6 {
  font-weight: 600;
  line-height: 1.3;
  margin: 1.1rem 0 0.4rem;
}
.answer-prose h1 {
  font-size: 1.25em;
}
.answer-prose h2 {
  font-size: 1.15em;
}
.answer-prose h3 {
  font-size: 1.05em;
}
.answer-prose h4,
.answer-prose h5,
.answer-prose h6 {
  font-size: 1em;
  color: #475569;
}

.answer-prose ul,
.answer-prose ol {
  margin: 0.6rem 0;
  padding-left: 1.35rem;
  list-style: revert;
}
.answer-prose li {
  margin: 0.2rem 0;
}
.answer-prose li > ul,
.answer-prose li > ol {
  margin: 0.2rem 0;
}

.answer-prose blockquote {
  margin: 0.75rem 0;
  padding: 0.1rem 0 0.1rem 0.75rem;
  border-left: 3px solid #e2e8f0;
  color: #475569;
}

.answer-prose hr {
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid #e2e8f0;
}

.answer-prose code {
  background: #f1f5f9;
  border-radius: 0.25rem;
  padding: 0.1rem 0.3rem;
  font-size: 0.9em;
}
.answer-prose pre {
  margin: 0.75rem 0;
  padding: 0.6rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  overflow-x: auto;
  font-size: 0.85em;
}
.answer-prose pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* Tables can be wider than the card, so the wrapper scrolls rather than the page. */
.answer-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.92em;
  display: block;
  overflow-x: auto;
}
.answer-prose th,
.answer-prose td {
  border: 1px solid #e2e8f0;
  padding: 0.35rem 0.55rem;
  text-align: left;
  vertical-align: top;
}
.answer-prose th {
  background: #f8fafc;
  font-weight: 600;
}

/* Voting cards must be comparable at a glance: equal height, independent scroll. */
.vote-card-body {
  max-height: 26rem;
  overflow-y: auto;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
