/* ==========================================================================
   HDM Community Space — presentation layer
   Plain CSS. No build step, no utility classes, no external assets.
   Everything scoped under .hdm-community / .hdm- prefix (Flatsome-safe).

   Layout responds to CONTAINER width, not viewport — the panel lives inside
   #hdm-dir-tp-community and shares the page with the listing's right rail,
   so viewport media queries lie about how much room it actually has.
   ========================================================================== */

.hdm-community {
  /* Brand tokens — inlined so the block is self-contained inside PHP */
  --hdm-brown:  #6A4532;
  --hdm-gold:   #C89737;
  --hdm-cream:  #FDF9F6;
  --hdm-border: #E4D8CC;
  --hdm-ink:    #3A2E26;
  --hdm-slate:  #8A7A6D;
  /* #8A7A6D is only 4.1:1 on white — fine at 16px+, short of WCAG AA below that.
     Small text (<18.66px) uses the darker pair instead. */
  --hdm-slate-strong: #6F6055;

  --hdm-cream-2: #F5EEE6;
  --hdm-gold-50: #FBF3E3;
  --hdm-gold-ink:#87631A;
  --hdm-brown-dk:#402A1E;
  --hdm-olive:   #5B7F45;
  --hdm-terra:   #C56A1E;
  --hdm-terra-ink: #A9541A;

  --hdm-font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --hdm-font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hdm-font-geez: "Noto Sans Ethiopic", "Abyssinica SIL", "Nyala", var(--hdm-font-body);

  --hdm-r-sm: 8px;
  --hdm-r: 12px;
  --hdm-r-lg: 20px;
  --hdm-shadow: 0 1px 2px rgba(62, 40, 28, .05);
  --hdm-shadow-md: 0 6px 20px rgba(62, 40, 28, .09);

  container-type: inline-size;
  font-family: var(--hdm-font-body);
  color: var(--hdm-ink);
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
  background: var(--hdm-cream);
  -webkit-font-smoothing: antialiased;
}

.hdm-community *,
.hdm-community *::before,
.hdm-community *::after { box-sizing: border-box; }

/* [hidden] must beat any class rule that sets a display. Several components
   below declare display:grid/flex, which would otherwise outrank the UA's
   [hidden] { display: none } and leave the attribute inert. */
.hdm-community [hidden],
.hdm-community[hidden] { display: none !important; }

.hdm-community p { margin: 0 0 1em; }
.hdm-community p:last-child { margin-bottom: 0; }
.hdm-community a { color: var(--hdm-brown); text-decoration: underline; text-underline-offset: 2px; }
.hdm-community a:hover { color: var(--hdm-gold-ink); }
.hdm-community :focus-visible { outline: 2px solid var(--hdm-gold); outline-offset: 2px; border-radius: 3px; }

/* ---------- Type primitives ---------- */
.hdm-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--hdm-slate-strong);
  margin: 0 0 10px;
}
.hdm-h1, .hdm-h2, .hdm-h3 {
  font-family: var(--hdm-font-display);
  color: var(--hdm-brown);
  font-weight: 600;
  margin: 0;
  line-height: 1.18;
  letter-spacing: -.01em;
}
.hdm-h1 { font-size: 30px; }
.hdm-h2 { font-size: 24px; }
.hdm-h3 { font-size: 18px; }
.hdm-lede { font-size: 17px; line-height: 1.65; }
.hdm-muted { color: var(--hdm-slate); }
.hdm-small { font-size: 14px; }
.hdm-small.hdm-muted, .hdm-small .hdm-muted { color: var(--hdm-slate-strong); }

/* Ge'ez needs its own metrics — taller ascenders, no letter-spacing */
.hdm-geez {
  font-family: var(--hdm-font-geez);
  line-height: 1.9;
  letter-spacing: 0;
  font-size: 1.02em; /* optically matches the Latin at the same nominal size */
}

