/* p-community: the members community landing page (/community/) and the
 * DiscourseConnect bridge page (/community/sso/). Scoped under .wc .p-community
 * so it cannot collide with any other template. Every token carries a
 * fallback so the page survives a stale cached copy of waldrep.css.
 */
.wc body.p-community {
  background: var(--bg-deep, #07091a);
  color: var(--text, #e2e8f0);
}

/* ── Hero ── */
.wc .p-community .community-hero {
  padding: 88px 0 64px;
  background:
    radial-gradient(ellipse at 20% 0%, var(--accent-glow, rgba(0, 200, 255, 0.15)), transparent 55%),
    var(--bg-deep, #07091a);
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.wc .p-community .community-hero .eyebrow {
  color: var(--gold, #d4a843);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.wc .p-community .community-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.1;
  font-weight: 800;
  color: var(--text-strong, #ffffff);
  max-width: 820px;
  margin: 0 0 18px;
}
.wc .p-community .hero-sub {
  max-width: 720px;
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--text-muted, #a0aab8);
  margin: 0 0 28px;
}
.wc .p-community .hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.wc .p-community .hero-note {
  color: var(--text-faint, #768193);
  font-size: 0.92rem;
  margin: 0;
}

/* ── Sections ── */
.wc .p-community .community-section { padding: 64px 0; }
.wc .p-community .community-section-alt {
  background: var(--bg-section, #0b0d22);
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.wc .p-community .section-head { margin-bottom: 32px; }
.wc .p-community .community-grid { margin-top: 8px; }
.wc .p-community .card p { color: var(--text-muted, #a0aab8); line-height: 1.6; margin: 0; }

.wc .p-community .community-point {
  padding: 24px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  background: var(--bg-card, #0e1230);
}
.wc .p-community .community-point h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-strong, #ffffff);
  margin: 0 0 8px;
}
.wc .p-community .community-point p { color: var(--text-muted, #a0aab8); line-height: 1.6; margin: 0; }

/* ── House rules ── */
.wc .p-community .rule-list {
  counter-reset: rule;
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 820px;
  display: grid;
  gap: 14px;
}
.wc .p-community .rule-list li {
  counter-increment: rule;
  position: relative;
  padding: 18px 20px 18px 64px;
  border: 1px solid var(--border-gold, rgba(212, 168, 67, 0.22));
  border-radius: 12px;
  background: var(--gold-dim, rgba(212, 168, 67, 0.10));
  line-height: 1.6;
  color: var(--text, #e2e8f0);
}
.wc .p-community .rule-list li::before {
  content: counter(rule);
  position: absolute;
  left: 20px;
  top: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--bg-deep, #07091a);
  background: var(--gold, #d4a843);
}
.wc .p-community .rule-list strong { color: var(--text-strong, #ffffff); }
.wc .p-community .rule-note {
  margin: 22px 0 0;
  color: var(--text-faint, #768193);
  font-size: 0.92rem;
  max-width: 820px;
}
.wc .p-community .community-closing .section-sub a { color: var(--accent, #00c8ff); }

/* ── Bridge page ── */
.wc body.p-community-sso {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wc .p-community-sso main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 60px;
}
.wc .p-community .sso-wrap { width: 100%; max-width: 520px; text-align: center; }
.wc .p-community .sso-brand {
  display: inline-block;
  margin-bottom: 26px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-strong, #ffffff);
  text-decoration: none;
}
.wc .p-community .sso-brand span { color: var(--accent, #00c8ff); }
.wc .p-community .sso-card {
  position: relative;
  overflow: hidden;
  padding: 36px 28px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 18px;
  background: var(--bg-card, #0e1230);
}
.wc .p-community .sso-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent, #00c8ff), var(--gold, #d4a843));
}
.wc .p-community .sso-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-strong, #ffffff);
  margin: 0 0 10px;
}
.wc .p-community .sso-status { color: var(--text-muted, #a0aab8); margin: 0; line-height: 1.6; }
.wc .p-community .sso-retry {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 0;
}
.wc .p-community .sso-retry[hidden] { display: none; }
.wc .p-community .sso-help {
  margin: 20px 0 0;
  color: var(--text-faint, #768193);
  font-size: 0.9rem;
  line-height: 1.6;
}
.wc .p-community .sso-help a { color: var(--accent, #00c8ff); }

@media (max-width: 640px) {
  .wc .p-community .community-hero { padding: 64px 0 48px; }
  .wc .p-community .community-section { padding: 48px 0; }
  .wc .p-community .rule-list li { padding-left: 58px; }
}
