/* Rohekants — eco-forum theme v2.
   Forest green (from the logo) + neutral warm grays, Golos Text, no gradients, no emoji.
   Same selectors as v1 — drop-in replacement. */

@import url("https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700&display=swap");

:root {
  --green: #2E5540;        /* actions */
  --green-d: #244434;      /* action hover */
  --green-deep: #2E5540;   /* green text (names, links on cards) */
  --green-header: #2E5540; /* header / brand surface */
  --green-footer: #223F2F;
  --green-l: #E3ECE5;      /* light green fill */
  --green-chip: #D2E2D6;   /* pills / badges */
  --accent: #FFFFFF;       /* CTA on green surfaces */
  --accent-ink: #1B3326;
  --ink: #131B16;
  --ink-strong: #0C1F14;
  --ink-soft: #4E5A52;
  --muted: #78847C;
  --bg: #EEF0EA;
  --card: #ffffff;
  --line: #DFE4DD;         /* row dividers */
  --line-strong: #CFD6CE;  /* card borders */
  --line-input: #B9C2BA;
  --danger: #9C3D30;
  --danger-bg: #F7DAD5;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(19, 27, 22, 0.06), 0 6px 20px rgba(19, 27, 22, 0.05);
  --focus-ring: 0 0 0 3px rgba(46, 85, 64, 0.18);
  --avatar-stripes: repeating-linear-gradient(45deg, #E3EBE5 0 4px, #C9D8CD 4px 8px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { height: 100%; }
/* Column layout so the footer sits at the bottom of the viewport on short pages
   (login, errors) and only gets pushed down by content on long ones. */
body {
  font-family: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.55;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  min-height: 100%; display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }
body > .site-header, body > .site-footer, body > .ban-banner { flex: 0 0 auto; }
a { color: var(--green-deep); text-decoration: none; }
a:hover { color: #1F3A2C; text-decoration: underline; }
::selection { background: var(--green); color: #fff; }
h1, h2, h3 { line-height: 1.25; color: var(--ink-strong); letter-spacing: -0.01em; }
.muted { color: var(--muted); }
code { background: var(--green-l); padding: 1px 6px; border-radius: 6px; font-size: .85em; }
img { max-width: 100%; }
input::placeholder, textarea::placeholder { color: #8B948C; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.page { padding-top: 22px; padding-bottom: 52px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; border: none; cursor: pointer; font-size: 14px; font-weight: 700;
  padding: 9px 18px; border-radius: 10px; text-align: center; transition: background .15s, transform .05s; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 1px 0 rgba(20, 40, 29, 0.4); }
.btn-primary:hover { background: var(--green-d); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink-soft); border: 1px solid #C9D2C9; }
.btn-ghost:hover { border-color: var(--green); color: var(--green-deep); background: #fff; }
.btn-light { background: #fff; color: var(--green-deep); }
.btn-light:hover { background: var(--green-l); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 13px; font-size: 13px; }
.btn-lg { padding: 13px 28px; font-size: 15.5px; border-radius: 11px; }
/* Spec §11.3: write controls stay VISIBLE for a muted account, disabled with the
   reason in a title tooltip. A missing control reads as an unfinished page; a
   disabled one with an honest explanation reads as a real system. */
.is-muted { opacity: .55; cursor: not-allowed; }
.is-muted:hover { text-decoration: none; }
a.is-muted { pointer-events: auto; }
.btn.is-muted:active { transform: none; }

/* ================= Header ================= */
.site-header { background: var(--green-header); color: #fff; position: sticky; top: 0; z-index: 60;
  border-bottom: 1px solid rgba(255,255,255,.14); }
.header-inner { display: flex; align-items: center; gap: 18px; padding-top: 11px; padding-bottom: 11px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; flex: 0 0 auto; }
.brand:hover { text-decoration: none; color: #fff; }
.brand-mark { height: 40px; width: auto; display: block; flex: 0 0 auto; }
.brand-word { height: 15px; width: auto; display: block; flex: 0 0 auto; }

.search-form { display: flex; flex: 1 1 auto; max-width: 400px; background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.22); border-radius: 10px; overflow: hidden; }
.search-form input { flex: 1; border: none; background: transparent; color: #fff; padding: 9px 14px; font-size: 14px; min-width: 0; }
.search-form input::placeholder { color: rgba(255,255,255,.72); }
.search-form input:focus { outline: none; }
.search-form button { border: none; background: rgba(255,255,255,.14); color: #E6EEE8; cursor: pointer;
  padding: 0 15px; font-size: 13px; font-weight: 700; }
.search-form button:hover { background: rgba(255,255,255,.28); }

.main-nav { display: flex; gap: 6px; flex: 0 0 auto; }
.main-nav a { color: #fff; padding: 8px 14px; border-radius: 9px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.main-nav a:hover { background: rgba(255,255,255,.28); text-decoration: none; color: #fff; }
.main-nav .nav-cta { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.main-nav .nav-cta:hover { background: #EEF5EF; color: var(--accent-ink); }

.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.site-header .btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.site-header .btn-primary:hover { background: #EEF5EF; color: var(--accent-ink); }

.badge-banned { background: var(--danger); color: #fff; font-size: 10px; text-transform: uppercase;
  letter-spacing: .5px; padding: 2px 8px; border-radius: 20px; vertical-align: middle; display: inline-block; }

/* hamburger */
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 38px;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.2); border-radius: 9px; cursor: pointer; padding: 0 9px; }
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: .2s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer { display: none; flex-direction: column; gap: 4px; background: #244434; padding: 10px 20px 16px; }
.nav-drawer.open { display: flex; }
.nav-drawer a, .nav-drawer .drawer-link { color: #E6EEE8; padding: 11px 8px; border-radius: 9px; font-size: 15px;
  font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.1); background: none; text-align: left; width: 100%;
  border-left: none; border-right: none; border-top: none; cursor: pointer; }
.nav-drawer a:hover { background: rgba(255,255,255,.12); text-decoration: none; color: #fff; }
.drawer-search { max-width: none; margin-bottom: 6px; }

/* lang dropdown */
.lang-dd { position: relative; }
.lang-btn { background: rgba(255,255,255,.13); color: #fff; border: 1px solid rgba(255,255,255,.2); cursor: pointer;
  padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 700; }
.lang-btn:hover { background: rgba(255,255,255,.26); }
.lang-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: #fff;
  border: 1px solid var(--line-strong); border-radius: 11px; box-shadow: 0 12px 32px rgba(12,27,18,.22);
  overflow: hidden; min-width: 88px; }
.lang-dd.open .lang-menu { display: block; }
.lang-menu a { display: block; padding: 10px 15px; color: var(--ink); font-size: 13px; font-weight: 600; }
.lang-menu a:hover { background: #F1F3EE; text-decoration: none; }
.lang-menu a.active { background: var(--green-l); color: var(--green-deep); font-weight: 700; }

/* account menu */
.acct-menu { position: relative; }
.acct-btn { display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,.13); color: #fff;
  border: 1px solid rgba(255,255,255,.2); border-radius: 10px; padding: 5px 12px 5px 5px; cursor: pointer;
  font-size: 13.5px; font-weight: 700; }
.acct-btn:hover { background: rgba(255,255,255,.26); }
.acct-label { font-weight: 700; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: #fff;
  border: 1px solid var(--line-strong); border-radius: 11px; box-shadow: 0 12px 32px rgba(12,27,18,.22);
  overflow: hidden; min-width: 190px; }
.acct-menu.open .acct-dropdown { display: block; }
.acct-dropdown a, .acct-dropdown button { display: block; width: 100%; text-align: left; padding: 11px 16px;
  color: var(--ink); font-size: 13.5px; font-weight: 600; background: none; border: none; cursor: pointer;
  font-family: inherit; }
.acct-dropdown a + form button, .acct-dropdown a + a { border-top: 1px solid #E8EBE5; }
.acct-dropdown a:hover, .acct-dropdown button:hover { background: #F1F3EE; text-decoration: none; }

/* ---------- Ban banner ---------- */
.ban-banner { background: var(--danger-bg); border-bottom: 1px solid #EBBCB2; }
.ban-banner-inner { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.ban-icon { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: var(--danger); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.ban-text { flex: 1; min-width: 0; }
.ban-text strong { color: var(--danger); display: block; }
.ban-admin { font-size: 13px; color: #7A3B34; margin-top: 2px; }
.ban-date { font-size: 12.5px; color: #8C544C; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ---------- Server error page (auth_broken.html, HTTP 500) ----------
   Deliberately plain: this must read as the server's own error page, not as a page
   of the site. It borrows only the site's typography and palette. */
.srv-error-body { background: #F4F5F2; }
.srv-error { max-width: 620px; margin: 12vh auto; padding: 0 24px; }
.srv-error-code { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #9AA29A; margin-bottom: 10px; }
.srv-error h1 { font-size: 27px; margin: 0 0 14px; }
.srv-error-lead { font-size: 15.5px; color: var(--ink); margin: 0 0 10px; }
.srv-error-note { font-size: 14px; color: var(--ink-soft); margin: 0; }
.srv-error hr { border: none; border-top: 1px solid #DDE1DA; margin: 26px 0 12px; }
.srv-error-sig { font-size: 12px; color: #9AA29A; margin: 0; }

/* ---------- Cards / crumbs ---------- */
.card { background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.crumbs { font-size: 13px; font-weight: 600; color: #5C6860; margin-bottom: 14px; }
.crumbs a { color: #2E5540; }

/* ---------- Avatars: striped image placeholders ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 9px; color: var(--green-deep); font-weight: 700; font-size: 13px; flex: 0 0 auto;
  border: 1px solid #C2D1C5; background: var(--avatar-stripes); }
.avatar-sm { width: 28px; height: 28px; font-size: 11.5px; border-radius: 8px; }
.avatar-lg { width: 52px; height: 52px; font-size: 19px; border-radius: 13px; }
.avatar-xl { width: 64px; height: 64px; font-size: 24px; border-radius: 15px; }
/* Deterministic palette classes now share the placeholder look (photos come later) */
.av-c0, .av-c1, .av-c2, .av-c3, .av-c4, .av-c5, .av-c6,
.av-c7, .av-c8, .av-c9, .av-c10, .av-c11, .av-c12 { background: var(--avatar-stripes); color: var(--green-deep); }

/* ================= Forum board ================= */
.board-layout { display: grid; grid-template-columns: 1fr 300px; gap: 26px; align-items: start; }
.board-main, .board-side { min-width: 0; }
.board-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; }
.board-title h1 { margin: 0; font-size: 27px; font-weight: 700; letter-spacing: -0.02em; }

/* Board index: sections + category rows */
.section-block { margin-bottom: 26px; }
.section-head { font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  color: #33403A; background: none; padding: 0 0 10px 2px; margin: 0; }
.cat-list { margin: 0; border-radius: var(--radius); padding: 0; overflow: hidden; }
.cat-row { display: grid; grid-template-columns: auto 1fr 132px 176px; align-items: center; gap: 16px;
  padding: 16px 18px; border-bottom: 1px solid var(--line); color: inherit; }
.cat-row:last-child { border-bottom: none; }
.cat-row:hover { background: #EFF4F0; text-decoration: none; }
.cat-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--green-l);
  display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700;
  color: var(--green-deep); font-style: normal; }
.cat-info { min-width: 0; }
.cat-name { display: block; font-weight: 700; font-size: 15.5px; color: var(--ink-strong); }
.cat-info .cat-desc { display: block; font-size: 13.5px; color: var(--ink-soft); margin-top: 3px; }
.cat-counts { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: #5C6860; text-align: left; }
.cat-counts b { color: var(--ink-strong); font-size: 14px; }
.cat-last { display: flex; align-items: center; gap: 10px; }
.cat-lastmeta { min-width: 0; }
.cat-lastauthor { display: block; font-weight: 700; font-size: 13px; color: var(--green-deep);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-lastdate { font-size: 12px; color: var(--muted); }

/* Category page (thread listing) */
.cat-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.cat-page-head h1 { margin: 0 0 2px; font-size: 27px; font-weight: 700; letter-spacing: -0.02em; }
.thread-listing { padding: 0; overflow: hidden; }
.thread-starter { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.cat-block { margin-bottom: 20px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); background: var(--card); }
.cat-head { background: var(--green-header); color: #fff; padding: 12px 16px; }
.cat-head h2 { margin: 0; font-size: 17px; color: #fff; }
.cat-desc { display: block; font-size: 12px; opacity: .85; }
.cat-block, .sub-block { scroll-margin-top: 76px; }
.sub-block { border-top: 1px solid var(--line); }
.sub-head { display: flex; align-items: center; gap: 10px; background: var(--green-l); padding: 10px 16px;
  border-bottom: 1px solid var(--line); }
.sub-ico { font-size: 15px; font-weight: 700; color: var(--green-deep); }
.sub-head h3 { margin: 0; font-size: 15px; color: var(--green-deep); }
.sub-desc { font-size: 12px; color: var(--ink-soft); }

.thread-list { display: flex; flex-direction: column; }
.thread-row { display: grid; grid-template-columns: 1fr 92px 92px 190px; align-items: center; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); }
.thread-row:last-child { border-bottom: none; }
.thread-row.thead { background: #F6F8F4; font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  color: #5C6860; font-weight: 700; padding: 10px 18px; }
.thread-row:not(.thead):hover { background: #EFF4F0; }
.tr-topic { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.tr-icon { font-size: 13px; margin-top: 3px; color: var(--green); font-weight: 700; }
.tr-titlewrap { min-width: 0; }
.thread-link { font-weight: 700; font-size: 15px; color: var(--green-deep); }
.thread-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.chip-you { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700;
  background: var(--green-chip); color: var(--accent-ink); padding: 2px 9px; border-radius: 20px; }
.tr-stat { text-align: center; }
.tr-stat b { display: block; font-size: 15px; color: var(--ink-strong); }
.tr-stat span { font-size: 11px; color: var(--muted); }
.tr-last { display: flex; align-items: center; gap: 10px; }
.tr-lastmeta { min-width: 0; }
.tr-lastauthor { display: block; font-weight: 700; font-size: 12.5px; color: var(--green-deep);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-lastdate { font-size: 11.5px; color: var(--muted); }
.thead .tr-topic, .thead .tr-stat, .thead .tr-last { font-weight: 700; }

/* board sidebar */
.board-side { position: sticky; top: 80px; display: flex; flex-direction: column; }
.stat-card h3, .recent-card h3 { margin: 0 0 12px; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em; color: #33403A; }
.stat-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-rows > div { background: var(--green-l); border-radius: 10px; padding: 12px 14px; text-align: left; }
.stat-rows b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--green-deep); }
.stat-rows span { font-size: 12px; color: var(--ink-soft); }
.recent-list { display: flex; flex-direction: column; gap: 2px; }
.recent-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 8px; border-radius: 10px; }
.recent-item:hover { background: #EFF4F0; text-decoration: none; }
.recent-meta { min-width: 0; }
.recent-thread { display: block; font-weight: 700; font-size: 13px; color: var(--ink-strong);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-sub { font-size: 11.5px; color: var(--muted); }

/* ================= Shoutbox ================= */
.shoutbox { padding: 0; overflow: hidden; display: flex; flex-direction: column; max-height: 440px; }
.shoutbox-head { background: #fff; padding: 14px 20px 12px; border-bottom: 1px solid var(--line); }
.shoutbox-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.shoutbox-sub { font-size: 12.5px; color: var(--ink-soft); }
.shout-list { flex: 1; overflow-y: auto; padding: 14px 20px; min-height: 180px; }
.shout { display: flex; gap: 12px; margin-bottom: 13px; animation: fadein .3s ease; }
.shout-body-wrap { min-width: 0; }
.shout-author { font-weight: 700; font-size: 14px; color: var(--green-deep); }
.shout-author.bot::after { content: " · бот"; font-size: 11px; color: var(--muted); font-weight: 600; }
.shout-author.you { color: var(--green-d); }
.shout-time { color: var(--muted); font-size: 11.5px; margin-left: 6px; font-weight: 600; }
.shout-text { font-size: 14.5px; color: #1C2620; line-height: 1.55; word-wrap: break-word; overflow-wrap: anywhere; }
.shout-empty { text-align: center; padding: 28px 10px; }
/* Day separator — a message only shows HH:MM, so this is what says which day it is. */
.shout-day { display: flex; align-items: center; gap: 10px; margin: 4px 0 13px; }
.shout-day::before, .shout-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.shout-day span { color: var(--muted); font-size: 11.5px; font-weight: 600;
  text-transform: lowercase; white-space: nowrap; }
.shout-form { display: flex; gap: 10px; padding: 13px 18px; border-top: 1px solid var(--line); background: #fff; }
.shout-form input { flex: 1; border: 1.5px solid var(--line-input); border-radius: 10px; padding: 9px 14px;
  font-size: 14.5px; min-width: 0; font-family: inherit; }
.shout-form input:focus { outline: none; border-color: var(--green); box-shadow: var(--focus-ring); }
.shout-locked { padding: 12px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft);
  background: #F6F8F4; text-align: center; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Live chat hero */
.chat-hero { margin-bottom: 26px; }
.chat-hero .shoutbox { max-height: none; height: min(72vh, 560px); min-height: 520px;
  border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.chat-hero .shoutbox-head { display: flex; align-items: baseline; gap: 12px; padding: 15px 22px 13px; }
.chat-hero .shoutbox-head h2 { font-size: 17px; color: var(--green-deep); }
.chat-hero .shout-list { min-height: 0; padding: 16px 22px; }
.chat-hero .shout-form { padding: 14px 22px; }
.chat-hero .shout-form input { padding: 10px 15px; font-size: 14.5px; }

/* ================= Thread view ================= */
.thread-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 6px; }
.thread-head h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.thread-head-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; padding-top: 4px; }
.thread-count { font-size: 13px; font-weight: 600; color: #5C6860; white-space: nowrap; }
.topic-intro-lead { color: var(--ink-soft); font-size: 15.5px; margin: 4px 0 20px; max-width: 720px; }
.pin { margin-right: 4px; }

.post-body { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.post-num { color: #9AA69D; font-weight: 700; font-size: 12.5px; }
.post-num:hover { color: var(--green-deep); }
.linkbtn { background: none; border: none; color: #2E5540; font-size: 13px; cursor: pointer; padding: 0;
  font-weight: 700; font-family: inherit; }
.linkbtn:hover { text-decoration: underline; color: #1F3A2C; }

/* --- Original post (OP) --- */
.op-post { border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; background: #fff; margin-bottom: 26px; }
.op-banner { display: flex; align-items: center; gap: 14px; padding: 16px 22px; background: #F6F8F4;
  border-bottom: 1px solid var(--line); color: var(--ink); }
.op-banner .avatar-xl { border: 1px solid #C2D1C5; }
.op-ident { min-width: 0; }
.op-authorline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.op-author { font-size: 16px; font-weight: 700; color: var(--green-deep); }
.op-tag { font-size: 11px; background: var(--green-chip); color: var(--accent-ink); padding: 3px 9px;
  border-radius: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.op-date { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 3px; }
.op-body { padding: 20px 22px; font-size: 15px; line-height: 1.65; color: #1C2620; }
.op-body + .react-bar { padding: 12px 22px; margin-top: 0; border-top: 1px solid var(--line); }

/* --- Replies --- */
.replies-head { font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  color: #33403A; margin: 0 0 12px; }
.replies { display: flex; flex-direction: column; gap: 14px; }
.reply-post { background: #fff; border: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong);
  border-radius: 14px; box-shadow: 0 1px 2px rgba(19,27,22,.05); padding: 14px 20px; margin-left: 0; }
.reply-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.reply-author { font-weight: 700; font-size: 14.5px; color: var(--green-deep); }
.reply-meta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.reply-date { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.reply-body { font-size: 14.5px; line-height: 1.6; color: #1C2620; }

/* --- Reactions bar --- */
.react-bar { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.react-btn { display: inline-flex; align-items: center; gap: 6px; background: #fff;
  border: 1px solid #C9D2C9; color: var(--ink-soft); border-radius: 9px; padding: 5px 13px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; transition: .12s; font-family: inherit; }
.react-btn:hover { border-color: var(--green); color: var(--green-deep); background: #fff; }
.react-btn.dislike:hover { border-color: #B0483A; color: var(--danger); }
.react-btn.like.active { background: var(--green-l); color: var(--green-deep); border-color: var(--green); }
.react-btn.dislike.active { background: var(--danger-bg); color: var(--danger); border-color: #B0483A; }
.react-btn .ric { font-weight: 700; }
.react-spacer { flex: 1; }
.react-static { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
/* Quoted post inside a reply */
.quote { margin: 0 0 12px; border-left: 3px solid #A7C4B0; background: #F2F7F1; border-radius: 0 9px 9px 0;
  padding: 9px 14px; }
.quote cite { display: block; font-style: normal; font-weight: 700; font-size: 12.5px; color: var(--green-deep); margin-bottom: 4px; }
.quote-body { white-space: pre-wrap; color: var(--ink-soft); font-size: 13.5px; overflow-wrap: anywhere; }

/* ---------- Post media ---------- */
.post-media { margin: 12px 0; max-width: 520px; }
.post-media img, .post-media video { display: block; width: 100%; height: auto; border-radius: 12px;
  border: 1px solid var(--line-strong); background: #000; }
/* no figcaption: pictures are posted bare, never captioned */
.post-media-ph .media-ph { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; aspect-ratio: 16 / 9; border-radius: 12px; border: 1px solid #C2D1C5;
  background: var(--avatar-stripes); color: var(--ink-soft); text-align: center; padding: 14px; }
.media-ph-icon { display: none; }
.media-ph-label { font-size: 12.5px; font-weight: 600; max-width: 90%; background: rgba(255,255,255,.85);
  padding: 4px 10px; border-radius: 7px; }
.video-ph { background: #1C2620; color: #E6EEE8; border-color: #33443A; }
.video-ph .media-ph-label { background: rgba(0,0,0,.4); }
.media-ph-play { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center; font-size: 20px; padding-left: 4px; }

/* ---------- Poll ---------- */
.poll { margin: 12px 0; max-width: 460px; border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 14px 16px; background: #F6F8F4; }
.poll-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--ink-strong); }
.poll-row { margin-bottom: 9px; }
.poll-line { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 3px; }
.poll-label { font-weight: 600; color: var(--ink-soft); }
.poll-pct { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.poll-bar { height: 9px; border-radius: 5px; background: #DCE4DB; overflow: hidden; }
.poll-fill { height: 100%; border-radius: 5px; background: var(--green); }
.poll-win .poll-label { color: var(--green-deep); }
.poll-win .poll-fill { background: var(--green-d); }
.poll-foot { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Compose tools */
.compose-tools { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 2px; }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--ink-soft);
  border: 1px solid #C9D2C9; border-radius: 9px; padding: 7px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; }
.tool-btn:hover { border-color: var(--green); color: var(--green-deep); background: #fff; }

.comments { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.comment { display: flex; align-items: center; gap: 7px; padding: 4px 0; font-size: 13px; }
.comment-author { font-weight: 700; color: var(--green-deep); }
.comment-body { overflow-wrap: anywhere; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form input { flex: 1; border: 1px solid var(--line-input); border-radius: 9px; padding: 6px 10px;
  font-size: 13px; min-width: 0; font-family: inherit; }
.reply-block { margin-top: 22px; }
.reply-block h2 { margin-top: 0; font-size: 17px; font-weight: 700; }
.reply-block textarea { width: 100%; border: 1.5px solid var(--line-input); border-radius: 10px; padding: 12px 15px;
  font-size: 14.5px; font-family: inherit; margin-bottom: 12px; resize: vertical; line-height: 1.55; }
.reply-block textarea:focus { outline: none; border-color: var(--green); box-shadow: var(--focus-ring); }
.reply-locked { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--ink-soft); }

/* ================= Search / compose ================= */
.search-inline { display: flex; gap: 10px; }
.search-inline input { flex: 1; border: 1.5px solid var(--line-input); border-radius: 10px; padding: 10px 15px;
  font-size: 15px; min-width: 0; font-family: inherit; }
.search-inline input:focus { outline: none; border-color: var(--green); box-shadow: var(--focus-ring); }
.search-summary { color: var(--ink-soft); margin: 4px 2px 16px; font-size: 14px; }
.search-h { margin: 0 0 10px; font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: #33403A; }
.search-hit { display: block; padding: 11px 12px; border-radius: 10px; font-weight: 700; font-size: 14.5px;
  color: var(--green-deep); }
.search-hit:hover { background: #EFF4F0; text-decoration: none; }
.post-hit + .post-hit, .search-hit + .search-hit { border-top: 1px solid var(--line); border-radius: 0; }
.hit-top { font-size: 13px; color: #5C6860; font-weight: 400; }
.hit-top b { color: var(--green-deep); }
.hit-thread { color: var(--ink); font-weight: 600; }
.hit-snip { font-size: 13.5px; color: var(--ink-soft); margin-top: 3px; font-weight: 400; line-height: 1.5; }
.empty-state { text-align: center; padding: 30px; }
.compose-card label { display: block; font-weight: 600; font-size: 13.5px; color: #33403A; margin: 15px 0 6px; }
.compose-card input, .compose-card select, .compose-card textarea { width: 100%; border: 1.5px solid var(--line-input);
  border-radius: 10px; padding: 10px 14px; font-size: 14.5px; font-family: inherit; }
.compose-card input:focus, .compose-card select:focus, .compose-card textarea:focus { outline: none;
  border-color: var(--green); box-shadow: var(--focus-ring); }
.compose-card button[type="submit"] { margin-top: 18px; }

/* ================= Public landing ================= */
.page-fluid { padding: 0; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .09em; font-size: 12.5px;
  font-weight: 700; color: #2E5540; background: none; padding: 0; border-radius: 0; }
.eyebrow.center { display: block; width: max-content; margin: 0 auto; }
.landing-hero { position: relative; overflow: hidden; background: #1B3326; color: #fff; }
.hero-svg { display: none; }
.hero-photo { display: block; width: 100%; aspect-ratio: 2 / 1; min-height: 560px; max-height: calc(100vh - 62px);
  object-fit: cover; object-position: 50% 80%; }
/* Text sits on the photo's bottom edge. The scrim is the text box's own background, so it
   always starts ~150px above the first line however tall the stacked text gets on mobile. */
.hero-overlay { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 180px clamp(20px, 2.5vw, 36px) clamp(24px, 3vw, 40px);
  background: linear-gradient(to bottom, rgba(16, 32, 23, 0) 0, rgba(16, 32, 23, .7) 150px, rgba(16, 32, 23, .9) 100%);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px 40px; align-items: end; }
.hero-head, .hero-body { min-width: 0; }
.hero-body { max-width: 520px; justify-self: end; }
.hero-title, .hero-lead, .mission-text { overflow-wrap: anywhere; }
.hero-badge { font-size: 13px; font-weight: 600; color: #D6E2D9; margin: 0 0 12px; }
.hero-title { font-size: clamp(32px, 4.2vw, 60px); font-weight: 700; line-height: 1.05; margin: 0; color: #fff;
  letter-spacing: -0.025em; text-wrap: balance; }
.hero-lead { font-size: 16.5px; color: #E6EEE8; margin: 0 0 20px; line-height: 1.6; text-wrap: pretty; }
.hero-cta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hero-cta .btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: none; padding: 13px 26px; font-size: 15px; }
.hero-cta .btn-primary:hover { background: #EEF5EF; color: var(--accent-ink); }
.hero-private { font-size: 13px; color: #D6E2D9; margin: 0; }
.mission-band { text-align: center; padding: 56px 0; }
.mission-inner { max-width: 780px; }
.mission-band h2 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin: 14px 0 16px; }
.mission-text { font-size: 16.5px; color: #3C463F; margin: 0; line-height: 1.65; }
.founder-band { background: #fff; padding: 56px 0; margin: 0; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); }
.founder-inner { display: flex; flex-wrap: wrap; gap: 28px 44px; align-items: flex-start; max-width: 980px; }
.founder-portrait { flex: 0 0 200px; }
.founder-text { flex: 1 1 380px; min-width: 0; }
.founder-portrait .portrait-img { display: block; width: 200px; height: 200px; border-radius: 50%; object-fit: cover;
  object-position: 50% 30%; border: 1px solid #C2D1C5; }
.founder-portrait svg { display: none; }
.founder-portrait .portrait-ph { width: 190px; height: 190px; border-radius: 50%; border: 1px solid #C2D1C5;
  background: repeating-linear-gradient(45deg, #E3EBE5 0 8px, #C9D8CD 8px 16px);
  display: flex; align-items: center; justify-content: center; }
.founder-portrait .portrait-ph span { font-size: 11.5px; font-weight: 600; color: #33403A;
  background: rgba(255,255,255,.85); padding: 4px 10px; border-radius: 7px; }
.founder-text h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 10px 0 14px; }
.founder-quote { border-left: 3px solid var(--green); margin: 0 0 18px; padding: 4px 0 4px 18px;
  font-style: normal; font-weight: 500; font-size: 18px; line-height: 1.55; color: #1C2620; }
.founder-text p { color: #3C463F; margin: 0 0 12px; font-size: 15px; line-height: 1.65; }
.founder-sign { font-weight: 700; color: var(--green-deep) !important; font-size: 14px; }
/* Stats + timeline: values copied 1:1 from the design (Лендинг.dc.html). */
.stats-band { padding: 56px 0; }
.stats-band .wrap { max-width: 1020px; padding: 0 20px; }            /* 980px content */
.stats-title { margin: 0 0 24px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink-strong); text-align: center; line-height: normal; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.stat-tile { background: #fff; border: 1px solid #CFD6CE; border-radius: 14px;
  box-shadow: 0 1px 2px rgba(19,27,22,.05); padding: 20px 22px; text-align: center; }
.stat-icon { display: none; }
.stat-num { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; color: #2E5540; line-height: normal; margin: 0; }
.stat-label { font-size: 13.5px; color: #4E5A52; margin-top: 4px; line-height: 1.4; }

.events-band { background: #fff; border-top: 1px solid #DFE4DD; padding: 56px 0 64px; }
.events-band .wrap { max-width: 900px; padding: 0 20px; }            /* 860px content */
.events-band .eyebrow.center { margin: 0 auto 10px; line-height: normal; }
.events-title { margin: 0 0 32px; font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink-strong); text-align: center; line-height: normal; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: clamp(52px, 12vw, 92px) minmax(0, 1fr); gap: clamp(12px, 3vw, 24px); }
.tl-rail { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tl-dot { width: 18px; height: 18px; border-radius: 50%; background: #2E5540; border: 3px solid #D2E2D6;
  flex: 0 0 auto; margin-top: 6px; }
.tl-year { font-size: 14px; font-weight: 700; color: #2E5540; line-height: normal; }
.tl-line { flex: 1; width: 2px; background: #DCE4DB; min-height: 24px; }
.tl-card { border: 1px solid #CFD6CE; border-radius: 14px; box-shadow: 0 1px 2px rgba(19,27,22,.05);
  padding: 18px 22px; margin: 0 0 22px; background: #FAFBF8; }
.tl-icon { display: none; }
.tl-card h3 { margin: 0 0 4px; font-size: 17.5px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink-strong); line-height: normal; }
.tl-sector { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #2E5540; margin-bottom: 10px; }
.tl-card p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.6; color: #3C463F; }
.tl-card p.tl-result { margin: 4px 0 0; padding: 10px 12px; font-size: 13.5px; line-height: 1.5;
  color: #1F3A2C; background: #E9F1EB; border-left: 3px solid #2E5540; border-radius: 0 8px 8px 0; }
.tl-result-label { font-weight: 700; color: #2E5540; }
.join-note { margin: 12px 0 0; text-align: center; font-size: 13.5px; color: #5C6860; }

/* ---------- Auth / admin ---------- */
.auth-wrap { max-width: 420px; margin: 44px auto; }
.auth-card { padding: 28px 30px; }
.auth-card h1 { margin: 0 0 6px; font-size: 23px; font-weight: 700; letter-spacing: -0.02em; }
.auth-card label { display: block; font-size: 13.5px; font-weight: 600; color: #33403A; margin: 15px 0 0; }
.auth-card input { width: 100%; border: 1.5px solid var(--line-input); border-radius: 10px; padding: 10px 14px;
  font-size: 15px; margin-top: 6px; font-family: inherit; }
.auth-card input:focus { outline: none; border-color: var(--green); box-shadow: var(--focus-ring); }
.auth-card .btn-block { margin-top: 20px; padding: 12px; font-size: 15px; }
.auth-hint { font-size: 13px; margin-top: 14px; text-align: center; }
.form-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #EBBCB2; padding: 10px 13px;
  border-radius: 10px; font-size: 14px; margin: 10px 0; }
.admin-refresh { margin-bottom: 16px; }
.admin-table code { font-size: 12px; }
.detail-cell { font-size: 12.5px; color: var(--muted); max-width: 240px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }
.pill-delivered { background: var(--green-chip); color: var(--green-deep); }
.pill-sent, .pill-pending { background: #FBEFC9; color: #8A6D1B; }
.pill-soft_bounce { background: #FBEFC9; color: #8A6D1B; }
.pill-hard_bounce, .pill-blocked, .pill-error { background: var(--danger-bg); color: var(--danger); }
.board-table { width: 100%; border-collapse: collapse; }
.board-table th, .board-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line);
  font-size: 13.5px; }
.board-table th { background: #F6F8F4; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: #5C6860; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-footer); color: #A7C4B0; margin-top: 44px; padding: 22px 0; }
.page-fluid + .site-footer { margin-top: 0; }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-logo { height: 13px; width: auto; display: block; }
.foot-rights { font-size: 13px; opacity: 1; margin: 0; }

/* ================= Responsive ================= */
@media (max-width: 1024px) {
  .board-layout { grid-template-columns: 1fr; }
  .board-side { position: static; }
  .shoutbox { max-height: 400px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .header-inner .search-form, .main-nav, .acct-menu { display: none; }
  .nav-drawer { display: none; }
  .nav-drawer.open { display: flex; }
  .header-right { margin-left: auto; }
  .brand { margin-right: auto; }
}

@media (max-width: 720px) {
  .mission-band h2 { font-size: 25px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .page { padding-top: 14px; padding-bottom: 32px; }
  .card { padding: 15px; }
  .chat-hero .shoutbox { height: min(70vh, 560px); min-height: 460px; }
  .chat-hero .shoutbox-head h2 { font-size: 16px; }
  .cat-page-head { flex-direction: column; }
  .board-title { align-items: stretch; }
  .ban-banner-inner { flex-wrap: wrap; }

  /* Thread rows: compact (title + reply pill, starter line). */
  .thread-row.thead { display: none; }
  .thread-row { grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 13px 14px; }
  .tr-topic { gap: 9px; align-items: flex-start; }
  .thread-link { font-size: 15px; }
  .tr-stat { text-align: center; align-self: center; background: var(--green-chip);
    border-radius: 999px; padding: 3px 11px; line-height: 1.4; }
  .tr-stat b { display: inline; font-size: 13px; color: var(--green-deep); }
  .tr-stat span { font-size: 0; }            /* keep the number, drop the word */
  .tr-stat + .tr-stat { display: none; }     /* hide the views stat */
  .tr-last { display: none; }                /* drop the last-post block on mobile */

  .op-body { padding: 16px; font-size: 14.5px; }
  .op-body + .react-bar { padding: 10px 16px; }
  .reply-post { margin-left: 0; }
  .op-authorline, .reply-head { flex-wrap: wrap; }
  .reply-meta { margin-left: 0; }

  /* Board categories: compact 2-line rows (icon + name + count pill, 1-line desc). */
  .cat-row { grid-template-columns: auto 1fr auto; gap: 12px 13px; align-items: center; padding: 13px 14px; }
  .cat-ico { width: 40px; height: 40px; border-radius: 11px; font-size: 15px; }
  .cat-name { font-size: 15px; }
  .cat-info .cat-desc { margin-top: 2px; font-size: 12.5px; color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cat-counts { flex-direction: row; gap: 0; padding: 3px 11px; background: var(--green-chip);
    border-radius: 999px; align-self: center; line-height: 1.4; }
  .cat-counts span:last-child { display: none; }     /* hide message count */
  .cat-counts span:first-child { font-size: 0; }     /* keep the topic count number, drop the word */
  .cat-counts b { font-size: 13px; color: var(--green-deep); }
  .cat-last { display: none; }                       /* drop the last-post block on mobile */

  .thread-head { flex-direction: column; }
  .board-title { flex-direction: column; align-items: flex-start; }
  .stat-rows { grid-template-columns: 1fr 1fr; }

  .post-side { align-items: flex-start; }
  .post-side > * { min-width: 0; max-width: 100%; }
  .post-userstats { flex-basis: 100%; }
}

@media (max-width: 380px) {
  .acct-label { max-width: 84px; }
}