/* ---------- Signature smile-wave pattern, mono at low opacity ---------- */
.hdm-pattern { position: relative; isolation: isolate; }
.hdm-pattern::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='28' viewBox='0 0 56 28'%3E%3Cg fill='none' stroke='%236A4532' stroke-width='1.5'%3E%3Cpath d='M0 28a14 14 0 0 1 28 0M28 28a14 14 0 0 1 28 0M-14 14a14 14 0 0 1 28 0M14 14a14 14 0 0 1 28 0M42 14a14 14 0 0 1 28 0'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 56px 28px;
}
.hdm-pattern--fade::before {
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

/* ==========================================================================
   BANDS — the panel fills the tab width honestly; text bands hold an inner
   700px measure so lines stay readable.
   ========================================================================== */
.hdm-band { padding: 28px 20px; border-bottom: 1px solid var(--hdm-border); }
.hdm-band:last-child { border-bottom: 0; }
.hdm-band__in { max-width: 700px; margin: 0 auto; }
.hdm-band__in--wide { max-width: 1000px; }

.hdm-band--welcome { background: var(--hdm-cream); }
.hdm-band--stats { background: #fff; }
.hdm-band--rules { background: var(--hdm-cream); }
.hdm-band--join { background: var(--hdm-brown); color: var(--hdm-cream); }
.hdm-band--join .hdm-h2 { color: #fff; }
.hdm-band--join .hdm-eyebrow { color: var(--hdm-gold); }

@container (min-width: 560px) { .hdm-band { padding: 40px 32px; } }
@container (min-width: 900px) { .hdm-band { padding: 56px 48px; } }

/* ---------- Community identity header ---------- */
.hdm-identity { display: flex; gap: 16px; align-items: center; }
.hdm-identity__logo {
  width: 56px; height: 56px; flex: 0 0 56px;
  border-radius: 50%;
  background: var(--hdm-brown);
  color: var(--hdm-gold);
  display: grid; place-items: center;
  font-family: var(--hdm-font-display);
  font-size: 20px;
  border: 2px solid #fff;
  box-shadow: var(--hdm-shadow);
}
@container (min-width: 560px) {
  .hdm-identity__logo { width: 72px; height: 72px; flex-basis: 72px; font-size: 26px; }
  .hdm-h1 { font-size: 38px; }
}

.hdm-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500; letter-spacing: .04em;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--hdm-border);
  color: var(--hdm-ink);
}
.hdm-status__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hdm-olive); }
.hdm-status--closed .hdm-status__dot { background: var(--hdm-slate); }

/* ==========================================================================
   PAIRED BILINGUAL BLOCK
   English and Amharic always both visible, equal weight, each tagged so
   neither language is the unmarked default.
   ========================================================================== */
.hdm-pair {
  background: #fff;
  border: 1px solid var(--hdm-border);
  border-radius: var(--hdm-r);
  overflow: hidden;
}
.hdm-pair__side { padding: 20px; }
.hdm-pair__side + .hdm-pair__side { border-top: 1px solid var(--hdm-border); }
.hdm-pair__tag {
  display: block;
  font-size: 10px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--hdm-slate-strong);
  margin-bottom: 8px;
}
.hdm-pair__tag--geez { font-family: var(--hdm-font-geez); letter-spacing: .06em; text-transform: none; font-size: 12px; }
.hdm-pair--plain { background: transparent; border: 0; }
.hdm-pair--plain .hdm-pair__side { padding: 0; }
.hdm-pair--plain .hdm-pair__side + .hdm-pair__side { border-top: 0; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--hdm-border); }

/* Fallback direction if the stacked pair tests too long: side-by-side at width */
@container (min-width: 820px) {
  .hdm-pair--split { display: grid; grid-template-columns: 1fr 1fr; }
  .hdm-pair--split .hdm-pair__side + .hdm-pair__side { border-top: 0; border-left: 1px solid var(--hdm-border); }
  .hdm-pair--split .hdm-pair__side { padding: 24px; }
}

/* ==========================================================================
   STATS
   ========================================================================== */
.hdm-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--hdm-border); border: 1px solid var(--hdm-border); border-radius: var(--hdm-r); overflow: hidden; }
/* 4-up at 550px to agree with the existing dashboard stat grid */
@container (min-width: 550px) { .hdm-stats { grid-template-columns: repeat(4, 1fr); } }
.hdm-stat { background: #fff; padding: 18px 16px; }
.hdm-stat__n {
  font-family: var(--hdm-font-display);
  font-size: 28px; line-height: 1.1; color: var(--hdm-brown);
  font-variant-numeric: tabular-nums;
}
.hdm-stat__l { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--hdm-slate-strong); margin-top: 5px; }

