/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Color system — dark mode (primary identity) ─── */
:root {
  --bg:             #0F0C08;
  --surface:        #181410;
  --surface-2:      #1E1A14;
  --accent:         #C4752A;
  --accent-hover:   #D4852A;
  --text-primary:   #F0DCC0;
  --text-secondary: #B8A890;
  --text-muted:     #8A7A68;
  --border:         rgba(240, 220, 192, 0.08);
  --border-strong:  rgba(240, 220, 192, 0.14);

  --font-main:  'Georgia', serif;
  --max-width:  720px;
}

/* ── Color system — light mode (auto) ───────────── */
@media (prefers-color-scheme: light) {
  :root {
    --bg:             #EFECE6;
    --surface:        #E4E0D8;
    --surface-2:      #DAD5CC;
    --accent:         #9E6B4A;
    --accent-hover:   #B07A55;
    --text-primary:   #1E1A16;
    --text-secondary: #5A504A;
    --text-muted:     #7A6E64;
    --border:         rgba(30, 26, 22, 0.10);
    --border-strong:  rgba(30, 26, 22, 0.16);
  }
}

html { font-size: 18px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navbar ─────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.nav-logo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-logo .org { color: var(--text-muted); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text-primary); }

/* ── Main content ───────────────────────────────── */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* ── Generic hero ────────────────────────────────── */
.hero { text-align: center; padding: 6rem 1rem; }

.hero h1 { font-size: 2.4rem; line-height: 1.2; margin-bottom: 1rem; }

.hero .subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

/* ── Page section ───────────────────────────────── */
.page-section h1 { font-size: 1.8rem; margin-bottom: 1rem; }
.page-section p  { color: var(--text-muted); }

/* ── Buttons ────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover { background: var(--accent-hover); }

/* ── Footer ─────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ── Submit form ─────────────────────────────────── */

.submit-page { max-width: 600px; }

.submit-intro { margin-bottom: 3rem; }
.submit-intro h1 { font-size: 1.8rem; line-height: 1.3; margin-bottom: 0.5rem; }
.submit-intro .subtitle { color: var(--text-muted); }

.form-zone { margin-bottom: 1.5rem; }

/* Zone 2 & 3 as subtle raised panels */
.zone-2 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

.zone-3 {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

.zone-header {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.zone-optional { font-weight: 400; text-transform: none; letter-spacing: 0; }

.form-field { margin-bottom: 1.25rem; }

/* Remove extra bottom margin from last field inside zone panels */
.zone-2 .form-field:last-child,
.zone-3 .form-field:last-child { margin-bottom: 0; }

/* Grid inside zone 3 — gap handles spacing, no extra margin needed */
.demo-grid .form-field { margin-bottom: 0; }

.form-field > label, .field-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.zone-1 .form-field > label {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.zone-3 .form-field > label { font-size: 0.78rem; }

textarea, input[type="text"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.6;
  outline: none;
  transition: border-color 0.15s;
}

textarea::placeholder,
input[type="text"]::placeholder { color: var(--text-muted); }

textarea:focus, input[type="text"]:focus { border-color: var(--accent); }
textarea { resize: vertical; }

/* Select — chevron is a data URI so we need separate dark/light variants */
select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  padding-right: 2.2rem;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238A7A68'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

@media (prefers-color-scheme: light) {
  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237A6E64'/%3E%3C/svg%3E");
  }
}

select:focus { border-color: var(--accent); }

.char-counter {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* #C44A2A — warm amber-red, distinct from accent, used for errors */
.field-error {
  font-size: 0.82rem;
  color: #C44A2A;
  margin-top: 0.35rem;
}

.form-alert {
  background: var(--surface);
  border: 1px solid rgba(196, 74, 42, 0.35);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: #C44A2A;
  margin-bottom: 2rem;
}

/* Radio groups */
.radio-group { display: flex; flex-direction: column; gap: 0.6rem; }

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
}

.radio-option input[type="radio"] { accent-color: var(--accent); }

/* Happiness scale */
.scale-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 0.4rem;
}

.happiness-scale {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.h-btn { position: relative; cursor: pointer; }

.h-btn input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.h-btn span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
}

.h-btn:hover span { border-color: var(--accent); color: var(--accent); }

.h-btn input[type="radio"]:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.h-btn input[type="radio"]:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Demographics grid */
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

.private-tag {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.05rem 0.35rem;
  margin-left: 0.3rem;
  vertical-align: middle;
}

/* Submit area */
.form-submit { margin-top: 1.5rem; }

.btn-submit { padding: 0.85rem 2.5rem; }

.submit-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.8rem;
}

