:root {
  color-scheme: light;
  --ink: #1f282f;
  --muted: #31424f;
  --line: #d9ddd8;
  --paper: #fffdf8;
  --soft: #f7f4ed;
  --brand: #38536b;
  --accent: #77a6a1;
  --warm: #be6b4f;
  --danger: #a33c3c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  background-attachment: fixed;
}

body.page-home {
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.22), transparent 22rem),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.14), transparent 24rem),
    radial-gradient(circle at 68% 86%, rgba(60, 140, 222, 0.18), transparent 28rem),
    linear-gradient(135deg, #3c8cde 0%, #ed73a8 100%);
}

body.page-board {
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 255, 255, 0.22), transparent 22rem),
    radial-gradient(circle at 84% 22%, rgba(170, 231, 255, 0.22), transparent 24rem),
    radial-gradient(circle at 72% 88%, rgba(237, 115, 168, 0.16), transparent 26rem),
    linear-gradient(145deg, #5a9ae4 0%, #a97ce7 100%);
}

body.page-post {
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 255, 255, 0.2), transparent 21rem),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.12), transparent 22rem),
    linear-gradient(145deg, #dfefff 0%, #f8dbe8 100%);
}

body.page-account {
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.2), transparent 20rem),
    radial-gradient(circle at 84% 16%, rgba(60, 140, 222, 0.18), transparent 22rem),
    linear-gradient(145deg, #f6fbff 0%, #eaf0ff 48%, #ffe7f1 100%);
}

body.page-compose {
  background:
    radial-gradient(circle at 16% 16%, rgba(255, 255, 255, 0.18), transparent 20rem),
    radial-gradient(circle at 82% 14%, rgba(237, 115, 168, 0.14), transparent 22rem),
    radial-gradient(circle at 72% 86%, rgba(60, 140, 222, 0.14), transparent 24rem),
    linear-gradient(145deg, #eef5ff 0%, #f5ebff 54%, #fff0f7 100%);
}

a {
  color: inherit;
}

.site-header,
.site-footer {
  margin: 0 auto;
  max-width: 1120px;
  padding: 18px 20px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-weight: 700;
}

.brand small,
.meta,
.eyebrow {
  color: var(--muted);
}

.brand small {
  display: block;
}

.nav,
.actions,
.meta,
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav a,
.back-link {
  text-decoration: none;
}

.nav-user {
  color: var(--muted);
}

.page {
  margin: 0 auto;
  max-width: 1120px;
  min-height: 72vh;
  padding: 12px 20px 44px;
}

.hero,
.page-heading,
.conversation,
.form-shell,
.empty-state {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.hero,
.page-heading,
.section-title {
  justify-content: space-between;
}

.hero,
.page-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  font-size: 36px;
  line-height: 1.1;
}

h2 {
  font-size: 22px;
}

.eyebrow {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.button,
button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px 14px;
  text-decoration: none;
}

.button.small,
.nav .button {
  min-height: 34px;
  padding: 7px 10px;
}

.actions button {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.board-card,
.post-row,
.reply {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.board-card {
  min-height: 190px;
  position: relative;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.board-count {
  color: var(--warm);
  font-size: 13px;
  font-weight: 700;
}

.board-card:hover,
.board-card:focus-visible {
  background: #ffffff;
  border-color: rgba(56, 83, 107, 0.36);
  box-shadow: 0 16px 34px rgba(31, 40, 47, 0.10);
  transform: translateY(-3px);
}

.board-card:hover h2,
.board-card:focus-visible h2 {
  color: var(--brand);
}

.post-list,
.replies,
.stack {
  display: grid;
  gap: 14px;
}

.post-row a {
  text-decoration: none;
}

.post-row__actions {
  margin-top: 12px;
}

.post-row__actions form {
  margin: 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
}

.pagination__pages {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination__link,
.pagination__gap {
  display: inline-flex;
  min-height: 38px;
  min-width: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 8px 12px;
}

.pagination__link {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.pagination__link.is-current {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.pagination__gap {
  color: var(--muted);
}

.conversation {
  margin-bottom: 20px;
}

.reply {
  margin-top: 12px;
}

.reply-children {
  margin-left: 24px;
}

.form-shell {
  max-width: 720px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

.notice {
  margin-bottom: 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: #eef7f4;
  padding: 12px 14px;
}

.notice.error {
  border-color: var(--danger);
  background: #fff1ef;
  color: var(--danger);
}

.site-footer {
  color: #22313b;
}

.site-footer a {
  color: var(--brand);
  font-weight: 700;
}

@media (max-width: 720px) {
  .site-header,
  .hero,
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 30px;
  }

  .reply-children {
    margin-left: 12px;
  }

  .pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination__pages {
    justify-content: center;
  }
}