/* Faces row — initials are the default, not the fallback */
.hdm-faces { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hdm-avatars { display: flex; }
.hdm-avatars .hdm-av { margin-left: -10px; box-shadow: 0 0 0 2px #fff; }
.hdm-avatars .hdm-av:first-child { margin-left: 0; }
.hdm-av {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  background: var(--hdm-brown); color: var(--hdm-gold-50);
  flex: 0 0 auto;
}
.hdm-av--gold { background: var(--hdm-gold); color: var(--hdm-brown-dk); }
.hdm-av--cream { background: var(--hdm-cream-2); color: var(--hdm-brown); }
.hdm-av--more { background: #fff; border: 1px solid var(--hdm-border); color: var(--hdm-slate-strong); font-size: 12px; }
.hdm-av--lg { width: 44px; height: 44px; font-size: 15px; }

/* ==========================================================================
   HOUSE RULES — three human groups, each rule a paired card
   ========================================================================== */
.hdm-rulegroup + .hdm-rulegroup { margin-top: 32px; }
.hdm-rulegroup__head { margin-bottom: 14px; }
.hdm-rulegroup__head .hdm-geez { font-size: 15px; color: var(--hdm-slate-strong); }
.hdm-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@container (min-width: 900px) { .hdm-rules { grid-template-columns: 1fr 1fr; } }

.hdm-rule {
  background: #fff;
  border: 1px solid var(--hdm-border);
  border-radius: var(--hdm-r);
  padding: 18px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  transition: box-shadow 200ms ease-out, transform 200ms ease-out;
}
.hdm-rule:hover { box-shadow: var(--hdm-shadow-md); transform: translateY(-1px); }
.hdm-rule__n {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--hdm-gold-50); color: var(--hdm-gold-ink);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.hdm-rule__en { font-size: 16px; line-height: 1.55; }
.hdm-rule__am { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hdm-border); color: var(--hdm-ink); font-size: 16px; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.hdm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 16px; font-weight: 500;
  min-height: 48px; padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 180ms ease-out, transform 80ms ease-in, color 180ms ease-out;
}
.hdm-btn:active { transform: scale(.98); }
.hdm-btn--primary { background: var(--hdm-gold); color: var(--hdm-brown-dk); }
.hdm-btn--primary:hover { background: #A97D26; color: #fff; }
.hdm-btn--brown { background: var(--hdm-brown); color: #fff; }
.hdm-btn--brown:hover { background: #7A5240; color: #fff; }
.hdm-btn--ghost { background: transparent; border-color: var(--hdm-border); color: var(--hdm-brown); }
.hdm-btn--ghost:hover { background: var(--hdm-cream-2); }
.hdm-btn--onbrown { background: transparent; border-color: rgba(253,249,246,.35); color: var(--hdm-cream); }
.hdm-btn--onbrown:hover { background: rgba(253,249,246,.1); color: #fff; }
.hdm-btn--sm { min-height: 38px; padding: 8px 16px; font-size: 14px; border-radius: var(--hdm-r-sm); }
.hdm-btn--block { width: 100%; }
.hdm-btn[disabled] { opacity: .4; pointer-events: none; }
.hdm-btnrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ==========================================================================
   JOIN BAND — CTA with "what happens next", so the button isn't bare
   ========================================================================== */
.hdm-steps { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 14px; }
@container (min-width: 700px) { .hdm-steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.hdm-step { display: grid; grid-template-columns: 26px 1fr; gap: 12px; font-size: 15px; color: rgba(253,249,246,.86); }
.hdm-step__n {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--hdm-gold); color: var(--hdm-gold);
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.hdm-step strong { color: #fff; font-weight: 500; display: block; }

/* ==========================================================================
   NOTICES — pending / closed / error / info. Calm, never alarming.
   ========================================================================== */
.hdm-notice {
  display: grid; grid-template-columns: 22px 1fr; gap: 14px;
  padding: 18px;
  border: 1px solid var(--hdm-border);
  border-radius: var(--hdm-r);
  background: #fff;
}
.hdm-notice__icon { color: var(--hdm-gold-ink); margin-top: 2px; }
.hdm-notice__t { font-weight: 600; color: var(--hdm-brown); margin-bottom: 4px; }
.hdm-notice--pending { background: var(--hdm-gold-50); border-color: #EDCA82; }
.hdm-notice--quiet { background: var(--hdm-cream-2); }

/* ==========================================================================
   LOADING SKELETON — member state arrives by fetch after render
   ========================================================================== */
.hdm-sk { background: var(--hdm-cream-2); border-radius: 6px; position: relative; overflow: hidden; }
.hdm-sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  transform: translateX(-100%);
  animation: hdm-sheen 1.5s ease-out infinite;
}
@keyframes hdm-sheen { to { transform: translateX(100%); } }
.hdm-sk--line { height: 14px; margin-bottom: 10px; }
.hdm-sk--title { height: 26px; width: 55%; margin-bottom: 16px; }
.hdm-sk--av { width: 36px; height: 36px; border-radius: 50%; }
.hdm-sk--card { height: 96px; border-radius: var(--hdm-r); }
.hdm-sk--w70 { width: 70%; }
.hdm-sk--w45 { width: 45%; }
@media (prefers-reduced-motion: reduce) { .hdm-sk::after { animation: none; } }

/* ==========================================================================
   EMPTY STATES — an invitation, not a failure
   ========================================================================== */
.hdm-empty { text-align: center; padding: 36px 20px; }
.hdm-empty__mark { color: var(--hdm-gold); margin: 0 auto 16px; display: block; }
.hdm-empty .hdm-h3 { margin-bottom: 8px; }
.hdm-empty p { max-width: 44ch; margin-left: auto; margin-right: auto; color: var(--hdm-slate); }

/* ==========================================================================
   FORMS — join form. Consent controls are load-bearing: full size, unbundled,
   never pre-ticked, never de-emphasised.
   ========================================================================== */
.hdm-form { display: grid; gap: 18px; }
.hdm-field { display: grid; gap: 6px; }
.hdm-label { font-size: 14px; font-weight: 500; color: var(--hdm-brown); }
.hdm-label span { color: var(--hdm-slate-strong); font-weight: 400; }
.hdm-input, .hdm-textarea, .hdm-select {
  font-family: inherit; font-size: 16px; color: var(--hdm-ink);
  padding: 13px 14px;
  min-height: 48px;
  border: 1px solid var(--hdm-border);
  border-radius: var(--hdm-r-sm);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(62,40,28,.04);
  width: 100%;
}
.hdm-input:focus, .hdm-textarea:focus, .hdm-select:focus { border-color: var(--hdm-gold); outline: none; box-shadow: 0 0 0 3px rgba(200,151,55,.2); }
.hdm-textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.hdm-hint { font-size: 13px; color: var(--hdm-slate-strong); }

.hdm-consent { display: grid; gap: 12px; padding: 20px; background: var(--hdm-cream-2); border: 1px solid var(--hdm-border); border-radius: var(--hdm-r); }
.hdm-check {
  display: grid; grid-template-columns: 24px 1fr; gap: 14px;
  align-items: start;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--hdm-border);
  border-radius: var(--hdm-r-sm);
  cursor: pointer;
  font-size: 15px;
  line-height: 1.55;
}
.hdm-check input[type="checkbox"] { width: 24px; height: 24px; margin: 0; accent-color: var(--hdm-brown); cursor: pointer; }
.hdm-check__req { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--hdm-terra-ink); margin-top: 6px; font-weight: 600; }
.hdm-check__opt { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--hdm-slate-strong); margin-top: 6px; font-weight: 600; }

/* ==========================================================================
   MEMBER FEED
   ========================================================================== */
.hdm-composer { background: #fff; border: 1px solid var(--hdm-border); border-radius: var(--hdm-r); padding: 16px; }
.hdm-composer__top { display: flex; gap: 12px; }
.hdm-composer__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hdm-border); }
.hdm-count { font-size: 13px; color: var(--hdm-slate-strong); font-variant-numeric: tabular-nums; }

.hdm-feed { display: grid; gap: 14px; margin-top: 18px; }
.hdm-post { background: #fff; border: 1px solid var(--hdm-border); border-radius: var(--hdm-r); padding: 18px; }
.hdm-post__head { display: flex; gap: 12px; align-items: center; }
.hdm-post__who { min-width: 0; flex: 1; }
.hdm-post__name { font-weight: 600; color: var(--hdm-brown); font-size: 15px; }
.hdm-post__meta { font-size: 13px; color: var(--hdm-slate-strong); }
.hdm-post__body { margin-top: 14px; font-size: 16px; line-height: 1.65; }
.hdm-post__foot { display: flex; gap: 6px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hdm-border); flex-wrap: wrap; }

.hdm-react {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 8px 14px;
  border: 1px solid transparent; border-radius: 999px;
  background: transparent; cursor: pointer;
  font-family: inherit; font-size: 14px; color: var(--hdm-slate-strong);
  transition: background-color 180ms ease-out, color 180ms ease-out;
}
.hdm-react:hover { background: var(--hdm-cream-2); color: var(--hdm-brown); }
.hdm-react[aria-pressed="true"] { background: var(--hdm-gold-50); color: var(--hdm-gold-ink); font-weight: 500; }
.hdm-react svg { flex: 0 0 auto; }
.hdm-react[aria-pressed="true"] svg { fill: currentColor; }
.hdm-react__n { font-variant-numeric: tabular-nums; }
.hdm-post__spacer { margin-left: auto; }
.hdm-iconbtn {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; background: transparent; border-radius: 50%; cursor: pointer;
  color: var(--hdm-slate-strong);
}
.hdm-iconbtn:hover { background: var(--hdm-cream-2); color: var(--hdm-brown); }

.hdm-comments { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hdm-border); display: grid; gap: 14px; }
.hdm-comment { display: grid; grid-template-columns: 32px 1fr; gap: 12px; font-size: 15px; }
.hdm-comment .hdm-av { width: 32px; height: 32px; font-size: 12px; }
.hdm-comment__name { font-weight: 600; color: var(--hdm-brown); font-size: 14px; }
.hdm-comment__name span { font-weight: 400; color: var(--hdm-slate-strong); margin-left: 8px; font-size: 13px; }

.hdm-daymark { display: flex; align-items: center; gap: 14px; color: var(--hdm-slate-strong); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin: 8px 0; }
.hdm-daymark::before, .hdm-daymark::after { content: ""; height: 1px; background: var(--hdm-border); flex: 1; }

/* ==========================================================================
   VENDOR PANEL — must match the dashboard accordion (Menu / Portfolio / Donate)
   ========================================================================== */
.hdm-acc { background: #fff; border: 1px solid var(--hdm-border); border-radius: var(--hdm-r); overflow: hidden; }
.hdm-acc__head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 18px 20px; background: #fff; border: 0; border-bottom: 1px solid var(--hdm-border); cursor: pointer; font-family: inherit; text-align: left; }
.hdm-acc__title { font-family: var(--hdm-font-display); font-size: 18px; color: var(--hdm-brown); flex: 1; }
.hdm-acc__body { padding: 20px; display: grid; gap: 20px; }
.hdm-acc--collapsed .hdm-acc__head { border-bottom: 0; }

.hdm-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; background: var(--hdm-cream-2); border: 1px solid var(--hdm-border); border-radius: var(--hdm-r); }
.hdm-switch { position: relative; flex: 0 0 auto; width: 52px; height: 30px; border-radius: 999px; background: var(--hdm-slate); border: 0; cursor: pointer; transition: background-color 180ms ease-out; }
.hdm-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 180ms ease-out; }
.hdm-switch[aria-checked="true"] { background: var(--hdm-olive); }
.hdm-switch[aria-checked="true"]::after { transform: translateX(22px); }

.hdm-radios { display: grid; gap: 10px; }
.hdm-radio { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--hdm-border); border-radius: var(--hdm-r-sm); background: #fff; cursor: pointer; font-size: 15px; }
.hdm-radio input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--hdm-brown); }
.hdm-radio__d { display: block; font-size: 13px; color: var(--hdm-slate-strong); margin-top: 3px; }

