/* Forum + Hall of Shame layout from hallofshame.txt, themed for index.html */

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.1;
  color: var(--brand);
}

.page-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 72ch;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.forum-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.forum-main {
  display: grid;
  gap: 18px;
}

.post-card,
.forum-card,
.intake-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.post-card h2,
.intake-card h2 {
  margin: 0 0 14px;
  font-size: 1.25rem;
  color: var(--brand);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.report-item {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.report-item:first-child { border-top: 0; padding-top: 0; }

.report-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.report-summary {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.report-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.report-tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface2);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid .full { grid-column: 1 / -1; }

.forum-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 88px;
}

.forum-card {
  padding: 18px;
}

.forum-card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.forum-card-subtitle {
  margin: 0 0 14px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.hall-of-shame-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid #fecaca;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff1f2, var(--card));
  color: #991b1b;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(153, 27, 27, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}

html[data-theme="dark"] .hall-of-shame-button,
body.dark .hall-of-shame-button {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.35), var(--card));
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
}

.hall-of-shame-button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: #dc2626;
}

.hall-of-shame-button:hover {
  transform: translateY(-1px);
  border-color: #f87171;
  box-shadow: 0 12px 28px rgba(153, 27, 27, 0.18);
}

.hall-of-shame-button:focus-visible {
  outline: 3px solid rgba(248, 113, 113, 0.35);
  outline-offset: 3px;
}

.hall-of-shame-square {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-left: 4px;
  border-radius: 5px;
  background: #dc2626;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.55),
    0 4px 10px rgba(220, 38, 38, 0.35);
}

.hall-of-shame {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff7f7 0%, var(--card) 100%);
}

html[data-theme="dark"] .hall-of-shame,
body.dark .hall-of-shame {
  border-color: rgba(248, 113, 113, 0.3);
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.2) 0%, var(--card) 100%);
}

.hall-of-shame h2 { color: #991b1b; }
html[data-theme="dark"] .hall-of-shame h2,
body.dark .hall-of-shame h2 { color: #fca5a5; }

.hall-of-shame-list,
.review-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hall-of-shame-list li,
.review-list li {
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.hall-of-shame-list li:first-child,
.review-list li:first-child { border-top: 0; }

.shame-title {
  display: block;
  font-weight: 700;
  color: var(--text);
}

.shame-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.shame-desc {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
  font-style: italic;
}

.privacy-notice {
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--brand-glow);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.form-section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  padding-top: 4px;
}

.field-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.strip-preview {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface2);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.strip-warn {
  color: var(--danger);
  font-weight: 600;
}

.export-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  width: 100%;
  margin-bottom: 4px;
}

.engine-only {
  background: rgba(30, 64, 175, 0.12);
  color: var(--brand);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.stats-panel {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface2);
}

.stats-panel h3 {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand);
}

.stat-bar-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.78rem;
}

.stat-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.stat-bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1e40af, #3b82f6);
}

.stat-bar-count {
  font-weight: 700;
  color: var(--text-muted);
  min-width: 1.5rem;
  text-align: right;
}

.review-list li {
  color: var(--text-muted);
  line-height: 1.5;
}

.review-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.export-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.empty-state {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-btn.active {
  background: var(--brand-glow);
  color: var(--brand);
  border-color: var(--brand);
}

@media (max-width: 900px) {
  .forum-section { grid-template-columns: 1fr; }
  .forum-sidebar { position: static; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ── Hashtag system ─────────────────────────────────────── */

.hashtag-filter-label {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand);
}

.hashtag-section {
  padding: 18px;
  border-radius: 16px;
  border: 2px solid #fecaca;
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.6), var(--card));
}

html[data-theme="dark"] .hashtag-section,
body.dark .hashtag-section {
  border-color: rgba(248, 113, 113, 0.35);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.15), var(--card));
}

.hashtag-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.hashtag-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dc2626;
  color: white;
}

.hashtag-help {
  margin: 0 0 14px;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.hashtag-input {
  font-weight: 600;
  font-family: ui-monospace, monospace;
  border-color: #f87171 !important;
}

.hashtag-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 36px;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px dashed var(--border);
}

.hashtag-empty {
  font-size: 0.82rem;
  color: var(--text);
  opacity: 0.72;
  font-style: italic;
}

html[data-theme="dark"] .hashtag-empty,
body.dark .hashtag-empty {
  color: #94a3b8;
  opacity: 1;
}

.hashtag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.hashtag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: #1e3a8a;
  font-size: 0.78rem;
  font-weight: 800;
  font-family: ui-monospace, monospace;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

html[data-theme="dark"] .hashtag-chip,
body.dark .hashtag-chip {
  color: #bfdbfe;
  background: rgba(30, 58, 138, 0.35);
  border-color: rgba(147, 197, 253, 0.45);
}

html[data-theme="dark"] .hashtag-chip:hover,
body.dark .hashtag-chip:hover {
  color: #eff6ff;
  border-color: rgba(191, 219, 254, 0.65);
}

.hashtag-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
}

.hashtag-chip.display {
  cursor: default;
  background: var(--brand-glow);
  border-color: rgba(30, 64, 175, 0.25);
}

.hashtag-chip.required,
.hashtag-chip.required-tag {
  border-color: #f87171;
  color: #991b1b;
  background: #fff1f2;
}

html[data-theme="dark"] .hashtag-chip.required,
body.dark .hashtag-chip.required,
html[data-theme="dark"] .hashtag-chip.required-tag,
body.dark .hashtag-chip.required-tag {
  background: rgba(127, 29, 29, 0.45);
  color: #fecaca;
  border-color: rgba(252, 165, 165, 0.55);
}

.hashtag-chip.missing {
  animation: pulse-tag 1.2s ease infinite;
  border-color: #dc2626;
  background: #fef2f2;
  color: #dc2626;
}

.hashtag-chip.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.hashtag-chip.cloud .tag-count {
  opacity: 0.75;
  font-size: 0.68rem;
  margin-left: 2px;
}

@keyframes pulse-tag {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.hashtag-groups {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.hashtag-group-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.hashtag-group-label.red-tape {
  color: #991b1b;
}

.hashtag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hashtag-missing-alert {
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  font-size: 0.85rem;
  color: #991b1b;
}

.hashtag-missing-alert.hidden { display: none; }

.hashtag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hashtag-cloud-card {
  border-color: rgba(30, 64, 175, 0.2);
}

.shame-card .hashtag-row {
  margin-top: 0;
  margin-bottom: 8px;
}

/* ── Gemini panel ───────────────────────────────────────── */

.gemini-panel {
  border-color: rgba(99, 102, 241, 0.25);
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.5) 0%, var(--card) 100%);
}

html[data-theme="dark"] .gemini-panel,
body.dark .gemini-panel {
  background: linear-gradient(180deg, rgba(49, 46, 129, 0.15) 0%, var(--card) 100%);
}

.gemini-status {
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

.gemini-ok { color: var(--success); }
.gemini-off { color: var(--text-muted); }

.gemini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.gemini-btn {
  border-color: rgba(99, 102, 241, 0.35);
  color: #4338ca;
}

html[data-theme="dark"] .gemini-btn,
body.dark .gemini-btn { color: #a5b4fc; }

.gemini-insights-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.55;
}

.gemini-insight-headline {
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 10px;
}

.gemini-insight-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.gemini-insight-list li { margin-bottom: 6px; }

.gemini-counties {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.gemini-loading {
  color: var(--text-muted);
  font-style: italic;
}
