:root {
  --portal-green: #175f5b;
  --portal-green-soft: #dff0eb;
  --portal-coral-soft: #fff0ec;
  --portal-blue-soft: #eaf0f7;
  --portal-shadow: 0 24px 70px rgba(18, 32, 47, 0.13);
}

.portal-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 16%, rgba(33, 115, 111, 0.10), transparent 28rem),
    radial-gradient(circle at 92% 6%, rgba(200, 154, 55, 0.12), transparent 24rem),
    var(--paper);
}

.portal-body > main {
  flex: 1;
}

.portal-header {
  background: rgba(255, 253, 249, 0.88);
}

.portal-nav .nav-logout {
  margin: 0;
}

.portal-nav .nav-logout button {
  appearance: none;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.93rem;
  font-weight: 650;
  padding: 10px 11px;
}

.portal-nav .nav-logout button:hover {
  color: var(--ink);
  background: var(--mist);
}

.portal-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(18, 32, 47, 0.98), rgba(22, 50, 74, 0.92) 55%, rgba(33, 115, 111, 0.86)),
    url("core-community-hero.webp") center 58% / cover no-repeat;
}

.portal-hero::after {
  content: "";
  position: absolute;
  inset: -20% -5% auto auto;
  width: 420px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(255, 255, 255, 0.035), 0 0 0 96px rgba(255, 255, 255, 0.02);
}

.portal-hero .container {
  position: relative;
  z-index: 1;
  padding-block: clamp(54px, 8vw, 88px);
}

.portal-hero h1 {
  max-width: 820px;
  margin: 10px 0 12px;
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.portal-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.portal-section {
  padding-block: clamp(42px, 7vw, 78px);
}

.portal-section-tight {
  padding-block: 32px 64px;
}

.portal-shell {
  width: min(100% - 40px, 1040px);
  margin-inline: auto;
}

.portal-shell-narrow {
  width: min(100% - 40px, 680px);
  margin-inline: auto;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 22px;
  align-items: stretch;
}

.portal-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(222, 216, 205, 0.88);
  border-radius: 16px;
  box-shadow: var(--portal-shadow);
  padding: clamp(24px, 4vw, 38px);
}

.portal-panel-subtle {
  box-shadow: 0 12px 36px rgba(18, 32, 47, 0.07);
}

.portal-panel h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.auth-aside {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(145deg, var(--teal-dark), var(--navy));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-aside::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -70px;
  width: 210px;
  height: 210px;
  border: 32px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.auth-aside h2,
.auth-aside h3 {
  color: var(--white);
}

.auth-aside p,
.auth-aside li {
  color: rgba(255, 255, 255, 0.82);
}

.auth-aside .check-list li::before {
  color: var(--navy);
  background: var(--gold);
}

.portal-form {
  display: grid;
  gap: 18px;
}

.portal-field {
  display: grid;
  gap: 8px;
}

.portal-field label,
.portal-label {
  color: var(--ink);
  font-size: 0.91rem;
  font-weight: 800;
}

.portal-input-wrap {
  position: relative;
}

.portal-field input,
.portal-field textarea,
.portal-field select {
  width: 100%;
  min-height: 52px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #cfd8d4;
  border-radius: 10px;
  outline: none;
  padding: 13px 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.portal-field textarea {
  min-height: 120px;
  resize: vertical;
}

.portal-field input:focus,
.portal-field textarea:focus,
.portal-field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(33, 115, 111, 0.13);
}

.portal-field small,
.portal-hint {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.portal-password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  transform: translateY(-50%);
  appearance: none;
  color: var(--teal-dark);
  background: var(--portal-green-soft);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 9px;
}

.portal-button {
  width: 100%;
  min-height: 52px;
  border-radius: 10px;
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.portal-actions .button {
  min-height: 44px;
}

.portal-inline-link {
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(33, 115, 111, 0.3);
  text-underline-offset: 3px;
}

.portal-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-divider::before,
.portal-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.portal-flashes {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.portal-flash {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(18, 32, 47, 0.06);
  padding: 14px 16px;
  font-weight: 700;
}

.portal-flash-success {
  color: var(--teal-dark);
  border-left-color: var(--teal);
  background: #f2faf7;
}

.portal-flash-error {
  color: #8d382f;
  border-left-color: var(--coral);
  background: #fff7f4;
}

.portal-flash-warning {
  color: #785817;
  border-left-color: var(--gold);
  background: #fffbef;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(280px, 0.78fr);
  gap: 20px;
}

.dashboard-stack {
  display: grid;
  gap: 20px;
}

.status-card {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--teal-dark));
}

.status-card h2,
.status-card h3 {
  color: var(--white);
}

.status-card p {
  color: rgba(255, 255, 255, 0.77);
}

.status-card::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -50px;
  width: 180px;
  height: 180px;
  border: 24px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
}