.hdm-linkrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border: 1px solid var(--hdm-border); border-radius: var(--hdm-r); background: #fff; text-decoration: none; }
.hdm-linkrow:hover { background: var(--hdm-cream); box-shadow: var(--hdm-shadow-md); }
.hdm-linkrow__t { font-weight: 600; color: var(--hdm-brown); }
.hdm-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--hdm-gold-50); color: var(--hdm-gold-ink); font-variant-numeric: tabular-nums; }
.hdm-pill--quiet { background: var(--hdm-cream-2); color: var(--hdm-slate-strong); }

/* ==========================================================================
   MODERATION QUEUE — administrative, not alarming
   ========================================================================== */
.hdm-mod { display: grid; gap: 12px; }
.hdm-modcard { background: #fff; border: 1px solid var(--hdm-border); border-radius: var(--hdm-r); padding: 18px; }
.hdm-modcard__top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.hdm-modcard__reason { font-size: 13px; color: var(--hdm-slate-strong); }
.hdm-modcard__reason strong { color: var(--hdm-ink); font-weight: 600; }
.hdm-excerpt { margin-top: 14px; padding: 14px 16px; background: var(--hdm-cream); border: 1px solid var(--hdm-border); border-radius: var(--hdm-r-sm); font-size: 15px; line-height: 1.6; }
.hdm-excerpt__by { display: block; font-size: 13px; color: var(--hdm-slate-strong); margin-top: 8px; }
.hdm-modcard__acts { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.hdm-btn--danger { background: #fff; border-color: #E2C4C4; color: #9E2B2B; }
.hdm-btn--danger:hover { background: #9E2B2B; color: #fff; border-color: #9E2B2B; }

/* ==========================================================================
   IMAGERY (optional layer)
   Off by default — the launch feed is text-only. Add .hdm-community--media
   to the panel root to switch these on.
   Directory cover photo is 660×370 (16:9); logos 200×200 rendered as circles.
   ========================================================================== */
.hdm-cover { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 340px; overflow: hidden; background: var(--hdm-cream-2); }
.hdm-cover__img, .hdm-cover img, .hdm-cover image-slot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hdm-cover__veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(58,38,26,.92) 0%, rgba(58,38,26,.88) 26%, rgba(58,38,26,.62) 52%, rgba(58,38,26,.16) 78%, rgba(58,38,26,0) 100%);
}
.hdm-cover__plate { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 20px; pointer-events: none; }
.hdm-cover__plate .hdm-h1 { color: #fff; }
.hdm-cover__plate .hdm-eyebrow { color: var(--hdm-cream); }
.hdm-cover__plate .hdm-status { pointer-events: auto; }
@container (min-width: 560px) { .hdm-cover__plate { padding: 32px; } }
@container (min-width: 900px) { .hdm-cover__plate { padding: 40px 48px; } }

/* Overlapping community logo, the directory's circle treatment */
.hdm-cover__logo {
  position: absolute; left: 20px; bottom: -32px;
  width: 76px; height: 76px; border-radius: 50%;
  border: 3px solid #fff; overflow: hidden; background: var(--hdm-brown);
  box-shadow: var(--hdm-shadow-md);
}
@container (min-width: 900px) { .hdm-cover__logo { left: 48px; } }

/* Photo strip — what's happening at the centre. Shop-window only. */
.hdm-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
@container (min-width: 560px) { .hdm-strip { grid-auto-columns: 1fr; grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; } }
.hdm-shot { scroll-snap-align: start; border-radius: var(--hdm-r); overflow: hidden; border: 1px solid var(--hdm-border); background: var(--hdm-cream-2); }
.hdm-shot__frame { position: relative; aspect-ratio: 4 / 3; }
.hdm-shot__frame img, .hdm-shot__frame image-slot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hdm-shot__cap { padding: 10px 12px; font-size: 13px; color: var(--hdm-slate-strong); background: #fff; }

/* Post attachments — one image, or a 2-up / 3-up grid */
.hdm-media { margin-top: 14px; border-radius: var(--hdm-r); overflow: hidden; border: 1px solid var(--hdm-border); display: grid; gap: 2px; background: var(--hdm-border); }
.hdm-media--2 { grid-template-columns: 1fr 1fr; }
.hdm-media--3 { grid-template-columns: 1fr 1fr; }
.hdm-media--3 > :first-child { grid-row: span 2; }
.hdm-media__cell { position: relative; aspect-ratio: 3 / 2; background: var(--hdm-cream-2); }
.hdm-media--1 .hdm-media__cell { aspect-ratio: 16 / 10; }
.hdm-media--3 > :first-child { aspect-ratio: auto; }
.hdm-media__cell img, .hdm-media__cell image-slot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hdm-media__alt { font-size: 13px; color: var(--hdm-slate-strong); margin-top: 8px; }

/* Composer attach row */
.hdm-attach { display: flex; align-items: center; gap: 10px; }
.hdm-attachbtn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--hdm-border); border-radius: 999px;
  background: #fff; cursor: pointer; font-family: inherit; font-size: 14px;
  color: var(--hdm-brown);
}
.hdm-attachbtn:hover { background: var(--hdm-cream-2); }
.hdm-thumbs { display: flex; gap: 8px; }
.hdm-thumb { position: relative; width: 56px; height: 56px; border-radius: var(--hdm-r-sm); overflow: hidden; border: 1px solid var(--hdm-border); background: var(--hdm-cream-2); display: grid; place-items: center; color: var(--hdm-slate-strong); }
.hdm-thumb img, .hdm-thumb image-slot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hdm-thumb__x {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px;
  border: 0; border-radius: 50%; background: rgba(64,42,30,.75); color: #fff;
  display: grid; place-items: center; cursor: pointer; font-size: 12px; line-height: 1;
}

/* ==========================================================================
   RICH TEXT — vendors paste formatted HTML into welcome / rules.
   Whitelist the tags that survive sanitising and style them; everything
   nests inside .hdm-rich so stray markup can't reach the rest of the panel.
   ========================================================================== */
.hdm-rich > :first-child { margin-top: 0; }
.hdm-rich > :last-child { margin-bottom: 0; }
.hdm-rich p { margin: 0 0 1em; }
.hdm-rich h3, .hdm-rich h4 {
  font-family: var(--hdm-font-display); color: var(--hdm-brown);
  font-size: 19px; font-weight: 600; line-height: 1.25;
  margin: 1.5em 0 .5em;
}
.hdm-rich strong, .hdm-rich b { font-weight: 600; color: var(--hdm-brown); }
.hdm-rich em, .hdm-rich i { font-style: italic; }
.hdm-rich a { color: var(--hdm-brown); text-decoration: underline; text-underline-offset: 2px; }
.hdm-rich a:hover { color: var(--hdm-gold-ink); }
.hdm-rich ul, .hdm-rich ol { margin: 0 0 1em; padding-left: 1.35em; }
.hdm-rich li { margin-bottom: .45em; }
.hdm-rich ul { list-style: none; padding-left: 1.2em; }
.hdm-rich ul > li { position: relative; }
.hdm-rich ul > li::before {
  content: ""; position: absolute; left: -1.05em; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--hdm-gold);
}
.hdm-rich blockquote {
  margin: 1.25em 0; padding: 16px 18px;
  background: var(--hdm-cream-2); border: 1px solid var(--hdm-border);
  border-radius: var(--hdm-r); font-size: 16px;
}
.hdm-rich hr { border: 0; border-top: 1px solid var(--hdm-border); margin: 1.75em 0; }
.hdm-rich img { max-width: 100%; height: auto; border-radius: var(--hdm-r); display: block; margin: 1.25em 0; }
.hdm-rich table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 1.25em 0; }
.hdm-rich th, .hdm-rich td { border: 1px solid var(--hdm-border); padding: 10px 12px; text-align: left; }
.hdm-rich th { background: var(--hdm-cream-2); font-weight: 600; color: var(--hdm-brown); }
/* Ge'ez inside pasted rich text keeps its own metrics */
.hdm-rich .hdm-geez p, .hdm-rich .hdm-geez li { line-height: 1.9; }

