/* =========================================================
   Habit Community Forums — green & cream design system
   ========================================================= */

:root {
	--hfx-ink: #161513;
	--hfx-muted: #6b6962;
	--hfx-faint: #9b988f;
	--hfx-cream: #f7f5f0;
	--hfx-card: #ffffff;
	--hfx-line: #d9d3c4;
	--hfx-green-900: #0b1116;
	--hfx-green-800: #132028;   /* brand navy (primary actions) */
	--hfx-green-700: #7b2cbf;   /* psychedelic purple accent */
	--hfx-green-100: #efe3f6;
	--hfx-green-50: #f7f1fa;
	--hfx-gold: #ffc800;
	--hfx-gold-100: #fdf3d7;
	--hfx-radius: 16px;
	--hfx-shadow: 0 1px 2px rgba(22, 21, 19, .06), 0 6px 18px rgba(22, 21, 19, .07);
	--hfx-shadow-hover: 0 4px 10px rgba(18, 53, 36, .10), 0 14px 34px rgba(22, 21, 19, .12);
	--hfx-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
}

.hfx-shell {
	background: var(--hfx-cream);
	padding: 36px 0 80px;
	color: var(--hfx-ink);
	min-height: 70vh;
	overflow-x: clip;
}

/* Grid-blowout guards: children may never exceed their column. */
.hfx-cols__main, .hfx-cols__side,
.hxg-main, .hxg-side,
.hfx-room-layout__main, .hfx-room-layout__side,
.hfx-thread__main, .hfx-thread__left, .hfx-thread__right,
.hfx-hero-band__copy, .hfx-hero-band__side,
.hfx-feed__main, .hxh-qa__body {
	min-width: 0;
}
.hfx-card, .hfx-hero-band { max-width: 100%; }
.hfx-feed__title, .hfx-room-card__name, .hxh-qa__title { overflow-wrap: anywhere; }
.hfx-shell a { text-decoration: none; }

/* ---------- Typography ---------- */
.hfx-display {
	font-family: var(--hfx-serif);
	font-weight: 800;
	font-size: 52px;
	line-height: 1.06;
	letter-spacing: -.015em;
	color: var(--hfx-ink);
	margin: 0 0 18px;
}
.hfx-display--md { font-size: 36px; line-height: 1.15; margin-bottom: 12px; }
.hfx-lede { font-size: 19px; color: var(--hfx-muted); line-height: 1.55; margin: 0 0 26px; }
.hfx-lede--sm { font-size: 16px; margin-bottom: 14px; }
.hfx-h2 { font-family: var(--hfx-serif); font-size: 23px; font-weight: 700; margin: 0 0 18px; color: var(--hfx-ink); }

