/* ============================================================
   Taunton Muslim Community — Community Hub page styles
   Built on the same palette as the main site (styles.css).
   ============================================================ */

/* ---------- Hero strip ---------- */
.ch-hero {
  background: linear-gradient(140deg, #0A5C4B 0%, #0F7B64 55%, #1D7FA3 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ch-hero::after {
  content: "";
  position: absolute; top: -80px; right: -60px;
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 183, 51, 0.22), transparent 70%);
  pointer-events: none;
}
.ch-hero__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px; padding-top: 56px; padding-bottom: 56px;
  position: relative; z-index: 1;
}
.ch-hero__tag {
  display: inline-block; font-size: 12px; font-weight: 800;
  letter-spacing: 1.5px; color: var(--gold);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.ch-hero__title {
  font-family: var(--font-display); font-size: clamp(30px, 5vw, 46px);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.1;
}
.ch-hero__sub {
  margin-top: 12px; max-width: 540px; font-size: 16px; color: rgba(255, 255, 255, 0.88);
}
.ch-hero__stats {
  display: flex; gap: 16px; flex-shrink: 0;
}
.ch-stat {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px; padding: 18px 22px; text-align: center;
  min-width: 108px;
  backdrop-filter: blur(6px);
}
.ch-stat b {
  display: block; font-family: var(--font-display);
  font-size: 26px; font-weight: 800; color: var(--gold);
}
.ch-stat span { font-size: 12.5px; color: rgba(255, 255, 255, 0.85); }

/* ---------- Auth card ---------- */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  margin: 0 auto 40px;
  position: relative; z-index: 2;
  overflow: hidden;
  max-width: 620px;
}
.auth-card__tabs { display: flex; border-bottom: 1px solid var(--line); }
.auth-tab {
  flex: 1; padding: 16px; font-weight: 700; font-size: 15px;
  color: var(--muted); border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.auth-tab:hover { color: var(--brand); }
.auth-tab.active { color: var(--brand); border-bottom-color: var(--brand); background: var(--brand-soft); }
.auth-card__body { padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.auth-card__body form { display: flex; flex-direction: column; gap: 16px; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--faint); font-size: 13px; font-weight: 700;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-card__note { font-size: 13px; color: var(--muted); text-align: center; }
.auth-inline { display: flex; justify-content: flex-end; margin-top: -8px; }
.auth-link {
  border: 0; background: none; color: var(--brand); font-size: 13px; font-weight: 800;
  cursor: pointer; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px;
}
.auth-link:hover { color: var(--brand-2); }
.auth-ok { background: #eefbf2; color: var(--ok, #128C4A); border: 1px solid #bce6cd; border-radius: 10px; padding: 12px 14px; font-size: 13.5px; font-weight: 600; }
.btn--block { display: flex; width: 100%; justify-content: center; align-items: center; gap: 10px; }

/* ---------- Signed-in bar ---------- */
.userbar {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 18px; margin: 24px 0 34px;
  box-shadow: var(--shadow-sm);
}
.userbar__avatar {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 18px; color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 6px 14px rgba(15, 123, 100, 0.25);
}
.userbar__who { flex: 1; min-width: 0; }
.userbar__who b { display: block; font-family: var(--font-display); font-size: 16px; }
.userbar__who span { font-size: 13px; color: var(--muted); }
.userbar .btn { flex-shrink: 0; }

/* ---------- Tabs ---------- */
.ch-body { padding-bottom: 70px; scroll-margin-top: 90px; }
.ch-tabs {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 26px;
}
.ch-tab {
  flex: 1 1 0; min-width: 0; justify-content: center; text-align: center;
  display: flex; align-items: center; gap: 6px;
  padding: 11px 12px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--line-2);
  font-weight: 700; font-size: 13.5px; color: var(--muted);
  transition: all 0.2s; white-space: normal; line-height: 1.2;
}
.ch-tab:hover { color: var(--brand); border-color: var(--brand); }
.ch-tab.active { background: var(--grad-brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(15, 123, 100, 0.22); }
.ch-tab__count {
  font-size: 11.5px; font-weight: 800; padding: 2px 8px;
  border-radius: 999px; background: rgba(15, 123, 100, 0.12); color: var(--brand);
  flex-shrink: 0; white-space: nowrap;
}
.ch-tab.active .ch-tab__count { background: rgba(255, 255, 255, 0.2); color: #fff; }
.ch-tab__count:empty { display: none; }
/* Fresh-activity dot on tabs */
.ch-tab.has-fresh::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  box-shadow: 0 0 6px rgba(242, 109, 61, 0.6);
  animation: newPulse 1.8s ease-in-out infinite;
}
.ch-tab.active.has-fresh::after { background: #fff; }

/* ---------- Composer ---------- */
.composer {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 20px; margin-bottom: 26px;
  box-shadow: var(--shadow-sm);
}
.composer textarea, .composer input[type="text"], .composer select {
  width: 100%; border: 1px solid var(--line-2);
  border-radius: 12px; padding: 12px 14px; background: var(--bg);
  color: var(--ink); resize: vertical;
}
.composer textarea:focus, .composer input[type="text"]:focus, .composer select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 123, 100, 0.12);
}
.composer__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.composer__avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 16px; color: #fff;
  background: var(--grad-brand);
}
.composer__tag {
  max-width: 220px; font-weight: 600; cursor: pointer;
}
/* Custom dropdown — premium pill menu replacing native <select> */
.custom-drop { position: relative; flex-shrink: 0; }
.custom-drop__btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1.5px solid var(--line-2); border-radius: 999px;
  background: var(--bg); color: var(--ink); cursor: pointer;
  font-family: var(--font-display); font-size: 13.5px; font-weight: 700;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.custom-drop__btn:hover { border-color: var(--brand); }
.custom-drop__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.custom-drop__chev { flex-shrink: 0; transition: transform 0.25s cubic-bezier(0.25, 0.1, 0.25, 1); color: var(--muted); }
.custom-drop.open .custom-drop__chev { transform: rotate(180deg); }
.custom-drop.open .custom-drop__btn { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 123, 100, 0.1); }
.custom-drop__menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 100;
  min-width: 200px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
  animation: dropIn 0.18s ease;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.custom-drop__opt {
  display: block; width: 100%; padding: 11px 16px; border: none; background: none;
  text-align: left; font-family: var(--font-display); font-size: 13.5px; font-weight: 600;
  color: var(--ink); cursor: pointer; transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.custom-drop__opt:hover { background: var(--brand-soft); color: var(--accent-deep); }
.custom-drop__opt.selected { background: var(--grad-brand); color: #fff; font-weight: 700; }
.composer__title { font-weight: 700; font-family: var(--font-display); font-size: 15px; }
.composer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
.composer__grid--3 { grid-template-columns: auto 1fr 1fr; }
.composer__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-top: 12px;
}
.composer__hint { font-size: 12.5px; color: var(--muted); }
.composer--locked {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--brand-soft), var(--accent-soft));
  border-color: transparent;
}
.composer--locked p { font-weight: 600; font-size: 14.5px; }
.lf-kind { display: flex; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--bg); }
.lf-kind__btn { flex: 1; padding: 10px 18px; font-weight: 700; font-size: 13.5px; color: var(--muted); transition: all 0.2s; }
.lf-kind__btn.active { background: var(--accent); color: #fff; }
.lf-kind__btn:last-child.active { background: var(--brand); }

/* ---------- Feed welcome card ---------- */
.feed-welcome {
  margin-bottom: 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0F7B64, #1D7FA3);
  color: #fff;
  box-shadow: 0 12px 32px rgba(15, 123, 100, 0.22);
}
.feed-welcome__inner { padding: 20px 22px; }
.feed-welcome__salam {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 18px; font-weight: 800; margin-bottom: 6px;
}
.feed-welcome__salam svg { flex-shrink: 0; opacity: 0.85; }
.feed-welcome p {
  font-size: 13.5px; line-height: 1.5; opacity: 0.88; margin: 0;
  max-width: 500px;
}
.feed-welcome__edit {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 10px; padding: 4px 10px; border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px; background: rgba(255,255,255,.12); color: #fff;
  font-size: 12px; font-weight: 700; cursor: pointer;
  transition: background 0.2s;
}
.feed-welcome__edit:hover { background: rgba(255,255,255,.25); }
.feed-welcome__editor { margin-top: 12px; }
.feed-welcome__editor textarea {
  width: 100%; border: 1px solid rgba(255,255,255,.3); border-radius: 10px;
  padding: 10px 12px; font-size: 13px; background: rgba(255,255,255,.15);
  color: #fff; resize: vertical; font-family: inherit;
}
.feed-welcome__editor textarea::placeholder { color: rgba(255,255,255,.5); }
.feed-welcome__editor textarea:focus { outline: none; border-color: rgba(255,255,255,.6); box-shadow: 0 0 0 3px rgba(255,255,255,.1); }
.feed-welcome__editor-acts { display: flex; gap: 8px; margin-top: 8px; }
.feed-welcome__editor-acts .btn--brand { background: var(--grad-brand); color: #fff; border: none; }
.feed-welcome__editor-acts .btn--brand:hover { opacity: 0.9; }
.feed-welcome__editor-acts .btn--ghost { color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); }
.feed-welcome__editor-acts .btn--ghost:hover { background: rgba(255,255,255,.22); }
/* ---------- Feed date sections ---------- */
.feed-section { margin-bottom: 6px; }
.feed-section__head {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 22px 10px;
  font-family: var(--font-display);
}
.feed-section__head:first-child { margin-top: 10px; }
.feed-section__head svg { color: var(--brand); flex-shrink: 0; }
.feed-section__title { font-size: 16px; font-weight: 800; color: var(--ink); margin: 0; }
.feed-section__count {
  font-size: 12px; font-weight: 700; color: var(--muted);
  background: var(--brand-soft); padding: 2px 9px; border-radius: 999px;
}
/* New-post highlight */
.post--new {
  position: relative;
  border-color: rgba(15, 123, 100, 0.3);
  background: linear-gradient(120deg, rgba(15, 123, 100, 0.04), rgba(247, 183, 51, 0.04));
}
.post__fresh-dot {
  position: absolute; top: 14px; right: 34px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 8px rgba(15, 123, 100, 0.5);
  animation: newPulse 1.8s ease-in-out infinite;
}
@keyframes newPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(1.3); } }
.post__fresh { font-style: normal; font-weight: 700; color: var(--brand); font-size: 0.9em; }
.post {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 20px 22px; margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  animation: postIn 0.3s ease;
}
@keyframes postIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.post__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.post__avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 17px; color: #fff;
}
.post__who { flex: 1; min-width: 0; }
.post__who b { display: block; font-family: var(--font-display); font-size: 15px; }
.post__who span { font-size: 12.5px; color: var(--faint); }
.post__tag {
  font-size: 11.5px; font-weight: 800; padding: 4px 11px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand);
}
.post__tag--Question { background: var(--accent-soft); color: var(--accent-deep); }
.post__tag--Help { background: #FDEFE4; color: #C25E12; }
.post__tag--Recommendation { background: #FBF3DC; color: #9A6B00; }
.post__tag--News { background: #E6F1FA; color: #1D5F8A; }
.post__body { font-size: 15.5px; line-height: 1.65; white-space: pre-line; word-break: break-word; }
.post__delete {
  color: var(--faint); padding: 6px; border-radius: 8px; font-size: 12px;
  opacity: 0; transition: all 0.2s;
}
.post:hover .post__delete { opacity: 1; }
.post__delete:hover { color: var(--accent-deep); background: var(--accent-soft); }
/* Post action tools (edit, delete, ban) */
.post__tools {
  display: flex; align-items: center; gap: 4px; margin-left: auto;
  opacity: 0; transition: opacity 0.2s;
}
.post:hover .post__tools { opacity: 1; }
.post__tool {
  width: 28px; height: 28px; border-radius: 8px; border: none; cursor: pointer;
  display: grid; place-items: center; font-size: 12px; transition: all 0.2s;
  color: var(--muted); background: transparent;
}
.post__tool:hover { background: var(--brand-soft); color: var(--brand); }
.post__del-btn:hover { background: rgba(244,67,54,.08); color: #e53935; }
.post__ban-btn {
  width: auto; padding: 3px 8px; font-size: 10.5px; font-weight: 700;
  border-radius: 5px; border: 1px solid rgba(244,67,54,.25); color: #c62828;
  background: rgba(244,67,54,.05);
}
.post__ban-btn:hover { background: rgba(244,67,54,.15); }
.post__ban-btn--active { border-color: #c62828; background: rgba(244,67,54,.1); }
/* Ban duration dropdown */
.post__ban-wrap { position: relative; }
.post__ban-menu {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 50;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); overflow: hidden; min-width: 130px;
  animation: dropIn 0.15s ease;
}
.post__ban-menu button {
  display: block; width: 100%; padding: 8px 14px; border: none; background: none;
  text-align: left; font-size: 12.5px; font-weight: 600; cursor: pointer;
  color: var(--ink); transition: background 0.15s;
}
.post__ban-menu button:hover { background: var(--brand-soft); }
.post__ban-undo { color: var(--brand) !important; border-top: 1px solid var(--line) !important; font-weight: 700; }
/* Inline post editor */
.post__edit-area { margin-top: 8px; }
.post__edit-input {
  width: 100%; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; font-family: inherit; resize: vertical;
  background: var(--bg); color: var(--ink);
}
.post__edit-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,123,100,.1); }
.post__edit-acts { display: flex; gap: 8px; margin-top: 8px; }
.post__actions {
  display: flex; gap: 8px; align-items: center;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.post__act {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 11px;
  font-weight: 700; font-size: 13.5px; color: var(--muted);
  border: 1px solid var(--line-2); background: var(--surface);
  transition: all 0.2s;
}
.post__act:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.post__act svg { width: 16px; height: 16px; }
/* Fresh-reply indicator on comment button */
.post__act.has-fresh-replies::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 6px rgba(242,109,61,.5);
  animation: newPulse 1.8s ease-in-out infinite; margin-right: 2px;
}
.post__new-replies { font-style: normal; font-weight: 700; color: var(--accent); font-size: 0.85em; margin-left: 4px; }
/* Fresh-reply highlight */
.reply--new {
  background: linear-gradient(120deg, rgba(15,123,100,.04), rgba(247,183,51,.05));
  border-radius: 10px; padding: 8px 10px; margin: 2px -4px;
}
.reply__fresh { font-style: normal; font-weight: 700; color: var(--brand); font-size: 0.85em; }
.post__act.is-liked {
  background: var(--accent-soft); border-color: var(--accent);
  color: var(--accent-deep);
}
.post__act.is-liked svg { fill: var(--accent); color: var(--accent); }
.post__act.is-open { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.post__act:disabled { cursor: default; opacity: 0.7; }

/* ---------- Replies ---------- */
.replies { margin-top: 14px; display: none; }
.replies.open { display: block; animation: postIn 0.25s ease; }
.reply {
  display: flex; gap: 10px; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 14px; margin-bottom: 10px;
}
.reply__avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 13px; color: #fff;
}
.reply__body { flex: 1; min-width: 0; }
.reply__who { font-size: 12.5px; font-weight: 700; }
.reply__who span { color: var(--faint); font-weight: 500; }
.reply__text { font-size: 14.5px; margin-top: 3px; line-height: 1.55; white-space: pre-line; word-break: break-word; }
.reply__delete { color: var(--faint); padding: 4px; border-radius: 6px; font-size: 12px; opacity: 0; transition: all 0.2s; }
.reply:hover .reply__delete { opacity: 1; }
.reply__delete:hover { color: var(--accent-deep); background: var(--accent-soft); }
.reply-composer { display: flex; gap: 10px; margin-top: 12px; }
.reply-composer input {
  flex: 1; border: 1px solid var(--line-2); border-radius: 12px;
  padding: 11px 14px; background: var(--bg); color: var(--ink);
}
.reply-composer input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 123, 100, 0.12); }
.reply-composer .btn { flex-shrink: 0; }