/* ==========================================================================
   LANGUAGES (§5.1)
   The vendor picks a primary and an optional secondary from a fixed set.
   Nothing below hardcodes English or Amharic; `.hdm-pair__tag` takes whatever
   the vendor selected. One language selected collapses the pairing entirely.
   ========================================================================== */

/* Single-language: no tags, no divider, no empty half. Reads as deliberate. */
.hdm-pair--solo { background: transparent; border: 0; }
.hdm-pair--solo .hdm-pair__side { padding: 0; }
.hdm-pair--solo .hdm-pair__tag { display: none; }
.hdm-rule--solo .hdm-rule__am { display: none; }

/* Any Ge'ez-script language — Amharic and Tigrinya share metrics exactly */
.hdm-pair__tag--script { font-family: var(--hdm-font-geez); letter-spacing: .06em; text-transform: none; font-size: 12px; }

/* Vendor-side language picker */
.hdm-langpick { display: grid; gap: 14px; padding: 18px; background: var(--hdm-cream-2); border: 1px solid var(--hdm-border); border-radius: var(--hdm-r); }
.hdm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hdm-chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--hdm-border); border-radius: 999px;
  background: #fff; cursor: pointer; font-family: inherit; font-size: 15px;
  color: var(--hdm-ink);
  transition: background-color 180ms ease-out, border-color 180ms ease-out;
}
.hdm-chip:hover { background: var(--hdm-cream); }
.hdm-chip input { position: absolute; opacity: 0; pointer-events: none; }
.hdm-chip--on { background: var(--hdm-gold-50); border-color: var(--hdm-gold); color: var(--hdm-gold-ink); font-weight: 500; }
.hdm-chip--primary { background: var(--hdm-brown); border-color: var(--hdm-brown); color: #fff; }
.hdm-chip__mark { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.hdm-chip[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* One labelled content box per selected language */
.hdm-langfield { border: 1px solid var(--hdm-border); border-radius: var(--hdm-r); overflow: hidden; background: #fff; }
.hdm-langfield__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--hdm-cream-2); border-bottom: 1px solid var(--hdm-border); }
.hdm-langfield__name { font-size: 13px; font-weight: 600; color: var(--hdm-brown); }
.hdm-langfield .hdm-textarea { border: 0; border-radius: 0; box-shadow: none; }

/* ==========================================================================
   POST OVERFLOW MENU + DESTRUCTIVE CONFIRM (§3.3)
   ========================================================================== */
.hdm-post__head { position: relative; }
.hdm-menu {
  position: absolute; top: 46px; right: 0; z-index: 5;
  min-width: 210px; padding: 6px;
  background: #fff; border: 1px solid var(--hdm-border);
  border-radius: var(--hdm-r); box-shadow: var(--hdm-shadow-md);
  display: grid; gap: 2px;
}
.hdm-menu__item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 0; border-radius: var(--hdm-r-sm); background: transparent;
  font-family: inherit; font-size: 15px; color: var(--hdm-ink);
  text-align: left; cursor: pointer;
}
.hdm-menu__item:hover { background: var(--hdm-cream-2); }
.hdm-menu__item--danger { color: #9E2B2B; }
.hdm-menu__item--danger:hover { background: #FBF1F1; }
.hdm-menu__sep { height: 1px; background: var(--hdm-border); margin: 4px 0; }

.hdm-confirm { margin-top: 14px; padding: 18px; background: var(--hdm-cream-2); border: 1px solid var(--hdm-border); border-radius: var(--hdm-r); }
.hdm-confirm__t { font-weight: 600; color: var(--hdm-brown); margin-bottom: 4px; }
.hdm-confirm .hdm-btnrow { margin-top: 14px; }

/* Removed post — marked, not vanished */
.hdm-post--removed { background: var(--hdm-cream-2); border-style: dashed; }
.hdm-post--removed .hdm-post__body { color: var(--hdm-slate-strong); font-style: italic; }

/* Vendor posting as the business */
.hdm-post--vendor { border-color: var(--hdm-brown); box-shadow: inset 0 0 0 1px var(--hdm-brown); }
.hdm-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: var(--hdm-brown); color: var(--hdm-gold-50); margin-left: 8px; vertical-align: 2px;
}
.hdm-badge--quiet { background: var(--hdm-cream-2); color: var(--hdm-slate-strong); }

/* Pagination */
.hdm-pager { display: flex; justify-content: center; margin-top: 20px; }
.hdm-pager__note { text-align: center; font-size: 13px; color: var(--hdm-slate-strong); margin-top: 12px; }

/* ==========================================================================
   MEMBER LIST (§3.6.1) — the vendor's most-used surface
   Name and email only. Nothing else in the members table is ever rendered.
   ========================================================================== */
.hdm-toolbar { display: grid; gap: 12px; }
@container (min-width: 640px) { .hdm-toolbar { grid-template-columns: 1fr auto; align-items: center; } }
.hdm-search { position: relative; }
.hdm-search .hdm-input { padding-left: 42px; }
.hdm-search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--hdm-slate-strong); pointer-events: none; }

