/* Hararah Community · v0.1.0 (C1)
   Design tokens align with hararah-core/brand.json. */

:root {
  --hh-c-gold:   #C09B7B;
  --hh-c-goldDk: #9C7A5A;
  --hh-c-bgWarm: #F7F4EF;
  --hh-c-line:   #E8DCC6;
  --hh-c-ink:    #2C2B2C;
  --hh-c-mute:   #6E7275;
  --hh-c-success:#7ABFA3;
  --hh-c-warn:   #D97706;
  --hh-c-danger: #C13C3C;
  --hh-c-accent: #B79EC2;
}

.hh-com { font-family: Inter, system-ui, -apple-system, sans-serif; color: var(--hh-c-ink); line-height: 1.6; }
.hh-com * { box-sizing: border-box; }
.hh-com-container { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.hh-com-container--narrow { max-width: 720px; }
.hh-com-h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 32px; color: var(--hh-c-goldDk); font-weight: 600; margin: 18px 0; }
.hh-com-h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 20px; color: var(--hh-c-goldDk); font-weight: 600; margin: 0 0 14px; }

/* Hero */
.hh-com-hero {
  background: linear-gradient(135deg, var(--hh-c-bgWarm) 0%, #fff 60%);
  border-bottom: 1px solid var(--hh-c-line);
  padding: 56px 0 48px;
  margin-bottom: 32px;
}
.hh-com-hero__inner { max-width: 720px; }
.hh-com-hero__title { font-family: 'Playfair Display', Georgia, serif; font-size: 44px; color: var(--hh-c-goldDk); font-weight: 600; margin: 0 0 12px; line-height: 1.15; }
.hh-com-hero__sub { font-size: 18px; color: var(--hh-c-mute); margin: 0 0 28px; }
.hh-com-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* Buttons */
.hh-com-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 100px; font-weight: 600; font-size: 14px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: all .18s ease;
}
.hh-com-btn--gold { background: var(--hh-c-gold); color: #fff; }
.hh-com-btn--gold:hover { background: var(--hh-c-goldDk); color: #fff; }
.hh-com-btn--ghost { background: transparent; color: var(--hh-c-goldDk); border-color: var(--hh-c-gold); }
.hh-com-btn--ghost:hover { background: var(--hh-c-bgWarm); }
.hh-com-btn--sm { padding: 7px 14px; font-size: 12px; }

.hh-com-back { display: inline-block; margin: 16px 0 8px; color: var(--hh-c-goldDk); font-size: 13px; text-decoration: none; }
.hh-com-back:hover { color: var(--hh-c-gold); }

/* Hub grid */
.hh-com-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 48px; }
.hh-com-grid > .hh-com-card--wide { grid-column: 1 / -1; }
.hh-com-card { background: #fff; border: 1px solid var(--hh-c-line); border-radius: 16px; padding: 22px; }

/* Forums list */
.hh-com-forums { list-style: none; padding: 0; margin: 0; }
.hh-com-forums li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hh-c-line); }
.hh-com-forums li:last-child { border-bottom: 0; }
.hh-com-forum__icon { width: 38px; height: 38px; border-radius: 10px; background: var(--hh-c-bgWarm); display: flex; align-items: center; justify-content: center; color: var(--hh-c-goldDk); font-size: 16px; }
.hh-com-forum__body { flex: 1; min-width: 0; }
.hh-com-forum__body strong { display: block; font-size: 14px; color: var(--hh-c-ink); }
.hh-com-forum__body em { display: block; font-style: normal; font-size: 12px; color: var(--hh-c-mute); margin-top: 2px; }
.hh-com-forum__chev { color: var(--hh-c-mute); font-size: 22px; }
[dir="rtl"] .hh-com-forum__chev { transform: rotate(180deg); }