/* ── Success page ─────────────────────────────────── */

.success-header { margin-bottom: 3rem; }

.success-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.success-answer {
  font-family: var(--font-main);
  font-size: 1.45rem;
  line-height: 1.55;
  margin: 0 0 1.25rem;
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  color: var(--text-primary);
}

.answer-keyword {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
}

.related-section { margin-bottom: 3rem; }

.related-header {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.related-list { display: flex; flex-direction: column; gap: 1rem; }

.related-card {
  padding: 1.1rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.related-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.success-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.btn-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
}

.btn-link:hover { color: var(--text-primary); }

/* ── Responsive (forms) ──────────────────────────── */
@media (max-width: 520px) {
  .demo-grid { grid-template-columns: 1fr; }
  .h-btn span { width: 1.9rem; height: 1.9rem; }
  .happiness-scale { gap: 0.25rem; }
}

/* ── Homepage hero ───────────────────────────────── */

.home-hero {
  text-align: center;
  padding: 5rem 1rem 3.5rem;
}

.hero-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

#hero-quote {
  min-height: 9rem;
  margin-bottom: 2.5rem;
}

.hero-blockquote {
  font-family: var(--font-main);
  font-size: 1.6rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--text-primary);
  border: none;
  padding: 0;
  margin: 0 0 1rem;
}

.quote-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.quote-demo {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hero-empty {
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hero-refresh {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
  background: none;
  border: none;
  padding: 0;
}

.hero-refresh:hover { color: var(--text-primary); }

/* ── Stats bar ───────────────────────────────────── */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 4rem;
  padding: 1.8rem 0;
}

.stat {
  text-align: center;
  padding: 0 1rem;
  border-right: 1px solid var(--border);
}

.stat:last-child { border-right: none; }

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ── Word cloud ──────────────────────────────────── */

.wordcloud-section { margin-bottom: 4rem; }

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.wordcloud {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  justify-content: center;
  align-items: baseline;
}

/* Opacity in the template scales from 0.5–1.0; color is text-secondary baseline */
.cloud-word {
  font-family: var(--font-main);
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: nowrap;
}

/* ── Recent answers ──────────────────────────────── */

.recent-section { margin-bottom: 4rem; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.see-all {
  font-size: 0.83rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.see-all:hover { color: var(--text-primary); }

/* ── Explore page header ─────────────────────────── */
.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.page-sub {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Word cloud ──────────────────────────────────── */
.word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-bottom: 2rem;
  line-height: 1.4;
}

.word-cloud--interactive .word-cloud__word {
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, opacity 0.15s;
  padding: 2px 4px;
  border-radius: 4px;
}

.word-cloud--interactive .word-cloud__word:hover {
  color: var(--text-primary);
}

.word-cloud--interactive .word-cloud__word--active {
  background: var(--accent);
  color: var(--bg);
  padding: 2px 10px;
  border-radius: 20px;
  opacity: 1 !important;
}

/* ── Filter bar ──────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.filter-bar__sort {
  display: flex;
  gap: 6px;
}

.filter-bar__dropdowns {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.filter-btn {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.filter-btn--active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.filter-bar select {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238A7A68' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

/* ── Active filter pills ─────────────────────────── */
.filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ── Answers grid ────────────────────────────────── */
.answers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.answer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s;
}

.answer-card:hover {
  border-color: var(--border-strong);
}

.answer-card__text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  flex: 1;
}

.answer-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.answer-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.demo-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
}

.card-upvotes {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* ── Admin ───────────────────────────────────────── */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-strong);
}

.admin-table td {
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: top;
}

.admin-table tr:hover td { background: var(--surface); }

