body {
  font-family: Arial, sans-serif;
  max-width: 850px;
  margin: 0 auto;
  padding: 24px;
  line-height: 1.5;
}

header {
  border-bottom: 1px solid #ddd;
  margin-bottom: 24px;
}

h1 {
  margin-bottom: 4px;
}

#articleInfo,
#commentForm,
#discussion {
  margin-bottom: 24px;
}

#usernameBox,
#commentBox {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  margin-bottom: 10px;
}

#commentBox {
  height: 120px;
}

button {
  padding: 8px 12px;
  cursor: pointer;
}

.comment {
  border-bottom: 1px solid #ddd;
  padding: 12px 0;
}

.reply {
  margin-left: 28px;
  padding-left: 12px;
  border-left: 3px solid #ddd;
}

.commentUsername {
  font-weight: bold;
}

.commentTime {
  color: #777;
  font-size: 12px;
  margin-top: 4px;
}

.commentActions button {
  margin-top: 6px;
  margin-right: 6px;
  font-size: 12px;
}

#discussionTabs {
  margin: 14px 0;
}

#discussionTabs button {
  margin-right: 8px;
}

.topicCard {
  border-bottom: 1px solid #ddd;
  padding: 14px 0;
}

.topicCard a {
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
}

.topicMeta {
  color: #666;
  font-size: 13px;
  margin-top: 4px;
}

/* Recent comments page */

.comment-card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 14px;
  margin: 14px 0;
  background: #fafafa;
}

.comment-card .meta {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 8px;
}

.comment-text {
  white-space: pre-wrap;
  margin: 8px 0;
}

.comment-card .topic {
  font-weight: bold;
}

/* Health page */

.healthCard {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 14px;
  margin: 14px 0;
  background: #fafafa;
}

.healthCard h2 {
  margin-top: 0;
}

.healthCard pre {
  white-space: pre-wrap;
  overflow-x: auto;
  background: #f0f0f0;
  padding: 12px;
  border-radius: 6px;
}

/* Site footer */

.siteFooter {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid #ccc;
  color: #666;
  font-size: 0.9em;
  text-align: center;
}

.siteFooter p {
  margin: 6px 0;
}

.siteFooter a {
  color: inherit;
}

/* Basic informational pages */

.legalPage {
  max-width: 850px;
  line-height: 1.55;
}

.legalPage h2 {
  margin-top: 28px;
}

.updatedText {
  color: #666;
  font-size: 0.9em;
}

/* 404 page */

.notFoundPage {
  max-width: 800px;
  line-height: 1.55;
}

.notFoundPage h1 {
  margin-top: 40px;
}

/* Public comment reporting */

.reportButton {
  margin-left: 6px;
}

.reportPanel {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fafafa;
}

.reportPanel label {
  display: block;
  font-weight: bold;
  margin-bottom: 4px;
}

.reportPanel select,
.reportPanel textarea {
  display: block;
  width: 100%;
  max-width: 420px;
  margin-bottom: 8px;
}

.reportPanel textarea {
  min-height: 70px;
}

.reportPanel button {
  margin-right: 6px;
}

.reportMessage {
  margin-top: 8px;
  color: #666;
}

.reportPanelSuccess {
  color: #333;
  font-weight: bold;
}

/* Empty and error states */

.emptyState,
.errorState {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  background: #fafafa;
}

.emptyState h3,
.errorState h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.emptyState p,
.errorState p {
  margin: 8px 0;
}

.errorState {
  border-color: #c44;
  background: #fff7f7;
}

.errorState h3 {
  color: #900;
}

/* Site layout refresh */

:root {
  --page-bg: #f5f7fa;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #667085;
  --border: #d9dee7;
  --link: #2457a6;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page-bg);
}

body {
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--text);
}

header {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}

header h1 {
  margin: 0 0 4px;
}

header p {
  margin: 0;
  color: var(--muted);
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}

a {
  color: var(--link);
}

.siteNav {
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.siteNav p {
  margin: 0;
}

.siteNav a {
  text-decoration: none;
  font-weight: 600;
}

.siteFooter {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 24px 30px;
}

/* Homepage sections */

.homePage section {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.homePage section h2 {
  margin-top: 0;
  margin-bottom: 14px;
}

.homePage .topicCard:last-child {
  border-bottom: 0;
}

/* Homepage card readability */

.homePage .topicCard {
  padding: 14px 0;
}

.homePage .topicCard:first-child {
  padding-top: 4px;
}

.homePage .topicCard > a:first-child {
  display: inline-block;
  font-size: 17px;
  line-height: 1.35;
}

.homePage .topicMeta {
  margin-top: 5px;
  margin-bottom: 5px;
}

.homePage section > p:last-child {
  margin-bottom: 0;
}
/* Homepage article actions */

.homePage .articleActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 8px;
}

.homePage .articleActions a {
  display: inline-block;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
}