/* Top contributors */
.hh-com-top { list-style: none; padding: 0; margin: 0; counter-reset: rk; }
.hh-com-top__row {
  display: grid; grid-template-columns: 28px 1fr auto auto;
  align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--hh-c-line);
  text-decoration: none; color: inherit;
}
.hh-com-top li:last-child .hh-com-top__row { border-bottom: 0; }
.hh-com-top__rank { font-family: 'Playfair Display', Georgia, serif; color: var(--hh-c-goldDk); font-weight: 700; }
.hh-com-top__name { font-weight: 600; font-size: 14px; }
.hh-com-top__tier { padding: 3px 9px; border-radius: 100px; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.hh-com-top__karma { font-family: 'Playfair Display', Georgia, serif; font-size: 16px; color: var(--hh-c-goldDk); font-weight: 600; }

/* Tier pills */
.hh-com-tier { font-style: normal; padding: 3px 9px; border-radius: 100px; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.hh-com-tier--newbie       { background: rgba(110,114,117,.18); color: var(--hh-c-mute); }
.hh-com-tier--enthusiast   { background: rgba(122,191,163,.18); color: #2D7E5F; }
.hh-com-tier--expert       { background: rgba(217,119,6,.16);  color: #a85a05; }
.hh-com-tier--connoisseur  { background: rgba(192,155,123,.18); color: var(--hh-c-goldDk); }
.hh-com-tier--master       { background: linear-gradient(135deg, var(--hh-c-gold), var(--hh-c-accent)); color: #fff; }

.hh-com-amb { color: var(--hh-c-gold); font-weight: 700; }

/* Recent faces */
.hh-com-faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.hh-com-face {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; background: var(--hh-c-bgWarm); border-radius: 14px;
  text-decoration: none; color: inherit; transition: transform .18s ease;
}
.hh-com-face:hover { transform: translateY(-2px); }
.hh-com-face__avatar {
  width: 56px; height: 56px; border-radius: 50%; background-color: #fff;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--hh-c-line); color: var(--hh-c-goldDk); font-weight: 700; font-size: 22px;
  font-family: 'Playfair Display', Georgia, serif;
}
.hh-com-face strong { font-size: 12px; color: var(--hh-c-ink); }
.hh-com-face em { font-style: normal; }

/* Profile page */
.hh-com-profile { background: #fff; border: 1px solid var(--hh-c-line); border-radius: 18px; overflow: hidden; margin-bottom: 32px; }
.hh-com-profile__cover {
  height: 140px;
  background: linear-gradient(135deg, var(--hh-c-bgWarm) 0%, #fff 100%);
  background-size: cover; background-position: center;
  border-bottom: 1px solid var(--hh-c-line);
}
.hh-com-profile__head { display: flex; gap: 18px; padding: 24px; align-items: flex-start; }
.hh-com-profile__avatar {
  width: 96px; height: 96px; border-radius: 50%; background-color: #fff;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid #fff; box-shadow: 0 0 0 1px var(--hh-c-line);
  margin-top: -52px; flex-shrink: 0; color: var(--hh-c-goldDk);
  font-family: 'Playfair Display', Georgia, serif; font-size: 36px; font-weight: 700;
  position: relative;
}
.hh-com-verified { position: absolute; bottom: 0; right: 0; color: var(--hh-c-success); background: #fff; border-radius: 50%; }
.hh-com-profile__title h1 { margin: 0 0 4px; font-family: 'Playfair Display', Georgia, serif; font-size: 24px; color: var(--hh-c-goldDk); font-weight: 600; }
.hh-com-profile__handle { color: var(--hh-c-mute); margin: 0 0 8px; font-size: 13px; }
.hh-com-profile__bio { font-size: 14px; color: var(--hh-c-ink); margin: 0 0 12px; }
.hh-com-profile__meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--hh-c-mute); margin-bottom: 12px; }
.hh-com-profile__meta strong { color: var(--hh-c-ink); font-weight: 600; }
.hh-com-profile__social { display: flex; gap: 12px; margin-bottom: 14px; }
.hh-com-profile__social a { font-size: 12px; color: var(--hh-c-goldDk); text-decoration: none; }
.hh-com-profile__social a:hover { color: var(--hh-c-gold); }

/* Activity log */
.hh-com-activity { list-style: none; padding: 0 24px 24px; margin: 0; }
.hh-com-activity li { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hh-c-line); align-items: center; font-size: 13px; }
.hh-com-activity__delta { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; }
.hh-com-activity__delta.pos { color: var(--hh-c-success); }
.hh-com-activity__delta.neg { color: var(--hh-c-danger); }
.hh-com-activity__when { color: var(--hh-c-mute); font-size: 11px; }

/* Edit form */
.hh-com-form { background: #fff; border: 1px solid var(--hh-c-line); border-radius: 16px; padding: 24px; }
.hh-com-form label { display: block; margin-bottom: 16px; }
.hh-com-form label > span { display: block; font-size: 12px; font-weight: 600; color: var(--hh-c-mute); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.hh-com-form input[type=text],
.hh-com-form textarea,
.hh-com-form select { width: 100%; padding: 10px 12px; border: 1px solid var(--hh-c-line); border-radius: 8px; background: #fff; font: inherit; color: var(--hh-c-ink); }
.hh-com-form input:focus,
.hh-com-form textarea:focus,
.hh-com-form select:focus { outline: 2px solid var(--hh-c-gold); border-color: var(--hh-c-gold); }
.hh-com-form__row { display: flex; gap: 14px; }
.hh-com-form__half { flex: 1; }
.hh-com-form__actions { display: flex; gap: 10px; margin-top: 8px; }
.hh-com-form__msg { margin-top: 10px; font-size: 13px; color: var(--hh-c-success); font-weight: 600; }

/* Leaderboard */
.hh-com-tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--hh-c-line); }
.hh-com-tabs a { padding: 10px 16px; color: var(--hh-c-mute); font-size: 13px; font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; }
.hh-com-tabs a.is-active { color: var(--hh-c-goldDk); border-bottom-color: var(--hh-c-gold); }

.hh-com-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--hh-c-line); }
.hh-com-table thead th { text-align: left; padding: 12px 16px; background: var(--hh-c-bgWarm); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--hh-c-mute); }
[dir="rtl"] .hh-com-table thead th { text-align: right; }
.hh-com-table tbody tr { border-top: 1px solid var(--hh-c-line); }
.hh-com-table td { padding: 12px 16px; }
.hh-com-table a { color: inherit; text-decoration: none; }
.hh-com-table a em { color: var(--hh-c-mute); font-style: normal; font-size: 12px; margin-left: 6px; }
.hh-com-table__rank { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; color: var(--hh-c-goldDk); width: 60px; }
.hh-com-table__karma { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; color: var(--hh-c-goldDk); }

/* Badges grid */
.hh-com-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 48px; }
.hh-com-badge { background: #fff; border: 1px solid var(--hh-c-line); border-radius: 16px; padding: 20px; text-align: center; transition: transform .18s ease; }
.hh-com-badge:hover { transform: translateY(-2px); }
.hh-com-badge__icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; }
.hh-com-badge--bronze .hh-com-badge__icon    { background: linear-gradient(135deg, #b07a4d, #8a5a36); }
.hh-com-badge--silver .hh-com-badge__icon    { background: linear-gradient(135deg, #b8b8c4, #8c8c98); }
.hh-com-badge--gold .hh-com-badge__icon      { background: linear-gradient(135deg, var(--hh-c-gold), var(--hh-c-goldDk)); }
.hh-com-badge--platinum .hh-com-badge__icon  { background: linear-gradient(135deg, #d4d8e0, #8c93a6); }
.hh-com-badge--legendary .hh-com-badge__icon { background: linear-gradient(135deg, var(--hh-c-gold), var(--hh-c-accent)); }
.hh-com-badge h3 { margin: 0 0 6px; font-family: 'Playfair Display', Georgia, serif; font-size: 16px; color: var(--hh-c-goldDk); font-weight: 600; }
.hh-com-badge p { margin: 0 0 8px; font-size: 13px; color: var(--hh-c-mute); }
.hh-com-badge__tier { font-style: normal; font-size: 11px; color: var(--hh-c-mute); text-transform: uppercase; letter-spacing: .05em; }

.hh-com-empty { color: var(--hh-c-mute); font-style: italic; padding: 14px 0; text-align: center; }

/* Mobile */
@media (max-width: 720px) {
  .hh-com-hero { padding: 36px 0 32px; }
  .hh-com-hero__title { font-size: 32px; }
  .hh-com-grid { grid-template-columns: 1fr; }
  .hh-com-profile__head { flex-direction: column; align-items: center; text-align: center; }
  .hh-com-profile__avatar { margin-top: -56px; }
  .hh-com-profile__meta { justify-content: center; }
  .hh-com-form__row { flex-direction: column; }
  .hh-com-table thead { display: none; }
  .hh-com-table tbody td { display: block; padding: 4px 16px; }
  .hh-com-table tbody tr { padding: 12px 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hh-com-btn, .hh-com-face, .hh-com-badge { transition: none; }
}


/* ============================================================
   v0.1.8 — Scent Swap Marketplace
   ============================================================ */

.hh-com-swap-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.hh-com-swap-intro { color: var(--hh-c-mute); font-size: 14px; margin: 0; max-width: 560px; }

.hh-com-swap-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.hh-com-swap-filters input[type=text] {
  flex: 1; min-width: 180px; padding: 9px 12px; border: 1px solid var(--hh-c-line); border-radius: 8px; font: inherit;
}
.hh-com-swap-filters input[type=text][name=country] { flex: 0 0 120px; text-transform: uppercase; }

.hh-com-swap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 48px; }

.hh-com-swap-card {
  background: #fff; border: 1px solid var(--hh-c-line); border-radius: 14px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.hh-com-swap-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.07); border-color: var(--hh-c-gold); }
.hh-com-swap-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.hh-com-swap-card__author { display: flex; align-items: center; gap: 8px; }
.hh-com-swap-card__author strong { font-size: 12px; }
.hh-com-swap-card__country {
  background: var(--hh-c-bgWarm); color: var(--hh-c-goldDk);
  padding: 3px 9px; border-radius: 100px; font-size: 10px; font-weight: 700; letter-spacing: .04em;
}
.hh-com-swap-card__scent {
  font-family: 'Playfair Display', Georgia, serif; font-size: 18px; color: var(--hh-c-goldDk);
  font-weight: 600; margin: 0; line-height: 1.25;
}
.hh-com-swap-card__meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--hh-c-mute); }
.hh-com-swap-card__meta strong { color: var(--hh-c-ink); font-weight: 600; }
.hh-com-swap-card__looking { font-size: 13px; color: var(--hh-c-ink); margin: 0; line-height: 1.5; }
.hh-com-swap-card__looking strong { color: var(--hh-c-goldDk); }

.hh-com-swap-empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; }

.hh-com-face__avatar--sm { width: 32px; height: 32px; font-size: 14px; }
.hh-com-face__avatar--xs { width: 28px; height: 28px; font-size: 12px; }

/* Detail page */
.hh-com-swap-detail { background: #fff; border: 1px solid var(--hh-c-line); border-radius: 16px; padding: 24px; margin-bottom: 24px; }
.hh-com-swap-detail header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.hh-com-swap-detail__author { display: flex; align-items: center; gap: 12px; }
.hh-com-swap-state {
  padding: 5px 14px; border-radius: 100px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
}
.hh-com-swap-state--open    { background: rgba(122,191,163,.18); color: #2D7E5F; }
.hh-com-swap-state--reserved{ background: rgba(217,119,6,.16);   color: #a85a05; }
.hh-com-swap-state--closed  { background: rgba(110,114,117,.18); color: var(--hh-c-mute); }

.hh-com-swap-detail__meta {
  display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0 18px;
  font-size: 14px;
}
.hh-com-swap-detail__meta dt { color: var(--hh-c-mute); font-weight: 600; }
.hh-com-swap-detail__meta dd { margin: 0; color: var(--hh-c-ink); }
.hh-com-swap-detail__looking { background: var(--hh-c-bgWarm); border-radius: 12px; padding: 14px 16px; }
.hh-com-swap-detail__looking strong { color: var(--hh-c-goldDk); display: block; margin-bottom: 6px; }
.hh-com-swap-detail__looking p { margin: 0; line-height: 1.6; }

/* Thread */
.hh-com-swap-thread { background: #fff; border: 1px solid var(--hh-c-line); border-radius: 16px; padding: 20px 24px; margin-bottom: 32px; }
.hh-com-swap-thread ul { list-style: none; padding: 0; margin: 0 0 18px; }
.hh-com-swap-msg { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--hh-c-line); }
.hh-com-swap-msg:last-child { border-bottom: 0; }
.hh-com-swap-msg__body { flex: 1; min-width: 0; }
.hh-com-swap-msg__head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.hh-com-swap-msg__head strong { font-size: 13px; }
.hh-com-swap-msg__head em { font-style: normal; color: var(--hh-c-mute); font-size: 11px; }
.hh-com-swap-msg p { margin: 0; font-size: 13px; line-height: 1.55; }
.hh-com-swap-msg--author .hh-com-swap-msg__body p { color: var(--hh-c-goldDk); }

.hh-com-swap-msg-form { display: flex; flex-direction: column; gap: 8px; }
.hh-com-swap-msg-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--hh-c-line); border-radius: 10px;
  font: inherit; resize: vertical; min-height: 70px;
}
.hh-com-swap-msg-form button { align-self: flex-end; }

/* Hub teaser card for Scent Swap */
.hh-com-swap-teaser {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(135deg, var(--hh-c-bgWarm) 0%, #fff 60%);
  border: 1px solid var(--hh-c-line); border-radius: 16px;
  padding: 20px 22px; margin-bottom: 24px;
}
.hh-com-swap-teaser__icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--hh-c-gold), var(--hh-c-goldDk));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.hh-com-swap-teaser__body { flex: 1; min-width: 0; }
.hh-com-swap-teaser__body h3 {
  margin: 0 0 4px; font-family: 'Playfair Display', Georgia, serif;
  color: var(--hh-c-goldDk); font-size: 18px; font-weight: 600;
}
.hh-com-swap-teaser__body p { margin: 0; color: var(--hh-c-mute); font-size: 13px; }
.hh-com-swap-teaser__body strong { color: var(--hh-c-goldDk); }

@media (max-width: 720px) {
  .hh-com-swap-detail header { flex-direction: column; align-items: flex-start; }
  .hh-com-swap-detail__meta { grid-template-columns: 1fr; gap: 6px; }
  .hh-com-swap-detail__meta dt { margin-top: 8px; }
  .hh-com-swap-teaser { flex-direction: column; align-items: stretch; text-align: center; }
}