.hdm-seg { display: inline-flex; padding: 3px; background: var(--hdm-cream-2); border: 1px solid var(--hdm-border); border-radius: 999px; gap: 2px; }
.hdm-seg__btn {
  min-height: 38px; padding: 8px 16px;
  border: 0; border-radius: 999px; background: transparent;
  font-family: inherit; font-size: 14px; color: var(--hdm-slate-strong);
  cursor: pointer; white-space: nowrap;
}
.hdm-seg__btn[aria-selected="true"] { background: #fff; color: var(--hdm-brown); font-weight: 600; box-shadow: var(--hdm-shadow); }

.hdm-group { margin-top: 22px; }
.hdm-group__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.hdm-group__head .hdm-h3 { font-size: 17px; }

/* Pending block gets the one piece of emphasis on the screen */
.hdm-queue { border: 1px solid #EDCA82; border-radius: var(--hdm-r); background: var(--hdm-gold-50); padding: 16px; }
.hdm-queue__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

.hdm-mlist { display: grid; gap: 8px; }
.hdm-mrow {
  display: grid; gap: 12px; align-items: center;
  grid-template-columns: 22px 40px 1fr;
  padding: 12px 14px;
  background: #fff; border: 1px solid var(--hdm-border); border-radius: var(--hdm-r);
}
@container (min-width: 640px) { .hdm-mrow { grid-template-columns: 22px 40px 1fr auto; } }
.hdm-mrow input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--hdm-brown); cursor: pointer; }
.hdm-mrow__who { min-width: 0; }
.hdm-mrow__name { font-weight: 600; color: var(--hdm-brown); font-size: 15px; }
.hdm-mrow__mail { font-size: 13px; color: var(--hdm-slate-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdm-mrow__meta { font-size: 13px; color: var(--hdm-slate-strong); }
.hdm-mrow__acts { display: flex; gap: 8px; flex-wrap: wrap; grid-column: 1 / -1; }
@container (min-width: 640px) { .hdm-mrow__acts { grid-column: auto; } }
.hdm-mrow--limbo { background: var(--hdm-cream-2); }
.hdm-mrow:hover { box-shadow: var(--hdm-shadow-md); }

.hdm-bulkbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 12px;
  background: var(--hdm-brown); color: var(--hdm-cream);
  border-radius: var(--hdm-r);
}
.hdm-bulkbar__n { font-weight: 600; color: #fff; }
.hdm-bulkbar .hdm-btn--sm { min-height: 36px; }

.hdm-privacy { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--hdm-slate-strong); margin-top: 18px; }

/* Member detail (§3.6.3) */
.hdm-kv { display: grid; gap: 0; border: 1px solid var(--hdm-border); border-radius: var(--hdm-r); overflow: hidden; }
.hdm-kv__row { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--hdm-border); }
@container (min-width: 560px) { .hdm-kv__row { grid-template-columns: 160px 1fr; gap: 16px; align-items: baseline; } }
.hdm-kv__row:last-child { border-bottom: 0; }
.hdm-kv__k { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--hdm-slate-strong); }
.hdm-kv__v { font-size: 15px; color: var(--hdm-ink); }