/* ---------- Buttons ---------- */
.hfx-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-family: var(--habit-font); font-size: 15px; font-weight: 600;
	padding: 12px 24px; border-radius: 12px; cursor: pointer;
	border: 1.5px solid transparent; transition: all .18s ease;
}
.hfx-btn--primary {
	background: var(--hfx-green-800); color: #fff;
	box-shadow: 0 6px 16px rgba(19, 32, 40, .3);
}
.hfx-btn--primary:hover { background: var(--hfx-green-900); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255, 200, 0, .35); }
.hfx-btn--outline { background: #fff; border-color: var(--hfx-line); color: var(--hfx-ink); }
.hfx-btn--outline:hover { border-color: var(--hfx-green-700); color: var(--hfx-green-800); }
.hfx-btn--sm { padding: 9px 18px; font-size: 14px; border-radius: 10px; }
.hfx-btn--block { display: flex; width: 100%; }

/* ---------- Cards ---------- */
.hfx-card {
	background: var(--hfx-card);
	border: 1px solid var(--hfx-line);
	border-radius: var(--hfx-radius);
	box-shadow: var(--hfx-shadow);
}

/* ---------- Chips & tags ---------- */
.hfx-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 20px; }
.hfx-chip {
	display: inline-flex; align-items: center; gap: 7px;
	background: #fff; border: 1px solid var(--hfx-line);
	color: var(--hfx-ink); font-size: 13.5px; font-weight: 600;
	padding: 8px 15px; border-radius: 999px;
	transition: all .15s ease;
}
.hfx-chip:hover { border-color: var(--hfx-green-700); color: var(--hfx-green-800); }
.hfx-chip.is-active { background: var(--hfx-green-800); border-color: var(--hfx-green-800); color: #fff; }
.hfx-chip__leaf { display: inline-flex; width: 15px; height: 15px; color: var(--hfx-green-700); }
.hfx-chip.is-active .hfx-chip__leaf { color: #fff; }
.hfx-chip__leaf svg { width: 100%; height: 100%; }

.hfx-tag {
	display: inline-flex; align-items: center; gap: 4px;
	background: var(--hfx-green-50); color: var(--hfx-green-800);
	font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 7px;
}
.hfx-tag--room { background: var(--hfx-green-100); }
.hfx-tag--soft { background: #fff; border: 1px solid var(--hfx-line); color: var(--hfx-muted); }
.hfx-tag--pin { background: var(--hfx-gold-100); color: #8a6402; }

/* ---------- Role badges ---------- */
.hfx-role {
	display: inline-flex; font-size: 11.5px; font-weight: 700;
	padding: 2px 10px; border-radius: 999px; letter-spacing: .02em;
}
.hfx-role--mod { background: var(--hfx-green-100); color: var(--hfx-green-800); }
.hfx-role--power { background: #e3ecfb; color: #1d4ed8; }
.hfx-role--member { background: var(--hfx-cream); color: var(--hfx-muted); border: 1px solid var(--hfx-line); }

/* ---------- Online avatars ---------- */
.hfx-online-dot {
	display: inline-block; width: 9px; height: 9px; border-radius: 50%;
	background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2);
}
.hfx-avatar-online { position: relative; display: inline-flex; }
.hfx-avatar-online .habit-avatar { border-radius: 50%; }
.hfx-avatar-online::after {
	content: ""; position: absolute; right: 0; bottom: 0;
	width: 11px; height: 11px; border-radius: 50%;
	background: #22c55e; border: 2px solid #fff;
}
.hfx-avatar-stack { display: inline-flex; }
.hfx-avatar-stack .habit-avatar {
	width: 40px; height: 40px; border-radius: 50%;
	border: 2.5px solid var(--hfx-cream); margin-right: -10px;
}

/* =========================================================
   Forums homepage layout — hero band + two columns
   ========================================================= */
.hfx-hero-band {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 40px;
	align-items: center;
	background: var(--hfx-card);
	border: 1px solid var(--hfx-line);
	border-radius: 22px;
	box-shadow: var(--hfx-shadow);
	padding: 44px 48px;
	margin-bottom: 26px;
}
.hfx-hero-band__copy .hfx-display { font-size: 42px; }
.hfx-hero-band__copy .hfx-lede { margin-bottom: 22px; }
.hfx-hero-band__side { display: flex; flex-direction: column; gap: 22px; }
.hfx-statsgrid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 20px;
	background: var(--hfx-cream);
	border-radius: 16px;
	padding: 20px 22px;
}

.hfx-cols { display: grid; grid-template-columns: 1.85fr 1fr; gap: 26px; align-items: start; }

/* Hero */
.hfx-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.hfx-statsrow { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
.hfx-stat { display: flex; align-items: center; gap: 8px; }
.hfx-stat__icon { display: inline-flex; width: 19px; height: 19px; color: var(--hfx-green-800); }
.hfx-stat__icon svg { width: 100%; height: 100%; }
.hfx-stat__value { font-size: 19px; font-weight: 800; color: var(--hfx-ink); }
.hfx-stat__label { font-size: 13.5px; color: var(--hfx-muted); }
.hfx-joinrow { display: flex; align-items: center; gap: 16px; }
.hfx-joinrow__text { font-size: 14.5px; color: var(--hfx-muted); max-width: 230px; line-height: 1.5; }

/* Composer */
.hfx-composer { padding: 18px 20px; margin-bottom: 14px; }
.hfx-composer__row { display: flex; align-items: center; gap: 13px; }
.hfx-composer__form .hfx-composer__row { margin-bottom: 13px; }
.hfx-composer__prompt { font-size: 15.5px; color: var(--hfx-muted); font-weight: 500; margin-right: auto; }
.hfx-composer__input {
	flex: 1; min-width: 0;
	border: 1.5px solid var(--hfx-line); border-radius: 999px;
	background: var(--hfx-cream);
	padding: 12px 20px; font-size: 15px; font-family: var(--habit-font); color: var(--hfx-ink);
	transition: all .15s ease;
}
.hfx-composer__input::placeholder { color: var(--hfx-faint); }
.hfx-composer__input:focus {
	outline: none; border-color: var(--hfx-green-700); background: #fff;
	box-shadow: 0 0 0 3px var(--hfx-green-100);
}
.hfx-composer__actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

/* Feed */
.hfx-feed { padding: 6px 0; }
.hfx-feed__row {
	display: flex; align-items: center; gap: 15px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--hfx-cream);
	transition: background .15s ease;
}
.hfx-feed__row:hover { background: var(--hfx-green-50); }
.hfx-feed__row:last-of-type { border-bottom: 0; }
.hfx-feed__row .hfx-avatar-online .habit-avatar { width: 46px; height: 46px; }
.hfx-feed__main { min-width: 0; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.hfx-feed__title { font-size: 16px; font-weight: 700; color: var(--hfx-ink); line-height: 1.35; }
.hfx-feed__title:hover { color: var(--hfx-green-800); }
.hfx-feed__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.hfx-feed__byline { font-size: 13px; color: var(--hfx-faint); display: flex; gap: 6px; align-items: center; }
.hfx-feed__replies { text-align: center; flex: 0 0 auto; min-width: 56px; }
.hfx-feed__replies-num { display: block; font-size: 19px; font-weight: 800; color: var(--hfx-ink); line-height: 1.15; }
.hfx-feed__replies.has-replies .hfx-feed__replies-num { color: var(--hfx-green-800); }
.hfx-feed__replies-label { font-size: 11.5px; color: var(--hfx-faint); font-weight: 600; }
.hfx-feed__last { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 0 0 92px; }
.hfx-feed__last .habit-avatar { width: 36px; height: 36px; border-radius: 50%; }
.hfx-feed__last-name { font-size: 12px; font-weight: 700; color: var(--hfx-ink); max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hfx-feed__last-time { font-size: 11.5px; color: var(--hfx-faint); }
.hfx-feed__more {
	display: flex; align-items: center; justify-content: center; gap: 7px;
	padding: 14px; font-size: 14.5px; font-weight: 700; color: var(--hfx-green-800);
	border-top: 1px solid var(--hfx-cream);
}

/* Sidebar cards */
.hfx-sidecard { padding: 20px; margin-bottom: 18px; }
.hfx-sidecard__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.hfx-sidecard__head h3, .hfx-sidecard__head .hfx-h2 { font-family: var(--hfx-serif); font-size: 18px; font-weight: 700; margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.hfx-sidecard__count { font-size: 13px; color: var(--hfx-green-700); font-weight: 600; white-space: nowrap; }
.hfx-sidecard__link { display: inline-flex; margin-top: 14px; font-size: 13.5px; font-weight: 700; color: var(--hfx-green-800); }
.hfx-sidecard__empty { font-size: 14px; color: var(--hfx-faint); margin: 0; }

.hfx-avatar-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.hfx-avatar-grid .habit-avatar { width: 44px; height: 44px; }

.hfx-room-links { list-style: none; margin: 0; padding: 0; }
.hfx-room-links li { border-radius: 10px; }
.hfx-room-links li.is-active { background: var(--hfx-green-50); }
.hfx-room-links a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; }
.hfx-room-links a:hover { background: var(--hfx-green-50); }
.hfx-room-links__leaf { display: inline-flex; width: 16px; height: 16px; color: var(--hfx-green-700); flex: 0 0 16px; }
.hfx-room-links__leaf svg { width: 100%; height: 100%; }
.hfx-room-links__name { font-size: 14px; font-weight: 600; color: var(--hfx-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hfx-room-links__count { margin-left: auto; font-size: 12.5px; color: var(--hfx-faint); white-space: nowrap; }

/* Bottom zone: rooms grid + trending */
.hfx-rooms-card { padding: 26px; margin-top: 24px; }
.hfx-rooms-card--wide { margin-top: 26px; padding: 30px 32px; }
.hfx-room-grid--wide { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.hfx-feed { margin-top: 4px; }
.hfx-room-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hfx-room-grid--sub { margin-bottom: 28px; }
.hfx-room-card {
	display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
	background: #fff; border: 1px solid var(--hfx-line); border-radius: 14px;
	padding: 22px 14px;
	transition: all .18s ease;
}
.hfx-room-card:hover { transform: translateY(-3px); box-shadow: var(--hfx-shadow-hover); border-color: var(--hfx-green-700); }
.hfx-room-card__icon { display: inline-flex; width: 34px; height: 34px; color: var(--hfx-green-700); }
.hfx-room-card__icon svg { width: 100%; height: 100%; }
.hfx-room-card__name { font-size: 15px; font-weight: 700; color: var(--hfx-ink); }
.hfx-room-card__count { font-size: 12.5px; color: var(--hfx-faint); }
.hfx-room-card__cta { font-size: 13px; font-weight: 700; color: var(--hfx-green-800); margin-top: 4px; }

.hfx-trend-list { list-style: none; margin: 0; padding: 0; }
.hfx-trend-list li { border-bottom: 1px solid var(--hfx-cream); }
.hfx-trend-list li:last-child { border-bottom: 0; }
.hfx-trend-list a { display: flex; align-items: center; gap: 10px; padding: 13px 4px; flex-wrap: wrap; }
.hfx-trend-list a:hover .hfx-trend-list__title { color: var(--hfx-green-800); }
.hfx-trend-list__title { font-size: 14.5px; font-weight: 600; color: var(--hfx-ink); flex: 1; min-width: 60%; }
.hfx-trend-list__count { margin-left: auto; font-size: 13px; color: var(--hfx-muted); white-space: nowrap; }

/* =========================================================
   Single forum (room) page
   ========================================================= */
.hfx-crumb { display: flex; gap: 8px; font-size: 13.5px; margin-bottom: 14px; color: var(--hfx-faint); }
.hfx-crumb a { color: var(--hfx-green-800); font-weight: 600; }
.hfx-crumb__here { color: var(--hfx-muted); }

.hfx-room-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.hfx-room-head__meta { display: flex; gap: 8px; flex-wrap: wrap; }

.hfx-room-layout { display: grid; grid-template-columns: 1.9fr .8fr; gap: 28px; align-items: start; }

.hfx-empty-card { padding: 44px 28px; text-align: center; margin-bottom: 24px; }
.hfx-empty-card--sm { padding: 28px; }
.hfx-empty-card__emoji { font-size: 38px; display: block; margin-bottom: 10px; }
.hfx-empty-card h3 { font-family: var(--hfx-serif); font-size: 21px; margin: 0 0 6px; }
.hfx-empty-card p { color: var(--hfx-muted); font-size: 14.5px; margin: 0 0 18px; }
.hfx-empty-card__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hfx-new-topic { margin-top: 30px; }

/* =========================================================
   Thread page (3 columns)
   ========================================================= */
.hfx-thread {
	display: grid;
	grid-template-columns: .8fr 1.9fr .85fr;
	gap: 26px;
	align-items: start;
}
.hfx-thread-byline {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	font-size: 14.5px; color: var(--hfx-muted); margin-bottom: 22px;
}
.hfx-thread-byline .habit-avatar { width: 40px; height: 40px; }
.hfx-thread-byline strong { color: var(--hfx-ink); }

.hfx-op { padding: 26px 28px; margin-bottom: 30px; border-left: 4px solid var(--hfx-green-800); }
.hfx-op__content { font-size: 15.5px; line-height: 1.75; color: var(--hfx-ink); }
.hfx-op__content p:last-child { margin-bottom: 0; }
.hfx-op__content img { border-radius: 12px; }

.hfx-replies { margin-bottom: 34px; }
.hfx-reply { background: #fff; border: 1px solid var(--hfx-line); border-radius: var(--hfx-radius); box-shadow: var(--hfx-shadow); padding: 18px 22px; margin-bottom: 13px; }
.hfx-reply--child { background: var(--hfx-green-50); box-shadow: none; }
.hfx-reply__head { display: flex; align-items: center; gap: 11px; margin-bottom: 9px; flex-wrap: wrap; }
.hfx-reply__head .habit-avatar { width: 42px; height: 42px; }
.hfx-reply__who { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hfx-reply__who a { font-weight: 700; color: var(--hfx-ink); font-size: 14.5px; }
.hfx-reply__who a:hover { color: var(--hfx-green-800); }
.hfx-reply__time { margin-left: auto; font-size: 12.5px; color: var(--hfx-faint); }
.hfx-reply__content { font-size: 14.5px; line-height: 1.7; color: #3d3b36; }
.hfx-reply__content p:last-child { margin-bottom: 0; }
.hfx-reply__actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.hfx-action { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--hfx-muted); }
.hfx-action:hover { color: var(--hfx-green-800); }
.hfx-action--like .wpulike { margin: 0; }

.hfx-detail-list { list-style: none; margin: 0; padding: 0; }
.hfx-detail-list li {
	display: flex; justify-content: space-between; align-items: center; gap: 10px;
	padding: 9px 0; border-bottom: 1px solid var(--hfx-cream); font-size: 14px;
}
.hfx-detail-list li:last-child { border-bottom: 0; }
.hfx-detail-list span { color: var(--hfx-muted); }
.hfx-detail-list strong { color: var(--hfx-ink); }

.hfx-related-list { list-style: none; margin: 0; padding: 0; }
.hfx-related-list li { border-bottom: 1px solid var(--hfx-cream); }
.hfx-related-list li:last-child { border-bottom: 0; }
.hfx-related-list a { display: flex; align-items: center; gap: 8px; padding: 10px 2px; }
.hfx-related-list__title { font-size: 13.5px; font-weight: 600; color: var(--hfx-ink); flex: 1; line-height: 1.4; }
.hfx-related-list a:hover .hfx-related-list__title { color: var(--hfx-green-800); }
.hfx-related-list__count { font-size: 12.5px; color: var(--hfx-faint); white-space: nowrap; }

.hfx-join-card { text-align: center; }
.hfx-join-card h3 { font-family: var(--hfx-serif); margin: 0 0 6px; }
.hfx-join-card p { font-size: 13.5px; color: var(--hfx-muted); margin: 0 0 14px; }
.hfx-join-card__login { margin-top: 12px !important; }
.hfx-join-card__login a { color: var(--hfx-green-800); font-weight: 700; }

/* ---------- Forms (bbPress) ---------- */
.hfx-form-card { padding: 24px; }
.hfx-form-card fieldset.bbp-form { border: 0; padding: 0; margin: 0; }
.hfx-form-card legend { display: none; }
.hfx-form-card label { font-weight: 600; font-size: 14px; color: var(--hfx-ink); }
.hfx-form-card input[type="text"], .hfx-form-card textarea, .hfx-form-card select {
	width: 100%; border: 1.5px solid var(--hfx-line); border-radius: 12px;
	padding: 12px 14px; font-size: 14.5px; font-family: var(--habit-font);
	background: var(--hfx-cream); color: var(--hfx-ink);
}
.hfx-form-card input[type="text"]:focus, .hfx-form-card textarea:focus {
	outline: none; border-color: var(--hfx-green-700); background: #fff;
	box-shadow: 0 0 0 3px var(--hfx-green-100);
}
.hfx-form-card .bbp-the-content-wrapper textarea { min-height: 150px; }
.hfx-form-card .quicktags-toolbar {
	background: var(--hfx-cream); border: 1px solid var(--hfx-line); border-bottom: 0;
	border-radius: 12px 12px 0 0; padding: 6px;
}
.hfx-form-card .quicktags-toolbar input {
	background: #fff; border: 1px solid var(--hfx-line); border-radius: 7px;
	padding: 3px 10px; font-size: 12.5px; cursor: pointer; width: auto;
}
.hfx-form-card .bbp-submit-wrapper { margin-top: 16px; }
.hfx-form-card button[type="submit"], .hfx-form-card #bbp_topic_submit, .hfx-form-card #bbp_reply_submit {
	background: var(--hfx-green-800); color: #fff; border: 0; border-radius: 12px;
	padding: 12px 30px; font-weight: 600; font-size: 15px; cursor: pointer;
	box-shadow: 0 6px 16px rgba(19, 32, 40, .3); transition: all .15s ease;
}
.hfx-form-card button[type="submit"]:hover { background: var(--hfx-green-900); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255, 200, 0, .35); }
.hfx-form-card .bbp-template-notice {
	background: var(--hfx-green-50); border: 1px solid var(--hfx-green-100);
	border-radius: 10px; padding: 10px 14px; font-size: 13.5px; color: var(--hfx-green-800);
}
.hfx-form-card .bbp-template-notice.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.hf-replying-to {
	display: inline-flex; align-items: center; gap: 8px;
	background: var(--hfx-gold-100); border: 1px solid #f3dd9a; border-radius: 10px;
	padding: 7px 14px; font-size: 13.5px; color: #8a6402; margin-bottom: 12px;
}
.hf-replying-to a { color: #8a6402; text-decoration: underline; font-size: 12.5px; }

/* ---------- Pagination ---------- */
.hfx-pagination { text-align: center; margin: 20px 0 30px; }
.hfx-pagination .page-numbers {
	display: inline-flex; min-width: 38px; height: 38px; padding: 0 9px;
	align-items: center; justify-content: center;
	background: #fff; border: 1px solid var(--hfx-line); border-radius: 10px; margin: 0 3px;
	color: var(--hfx-ink); font-weight: 600; font-size: 14px;
}
.hfx-pagination .page-numbers.current { background: var(--hfx-green-800); color: #fff; border-color: var(--hfx-green-800); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
	.hfx-hero-band { grid-template-columns: 1fr; gap: 26px; padding: 32px; }
	.hfx-thread { grid-template-columns: 1.9fr .9fr; }
	.hfx-thread__left { display: none; }
}

@media (max-width: 960px) {
	.hfx-cols { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
	.hfx-shell { padding-top: 16px; }
	.hfx-display, .hfx-hero-band__copy .hfx-display { font-size: 30px; }
	.hfx-display--md { font-size: 24px; }
	.hfx-lede { font-size: 15.5px; }
	.hfx-hero-band { padding: 24px 20px; border-radius: 18px; margin-bottom: 18px; }
	.hfx-hero-actions .hfx-btn { flex: 1; padding: 11px 14px; font-size: 14px; }
	.hfx-statsgrid { padding: 14px 16px; gap: 10px 14px; }
	.hfx-stat__value { font-size: 16px; }
	.hfx-stat__label { font-size: 12.5px; }
	.hfx-joinrow__text { max-width: none; font-size: 13.5px; }

	.hfx-composer { padding: 12px; }
	.hfx-composer__row { gap: 9px; flex-wrap: wrap; }
	.hfx-composer__prompt { flex-basis: 100%; margin-right: 0; font-size: 14px; }
	.hfx-composer__row > .hfx-btn { flex: 1; }
	.hfx-composer__form .hfx-composer__row { flex-wrap: nowrap; }
	.hfx-composer__row .hfx-avatar-online .habit-avatar { width: 36px; height: 36px; }
	.hfx-composer__input { padding: 10px 14px; font-size: 14px; }
	.hfx-composer__form .hfx-btn { padding: 10px 16px; flex: 0 0 auto; }
	.hfx-composer__actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
	.hfx-composer__actions .hfx-chip { justify-content: center; padding: 8px 6px; font-size: 12.5px; }

	.hfx-room-grid, .hfx-room-grid--wide { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.hfx-rooms-card { padding: 18px; }
	.hfx-room-layout { grid-template-columns: 1fr; }
	.hfx-thread { grid-template-columns: 1fr; }
	.hfx-thread__right { order: 3; }

	.hfx-feed__last { display: none; }
	.hfx-feed__row { padding: 13px 12px; gap: 10px; }
	.hfx-feed__row .hfx-avatar-online .habit-avatar { width: 38px; height: 38px; }
	.hfx-feed__title { font-size: 14.5px; overflow-wrap: anywhere; }
	.hfx-feed__tags .hfx-tag { font-size: 11px; padding: 2px 8px; }
	.hfx-feed__byline { font-size: 12px; }
	.hfx-feed__replies { min-width: 44px; padding: 6px 8px; border-radius: 10px; }
	.hfx-feed__replies-num { font-size: 15px; }
	.hfx-feed__replies-label { font-size: 10.5px; }

	.hfx-chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
	.hfx-chips::-webkit-scrollbar { display: none; }
	.hfx-chip { white-space: nowrap; flex: 0 0 auto; }

	.hfx-reply { padding: 14px 16px; }
	.hfx-reply--child { margin-left: 14px !important; }
	.hfx-op { padding: 18px; }
	.hfx-form-card { padding: 16px; }
	.hfx-sidecard { padding: 16px; }
	.hfx-room-head { align-items: flex-start; }
	.hfx-room-head .hfx-btn { width: 100%; }
}

@media (max-width: 420px) {
	.hfx-room-grid { grid-template-columns: 1fr; }
	.hfx-statsgrid { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   Homepage (hxh) — green & cream community hub
   ========================================================= */
.hxh .hfx-hero-band { margin-bottom: 18px; }
.hxh-kicker {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--hfx-green-50); border: 1px solid var(--hfx-green-100);
	color: var(--hfx-green-800); font-size: 13px; font-weight: 600;
	padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}
.hxh-composer { margin-bottom: 18px; }

/* Feature tiles */
.hxh-tiles {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
	margin-bottom: 26px;
}
.hxh-tile {
	display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
	background: var(--hfx-card); border: 1px solid var(--hfx-line);
	border-radius: var(--hfx-radius); box-shadow: var(--hfx-shadow);
	padding: 22px 14px;
	transition: all .18s ease;
}
.hxh-tile:hover { transform: translateY(-3px); box-shadow: var(--hfx-shadow-hover); border-color: var(--hfx-green-700); }
.hxh-tile__icon {
	display: inline-flex; width: 46px; height: 46px; padding: 11px;
	background: var(--hfx-green-50); color: var(--hfx-green-700);
	border-radius: 14px; margin-bottom: 6px;
	transition: transform .18s ease;
}
.hxh-tile:hover .hxh-tile__icon { transform: scale(1.1) rotate(-4deg); }
.hxh-tile__icon svg { width: 100%; height: 100%; }
.hxh-tile__title { font-family: var(--hfx-serif); font-size: 17px; font-weight: 700; color: var(--hfx-ink); }
.hxh-tile__count { font-size: 13px; color: var(--hfx-muted); }
.hxh-tile__cta { font-size: 13px; font-weight: 700; color: var(--hfx-green-800); margin-top: 6px; }

/* Content blocks */
.hxh-cols { margin-bottom: 26px; }
.hxh-block { padding: 22px 24px; margin-bottom: 22px; }
.hxh-block__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.hxh-block__head .hfx-h2 { margin: 0; }
.hxh-block__link { font-size: 13.5px; font-weight: 700; color: var(--hfx-green-800); white-space: nowrap; }
.hfx-feed--flush { border: 0; box-shadow: none; background: none; margin: 0 -10px; }
.hfx-feed--flush .hfx-feed__row { padding: 13px 10px; border-radius: 12px; }
.hfx-feed--flush .hfx-feed__byline { align-items: center; display: flex; gap: 7px; flex-wrap: wrap; }

/* Q&A rows */
.hxh-qa { list-style: none; margin: 0; padding: 0; }
.hxh-qa li { border-bottom: 1px solid var(--hfx-cream); }
.hxh-qa li:last-child { border-bottom: 0; }
.hxh-qa__row { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-radius: 12px; }
.hxh-qa__row:hover { background: var(--hfx-green-50); }
.hxh-qa__row .habit-avatar { width: 36px; height: 36px; flex: 0 0 36px; }
.hxh-qa__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.hxh-qa__title { font-size: 15px; font-weight: 600; color: var(--hfx-ink); line-height: 1.4; }
.hxh-qa__row:hover .hxh-qa__title { color: var(--hfx-green-800); }
.hxh-qa__meta { font-size: 12.5px; color: var(--hfx-faint); }
.hxh-qa__pill {
	flex: 0 0 auto; font-size: 12.5px; font-weight: 700;
	background: var(--hfx-cream); color: var(--hfx-muted);
	padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.hxh-qa__pill.has-answers { background: var(--hfx-green-100); color: var(--hfx-green-800); }
.hxh-qa__cta { margin-top: 14px; }

/* Strain showcase */
.hxh-strains { padding: 26px 28px; margin-bottom: 26px; }
.hxh-strain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hxh-strain-card {
	display: flex; flex-direction: column;
	background: #fff; border: 1px solid var(--hfx-line); border-radius: 14px;
	overflow: hidden; transition: all .18s ease;
}
.hxh-strain-card:hover { transform: translateY(-3px); box-shadow: var(--hfx-shadow-hover); border-color: var(--hfx-green-700); }
.hxh-strain-card__img { display: block; background: var(--hfx-cream); aspect-ratio: 4/3; overflow: hidden; }
.hxh-strain-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.hxh-strain-card:hover .hxh-strain-card__img img { transform: scale(1.05); }
.hxh-strain-card__fallback { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 44px; }
.hxh-strain-card__body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 7px; }
.hxh-strain-card__name { font-family: var(--hfx-serif); font-size: 16.5px; font-weight: 700; color: var(--hfx-ink); }
.hxh-strain-card:hover .hxh-strain-card__name { color: var(--hfx-green-800); }
.hxh-strain-card__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hxh-strain-card__row .habit-meta { font-size: 13px; }

/* Join CTA */
.hxh-cta {
	display: flex; justify-content: space-between; align-items: center; gap: 26px; flex-wrap: wrap;
	background:
		radial-gradient(700px 320px at 95% -10%, rgba(255,200,0,.30) 0%, rgba(255,200,0,0) 55%),
		linear-gradient(120deg, #2b0b3a 0%, #7b2cbf 38%, #c2347b 70%, #fd7e14 105%);
	border-radius: 22px; padding: 40px 44px; color: #fff;
	box-shadow: 0 18px 44px rgba(43, 11, 58, .35);
}
.hxh-cta__copy h2 { font-family: var(--hfx-serif); color: #fff; font-size: 27px; margin: 0 0 6px; }
.hxh-cta__copy p { color: #f3dff1; margin: 0; font-size: 15.5px; max-width: 520px; }
.hxh-cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hxh-cta__btn { background: #fff; color: var(--hfx-green-900); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.hxh-cta__btn:hover { background: var(--hfx-cream); color: var(--hfx-green-900); transform: translateY(-1px); }
.hxh-cta__btn--ghost {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 12px 24px; border-radius: 12px; font-weight: 600; font-size: 15px;
	background: rgba(255,255,255,.14); color: #fff; border: 1.5px solid rgba(255,255,255,.35);
}
.hxh-cta__btn--ghost:hover { background: rgba(255,255,255,.22); color: #fff; }

/* Sidebar activity list inside hfx sidecard */
.hfx-sidecard .habit-activity-list__item { padding: 11px 0; margin: 0; }
.hfx-sidecard .habit-activity-list__item:hover { background: none; }
.hfx-sidecard .habit-activity-list__item .habit-avatar { flex-basis: 40px; width: 40px; height: 40px; }

/* ---------- Homepage mobile: pair boxes to cut scroll ---------- */
@media (max-width: 860px) {
	.hxh-tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.hxh-tile { padding: 16px 10px; }
	.hxh-tile__icon { width: 40px; height: 40px; padding: 9px; }
	.hxh-tile__title { font-size: 15px; }
	.hxh-tile__cta { display: none; }

	.hxh-strain-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.hxh-strains { padding: 18px; }
	.hxh-strain-card__name { font-size: 15px; }
	.hxh-strain-card__row .habit-meta { font-size: 12px; }

	.hxh-block { padding: 16px; }
	.hxh-qa__pill { font-size: 11.5px; padding: 4px 9px; }

	.hxh-cta { padding: 26px 22px; border-radius: 18px; }
	.hxh-cta__copy h2 { font-size: 22px; }
	.hxh-cta__actions { width: 100%; }
	.hxh-cta__actions > * { flex: 1; text-align: center; }
}

/* =========================================================
   Strain guide archive (hsx)
   ========================================================= */
.hsx-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.hsx-intro__side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hsx-chips { margin-bottom: 24px; }

.hsx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
.hsx-card {
	display: flex; flex-direction: column;
	background: var(--hfx-card); border: 1px solid var(--hfx-line);
	border-radius: var(--hfx-radius); box-shadow: var(--hfx-shadow);
	overflow: hidden; transition: all .18s ease;
}
.hsx-card:hover { transform: translateY(-3px); box-shadow: var(--hfx-shadow-hover); border-color: var(--hfx-green-700); }
.hsx-card__img { display: block; position: relative; background: var(--hfx-cream); aspect-ratio: 1/1; overflow: hidden; }
.hsx-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.hsx-card:hover .hsx-card__img img { transform: scale(1.05); }
.hsx-card__fallback { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 52px; }
.hsx-card__badge { position: absolute; top: 10px; left: 10px; }
.hsx-card__badge .habit-badge { box-shadow: 0 2px 8px rgba(22,21,19,.18); }
.hsx-card__body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.hsx-card__name { font-family: var(--hfx-serif); font-size: 18px; font-weight: 700; color: var(--hfx-ink); line-height: 1.3; }
.hsx-card__name:hover { color: var(--hfx-green-800); }
.hsx-card__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hsx-card__meta .habit-meta { font-size: 13px; }
.hsx-card__ctas { display: flex; gap: 8px; margin-top: auto; }
.hsx-card__ctas .hfx-btn { flex: 1; padding: 9px 8px; font-size: 13.5px; }
.hsx-cta { margin-top: 6px; }

@media (max-width: 1100px) { .hsx-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
	.hsx-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.hsx-card__body { padding: 11px 12px 13px; gap: 7px; }
	.hsx-card__name { font-size: 15.5px; }
	.hsx-card__ctas { flex-direction: column; gap: 6px; }
	.hsx-intro { align-items: flex-start; }
}

/* Psychedelic brand stripe */
.hfx-hero-band, .hfx-composer { position: relative; overflow: hidden; }
.hfx-hero-band::before, .hfx-composer::before {
	content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
	background: linear-gradient(90deg, #7b2cbf 0%, #c2347b 28%, #fd7e14 52%, #ffc800 76%, #16a34a 100%);
}
.hfx-chip.is-active { box-shadow: 0 3px 10px rgba(19, 32, 40, .25); }
.hfx-chip:hover { border-color: var(--hfx-gold); }
.hfx-card:hover, .hsx-card:hover, .hxh-tile:hover, .hfx-room-card:hover, .hfx-forum-card:hover { border-color: var(--hfx-gold); }
.hxh-tile__icon, .hfx-room-card__icon, .hfx-chip__leaf, .hfx-room-links__leaf { color: #16a34a; }
.hxh-tile:hover .hxh-tile__icon { background: var(--hfx-gold-100); }
