:root {
  --eil-green: #2E5E3E;
  --eil-ink: #172019;
  --eil-muted: #607061;
  --eil-bg: #f4f7f0;
  --eil-card: #ffffff;
  --eil-line: #dfe7dc;
  --eil-accent: #C96F2D;
}

body {
  background: var(--eil-bg);
  color: var(--eil-ink);
}

.logo img {
  display: block;
  height: 42px;
  width: auto;
}

.main-nav {
  align-items: center;
  gap: 10px;
}

.main-nav a {
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 800;
}

.main-nav a:hover {
  background: rgba(255,255,255,0.12);
}

.main-nav .nav-action {
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.main-nav .nav-action-primary {
  background: #F7C873;
  color: #172019;
  border-color: #F7C873;
}

.main-nav .nav-action-primary:hover {
  background: #ffe09a;
  color: #172019;
}

.main-nav .nav-action-secondary {
  background: var(--eil-green);
  color: #fff;
  border-color: rgba(255,255,255,0.45);
}

.main-nav .nav-action-secondary:hover {
  background: #fff;
  color: var(--eil-green);
}

.menu-toggle {
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  background: #F7C873;
  color: #172019;
  font-size: 15px;
  font-weight: 900;
}

.menu-icon {
  font-size: 22px;
  line-height: 1;
}

.menu-label {
  font-size: 13px;
  text-transform: uppercase;
}

.community-hero {
  min-height: clamp(560px, 76vh, 820px);
  display: flex;
  align-items: stretch;
  background:
    linear-gradient(90deg, rgba(7,16,10,0.94) 0%, rgba(7,16,10,0.78) 45%, rgba(7,16,10,0.22) 100%),
    var(--hero-image) center/cover;
  color: #fff;
  margin-top: -80px;
  padding: 132px 20px 42px;
  position: relative;
  overflow: hidden;
}

.community-hero-inner {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 36px;
  align-items: end;
}

.hero-copy-block {
  padding-bottom: 28px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #F7C873;
  color: #182318;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-title {
  color: #fff;
  font-size: clamp(64px, 10vw, 132px);
  line-height: 0.86;
  letter-spacing: 0;
  margin: 22px 0 24px;
  text-shadow: 0 4px 34px rgba(0,0,0,0.75);
  max-width: 780px;
}

.hero-summary {
  max-width: 720px;
  color: rgba(255,255,255,0.94);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.32;
  text-shadow: 0 2px 18px rgba(0,0,0,0.52);
}

.hero-topic-board {
  display: grid;
  gap: 10px;
  padding-bottom: 30px;
}

.hero-topic-board a {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  color: var(--eil-ink);
  box-shadow: 0 18px 44px rgba(0,0,0,0.16);
}

.hero-topic-board span {
  color: var(--eil-accent);
  font-weight: 900;
}

.hero-topic-board strong {
  font-size: 18px;
}

.hero-primary {
  background: #F7C873;
  color: #172019;
}

.hero-secondary {
  color: #172019;
}

.eyebrow {
  color: var(--eil-accent);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  font-size: 12px;
}

.hero-actions,
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn-primary,
.btn-light,
.text-link {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  border-radius: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
}

.btn-primary {
  background: var(--eil-green);
  color: #fff;
}

.btn-light {
  background: #fff;
  color: var(--eil-green);
}

.text-link {
  color: var(--eil-green);
  background: transparent;
  padding-inline: 0;
}

.community-layout {
  width: min(1100px, calc(100% - 32px));
  margin: 34px auto 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.single-column {
  display: block;
}

.main-feed,
.side-panel,
.thread-detail,
.reply-block,
.community-form,
.category-header,
.empty-state {
  background: var(--eil-card);
  border: 1px solid var(--eil-line);
  border-radius: 8px;
}

.main-feed,
.side-panel,
.thread-detail,
.reply-block,
.category-header,
.empty-state {
  padding: 22px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.section-heading h2,
.side-panel h2,
.category-header h1,
.thread-detail h1,
.community-form h1 {
  color: var(--eil-ink);
  margin-top: 4px;
}

.thread-list {
  display: grid;
  gap: 12px;
}

.thread-row,
.reply-card {
  border: 1px solid var(--eil-line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfa;
}

.thread-row h2,
.thread-row h3 {
  font-family: Inter, sans-serif;
  font-size: 20px;
  margin: 8px 0 6px;
}

.thread-row p,
.category-card span,
.category-header p,
.thread-body,
.reply-card p,
.form-note {
  color: var(--eil-muted);
}

.thread-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--eil-muted);
  font-size: 13px;
  margin-top: 12px;
}

.category-pill {
  --pill-color: var(--eil-green);
  display: inline-flex;
  align-items: center;
  color: var(--pill-color);
  background: color-mix(in srgb, var(--pill-color) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--pill-color) 25%, #fff);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.category-stack {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.category-card {
  --category-color: var(--eil-green);
  border-left: 4px solid var(--category-color);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 14px;
  display: grid;
  gap: 4px;
}

.category-card strong {
  color: var(--eil-ink);
}

.category-card small {
  color: var(--category-color);
  font-weight: 800;
}

.category-header {
  border-top: 5px solid var(--category-color);
  margin-bottom: 20px;
}

.thread-page,
.auth-page {
  width: min(860px, calc(100% - 32px));
  margin: 34px auto 70px;
}

.thread-detail h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.03;
  margin: 12px 0 10px;
}

.thread-body {
  margin-top: 24px;
  font-size: 18px;
  white-space: normal;
}

.thread-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.like-button {
  border: 1px solid #f3b7b7;
  border-radius: 999px;
  min-height: 42px;
  padding: 9px 14px;
  background: #fff5f5;
  color: #982b2b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 900;
}

.like-button.is-active {
  background: #BE123C;
  border-color: #BE123C;
  color: #fff;
}

.reply-block {
  margin-top: 18px;
}

.reply-card {
  margin-top: 12px;
}

.community-form {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.auth-card {
  box-shadow: 0 20px 54px rgba(23,32,25,0.10);
}

.auth-card h1 {
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1;
}

.community-form.wide {
  width: min(780px, 100%);
  margin: 0 auto;
}

.community-form label {
  font-weight: 800;
  color: var(--eil-ink);
}

.community-form input,
.community-form textarea,
.community-form select {
  width: 100%;
  border: 1px solid var(--eil-line);
  border-radius: 8px;
  min-height: 46px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 38px;
  height: 34px;
  border: 1px solid var(--eil-line);
  border-radius: 8px;
  background: #f8faf5;
  color: var(--eil-green);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.password-toggle:hover {
  background: #eef4ea;
}

.password-reminder {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.password-reminder span {
  border: 1px solid var(--eil-line);
  border-radius: 999px;
  padding: 5px 9px;
  background: #fbfcfa;
  color: var(--eil-muted);
  font-size: 12px;
  font-weight: 800;
}

.password-reminder span.is-valid {
  border-color: #b7dfc0;
  background: #ecf9ee;
  color: #236333;
}

.password-match {
  margin: -2px 0 2px;
  color: var(--eil-muted);
  font-size: 13px;
}

.password-match.is-valid {
  color: #236333;
}

.password-match.is-invalid {
  color: #9f1239;
}

.success-panel {
  text-align: left;
}

.community-form textarea {
  resize: vertical;
}

.form-error {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #9f1239;
  border-radius: 8px;
  padding: 10px 12px;
}

.form-success {
  border: 1px solid #b7dfc0;
  background: #ecf9ee;
  color: #236333;
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 700;
}

.forgot-link {
  justify-self: start;
  color: var(--eil-accent);
  font-size: 14px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.auth-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  border: 1px solid #f1d6bb;
  border-radius: 8px;
  padding: 12px;
  background: #fff8ef;
}

.auth-switch span {
  color: var(--eil-ink);
  font-weight: 800;
}

.auth-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  padding: 9px 14px;
  background: var(--eil-accent);
  color: #fff;
  font-weight: 900;
}

.consent-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--eil-line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfa;
  color: var(--eil-ink);
  font-weight: 700;
  line-height: 1.45;
}

.consent-check input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.empty-state {
  text-align: left;
  display: grid;
  gap: 10px;
}

.empty-state.compact {
  margin-top: 14px;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--eil-muted);
  margin-bottom: 14px;
}

@media (max-width: 860px) {
  .community-layout {
    grid-template-columns: 1fr;
  }

  .community-hero {
    min-height: auto;
    padding-top: 116px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hero-copy-block,
  .hero-topic-board {
    padding-bottom: 0;
  }
}

@media (max-width: 768px) {
  .logo img {
    height: 36px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    left: 12px;
    right: 12px;
    width: auto;
    top: calc(100% + 8px);
    padding: 10px;
    border: 1px solid rgba(46,94,62,0.18);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 46px rgba(23,32,25,0.22);
  }

  .main-nav a {
    border-radius: 8px;
    color: var(--eil-ink);
    padding: 13px 14px;
    background: #f8faf5;
    border-top: 0;
    font-size: 16px;
  }

  .main-nav .nav-action {
    justify-content: center;
    min-height: 48px;
    margin-top: 4px;
  }

  .main-nav .nav-action-primary {
    background: #F7C873;
    color: #172019;
  }

  .main-nav .nav-action-secondary {
    background: var(--eil-green);
    color: #fff;
  }

  .section-heading,
  .thread-meta {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .main-header .menu-toggle {
    display: inline-flex;
    background: #F7C873;
    color: #172019;
  }

  .main-header .main-nav.active {
    display: flex;
  }

  .main-header .main-nav a.nav-action-primary,
  .main-header .main-nav a.nav-action-secondary {
    font-weight: 900;
  }
}