/* ---------- narrow-phone safety (320px) ---------- */
@container (max-width: 360px) {
  .hdm-band { padding: 22px 16px; }
  .hdm-h1 { font-size: 26px; }
  .hdm-rule { grid-template-columns: 24px 1fr; gap: 11px; padding: 15px; }
  .hdm-rule__n { width: 24px; height: 24px; font-size: 12px; }
  .hdm-identity { gap: 12px; }
}

/* ──────────────────────────────────────────────────────────────
   HDM LOCAL OVERRIDES — added 2026-09-23, not part of the design bundle.
   Flatsome sets text-transform:uppercase on buttons site-wide, which turned
   every design button into SHOUTING ("SEND MY REQUEST", "DISMISS").
   !important is needed because the theme's selector is more specific than a
   plain class. Scoped to .hdm-btn only — .hdm-check__req, .hdm-check__opt
   and .hdm-eyebrow are uppercase by design and must stay that way.
   ────────────────────────────────────────────────────────────── */
.hdm-btn,
button.hdm-btn,
a.hdm-btn {
	text-transform: none !important;
	letter-spacing: normal !important;
}

/* ──────────────────────────────────────────────────────────────
   Community attachments (P2) — image grid + PDF pill + composer
   picker. Added 2026-10-08.
   ────────────────────────────────────────────────────────────── */