.status-badge,
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
  padding: 7px 10px;
}

.status-badge-active,
.verified-badge {
  color: #0e514c;
  background: #dff5ec;
}

.status-badge-warning {
  color: #785817;
  background: #fff2c9;
}

.status-badge-inactive {
  color: #793b35;
  background: #ffe5df;
}

.unverified-badge {
  color: #785817;
  background: #fff2c9;
}

.profile-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.profile-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-block: 16px;
}

.profile-row:last-child {
  border-bottom: 0;
}

.profile-row dt {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 800;
}

.profile-row dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 750;
}

.mini-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-stat {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  padding: 16px;
}

.mini-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--white);
  font-size: 1.08rem;
}

.phone-verification-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 20px;
  padding: 18px;
  background: #fff8e5;
  border: 1px solid rgba(200, 154, 55, 0.34);
  border-radius: 14px;
}

.phone-verification-panel p {
  margin: 9px 0 0;
  color: var(--ink-soft);
}

.phone-verification-panel form {
  flex: 0 0 auto;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.service-card {
  position: relative;
  display: flex;
  min-height: 320px;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 42px rgba(18, 32, 47, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 54px rgba(18, 32, 47, 0.13);
}

.service-card-cover {
  display: grid;
  place-items: center;
  min-height: 126px;
  background: linear-gradient(135deg, var(--portal-green-soft), var(--portal-blue-soft));
}

.service-card-cover img {
  width: 92px;
  max-height: 76px;
  object-fit: contain;
}

.service-monogram {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  color: var(--white);
  background: linear-gradient(145deg, var(--teal), var(--navy));
  border-radius: 16px;
  font-size: 1.5rem;
  font-weight: 900;
}

.service-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.service-card-body p {
  color: var(--ink-soft);
}

.service-card-body .portal-inline-link {
  margin-top: auto;
}

.services-roadmap {
  margin-bottom: 28px;
}

.service-category-card {
  min-height: 286px;
}

.service-category-card .service-card-body {
  gap: 10px;
}

.service-category-card .service-card-body .status-badge {
  align-self: flex-start;
}

.service-category-card .service-monogram svg,
.services-partner-note .service-monogram svg {
  width: 30px;
  height: 30px;
}

.services-partner-note {
  display: flex;
  gap: 22px;
  align-items: center;
}

.services-partner-note .service-monogram {
  flex: 0 0 auto;
}

.services-partner-note h2,
.services-partner-note p {
  margin-bottom: 0;
}

.services-partner-heading {
  margin-top: 42px;
}

.service-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.offer-panel {
  border-color: rgba(33, 115, 111, 0.32);
  background: linear-gradient(145deg, #f4fbf8, #fffdf9);
}

.contact-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list a,
.contact-list span {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  overflow-wrap: anywhere;
}

.empty-services {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-block: clamp(44px, 7vw, 72px);
}

.empty-services .service-monogram {
  margin: 0 auto 22px;
}

.password-meter {
  height: 6px;
  overflow: hidden;
  background: var(--mist);
  border-radius: 999px;
}

.password-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--coral);
  transition: width 0.18s ease, background 0.18s ease;
}

.password-meter[data-score="2"] span { width: 40%; background: var(--coral); }
.password-meter[data-score="3"] span { width: 65%; background: var(--gold); }
.password-meter[data-score="4"] span { width: 82%; background: var(--teal); }
.password-meter[data-score="5"] span { width: 100%; background: var(--teal-dark); }

.portal-footer {
  margin-top: auto;
}

.portal-footer-row {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  padding-block: 34px;
}

.portal-footer .footer-brand {
  max-width: 520px;
}

.portal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
}