.btn-approve {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-approve:hover { background: var(--accent-hover); }

.btn-danger {
  background: transparent;
  color: #C44A2A;
  border: 1px solid rgba(196, 74, 42, 0.35);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-danger:hover {
  background: rgba(196, 74, 42, 0.12);
}

/* ── Upvote button ───────────────────────────────── */
.upvote-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.upvote-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.upvote-btn--voted {
  border-color: var(--accent);
  color: var(--accent);
  cursor: default;
}

/* ── Happiness bar ───────────────────────────────── */
.happiness-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.happiness-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

/* ── Explore pagination ──────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 0;
}

.pagination-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  transition: all 0.15s;
}

.pagination-link:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.pagination-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── No results ──────────────────────────────────── */
.no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 0;
}

/* ── Responsive (explore) ────────────────────────── */
@media (max-width: 600px) {
  .answers-grid { grid-template-columns: 1fr; }
  .filter-bar__dropdowns { margin-left: 0; width: 100%; }
}

/* ── Responsive (homepage) ───────────────────────── */
@media (max-width: 560px) {
  .hero-blockquote { font-size: 1.25rem; }
  .stat-number { font-size: 1.5rem; }
  .answers-grid { grid-template-columns: 1fr; }
  #hero-quote { min-height: 7rem; }
}

/* ── About page ──────────────────────────────────── */
.about-page {
  max-width: 620px;
}
.about-title {
  font-size: 32px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 28px;
}
.about-lead {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 20px;
}
.about-prose p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}
.about-prose h2 {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.about-emphasis {
  font-size: 17px !important;
  color: var(--text-primary) !important;
  font-weight: 500;
}
.about-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}
.about-faq h2 {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.faq-item {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-q {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.faq-a {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.about-contact {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 36px;
}
.about-contact a {
  color: var(--accent);
  text-decoration: none;
}
.about-contact a:hover {
  text-decoration: underline;
}
.about-cta {
  background: var(--surface);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  border: 1px solid var(--border);
}
.about-cta p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}
.btn-primary {
  display: inline-block;
  padding: 10px 28px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-primary:hover {
  background: var(--accent-hover);
}

/* ── Top answers page ────────────────────────────── */
.top-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  transition: border-color 0.15s;
}

.top-item:hover {
  border-color: var(--border-strong);
}

.top-item--gold   { border-color: var(--accent); }
.top-item--silver { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.top-item--bronze { border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

.top-rank {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 36px;
  padding-top: 2px;
  flex-shrink: 0;
}

.top-item--gold   .top-rank { color: var(--accent); }
.top-item--silver .top-rank { color: color-mix(in srgb, var(--accent) 70%, transparent); }
.top-item--bronze .top-rank { color: color-mix(in srgb, var(--accent) 50%, transparent); }

.top-body { flex: 1; }

.top-text {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.top-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.top-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.share-btn {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: transparent !important;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.share-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-secondary);
}

.share-btn--copied {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Admin panel ─────────────────────────────────── */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.admin-tab {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px 6px 0 0;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-tab:hover { color: var(--text-primary); }
.admin-tab--active {
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent);
}
.admin-tab-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-muted);
}
.admin-tab-count--flagged { color: #C44A2A; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.admin-row {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.admin-row:hover { background: var(--surface); }
.admin-row--flagged { background: rgba(196, 74, 42, 0.05); }
.admin-cell {
  padding: 12px;
  vertical-align: top;
}
.admin-cell--text { width: 60%; }
.admin-cell--status { width: 12%; }
.admin-cell--actions { width: 28%; }
.admin-answer-text {
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 6px;
}
.admin-answer-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.status-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--text-muted);
}
.status-badge--approved {
  background: rgba(74, 158, 106, 0.15);
  color: #4A9E6A;
}
.status-badge--flagged {
  background: rgba(196, 74, 42, 0.15);
  color: #C44A2A;
}
.admin-btn {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  margin-right: 4px;
}
.admin-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }
.admin-btn--approve { color: #4A9E6A; border-color: rgba(74, 158, 106, 0.3); }
.admin-btn--approve:hover { background: rgba(74, 158, 106, 0.1); }
.admin-btn--flag { color: #C4752A; border-color: rgba(196, 117, 42, 0.3); }
.admin-btn--flag:hover { background: rgba(196, 117, 42, 0.1); }
.admin-btn--unflag { color: var(--text-muted); }
.admin-btn--delete { color: #C44A2A; border-color: rgba(196, 74, 42, 0.3); }
.admin-btn--delete:hover { background: rgba(196, 74, 42, 0.1); }
.admin-export-btn {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid rgba(196, 117, 42, 0.3);
  border-radius: 20px;
  transition: all 0.15s;
}
.admin-export-btn:hover {
  background: rgba(196, 117, 42, 0.1);
}