/* ---------- Event & lost/found cards ---------- */
.ch-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 20px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 10px;
  animation: postIn 0.3s ease;
}
.ch-card__head { display: flex; align-items: center; gap: 10px; }
.ch-card__avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 15px; color: #fff;
}
.ch-card__who { flex: 1; min-width: 0; }
.ch-card__who b { display: block; font-family: var(--font-display); font-size: 14px; }
.ch-card__who span { font-size: 12px; color: var(--faint); }
.ch-card__title { font-family: var(--font-display); font-size: 18px; font-weight: 800; line-height: 1.3; }
.ch-card__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.ch-card__meta span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 999px;
}
.ch-card__meta svg { width: 14px; height: 14px; color: var(--brand); }
.ch-card__details { font-size: 14.5px; color: var(--ink); line-height: 1.6; white-space: pre-line; word-break: break-word; }
.ch-card__foot { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.ch-card__badge {
  font-size: 11px; font-weight: 800; padding: 3px 10px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep);
}
.ch-card__badge--found { background: var(--brand-soft); color: var(--brand); }
.ch-card__badge--resolved { background: #EAF3EF; color: #4C8A72; }
.ch-card__resolve {
  margin-left: auto; font-size: 12.5px; font-weight: 700;
  color: var(--brand); border: 1px solid var(--line-2);
  padding: 7px 13px; border-radius: 10px; transition: all 0.2s;
}
.ch-card__resolve:hover { background: var(--brand-soft); border-color: var(--brand); }
.ch-card__delete { color: var(--faint); padding: 6px; border-radius: 8px; font-size: 12px; }
.ch-card__delete:hover { color: var(--accent-deep); background: var(--accent-soft); }

/* ---------- How-to guide ---------- */
.howto {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: 30px; margin: 48px 0 18px;
  box-shadow: var(--shadow);
}
.howto__head { text-align: center; margin-bottom: 24px; }
.howto__head h2 { font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.howto__head p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.howto__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.howto__step {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px;
}
.howto__num {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 16px; color: #fff;
  background: var(--grad-brand); margin-bottom: 10px;
  box-shadow: 0 6px 14px rgba(15, 123, 100, 0.22);
}
.howto__step:nth-child(2) .howto__num { background: linear-gradient(135deg, #F7B733, #E8961E); }
.howto__step:nth-child(3) .howto__num { background: linear-gradient(135deg, #F26D3D, #E2551F); }
.howto__step:nth-child(4) .howto__num { background: linear-gradient(135deg, #1D7FA3, #14576E); }
.howto__step b { font-family: var(--font-display); font-size: 14.5px; display: block; margin-bottom: 4px; }
.howto__step p { font-size: 13px; color: var(--muted); line-height: 1.55; }
.howto__tips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  padding-top: 4px;
}
.howto__tips span {
  font-size: 12.5px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); padding: 7px 14px; border-radius: 999px;
}

/* ---------- Setup notice (no keys yet) ---------- */
.setup-notice {
  background: #FFF8E6; border: 1px solid #F0DC9C;
  border-radius: 18px; padding: 22px 24px; margin-bottom: 24px;
  color: #7A5B00;
}
.setup-notice h3 { font-family: var(--font-display); font-size: 17px; margin-bottom: 8px; color: #5C4500; }
.setup-notice code {
  background: #FFF; border: 1px solid #F0DC9C; border-radius: 6px;
  padding: 1px 6px; font-size: 13px;
}
.setup-notice ol { margin: 10px 0 4px 20px; font-size: 14px; line-height: 1.8; }

/* Resource "how it works" boxes — icons need the brand background */
.res-card__icon { background: var(--ic, var(--brand)); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .ch-hero__inner { flex-direction: column; align-items: flex-start; }
  .ch-hero__stats { width: 100%; }
  .ch-stat { flex: 1; min-width: 0; }
  .auth-row, .composer__grid { grid-template-columns: 1fr; }
  .composer__grid--3 { grid-template-columns: 1fr 1fr; }
  .userbar { flex-wrap: wrap; }
  .userbar .btn { width: 100%; }
  .howto__steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .ch-hero__inner { padding-top: 32px; padding-bottom: 52px; }
  .ch-stat b { font-size: 20px; }
  .ch-stat { padding: 14px 10px; border-radius: 14px; }
  .auth-card__body { padding: 20px 16px; }
  .composer { padding: 16px; }
  .composer__grid--3 { grid-template-columns: 1fr; }
  .composer__foot { flex-direction: column; align-items: stretch; }
  .composer__foot .btn { width: 100%; }
  .post { padding: 16px; }
  .post__actions { flex-wrap: wrap; }
  .post__act { flex: 1 1 45%; justify-content: center; }
  .reply-composer { flex-wrap: wrap; }
  .reply-composer input { min-width: 0; flex: 1 1 100%; }
  .reply-composer .btn { flex: 1; }
  .ch-tabs { display: grid; grid-template-columns: 1fr 1fr 1fr; }
  .ch-tab { justify-content: center; padding: 11px 8px; font-size: 13px; }
  .ch-tab__count { padding: 2px 6px; }
  .ch-card { padding: 16px; }
  .ch-card__foot { flex-wrap: wrap; }
  .lf-kind__btn { padding: 9px 12px; font-size: 13px; }
  .howto { padding: 22px 18px; margin: 26px 0 14px; }
  .howto__steps { grid-template-columns: 1fr; }
  .howto__head h2 { font-size: 20px; }
}
@media (max-width: 480px) {
  .ch-hero__sub { font-size: 15px; }
  .auth-tab { padding: 14px 8px; font-size: 14px; }
}