.hdm-composer__att { margin-top: 8px; }
.hdm-composer__att .hdm-small { color: var(--hdm-slate-strong, #6b7280); }
.hdm-composer__foot { flex-wrap: wrap; }
.hdm-composer__foot .hdm-composer__attach {
  width: 38px; height: 38px; font-size: 18px; display: inline-grid; place-items: center;
  border: 1px solid var(--hdm-border); border-radius: 50%; cursor: pointer;
  color: var(--hdm-slate-strong); background: #fff; line-height: 1;
}
.hdm-composer__foot .hdm-composer__attach:hover { border-color: var(--hdm-gold); color: var(--hdm-brown); }
.hdm-post__att { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hdm-att-thumb { display: block; border-radius: var(--hdm-r, 10px); overflow: hidden; border: 1px solid var(--hdm-border, #e5e7eb); }
.hdm-att-thumb img { display: block; width: 120px; height: 120px; object-fit: cover; }
.hdm-att-pdf {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid var(--hdm-border, #e5e7eb); border-radius: var(--hdm-r, 10px);
  background: var(--hdm-cream, #FDF9F6); color: var(--hdm-brown, #6A4532);
  font-size: 0.85rem; text-decoration: none;
}
.hdm-att-pdf:hover { border-color: var(--hdm-gold, #C89737); }