.portal-footer-links a:hover {
  color: var(--white);
}

.admin-section {
  padding-top: 34px;
}

.admin-shell {
  width: min(100% - 40px, 1280px);
}

.admin-sync-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  align-items: center;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(222, 216, 205, 0.88);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(18, 32, 47, 0.06);
  margin-bottom: 18px;
  padding: 14px 18px;
  font-size: 0.86rem;
}

.admin-subnav {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.admin-subnav a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  color: var(--ink-soft);
  border-radius: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.admin-subnav a.active {
  color: var(--white);
  background: var(--navy);
}

.admin-live-indicator {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: var(--teal-dark);
  font-weight: 850;
}

.admin-live-indicator > span {
  width: 9px;
  height: 9px;
  background: #23a37b;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(35, 163, 123, 0.12);
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.admin-security-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-metric {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(222, 216, 205, 0.88);
  border-radius: 15px;
  box-shadow: 0 12px 32px rgba(18, 32, 47, 0.07);
  padding: 20px;
}

.admin-metric::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -35px;
  width: 90px;
  height: 90px;
  background: var(--portal-blue-soft);
  border-radius: 50%;
  opacity: 0.65;
}

.admin-metric-positive::after {
  background: var(--portal-green-soft);
}

.admin-metric-warning::after {
  background: #fff2c9;
}

.admin-metric > span {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 850;
}

.admin-metric strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 10px 0 4px;
  color: var(--ink);
  font-size: clamp(1.9rem, 4vw, 2.65rem);
  line-height: 1;
}

.admin-metric small {
  position: relative;
  z-index: 1;
  color: var(--ink-soft);
}

.admin-members-panel {
  padding: clamp(20px, 3vw, 30px);
}

.admin-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}

.admin-panel-heading h2 {
  margin-bottom: 6px;
}

.admin-panel-heading p {
  margin: 0;
  color: var(--ink-soft);
}

.admin-export-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.admin-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(190px, 0.55fr) repeat(2, minmax(145px, 0.42fr)) auto auto;
  gap: 12px;
  align-items: end;
  margin-block: 26px 20px;
}

.admin-search-wrap {
  position: relative;
}

.admin-search-wrap > svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  transform: translateY(-50%);
  color: var(--ink-soft);
  pointer-events: none;
}

.admin-search-wrap input {
  padding-left: 42px;
}

.admin-filter-button,
.admin-reset-button {
  min-height: 52px;
  white-space: nowrap;
}

.admin-activity-filter {
  display: grid;
  grid-template-columns: minmax(240px, 0.6fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-block: 26px 20px;
}

.admin-activity-filter .button {
  min-height: 52px;
}

.admin-audit-table {
  min-width: 900px;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.admin-members-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  background: var(--white);
}

.admin-members-table th {
  color: var(--ink-soft);
  background: #f6f7f5;
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
  font-size: 0.75rem;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.admin-members-table td {
  border-bottom: 1px solid var(--line);
  padding: 15px 16px;
  vertical-align: middle;
  font-size: 0.88rem;
}

.admin-members-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-members-table tbody tr:hover {
  background: #fbfcfa;
}

.admin-member-name {
  display: flex;
  gap: 11px;
  align-items: center;
}

.admin-member-name > span:last-child,
.admin-contact {
  display: grid;
  gap: 3px;
}

.admin-member-name small,
.admin-plan {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
}

.admin-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--teal-dark);
  background: var(--portal-green-soft);
  border-radius: 11px;
  font-weight: 900;
}

.admin-contact span {
  display: flex;
  gap: 6px;
  align-items: center;
  max-width: 250px;
  overflow-wrap: anywhere;
}

.admin-contact svg {
  flex: 0 0 auto;
  width: 15px;
  color: var(--teal-dark);
}

.admin-account-state {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--ink-soft);
  font-weight: 800;
}

.admin-account-state.is-linked {
  color: var(--teal-dark);
}

.admin-account-state svg {
  width: 15px;
}

.admin-pagination {
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  margin-top: 22px;
}

.admin-pagination .button {
  min-height: 42px;
  padding: 9px 14px;
}

.admin-empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  border-radius: 13px;
  text-align: center;
  padding: 32px;
}

