:root {
  --green: #3f6f18;
  --green-dark: #1d3210;
  --lime: #cde342;
  --brown: #8b4d16;
  --nav: rgba(12, 18, 12, 0.84);
  --bg: #f0f0ef;
  --surface: #ffffff;
  --text: #171a15;
  --muted: #676d61;
  --line: #deded9;
  --gold: #c08c29;
  --shadow: 0 1px 8px rgba(30, 38, 24, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-strip {
  min-height: 150px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.2)),
    url("assets/banner.jpg") center center / cover no-repeat;
  position: relative;
}

.hero-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.24));
}

.nav-shell {
  position: relative;
  z-index: 1;
  top: 84px;
  display: grid;
  grid-template-columns: 220px minmax(240px, 1fr) auto;
  gap: 22px;
  align-items: center;
  min-height: 64px;
  background: var(--nav);
  padding: 0 18px;
}

.brand img {
  display: block;
  width: 190px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
}

.search-box {
  display: flex;
  min-height: 38px;
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.76);
  padding: 0 16px;
  font-size: 0.88rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.main-nav a {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: transparent;
  color: #fff;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: currentColor;
}

.mobile-menu {
  background: #20271d;
  padding-bottom: 12px;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 12px;
}

.mobile-menu a {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  padding: 10px 12px;
  color: #fff;
  font-weight: 800;
}

.page-shell {
  padding: 20px 0 46px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #4d573f;
  font-size: 0.78rem;
  font-weight: 700;
}

.breadcrumb a {
  color: #192716;
}

.main-column,
.reviews-list,
.sidebar {
  display: grid;
  gap: 12px;
}

.thread-card,
.sidebar-card,
.reply-editor,
.related-threads article {
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.thread-card {
  padding: 16px;
}

.thread-title-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

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

h1 {
  margin-bottom: 8px;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.thread-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.jump-button,
.editor-toolbar a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 4px;
  background: var(--brown);
  color: #fff;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.post-author {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--green), #d24820);
  color: #fff;
  font-weight: 900;
}

.post-author strong,
.post-author small {
  display: block;
}

.post-author small {
  color: var(--muted);
  font-size: 0.78rem;
}

.post-number {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.post p {
  color: #1c2119;
}

.site-summary {
  border: 1px solid #d8e3cd;
  border-radius: 6px;
  background: #f7fbf1;
  padding: 14px;
  margin: 14px 0;
}

.site-summary > strong {
  display: block;
  margin-bottom: 10px;
}

dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

dd {
  margin: 2px 0 0;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.stars {
  color: var(--gold);
}

.post-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.post-actions a {
  color: #272d23;
  font-size: 0.82rem;
  font-weight: 800;
}

.sort-row {
  display: flex;
  gap: 12px;
  color: var(--muted);
}

.sort-row strong {
  color: #111;
}

.reply-editor {
  overflow: hidden;
}

.reply-area {
  min-height: 112px;
  padding: 18px;
  color: #8a8f83;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 12px 16px;
}

.editor-toolbar a {
  margin-left: auto;
}

.related-threads {
  margin-top: 18px;
}

.related-threads h2 {
  margin-bottom: 12px;
  font-size: 1.35rem;
}

.related-threads article {
  padding: 14px;
  margin-bottom: 12px;
}

.tag {
  color: var(--brown);
  font-size: 0.75rem;
  font-weight: 900;
}

.sidebar-card {
  padding: 16px;
}

.sidebar-card h2 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.sidebar-card p {
  color: #33392f;
}

.sidebar-card a {
  display: block;
  color: #4f310d;
  font-weight: 900;
  padding: 8px 0;
}

.contributor {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.contributor strong {
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 980px) {
  .nav-shell {
    grid-template-columns: 210px 1fr 44px;
  }

  .search-box,
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .forum-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 20px, 1160px);
  }

  .hero-strip {
    min-height: 120px;
  }

  .nav-shell {
    top: 58px;
    grid-template-columns: 1fr 44px;
  }

  .brand img {
    width: min(190px, calc(100vw - 92px));
  }

  .mobile-menu nav,
  dl {
    grid-template-columns: 1fr;
  }

  .thread-title-row,
  .post-actions,
  .editor-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-toolbar a {
    margin-left: 0;
  }
}