.admin-empty-state > svg {
  width: 36px;
  height: 36px;
  color: var(--teal);
}

.admin-empty-state h3,
.admin-empty-state p {
  margin: 4px 0;
}

:focus-visible {
  outline: 3px solid rgba(200, 154, 55, 0.8);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .auth-grid,
  .dashboard-grid,
  .service-detail-grid {
    grid-template-columns: 1fr;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-metrics,
  .admin-security-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .portal-shell,
  .portal-shell-narrow,
  .admin-shell {
    width: min(100% - 28px, 1040px);
  }

  .portal-nav .nav-logout button {
    width: 100%;
    padding: 12px 14px;
    text-align: left;
  }

  .service-grid,
  .mini-stat-grid {
    grid-template-columns: 1fr;
  }

  .services-partner-note {
    align-items: flex-start;
  }

  .profile-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .phone-verification-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .phone-verification-panel .button {
    width: 100%;
  }

  .admin-metrics,
  .admin-filters,
  .admin-activity-filter {
    grid-template-columns: 1fr;
  }

  .admin-filter-button,
  .admin-reset-button,
  .admin-export-button {
    width: 100%;
  }

  .admin-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-sync-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-pagination {
    justify-content: space-between;
    gap: 8px;
  }

  .admin-pagination .button {
    width: auto;
  }

  .portal-actions,
  .portal-actions .button {
    width: 100%;
  }

  .portal-footer-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.community-shell {
  width: min(100% - 40px, 1180px);
}

.community-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.community-welcome-card h2 {
  max-width: 720px;
  margin-bottom: 10px;
}

.community-welcome-card p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--ink-soft);
}

.community-access-card {
  display: grid;
  align-content: center;
  min-height: 220px;
  color: var(--white);
  background: linear-gradient(145deg, var(--teal-dark), var(--navy));
  border-color: rgba(255, 255, 255, 0.12);
}

.community-access-card strong {
  margin-top: 18px;
  color: var(--white);
  font-size: clamp(2.7rem, 6vw, 4.2rem);
  line-height: 0.9;
}

.community-access-card > span:not(.community-access-icon) {
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.community-access-card small {
  margin-top: 13px;
  color: rgba(255, 255, 255, 0.62);
}

.community-access-icon,
.community-section-icon,
.community-group-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
}

.community-access-icon {
  width: 44px;
  height: 44px;
  color: var(--navy);
  background: var(--gold);
}

.community-filter-panel {
  margin-bottom: 30px;
  padding: clamp(20px, 3vw, 28px);
}

.community-filter-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 0.36fr) auto auto;
  gap: 12px;
  align-items: end;
}

.community-filter-button,
.community-reset-button {
  min-height: 52px;
  white-space: nowrap;
}

.community-category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 18px;
  padding: 2px 1px 8px;
  scrollbar-width: thin;
}

.community-category-chip {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
  min-height: 38px;
  color: var(--ink-soft);
  background: #f4f6f3;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 800;
}

.community-category-chip:hover,
.community-category-chip.is-active {
  color: var(--white);
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.community-category-chip svg {
  width: 15px;
  height: 15px;
}

.community-category-stack {
  display: grid;
  gap: 38px;
}

.community-group-section {
  min-width: 0;
}

.community-section-heading {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 15px;
}

.community-section-heading h2,
.community-section-heading p {
  margin: 0;
}

.community-section-heading h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.community-section-heading p {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.community-section-icon {
  width: 46px;
  height: 46px;
  color: var(--teal-dark);
  background: var(--portal-green-soft);
}

.community-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.community-group-card {
  display: flex;
  min-width: 0;
  min-height: 250px;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 12px 34px rgba(18, 32, 47, 0.07);
  padding: 20px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.community-group-card:hover {
  transform: translateY(-2px);
  border-color: rgba(33, 115, 111, 0.32);
  box-shadow: 0 18px 40px rgba(18, 32, 47, 0.11);
}

.community-group-card.is-featured {
  background: linear-gradient(145deg, #f3fbf8, #fffdf9);
  border-color: rgba(33, 115, 111, 0.3);
}

.community-group-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.community-group-icon {
  width: 42px;
  height: 42px;
  color: #0e6d51;
  background: #dcf6e9;
}

.community-group-card h3 {
  margin: 18px 0 8px;
  font-size: 1.12rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.community-group-card p {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.community-join-form {
  margin-top: auto;
}

.community-join-form .button {
  width: 100%;
  min-height: 46px;
  border-radius: 10px;
}

.community-privacy-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: #355451;
  background: #eef8f5;
  border: 1px solid #cfe8df;
  border-radius: 13px;
  margin-top: 34px;
  padding: 16px 18px;
}

.community-privacy-note svg {
  flex: 0 0 auto;
  width: 20px;
  margin-top: 2px;
}

.community-privacy-note p {
  margin: 0;
  font-size: 0.88rem;
}

.community-empty-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  text-align: center;
}

.community-empty-state > svg {
  width: 38px;
  height: 38px;
  color: var(--teal);
}

.community-empty-state h2,
.community-empty-state p {
  margin: 5px 0;
}

@media (max-width: 980px) {
  .community-intro-grid {
    grid-template-columns: 1fr;
  }

  .community-access-card {
    min-height: 190px;
  }

  .community-filter-form {
    grid-template-columns: 1fr 1fr;
  }

  .community-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .community-shell {
    width: min(100% - 28px, 1180px);
  }

  .community-filter-form,
  .community-group-grid {
    grid-template-columns: 1fr;
  }

  .community-filter-button,
  .community-reset-button {
    width: 100%;
  }

  .community-group-card {
    min-height: 0;
  }

  .community-category-chips {
    margin-inline: -4px;
  }

  .community-section-heading {
    align-items: flex-start;
  }
}

/* Service directory and protected request flows */
.service-liability-note {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 34px;
  border-color: rgba(200, 154, 55, 0.32);
  background: linear-gradient(145deg, #fffaf0, #fffdf9);
}

.service-liability-note .service-monogram {
  flex: 0 0 auto;
  color: #72520f;
  background: #f9e8bd;
}

.service-liability-note h2,
.service-liability-note p {
  margin-bottom: 0;
}

.service-action-stack {
  position: sticky;
  top: 92px;
}

.service-lead-panel,
.service-external-panel {
  border-color: rgba(33, 115, 111, 0.28);
  box-shadow: 0 18px 48px rgba(18, 32, 47, 0.1);
}

.service-lead-panel > p,
.service-external-panel > p,
.service-disclaimer p {
  color: var(--ink-soft);
}

.service-lead-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.service-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.service-lead-form textarea {
  min-height: 126px;
  resize: vertical;
}

.service-form-help {
  margin: -8px 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.service-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 11px;
  align-items: start;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.55;
}

.service-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--teal-dark);
}

.service-honeypot {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.service-disclaimer {
  color: #41330f;
  border-color: #ead7a6;
  background: linear-gradient(145deg, #fff9ea, #fffdf8);
}

.service-steps {
  display: grid;
  gap: 14px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.service-steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  align-items: center;
  color: var(--ink-soft);
}

.service-steps li > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--white);
  background: var(--teal-dark);
  border-radius: 50%;
  font-weight: 900;
}

.service-code-box {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  padding: 20px;
  text-align: center;
  background: var(--portal-green-soft);
  border: 1px dashed rgba(33, 115, 111, 0.45);
  border-radius: 14px;
}

.service-code-box > span {
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-code-box strong {
  color: var(--navy);
  font-size: clamp(1.55rem, 4vw, 2rem);
  letter-spacing: 0.08em;
}

.service-code-box .button {
  justify-self: center;
}

.admin-leads-table {
  min-width: 1180px;
}

.admin-leads-table td a {
  display: block;
  max-width: 240px;
  overflow-wrap: anywhere;
}

.admin-lead-message {
  display: -webkit-box;
  max-width: 320px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

@media (max-width: 980px) {
  .service-action-stack {
    position: static;
  }
}

@media (max-width: 680px) {
  .service-liability-note {
    display: grid;
  }

  .service-form-grid {
    grid-template-columns: 1fr;
  }

  .service-lead-panel,
  .service-external-panel {
    padding: 22px 20px;
  }

  .service-code-box .button,
  .service-lead-form .button {
    width: 100%;
  }
}
